@layer base, layout, components, responsive;
@layer base {
  :root { color-scheme: dark; --bg:#111314; --panel:#191b1c; --line:#303131; --text:#e6e2d9; --muted:#aaa69e; --gold:#c6a775; --gold-light:#e5c998; --wine:#7c3e46; --serif:"Palatino Linotype","Book Antiqua",Georgia,serif; --ui-text:1rem; --ui-label:.9375rem; --ui-caption:.8125rem; --sans:"Segoe UI",system-ui,-apple-system,sans-serif; }
  * { box-sizing:border-box; }
  body { margin:0; background:var(--bg); color:var(--text); font-family:var(--sans); font-size:var(--ui-text); line-height:1.55; }
  button,input,textarea,select { font:inherit; }
  a { color:inherit; text-decoration:none; }
  button { color:inherit; cursor:pointer; }
  button:disabled { cursor:wait; opacity:.5; }
  button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
  :focus-visible { outline:2px solid var(--gold-light); outline-offset:4px; }
  input,textarea,select { display:block; width:100%; border:1px solid #3b3c3c; background:#141617; border-radius:4px; color:var(--text); padding:12px 14px; transition:border-color .2s,box-shadow .2s; min-height:46px; }
  input::placeholder,textarea::placeholder { color:#858681; }
  input:focus,textarea:focus,select:focus { outline:none; border-color:var(--gold); box-shadow:0 0 0 3px #c6a77515; }
  label { display:block; margin:17px 0 7px; color:#d1cdc4; font-size:var(--ui-label); }
  textarea { resize:vertical; min-height:108px; }
  h1,h2,h3,p { margin-top:0; }
  h1,h2,h3 { text-wrap:balance; }
  em { color:var(--gold); font-style:normal; }
  .icon { width:20px; height:20px; display:inline-block; flex-shrink:0; vertical-align:middle; }
  .skip-link { position:fixed; left:16px; top:-80px; z-index:100; background:var(--gold); color:#171513; padding:12px; border-radius:4px; }
  .skip-link:focus { top:12px; }
  [hidden] { display:none !important; }
  .eyebrow { display:flex; align-items:center; gap:10px; color:var(--gold); font-size:var(--ui-caption); letter-spacing:.09em; font-weight:600; line-height:1.6; }
  .eyebrow .icon { width:17px; height:17px; }
  .tiny-diamond { width:6px; height:6px; transform:rotate(45deg); background:var(--gold); }
}
@layer layout {
  .auth-layout { display:grid; grid-template-columns:1fr 1fr; min-height:100svh; }
  .auth-panel { display:flex; flex-direction:column; min-height:100svh; padding:42px 64px 26px; background:radial-gradient(ellipse at 0 0,#29221d66,transparent 55%),var(--bg); }
  .brand { display:flex; align-items:center; gap:12px; width:fit-content; }
  .brand-seal { color:var(--gold); width:42px; height:46px; }
  .brand-seal svg { height:100%; width:100%; }
  .brand-name { color:#eee8dd; font-family:var(--serif); font-size:23px; line-height:1.1; white-space:nowrap; }
  .brand-name>span { font-family:var(--sans); font-size:11px; letter-spacing:3.2px; margin-left:3px; }
  .brand-name small { display:block; font-family:var(--sans); font-size:.75rem; letter-spacing:.09em; color:var(--muted); margin-top:7px; }
  .auth-content { width:100%; max-width:410px; margin:auto; padding:64px 0 56px; }
  .auth-content h1 { font:400 clamp(38px,3.6vw,59px)/1.13 var(--serif); letter-spacing:-1.7px; margin:22px 0; }
  .intro { color:var(--muted); font-size:14px; line-height:1.8; max-width:365px; margin-bottom:30px; }
  .auth-footer { border-top:1px solid var(--line); padding-top:21px; display:flex; justify-content:space-between; align-items:center; color:#95938b; font-size:10px; gap:12px; }
  .auth-footer>span:last-child { font-size:8px; letter-spacing:1.7px; }
  .auth-art { position:relative; isolation:isolate; overflow:hidden; min-height:760px; background:#111314 url("./art/cathedral.svg") center 58%/cover no-repeat; border-left:1px solid #51473a70; }
  .auth-art::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#11131420,transparent 30%),linear-gradient(0deg,#0e1011 0%,transparent 43%,#11131420); z-index:-1; }
  .auth-art::after { content:""; position:absolute; inset:28px; border:1px solid #c6a77525; pointer-events:none; }
  .art-topline,.art-bottomline { position:absolute; left:55px; right:55px; display:flex; justify-content:space-between; color:#b8ab96; font-size:8px; letter-spacing:2px; }
  .art-topline { top:55px; }
  .art-bottomline { bottom:53px; }
  .art-caption { position:absolute; text-align:center; left:30px; right:30px; bottom:120px; }
  .ornament { display:block; color:var(--gold); margin-bottom:20px; font-size:22px; }
  .art-caption blockquote { font:400 clamp(30px,2.9vw,46px)/1.3 var(--serif); color:#e0d3bc; margin:0 0 20px; text-shadow:0 3px 30px #000; }
  .art-caption p { color:#b6a88f; font-size:8px; letter-spacing:3px; }
  .workspace { min-height:100svh; }
  .sidebar { width:248px; position:fixed; inset:0 auto 0 0; display:flex; flex-direction:column; overflow-y:auto; padding:33px 22px 0; background:#151718; border-right:1px solid var(--line); z-index:10; }
  .sidebar .brand { margin:0 4px 47px; }
  .sidebar .brand-seal { width:35px; }
  .sidebar .brand-name { font-size:21px; }
  .sidebar .brand-name>span { font-size:var(--ui-caption); letter-spacing:2px; }
  .sidebar .brand-name small { font-size:.75rem; letter-spacing:.09em; }
  .sidebar-section { color:#b6b5a8; font-size:var(--ui-caption); letter-spacing:.1em; margin:0 16px 15px; }
  .sidebar-inscription { margin:auto 0; text-align:center; padding:45px 0; }
  .inscription-seal { height:88px; width:80px; color:#77684c; opacity:.65; margin:0 auto 26px; }
  .inscription-seal svg { width:100%; height:100%; }
  .sidebar-inscription p { font:italic 18px/1.55 var(--serif); color:#ada897; margin-bottom:17px; }
  .sidebar-inscription>span { font-size:7px; letter-spacing:2px; color:#929187; }
  .sidebar-bottom { margin-top:auto; }
  .profile { margin:20px -22px 0; padding:22px 19px; border-top:1px solid var(--line); display:flex; gap:11px; align-items:center; }
  .profile>div { min-width:0; flex:1; }
  .profile strong { font-size:12px; font-weight:500; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .profile small { display:block; font-size:10px; color:var(--muted); margin-top:2px; }
  .avatar { border:1px solid #726044; color:#dac18f; background:#302b24; width:34px; height:36px; border-radius:4px; display:grid; place-items:center; font-family:var(--serif); font-size:21px; flex-shrink:0; }
  .workspace-body { margin-left:248px; }
  .topbar { height:76px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; padding:0 45px; background:#131516; }
  .breadcrumbs { color:#b0ada3; font-size:var(--ui-label); display:flex; align-items:center; gap:16px; }
  .breadcrumbs>.icon { width:12px; height:12px; color:#6a6e69; }
  .breadcrumbs>span { color:#d7d3c9; }
  .early-access { font-size:var(--ui-caption); letter-spacing:.09em; color:#b5ad9a; display:flex; align-items:center; gap:8px; }
  .early-access>span { width:5px; height:5px; border-radius:50%; background:#af9464; box-shadow:0 0 8px #c6a77555; }
  .library { padding:41px 45px 0; max-width:1600px; margin:auto; }
  .library-heading { margin-bottom:30px; }
  .heading-row { display:flex; justify-content:space-between; gap:20px; align-items:center; }
  .library-heading h1 { font:400 clamp(31px,3vw,44px)/1.2 var(--serif); letter-spacing:-.9px; margin:11px 0 12px; }
  .library-heading h1 em { color:#ede2cd; }
  .library-heading p { color:var(--muted); font-size:12px; margin:0; }
  .archive-banner { min-height:194px; position:relative; display:flex; align-items:center; padding:29px 35px; isolation:isolate; overflow:hidden; background:linear-gradient(100deg,#302a2270,#1c1c19a0 55%,#241c1a60); border:1px solid #504534; border-radius:5px; margin-bottom:32px; }
  .archive-banner::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#1c1c19 20%,transparent),url("./art/cathedral.svg") right 48%/440px auto no-repeat; opacity:.65; z-index:-1; }
  .archive-banner .eyebrow { font-size:8px; letter-spacing:1.7px; color:#b9a783; }
  .archive-banner h2 { font:400 29px/1.35 var(--serif); letter-spacing:-.4px; margin:14px 0 12px; }
  .archive-banner p { font-size:11px; color:#b2ada1; line-height:1.8; margin:0; }
  .banner-sigil { position:absolute; right:67px; width:112px; height:120px; color:#b59762; opacity:.65; }
  .banner-sigil svg { width:100%; height:100%; }
  .banner-corner { position:absolute; right:15px; top:9px; color:#8e744e; }
  .catalogue { scroll-margin-top:24px; min-height:350px; }
  .catalogue-tools { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-bottom:16px; border-bottom:1px solid var(--line); }
  .results-heading { display:flex; justify-content:space-between; align-items:center; font-size:10px; color:#a5a398; margin:24px 0 19px; gap:12px; }
  .results-heading>span:first-child { letter-spacing:1.6px; }
  .book-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
  .library-footer { border-top:1px solid var(--line); padding:24px 0; margin-top:42px; display:flex; justify-content:space-between; color:#94948a; font-size:9px; gap:12px; }
  .footer-diamond { color:#927e5b; padding:0 7px; }
  .library-footer>span:last-child { font-size:7px; letter-spacing:1.5px; }
}
@layer components {
  .button { display:inline-flex; gap:10px; align-items:center; justify-content:center; min-height:42px; border-radius:4px; padding:11px 17px; border:1px solid transparent; font-size:var(--ui-text); font-weight:600; transition:background .2s,border-color .2s,transform .2s; }
  .button .icon { width:16px; height:16px; }
  .primary { color:#1e1b16; border-color:#d3b47d; background:#c8aa78; box-shadow:0 1px 0 #e9d5a550 inset,0 4px 14px #0002; }
  .primary:hover:not(:disabled) { background:#ddc18f; border-color:#e6ca95; }
  .secondary { background:#222425; color:#ddd5c5; border-color:#45443e; }
  .secondary:hover:not(:disabled) { background:#30302a; border-color:#8e7b57; }
  .icon-button { display:inline-grid; place-items:center; width:34px; height:36px; background:transparent; color:#b2b1a6; border:1px solid transparent; border-radius:4px; padding:6px; }
  .icon-button:hover { color:var(--gold-light); background:#c6a77512; border-color:#c6a77525; }
  .icon-button .icon { width:17px; height:17px; }
  .auth-switch { display:flex; border-bottom:1px solid var(--line); gap:29px; margin-bottom:25px; }
  .auth-switch a { font-size:var(--ui-text); color:#aaa69e; padding:0 0 13px; position:relative; }
  .auth-switch a[aria-current] { color:#e7d1a8; }
  .auth-switch a[aria-current]::after { content:""; position:absolute; height:2px; bottom:-1px; inset-inline:0; background:var(--gold); }
  .password-wrap { position:relative; }
  .password-wrap input { padding-right:48px; }
  .password-wrap .icon-button { position:absolute; right:6px; top:5px; }
  .optional { color:#8e938a; font-size:11px; margin-left:6px; }
  .auth-submit { margin-top:26px; width:100%; height:46px; justify-content:space-between; padding-inline:17px; }
  .auth-note { display:flex; align-items:center; justify-content:center; gap:8px; font-size:var(--ui-label); color:#b9b6a9; margin:20px 0 0; }
  .auth-note .icon { width:13px; height:13px; color:#a38d62; }
  .form-error { color:#e8a8a3; background:#6c2b2b29; border:1px solid #a3535355; padding:10px 12px; border-radius:4px; font-size:12px; margin:17px 0 0; }
  .composition-source { min-width:0; margin:14px 0; padding:12px; border:1px solid #a3937755; border-radius:4px; }
  .composition-source legend label { margin:0; }
  .composition-kinds { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:6px 12px; }
  .composition-kinds label { display:flex; align-items:center; gap:6px; }
  .nav-item { display:flex; gap:12px; align-items:center; border-radius:4px; padding:13px 14px; font-size:var(--ui-text); color:#e1ccaa; background:#c6a77512; border:1px solid #b89a6338; }
  .nav-item .icon { width:18px; height:18px; color:#b89a68; }
  .nav-dot { margin-left:auto; width:4px; height:4px; border-radius:50%; background:#c3a36b; }
  .docs-link { display:flex; align-items:center; gap:9px; color:#a5a89f; font-size:10px; padding:0 7px; }
  .docs-link .icon { width:14px; height:14px; }
  .docs-link>.icon:last-child { margin-left:auto; width:12px; }
  .docs-link:hover { color:var(--gold-light); }
  .tabs { display:flex; gap:5px; }
  .tabs button { border:1px solid transparent; border-radius:4px; background:transparent; color:#a7a99f; min-height:36px; padding:7px 13px; font-size:11px; white-space:nowrap; }
  .tabs button.selected { background:#292925; color:#e0c797; border-color:#67604d; }
  .tabs button:hover { color:#e0c797; }
  .search-field { margin:0; display:flex; align-items:center; gap:10px; background:#17191a; padding:0 11px; border:1px solid #383b39; border-radius:4px; width:280px; }
  .search-field:focus-within { border-color:#b49a6a; }
  .search-field>.icon { width:15px; height:15px; color:#9c9e91; }
  .search-field input { font-size:11px; padding:7px 0; min-height:36px; border:0; background:transparent; box-shadow:none; }
  .search-field kbd { font:10px var(--sans); border:1px solid #4a4c44; color:#999e91; padding:0 5px; border-radius:3px; }
  .book-card { border:1px solid #393a35; border-radius:5px; background:#1b1d1d; overflow:hidden; transition:border-color .22s,transform .22s,box-shadow .22s; min-width:0; }
  .book-card:hover { border-color:#8b7957; transform:translateY(-3px); box-shadow:0 10px 32px #0003; }
  .book-open { border:0; padding:0; width:100%; display:block; text-align:left; background:transparent; }
  .book-cover { height:186px; padding:15px 28px 17px 36px; position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:center; justify-content:space-between; overflow:hidden; background:radial-gradient(ellipse at 40% 80%,#5b484c80,transparent 80%),#30282c; color:#c8b095; border-bottom:1px solid #72604c70; }
  .book-cover::before { content:""; position:absolute; inset:9px 10px 10px 18px; border:1px solid #c8aa6640; z-index:-1; }
  .book-cover::after { content:""; position:absolute; inset:14px 15px 15px 23px; border:1px solid #c8aa6625; z-index:-1; background:repeating-linear-gradient(88deg,transparent,transparent 2px,#00000006 3px,transparent 4px); }
  .book-spine { width:12px; height:100%; position:absolute; left:0; top:0; background:linear-gradient(90deg,#0005,#b9a36b12,#0004); box-shadow:2px 0 4px #0004; }
  .cover-top { font-size:7px; letter-spacing:2.5px; color:#b6a085; z-index:1; }
  .cover-ornament { width:58px; height:59px; margin:5px 0; color:#b89d6d; opacity:.85; }
  .cover-ornament>.icon { width:100%; height:100%; stroke-width:.8; }
  .cover-ornament>svg { width:100%; height:100%; }
  .cover-name { font:400 22px/1.15 var(--serif); max-width:100%; text-align:center; color:#e3d5ba; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .cover-bottom { font-size:6px; letter-spacing:2.5px; color:#b49e7c; margin-top:8px; }
  .tone-1 .book-cover { background:radial-gradient(ellipse at 40% 80%,#4a524280,transparent 80%),#242f2b; }
  .tone-2 .book-cover { background:radial-gradient(ellipse at 40% 80%,#4a475580,transparent 80%),#282b35; }
  .tone-3 .book-cover { background:radial-gradient(ellipse at 40% 80%,#69543b60,transparent 80%),#363126; }
  .book-content { padding:18px 18px 14px; }
  .book-kicker { display:flex; justify-content:space-between; gap:7px; font-size:7px; letter-spacing:1px; color:#beb299; align-items:center; }
  .visibility { display:flex; gap:4px; align-items:center; color:#b1b5aa; letter-spacing:0; font-size:9px; }
  .visibility .icon { width:11px; height:11px; }
  .book-content h3 { font:400 22px/1.3 var(--serif); margin:12px 0 7px; text-wrap:initial; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .book-description { font-size:11px; line-height:1.8; color:#b0b0a5; min-height:40px; height:40px; overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; margin-bottom:18px; }
  .book-meta { border-top:1px solid #383a34; padding-top:12px; display:flex; justify-content:space-between; gap:8px; align-items:center; font-size:9px; color:#a3a89b; }
  .book-meta>span:last-child { display:flex; align-items:center; gap:10px; }
  .book-meta .icon { width:13px; height:13px; color:#b6a275; }
  .status { display:flex; gap:5px; align-items:center; }
  .status>span { width:4px; height:4px; border-radius:50%; background:#c0a676; }
  .status-active>span { background:#8baa92; }
  .status-archive>span { background:#a49ca8; }
  .empty-state { border:1px dashed #514936; background:radial-gradient(ellipse at 50% 0,#ac8a3910,transparent 70%); padding:50px 25px; text-align:center; border-radius:5px; margin-top:24px; }
  .empty-state .eyebrow { justify-content:center; font-size:8px; margin-bottom:14px; }
  .empty-icon { width:55px; height:55px; display:grid; place-items:center; margin:0 auto 22px; border:1px solid #7c6b454d; background:#c3a36709; transform:rotate(45deg); }
  .empty-icon>.icon { width:25px; height:25px; transform:rotate(-45deg); color:#b49b6c; }
  .empty-state h2 { font:400 31px/1.25 var(--serif); margin-bottom:14px; }
  .empty-state p { font-size:12px; color:#b2b1a6; max-width:370px; margin:0 auto 25px; line-height:1.8; }
  .pagination { display:flex; align-items:center; justify-content:space-between; margin-top:26px; }
  .pagination>span { font-size:10px; color:var(--muted); }
  .book-skeleton { height:355px; background:#1c1e1d; border:1px solid #333630; border-radius:5px; padding-bottom:20px; }
  .book-skeleton>div { height:186px; background:linear-gradient(110deg,#232624 20%,#2b2b26 40%,#232624 60%); background-size:200% 100%; animation:shimmer 1.5s infinite; }
  .book-skeleton>span { display:block; margin:28px 20px 0; height:14px; width:65%; background:#30322c; border-radius:2px; }
  .book-skeleton>span:last-child { margin-top:17px; width:80%; height:9px; }
  dialog { max-width:600px; width:calc(100% - 36px); max-height:90svh; background:#1a1c1c; color:var(--text); border:1px solid #78684b; border-radius:6px; padding:0; box-shadow:0 30px 120px #0009; }
  dialog::backdrop { background:#090b0cbd; backdrop-filter:blur(6px); }
  .dialog-header { display:flex; justify-content:space-between; align-items:center; padding:16px 22px; border-bottom:1px solid var(--line); background:#21211d; }
  .dialog-header .eyebrow { font-size:var(--ui-caption); letter-spacing:.09em; }
  .dialog-body { padding:28px; }
  .dialog-body h2 { font:400 34px/1.2 var(--serif); color:#eee2cc; margin:0 0 16px; overflow-wrap:anywhere; }
  .dialog-intro { font-size:12px; color:#b1b1a5; line-height:1.8; margin-bottom:25px; }
  .form-row { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
  .checkbox-label { display:flex; align-items:flex-start; gap:12px; background:#c6a77508; border:1px solid #524936; border-radius:4px; padding:14px; margin:23px 0; }
  .checkbox-label input { width:16px; height:16px; min-height:0; margin-top:3px; flex-shrink:0; accent-color:var(--gold); }
  .checkbox-label strong { font-weight:500; font-size:12px; display:block; }
  .checkbox-label small { display:block; font-size:10px; color:#b0ae9e; margin-top:4px; }
  .dialog-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:27px; flex-wrap:wrap; }
  .dialog-footnote { color:#a6a595; font-size:10px; text-align:right; margin:13px 0 0; }
  .detail-symbol { color:var(--gold); margin-bottom:20px; }
  .detail-symbol .icon { width:34px; height:34px; }
  .detail-badges { display:flex; gap:12px; flex-wrap:wrap; color:#b9b7a7; font-size:10px; padding-bottom:22px; border-bottom:1px solid var(--line); }
  .detail-badges>span { display:flex; gap:6px; align-items:center; }
  .detail-badges .icon { width:13px; height:13px; }
  .detail-description { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.9; font-size:13px; color:#cdc9bb; margin-top:24px; max-height:40svh; overflow-y:auto; }
  .source-note { font-size:11px; color:#c0aa7e; display:flex; gap:9px; align-items:center; }
  .source-note .icon { width:15px; height:15px; }
  .toast { position:fixed; bottom:25px; left:50%; transform:translateX(-50%); z-index:100; border:1px solid #a38958; border-radius:5px; background:#282820; color:#f0e4c9; padding:14px 22px; box-shadow:0 8px 45px #0006; width:max-content; max-width:calc(100% - 30px); font-size:12px; text-align:center; }
  .boot { min-height:100svh; padding:30px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
  .boot-seal { font-size:64px; color:var(--gold); }
  .boot h1 { font-family:var(--serif); font-weight:400; }
  .boot p { color:#bbb7a6; }
  @keyframes shimmer { to { background-position:-200% 0; } }
}
@layer responsive {
  @media(min-width:1800px) { .auth-panel { padding-inline:90px; } .auth-content { max-width:460px; } }
  @media(max-width:1250px) {
    .sidebar { width:220px; padding-inline:17px; }
    .profile { margin-inline:-17px; padding-inline:15px; }
    .workspace-body { margin-left:220px; }
    .topbar { padding-inline:30px; }
    .library { padding:32px 30px 0; }
    .book-grid { gap:16px; }
    .book-content { padding:15px 13px 13px; }
    .book-content h3 { font-size:20px; }
    .auth-panel { padding-inline:38px; }
  }
  @media(max-width:1050px) {
    .book-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .banner-sigil { right:30px; opacity:.3; }
    .heading-row { align-items:flex-end; }
    .heading-row>.button { white-space:nowrap; padding-inline:13px; }
    .library-heading h1 { max-width:400px; }
    .auth-layout { grid-template-columns:1.1fr 1fr; }
    .auth-content h1 { font-size:44px; }
    .art-caption blockquote { font-size:33px; }
    .art-topline,.art-bottomline { left:40px; right:40px; font-size:6px; }
    .catalogue-tools { gap:12px; flex-wrap:wrap; }
    .search-field { width:100%; }
    .search-field input { flex:1; }
  }
  @media(max-width:760px) {
    .auth-layout { display:block; }
    .auth-art { display:none; }
    .auth-panel { padding:26px 24px; background:linear-gradient(90deg,#111314ed,#111314d9),url("./art/cathedral.svg") center/cover fixed; }
    .auth-content { padding:50px 0; max-width:430px; }
    .auth-content h1 { font-size:45px; }
    .sidebar { position:relative; inset:auto; width:100%; padding:16px 20px; flex-direction:row; justify-content:space-between; align-items:center; border-right:0; border-bottom:1px solid var(--line); }
    .sidebar .brand { margin:0; }
    .sidebar-section,.sidebar nav,.sidebar-inscription,.docs-link { display:none; }
    .sidebar-bottom { margin:0; }
    .profile { margin:0; border:0; padding:0; gap:8px; }
    .profile>div,.profile .avatar { display:none; }
    .workspace-body { margin:0; }
    .topbar { height:52px; padding-inline:22px; }
    .library { padding:29px 22px 0; }
    .library-heading h1 { font-size:35px; }
    .heading-row { flex-direction:column; align-items:flex-start; gap:18px; }
    .heading-row>.button { align-self:flex-start; }
    .library-heading p { font-size:12px; max-width:300px; }
    .archive-banner { padding:25px 22px; margin-bottom:26px; min-height:181px; }
    .archive-banner h2 { font-size:27px; }
    .archive-banner .eyebrow { max-width:230px; font-size:7px; }
    .banner-sigil { width:80px; right:15px; opacity:.18; }
    .archive-banner p { font-size:10px; }
    .catalogue-tools { gap:15px; }
    .book-grid { gap:16px; }
    .book-cover { height:175px; padding-inline:25px 17px; }
    .cover-name { font-size:21px; }
    .book-kicker { display:block; }
    .visibility { margin-top:5px; }
    .book-meta { font-size:8px; }
    .book-meta>span:last-child { gap:5px; }
    .library-footer { flex-direction:column; gap:9px; margin-top:32px; }
    .dialog-body { padding:23px; }
    .dialog-body h2 { font-size:31px; }
    .dialog-actions>.button { flex:1; padding-inline:12px; }
    .dialog-footnote { text-align:left; }
  }
  @media(max-width:440px) {
    .book-grid { grid-template-columns:1fr; }
    .book-cover { height:208px; }
    .book-content { padding:18px; }
    .book-kicker { display:flex; }
    .visibility { margin:0; }
    .book-meta { font-size:10px; }
    .book-content h3 { font-size:25px; }
    .book-description { font-size:12px; }
    .cover-name { font-size:27px; }
    .book-cover .cover-ornament { width:65px; height:65px; }
    .breadcrumbs { font-size:var(--ui-caption); gap:8px; }
    .form-row { gap:12px; }
    .auth-footer>span:last-child { font-size:7px; letter-spacing:.8px; }
  }
  @media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
}

.rule-catalogue-portal{padding:20px;border:1px solid var(--border,#584b30);background:#c5a25e0a;border-radius:6px;margin:18px 0;}
.rule-catalogue-portal p,.rule-folder-intro,.rule-page-empty{font-size:16px;line-height:1.6;}
.rule-toc{margin-top:24px;padding-top:18px;border-top:1px solid var(--border,#584b30);}
.rule-toc-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:10px;list-style:none;padding:0;margin:16px 0;}
.rule-toc-list button{width:100%;min-height:44px;padding:12px 14px;text-align:left;font-size:15px;line-height:1.5;border:1px solid var(--border,#584b30);border-radius:4px;background:#c5a25e08;color:inherit;overflow-wrap:anywhere;}
.rule-toc-list button:hover,.rule-toc-list button:focus-visible{border-color:var(--gold,#c5a25e);background:#c5a25e18;}
