#theme-library *{box-sizing:border-box}
#theme-library{margin:0;background:#f5f3ef;color:#231831;font:15px system-ui,sans-serif}
#theme-library button,#theme-library input{font:inherit}
#theme-library button{cursor:pointer}
#theme-library button:focus-visible,#theme-library input:focus-visible{outline:3px solid #496be8;outline-offset:3px}
#theme-library header{display:flex;justify-content:space-between;align-items:center;padding:23px 4vw;border-bottom:1px solid #ddd7e3;background:white}
#theme-library header strong{font-size:28px;letter-spacing:-1.4px}
#theme-library .tag{font-size:12px;background:#eee9f6;border-radius:30px;padding:8px 13px}
#theme-library main{max-width:1500px;margin:auto;padding:32px 4vw}
#theme-library h1{font-size:clamp(32px,4vw,52px);letter-spacing:-2px;margin:10px 0}
#theme-library p{line-height:1.6}
#theme-library .intro{max-width:720px;color:#62586c}
#theme-library .layout{display:grid;grid-template-columns:minmax(350px,1fr) minmax(420px,1.1fr);gap:30px;align-items:start}
#theme-library .filters{display:flex;gap:7px;flex-wrap:wrap;margin:24px 0}
#theme-library .filters button,#theme-library .subtle{border:1px solid #d5cfda;background:transparent;border-radius:24px;padding:9px 14px;color:inherit}
#theme-library .filters button[aria-pressed=true]{background:#301443;color:white;border-color:#301443}
#theme-library .cards{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#theme-library .card{border:1px solid #dcd6df;border-radius:18px;padding:0;background:white;text-align:left;overflow:hidden;color:#251a31}
#theme-library .card[aria-pressed=true]{outline:3px solid #784aba;outline-offset:2px}
#theme-library .art{height:95px;position:relative;overflow:hidden;padding:15px;display:flex;align-items:center;justify-content:space-between}
#theme-library .art b{font-size:32px;letter-spacing:-2px}
#theme-library .art i{width:65px;height:65px;border:12px solid currentColor;border-radius:50%;opacity:.7;transform:rotate(-25deg)}
#theme-library .cardinfo{padding:15px}
#theme-library .cardinfo strong{display:block;font-size:17px}
#theme-library .meta{display:flex;justify-content:space-between;margin-top:8px;font-size:12px;color:#665a70}
#theme-library .preview{position:sticky;top:20px;background:white;border:1px solid #ddd7e3;border-radius:22px;padding:22px}
#theme-library .preview h2{margin:0}
#theme-library .previewhead{display:flex;justify-content:space-between;align-items:center;gap:10px}
#theme-library .hint{font-size:12px;color:#6d6276}
#theme-library .app{margin-top:20px;border:1px solid #cbc4d1;overflow:hidden;border-radius:var(--radius);background:var(--bg);color:var(--ink);font-family:var(--font);transition:background .2s}
#theme-library .appbar{padding:14px 18px;border-bottom:1px solid var(--line);font-weight:800}
#theme-library .appbody{display:grid;grid-template-columns:110px 1fr;min-height:360px}
#theme-library .nav{background:var(--nav);color:var(--navink);padding:16px 8px;font-size:12px}
#theme-library .nav div{padding:10px 8px;margin:3px 0;border-radius:var(--radius)}
#theme-library .nav .active{background:var(--accent);color:var(--onaccent);font-weight:700}
#theme-library .feed{padding:17px}
#theme-library .feed h3{margin:0 0 16px}
#theme-library .post{padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);font-size:12px;margin-bottom:12px}
#theme-library .post strong{display:block;margin-bottom:8px}
#theme-library .scene{background:linear-gradient(130deg,var(--accent),var(--nav));height:84px;display:flex;align-items:center;justify-content:center;font-size:36px;border-radius:var(--radius);margin:12px 0}
#theme-library .chat{background:var(--bg);padding:10px;border-radius:var(--radius);margin:8px 0}
#theme-library .accent{background:var(--accent);color:var(--onaccent);border:0;padding:9px 14px;border-radius:var(--radius);font-weight:bold}
#theme-library .controls{border-top:1px solid #e5dfe8;margin-top:18px;padding-top:18px}
#theme-library .swatches{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
#theme-library .swatch{width:31px;height:31px;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #bcb2c5}
#theme-library .swatch[aria-pressed=true]{outline:2px solid #231831;outline-offset:2px}
#theme-library input[type=color]{width:36px;height:34px;padding:0;border:0;background:none}
#theme-library .action{display:block;width:100%;border:0;background:#301443;color:white;border-radius:12px;padding:15px;font-weight:700;margin-top:20px}
#theme-library .status{min-height:42px;font-size:13px;color:#594d62;line-height:1.5}
#theme-library .note{margin-top:25px;font-size:13px;color:#6d6276}
#theme-library .link{font-size:13px;color:#613986}
#theme-library dialog{border:1px solid #ddd;border-radius:22px;max-width:430px;padding:28px;color:#231831}
#theme-library dialog::backdrop{background:#160d2399}
#theme-library dialog button{margin-top:10px}
#theme-library footer{padding:25px 4vw;color:#756a7e;font-size:12px}
@media (max-width:950px){#theme-library .layout{grid-template-columns:1fr}
#theme-library .preview{position:static;grid-row:1}}
@media (prefers-reduced-motion:reduce){#theme-library *{transition:none!important}}
@font-face {font-family:"rajdhani";src:url("/static/themes/fonts/rajdhani.ttf") format("truetype");font-display:swap;}
@font-face {font-family:"orbitron";src:url("/static/themes/fonts/orbitron.ttf") format("truetype");font-display:swap;}
@font-face {font-family:"audiowide";src:url("/static/themes/fonts/audiowide.ttf") format("truetype");font-display:swap;}
@font-face {font-family:"pressstart2p";src:url("/static/themes/fonts/pressstart2p.ttf") format("truetype");font-display:swap;}
@font-face {font-family:"nunito";src:url("/static/themes/fonts/nunito.ttf") format("truetype");font-display:swap;}
@font-face {font-family:"spacegrotesk";src:url("/static/themes/fonts/spacegrotesk.ttf") format("truetype");font-display:swap;}
#theme-library select,#theme-library #search{display:block;width:100%;padding:12px;border:1px solid #cfc6d7;border-radius:10px;background:white;color:#231831;margin:10px 0}
#theme-library #specimen{font-size:19px;line-height:1.8;overflow-wrap:anywhere}
#theme-library .searchlabel{font-size:13px}
#theme-library .appbar,#theme-library .feed h3{font-family:var(--displayfont)}
#theme-library .scene{font-family:var(--displayfont);color:var(--onaccent);background:var(--accent);font-size:23px;font-weight:800;position:relative;overflow:hidden}
#theme-library .scene span{position:relative;background:var(--accent);padding:5px 12px;border-radius:var(--radius)}
#theme-library .art{color:var(--cardink)!important;background:var(--cardbg)!important}
#theme-library .art b{position:relative;z-index:1;font-family:var(--displayfont);letter-spacing:0;font-size:24px}
#theme-library .art i{color:var(--cardaccent)}
#theme-library [data-motif=tactical]{background-image:repeating-linear-gradient(135deg,transparent 0 18px,#ffffff15 18px 20px)!important}
#theme-library [data-motif=neon]{box-shadow:inset 0 -5px var(--accent);background-image:linear-gradient(125deg,transparent 45%,#00dddd44 45% 47%,transparent 47%)!important}
#theme-library [data-motif=race]{background-image:conic-gradient(#ffffff22 25%,transparent 0 50%,#ffffff22 0 75%,transparent 0)!important;background-size:24px 24px!important}
#theme-library [data-motif=bricks]{background-image:radial-gradient(circle,#ffffff66 0 5px,#00000022 6px 8px,transparent 9px)!important;background-size:28px 28px!important}
#theme-library [data-motif=pixel]{background-image:conic-gradient(#00000022 25%,transparent 0 75%,#ffffff33 0)!important;background-size:18px 18px!important}
#theme-library [data-motif=stars]{background-image:radial-gradient(circle,#ffffff99 1px,transparent 2px)!important;background-size:23px 29px!important}
#theme-library [data-motif=vinyl]{background-image:repeating-radial-gradient(circle at 80% 50%,transparent 0 8px,#ffffff33 9px 10px)!important}
#theme-library [data-motif=scan]{background-image:repeating-linear-gradient(0deg,transparent 0 5px,#ffffff15 5px 6px)!important}
#theme-library [data-motif=pop]{background-image:radial-gradient(circle,#ffffff66 3px,transparent 4px)!important;background-size:18px 18px!important}
#theme-library [data-motif=runes]{background-image:repeating-linear-gradient(60deg,transparent 0 18px,#ffffff30 19px 20px)!important}
#theme-library [data-motif=waves]{background-image:repeating-radial-gradient(ellipse at 0 100%,transparent 0 13px,#ffffff33 14px 16px)!important}
#theme-library [data-motif=garden]{background-image:radial-gradient(ellipse at 30% 60%,#ffffff55 10%,transparent 11%)!important;background-size:35px 45px!important}
@media (max-width:540px){#theme-library main{padding:22px 16px}
#theme-library .cards{gap:10px}
#theme-library .cardinfo{padding:10px}
#theme-library .preview{padding:14px}
#theme-library .appbody{grid-template-columns:82px 1fr}
#theme-library .feed{padding:10px}
#theme-library .nav{padding:9px 3px;font-size:11px}
#theme-library .previewhead{align-items:start}
#theme-library .art{height:80px}
#theme-library .art b{font-size:18px}
#theme-library .art i{width:42px;height:42px;border-width:8px}
#theme-library header{gap:10px}
#theme-library .tag{font-size:10px}}
#theme-library [hidden]{display:none!important}
#theme-library .homeview{background:var(--bg);color:var(--ink)}
#theme-library .homenav{display:flex;justify-content:space-between;align-items:center;padding:17px;border-bottom:1px solid var(--line)}
#theme-library .homenav strong{font-size:21px;font-family:var(--displayfont)}
#theme-library .homenav span{font-size:10px}
#theme-library .homehero{padding:30px 24px 0;overflow:hidden}
#theme-library .eyebrow{font-size:9px;letter-spacing:2px}
#theme-library .homehero h2{font:800 clamp(25px,3vw,42px)/1.2 var(--displayfont);letter-spacing:-1px;margin:20px 0}
#theme-library .homehero em{font-style:normal;color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:5px;text-underline-offset:7px}
#theme-library .homehero p{font-size:13px;margin:15px 0 22px}
#theme-library .homebuttons{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
#theme-library .homebuttons span{font-size:11px}
#theme-library .homeart{height:140px;margin:22px -24px 0;position:relative;background-color:var(--nav);color:var(--navink);overflow:hidden}
#theme-library .orb{position:absolute;width:125px;height:125px;border:22px solid var(--accent);border-radius:50%;left:15%;top:25px;transform:rotate(-25deg)}
#theme-library .orb.two{left:45%;top:-26px;width:150px;height:150px;opacity:.65;border-width:32px}
#theme-library .homebadge{position:absolute;bottom:18px;right:15px;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:12px;font-size:11px;border-radius:var(--radius)}
#theme-library .homeunivers{display:grid;grid-template-columns:repeat(3,1fr);padding:20px 12px;gap:9px}
#theme-library .homeunivers div{padding:10px 6px;border-top:2px solid var(--accent)}
#theme-library .homeunivers b{font-size:11px}
#theme-library .homeunivers strong{display:block;font-size:12px;margin:7px 0}
#theme-library .homeunivers span{font-size:10px}
#theme-library .homefoot{padding:16px;border-top:1px solid var(--line);font-size:12px;text-align:center}
#theme-library .app[data-motif=bricks] .orb{border-radius:8px;transform:rotate(10deg);border-width:12px;background:var(--accent);background-image:radial-gradient(circle,#ffffff77 5px,#00000022 6px 8px,transparent 9px);background-size:28px 28px}
#theme-library .app[data-motif=race] .orb{border-radius:8px;transform:skew(-20deg);height:70px;top:50px}
#theme-library .app[data-motif=pixel] .orb{border-radius:0;transform:rotate(0)}
#theme-library .app[data-motif=tactical] .orb{border-radius:0;border-width:6px;transform:rotate(45deg)}
#theme-library .app[data-motif=neon] .orb{border-radius:2px;transform:skew(-25deg);border-width:10px}
#theme-library .app[data-motif=stars] .orb{border-width:3px;width:200px;height:90px}
#theme-library .app[data-motif=vinyl] .orb{border-width:36px}
#theme-library .app[data-motif=scan] .orb{border-radius:0;border-style:dashed;border-width:3px}
#theme-library .app:has(.homeview:not([hidden]))>.appbar{display:none}
@media (max-width:540px){#theme-library .homehero{padding:23px 15px 0}
#theme-library .homehero h2{font-size:25px}
#theme-library .homenav span{font-size:9px}}
#theme-library{background:transparent;color:var(--ink);font:15px system-ui,sans-serif;min-width:0}
#theme-library main{padding:24px 0;max-width:none}
#theme-library .layout{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:24px}
#theme-library .preview{top:85px;min-width:0;background:var(--white);color:var(--ink);border-color:var(--border)}
#theme-library .card{background:var(--white);color:var(--ink);border-color:var(--border);min-width:0}
#theme-library :is(.intro,.hint,.note,.meta,.status){color:var(--ink-soft)}
#theme-library .tag{background:var(--green-bg);color:var(--ink)}
#theme-library .action{width:auto;display:inline-flex;margin:0;padding:12px 20px;white-space:nowrap;background:var(--appearance-accent);color:var(--appearance-onaccent);border-radius:24px}
#theme-library .action:disabled{opacity:.6;cursor:wait}
#theme-library .filters button[aria-pressed=true]{background:var(--appearance-accent);color:var(--appearance-onaccent);border-color:var(--appearance-accent)}
#theme-library :is(select,#search){background:var(--white);color:var(--ink);border-color:var(--border)}
#theme-library .return-link{display:inline-flex;padding:10px 16px;border:1px solid var(--border);border-radius:24px;color:var(--ink);text-decoration:none;margin-bottom:20px}
#theme-library .app :is(h2,h3){font-family:var(--displayfont)!important}
#theme-library .card[aria-pressed=true]{outline-color:var(--appearance-accent)}
@media(max-width:1100px){#theme-library .layout{grid-template-columns:1fr}#theme-library .preview{position:static;grid-row:1}}
@media(max-width:540px){#theme-library .previewhead{flex-wrap:wrap}#theme-library .cards{grid-template-columns:1fr 1fr}#theme-library .cardinfo strong{font-size:15px}#theme-library main{padding:16px 0}}
#theme-library .app .eyebrow{color:var(--ink)!important}
/* Keep browsing and comparison side by side, including at browser zoom. */
#theme-library main{padding:14px 0 24px}
#theme-library h1{font-size:clamp(24px,2.5vw,34px);letter-spacing:-1px;margin:8px 0}
#theme-library .intro{max-width:none;font-size:14px;margin:6px 0 18px}
#theme-library .return-link{margin-bottom:8px;padding:7px 12px}
#theme-library .layout{display:grid;grid-template-columns:minmax(240px,1fr) minmax(320px,1.12fr);gap:20px;align-items:stretch;height:clamp(400px,calc(100dvh - var(--library-nav-height,80px) - 230px),780px);min-width:580px}
#theme-library{overflow-x:auto;padding:0 8px 16px;scrollbar-gutter:stable}
#theme-library .layout>section{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#theme-library .layout>section:first-child{grid-column:1;grid-row:1;padding:4px 10px 16px 4px}
#theme-library .preview{grid-column:2;grid-row:1;position:relative;top:auto;padding:0 16px 16px;border-radius:18px}
#theme-library .previewhead{position:sticky;top:0;z-index:3;background:var(--white);padding:16px 0 12px;flex-wrap:nowrap;border-bottom:1px solid var(--border-soft)}
#theme-library .previewhead h2{font-size:21px}
#theme-library .previewhead .hint{font-size:12px}
#theme-library .status{min-height:0;margin:10px 0;font-size:12px}
#theme-library .filters{margin:12px 0;gap:6px}
#theme-library .filters button{font-size:12px;padding:7px 10px}
#theme-library .cards{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px}
#theme-library .art{height:68px;padding:12px}
#theme-library .art b{font-size:18px}
#theme-library .art i{width:42px;height:42px;border-width:8px}
#theme-library .cardinfo{padding:10px}
#theme-library .cardinfo strong{font-size:15px}
#theme-library .cardinfo .hint{font-size:12px}
#theme-library .app{margin-top:12px}
#theme-library .homehero{padding:18px 16px 0}
#theme-library .homehero h2{font-size:27px!important;line-height:1.15;margin:12px 0}
#theme-library .homehero p{font-size:12px;margin:10px 0}
#theme-library .homeart{height:90px;margin:16px -16px 0}
#theme-library .homeunivers{padding:12px 8px}
#theme-library .homenav{padding:10px 12px}
#theme-library .homefoot{padding:10px;font-size:11px}
#theme-library .appbody{min-height:280px;grid-template-columns:85px 1fr}
#theme-library .feed{padding:12px}
#theme-library .controls{padding-top:12px;margin-top:12px}
#theme-library #specimen{font-size:17px}
@media(max-width:650px){#theme-library .layout{gap:12px;grid-template-columns:240px 320px;min-width:572px}#theme-library .intro{max-width:340px}#theme-library .previewhead .action{padding:10px 14px}}
body:has(#theme-library) .page-trail{display:none}
body:has(#theme-library) .fb-center{background:transparent!important}
#theme-library .library-heading{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-bottom:14px}
#theme-library .library-heading h1{margin:0;font-size:28px}
#theme-library .library-heading .return-link{margin:0;font-size:12px}
#theme-library .library-heading .intro{flex:0 0 100%;margin:0;font-size:13px}
#theme-library .layout{height:clamp(280px,calc(100dvh - var(--library-nav-height,80px) - 230px),780px)}

/* Restore a real mobile layout after the desktop comparison overrides above. */
@media (max-width: 900px) {
  #theme-library { width: 100%; max-width: 100%; padding: 0 0 16px; overflow: visible; scrollbar-gutter: auto; }
  #theme-library main { min-width: 0; max-width: 100%; }
  #theme-library .layout {
    grid-template-columns: minmax(0, 1fr); gap: 20px;
    min-width: 0; width: 100%; max-width: 100%; height: auto;
    align-items: start;
  }
  #theme-library .layout > section {
    min-width: 0; max-width: 100%; min-height: 0;
    overflow: visible; scrollbar-gutter: auto;
  }
  #theme-library .layout > section:first-child { grid-column: 1; grid-row: 1; padding: 4px 0 12px; }
  #theme-library .preview { grid-column: 1; grid-row: 2; position: static; padding: 0 14px 14px; }
  #theme-library .previewhead { position: static; flex-wrap: wrap; align-items: start; }
  #theme-library .previewhead > div { flex: 1 1 140px; min-width: 0; }
  #theme-library .previewhead .action { max-width: 100%; white-space: normal; flex: 0 0 auto; }
  #theme-library .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #theme-library :is(.library-heading, .filters, .card, .cardinfo, .art, .previewhead, .controls, .feed, .post, .homeview, .homenav, .homehero, .homeunivers > div) { min-width: 0; overflow-wrap: anywhere; }
  #theme-library .filters button, #theme-library .return-link { max-width: 100%; white-space: normal; }
  #theme-library .art { gap: 8px; }
  #theme-library .art b { min-width: 0; font-size: clamp(14px, 3.5vw, 18px); }
  #theme-library .art i { flex: 0 0 28px; width: 28px; height: 28px; border-width: 6px; }
  #theme-library :is(select, #search) { min-width: 0; max-width: 100%; }
  #theme-library .homenav { flex-wrap: wrap; gap: 8px; }
  #theme-library .homeunivers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #theme-library .appbody { grid-template-columns: minmax(0, 1fr); }
  #theme-library .appbody > .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  #theme-library .appbody > .nav > div { min-width: 0; margin: 0; }
  #theme-library .appbar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
  #theme-library .appbar > span { float: none !important; }
}
@media (max-width: 480px) {
  #theme-library .art { padding: 8px; }
  #theme-library .art i { display: none; }
  #theme-library .homeunivers { grid-template-columns: minmax(0, 1fr); }
  #theme-library .homeunivers div { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 3px 8px; }
  #theme-library .homeunivers b { grid-row: 1 / 3; }
  #theme-library .homeunivers strong { margin: 0; }
  #theme-library .homeunivers span { grid-column: 2; }
}
