:root {
  color-scheme: dark;
  --bg: #0c0d12;
  --surface: #11131a;
  --surface-2: #171922;
  --surface-3: #20222c;
  --line: rgba(255,255,255,.075);
  --line-bright: rgba(255,255,255,.13);
  --text: #f4f3f6;
  --muted: #9a9aa7;
  --faint: #6b6c79;
  --accent: #ce96ff;
  --accent-2: #9f63e8;
  --mint: #b7efb3;
  --rose: #f0a2ab;
  --sidebar: 246px;
  --sans: Inter, 'Segoe UI', system-ui, sans-serif;
  --display: Inter, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Cascadia Code', Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { opacity: .4; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { width: var(--sidebar); height: 100dvh; position: fixed; inset: 0 auto 0 0; z-index: 4; display: flex; flex-direction: column; padding: 30px 18px 18px; background: #101116; border-right: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 12px; margin: 0 0 56px; width: max-content; }
.brand-mark { width: 25px; height: 25px; display: flex; gap: 3px; align-items: end; transform: skew(-18deg); }
.brand-mark span { display: block; width: 6px; border-radius: 5px 5px 2px 2px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 13px; opacity: .67; }
.brand-mark span:nth-child(2) { height: 21px; }
.brand-mark span:nth-child(3) { height: 17px; opacity: .82; }
.brand-word { font: 800 26px/.9 var(--display); letter-spacing: -1.7px; }
.brand-dot, .heading-dot { color: var(--accent); }
.sidebar-caption { padding: 0 13px; margin: 0 0 11px; color: #626370; font: 500 9px/1 var(--mono); letter-spacing: 1.25px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { position: relative; width: 100%; height: 44px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: #9696a3; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.045); color: var(--text); }
.nav-item.active { color: #f7efff; background: linear-gradient(100deg, rgba(180,117,238,.17), rgba(180,117,238,.055)); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 17px; text-align: center; font-size: 17px; color: #777885; }
.tag-symbol { font: 600 16px var(--mono); }
.nav-arrow { margin-left: auto; color: #8e709f; font-size: 14px; }
.nav-count { min-width: 22px; height: 20px; margin-left: auto; display: grid; place-items: center; padding: 0 6px; border-radius: 20px; color: #b8b6c1; background: rgba(255,255,255,.06); font: 10px var(--mono); }
.sidebar-divider { height: 1px; margin: 22px 9px 25px; background: var(--line); }
.sidebar-spacer { flex: 1; min-height: 45px; }
.sidebar-note { position: relative; overflow: hidden; padding: 16px 14px; border: 1px solid rgba(205,150,255,.13); border-radius: 10px; background: linear-gradient(140deg, rgba(107,67,137,.16), rgba(38,36,51,.12)); }
.sidebar-note p { position: relative; z-index: 1; margin: 0; color: #9593a1; font-size: 11px; line-height: 1.7; }
.sidebar-note strong { color: #e4d6f1; font-weight: 600; }
.note-orb { position: absolute; width: 93px; height: 93px; right: -35px; top: -42px; border: 1px solid rgba(208,156,255,.17); border-radius: 50%; box-shadow: 0 0 0 12px rgba(199,151,246,.025), 0 0 0 25px rgba(199,151,246,.02); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: 18px 6px 0; color: #70717d; font: 9px var(--mono); letter-spacing: .1px; }
.status-dot, .stat-live span { width: 6px; height: 6px; border-radius: 100%; background: #96d99f; box-shadow: 0 0 10px rgba(150,217,159,.55); }

.main-area { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 3; height: 76px; display: flex; align-items: center; gap: 27px; padding: 0 clamp(28px, 4.2vw, 72px); border-bottom: 1px solid var(--line); background: rgba(12,13,18,.86); backdrop-filter: blur(18px); }
.crumb { display: flex; align-items: center; gap: 10px; min-width: 132px; white-space: nowrap; color: #737481; font-size: 12px; }
.crumb-slash { color: #4b4c57; }
.crumb strong { color: #d6d4db; font-weight: 500; }
.search-form { height: 42px; flex: 1; max-width: 760px; display: flex; align-items: center; gap: 10px; padding: 0 5px 0 14px; border: 1px solid rgba(255,255,255,.085); border-radius: 8px; background: rgba(255,255,255,.035); transition: border-color .2s, background .2s; }
.search-form:focus-within { border-color: rgba(205,150,255,.55); background: rgba(255,255,255,.055); }
.search-icon { color: #898792; font-size: 22px; transform: rotate(-20deg); line-height: 1; }
.search-form input[type="search"] { width: 100%; min-width: 0; flex: 1 1 auto; border: 0; outline: 0; color: #efedf3; background: transparent; font-size: 12px; }
.search-form input::placeholder { color: #71717d; }
.search-form kbd { padding: 3px 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; color: #777782; font: 10px var(--mono); }
.search-submit { height: 31px; padding: 0 12px; border: 0; border-radius: 6px; background: #d1a2f5; color: #21162b; font-size: 11px; font-weight: 700; cursor: pointer; transition: .2s; }
.search-submit:hover { background: #e2c0ff; }
.avatar-button { width: 34px; height: 34px; flex: 0 0 auto; margin-left: auto; display: grid; place-items: center; border: 1px solid rgba(210,180,226,.22); border-radius: 50%; background: linear-gradient(140deg, #382848, #211f2c); cursor: pointer; }
.avatar-button span { color: #dfc6f3; font: 700 12px var(--display); }

.page-content { max-width: 1600px; margin: 0 auto; padding: 31px clamp(28px, 4.2vw, 72px) 18px; }
.hero { position: relative; overflow: hidden; min-height: 296px; display: flex; align-items: center; padding: 37px 46px; border: 1px solid rgba(228,197,255,.1); border-radius: 11px; background: radial-gradient(ellipse at 75% 50%, rgba(105,68,128,.18), transparent 35%), linear-gradient(112deg, #1d1824 0%, #17171f 47%, #17141c 100%); }
.hero::before { content: ''; position: absolute; width: 440px; height: 440px; right: 11%; top: -290px; border: 1px solid rgba(227,193,255,.07); border-radius: 50%; box-shadow: 0 0 0 34px rgba(227,193,255,.012), 0 0 0 72px rgba(227,193,255,.011); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #c7aacd; font: 500 9px var(--mono); letter-spacing: 1.55px; }
.eyebrow-line { width: 20px; height: 1px; background: #bf8bdc; }
.eyebrow-spark { margin-left: 1px; color: #e6bc8c; font-size: 12px; }
.hero h1 { margin: 21px 0 13px; font: 700 clamp(33px, 3.7vw, 49px)/1.11 var(--display); letter-spacing: -2.2px; }
.hero h1 span { color: #d9b3f0; }
.hero-copy p { margin: 0; color: #9a97a3; font-size: 12px; line-height: 1.75; }
.hero-cta { display: inline-flex; align-items: center; gap: 21px; margin-top: 23px; padding: 10px 13px; border: 1px solid rgba(219,180,248,.3); border-radius: 6px; background: rgba(194,139,232,.1); color: #e5d6ef; font-size: 11px; cursor: pointer; transition: .18s; }
.hero-cta:hover { border-color: rgba(219,180,248,.65); background: rgba(194,139,232,.18); }
.hero-cta span { color: var(--accent); font-size: 14px; }
.hero-art { position: absolute; width: 42%; max-width: 450px; height: 100%; right: 5.5%; top: 0; }
.art-glow { position: absolute; left: 18%; top: 16%; width: 66%; height: 75%; background: radial-gradient(ellipse, rgba(145,98,183,.18), transparent 68%); filter: blur(8px); }
.art-ring { position: absolute; left: 48%; top: 50%; border: 1px solid rgba(220,185,238,.12); border-radius: 50%; transform: translate(-50%,-50%); }
.art-ring-one { width: 228px; height: 228px; }
.art-ring-two { width: 278px; height: 278px; border-color: rgba(220,185,238,.07); }
.hero-stack { position: absolute; left: 48%; top: 49%; width: 205px; height: 224px; transform: translate(-50%,-50%); }
.stack-card { position: absolute; overflow: hidden; width: 138px; height: 185px; border: 1px solid rgba(255,255,255,.12); border-radius: 4px; box-shadow: 0 16px 45px rgba(0,0,0,.35); }
.stack-back { left: 9px; top: 30px; transform: rotate(-13deg); background: linear-gradient(154deg, #3b293f, #986e83 45%, #d5a388 46%, #55354f 77%); }
.stack-back::after { content: ''; position: absolute; inset: 0; opacity: .26; background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(245,218,239,.25) 13px 14px); }
.stack-mid { left: 62px; top: 21px; transform: rotate(12deg); background: linear-gradient(145deg, #423557, #c29a9a 46%, #554264 47%, #a97a92); }
.stack-mid::after { content: ''; position: absolute; width: 125px; height: 125px; right: -42px; top: -30px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; box-shadow: 0 0 0 15px rgba(255,255,255,.08); }
.stack-front { left: 39px; top: 24px; display: flex; flex-direction: column; justify-content: end; padding: 12px; background: linear-gradient(160deg, #e3bcb0 0%, #bd7e8d 34%, #6c4e72 65%, #342e48); transform: rotate(-2deg); }
.stack-front::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 60% 31%, rgba(255,236,215,.85) 0 8%, transparent 8.5%), linear-gradient(135deg, transparent 35%, rgba(245,219,214,.44) 35% 36%, transparent 36% 44%, rgba(239,207,212,.3) 44% 45%, transparent 45%); mix-blend-mode: soft-light; }
.stack-front span, .stack-front small, .cover-lines { position: relative; z-index: 1; }
.stack-front span { font: 800 14px/.98 var(--display); letter-spacing: -.45px; color: #fff5f3; text-shadow: 0 1px 8px rgba(44,20,48,.45); }
.stack-front small { margin-top: 7px; color: rgba(255,241,244,.75); font: 6px var(--mono); letter-spacing: .8px; }
.cover-lines { position: absolute; top: 10px; left: 11px; right: 11px; display: grid; gap: 4px; }
.cover-lines i { height: 2px; width: 47%; background: rgba(255,245,243,.63); border-radius: 2px; }
.cover-lines i:nth-child(2) { width: 68%; }
.cover-lines i:nth-child(3) { width: 31%; }
.hero-label { position: absolute; color: #9c8da7; font: 8px var(--mono); letter-spacing: 1.1px; }
.label-top { right: 0; top: 28%; display: flex; align-items: center; gap: 7px; }
.label-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.label-bottom { left: 28%; bottom: 13%; }
.label-bottom span { margin-right: 5px; color: #d9acdf; }
.art-star { position: absolute; color: #d4a2e6; }
.star-one { top: 22%; left: 15%; font-size: 18px; }
.star-two { top: 67%; right: 18%; font-size: 21px; color: #d9bd98; }
.hero-grain { position: absolute; pointer-events: none; inset: 0; opacity: .13; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E"); }

.quick-stats { min-height: 75px; display: flex; align-items: center; gap: clamp(18px, 4vw, 60px); padding: 0 8px; border-bottom: 1px solid var(--line); }
.quick-stat { display: flex; align-items: center; gap: 11px; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(183,239,179,.12); border-radius: 8px; background: rgba(183,239,179,.045); color: var(--mint); font-size: 15px; }
.stat-icon.violet { border-color: rgba(207,150,255,.14); background: rgba(207,150,255,.06); color: var(--accent); }
.stat-icon.peach { border-color: rgba(240,162,171,.13); background: rgba(240,162,171,.05); color: var(--rose); }
.quick-stat strong { display: block; color: #d5d2db; font-size: 10px; font-weight: 600; }
.quick-stat small { display: block; margin-top: 3px; color: #757582; font-size: 9px; }
.stat-live { display: flex; align-items: center; gap: 8px; margin-left: auto; color: #83858e; font: 9px var(--mono); letter-spacing: .4px; }

.collection-section { padding-top: 36px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.section-kicker { color: #9f7db6; font: 500 9px var(--mono); letter-spacing: 1.35px; }
.section-heading h2, .dialog-head h2 { margin: 8px 0 6px; color: #eeecf1; font: 700 24px/1.2 var(--display); letter-spacing: -.8px; }
.section-heading p { margin: 0; color: #858490; font-size: 11px; }
.heading-tools { display: flex; align-items: center; gap: 7px; }
.result-count { margin-right: 9px; color: #777783; font: 9px var(--mono); white-space: nowrap; }
.view-toggle { width: 29px; height: 29px; border: 1px solid transparent; border-radius: 6px; color: #70717c; background: transparent; cursor: pointer; }
.view-toggle.active, .view-toggle:hover { border-color: var(--line-bright); background: rgba(255,255,255,.04); color: #d1c8dc; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 21px 0 17px; }
.period-tabs { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #111219; }
.period-tabs[hidden], .sort-control[hidden], .annual-note[hidden] { display: none !important; }
.period-tab { padding: 7px 12px; border: 0; border-radius: 5px; background: transparent; color: #8c8b97; font-size: 10px; cursor: pointer; transition: .17s; }
.period-tab:hover { color: #e7d9ef; background: rgba(255,255,255,.045); }
.period-tab.active { color: #e9d8f7; background: rgba(192,137,233,.15); box-shadow: inset 0 0 0 1px rgba(195,144,237,.14); }
.sort-control { display: flex; align-items: center; gap: 8px; color: #74737f; font-size: 10px; white-space: nowrap; }
.sort-control select { padding: 7px 27px 7px 9px; border: 1px solid var(--line); border-radius: 6px; outline: none; color: #c7c3ce; background: #15161e; font-size: 10px; cursor: pointer; }
.annual-note { margin: -5px 0 14px; color: #80798b; font-size: 10px; }
.gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 15px; }
.gallery-card { min-width: 0; position: relative; cursor: pointer; animation: fade-up .33s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.cover-wrap { position: relative; overflow: hidden; aspect-ratio: .755; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: linear-gradient(130deg, #22212c, #302c3d 60%, #1d2028); }
.cover-wrap::after { content: ''; position: absolute; inset: 45% 0 0; pointer-events: none; background: linear-gradient(transparent, rgba(7,7,10,.5)); opacity: .7; }
.gallery-cover { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .93; transition: transform .5s cubic-bezier(.2,.6,.2,1), opacity .3s; }
.gallery-card:hover .gallery-cover { transform: scale(1.045); opacity: 1; }
.cover-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(224,198,242,.35); font: 500 26px var(--display); }
.cover-shimmer { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.055) 35%, transparent 52%); transform: translateX(-100%); animation: shimmer 1.8s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.card-cover-top { position: absolute; z-index: 1; top: 9px; left: 9px; right: 9px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.language-badge { padding: 4px 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; color: #f0e8f5; background: rgba(14,12,18,.56); backdrop-filter: blur(8px); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .4px; }
.save-button { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; color: white; background: rgba(14,12,18,.52); backdrop-filter: blur(8px); cursor: pointer; pointer-events: auto; font-size: 16px; transition: .18s; }
.save-button:hover, .save-button.saved { border-color: rgba(232,154,184,.52); color: #f6a6c3; background: rgba(46,19,39,.86); }
.page-badge { position: absolute; z-index: 1; right: 8px; bottom: 9px; padding: 4px 6px; border-radius: 3px; color: #f1eaf4; background: rgba(9,9,13,.72); font: 8px var(--mono); }
.card-info { padding: 10px 1px 0; }
.card-title { display: -webkit-box; overflow: hidden; min-height: 34px; margin: 0 0 7px; color: #dedce4; font-size: 11px; font-weight: 600; line-height: 1.5; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-tags { min-height: 21px; display: flex; gap: 5px; overflow: hidden; align-items: start; }
.card-tag { max-width: 104px; overflow: hidden; flex: 0 0 auto; padding: 4px 6px; border: 1px solid rgba(255,255,255,.065); border-radius: 4px; color: #8d8b98; background: rgba(255,255,255,.027); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.card-tag:hover { border-color: rgba(205,150,255,.26); color: #dbbbf1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; color: #72717e; font: 9px var(--mono); }
.card-favorites { color: #a886b7; }
.gallery-grid.compact { grid-template-columns: repeat(7, minmax(0,1fr)); gap: 16px 11px; }
.gallery-grid.compact .card-title { font-size: 10px; }
.gallery-grid.compact .card-tags { display: none; }
.loading-state, .empty-state, .error-state { min-height: 230px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 11px; color: #8b8995; }
.loader-ring { width: 22px; height: 22px; display: inline-block; border: 2px solid rgba(207,150,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { flex-direction: row; font-size: 11px; }
.empty-mark, .error-mark { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid rgba(205,150,255,.18); border-radius: 50%; color: var(--accent); background: rgba(205,150,255,.05); font-size: 23px; }
.error-mark { color: #e5a8ae; border-color: rgba(229,168,174,.2); background: rgba(229,168,174,.055); }
.empty-state h3, .error-state h3 { margin: 3px 0 0; color: #dedbe4; font: 600 16px var(--display); }
.empty-state p, .error-state p { max-width: 390px; margin: 0; color: #85838f; text-align: center; font-size: 11px; line-height: 1.6; }
.secondary-button { padding: 9px 13px; border: 1px solid rgba(205,150,255,.24); border-radius: 6px; color: #d9c5ea; background: rgba(205,150,255,.08); font-size: 10px; cursor: pointer; }
.secondary-button:hover { background: rgba(205,150,255,.15); }
.pagination-row { min-height: 80px; display: flex; justify-content: center; align-items: center; gap: 16px; color: #666573; font: 9px var(--mono); }
.load-more { padding: 10px 15px; border: 1px solid var(--line-bright); border-radius: 6px; color: #cac4d0; background: rgba(255,255,255,.025); font-size: 10px; cursor: pointer; }
.load-more:hover { border-color: rgba(205,150,255,.5); color: white; }
.load-more span { margin-left: 9px; color: var(--accent); font-size: 13px; }
.page-footer { min-height: 55px; display: flex; justify-content: space-between; align-items: center; margin-top: 25px; border-top: 1px solid var(--line); color: #6b6a76; font-size: 9px; }
.page-footer span:last-child { display: flex; align-items: center; gap: 9px; }
.page-footer a { color: #9c90a5; }
.page-footer a:hover { color: #d4b0ed; }
.page-footer i { width: 2px; height: 2px; border-radius: 50%; background: #605e68; }

.overlay { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; padding: 20px; background: rgba(5,5,8,.72); backdrop-filter: blur(8px); }
.tag-dialog, .info-dialog, .options-dialog { width: min(590px, 100%); max-height: min(690px, 90vh); display: flex; flex-direction: column; padding: 26px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: #14151d; box-shadow: 0 25px 100px rgba(0,0,0,.55); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 7px 0 0; font-size: 22px; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; color: #9b98a3; background: rgba(255,255,255,.035); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-button:hover { color: #fff; }
.dialog-copy { margin: 13px 0 17px; color: #94919e; font-size: 11px; line-height: 1.65; }
.tag-search { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line-bright); border-radius: 7px; color: #898693; }
.tag-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.tag-cloud { min-height: 90px; overflow: auto; display: flex; flex-wrap: wrap; align-content: start; gap: 7px; padding: 16px 0; }
.tag-cloud button { max-width: 100%; overflow: hidden; padding: 7px 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; color: #bcb7c4; background: rgba(255,255,255,.035); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.tag-cloud button:hover { border-color: rgba(205,150,255,.35); color: #e5cafa; background: rgba(205,150,255,.08); }
.tag-type { margin-right: 5px; color: #9475ad; font: 8px var(--mono); text-transform: uppercase; }
.dialog-foot { padding-top: 13px; border-top: 1px solid var(--line); color: #777582; font-size: 9px; }
.options-dialog { width: min(510px, 100%); gap: 0; }
.option-setting { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.option-setting > span { display: grid; gap: 5px; }
.option-setting strong { color: #e8e3ed; font-size: 14px; font-weight: 600; }
.option-setting small { color: #898592; font-size: 12px; }
.option-setting select { min-width: 155px; min-height: 42px; padding: 0 30px 0 11px; border: 1px solid var(--line-bright); border-radius: 7px; color: #eeeaf3; background: #1a1b24; font-size: 13px; cursor: pointer; }
.option-checkbox-setting { cursor: pointer; }
.option-checkbox-setting input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #c58be5; cursor: pointer; }
.options-dialog .dialog-foot { margin-top: 15px; font-size: 11px; line-height: 1.55; }
.info-dialog { width: min(470px, 100%); overflow-y: auto; }
.info-dialog .secondary-button { align-self: start; margin-top: 3px; }
.info-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 21px; color: #9894a0; font-size: 10px; }

.reader-overlay { position: fixed; inset: 0; z-index: 10; background: #08090d; }
.reader { height: 100dvh; display: grid; grid-template-rows: 61px minmax(0,1fr) 51px auto; background: #0a0b0f; }
.reader-header { display: flex; align-items: center; gap: 25px; padding: 0 25px; border-bottom: 1px solid rgba(255,255,255,.075); background: #101116; }
.reader-back { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 0; border-radius: 5px; color: #aaa7b1; background: transparent; cursor: pointer; font-size: 11px; white-space: nowrap; }
.reader-back:hover { color: white; background: rgba(255,255,255,.05); }
.reader-back span:first-child { color: #d0a3ef; font-size: 16px; }
.reader-title-wrap { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.reader-title-wrap strong { overflow: hidden; color: #e6e3eb; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.reader-title-wrap span { color: #777581; font: 9px var(--mono); }
.reader-tools { display: flex; gap: 6px; }
.reader-tool { height: 29px; padding: 0 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 5px; color: #a9a6b0; background: rgba(255,255,255,.025); font-size: 9px; cursor: pointer; }
.reader-tool:hover, .reader-tool.active { border-color: rgba(205,150,255,.31); color: #e7cef9; background: rgba(205,150,255,.08); }
.reader-body { position: relative; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #090a0e; }
.reader-stage { width: 100%; height: 100%; display: grid; place-items: center; overflow: auto; }
.reader-image { display: block; max-width: min(100%, 1100px); max-height: calc(100dvh - 123px); width: auto; height: auto; object-fit: contain; transition: max-width .2s ease; }
.reader-stage.full-width .reader-image { max-width: 100%; max-height: none; width: 100%; }
.reader-loading { display: flex; align-items: center; gap: 12px; color: #8c8995; font-size: 11px; }
.reader-nav { position: absolute; z-index: 2; top: 50%; width: 42px; height: 58px; display: grid; place-items: center; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.11); border-radius: 7px; color: #d8d2dd; background: rgba(17,18,25,.68); backdrop-filter: blur(8px); font-size: 29px; cursor: pointer; transition: .18s; }
.reader-nav:hover { border-color: rgba(205,150,255,.45); background: rgba(31,24,37,.86); }
.reader-prev { left: 19px; }
.reader-next { right: 19px; }
.reader-footer { position: relative; display: flex; align-items: center; gap: 16px; padding: 0 24px; border-top: 1px solid rgba(255,255,255,.07); background: #101116; }
.filmstrip-toggle { padding: 5px 0; border: 0; color: #aaa5b2; background: transparent; font-size: 9px; cursor: pointer; white-space: nowrap; }
.filmstrip-toggle:hover { color: #e6d2f5; }
.reader-progress { height: 3px; flex: 1; border-radius: 3px; background: #282631; }
.progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a866d1, #dbb6f1); transition: width .2s; }
.page-counter { color: #9b98a3; font: 10px var(--mono); white-space: nowrap; }
#page-scrubber { width: 110px; accent-color: #cb94f0; cursor: pointer; }
.filmstrip { overflow-x: auto; display: flex; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--line); background: #111219; scrollbar-width: thin; scrollbar-color: #4a3b55 transparent; }
.filmstrip-thumb { position: relative; height: 88px; flex: 0 0 auto; padding: 2px; border: 1px solid transparent; border-radius: 4px; background: transparent; cursor: pointer; opacity: .62; }
.filmstrip-thumb img { height: 100%; max-width: 62px; object-fit: cover; border-radius: 2px; }
.filmstrip-thumb:hover, .filmstrip-thumb.active { border-color: #ca91ef; opacity: 1; }
.toast { position: fixed; z-index: 15; left: 50%; bottom: 28px; max-width: min(430px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid rgba(255,255,255,.11); border-radius: 7px; color: #e5e0ea; background: #24222b; box-shadow: 0 10px 35px rgba(0,0,0,.35); font-size: 11px; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.age-gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 38%, rgba(94,57,117,.18), transparent 41%), rgba(8,9,13,.96); backdrop-filter: blur(15px); }
.age-card { width: min(455px, 100%); padding: 31px 37px 27px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: linear-gradient(145deg, rgba(25,24,33,.98), rgba(15,16,22,.99)); box-shadow: 0 25px 100px rgba(0,0,0,.5); }
.age-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 27px; color: #f4f0f7; font: 800 22px var(--display); letter-spacing: -1px; }
.age-brand .brand-mark { width: 22px; height: 22px; transform: scale(.84) skew(-18deg); transform-origin: left center; }
.age-symbol { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 23px; border: 1px solid rgba(205,150,255,.28); border-radius: 50%; color: #f2e4fb; background: rgba(205,150,255,.07); font: 700 21px var(--display); }
.age-symbol span { align-self: start; margin: 13px 0 0 1px; color: #d5a5f6; font: 700 9px var(--mono); }
.age-card h2 { margin: 14px 0 12px; color: #f5f1f8; font: 700 33px/1.12 var(--display); letter-spacing: -1.2px; }
.age-card p { margin: 0; color: #a09ca8; font-size: 11px; line-height: 1.75; }
.age-enter { width: 100%; height: 43px; display: flex; justify-content: space-between; align-items: center; margin-top: 23px; padding: 0 14px; border: 0; border-radius: 6px; color: #21182a; background: #d2a4f2; font-size: 11px; font-weight: 700; cursor: pointer; transition: .18s; }
.age-enter:hover { background: #e6c6ff; }
.age-enter span { font-size: 15px; }
.age-leave { width: 100%; margin-top: 9px; padding: 8px; border: 0; color: #9995a0; background: transparent; font-size: 10px; cursor: pointer; }
.age-leave:hover { color: #e4dbe9; }
.age-card > small { display: block; margin-top: 17px; color: #6b6974; text-align: center; font-size: 9px; }

@media (min-width: 1600px) {
  .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gallery-grid.compact { grid-template-columns: repeat(8, minmax(0,1fr)); }
}
@media (max-width: 1320px) {
  :root { --sidebar: 218px; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-grid.compact { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .quick-stats { gap: 22px; }
  .hero-art { right: 2%; width: 40%; }
}
@media (max-width: 1020px) {
  :root { --sidebar: 76px; }
  .sidebar { align-items: center; padding: 25px 8px 14px; }
  .brand { padding: 0; margin: 0 0 47px; }
  .brand-word, .sidebar-caption, .nav-item > span:not(.nav-icon), .sidebar-divider, .sidebar-note, .sidebar-foot { display: none; }
  .nav-list { width: 100%; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-icon { font-size: 19px; }
  #explore-tags { margin-top: 21px; }
  .topbar { padding: 0 26px; gap: 16px; }
  .crumb { min-width: 102px; }
  .page-content { padding: 25px 26px 15px; }
  .hero { padding-left: 34px; }
  .hero-art { right: 0; width: 43%; transform: scale(.9); transform-origin: right center; }
  .quick-stats { gap: 20px; }
  .quick-stat small { display: none; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  :root { --sidebar: 0px; }
  .sidebar { inset: auto 0 0; width: 100%; height: 61px; display: flex; flex-direction: row; justify-content: center; align-items: center; padding: 5px 7px; border-top: 1px solid var(--line); border-right: 0; background: rgba(15,16,21,.96); backdrop-filter: blur(16px); }
  .brand, .sidebar-caption, .sidebar-divider, .sidebar-spacer, .sidebar-note, .sidebar-foot { display: none; }
  .nav-list { width: 100%; display: flex; justify-content: space-around; gap: 5px; }
  .nav-item { width: 58px; height: 48px; flex-direction: column; gap: 1px; justify-content: center; border-radius: 6px; font-size: 8px; }
  .nav-item > span:not(.nav-icon) { display: block; }
  .nav-item .nav-arrow, .nav-item .nav-count { display: none !important; }
  .nav-icon { width: auto; font-size: 17px; }
  #explore-tags { margin: 0; }
  .main-area { padding-bottom: 60px; }
  .topbar { height: 64px; gap: 9px; padding: 0 14px; }
  .crumb { min-width: 0; width: 64px; display: block; overflow: hidden; font-size: 0; }
  .crumb strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .crumb-slash { display: none; }
  .search-form { height: 38px; gap: 7px; padding-left: 10px; }
  .search-form input { font-size: 10px; }
  .search-form kbd { display: none; }
  .search-submit { height: 28px; padding: 0 8px; font-size: 9px; }
  .avatar-button { width: 30px; height: 30px; }
  .page-content { padding: 15px 14px 5px; }
  .hero { min-height: 270px; padding: 27px 23px; }
  .hero h1 { max-width: 255px; font-size: 36px; }
  .hero-copy p { max-width: 225px; font-size: 10px; }
  .hero-art { width: 45%; right: -24px; opacity: .55; transform: scale(.7); }
  .hero-label, .art-star { display: none; }
  .quick-stats { min-height: 64px; justify-content: space-between; gap: 8px; padding: 0; }
  .quick-stat { gap: 7px; }
  .quick-stat strong { font-size: 8px; }
  .stat-icon { width: 25px; height: 25px; font-size: 12px; }
  .stat-live { gap: 5px; font-size: 7px; }
  .collection-section { padding-top: 27px; }
  .section-heading { align-items: center; gap: 8px; }
  .section-heading h2 { font-size: 20px; }
  .section-heading p { max-width: 260px; font-size: 10px; }
  .heading-tools { flex-wrap: wrap; justify-content: end; }
  .result-count { display: none; }
  .view-toggle { display: none; }
  .filter-row { align-items: start; flex-direction: column-reverse; gap: 12px; margin: 17px 0 14px; }
  .period-tabs { width: 100%; justify-content: space-between; gap: 1px; }
  .period-tab { flex: 1; padding: 7px 4px; font-size: 8px; }
  .sort-control { align-self: end; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 11px; }
  .gallery-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .card-title { font-size: 10px; }
  .page-footer { min-height: 64px; flex-direction: column; justify-content: center; gap: 6px; align-items: start; font-size: 8px; }
  .page-footer span:last-child { gap: 6px; }
  .tag-dialog, .info-dialog, .options-dialog { padding: 20px; }
  .reader { grid-template-rows: 55px minmax(0,1fr) 49px auto; }
  .reader-header { gap: 8px; padding: 0 9px; }
  .reader-back { padding: 5px; gap: 4px; }
  .back-label { display: none; }
  .reader-title-wrap { margin-left: 3px; }
  .reader-title-wrap strong { font-size: 9px; }
  .reader-title-wrap span { font-size: 8px; }
  .reader-tools { gap: 4px; }
  .reader-tool { height: 27px; padding: 0 6px; font-size: 8px; }
  .reader-fullscreen { display: none; }
  .reader-image { max-width: 100%; max-height: calc(100dvh - 104px); }
  .reader-nav { width: 33px; height: 47px; }
  .reader-prev { left: 7px; }
  .reader-next { right: 7px; }
  .reader-footer { gap: 9px; padding: 0 10px; }
  #page-scrubber { width: 67px; }
  .page-counter { font-size: 8px; }
  .filmstrip-toggle { font-size: 8px; }
  .filmstrip-thumb { height: 66px; }
  .age-card { padding: 25px 24px 21px; }
}

/* Larger, more comfortable controls and copy across the whole library. */
body { font-size: 17px; }
.page-content { padding-top: 24px; }
.collection-section { padding-top: 18px; }
.sidebar-caption { font-size: 11px; }
.nav-item { font-size: 14px; }
.sidebar-note p { font-size: 13px; }
.sidebar-foot { font-size: 10px; }
.crumb { font-size: 14px; }
.topbar { height: 78px; }
.search-form { position: relative; height: 48px; }
.search-form input { font-size: 16px; }
.search-submit { height: 36px; padding: 0 15px; font-size: 13px; }
.search-form kbd { font-size: 11px; }
.search-suggestions { position: absolute; z-index: 6; top: calc(100% + 9px); left: 0; right: 0; max-height: min(380px, calc(100vh - 130px)); overflow: auto; padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: #191a23; box-shadow: 0 18px 48px rgba(0,0,0,.48); }
.search-suggestion { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 8px 11px; border: 0; border-radius: 7px; color: #d9d6e0; background: transparent; text-align: left; cursor: pointer; }
.search-suggestion:hover, .search-suggestion.active { color: #fff; background: rgba(205,150,255,.13); }
.suggestion-type { min-width: 74px; color: #b18acb; font: 10px var(--mono); text-transform: uppercase; letter-spacing: .45px; }
.suggestion-name { overflow: hidden; flex: 1; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-count { color: #858391; font: 11px var(--mono); white-space: nowrap; }
.hero-copy p { font-size: 15px; }
.hero-cta { font-size: 14px; }
.quick-stat strong { font-size: 13px; }
.quick-stat small { font-size: 11px; }
.section-kicker { font-size: 11px; }
.section-heading h2 { font-size: 29px; }
.section-heading p { font-size: 15px; }
.result-count { font-size: 13px; }
.filtered-count { appearance: none; padding: 5px 9px; border: 1px solid rgba(205,150,255,.2); border-radius: 20px; color: #c5a3d8; background: rgba(205,150,255,.07); font: 13px var(--mono); white-space: nowrap; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.filtered-count:hover, .filtered-count:focus-visible { border-color: rgba(205,150,255,.5); color: #f0ddfb; background: rgba(205,150,255,.13); }
.period-tab { padding: 9px 13px; font-size: 13px; }
.sort-control { font-size: 14px; }
.sort-control select { padding: 9px 28px 9px 11px; font-size: 14px; }
.annual-note { font-size: 12px; }
.card-title { min-height: 45px; font-size: 15px; }
.card-tag { max-width: 130px; font-size: 12px; }
.card-meta { font-size: 12px; }
.language-badge, .page-badge { font-size: 10px; }
.save-button { width: 34px; height: 34px; }
.loading-state { font-size: 14px; }
.empty-state p, .error-state p { font-size: 14px; }
.secondary-button, .load-more { padding: 11px 15px; font-size: 13px; }
.page-footer { font-size: 11px; }
.dialog-copy { font-size: 15px; }
.tag-search { height: 46px; }
.tag-search input { font-size: 15px; }
.tag-cloud button { padding: 8px 10px; font-size: 13px; }
.tag-type { font-size: 10px; }
.dialog-foot, .info-meta { font-size: 11px; }
.tag-cloud { flex: 1; min-height: 80px; }
.blacklist-dialog { width: min(590px, 100%); max-height: min(690px, 90vh); display: flex; flex-direction: column; padding: 26px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: #14151d; box-shadow: 0 25px 100px rgba(0,0,0,.55); }
.blacklist-form { position: relative; display: flex; gap: 8px; }
.blacklist-form input { min-width: 0; height: 42px; flex: 1; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 7px; outline: 0; color: var(--text); background: rgba(255,255,255,.025); font-size: 14px; }
.blacklist-form input:focus { border-color: rgba(205,150,255,.55); }
.blacklist-form button { flex: 0 0 auto; padding: 0 13px; border: 1px solid rgba(205,150,255,.25); border-radius: 7px; color: #e7d5f2; background: rgba(205,150,255,.11); font-size: 13px; cursor: pointer; }
.blacklist-form button:hover { background: rgba(205,150,255,.19); }
.blacklist-suggestions { position: absolute; z-index: 11; top: calc(100% + 7px); left: 0; right: 0; max-height: min(310px, 45vh); overflow: auto; padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: #191a23; box-shadow: 0 18px 48px rgba(0,0,0,.48); }
.blacklist-suggestion { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 6px; color: #d9d6e0; background: transparent; text-align: left; cursor: pointer; }
.blacklist-suggestion:hover, .blacklist-suggestion.active { color: #fff; background: rgba(205,150,255,.13); }
.blacklist-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 19px 0 9px; color: #9f7db6; font: 11px var(--mono); letter-spacing: .7px; }
.blacklist-heading span:last-child { color: #8e8997; letter-spacing: 0; }
.blacklist-tags { display: flex; flex-wrap: wrap; gap: 7px; max-height: 90px; overflow: auto; margin-top: 10px; }
.blacklist-tag { max-width: 100%; display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid rgba(205,150,255,.18); border-radius: 20px; color: #d6c8df; background: rgba(205,150,255,.07); font-size: 12px; cursor: pointer; }
.blacklist-tag span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blacklist-tag span:last-child { color: #a98bb8; font-size: 17px; line-height: .8; }
.blacklist-tag:hover { border-color: rgba(232,154,184,.42); color: #f1c4d2; background: rgba(232,154,184,.08); }
.blacklist-empty { color: #777481; font-size: 12px; }
.filter-summary-dialog { max-height: min(720px, 90vh); overflow: hidden; }
.filter-summary-total { margin: 0 0 16px; padding: 15px 16px; border: 1px solid rgba(205,150,255,.19); border-radius: 8px; color: #e9d5f5; background: rgba(205,150,255,.07); font-size: 18px; font-weight: 650; }
.filtered-summary-tags { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-height: 40px; max-height: min(38vh, 350px); overflow: auto; margin: -4px 0 16px; }
.filtered-tag-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 7px; background: rgba(255,255,255,.025); }
.filtered-tag-name { min-width: 0; overflow: hidden; color: #e0d7e7; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.filtered-tag-count { flex: 0 0 auto; color: #c5a3d8; font: 12px var(--mono); }
.filter-summary-empty { margin: 10px 0; color: #96919d; font-size: 14px; }
.reader-back, .reader-title-wrap strong { font-size: 13px; }
.reader-title-wrap span, .page-counter { font-size: 11px; }
.reader-tool { height: 36px; padding: 0 11px; font-size: 11px; }
.reader-loading { font-size: 14px; }
.filmstrip-toggle { font-size: 11px; }
.toast { font-size: 13px; }
.age-card p, .age-enter { font-size: 14px; }
.age-leave { font-size: 12px; }
.age-card > small { font-size: 11px; }

.preview-overlay { position: fixed; inset: 0; z-index: 9; background: #0b0c11; }
.preview-page { height: 100dvh; display: grid; grid-template-rows: 60px minmax(0,1fr); background: #0b0c11; }
.preview-header { display: flex; align-items: center; gap: 18px; padding: 0 clamp(16px, 4vw, 56px); border-bottom: 1px solid var(--line); background: #101116; }
.preview-back { display: inline-flex; align-items: center; gap: 10px; padding: 9px 11px; border: 0; border-radius: 7px; color: #c4c0cc; background: transparent; font-size: 14px; cursor: pointer; }
.preview-back:hover { color: white; background: rgba(255,255,255,.06); }
.preview-back span { color: var(--accent); font-size: 19px; }
.preview-source { color: #a18cb0; font: 11px var(--mono); letter-spacing: 1.1px; }
.preview-id { margin-left: auto; color: #777583; font: 12px var(--mono); }
.preview-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.preview-content { width: min(1250px, 100%); margin: 0 auto; padding: 44px clamp(20px, 5vw, 72px) 64px; }
.preview-hero { display: grid; grid-template-columns: minmax(220px, 310px) minmax(0,1fr); align-items: center; gap: clamp(28px, 5vw, 66px); }
.preview-cover-wrap { position: relative; overflow: hidden; width: 100%; aspect-ratio: .72; border: 1px solid rgba(255,255,255,.11); border-radius: 11px; background: linear-gradient(135deg, #24232d, #171821); box-shadow: 0 24px 70px rgba(0,0,0,.34); }
.preview-cover-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(224,198,242,.42); font: 500 46px var(--display); }
.preview-cover { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-copy { min-width: 0; }
.preview-copy h1 { max-width: 800px; margin: 13px 0 18px; color: #f0edf4; font: 700 clamp(30px, 4vw, 49px)/1.12 var(--display); letter-spacing: -1.8px; overflow-wrap: anywhere; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 9px; color: #aaa6b2; }
.preview-meta span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; background: rgba(255,255,255,.025); font-size: 13px; }
.preview-meta span:nth-child(2) { color: #d2acd9; }
.preview-credits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 19px; color: #85828e; font-size: 13px; }
.preview-credit-label { margin-right: 2px; color: #8c8995; }
.preview-credit { padding: 0; border: 0; color: #dac0eb; background: none; font: inherit; cursor: pointer; }
.preview-credit:hover { color: #f2deff; text-decoration: underline; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.preview-read, .preview-save { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 22px; padding: 0 19px; border: 1px solid rgba(205,150,255,.3); border-radius: 8px; background: rgba(205,150,255,.12); color: #efddfb; font-size: 14px; font-weight: 650; cursor: pointer; transition: .18s; }
.preview-read { border-color: transparent; color: #24162e; background: #d1a2f5; }
.preview-read:hover { background: #e0baff; }
.preview-read span { font-size: 18px; }
.preview-save { gap: 10px; border-color: var(--line-bright); color: #c9c4d0; background: rgba(255,255,255,.035); }
.preview-save:hover, .preview-save.saved { border-color: rgba(232,154,184,.4); color: #f3b0c5; }
.preview-error { margin: 16px 0 0; color: #e4a5ae; font-size: 13px; }
.preview-section { margin-top: 56px; }
.preview-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 19px; }
.preview-section-heading h2 { margin: 7px 0 0; color: #eae7ef; font: 650 26px var(--display); letter-spacing: -.5px; }
.preview-section-heading > span { color: #777583; font: 12px var(--mono); }
.preview-tags { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 34px; }
.preview-tag-group h3 { margin: 0 0 10px; color: #8d8997; font: 11px var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.preview-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.preview-tag { max-width: 100%; overflow: hidden; padding: 7px 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 6px; color: #c4bfcc; background: rgba(255,255,255,.035); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.preview-tag:hover { border-color: rgba(205,150,255,.4); color: #ecd6fc; background: rgba(205,150,255,.09); }
.tag-action-menu { position: fixed; z-index: 30; width: min(280px, calc(100vw - 24px)); display: grid; gap: 4px; max-height: min(80vh, 360px); overflow: auto; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: #eeeaf2; background: #181820; box-shadow: 0 16px 50px rgba(0,0,0,.55); }
.tag-action-menu[hidden] { display: none !important; }
.tag-action-heading { display: grid; gap: 4px; padding: 7px 10px 9px; border-bottom: 1px solid rgba(255,255,255,.07); }
.tag-action-heading > span { color: #8d8997; font: 10px var(--mono); letter-spacing: .7px; }
.tag-action-heading > strong { overflow: hidden; color: #e7d3f3; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tag-action-option { min-height: 48px; display: grid; gap: 4px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; color: #e5e0ea; background: transparent; text-align: left; cursor: pointer; }
.tag-action-option:hover, .tag-action-option:focus-visible { border-color: rgba(205,150,255,.22); outline: none; background: rgba(205,150,255,.09); }
.tag-action-option-title { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tag-action-option-note { color: #908b99; font-size: 11px; }
.tag-action-block .tag-action-option-title { color: #f0bccb; }
.tag-action-block:hover, .tag-action-block:focus-visible { border-color: rgba(232,154,184,.2); background: rgba(232,154,184,.08); }
.preview-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px,1fr)); gap: 14px; }
.preview-loading { display: flex; align-items: center; gap: 10px; margin: 12px 0 18px; color: #85828e; font-size: 13px; }
.preview-page-thumb { position: relative; overflow: hidden; aspect-ratio: .72; padding: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background: #191a22; cursor: pointer; }
.preview-page-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; background: #101116; transition: transform .2s; }
.preview-page-thumb:hover img { transform: scale(1.045); }
.preview-page-thumb > span { position: absolute; right: 6px; bottom: 6px; min-width: 24px; padding: 4px 6px; border-radius: 5px; color: #f5eef9; background: rgba(6,6,9,.74); font: 11px var(--mono); }

@media (min-width: 1600px) {
  .page-content { padding-left: clamp(36px, 4vw, 78px); padding-right: clamp(36px, 4vw, 78px); }
}
@media (min-width: 721px) and (max-width: 1020px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .gallery-grid.compact { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .nav-item { font-size: 10px; }
  .nav-list { width: auto; min-width: 0; flex: 4 1 0; }
  .nav-item { width: auto; min-width: 0; flex: 1 1 0; max-width: none; }
  #explore-tags, #manage-blacklist { flex: 1 1 0; min-width: 0; width: auto; }
  .topbar { height: 68px; gap: 8px; padding: 0 12px; }
  .crumb { width: 54px; min-width: 54px; }
  .crumb strong { font-size: 12px; }
  .search-form { height: 42px; gap: 6px; padding-left: 9px; }
  #search-form, #booru-search-form { height: 42px; gap: 5px; padding-left: 7px; }
  .search-form input { font-size: 14px; }
  .search-submit { height: 32px; padding: 0 9px; font-size: 11px; }
  .search-icon { font-size: 19px; }
  .avatar-button { width: 32px; height: 32px; }
  .page-content { padding: 16px 16px 8px; }
  .collection-section { padding-top: 14px; }
  .hero-copy p { font-size: 13px; }
  .quick-stat strong { font-size: 10px; }
  .stat-live { font-size: 9px; }
  .section-heading h2 { font-size: 24px; }
  .section-heading p { font-size: 13px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .heading-tools { width: 100%; justify-content: flex-start; }
  .result-count { display: inline; margin-right: 0; font-size: 11px; }
  .filtered-count { font-size: 12px; }
  .period-tab { padding: 8px 3px; font-size: 11px; }
  .sort-control { font-size: 13px; }
  .sort-control select { padding: 8px 24px 8px 9px; font-size: 13px; }
  .gallery-grid, .gallery-grid.compact { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 13px; }
  .card-title, .gallery-grid.compact .card-title { min-height: 42px; font-size: 14px; }
  .card-tag { font-size: 11px; }
  .card-meta { font-size: 11px; }
  .page-footer { font-size: 10px; }
  .reader { grid-template-rows: 58px minmax(0,1fr) 54px auto; }
  .reader-header { gap: 7px; padding: 0 8px; }
  .reader-back { font-size: 11px; }
  .reader-title-wrap strong { font-size: 11px; }
  .reader-title-wrap span { font-size: 9px; }
  .reader-tool { min-width: 34px; height: 33px; padding: 0 7px; font-size: 10px; }
  .reader-footer { gap: 9px; padding: 0 10px; }
  .filmstrip-toggle { font-size: 10px; }
  .page-counter { font-size: 10px; }
  .preview-page { grid-template-rows: 56px minmax(0,1fr); }
  .preview-header { gap: 11px; padding: 0 13px; }
  .preview-back { gap: 7px; padding: 8px 5px; font-size: 12px; }
  .preview-source { font-size: 9px; }
  .preview-id { font-size: 10px; }
  .preview-content { padding: 26px 18px 50px; }
  .preview-hero { grid-template-columns: minmax(108px, 29%) minmax(0,1fr); gap: 17px; }
  .preview-copy h1 { margin: 9px 0 13px; font-size: clamp(22px, 6vw, 30px); letter-spacing: -.8px; }
  .preview-meta { gap: 6px; }
  .preview-meta span { padding: 6px 7px; font-size: 11px; }
  .preview-credits { margin-top: 13px; font-size: 11px; }
  .preview-actions { gap: 8px; margin-top: 17px; }
  .preview-read, .preview-save { min-height: 42px; gap: 10px; padding: 0 12px; font-size: 12px; }
  .preview-section { margin-top: 38px; }
  .preview-section-heading h2 { font-size: 22px; }
  .preview-tags { grid-template-columns: 1fr; gap: 16px; }
  .preview-page-grid { grid-template-columns: repeat(auto-fill, minmax(82px,1fr)); gap: 9px; }
  .preview-tag { padding: 7px 9px; font-size: 11px; }
  .blacklist-dialog { padding: 20px; }
  .blacklist-form input { height: 40px; font-size: 13px; }
  .blacklist-form button { padding: 0 10px; font-size: 12px; }
}
@media (max-width: 380px) {
  .topbar { gap: 6px; padding: 0 9px; }
  .crumb { width: 44px; min-width: 44px; }
  .search-form { gap: 4px; }
  #search-form, #booru-search-form { gap: 4px; padding-left: 6px; }
  .search-form input { font-size: 13px; }
  .search-submit { padding: 0 7px; font-size: 10px; }
  .avatar-button { width: 29px; height: 29px; }
  .period-tab { font-size: 10px; }
  .preview-hero { grid-template-columns: 1fr; }
  .preview-cover-wrap { width: min(190px, 70%); justify-self: center; }
  .preview-copy { text-align: center; }
  .preview-copy .section-kicker { justify-content: center; }
  .preview-meta, .preview-credits, .preview-actions { justify-content: center; }
  .preview-section-heading { align-items: center; }
  .preview-page-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.workspace-switcher { flex: 0 0 auto; display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #111219; }
.workspace-switcher button { min-height: 29px; padding: 0 10px; border: 0; border-radius: 5px; color: #85828e; background: transparent; font-size: 10px; cursor: pointer; }
.workspace-switcher button.active { color: #f0e4fb; background: rgba(192,137,233,.17); box-shadow: inset 0 0 0 1px rgba(195,144,237,.15); }
#search-form, #booru-search-form { max-width: 760px; }
#booru-search-form .search-suggestions { top: calc(100% + 8px); left: 0; right: 0; }
.source-picker { position: relative; z-index: 7; flex: 0 0 auto; }
.source-picker-trigger { height: 32px; max-width: 140px; min-width: 100px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 6px; color: #d5c8e2; background: #171821; font-size: 10px; white-space: nowrap; cursor: pointer; }
.source-picker-trigger:hover, .source-picker-trigger[aria-expanded="true"] { border-color: rgba(205,150,255,.4); background: #201d28; }
.source-picker-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.source-picker-chevron { flex: 0 0 auto; color: #9e87b2; font-size: 13px; line-height: 1; }
.source-picker-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 205px; display: grid; gap: 3px; padding: 8px; border: 1px solid rgba(205,150,255,.22); border-radius: 9px; background: #191a23; box-shadow: 0 18px 48px rgba(0,0,0,.55); }
.source-picker-menu[hidden] { display: none; }
.source-picker-select-all { width: 100%; min-height: 31px; padding: 0 8px; border: 0; border-radius: 5px; color: #caa9e5; background: rgba(205,150,255,.08); font-size: 10px; text-align: left; cursor: pointer; }
.source-picker-option { min-height: 34px; display: flex; align-items: center; gap: 9px; padding: 0 8px; border-radius: 5px; color: #d5d1db; font-size: 11px; cursor: pointer; }
.source-picker-option:hover { background: rgba(255,255,255,.045); }
.source-picker-option input { width: 14px; height: 14px; accent-color: #c99ce8; }
.source-picker-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.08); }
.source-picker-actions button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 5px; color: #a9a3b2; background: rgba(255,255,255,.035); font-size: 10px; cursor: pointer; }
.source-picker-actions [data-source-picker-apply] { border-color: transparent; color: #21162b; background: #d1a2f5; font-weight: 700; }
.source-picker-actions button:disabled { opacity: .45; cursor: default; }
#booru-suggestions { max-height: min(440px, calc(100dvh - 150px)); padding: 8px; border-color: rgba(192,137,233,.24); border-radius: 12px; background: linear-gradient(145deg, rgba(31,29,41,.98), rgba(19,20,28,.99)); box-shadow: 0 22px 60px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.025); }
.booru-suggestion-group { padding: 3px 0 5px; }
.booru-suggestion-group + .booru-suggestion-group { margin-top: 5px; border-top: 1px solid rgba(255,255,255,.07); }
.booru-suggestion-group-heading { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 5px; color: #c7b7d7; font: 9px var(--mono); letter-spacing: .45px; text-transform: uppercase; }
.booru-suggestion-group-heading span:last-child { color: #7e7788; }
.booru-tag-suggestion { width: 100%; min-height: 42px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; color: #e3deeb; background: transparent; text-align: left; cursor: pointer; transition: background .14s ease, border-color .14s ease, transform .14s ease; }
.booru-tag-suggestion:hover, .booru-tag-suggestion:focus-visible { border-color: rgba(205,150,255,.19); color: #fff; background: linear-gradient(100deg, rgba(205,150,255,.14), rgba(205,150,255,.045)); outline: none; }
.booru-tag-suggestion:active { transform: scale(.995); }
.booru-tag-suggestion-copy { min-width: 0; display: grid; gap: 4px; }
.booru-tag-suggestion-name { overflow: hidden; color: #eeeaf4; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.booru-tag-suggestion-meta { overflow: hidden; color: #888492; font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.booru-tag-suggestion-count { min-width: 61px; padding: 6px 8px; border: 1px solid rgba(190,150,224,.16); border-radius: 6px; color: #c8a9df; background: rgba(193,143,231,.075); font: 10px var(--mono); text-align: right; white-space: nowrap; }
.booru-section { padding-top: 36px; }
.booru-section .source-status { max-width: 820px; margin-top: 8px; color: #dfaab2; line-height: 1.5; }
.booru-filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 22px 0 16px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.booru-filter-label { align-self: center; margin-right: 2px; color: #817b8b; font: 9px var(--mono); letter-spacing: 1px; }
.booru-filter-row label { display: grid; gap: 5px; color: #8c8995; font-size: 10px; }
.booru-filter-row select, .booru-filter-row input { min-width: 126px; height: 33px; padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 6px; color: #d5d1db; background: #15161e; font-size: 11px; }
.booru-filter-row input { width: 106px; min-width: 106px; }
.booru-filter-note { align-self: center; margin-left: auto; color: #706d79; font-size: 10px; }
.booru-query-note { margin: -3px 0 15px; color: #ceb998; font-size: 11px; line-height: 1.5; }
.booru-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 21px 15px; }
.booru-card { min-width: 0; cursor: pointer; animation: fade-up .28s both; }
.booru-card-image { position: relative; overflow: hidden; aspect-ratio: .92; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background: linear-gradient(140deg,#22212c,#171821); }
.booru-card-image img, .booru-card-video { width: 100%; height: 100%; object-fit: cover; background: #0b0c11; }
.booru-card-image img { transition: transform .35s ease, opacity .2s; }
.booru-card:hover .booru-card-image img { transform: scale(1.035); }
.booru-card-has-video .booru-board-label, .booru-card-has-video .booru-media-label { bottom: 48px; }
.booru-rating, .booru-board-label, .booru-media-label { position: absolute; z-index: 1; padding: 5px 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 5px; color: #f1edf3; background: rgba(9,9,13,.72); backdrop-filter: blur(7px); font: 8px var(--mono); }
.booru-rating { top: 8px; left: 8px; }
.booru-rating-general { color: #bbebc3; }
.booru-rating-questionable { color: #f0d18f; }
.booru-rating-explicit { color: #ef9dac; }
.booru-board-label { left: 8px; bottom: 8px; color: #d6c5e7; }
.booru-media-label { right: 8px; bottom: 8px; color: #d6c5e7; text-transform: uppercase; }
.booru-save { position: absolute; z-index: 2; top: 7px; right: 7px; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: white; background: rgba(8,8,12,.65); cursor: pointer; font-size: 17px; }
.booru-save.saved { color: #f4a9c1; border-color: rgba(232,154,184,.48); }
.booru-card-copy { display: grid; gap: 6px; padding: 9px 1px 0; }
.booru-card-copy > strong { overflow: hidden; color: #dedce4; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.booru-card-copy > span { display: flex; gap: 5px; overflow: hidden; min-height: 19px; }
.booru-card-tag { max-width: 120px; overflow: hidden; flex: 0 0 auto; padding: 3px 5px; border: 1px solid rgba(255,255,255,.06); border-radius: 4px; color: #8d8b98; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.booru-card-copy > small { color: #73717d; font: 9px var(--mono); }
.booru-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; padding: 26px 0 10px; }
.booru-page-source { min-width: 180px; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.02); }
.booru-page-source > span { max-width: 260px; overflow: hidden; color: #8d8996; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.booru-page-source button { min-height: 31px; padding: 0 9px; border: 1px solid rgba(205,150,255,.2); border-radius: 5px; color: #d9c7e9; background: rgba(205,150,255,.07); font-size: 10px; cursor: pointer; }
.booru-page-source button:disabled { border-color: var(--line); color: #706e79; background: transparent; }
.booru-loading, .booru-empty { min-height: 170px; display: flex; justify-content: center; align-items: center; gap: 11px; color: #8b8995; }
.booru-empty { flex-direction: column; gap: 9px; }
.booru-empty h3 { margin: 0; color: #dedbe4; font: 600 16px var(--display); }
.booru-empty p { margin: 0; color: #85838f; font-size: 11px; }
.booru-detail-overlay { position: fixed; inset: 0; z-index: 11; background: #0b0c11; }
.booru-detail { height: 100dvh; display: grid; grid-template-rows: 60px minmax(0,1fr); }
.booru-detail-header { display: flex; align-items: center; gap: 17px; padding: 0 clamp(14px,4vw,56px); border-bottom: 1px solid var(--line); background: #101116; }
.booru-detail-header .icon-button { margin-left: 0; }
.booru-detail-scroll { min-height: 0; overflow: auto; }
.booru-detail-content { width: min(1250px,100%); display: grid; grid-template-columns: minmax(220px, 46%) minmax(0,1fr); gap: clamp(25px,5vw,65px); align-items: start; margin: 0 auto; padding: 48px clamp(18px,5vw,70px) 65px; }
.booru-detail-image { overflow: hidden; width: 100%; min-height: 220px; max-height: 72vh; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-bright); border-radius: 9px; background: #101116; cursor: zoom-in; }
.booru-detail-image img, .booru-detail-image video { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }
.booru-detail-image video { width: 100%; background: #090a0e; cursor: default; }
.booru-detail-image.is-video { cursor: default; }
.booru-detail-copy h1 { margin: 10px 0 17px; color: #f0edf4; font: 700 clamp(26px,4vw,42px)/1.12 var(--display); letter-spacing: -1.3px; overflow-wrap: anywhere; }
.booru-detail-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.booru-detail-meta span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: #bcb7c3; background: rgba(255,255,255,.025); font-size: 10px; }
.booru-detail-meta .booru-detail-error { color: #e4a5ae; }
.booru-detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.booru-detail-actions .preview-read, .booru-detail-actions .preview-save { min-height: 40px; padding: 0 13px; font-size: 12px; }
.booru-detail-actions .booru-detail-source-link { gap: 8px; text-decoration: none; }
.booru-detail-copy h2 { margin: 28px 0 11px; color: #eae7ef; font-size: 17px; }
.booru-detail-tags { display: grid; gap: 15px; }
.booru-detail-tag-group { display: grid; gap: 9px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(255,255,255,.025); }
.booru-detail-tag-group h3 { margin: 0; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.07); color: #c7a5df; font: 10px var(--mono); letter-spacing: .7px; text-transform: uppercase; }
.booru-detail-tag-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.booru-detail-tags button { padding: 7px 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 6px; color: #c4bfcc; background: rgba(255,255,255,.035); font-size: 11px; cursor: pointer; }
.booru-detail-tags button:hover { border-color: rgba(205,150,255,.4); color: #ecd6fc; }
.booru-viewer-overlay { position: fixed; inset: 0; z-index: 12; background: #08090d; }
.booru-viewer { position: relative; width: 100%; height: 100dvh; display: grid; grid-template-columns: 58px minmax(0,1fr) 58px; grid-template-rows: 60px minmax(0,1fr); }
.booru-viewer-header { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #101116; }
.booru-viewer-header > strong { overflow: hidden; color: #d6d2dd; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.booru-viewer-header .reader-tools { margin-left: auto; }
.booru-viewer-source { display: inline-flex; align-items: center; text-decoration: none; }
.booru-viewer-stage { min-width: 0; min-height: 0; overflow: auto; display: grid; place-items: center; grid-column: 2; grid-row: 2; }
.booru-viewer-stage img, .booru-viewer-stage video { display: block; max-width: 100%; max-height: calc(100dvh - 78px); object-fit: contain; }
.booru-viewer-stage img { cursor: zoom-out; }
.booru-viewer-stage.zoomed img, .booru-viewer-stage.zoomed video { max-width: none; max-height: none; width: auto; height: auto; }
.booru-viewer .reader-nav { position: relative; inset: auto; width: 48px; height: 62px; align-self: center; justify-self: center; grid-row: 2; }
.booru-viewer .reader-prev { grid-column: 1; }
.booru-viewer .reader-next { grid-column: 3; }

@media (min-width: 1600px) { .booru-grid { grid-template-columns: repeat(6,minmax(0,1fr)); } }
@media (max-width: 1320px) { .booru-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1020px) {
  .workspace-switcher { gap: 0; }
  .workspace-switcher button { padding: 0 7px; font-size: 9px; }
  .booru-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .booru-filter-row { align-items: center; }
  .booru-filter-note { width: 100%; margin-left: 0; }
}
@media (max-width: 720px) {
  .workspace-switcher { padding: 2px; }
  .workspace-switcher button { min-height: 27px; padding: 0 6px; font-size: 8px; }
  #booru-board { max-width: 77px; padding-left: 5px; padding-right: 13px; font-size: 9px; }
  #booru-search-form { gap: 5px; padding-left: 7px; }
  #booru-search-form kbd { display: none; }
  .booru-section { padding-top: 23px; }
  .booru-filter-row { gap: 8px; padding: 10px; }
  .booru-filter-label { width: 100%; }
  .booru-filter-row label { flex: 1 1 29%; }
  .booru-filter-row select { min-width: 0; width: 100%; }
  .booru-filter-row input { min-width: 0; width: 100%; }
  .booru-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 10px; }
  .booru-card-copy > strong { font-size: 10px; }
  .booru-card-copy > small { font-size: 8px; }
  .booru-detail { grid-template-rows: 54px minmax(0,1fr); }
  .booru-detail-header { gap: 8px; padding: 0 8px; }
  .booru-detail-header .preview-source { display: none; }
  .booru-detail-header .preview-back { font-size: 11px; }
  .booru-detail-content { grid-template-columns: 1fr; gap: 22px; padding: 20px 16px 45px; }
  .booru-detail-image { max-height: 48vh; }
  .booru-detail-image img, .booru-detail-image video { max-height: 48vh; }
  .booru-viewer { grid-template-columns: 42px minmax(0,1fr) 42px; grid-template-rows: 55px minmax(0,1fr); }
  .booru-viewer-header { gap: 8px; padding: 0 7px; }
  .booru-viewer-header .reader-back { gap: 5px; font-size: 10px; }
  .booru-viewer-header .reader-tools { gap: 4px; }
  .booru-viewer-header .reader-tool { min-width: 0; height: 31px; padding: 0 6px; font-size: 9px; }
  .booru-viewer .reader-nav { width: 36px; height: 52px; }
}

/* Multi-source search and local ExHentai settings */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.search-form #search-input { flex: 1 1 auto; }
.source-status { max-width: 850px; margin-top: 7px !important; padding: 8px 11px; border: 1px solid rgba(234,177,127,.2); border-radius: 7px; color: #e3bb94 !important; background: rgba(234,177,127,.06); font-size: 12px !important; line-height: 1.5; }
.source-badge { max-width: 115px; overflow: hidden; padding: 4px 6px; border: 1px solid rgba(205,150,255,.3); border-radius: 5px; color: #ead5f8; background: rgba(16,13,20,.82); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.preview-source-link { margin-left: auto; color: #c7a5df; font-size: 12px; white-space: nowrap; }
.preview-source-link:hover { color: #f0d8ff; text-decoration: underline; }
.preview-id { margin-left: 0; }
.preview-uploader { flex-basis: 100%; color: #85828e; }
.info-dialog { overflow-y: auto; }
.source-settings { margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }
.source-settings-heading h3 { margin: 6px 0 0; color: #eee9f1; font-size: 17px; }
.source-settings > p { margin: 10px 0 13px; color: #96919f; font-size: 12px; line-height: 1.55; }
.cookie-status { margin: 0 0 12px; color: #a6a1ae; font-size: 12px; }
.cookie-status.is-ready { color: #a7d9aa; }
.cookie-status.is-error, .cookie-feedback.is-error { color: #efabb4; }
.cookie-input-label { display: block; margin-bottom: 6px; color: #c5c0cc; font-size: 12px; }
.cookie-input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 7px; color: var(--text); background: rgba(255,255,255,.025); font-size: 13px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cookie-actions .secondary-button { margin: 0; padding: 9px 12px; font-size: 12px; }
.cookie-feedback { margin: 10px 0 0 !important; color: #a7d9aa !important; font-size: 12px !important; }
.reader-image-error { flex-direction: column; justify-content: center; text-align: center; }
.reader-image-error a { margin-top: 4px; color: #d6b0ec; text-decoration: underline; }
@media (max-width: 720px) {
  .source-picker-trigger { max-width: 104px; min-width: 78px; gap: 5px; padding: 0 6px; font-size: 9px; }
  .source-picker-menu { width: 190px; }
  .search-form { gap: 5px; }
  .preview-source-link { font-size: 10px; }
  .preview-id { display: none; }
  .info-dialog { max-height: min(90dvh, 760px); padding: 18px; }
  .options-dialog { padding: 18px; }
  .option-setting { align-items: stretch; flex-direction: column; gap: 11px; }
  .option-checkbox-setting { align-items: center; flex-direction: row; }
  .option-setting select { width: 100%; }
}
@media (max-width: 380px) {
  .source-picker-trigger { max-width: 88px; min-width: 66px; }
  .source-picker-menu { width: 175px; }
  .search-icon, .search-form kbd { display: none; }
}
