/* CHESS.COM.GE v2 — balanced editorial design system. */
/* Noto Sans Georgian (SIL OFL 1.1, /fonts/NotoSansGeorgian-OFL.txt), self-hosted variable subsets. */@font-face{font-family:'Noto Sans Georgian';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/noto-sans-georgian-georgian.woff2') format('woff2');unicode-range:U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31}@font-face{font-family:'Noto Sans Georgian';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/noto-sans-georgian-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}@font-face{font-family:'Noto Sans Georgian';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/noto-sans-georgian-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}@font-face{font-family:'Noto Sans Georgian';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/noto-sans-georgian-symbols.woff2') format('woff2');unicode-range:U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF}

:root {
  color-scheme: light;
  --bg:#f6f7f5; --surface:#fff; --surface-alt:#eef2ec; --text:#15241f;
  --muted:#63706a; --green:#176b52; --accent:#42b889; --green-soft:#e3f0e9;
  --gold:#c4a468; --line:#dce3dc; --hero:#edf2e8; --hero-ink:#172b22;
  --sidebar:#fff; --board-light:#e7eadc; --board-dark:#98af93;
  --shadow:0 12px 36px #172b2208; --radius:18px; --sidebar-width:236px;
  --border:var(--line); --brand:var(--green); --background:var(--bg);
  font-family:'Noto Sans Georgian',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-synthesis:none;
}
:root[data-theme='dark'],body[data-theme='dark'] {
  color-scheme:dark;
  --bg:#0e1513; --surface:#19221f; --surface-alt:#202c26; --text:#f3f5f2;
  --muted:#a5b3aa; --green:#42b889; --accent:#42b889; --green-soft:#203c2f;
  --gold:#d4b77d; --line:#303b36; --hero:#1b2d24; --hero-ink:#f3f5f2;
  --sidebar:#141d18; --board-light:#ccd6ba; --board-dark:#648372;
  --shadow:0 12px 36px #0002;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:90px}
body{margin:0;background:var(--bg);color:var(--text);font-size:16px;line-height:1.65}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
svg{display:block;flex-shrink:0}
button svg,a svg{width:20px;height:20px}
h1,h2,h3,h4,p{margin-top:0}
h1,h2,h3,h4{line-height:1.45;overflow-wrap:anywhere}
p{overflow-wrap:anywhere}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--green);outline-offset:4px}
::selection{background:#42b88955}
.skip-link{position:fixed;top:8px;left:12px;padding:12px 20px;background:var(--text);color:var(--bg);border-radius:8px;z-index:1000;transform:translateY(-160%)}
.skip-link:focus{transform:translateY(0)}
.app-shell{display:flex;min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);z-index:50;background:var(--sidebar);border-right:1px solid var(--line);padding:30px 17px 20px;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.brand{display:flex;gap:8px;align-items:center;padding:0 5px 34px;line-height:1.3;min-height:74px;min-width:0}
.brand>span:last-child{min-width:0}
.brand-mark{display:grid;place-items:center;flex-shrink:0;width:34px;height:45px;color:var(--green);font-size:37px;font-family:'Segoe UI Symbol',Georgia,serif;line-height:1}
.brand strong{display:block;font-family:Arial,sans-serif;font-size:16px;letter-spacing:-.4px;font-weight:800;white-space:nowrap}
.brand small{display:block;margin-top:7px;font-size:12px;letter-spacing:.06em;color:var(--muted)}
.brand-dot{color:var(--green)}
.nav-label{color:var(--muted);font-size:12px;letter-spacing:.1em;font-weight:650;padding:0 15px;margin:8px 0 12px}
.nav-list{display:grid;gap:5px}
.nav-list a,.nav-item{position:relative;display:flex;align-items:center;gap:12px;min-height:46px;padding:11px 13px;border-radius:9px;color:var(--muted);font-size:14px;font-weight:600;transition:background .15s,color .15s}
.nav-list a:hover,.nav-item:hover{background:var(--surface-alt);color:var(--text)}
.nav-list a.active,.nav-item.active{background:var(--green-soft);color:var(--green);font-weight:750}
.nav-list a.active:after,.nav-item.active:after{content:'';width:5px;height:5px;border-radius:50%;margin-left:auto;background:var(--green)}
.nav-icon,.nav-ico{font-family:'Segoe UI Symbol',Georgia,serif;display:grid;place-items:center;flex-shrink:0;width:23px;height:25px;font-size:22px;line-height:1}
.sidebar-bottom{margin-top:auto;padding:28px 8px 0;display:grid;gap:13px}
.sidebar-note{font-size:13px;line-height:1.7;color:var(--muted)}
.sidebar-card{padding:16px;background:var(--surface-alt);border:1px solid var(--line);border-radius:12px}
.sidebar-card strong{display:block;font-size:12px;margin-bottom:5px}
.sidebar-card p{font-size:13px;color:var(--muted);margin:0 0 13px}
.sidebar-bottom .btn{font-size:13px;width:100%}
.main-area{margin-left:var(--sidebar-width);width:calc(100% - var(--sidebar-width));min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:78px;padding:17px clamp(22px,3.3vw,56px);border-bottom:1px solid var(--line);background:var(--surface)}
.topbar-title{font-size:14px;font-weight:600;color:var(--muted)}
.topbar-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.topbar-actions .btn{min-height:44px;padding:8px 13px;font-size:14px}
.topbar .locale{font-size:12px;color:var(--muted);white-space:nowrap}
.theme-toggle,.icon-btn,.menu-toggle{display:inline-grid;place-items:center;min-width:44px;min-height:44px;padding:7px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:9px;font-size:18px;line-height:1}
.theme-toggle:hover,.icon-btn:hover{background:var(--surface-alt)}
.menu-toggle{display:none}
.menu-backdrop,.sidebar-backdrop{display:none}
.page{width:100%;max-width:1580px;padding:35px clamp(22px,3.3vw,56px) 70px;margin:0 auto;flex:1;min-width:0}
.page:focus{outline:none}
.page-footer{margin-top:auto;display:flex;justify-content:space-between;gap:20px;padding:22px clamp(22px,3.3vw,56px);border-top:1px solid var(--line);font-size:12px;color:var(--muted);flex-wrap:wrap}
.page-footer a:hover{text-decoration:underline;color:var(--green)}
.eyebrow{display:block;color:var(--green);font-size:12px;line-height:1.8;letter-spacing:.085em;font-weight:700;margin-bottom:14px}
.hero{display:grid;grid-template-columns:1.12fr .88fr;min-height:420px;background:var(--hero);border:1px solid color-mix(in srgb,var(--green) 12%,transparent);border-radius:22px;overflow:hidden;isolation:isolate;position:relative}
.hero-copy{position:relative;padding:48px 0 42px 42px;z-index:2;min-width:0}
.hero h1{font-size:clamp(30px,3.25vw,52px);line-height:1.35;letter-spacing:-.055em;font-weight:800;margin:0 0 20px;color:var(--hero-ink)}
.hero h1 strong,.hero h1 em{color:var(--green);font-style:normal;font-weight:inherit}
.hero-copy>p{max-width:440px;font-size:16px;color:var(--muted);line-height:1.7;margin:0 0 27px}
.hero-actions{display:flex;flex-wrap:wrap;gap:10px}
.hero-art{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:380px;perspective:800px;overflow:hidden}
.hero-art:before{content:'';position:absolute;width:330px;height:330px;border:1px solid color-mix(in srgb,var(--green) 16%,transparent);border-radius:50%;transform:translate(14px,-14px)}
.hero-art:after{content:'';position:absolute;inset:auto 0 0;height:40%;background:linear-gradient(transparent,var(--hero));pointer-events:none}
.hero-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:min(86%,330px);aspect-ratio:1;transform:rotateX(20deg) rotateZ(-12deg);box-shadow:12px 20px 0 #264f3522,20px 38px 35px #17332520;position:relative;z-index:1;border:5px solid #f0efdf;border-radius:3px;overflow:hidden}
.hero-square{position:relative;aspect-ratio:1;background:var(--board-light);display:grid;place-items:center;min-width:0;line-height:1;font-family:'Segoe UI Symbol',Georgia,serif;font-size:clamp(18px,2.3vw,36px);color:#1a3828}
.hero-square.dark{background:var(--board-dark)}
.hero-square .hero-piece{font-size:inherit;transform:rotateZ(12deg) rotateX(-16deg);filter:drop-shadow(3px 4px 1px #122a2333)}
.hero-piece.white{color:#fffdf3;-webkit-text-stroke:1px #596558}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);padding:11px 17px;font-size:14px;font-weight:650;line-height:1.5;text-align:center;transition:background .15s,border-color .15s,transform .15s;max-width:100%;overflow-wrap:anywhere}
.btn:hover{border-color:var(--green);transform:translateY(-1px)}
.btn.primary,.btn-primary,.btn-green{background:#176b52;border-color:#176b52;color:#fff}
.btn.primary:hover,.btn-primary:hover,.btn-green:hover{background:#11563f;border-color:#11563f}
:root[data-theme='dark'] .btn.primary,:root[data-theme='dark'] .btn-primary,:root[data-theme='dark'] .btn-green,body[data-theme='dark'] .btn.primary{background:#42b889;border-color:#42b889;color:#082a1c}
.btn.secondary,.btn-secondary,.btn-outline{background:var(--surface);border-color:var(--line);color:var(--text)}
.btn.ghost,.btn-ghost{background:transparent;border-color:transparent;color:var(--green);padding-left:4px;padding-right:4px}
.btn.small,.btn-small{min-height:40px;padding:8px 12px;font-size:13px}
.btn.danger{color:#a03f30;background:#fff1ec;border-color:#efc8bb}
.btn:disabled:hover{transform:none}
.btn.full-width{width:100%}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:34px 0 17px}
.section-head h2,.section-title{font-size:20px;font-weight:750;letter-spacing:-.03em;margin:0;line-height:1.5}
.section-subtitle{margin:6px 0 0;font-size:14px;line-height:1.7;color:var(--muted)}
.section-link{font-size:14px;font-weight:650;color:var(--green);white-space:nowrap;display:inline-flex;align-items:center;gap:8px}
.section-link:hover{text-decoration:underline}
.page-heading h1,.library-heading h1{font-size:clamp(25px,2.8vw,36px);letter-spacing:-.04em;margin-bottom:12px}
.page-heading>p,.library-heading>p{max-width:700px;color:var(--muted);font-size:15px;line-height:1.7}
.library-heading{position:relative;padding:7px 0 15px}
.library-heading:has(>.tag){display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}
.library-heading .eyebrow,.page-heading .eyebrow{margin-bottom:9px}
.book-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:19px;align-items:stretch}
.book-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;overflow:hidden;display:flex;flex-direction:column;min-width:0;transition:transform .18s,box-shadow .18s}
.book-card:hover{transform:translateY(-3px);box-shadow:0 12px 25px #15241f0d}
.book-cover{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:1.15;background:#e9ede5;padding:23px 26px;overflow:hidden;border-bottom:1px solid var(--line)}
.book-card:nth-child(4n+2) .book-cover{background:#eeeadf}
.book-card:nth-child(4n+3) .book-cover{background:#e4eae9}
.book-card:nth-child(4n) .book-cover{background:#eae5e1}
.book-cover img{width:auto;height:100%;max-height:185px;max-width:88%;object-fit:contain;filter:drop-shadow(4px 6px 4px #1a281b27);transition:transform .25s}
.book-card:hover .book-cover img{transform:translateY(-3px) rotate(-1deg)}
.book-cover .cover-placeholder{display:grid;place-items:center;aspect-ratio:.7;height:100%;max-width:80%;min-height:130px;background:#1d4432;color:#e5d7b8;box-shadow:5px 6px 0 #0002;padding:16px;font-size:12px;text-align:center}
.book-cover .format-badge{position:absolute;bottom:10px;right:10px;background:#ffffffde;color:#394b3c;padding:3px 7px;font-size:12px;border-radius:4px;font-weight:700;letter-spacing:.07em}
.book-body{padding:17px 16px 18px;display:flex;flex-direction:column;gap:0;flex:1;min-width:0}
.book-title,.book-body h3{font-size:15px;font-weight:700;line-height:1.5;margin:8px 0 6px;letter-spacing:-.01em;overflow-wrap:anywhere}
.book-author{font-size:13px;color:var(--muted);line-height:1.65;margin:0 0 10px}
.book-body .book-description{font-size:13px;color:var(--muted);line-height:1.7;margin:0 0 16px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.book-body .btn,.book-body>.section-link{margin-top:auto}
.book-body .btn{font-size:13px;min-height:40px;padding:8px 11px}
.tag,.chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--green);background:var(--green-soft);border:1px solid transparent;border-radius:5px;padding:4px 7px;line-height:1.6;width:fit-content;max-width:100%;overflow-wrap:anywhere}
.chip{border-radius:20px;padding:6px 11px;white-space:normal}
.chip.active{background:var(--green);color:var(--surface)}
.tags,.meta-row{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.muted,.subtle{color:var(--muted)}
.small{font-size:12px;line-height:1.9}
.feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.feature-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:23px;position:relative;min-width:0;display:flex;flex-direction:column;align-items:flex-start}
.feature-card h3{font-size:18px;margin:17px 0 8px}
.feature-card>.eyebrow{font-size:12px;margin:16px 0 8px}
.feature-card>.eyebrow+h3{margin-top:0}
.feature-card p{font-size:14px;line-height:1.7;color:var(--muted);margin:0 0 15px}
.feature-card .section-link{margin-top:auto}
.feature-icon{width:37px;height:37px;border-radius:10px;background:var(--green-soft);display:grid;place-items:center;font-size:23px;color:var(--green);font-family:'Segoe UI Symbol',Georgia,serif}
.feature-card.feature-dark{background:#173b2c;color:#fff;border-color:#173b2c}
.feature-card.feature-dark p{color:#bed2c3}
.feature-card.feature-dark .feature-icon{background:#315642;color:#d7c18a}
.feature-card.feature-dark .section-link{color:#c9e6d3}
.content-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:24px;min-width:0}
.panel h2{font-size:20px;margin-bottom:13px}
.panel h3{font-size:14px;margin-bottom:10px}
.panel p:last-child{margin-bottom:0}
.panel .muted{font-size:12px;line-height:1.9}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:22px 0 18px}
.search-input,.field,.select{min-width:0;max-width:100%;padding:11px 13px;min-height:44px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:8px;font-size:14px;line-height:1.6}
.search-input::placeholder,.field::placeholder{color:var(--muted);opacity:.85}
.search-input{flex:1 1 250px}
.select{padding-right:28px}
.field:focus,.search-input:focus,.select:focus{border-color:var(--green);outline:2px solid color-mix(in srgb,var(--green) 20%,transparent);outline-offset:1px}
.toolbar label,.filter-grid label{display:grid;gap:6px;font-size:12px;font-weight:600;color:var(--muted)}
.filter-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:17px 0 21px}
.filter-grid .select{width:100%}
.result-count{font-size:12px;color:var(--muted);margin:0 0 18px}
.empty{grid-column:1/-1;border:1px dashed var(--line);border-radius:14px;background:var(--surface);padding:40px 24px;text-align:center;color:var(--muted);font-size:12px;line-height:2}
.empty h2,.empty h3{color:var(--text);margin-bottom:12px}
.empty .btn{margin-top:15px}
.notice{border:1px solid #e2d4b4;border-radius:10px;background:#f6f1e5;color:#6d5830;padding:15px 18px;font-size:14px;line-height:1.7;margin:18px 0;overflow-wrap:anywhere}
.notice.error,.error{color:#a03f30;background:#fff2ef;border-color:#e8c7be}
:root[data-theme='dark'] .notice{background:#302b1f;border-color:#5b4e32;color:#e0cb9c}
:root[data-theme='dark'] .notice.error,:root[data-theme='dark'] .error{background:#3d2523;border-color:#6d3d37;color:#f2b0a6}
.success{color:var(--green);background:var(--green-soft);padding:12px;border-radius:8px;font-size:12px}
.breadcrumbs{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:9px;margin-bottom:20px;flex-wrap:wrap}
.breadcrumbs a:hover{color:var(--green);text-decoration:underline}
.book-detail{display:grid;grid-template-columns:minmax(190px,285px) minmax(0,1fr);gap:40px;align-items:start;margin:25px 0}
.book-detail-cover{padding:29px;background:var(--surface-alt);border:1px solid var(--line);border-radius:16px;display:flex;justify-content:center;align-items:flex-start}
.book-detail-cover img{width:100%;max-height:420px;object-fit:contain;filter:drop-shadow(5px 8px 5px #0e26152d)}
.book-detail-content{min-width:0}
.book-detail-content h1{font-size:clamp(22px,2.5vw,34px);line-height:1.5;letter-spacing:-.04em;margin:12px 0}
.book-detail-content .book-author{font-size:13px;margin:0 0 20px}
.book-detail-content p{font-size:15px;line-height:1.8;color:var(--muted)}
.book-detail-content .hero-actions{margin:23px 0}
.metadata-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 24px;padding:21px 0;margin:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.metadata-grid dt,.metadata-grid small{font-size:12px;color:var(--muted);display:block;margin-bottom:5px}
.metadata-grid dd,.metadata-grid strong{font-size:14px;font-weight:600;margin:0;overflow-wrap:anywhere}
.reader-shell{display:flex;flex-direction:column;gap:18px}
.reader-shell h1{font-size:22px;line-height:1.5;margin-bottom:7px}
.reader-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:11px;position:sticky;top:8px;z-index:12}
.reader-toolbar .btn{min-height:40px;padding:7px 10px;font-size:13px}
.reader-toolbar label{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.reader-toolbar .field{min-height:35px;padding:7px 10px;max-width:75px}
.reader-toolbar select{min-height:40px;font-size:13px}
.reader-stage{background:#dce2d9;border:1px solid var(--line);border-radius:12px;min-height:430px;max-height:80vh;overflow:auto;text-align:center;padding:22px;overscroll-behavior:contain;position:relative}
.reader-canvas,.reader-stage canvas{display:block;max-width:100%;height:auto;margin:0 auto;box-shadow:0 4px 20px #16281d21;background:white}
.reader-stage iframe{width:100%;height:74vh;border:0;background:#fff;border-radius:5px}
.reader-stage:fullscreen,.reader-shell:fullscreen{background:var(--bg);padding:20px;overflow:auto;max-height:none;width:100%;height:100%;border:0;border-radius:0}
.reader-shell:fullscreen .reader-stage{max-height:none;flex:1}
.reader-bookmarks{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.reader-bookmarks .btn{min-height:30px;padding:5px 8px;font-size:12px}
.reader-status{font-size:12px;padding:30px;color:#344d3b}
.admin-layout{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:22px;margin-top:22px;align-items:start}
.admin-list{display:grid;gap:8px;max-height:78vh;overflow:auto;padding:2px}
.admin-record{padding:15px;border:1px solid var(--line);background:var(--surface);border-radius:10px;text-align:left;color:var(--text);width:100%;min-width:0}
.admin-record:hover,.admin-record.active{border-color:var(--green);background:var(--green-soft)}
.admin-record strong{font-size:12px;display:block;line-height:1.8}
.admin-record small{color:var(--muted);font-size:12px}
.admin-form{padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.form-group{display:flex;flex-direction:column;gap:7px;min-width:0}
.form-group.full,.form-group.full-width{grid-column:1/-1}
.form-group label,.admin-form label{font-size:12px;font-weight:650;color:var(--muted)}
.form-group .field,.form-group .select{width:100%}
textarea.field{resize:vertical;min-height:105px;line-height:1.9}
.form-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}
.help{font-size:12px;color:var(--muted);line-height:1.9}
.toast{position:fixed;right:24px;bottom:24px;max-width:min(390px,calc(100vw - 32px));padding:15px 20px;background:#173f2f;color:#fff;border:1px solid #417254;border-radius:12px;font-size:12px;box-shadow:0 12px 40px #0002;z-index:100;opacity:0;pointer-events:none;transform:translateY(12px);transition:.2s;line-height:1.9}
.toast.visible,.toast.show{opacity:1;transform:none}
.route-card{border:1px solid var(--line);border-radius:13px;padding:24px;background:var(--surface);min-width:0}
.route-card .route-number{font-family:Georgia,serif;font-size:35px;line-height:1;color:var(--gold);margin-bottom:20px}
.route-card>.feature-icon{margin-bottom:18px}
.route-card h3{font-size:14px;margin-bottom:10px}
.route-card p{font-size:14px;line-height:1.7;color:var(--muted)}
.route-card ol{padding-left:20px;color:var(--muted);font-size:14px;line-height:1.8}
.stats-row{display:flex;flex-wrap:wrap;gap:22px;padding:22px 0 3px;margin-bottom:3px}
.stats-row>div{padding-right:22px;border-right:1px solid var(--line)}
.stats-row>div:last-child{border:0}
.stats-row strong{font-size:20px;font-weight:750;line-height:1.3;display:block;color:var(--text)}
.stats-row span,.stats-row small{font-size:12px;color:var(--muted)}
.support-banner{display:flex;align-items:center;justify-content:space-between;gap:30px;background:#173f2f;color:#fff;border-radius:16px;padding:27px 30px;margin-top:34px;position:relative;overflow:hidden}
.support-banner h2{font-size:19px;letter-spacing:-.02em;margin-bottom:7px}
.support-banner p{font-size:14px;color:#c1d5c7;line-height:1.7;margin:0;max-width:600px}
.support-banner .btn{flex-shrink:0;color:#fff;background:transparent;border-color:#719680}
.support-banner .btn:hover{background:#ffffff15}
.support-banner .eyebrow{color:#cfb77f;font-size:12px;margin-bottom:9px}
.video-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;overflow:hidden;min-width:0}
.video-card img{width:100%;aspect-ratio:16/9;object-fit:cover}
.video-card>div{padding:18px}
.video-card h3{font-size:14px;margin:10px 0 7px}
.video-card p{font-size:14px;color:var(--muted)}
.video-frame{width:100%;aspect-ratio:16/9;border:0;border-radius:14px;background:#101913;display:block}
.software-logo{height:65px;width:65px;object-fit:contain;margin-bottom:15px}
.software-screenshot{width:100%;max-height:250px;object-fit:contain;background:var(--surface-alt);border-radius:9px;margin-bottom:17px}
.divider{height:1px;background:var(--line);margin:20px 0}
.stack{display:grid;gap:16px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.mt-20{margin-top:20px}.mt-30{margin-top:30px}.mt-40{margin-top:40px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html[data-theme='dark'] .status-published{color:#70d3a9}
html[data-theme='dark'] .status-draft{color:#dfc282}
html[data-theme='dark'] .notice.error,html[data-theme='dark'] .error{color:#f2b0a6!important;border-color:#9d5e54!important}

@media(min-width:1600px){.hero-copy{padding-left:50px}.hero{min-height:450px}.hero-art{min-height:430px}.hero-board{width:365px}.book-cover{padding:27px}.book-cover img{max-height:215px}.book-title,.book-body h3{font-size:14px}}
@media(max-width:1250px){:root{--sidebar-width:215px}.sidebar{padding-left:12px;padding-right:12px}.brand strong{font-size:15px}.brand-mark{width:31px;font-size:35px}.hero-copy{padding:35px 0 33px 29px}.hero{min-height:370px}.hero-art{min-height:350px}.hero h1{font-size:36px}.hero-board{width:85%}.book-grid{gap:14px}.book-cover{padding:20px}.book-body{padding:14px 13px}.book-title,.book-body h3{font-size:12px}.feature-card{padding:20px}.filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.book-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero{grid-template-columns:1fr .72fr}.hero h1{font-size:32px}.hero-copy>p{font-size:15px}.hero-board{width:95%}.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feature-grid>.feature-card:last-child:nth-child(odd){grid-column:1/-1}.content-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.book-detail{gap:25px;grid-template-columns:200px minmax(0,1fr)}.book-detail-cover{padding:21px}.metadata-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-layout{grid-template-columns:1fr}.admin-list{max-height:300px;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){:root{--sidebar-width:236px}.sidebar{transform:translateX(-105%);transition:transform .2s;padding:25px 17px;box-shadow:12px 0 40px #0002}.sidebar.open{transform:translateX(0)}.sidebar .brand strong{font-size:17px}.main-area{margin-left:0;width:100%}.menu-toggle{display:inline-grid;flex-shrink:0}.topbar{min-height:68px;padding:14px 22px;gap:12px}.topbar-title{margin-right:auto;font-size:12px}.topbar-actions{gap:9px}.menu-backdrop.visible,.sidebar-backdrop.visible,.menu-backdrop.open,.sidebar-backdrop.open{display:block;position:fixed;inset:0;background:#071c1480;z-index:40;border:0;backdrop-filter:blur(2px)}.page{padding:26px 24px 50px}.hero{grid-template-columns:1.15fr .85fr}.hero-copy{padding:35px 0 33px 31px}.hero h1{font-size:35px}.hero-board{width:85%}.hero-art{min-height:340px}.page-footer{padding:20px 24px}.book-grid{gap:16px}.book-cover{padding:22px}.book-title,.book-body h3{font-size:12px}}
@media(max-width:640px){.page{padding:20px 18px 45px}.topbar{padding:12px 17px}.topbar .locale{display:none}.topbar-actions .btn{font-size:12px;padding:7px 9px}.hero{grid-template-columns:1fr;min-height:0;border-radius:17px}.hero-copy{padding:30px 26px 0}.hero h1{font-size:clamp(30px,7.5vw,40px);max-width:430px}.hero-copy>p{font-size:15px;max-width:420px;margin-bottom:23px}.hero-art{min-height:265px;max-height:285px;position:relative;overflow:hidden}.hero-board{width:255px;margin-top:18px}.hero-square{font-size:25px}.hero-art:before{width:240px;height:240px}.hero-actions .btn{font-size:12px}.section-head{margin-top:28px;gap:12px;align-items:flex-start}.section-head h2,.section-title{font-size:18px}.section-subtitle{font-size:12px;max-width:270px}.section-link{font-size:12px;padding-top:5px;white-space:normal;text-align:right}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.book-cover{aspect-ratio:1;min-height:0;padding:20px 17px}.book-cover img{max-height:170px;max-width:92%}.book-body{padding:13px 12px 15px}.book-title,.book-body h3{font-size:12px;line-height:1.55}.book-author{font-size:12px}.book-body .tag{font-size:12px;padding:3px 6px}.book-body .book-description{font-size:12px;-webkit-line-clamp:2}.book-body .btn{font-size:12px;padding:7px 8px;min-height:35px}.feature-grid,.content-grid{gap:12px}.feature-card{padding:19px}.feature-card h3{font-size:13px}.feature-card p{font-size:12px}.feature-icon{width:33px;height:33px;font-size:21px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.toolbar{gap:8px;margin-top:20px}.toolbar>.search-input{flex-basis:100%}.toolbar>.select{flex:1 1 130px}.book-detail{grid-template-columns:1fr;gap:25px}.book-detail-cover{max-width:250px;width:100%;margin:auto;padding:24px}.book-detail-cover img{max-height:320px}.book-detail-content h1{font-size:26px}.book-detail-content .book-author{font-size:12px}.book-detail-content .hero-actions .btn{flex:1 1 160px}.metadata-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.support-banner{padding:24px;flex-direction:column;align-items:flex-start;gap:20px}.support-banner h2{font-size:18px}.support-banner .btn{width:100%}.reader-toolbar{gap:7px;padding:10px;position:static}.reader-toolbar .btn{font-size:12px;padding:7px 8px}.reader-shell h1{font-size:18px}.reader-stage{padding:10px;min-height:340px;max-height:70vh}.reader-stage iframe{height:65vh}.reader-shell:fullscreen{padding:10px}.form-grid{grid-template-columns:1fr}.form-group.full{grid-column:auto}.admin-form{padding:20px}.admin-list{grid-template-columns:1fr}.panel{padding:20px}.route-card{padding:20px}.stats-row{gap:15px}.stats-row>div{padding-right:15px}.stats-row strong{font-size:18px}.stats-row small,.stats-row span{font-size:12px}.page-footer{padding:20px 18px;gap:10px;font-size:12px}.toast{bottom:16px;right:16px;font-size:12px}}
@media(max-width:380px){.topbar{gap:8px;padding-left:13px;padding-right:13px}.topbar-title{font-size:12px}.topbar-actions{gap:6px}.topbar-actions .btn{display:none}.page{padding:18px 13px 40px}.hero-copy{padding:26px 21px 0}.hero h1{font-size:29px}.hero-copy>p{font-size:15px}.hero-actions{gap:7px}.hero-actions .btn{font-size:12px;padding:10px 12px}.hero-art{min-height:240px}.hero-board{width:225px}.hero-square{font-size:22px}.eyebrow{font-size:12px}.section-head h2,.section-title{font-size:16px}.book-grid{gap:10px}.book-cover{padding:16px 12px}.book-title,.book-body h3{font-size:12px}.book-body{padding:12px 10px}.feature-grid,.content-grid{grid-template-columns:1fr}.feature-grid>.feature-card:last-child:nth-child(odd){grid-column:auto}.filter-grid{gap:8px}.select{font-size:12px;padding-left:10px}.stats-row{gap:12px}.stats-row>div{padding-right:12px}.stats-row span,.stats-row small{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}.btn:hover,.book-card:hover,.book-card:hover .book-cover img{transform:none}}
@media print{.sidebar,.topbar,.page-footer,.toast,.reader-toolbar,.hero-actions,.menu-backdrop{display:none!important}.main-area{margin:0;width:100%}.page{padding:0;max-width:none}.book-card,.panel,.feature-card{break-inside:avoid}.hero{min-height:0}.reader-stage{max-height:none;overflow:visible;padding:0;border:0;background:white}}

/* Readable Georgian type and touch targets across the core public pages. */
.book-cover .format-badge,.tag,.chip,.metadata-grid dt,.metadata-grid small{font-size:12px}
.book-body .book-description,.book-author{font-size:13px}
.toolbar label,.filter-grid label,.result-count,.breadcrumbs{font-size:12px}
.book-detail-content p,.page-heading>p,.library-heading>p{font-size:15px}
.reader-toolbar label,.form-group label,.admin-form label,.help{font-size:12px}
.reader-toolbar .btn,.reader-toolbar select,.reader-bookmarks .btn{font-size:13px;min-height:40px}
.stats-row span,.stats-row small{font-size:12px}
.topbar-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-actions :is(.appearance-link,.progress-link,.account-link){display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
.sidebar-close,.mobile-menu-tools{display:none}

@media(max-width:820px){
  .sidebar .sidebar-close{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:44px;min-height:44px;margin:0 0 10px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);font-size:13px;flex-shrink:0}
  .sidebar-close>span:last-child{font-size:24px;line-height:1}
}
@media(max-width:768px){
  .topbar{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;min-height:68px}
  .topbar-title{margin:0;font-size:13px}
  .topbar .topbar-actions>:not(.account-link){display:none}
  .topbar .menu-toggle,.topbar-actions .account-link{min-width:44px;min-height:44px}
  .sidebar .mobile-menu-tools{display:grid;gap:8px;margin:0 0 12px}
  .mobile-menu-action{display:flex;align-items:center;gap:10px;min-width:44px;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);font-size:13px;text-align:left;font-weight:600;line-height:1.6}
  .mobile-menu-action>span:first-child{width:24px;flex-shrink:0;text-align:center;font-size:20px;line-height:1}
  .mobile-menu-action:hover{background:var(--surface-alt)}
  .sidebar .nav-children .nav-item,.sidebar .admin-link{min-height:44px}
}

@media(max-width:640px){
  .topbar-actions .btn,.hero-actions .btn{font-size:14px;min-height:44px}
  .section-subtitle,.section-link{font-size:13px}
  .book-title,.book-body h3{font-size:14px}
  .book-body .btn{font-size:13px;min-height:40px}
  .feature-card h3{font-size:17px}
  .feature-card p{font-size:14px}
  .select,.search-input,.field{font-size:14px}
  .topbar-actions .progress-link{display:none}
}
@media(max-width:380px){
  .hero-actions .btn,.select,.book-title,.book-body h3{font-size:14px}
  .section-subtitle,.section-link,.book-author,.book-body .book-description,.book-body .btn{font-size:13px}
}

/* Feature cards: colourful sidebar icons on a neutral tile. */
.feature-icon.has-art{background:var(--surface-alt,#f1efe7);border:1px solid var(--border);font-size:0}
.feature-icon.has-art svg{width:22px;height:22px;fill:currentColor}

/* Player names: flag, FIDE title badge, name (public/js/player-name.js). */
.player-name{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%;vertical-align:middle}
.player-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-flag{flex:none;width:18px;height:13px;border-radius:2px;object-fit:cover;box-shadow:0 0 0 1px #0000002e}
.player-title{flex:none;font:700 11px/1 Arial,sans-serif;letter-spacing:.02em;padding:3px 4px;border-radius:3px;background:#b33a2f;color:#fff;text-decoration:none;cursor:help}
