body:not([data-site]) > :not(#site-chooser) { display: none !important; }
#site-chooser { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
#chooser-title { font-size: clamp(25px, 4vw, 36px); font-weight: 400; letter-spacing: -1px; margin: 12px 0 32px; max-width: 560px; }
.eyebrow { color: #777; font-size: 11px; letter-spacing: 2px; margin: 0; }
.habitat-choices { display: flex; gap: 14px; max-width: 600px; width: 100%; }
.habitat-choices button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 32px 18px; background: #0c0c0c; border: 1px solid #282828; border-radius: 14px; color: #eee; }
.habitat-choices button:first-child { background: #0c0c0c; border-color: #282828; }
.habitat-choices button:hover { border-color: #888; }
.habitat-choices strong { font-size: 25px; font-weight: 400; letter-spacing: -1px; }
.habitat-choices span, .chooser-note, #choice-status { font-size: 11px; line-height: 1.6; color: #888; }
.chooser-note { margin-top: 22px; }
.habitat-tools { display: flex; align-items: center; gap: 5px; margin-left: auto; flex-shrink: 0; }
.habitat-tools button { border: 0; background: transparent; color: #888; font-size: 11px; border-radius: 5px; padding: 7px 9px; white-space: nowrap; }
.habitat-tools button:hover { color: #eee; background: #1c1c1c; }
.habitat-tools #bookmark-page { font-size: 20px; padding: 1px 7px; }
body:not([data-site=clouded]) .clouded-only { display: none !important; }
body[data-site=clouded] { --habitat-accent: #bcbcbc; --habitat-border: #303030; --habitat-base: #000; --habitat-panel: #0c0c0c; background: #000; color: #eee; }
body[data-site=clouded][data-palette=fern] { --habitat-accent: #929292; }
body[data-site=clouded][data-palette=mist] { --habitat-accent: #dedede; }
.leopard { width: 126px; height: 96px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }
body[data-site=clouded] .leopard { border-radius: 18px; }
body[data-site=clouded] h1 { font-size: 48px; font-weight: 400; }
body[data-site=clouded] .study-form { border-radius: 22px; }
body[data-site=clouded] .study-form:focus-within { border-color: var(--habitat-accent); }
body[data-site=clouded] .study-tab:has([aria-selected=true]) { border-color: var(--habitat-accent); }
body[data-site=clouded] .search-results a { color: var(--habitat-accent); }
#saved-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
#saved-pages:empty { display: none; }
#saved-pages button { max-width: 170px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid var(--habitat-border); border-radius: 7px; background: var(--habitat-panel); color: #aaa; font-size: 11px; padding: 7px 10px; }
.compact-tabs .tab-strip { height: 33px; }
.compact-tabs .study-tab [role=tab] { min-width: 65px; max-width: 135px; font-size: 11px; padding: 4px 8px; }
.compact-tabs .close-tab { height: 23px; width: 23px; }
#preferences { width: min(430px, calc(100vw - 32px)); max-height: calc(100svh - 48px); border: 1px solid var(--habitat-border, #333); border-radius: 16px; padding: 24px; background: var(--habitat-base, #111); color: #ddd; }
#preferences::backdrop { background: #0009; backdrop-filter: blur(4px); }
.preferences-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.preferences-heading h2 { font-size: 21px; font-weight: 400; margin: 0; }
#preferences button { border: 1px solid var(--habitat-border, #333); border-radius: 6px; background: var(--habitat-panel, #222); color: #bbb; font-size: 11px; padding: 8px 11px; }
#preferences #close-preferences { border: 0; background: transparent; font-size: 23px; padding: 0 4px; }
#preferences label { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; margin: 22px 0; }
#preferences select { background: var(--habitat-panel); color: #ddd; border: 1px solid var(--habitat-border); border-radius: 5px; padding: 6px; font-size: 12px; }
#preferences input { accent-color: var(--habitat-accent); }
.preferences-actions { display: flex; gap: 8px; margin-top: 25px; }
#preferences-status { font-size: 11px; color: #999; line-height: 1.6; overflow-wrap: anywhere; }
.bookmark-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; border-top: 1px solid var(--habitat-border); padding-top: 10px; margin-top: 10px; }
.bookmark-row span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
 .habitat-tools { gap: 0; }
 .habitat-tools button { padding: 6px; font-size: 10px; }
 .habitat-choices { flex-direction: column; max-width: 350px; }
 .habitat-choices button { padding: 20px; gap: 10px; }
 .habitat-choices img { width: 48px; height: 48px; }
 body[data-site=clouded] h1 { font-size: 42px; }
}

.habitat-choices img { width: 90px; height: 68px; object-fit: cover; border-radius: 8px; }
