@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 900;font-display:swap;src:url('/fonts/golos-text-vf.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/ibm-plex-mono-regular.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:italic;font-weight:400;font-display:swap;src:url('/fonts/ibm-plex-mono-italic.woff2') format('woff2')}
:root{color-scheme:dark;--bg:#111316;--panel:#1a1d21;--line:#303338;--muted:#94979e;--text:#f0f0f1;--lime:#c6ef80;--violet:#c1a3fa;font-family:'Golos Text',Arial,sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}a{color:inherit;text-decoration:none}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--lime);outline-offset:5px}[hidden]{display:none!important}.topbar{height:94px;max-width:1320px;margin:auto;padding:0 48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:30px}.brand{font-size:27px;font-weight:800;letter-spacing:-1px;display:flex;align-items:center}.brandmark{display:grid;place-items:center;background:var(--button-bg,var(--lime));color:#15191b;font-size:25px;width:37px;height:39px;border-radius:9px;transform:rotate(-7deg);margin-right:11px}.brand-dot{color:var(--lime)}nav{display:flex;align-self:stretch;gap:29px}.nav{background:none;border:0;border-bottom:2px solid transparent;color:var(--muted);font-size:14px;padding:0;white-space:nowrap}.nav.active{color:var(--lime);border-color:var(--lime)}.nav span{font-size:12px;background:var(--theme-surface-2a2d32,#2a2d32);padding:3px 6px;border-radius:5px;margin-left:5px}.help-button{display:flex;gap:9px;align-items:center;border:0;background:none;font-size:14px}.help-button span{border:1px solid var(--theme-border-777d85,#777d85);border-radius:50%;width:18px;height:18px;font-size:12px;display:grid;place-items:center}main{max-width:1224px;margin:0 auto;padding:46px 0 0}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:34px}.eyebrow{font-size:11px;letter-spacing:1.65px;color:var(--muted);font-weight:600}h1{font-size:35px;font-weight:600;letter-spacing:-1.2px;margin:13px 0 11px}h1 em{font-style:normal;color:var(--lime)}.intro p{color:var(--muted);font-size:15px;margin:0}.edition{border:1px solid var(--theme-border-3b4046,#3b4046);border-radius:9px;padding:12px 18px;transform:rotate(3deg);display:flex;flex-direction:column;gap:8px;text-align:center;font-size:17px}.edition-label{font-size:10px;letter-spacing:1.2px;color:var(--muted)}.edition i{font-style:normal;color:var(--lime);padding:0 8px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px}.roll-panel{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:radial-gradient(ellipse at 50% 38%,var(--theme-surface-272831,#272831) 0%,var(--theme-surface-1c1f23,#1c1f23) 63%)}.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:22px 25px;font-size:12px;color:var(--muted)}.daily-label{font-size:12px;letter-spacing:1.2px;font-weight:600;color:var(--theme-ink-e2e2e5,#e2e2e5)}.daily-label>span:last-child{color:var(--muted);margin-left:8px}.live-dot{display:inline-block;background:var(--button-bg,var(--lime));width:6px;height:6px;border-radius:50%;margin-right:7px}.roll-stage{text-align:center;padding:19px 30px 29px}.ready-tag{color:var(--theme-ink-b5a0d1,#b5a0d1);font-size:10px;letter-spacing:1.8px;font-weight:600;margin-bottom:22px}.tiles{display:flex;justify-content:center;gap:10px;margin:0 auto 29px;max-width:666px}.tile{position:relative;display:grid;place-items:center;flex:1;aspect-ratio:.88;border:1px solid var(--theme-border-5e626a,#5e626a);border-bottom:4px solid var(--theme-border-494b53,#494b53);max-width:98px;min-width:0;border-radius:10px;background:linear-gradient(150deg,var(--theme-surface-33363d,#33363d),var(--theme-surface-292c33,#292c33));font-weight:600;font-size:clamp(32px,4.5vw,55px);color:var(--theme-ink-f3f0e8,#f3f0e8);box-shadow:0 8px 14px var(--theme-shadow-11131860,#11131860);text-shadow:0 2px 0 var(--theme-shadow-0005,#0005)}.tile.ghost{color:var(--theme-ink-646771,#646771)}.tile:nth-child(2){transform:rotate(-3deg)}.tile:nth-child(5){transform:rotate(3deg)}.tile.revealed{background:#e9eddf;border-color:var(--theme-border-e9eddf,#e9eddf);border-bottom-color:var(--theme-border-9ba18f,#9ba18f);color:#22272b;text-shadow:none}.roll-stage h2{font-size:20px;letter-spacing:-.5px;font-weight:500;margin:0 0 10px}.roll-stage>p{font-size:13px;color:var(--muted);margin:0 0 23px}.roll-button{display:flex;justify-content:center;align-items:center;gap:13px;border:0;background:var(--button-bg,var(--lime));color:#1a2116;border-bottom:4px solid var(--theme-border-8ba657,#8ba657);border-radius:9px;min-height:55px;padding:12px 32px;font-size:16px;font-weight:700;margin:0 auto;min-width:276px;transition:transform .16s,background .16s}.roll-button:hover:not(:disabled){background:var(--button-hover-bg,#d8ffa0);transform:translateY(-2px)}.roll-button kbd{font:16px Arial;border:1px solid var(--theme-border-819c54,#819c54);border-radius:4px;padding:1px 5px;margin-left:22px}.dice-icon{font-size:23px;line-height:1}.roll-stage .roll-note{font-size:11px;margin:14px 0 0;color:var(--theme-ink-909397,#909397)}.reset-bar{background:var(--theme-surface-181b20,#181b20);display:flex;justify-content:space-between;gap:12px;padding:17px 24px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.reset-bar strong{font-variant-numeric:tabular-nums;color:var(--theme-ink-d7d9dd,#d7d9dd);font-weight:500;margin-left:7px}.clock-icon{font-size:17px;vertical-align:-1px;margin-right:5px}.stats-panel{border:1px solid var(--line);border-radius:15px;padding:24px;background:var(--theme-surface-1a1d21,#1a1d21)}.section-label{font-size:10px;letter-spacing:1.2px;color:var(--muted);display:flex;justify-content:space-between}.section-label>span{font-size:18px;color:var(--theme-ink-73797d,#73797d)}.total-stat{margin:30px 0 23px}.total-stat>span{color:var(--muted);font-size:13px}.total-stat strong{display:block;font-size:45px;letter-spacing:-1.5px;font-weight:600;margin-top:7px}.total-stat strong span{font-size:14px;letter-spacing:0;color:var(--lime);font-weight:500}.mini-stats{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:20px 0;gap:14px}.mini-stats>div{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:7px}.mini-stats>div+div{border-left:1px solid var(--line);padding-left:17px}.mini-stats strong{font-size:24px;font-weight:500}.mini-stats>div>span:last-child{grid-column:1/3;font-size:11px;color:var(--muted)}.stat-icon{color:var(--lime);font-size:24px}.stat-icon.purple{color:var(--violet)}.collection-progress{margin-top:22px}.collection-progress>div:first-child{display:flex;justify-content:space-between;font-size:11px}.collection-progress strong{font-weight:500;color:var(--muted)}.progress-track{height:5px;background:var(--theme-surface-34383e,#34383e);margin:13px 0;border-radius:5px;overflow:hidden}#progress-fill{background:var(--button-bg,var(--lime));height:100%;width:0;transition:width .5s}.collection-progress button{display:flex;justify-content:space-between;background:none;border:0;font-size:11px;color:var(--lime);padding:0;width:100%}.side-note{margin-top:28px;display:flex;align-items:center;gap:12px}.side-note>span{font-size:31px;color:var(--theme-ink-a29eaf,#a29eaf);border:1px dashed var(--theme-border-4c4b58,#4c4b58);border-radius:5px;padding:0 8px;transform:rotate(-9deg)}.side-note p{font-size:11px;color:var(--muted);line-height:1.7;margin:0}.side-note b{color:var(--theme-ink-c5c0d4,#c5c0d4)}.discover-section{margin-top:38px}.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:21px;gap:20px}.section-heading h2{font-size:23px;font-weight:500;letter-spacing:-.5px;margin:8px 0 0}.text-button{background:none;border:0;padding:0;color:var(--muted);font-size:12px}.text-button span{margin-left:10px}.badge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.badge-card{position:relative;background:var(--theme-surface-1a1d21,#1a1d21);border:1px solid var(--line);border-radius:11px;padding:21px;min-height:221px;transition:border-color .2s}.badge-card:hover{border-color:var(--theme-border-656977,#656977)}.badge-art{font-family:Georgia,serif;color:var(--theme-ink-b6c2b2,#b6c2b2);font-size:24px;font-weight:bold;letter-spacing:-2px;margin:0 0 16px;min-height:37px;display:flex;align-items:center}.badge-art.violet{color:var(--violet)}.badge-art.blue{color:var(--theme-ink-9cadff,#9cadff);font-size:22px}.badge-art.gold{color:var(--theme-ink-e6c68a,#e6c68a);font-size:20px;letter-spacing:-3px}.rarity{font-size:10px;font-weight:500;letter-spacing:1px;text-transform:uppercase}.trash{--rarity-color:var(--theme-ink-8b9298,#8b9298);color:var(--rarity-color)}.common{--rarity-color:var(--theme-ink-e2e5e8,#e2e5e8);color:var(--rarity-color)}.uncommon{--rarity-color:var(--theme-ink-c6ef80,#c6ef80);color:var(--rarity-color)}.rare{--rarity-color:var(--theme-ink-7dc6f7,#7dc6f7);color:var(--rarity-color)}.epic{--rarity-color:var(--theme-ink-b59af5,#b59af5);color:var(--rarity-color)}.mythic{--rarity-color:var(--theme-ink-ed9dba,#ed9dba);color:var(--rarity-color)}.anomaly{--rarity-color:var(--theme-ink-e5c075,#e5c075);color:var(--rarity-color)}.badge-card h3{font-size:15px;margin:9px 0 7px;font-weight:500}.badge-card p{font-size:12px;line-height:1.65;color:var(--muted);margin:0 0 20px;min-height:20px}.badge-card>strong{font-size:15px;font-weight:500}.badge-card>strong span{font-size:10px;color:var(--muted);margin-left:3px}.rarity-strip{display:flex;align-items:center;justify-content:space-between;margin:33px 0 31px;padding:19px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);gap:20px}.rarity-strip>span{font-size:9px;letter-spacing:1.3px;color:var(--muted)}.rarity-strip>div{display:flex;gap:27px}.rarity-strip .rarity{font-size:10px;text-transform:none;letter-spacing:0}footer{max-width:1224px;margin:0 auto;padding-bottom:25px;display:flex;justify-content:space-between;gap:20px;font-size:11px;color:var(--theme-ink-94979e,#94979e)}.footer-brand{font-weight:700;color:var(--theme-ink-d4d5d7,#d4d5d7);font-size:15px}.muted{color:var(--muted)}footer a:hover{color:var(--lime)}dialog{position:fixed;inset:0;margin:auto;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;color:var(--text);background:var(--theme-surface-1b1e23,#1b1e23);border:1px solid var(--theme-border-4b515a,#4b515a);border-radius:18px;max-width:600px;width:calc(100% - 32px);padding:36px;line-height:1.7}dialog::backdrop{background:var(--theme-surface-08090dc9,#08090dc9);backdrop-filter:blur(6px)}dialog h2{font-size:26px;line-height:1.3}dialog ol{padding-left:22px}dialog li{margin:15px 0}dialog p{font-size:14px;color:var(--theme-ink-b4b8bf,#b4b8bf)}dialog a{text-decoration:underline;color:var(--lime)}.dialog-close{position:absolute;right:16px;top:10px;background:none;border:0;font-size:28px;color:var(--muted)}.dialog-done{margin-top:25px;min-width:0;width:100%}.filters{display:flex;gap:14px;align-items:center;margin:25px 0}.filters input[type=search],.filters select{padding:13px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--text)}.filters input[type=search]{flex:1}.filters label{font-size:14px;color:var(--theme-ink-b8bec6,#b8bec6);display:flex;gap:9px;align-items:center}.filters input[type=checkbox]{accent-color:var(--lime);width:16px;height:16px}.unlocked-mark{position:absolute;top:18px;right:18px;color:var(--lime);font-size:11px}.badge-card.locked{opacity:.73}.empty{padding:70px 25px;text-align:center;border:1px dashed var(--theme-border-3a4046,#3a4046);border-radius:12px;color:var(--muted);grid-column:1/-1}.empty h3{color:var(--text)}.history-row{display:flex;align-items:center;gap:24px;padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:10px;margin-bottom:12px}.history-row strong{font-size:25px;letter-spacing:6px}.history-row .history-date{font-size:13px;color:var(--muted)}.history-row .history-score{margin-left:auto;text-align:right;font-size:19px}.history-row small{font-size:12px;color:var(--muted);display:block;margin-top:8px;letter-spacing:0}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:13px 24px;background:var(--button-bg,var(--lime));color:#151915;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:5}#toast.visible{opacity:1}#game-error{color:var(--theme-ink-ffb7ba,#ffb7ba);line-height:1.6;margin-top:18px}.result-score{font-size:30px;color:var(--rarity-color,var(--lime));font-weight:600}.result-score span{font-size:13px}.result-detail{margin-top:8px;color:var(--muted);font-size:13px}.roll-stage.complete .tiles{margin-bottom:20px}.roll-stage.complete .roll-button{min-height:44px;min-width:220px;font-size:14px;margin-top:20px;background:var(--theme-surface-30372c,#30372c);color:var(--lime);border:1px solid var(--theme-border-586344,#586344)}.roll-stage.complete #result-summary{margin:17px 0 0}.tile.rolling{animation:rattle .18s infinite alternate}@keyframes rattle{from{transform:translateY(-3px) rotate(-2deg)}to{transform:translateY(2px) rotate(2deg)}}@media(min-width:1500px){main{padding-top:56px}.intro{margin-bottom:40px}.roll-stage{padding-top:27px;padding-bottom:35px}.discover-section{margin-top:43px}}@media(max-width:1320px){main,footer{margin-left:48px;margin-right:48px}}@media(max-width:1050px){.topbar{padding:0 28px;gap:18px}.brand{font-size:23px}nav{gap:20px}.help-button{font-size:0}.help-button span{font-size:12px}main,footer{margin-left:28px;margin-right:28px}.game-layout{grid-template-columns:minmax(0,1fr) 255px;gap:16px}.roll-stage{padding-left:22px;padding-right:22px}.tiles{gap:7px}.reset-bar{flex-wrap:wrap;justify-content:center;padding:12px}.stats-panel{padding:20px}.edition{display:none}.rarity-strip{flex-direction:column;gap:17px}.badge-card{padding:18px}.roll-stage>p{line-height:1.6}}@media(max-width:760px){.topbar{height:auto;min-height:78px;flex-wrap:wrap;padding:18px 20px 0;gap:15px}.brand{font-size:24px}.brandmark{height:33px;width:31px;font-size:22px}.help-button{margin-left:auto;order:1;font-size:12px}nav{order:2;width:100%;justify-content:space-between;gap:10px;height:45px}.nav{font-size:13px}.nav span{font-size:10px}main{padding-top:30px}main,footer{margin-left:20px;margin-right:20px}.intro{margin-bottom:26px}h1{font-size:28px;line-height:1.25;letter-spacing:-.8px;max-width:350px}.intro p{font-size:13px;line-height:1.6}.eyebrow{font-size:10px;letter-spacing:1.2px}.game-layout{grid-template-columns:1fr}.panel-heading{padding:18px;font-size:11px}.roll-stage{padding:18px 16px 25px}.ready-tag{font-size:9px}.tiles{gap:6px}.tile{font-size:clamp(29px,9vw,50px);border-radius:7px}.roll-stage h2{font-size:18px}.roll-stage>p{font-size:12px}.roll-button{min-width:250px}.stats-panel{display:grid;grid-template-columns:1fr 1fr;padding:20px;gap:15px 23px}.section-label{grid-column:1/-1}.total-stat{margin:0}.total-stat strong{font-size:34px}.mini-stats{border:0;padding:0}.collection-progress{grid-column:1/-1;margin:0}.side-note{display:none}.badge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.badge-card{padding:17px;min-height:230px}.badge-card p{font-size:12px;min-height:40px}.badge-art{font-size:23px}.badge-art.gold{font-size:18px}.section-heading h2{font-size:21px}.section-heading .eyebrow{font-size:9px}.text-button{font-size:11px;white-space:nowrap}.rarity-strip>div{gap:14px;flex-wrap:wrap;justify-content:center}.rarity-strip .rarity{font-size:10px}footer{flex-wrap:wrap;line-height:1.5;gap:14px}footer>span:last-child{width:100%}.filters{flex-wrap:wrap}.filters input[type=search]{width:100%;flex-basis:100%}.filters select{flex:1}.history-row{gap:14px;flex-wrap:wrap;padding:18px}.history-row strong{font-size:21px;letter-spacing:3px}.history-row .history-date{width:100%}dialog{padding:28px 22px}dialog h2{font-size:24px}.reset-bar{font-size:10px}.discover-section{margin-top:30px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.badge-translation{display:block;color:var(--theme-ink-9898a4,#9898a4);font-size:12px;margin-top:14px;line-height:1.5}.badge-card .badge-art{letter-spacing:-1px}.badge-card:has(.unlocked-mark){padding-top:44px}#result-summary{order:0}#collection-count{font-size:14px;color:var(--muted)}
/* Keep regular game text legible; reserve smaller type for metadata. */
.eyebrow,.edition-label,.daily-label,.panel-heading,.ready-tag,.roll-stage .roll-note,.reset-bar,.section-label,.mini-stats>div>span:last-child,.side-note p,.rarity,.rarity-strip>span,.rarity-strip .rarity,footer,.unlocked-mark{font-size:12px}.roll-stage>p,.total-stat>span,.collection-progress>div:first-child,.collection-progress button,.text-button,.badge-card p{font-size:14px}.badge-card>strong span{font-size:12px}.badge-card{min-height:244px}.badge-card p{min-height:46px}.section-label{line-height:1.5;letter-spacing:.7px}.collection-progress>div:first-child{gap:10px}.side-note{margin-top:22px}.stats-panel{display:flex;flex-direction:column}.total-stat{margin:24px 0}.rarity-strip>div{flex-wrap:wrap;justify-content:center}.badge-art{overflow-wrap:anywhere}@media(max-width:760px){.stats-panel{display:grid}.total-stat{margin:0}.mini-stats>div>span:last-child,.reset-bar,.section-heading .eyebrow{font-size:12px}.text-button{font-size:12px}.section-heading{align-items:start}.badge-card p{font-size:14px}.roll-stage>p{font-size:14px}.rarity-strip .rarity{font-size:12px}.tile{aspect-ratio:.78}.collection-progress{margin-top:8px}.badge-card{min-height:258px}.badge-card h3{line-height:1.4}.unlocked-mark{font-size:10px}.filters label{font-size:13px}}
/* Development controls and Russian discoveries. */
footer{margin-top:34px;padding-top:23px;border-top:1px solid var(--line)}
.copy-button{display:block;margin:14px auto 0;color:var(--lime);padding:5px 12px}
.badge-card .badge-detail{min-height:0;color:var(--lime);font-size:13px;line-height:1.7;margin:14px 0 0}
.tile.silent-letter{text-decoration:underline dotted #82708f;text-underline-offset:9px;text-decoration-thickness:3px}
.roll-stage.complete .roll-button{background:var(--button-bg,var(--lime));color:#1a2116;border:0;border-bottom:4px solid var(--theme-border-8ba657,#8ba657);min-height:52px;min-width:250px}
.reset-bar #reset-label{color:var(--lime);letter-spacing:.6px}
.badge-translation{overflow-wrap:anywhere}
/* Letter reels, staggered discoveries, and hidden-word cards. */
.tiles{perspective:900px}
.tile.spinning{overflow:hidden;transform:rotate(0);transform-origin:50% 65%;will-change:transform;border-color:var(--theme-border-7d8b63,#7d8b63);color:var(--lime);box-shadow:var(--tile-spin-shadow,0 0 25px #c6ef8010,inset 0 1px 0 #ffffff12)}
.reel-window{height:1.25em;width:100%;overflow:hidden;position:relative;mask-image:linear-gradient(transparent,#000 18%,#000 82%,transparent)}
.letter-reel{display:flex;flex-direction:column;width:100%;will-change:transform}
.reel-glyph{display:block;flex:none;height:1.25em;line-height:1.25;text-align:center;font-weight:600}

.is-rolling .dice-icon{display:inline-block;animation:dice-turn 1.1s ease-in-out infinite}
@keyframes dice-turn{to{transform:rotate(180deg)}}
#badge-cards{transition:opacity .2s ease}
#badge-cards.awaiting-roll{opacity:.22;pointer-events:none}
.tile.word-match{border-color:var(--word-accent);box-shadow:0 0 0 2px var(--word-accent),0 0 25px color-mix(in srgb,var(--word-accent) 21%,transparent);transition:box-shadow .22s,border-color .22s}
.word-section{margin-top:34px}
.word-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.word-card{position:relative;overflow:hidden;min-width:0;text-align:left;background:linear-gradient(135deg,var(--theme-surface-242b22,#242b22),var(--theme-surface-1b201d,#1b201d));border:1px solid var(--theme-border-424b38,#424b38);border-radius:12px;padding:20px;isolation:isolate;transition:border-color .2s,background .2s,box-shadow .2s}
.word-card:hover,.word-card:focus-visible{border-color:var(--lime);background:linear-gradient(135deg,var(--theme-surface-2d3824,#2d3824),var(--theme-surface-20291d,#20291d));box-shadow:0 8px 28px var(--theme-shadow-0002,#0002)}
.word-card strong{display:block;color:var(--theme-ink-d5f6a5,#d5f6a5);font-size:28px;letter-spacing:2px;font-weight:600;margin-bottom:18px;overflow-wrap:anywhere}
.word-card-meta{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:12px;color:var(--theme-ink-a7b29f,#a7b29f)}
.word-slots{display:flex;gap:3px}
.word-slots i{display:block;width:7px;height:7px;border-radius:2px;background:var(--theme-surface-40483c,#40483c)}
.word-slots i.matched{background:var(--button-bg,var(--lime))}
.word-empty{padding:20px 0;margin:0;color:var(--muted);font-size:14px;border-top:1px solid var(--line)}
#word-count{font-size:14px}
#badge-cards .badge-card{overflow:hidden;isolation:isolate;transform-origin:50% 85%}
.card-sheen{position:absolute;inset:-25% auto -25% 0;width:40%;pointer-events:none;opacity:0;background:linear-gradient(90deg,transparent,#dfffb124,transparent);z-index:2}
#badge-cards .badge-card:has(.rarity.anomaly){border-color:var(--theme-border-665639,#665639);background:linear-gradient(140deg,var(--theme-surface-30291d,#30291d),var(--theme-surface-1c1e21,#1c1e21) 65%)}
#badge-cards .badge-card:has(.rarity.epic),#badge-cards .badge-card:has(.rarity.mythic){border-color:var(--theme-border-524160,#524160);background:linear-gradient(140deg,var(--theme-surface-292332,#292332),var(--theme-surface-1c1e21,#1c1e21) 65%)}
@media(max-width:760px){.word-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.word-card{padding:16px}.word-card strong{font-size:23px;letter-spacing:1px}.word-card-meta{flex-wrap:wrap}.word-section{margin-top:28px}}
@media(prefers-reduced-motion:reduce){.letter-reel{will-change:auto}.word-card,.tile.word-match,#badge-cards{transition:none}.is-rolling .dice-icon{animation:none}}
/* Full-width badge rows, with descriptions and rewards only. */
.badge-grid{grid-template-columns:minmax(0,1fr);gap:10px}
.badge-card,.badge-card:has(.unlocked-mark){display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;column-gap:22px;row-gap:6px;align-items:start;min-height:0;padding:21px 24px}
.badge-card>.rarity{grid-column:1;grid-row:1}
.badge-card>h3{grid-column:1;grid-row:2;margin:0;font-size:16px;line-height:1.5;transform-origin:left center}
.badge-card>p{grid-column:1;grid-row:3;min-height:0;margin:0;font-size:14px;line-height:1.6}
.badge-card>strong{grid-column:2;grid-row:2;align-self:center;white-space:nowrap;color:var(--lime);font-size:18px;font-variant-numeric:tabular-nums}
.badge-card>.badge-translation{grid-column:1;grid-row:4;margin:0;font-size:12px;line-height:1.5}
.badge-card>.badge-detail{grid-column:1;grid-row:5;margin:6px 0 0;min-height:0}
.badge-card>.unlocked-mark{position:static;grid-column:2;grid-row:1;text-align:right;font-size:10px;line-height:1.5}
.badge-card .card-sheen{width:25%}
@media(max-width:760px){.badge-card,.badge-card:has(.unlocked-mark){grid-template-columns:minmax(0,1fr);padding:18px 16px;row-gap:6px}.badge-card>h3{font-size:15px}.badge-card>p{font-size:13px}.badge-card>strong{grid-column:1;grid-row:6;font-size:17px;margin-top:7px}.badge-card>.unlocked-mark{grid-column:1;grid-row:7;text-align:left;margin-top:4px}.badge-card>.badge-detail{font-size:13px}.badge-card>.badge-translation{font-size:12px}}
.reveal-concealed{visibility:hidden}
#word-section{transition:opacity .2s ease}
#word-section.awaiting-roll{opacity:.22;pointer-events:none}

/* Each badge carries the actual roll that earned it. Matching groups cycle together. */
.badge-card>.mini-roll{grid-column:1/-1;grid-row:8;display:flex;gap:5px;border-top:1px solid var(--theme-border-ffffff0d,#ffffff0d);padding-top:13px;margin-top:6px}
.mini-tile{display:grid;place-items:center;width:28px;height:31px;border-radius:5px;background:var(--theme-surface-2a2d33,#2a2d33);border:1px solid var(--theme-border-3b3f46,#3b3f46);color:var(--theme-ink-767d88,#767d88);font-size:14px;font-weight:600;transition:background .35s,color .35s,box-shadow .35s,transform .35s}
.mini-tile.relevant{color:var(--theme-ink-bfc9b4,#bfc9b4);border-color:var(--theme-border-56604c,#56604c)}
.mini-tile.lit{background:#c6ef80;border-color:var(--theme-border-d4f5a0,#d4f5a0);color:#202a19;box-shadow:0 0 13px #c6ef8020;transform:translateY(-2px)}
.mini-roll-empty .mini-tile{color:var(--theme-ink-60666e,#60666e);border-style:dashed;background:var(--theme-surface-202329,#202329)}
@media(prefers-reduced-motion:reduce){.mini-tile{transition:none}.mini-tile.relevant{background:#c6ef80;border-color:var(--theme-border-d4f5a0,#d4f5a0);color:#202a19;transform:none;box-shadow:none}}



#word-cards .word-card,#badge-cards .badge-card{transform-origin:50% 80%}
/* Minimal daily roll, with statistics on the history page. */
#daily-page>.roll-stage{max-width:650px;margin:8px auto 42px;padding:28px 12px 0;background:none;border:0;overflow:visible}
#daily-page .ready-tag{min-height:17px;margin-bottom:26px;font-size:12px;letter-spacing:2px}
#daily-page #roll-status.rarity{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 22px;border:1px solid var(--rarity-color);border-radius:0;font-size:20px;font-weight:600;line-height:1.2;letter-spacing:2px}
#daily-page #roll-status:has(+ #roll-percentile:not([hidden])){margin-bottom:10px}
#daily-page .roll-percentile{width:fit-content;margin:0 auto 25px;padding:4px 10px;background:color-mix(in srgb,var(--rarity-color) 8%,transparent);border:1px solid color-mix(in srgb,var(--rarity-color) 28%,transparent);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:.035em;font-variant-numeric:tabular-nums}
#daily-page .roll-percentile[hidden],#daily-page .roll-stage.pre-roll #roll-percentile{display:none!important}
#daily-page .tiles{margin-bottom:26px;gap:10px}
#daily-page .tile{transform:none;max-width:88px;font-size:48px}
#daily-page #result-summary{margin:0}
#daily-page .roll-word-count{margin-bottom:18px;color:var(--muted);font-size:13px;line-height:1.5}
#daily-page .result-score{font-size:38px;font-variant-numeric:tabular-nums;letter-spacing:-1px}
#daily-page .result-score span{font-size:16px;letter-spacing:0}
.daily-total{display:flex;flex-direction:column;gap:5px;margin:17px 0 25px;color:var(--muted);font-size:12px}
.daily-total strong{font-size:21px;font-weight:500;color:var(--theme-ink-dddfe2,#dddfe2);font-variant-numeric:tabular-nums}
.daily-total strong span{font-size:12px;color:var(--muted)}
#daily-page .roll-button{margin:0 auto;min-width:240px;min-height:50px}
#daily-page .roll-stage.complete .daily-total[hidden]~.roll-action-slot{margin-top:24px}
#daily-page .next-roll{display:flex;align-items:center;justify-content:center;gap:10px;min-height:50px;margin:0;color:var(--muted);font-size:14px;line-height:1.4}
#daily-page .next-roll>strong{color:var(--lime);font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:.5px;white-space:nowrap}
#daily-page .copy-button{margin-top:12px}
#skip-reveal{color:var(--theme-ink-c9cdd3,#c9cdd3)}
#history-page>.stats-panel{display:grid;grid-template-columns:1fr 1fr 1fr;gap:24px;margin-bottom:38px;padding:26px}
#history-page .section-label{grid-column:1/-1;color:var(--text);font-size:23px;font-weight:500;letter-spacing:-.5px}
#history-page .total-stat{margin:0}
#history-page .mini-stats{border:0;padding:0}
#history-page .collection-progress{margin:0}
#word-cards{grid-template-columns:minmax(0,1fr);overflow-anchor:none}
#badge-cards{overflow-anchor:none}
#word-cards .word-card{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px 24px;padding:18px 22px}
#word-cards .word-card strong{grid-column:1;grid-row:1;margin:0;font-size:26px}
#word-cards .word-card-meta{grid-column:2;grid-row:1;gap:20px}
@media(max-width:760px){main{padding-top:20px}#daily-page>.roll-stage{margin-top:0;padding:20px 0 0}#daily-page .tiles{gap:6px}#daily-page .tile{font-size:clamp(25px,8vw,48px);aspect-ratio:.88}#history-page>.stats-panel{grid-template-columns:1fr 1fr;padding:20px;gap:20px}#history-page .collection-progress{grid-column:1/-1}#word-cards .word-card{padding:16px;gap:7px 15px}#word-cards .word-card-meta{flex-direction:column;gap:9px;align-items:flex-end}}

/* Keep the active discovery in view, with persistent reveal controls. */
.is-presenting .word-card{transition:border-color .3s,box-shadow .3s}
.is-presenting .badge-card{transition:border-color .28s ease,box-shadow .28s ease}
#word-cards .word-card.reveal-current,#badge-cards .badge-card.reveal-current{border-color:var(--lime);box-shadow:0 0 0 1px #c6ef8050,0 8px 35px #c6ef8012}

/* Animate real section height so following content travels with the fold. */
#word-cards.section-transition,#badge-cards.section-transition{overflow:hidden;overflow:clip;will-change:height,opacity;pointer-events:none}

/* Compact badge rows: keep rewards alongside the title at every screen width. */
.badge-card,.badge-card:has(.unlocked-mark){grid-template-columns:minmax(0,1fr) auto;grid-template-rows:none;padding:13px 17px;column-gap:16px;row-gap:3px}
.badge-card>h3{font-size:15px;line-height:1.35}
.badge-card>p{grid-column:1/-1;font-size:13px;line-height:1.5}
.badge-card>strong{grid-column:2;grid-row:2;margin:0;font-size:16px;align-self:center}
.badge-card>.badge-translation{grid-column:1/-1;grid-row:4;font-size:11px;line-height:1.4}
.badge-card>.badge-detail{grid-column:1/-1;grid-row:5;font-size:12px;line-height:1.4;margin:2px 0 0}
.badge-card>.mini-roll{grid-row:6;padding-top:8px;margin-top:4px;gap:4px}
.badge-card>.unlocked-mark{grid-column:2;grid-row:1;text-align:right;margin:0;font-size:9px}
.mini-tile{width:25px;height:27px;font-size:12px}
.tile.revealed{transition:background .18s,border-color .18s,color .18s}
#tiles .tile{user-select:none;-webkit-user-select:none}
@media(max-width:480px){.badge-card,.badge-card:has(.unlocked-mark){padding:12px 14px;column-gap:10px}.badge-card>h3{font-size:14px}.badge-card>strong{font-size:15px}.badge-card>.unlocked-mark{font-size:8px}}

/* Reserve the start screen's height so the footer divider stays put as the roll begins. */
#daily-page{--daily-floor:max(calc(100svh - 220px),380px);min-height:var(--daily-floor)}
#daily-page>.roll-stage{min-height:0;transition:min-height .42s cubic-bezier(.22,1,.36,1),padding .42s cubic-bezier(.22,1,.36,1)}
#daily-page .roll-stage.pre-roll{min-height:var(--daily-floor);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 12px 70px;margin:0 auto}
.pre-roll-brand{display:none;flex-direction:column;align-items:center;gap:18px;margin-bottom:34px}
#daily-page .roll-stage.pre-roll .pre-roll-brand{display:flex}
.pre-roll-icon{display:grid;place-items:center;width:94px;height:98px;border-radius:22px;background:var(--button-bg,var(--lime));color:#15191b;font-size:67px;font-weight:800;line-height:1;box-shadow:0 18px 55px #c6ef8025;transform:rotate(-7deg)}
#daily-page .roll-stage.pre-roll .pre-roll-icon{animation:pre-roll-breathe 2.75s ease-in-out infinite;transform-origin:center}
#daily-page .roll-stage.pre-roll.is-rolling .pre-roll-icon{animation-play-state:paused}
@keyframes pre-roll-breathe{0%,100%{transform:rotate(-7deg) scale(1)}50%{transform:rotate(-7deg) scale(1.06)}}
.pre-roll-brand h1{margin:0;color:var(--text);font-size:clamp(38px,7vw,60px);font-weight:800;letter-spacing:-2.5px}
#daily-page .roll-stage.pre-roll .ready-tag,#daily-page .roll-stage.pre-roll .tiles,#daily-page .roll-stage.pre-roll #result-summary,#daily-page .roll-stage.pre-roll .daily-total,#daily-page .roll-stage.pre-roll #copy-button{display:none!important}
#daily-page .roll-stage.pre-roll:not(.is-rolling) #reveal-actions{display:none!important}
#daily-page .roll-stage.pre-roll .roll-button{min-width:240px}
.roll-action-slot{display:grid;width:fit-content;max-width:100%;margin:0 auto}
.roll-action-slot>#roll-loading,.roll-action-slot>#roll-button{grid-area:1/1;align-self:center;justify-self:center}
#daily-page .roll-stage.is-initial-loading #roll-button{visibility:hidden;pointer-events:none}
.roll-action-slot.is-loading-out #roll-loading{pointer-events:none;animation:roll-loading-exit .22s ease-out both}
.roll-action-slot.is-loading-out #roll-button{animation:roll-button-enter .36s cubic-bezier(.22,1,.36,1) .08s both}
@keyframes roll-loading-exit{to{opacity:0;transform:translateY(-4px)}}
@keyframes roll-button-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.roll-loading{display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px}
.roll-loading span{width:12px;height:12px;background:var(--lime);animation:roll-loading-wave 1.2s ease-in-out infinite both;animation-delay:-.4s}
.roll-loading span:nth-child(2){animation-delay:-.2s}
.roll-loading span:nth-child(3){animation-delay:0s}
@keyframes roll-loading-wave{0%,100%{opacity:.18;transform:translateY(3px)}50%{opacity:1;transform:translateY(-4px)}}
@media(prefers-reduced-motion:reduce){.roll-loading span{animation:none;opacity:.65}.roll-action-slot.is-loading-out #roll-button{animation:none}.roll-action-slot.is-loading-out #roll-loading{animation:none;visibility:hidden}}
#daily-page .roll-stage:not(.pre-roll) .pre-roll-brand{display:none}
@media(max-width:760px){#daily-page{--daily-floor:max(calc(100svh - 170px),330px)}#daily-page .roll-stage.pre-roll{padding-bottom:45px}.pre-roll-icon{width:78px;height:82px;font-size:57px}}
@media(max-height:500px) and (orientation:landscape){
  #daily-page{--daily-floor:max(calc(100svh - 154px),180px)}
  #daily-page .roll-stage.pre-roll{padding:12px 12px 18px}
  #daily-page .roll-stage.pre-roll .pre-roll-brand{gap:10px;margin-bottom:16px}
  #daily-page .roll-stage.pre-roll .pre-roll-icon{width:52px;height:56px;border-radius:14px;font-size:40px}
  #daily-page .roll-stage.pre-roll .pre-roll-brand h1{font-size:32px;letter-spacing:-1.4px}
}
@media(prefers-reduced-motion:reduce){#daily-page>.roll-stage{transition:none}#daily-page .roll-stage.pre-roll .pre-roll-icon{animation:none}}

/* During the staged roll, show the reels, new discoveries, and Skip only. */
#daily-page .roll-stage.is-rolling #roll-status,
#daily-page .roll-stage.is-rolling #roll-percentile,
#daily-page .roll-stage.is-rolling #roll-transcription,
#daily-page .roll-stage.is-rolling #result-summary,
#daily-page .roll-stage.is-rolling .daily-total,
#daily-page .roll-stage.is-rolling .roll-action-slot,
#daily-page .roll-stage.is-rolling #roll-button,
#daily-page .roll-stage.is-rolling #next-roll,
#daily-page .roll-stage.is-rolling #copy-button,
#daily-page:has(.roll-stage.is-rolling) #all-badges{display:none!important}
#daily-page .roll-stage.is-rolling .tiles{margin-bottom:12px}
@keyframes skip-appear{from{opacity:0;transform:translateY(9px) scale(.96);filter:blur(3px)}to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}
#skip-reveal:not([hidden]){animation:skip-appear .34s cubic-bezier(.16,1,.3,1) both}

/* Bring the real score and controls back after the last reveal. */
@keyframes result-appear{from{opacity:0;transform:translateY(9px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
#daily-page .roll-stage.result-ready #roll-status,
#daily-page .roll-stage.result-ready #roll-percentile,
#daily-page .roll-stage.result-ready #roll-transcription,
#daily-page .roll-stage.result-ready #result-summary,
#daily-page .roll-stage.result-ready .daily-total,
#daily-page .roll-stage.result-ready #roll-button,
#daily-page .roll-stage.result-ready #next-roll,
#daily-page .roll-stage.result-ready #copy-button{animation:result-appear .56s cubic-bezier(.16,1,.3,1) backwards}
#daily-page .roll-stage.result-ready #result-summary{animation-delay:.08s}
#daily-page .roll-stage.result-ready #roll-percentile{animation-delay:.02s}
#daily-page .roll-stage.result-ready #roll-transcription{animation-delay:.04s}
#daily-page .roll-stage.result-ready .daily-total{animation-delay:.16s}
#daily-page .roll-stage.result-ready #roll-button{animation-delay:.23s}
#daily-page .roll-stage.result-ready #next-roll{animation-delay:.23s}
#daily-page .roll-stage.result-ready #copy-button{animation-delay:.29s}
@keyframes total-counting{0%{color:var(--theme-ink-dddfe2,#dddfe2);transform:translateY(3px);text-shadow:none}35%{color:var(--lime);transform:translateY(-2px);text-shadow:0 0 18px #c6ef8040}100%{color:var(--theme-ink-dddfe2,#dddfe2);transform:translateY(0);text-shadow:none}}
.daily-total strong.counting{animation:total-counting .95s ease-out both}

/* Matching word letters fill with color; the whole section swaps beneath badges. */
#daily-page .tile.revealed{transition:background-color .28s,border-color .28s,box-shadow .28s,color .28s}
#daily-page .tile.revealed.word-match{background:var(--word-accent);border-color:color-mix(in srgb,var(--word-accent) 75%,white);border-bottom-color:var(--word-border);color:#1b2028;box-shadow:0 0 0 2px color-mix(in srgb,var(--word-accent) 50%,transparent),0 0 28px color-mix(in srgb,var(--word-accent) 44%,transparent);animation:word-tile-glow .45s ease-in-out 2}

@keyframes word-tile-glow{50%{box-shadow:0 0 0 3px color-mix(in srgb,var(--word-accent) 66%,transparent),0 0 38px color-mix(in srgb,var(--word-accent) 60%,transparent)}}
#daily-page.is-presenting,#daily-page.is-refocusing{overflow-anchor:none}

/* Keep the badge destination out of view until every word has appeared. */
body:has(#daily-page.is-revealing-words) .nav[data-page="collection"]{visibility:hidden;pointer-events:none}
#daily-page.is-revealing-words .discover-section{display:none!important}

/* Each badge's active outline, points, sheen, and mini-roll use its rarity color. */
.badge-card{--badge-accent:var(--theme-ink-c6ef80,#c6ef80)}
.badge-card.rarity-trash{--badge-accent:var(--theme-ink-a5adb8,#a5adb8)}
.badge-card.rarity-common{--badge-accent:var(--theme-ink-e2e5e8,#e2e5e8)}
.badge-card.rarity-uncommon{--badge-accent:var(--theme-ink-c6ef80,#c6ef80)}
.badge-card.rarity-rare{--badge-accent:var(--theme-ink-79cafa,#79cafa)}
.badge-card.rarity-epic{--badge-accent:var(--theme-ink-ad91f7,#ad91f7)}
.badge-card.rarity-mythic{--badge-accent:var(--theme-ink-f0a0bf,#f0a0bf)}
.badge-card.rarity-anomaly{--badge-accent:var(--theme-ink-e7c579,#e7c579)}
.badge-card .rarity.common{color:var(--theme-ink-e2e5e8,#e2e5e8)}
.badge-card .rarity.uncommon{color:var(--theme-ink-c6ef80,#c6ef80)}
.badge-card>strong{color:var(--badge-accent)}
.badge-card>strong .badge-multiplier{font-size:inherit;color:inherit;margin:0;letter-spacing:0}
.badge-card .mini-tile.relevant{border-color:color-mix(in srgb,var(--badge-accent) 48%,var(--theme-border-3b3f46,#3b3f46));color:var(--badge-accent)}
.badge-card .mini-tile.lit{background:var(--badge-accent);border-color:var(--badge-accent);color:#192019;box-shadow:0 0 15px color-mix(in srgb,var(--badge-accent) 38%,transparent)}
#badge-cards .badge-card.reveal-current{border-color:var(--badge-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--badge-accent) 38%,transparent),0 8px 35px color-mix(in srgb,var(--badge-accent) 14%,transparent)}
#badge-cards .badge-card .card-sheen{background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--badge-accent) 24%,transparent),transparent)}

/* Hidden word cards move from cool to warm hues as their length grows. */
#word-cards .word-card,#tiles{--word-accent:var(--theme-ink-9de4c8,#9de4c8);--word-bg:var(--theme-surface-1b302a,#1b302a);--word-border:var(--theme-border-436b5a,#436b5a)}
#word-cards .word-card.word-length-3,#tiles[data-word-length="3"]{--word-accent:var(--theme-ink-97d2fb,#97d2fb);--word-bg:var(--theme-surface-1c2c3b,#1c2c3b);--word-border:var(--theme-border-426482,#426482)}
#word-cards .word-card.word-length-4,#tiles[data-word-length="4"]{--word-accent:var(--theme-ink-cbb8ff,#cbb8ff);--word-bg:var(--theme-surface-2b2540,#2b2540);--word-border:var(--theme-border-625080,#625080)}
#word-cards .word-card.word-length-5,#tiles[data-word-length="5"]{--word-accent:var(--theme-ink-f2add4,#f2add4);--word-bg:var(--theme-surface-392638,#392638);--word-border:var(--theme-border-80516e,#80516e)}
#word-cards .word-card.word-length-6,#tiles[data-word-length="6"]{--word-accent:var(--theme-ink-f1d08d,#f1d08d);--word-bg:var(--theme-surface-382e21,#382e21);--word-border:var(--theme-border-806947,#806947)}
#word-cards .word-card{background:linear-gradient(110deg,var(--word-bg),var(--theme-surface-1b1e23,#1b1e23) 78%);border-color:var(--word-border)}
#word-cards .word-card strong{color:var(--word-accent)}
#word-cards .word-card .word-card-meta{color:color-mix(in srgb,var(--word-accent) 68%,var(--theme-ink-a1a5ad,#a1a5ad))}
#word-cards .word-card .word-slots i.matched{background:var(--word-accent);border-color:var(--word-accent)}
#word-cards .word-card:hover,#word-cards .word-card:focus-within{border-color:var(--word-accent);background:linear-gradient(110deg,color-mix(in srgb,var(--word-bg) 92%,var(--word-accent)),var(--word-bg) 78%)}
#word-cards .word-card.reveal-current{border-color:var(--word-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--word-accent) 34%,transparent),0 8px 35px color-mix(in srgb,var(--word-accent) 13%,transparent)}

/* Each discovered surface form carries its English meaning and morphology. */
#word-cards .word-definitions{grid-column:1/-1;display:grid;gap:8px;margin-top:6px;padding-top:12px;border-top:1px solid color-mix(in srgb,var(--word-accent) 22%,transparent)}
#word-cards .word-definition{display:flex;align-items:center;gap:12px;line-height:1.45}
#word-cards .word-definition-copy{display:grid;gap:2px;min-width:0;flex:1}
#word-cards .word-grammar{font-size:11px;color:var(--theme-ink-fff,#fff)}
#word-cards .word-grammar b{font-weight:500}
#word-cards .word-meaning{font-size:14px;color:var(--theme-ink-f0f0ef,#f0f0ef)}
#word-cards .word-source-link{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;padding:5px 9px;border:1px solid color-mix(in srgb,var(--word-accent) 45%,transparent);border-radius:8px;color:var(--word-accent);font-size:11px;font-weight:600;text-decoration:none;white-space:nowrap;transition:background .2s,border-color .2s,transform .2s}
#word-cards .word-source-link:hover,#word-cards .word-source-link:focus-visible{background:color-mix(in srgb,var(--word-accent) 14%,transparent);border-color:var(--word-accent);transform:translateY(-1px)}
@media(max-width:760px){#word-cards .word-definition{align-items:flex-start;gap:8px}#word-cards .word-meaning{font-size:13px}#word-cards .word-source-link{font-size:10px;padding:4px 6px}}

/* Use the same palette for roll rarity and badge rarity. */
.rarity.common,.ready-tag.rarity.common{color:var(--theme-ink-e2e5e8,#e2e5e8)}
.rarity.uncommon,.ready-tag.rarity.uncommon{color:var(--theme-ink-c6ef80,#c6ef80)}

/* Keep brackets upright; italicize only the Latin-letter rendering. */
.transcription{font-style:normal}
.transcription i{font-style:italic}
#daily-page .roll-transcription:empty{display:none}
#daily-page .roll-stage.pre-roll .roll-transcription{display:none}
#daily-page .tiles:has(+ .roll-transcription:not(:empty)){margin-bottom:20px}
#daily-page .roll-transcription{margin:0 0 16px;color:var(--theme-ink-b5b8bf,#b5b8bf);font-family:'IBM Plex Mono',monospace;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:.025em}
#word-cards .word-card .word-head{grid-column:1;grid-row:1;display:flex;align-items:center;flex-wrap:wrap;gap:7px 11px;min-width:0}
#word-cards .word-card .word-head strong{grid-column:auto;grid-row:auto;margin:0}
#word-cards .word-card .transcription{color:var(--theme-ink-b5b8bf,#b5b8bf);font-family:'IBM Plex Mono',monospace;font-size:14px;font-weight:400;letter-spacing:.025em;white-space:nowrap}
@media(max-width:760px){#word-cards .word-card .transcription{font-size:12px}}

/* Each word's heading opens its definitions; new cards start closed. */
#word-cards .word-disclosure{grid-column:1/-1;min-width:0}
#word-cards .word-summary{display:grid;grid-template-columns:minmax(0,1fr) auto 12px;align-items:center;gap:16px;cursor:pointer;list-style:none}
#word-cards .word-summary::-webkit-details-marker{display:none}
#word-cards .word-summary::after{content:'';grid-column:3;grid-row:1;width:12px;height:12px;background:#a8adb5;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;transform:rotate(0);transition:transform .25s;place-self:center}
#word-cards .word-disclosure[open]>.word-summary::after{transform:rotate(180deg)}
#word-cards .word-summary:focus-visible{outline:2px solid var(--word-accent);outline-offset:6px;border-radius:3px}
#word-cards .word-definitions{margin-top:14px}
#word-cards .word-sources{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
@supports (interpolate-size:allow-keywords){
  #word-cards .word-disclosure{interpolate-size:allow-keywords}
  #word-cards .word-disclosure::details-content{block-size:0;opacity:0;overflow:hidden;transition:block-size .28s ease,opacity .2s ease,content-visibility .28s;transition-behavior:allow-discrete}
  #word-cards .word-disclosure[open]::details-content{block-size:auto;opacity:1}
}
@media(max-width:760px){#word-cards .word-summary{gap:10px}#word-cards .word-definition{flex-wrap:wrap}#word-cards .word-definition-copy{flex-basis:200px}#word-cards .word-sources{justify-content:flex-start;max-width:100%}}
@media(prefers-reduced-motion:reduce){#word-cards .word-disclosure::details-content,#word-cards .word-summary::after{transition:none}}

/* A themed rarity picker with a consistent trigger and keyboard-friendly menu. */
.rarity-picker{position:relative;flex:0 0 178px}
.rarity-trigger{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:12px 15px;border:1px solid var(--theme-border-42474f,#42474f);border-radius:9px;background:var(--theme-surface-1a1d21,#1a1d21);color:var(--theme-ink-e4e6e9,#e4e6e9);font-size:14px;text-align:left;transition:border-color .2s,background .2s}
.rarity-trigger:hover,.rarity-trigger[aria-expanded=true]{border-color:var(--theme-border-737b86,#737b86);background:var(--theme-surface-22262c,#22262c)}
.filter-chevron{width:7px;height:7px;border-right:1.5px solid var(--theme-border-a8adb5,#a8adb5);border-bottom:1.5px solid var(--theme-border-a8adb5,#a8adb5);margin-left:auto;transform:translateY(-2px) rotate(45deg);transition:transform .2s}
.rarity-trigger[aria-expanded=true] .filter-chevron{transform:translateY(2px) rotate(225deg)}
.rarity-dot{width:7px;height:7px;border-radius:50%;flex:none;background:#a5adb8}
.rarity-dot[data-rarity=all]{background:transparent;border:1px solid var(--theme-border-a5adb8,#a5adb8)}
.rarity-dot[data-rarity=common]{background:#e2e5e8}
.rarity-dot[data-rarity=uncommon]{background:#c6ef80}
.rarity-dot[data-rarity=rare]{background:#79cafa}
.rarity-dot[data-rarity=epic]{background:#ad91f7}
.rarity-dot[data-rarity=mythic]{background:#f0a0bf}
.rarity-dot[data-rarity=anomaly]{background:#e7c579}
.rarity-options{position:absolute;top:calc(100% + 8px);left:0;width:100%;min-width:178px;padding:6px;background:var(--theme-surface-20242a,#20242a);border:1px solid var(--theme-border-454b55,#454b55);border-radius:11px;box-shadow:0 12px 36px var(--theme-shadow-0008,#0008);z-index:20;animation:rarity-menu-enter .16s ease-out}
.rarity-options [role=option]{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:10px;border:0;border-radius:6px;background:transparent;color:var(--theme-ink-e4e6e9,#e4e6e9);text-align:left;font-size:13px}
.rarity-options [role=option]:hover,.rarity-options [role=option]:focus-visible{background:var(--theme-surface-343a43,#343a43);outline:none}
.rarity-options [aria-selected=true]{background:var(--theme-surface-2c323a,#2c323a)}
.option-check{margin-left:auto;color:var(--theme-ink-c6ef80,#c6ef80);visibility:hidden}
.rarity-options [aria-selected=true] .option-check{visibility:visible}
.filters input[type=search]{min-height:48px;border-radius:9px}
@keyframes rarity-menu-enter{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:760px){.rarity-picker{flex:1;min-width:150px}.filters label{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){.rarity-options{animation:none}.rarity-trigger,.filter-chevron{transition:none}}

/* Search, rarity, and intrinsic category compose into one collection filter. */
#collection-page .filters{display:grid;grid-template-columns:200px minmax(0,1fr) auto;gap:12px;margin-bottom:12px}
#collection-page .filters>input[type=search]{grid-column:1/-1;min-width:0;width:100%}
#collection-page .filters>.rarity-picker,#collection-page .filters>.category-picker{position:relative;min-width:0;width:100%}
#collection-page .filters>label{margin-left:6px}
#collection-page .rarity-options{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#collection-page .rarity-options.opens-up{top:auto;bottom:calc(100% + 8px)}
#category-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.category-trigger .filter-chevron{flex:none}
#category-options{min-width:0;max-height:min(360px,55vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
#category-options [role=option]>span:first-child{min-width:0;overflow-wrap:anywhere}
.collection-filter-count{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.5;min-height:18px}
.collection-pagination{scroll-margin-top:20px}
.collection-pagination .history-pagination{margin:12px 0 20px}
#collection-pagination-bottom .history-pagination{margin:24px 0 4px}
@media(max-width:650px){
  #collection-page .filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  #collection-page .filters>label{grid-column:1/-1;margin:2px 0 0}
  #collection-page .rarity-trigger{height:100%;padding:11px 12px;gap:8px;font-size:12px;text-align:left}
  #category-label{white-space:normal;overflow-wrap:anywhere}
  #category-options{left:auto;right:0;width:max(100%, min(240px, calc(100vw - 32px)))}
  #category-options [role=option]{font-size:12px}
}
@media(max-width:400px){
  #collection-page .rarity-trigger{padding-inline:9px;gap:6px}
  #collection-page #rarity-trigger{padding-inline:8px;gap:4px}
}

/* Collection badges keep all their awarding rolls in a compact disclosure. */
.unlocked-mark.undiscovered{color:var(--theme-ink-ff7783,#ff7783)}
.badge-rolls-disclosure{grid-column:1/-1;grid-row:6;min-width:0}
.badge-collection-roll{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--theme-border-ffffff0d,#ffffff0d);padding-top:8px;margin-top:4px}
.badge-collection-roll>.mini-roll{display:flex;gap:4px;margin:0;padding:0;border:0}
.badge-latest-roll{display:block;border-radius:4px}
.badge-latest-roll>.mini-roll{display:flex;gap:4px;margin:0;padding:0;border:0}
.badge-latest-roll:hover .mini-tile{border-color:var(--badge-accent)}
.badge-history-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;border:0;background:none;padding:4px 2px;color:var(--theme-ink-a5a9b0,#a5a9b0);font-size:12px;line-height:1;min-height:32px}
.badge-history-toggle:hover{color:var(--text)}
.badge-history-chevron{transition:transform .3s cubic-bezier(.22,1,.36,1);transform-origin:center}
.badge-history-toggle[aria-expanded="true"] .badge-history-chevron{transform:rotate(180deg)}
.badge-history-count{font-variant-numeric:tabular-nums}
.badge-roll-history{grid-column:1/-1;grid-row:7;min-width:0;overflow:hidden}
.badge-roll-history.history-transition{will-change:height,opacity}
.badge-history-scroll{max-height:240px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--theme-border-555b64,#555b64) var(--theme-border-202329,#202329);padding-top:8px;border-top:1px solid var(--theme-border-ffffff0d,#ffffff0d)}
.badge-history-scroll::-webkit-scrollbar{width:7px}
.badge-history-scroll::-webkit-scrollbar-track{background:var(--theme-surface-202329,#202329);border-radius:6px}
.badge-history-scroll::-webkit-scrollbar-thumb{background:var(--theme-surface-555b64,#555b64);border-radius:6px}
.badge-history-scroll::-webkit-scrollbar-thumb:hover{background:var(--theme-surface-737a84,#737a84)}
.badge-history-list{list-style:none;margin:0;padding:0 7px 0 0}
.badge-history-row{border-bottom:1px solid var(--theme-border-ffffff0a,#ffffff0a)}
.badge-history-roll-link{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 20px;padding:11px 6px;border-radius:5px;transition:background .18s}
.badge-history-roll-link:hover{background:var(--theme-surface-ffffff06,#ffffff06)}
.badge-history-row:last-child{border-bottom:0}
.badge-history-roll-link>.badge-history-letters{display:flex;justify-content:flex-start;gap:4px;letter-spacing:0;white-space:nowrap}
.badge-history-letters .badge-history-letter{display:grid;place-items:center;width:auto;min-width:0;height:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--theme-ink-9da4af,#9da4af);font-size:25px;font-weight:600;line-height:1.35;text-decoration:none;text-shadow:none;transform:none;transition:color .35s}
.badge-history-letters .badge-history-letter.relevant{color:var(--theme-ink-9da4af,#9da4af)}
.badge-history-letters .badge-history-letter.lit{background:transparent;color:var(--badge-accent);box-shadow:none;text-shadow:none;transform:none}
.badge-history-row time{font-size:11px;line-height:1.5;color:var(--theme-ink-a5a9b0,#a5a9b0)}
.badge-history-earned{font-size:12px;white-space:nowrap;color:var(--badge-accent);font-variant-numeric:tabular-nums}
.badge-history-earned>span{color:var(--theme-ink-94979e,#94979e);font-size:10px}
.badge-history-status{margin:0;padding:14px 0;font-size:12px;color:var(--muted)}
.badge-history-status.history-error{color:var(--theme-ink-ff7783,#ff7783)}
#collection-grid{overflow-anchor:none}
@media(max-width:520px){.badge-history-roll-link{grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}.badge-history-roll-link>.badge-history-letters{grid-column:1;grid-row:1}.badge-history-earned{grid-column:2;grid-row:1}.badge-history-row time{grid-column:1/-1;grid-row:2}.badge-history-scroll{max-height:280px}.badge-history-toggle{gap:5px}}
@media(prefers-reduced-motion:reduce){.badge-history-chevron,.badge-history-letters .badge-history-letter{transition:none}.badge-history-letters .badge-history-letter.relevant{color:var(--badge-accent)}}

/* Saved results reuse the roll screen and original rewards. */
#recorded-roll-note{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.5}
#daily-page #recorded-roll-note:not([hidden]) ~ .roll-action-slot #roll-button{
  min-width:0;
  min-height:44px;
  padding:0 4px;
  gap:.45em;
  border:0;
  background:none;
  color:var(--lime);
  font-size:14px;
  font-weight:500;
  transform:none;
}
#daily-page #recorded-roll-note:not([hidden]) ~ .roll-action-slot #roll-button::after{
  content:"↩︎";
  content:"↩︎" / "";
}
#daily-page #recorded-roll-note:not([hidden]) ~ .roll-action-slot #roll-button:hover:not(:disabled){
  text-decoration:underline;
  text-underline-offset:.2em;
}
a.history-row{transition:border-color .18s,background .18s}
a.history-row:hover{border-color:var(--theme-border-69717d,#69717d);background:var(--theme-surface-20242a,#20242a)}
/* Mobile roll cards use two aligned rows instead of wrapping individual fields. */
@media(max-width:760px){
  a.history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;padding:14px 16px;margin-bottom:10px;min-width:0}
  .history-row .history-roll-letters{grid-column:1;grid-row:1;font-size:22px;letter-spacing:2px;line-height:1.35;white-space:nowrap}
  .history-row>.rarity{grid-column:2;grid-row:1;justify-self:end}
  .history-row>.history-date{grid-column:1;grid-row:2;align-self:start;width:auto;padding-top:2px;font-size:11px;line-height:1.55}
  .history-row>.history-score{grid-column:2;grid-row:2;align-self:start;margin-left:0;font-size:18px;line-height:1.35;font-variant-numeric:tabular-nums;white-space:nowrap}
  .history-score>span{font-size:11px;font-weight:400;color:var(--muted)}
  .history-row small{margin-top:3px;font-size:11px;line-height:1.5;white-space:nowrap}
}
@media(max-width:380px){a.history-row{padding:13px 14px;gap:8px 10px}.history-row .history-roll-letters{font-size:20px;letter-spacing:1.6px}.history-row>.history-score{font-size:16px}.history-row small{font-size:10px}}
@media(prefers-reduced-motion:reduce){a.history-row,.badge-history-roll-link{transition:none}}

/* The header gear opens a floating surface over the current page. */
.topbar-actions{display:flex;align-items:center;gap:15px;flex-shrink:0}
.settings-button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;background:none;color:var(--muted);border-radius:7px}
.settings-button:hover,.settings-button[aria-expanded=true]{color:var(--lime);background:var(--theme-surface-ffffff05,#ffffff05)}
.settings-button svg{display:block;transition:transform .25s}
.settings-button:hover svg{transform:rotate(25deg)}
.topbar-actions .help-button{display:grid;place-items:center;width:34px;height:34px;min-width:34px;padding:0;margin:0;border:0;border-radius:7px;background:none;color:var(--muted);transition:background .2s,color .2s}
.topbar-actions .help-button svg{display:block;transition:transform .32s cubic-bezier(.22,1,.36,1)}
.topbar-actions .help-button:hover,.topbar-actions .help-button[aria-expanded=true]{color:var(--lime);background:var(--theme-surface-ffffff05,#ffffff05)}
.topbar-actions .help-button:hover svg{transform:rotate(-12deg) scale(1.12)}
.topbar-actions .help-button:active svg{transform:rotate(0) scale(.9);transition-duration:.12s}
dialog.settings-surface{padding:25px;width:540px;max-width:calc(100vw - 40px);overflow-y:auto;overscroll-behavior:contain;border-radius:15px;border-color:var(--theme-border-454a53,#454a53);background:var(--theme-surface-1a1d22,#1a1d22);box-shadow:0 24px 80px var(--theme-shadow-0008,#0008);line-height:1.5;}
dialog.settings-surface::backdrop{background:var(--theme-surface-08090d70,#08090d70);backdrop-filter:blur(2px)}
.settings-heading{position:relative;margin-bottom:20px;padding-right:28px}
dialog.settings-surface .settings-heading h2{margin:9px 0;font-size:25px;letter-spacing:-.8px;font-weight:600;line-height:1.3}
.settings-heading p{font-size:14px;color:var(--muted);line-height:1.6;margin:0}
.settings-close{position:absolute;top:0;right:-4px;display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:6px;background:none;color:var(--muted);padding:0}
.settings-close:hover{color:var(--text);background:var(--theme-surface-ffffff07,#ffffff07)}
.visual-settings-panel{overflow:hidden}
.visual-setting-row{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:18px 0;cursor:pointer}
.visual-setting-row+.visual-setting-row{border-top:1px solid var(--line)}
.visual-setting-row:hover{background:var(--theme-surface-ffffff03,#ffffff03)}
.visual-setting-copy{display:flex;flex-direction:column;gap:7px;max-width:590px}
.visual-setting-copy strong{font-size:15px;font-weight:500;color:var(--text)}
.visual-setting-copy>span{font-size:12px;line-height:1.65;color:var(--theme-ink-a0a5ae,#a0a5ae)}
.visual-toggle{position:relative;width:46px;height:26px;flex:none}
.visual-toggle input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.visual-switch{display:block;pointer-events:none;width:46px;height:26px;border:1px solid var(--theme-border-555b64,#555b64);border-radius:16px;background:var(--theme-surface-343941,#343941);transition:background .2s,border-color .2s}
.visual-switch::after{content:'';display:block;width:18px;height:18px;margin:3px;border-radius:50%;background:#b3bac3;transition:transform .2s,background .2s}
.visual-toggle input:checked+.visual-switch{background:var(--button-bg,var(--lime));border-color:var(--lime)}
.visual-toggle input:checked+.visual-switch::after{background:var(--theme-surface-202917,#202917);transform:translateX(20px)}
.visual-toggle input:focus-visible+.visual-switch{outline:2px solid var(--lime);outline-offset:5px}
dialog.settings-surface .settings-save-status{margin:17px 0 0;color:var(--muted);font-size:12px;line-height:1.6}
@media(max-width:760px){.topbar-actions{margin-left:auto;order:1;gap:10px}.settings-button{width:30px;height:32px}.settings-button svg{width:19px;height:19px}dialog.settings-surface{width:calc(100vw - 32px);max-width:none;padding:21px}.visual-setting-row{padding:17px 0;gap:20px}.visual-setting-copy>span{font-size:12px}}
@media(prefers-reduced-motion:reduce){.settings-button svg,.visual-switch,.visual-switch::after{transition:none}}
@media(max-width:760px){.topbar-actions .help-button{width:30px;min-width:30px;height:32px}}
@media(prefers-reduced-motion:reduce){.topbar-actions .help-button,.topbar-actions .help-button svg{transition:none}.topbar-actions .help-button:hover svg,.topbar-actions .help-button:active svg{transform:none}}

/* Reading preferences apply to the live roll and every saved word card. */
.hide-transcripts #roll-transcription,.hide-transcripts .transcription{display:none!important}
.history-page-summary{color:var(--muted);font-size:13px;margin:0}
.history-pagination{display:flex;align-items:center;justify-content:center;gap:0;margin:20px 0}
.history-page-control{display:flex;align-items:center;gap:6px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--panel)}
.history-page-label{min-width:100px;text-align:center;font-size:13px;color:var(--theme-ink-b5b8bf,#b5b8bf);font-variant-numeric:tabular-nums}
.history-page-button{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--theme-ink-b5b8bf,#b5b8bf);transition:color .18s,background .18s}
.history-page-button:hover:not(:disabled){color:var(--text);background:var(--theme-surface-ffffff09,#ffffff09)}
.history-page-button:disabled{cursor:default;opacity:.25}
.history-page-chevron{width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor}
.history-page-chevron.previous{transform:translateX(1px) rotate(135deg)}
.history-page-chevron.next{transform:translateX(-1px) rotate(-45deg)}
.history-retry{border:1px solid var(--theme-border-454a53,#454a53);border-radius:7px;background:var(--theme-surface-1a1d21,#1a1d21);padding:10px 14px;color:var(--text);font-size:13px;line-height:1.3;transition:border-color .18s,background .18s}
.history-retry:hover{border-color:var(--theme-border-8b9b6a,#8b9b6a);background:var(--theme-surface-22282a,#22282a)}
.history-loading,.history-error{padding:28px 0;color:var(--muted);font-size:14px}
.history-error{color:var(--theme-ink-ff7783,#ff7783)}

/* Unique badge discoveries, grouped by the badge's own rarity. */
.badge-rarity-progress{margin:25px 0 28px}
.badge-rarity-progress>h3{margin:0 0 13px;font-size:14px;font-weight:500;color:var(--theme-ink-c6cad1,#c6cad1)}
.badge-rarity-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;list-style:none;margin:0;padding:0}
.badge-rarity-stat{display:flex;flex-direction:column;container:badge-rarity-card / inline-size;padding:13px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);--rarity-accent:var(--theme-ink-e2e5e8,#e2e5e8)}
.badge-rarity-stat.rarity-uncommon{--rarity-accent:var(--theme-ink-c6ef80,#c6ef80)}
.badge-rarity-stat.rarity-rare{--rarity-accent:var(--theme-ink-79cafa,#79cafa)}
.badge-rarity-stat.rarity-epic{--rarity-accent:var(--theme-ink-ad91f7,#ad91f7)}
.badge-rarity-stat.rarity-mythic{--rarity-accent:var(--theme-ink-f0a0bf,#f0a0bf)}
.badge-rarity-stat.rarity-anomaly{--rarity-accent:var(--theme-ink-e7c579,#e7c579)}
.badge-rarity-stat-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;justify-items:start;gap:4px 8px;margin-bottom:12px}
.badge-rarity-stat .rarity{color:var(--rarity-accent);font-size:10px;font-weight:600;letter-spacing:.7px;overflow-wrap:anywhere}
.badge-rarity-stat strong{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.badge-rarity-stat strong>span{font-weight:400;color:var(--muted);font-size:11px}
.badge-rarity-track{height:4px;margin-top:auto;background:var(--theme-surface-ffffff0b,#ffffff0b);border-radius:8px;overflow:hidden}
.badge-rarity-track>span{display:block;height:100%;background:var(--rarity-accent);border-radius:inherit}
#history-page .badge-rarity-progress{grid-column:1/-1;margin:0;padding-top:21px;border-top:1px solid var(--line)}
#history-page .badge-rarity-stat{background:var(--theme-surface-ffffff02,#ffffff02)}
@media(max-width:1100px){.badge-rarity-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.badge-rarity-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.badge-rarity-stat{padding:12px}.badge-rarity-progress{margin:23px 0}.badge-rarity-stat .rarity{font-size:10px}}
/* The same grid fits less text when it sits inside an overall stats panel. */
@container badge-rarity-card (inline-size < 8.5rem){
  .badge-rarity-stat-heading:lang(ru){display:grid}
}
@container badge-rarity-card (inline-size < 7.5rem){
  .badge-rarity-stat-heading{display:grid}
}

/* Equal space between the navigation labels and at either end of the row. */
.topbar>nav{flex:1;justify-content:space-evenly;gap:0}
@media(max-width:760px){.topbar>nav{flex:0 0 calc(100% + 40px);width:calc(100% + 40px);margin-inline:-20px}}

/* Each caption shares the center of its icon and value; divider is at 50%. */
.mini-stats{position:relative;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;align-items:start}
.mini-stats::before{content:'';position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--line)}
.mini-stats .mini-stat{display:flex;flex-direction:column;align-items:center;gap:9px;padding:4px 8px;text-align:center;min-width:0;border:0}
.mini-stats .mini-stat-value{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.mini-stats .mini-stat-caption{color:var(--muted);font-size:12px;line-height:1.3}
.best-stat{border-radius:8px;transition:background .18s}
.best-stat:not([aria-disabled="true"]):hover{background:var(--theme-surface-ffffff06,#ffffff06)}
.best-stat:not([aria-disabled="true"]):hover .mini-stat-caption{color:var(--text)}
.best-stat[aria-disabled="true"]{pointer-events:none}

.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.history-sort-label{display:flex;align-items:center;gap:10px;max-width:100%;min-width:0;font-size:13px;color:var(--muted)}
.history-sort-label>span{white-space:nowrap}
.history-sort-picker{position:relative;flex:0 1 244px;width:244px;min-width:0;max-width:100%}
.history-sort-trigger{min-height:42px;padding:10px 14px;font-size:13px;gap:14px}
.history-sort-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-sort-trigger .filter-chevron{flex:none;margin-left:auto}
.history-sort-options{left:auto;right:0;width:max(100%,244px);min-width:0;max-width:calc(100vw - 40px)}
.history-sort-options [role=option]{min-height:42px;padding:11px 12px;gap:14px;white-space:nowrap}
.history-sort-options .option-check{flex:none}
.history-sort-options[data-placement=above]{top:auto;bottom:calc(100% + 8px)}
.history-page-jump{display:flex;align-items:center;margin:0}
.history-page-label{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;white-space:nowrap}
.history-page-input{width:auto;min-width:34px;border:0;border-radius:5px;background:transparent;color:var(--text);font-size:13px;font-variant-numeric:tabular-nums;line-height:1.3;text-align:center;padding:6px;transition:background .18s,box-shadow .18s}
.history-page-input:hover{background:var(--theme-surface-ffffff06,#ffffff06)}
.history-page-input:focus-visible{outline:none;background:var(--theme-surface-ffffff08,#ffffff08);box-shadow:inset 0 0 0 1px #c6ef8080}
.history-page-total{color:var(--muted);padding-right:8px}
.history-page-total>span{color:var(--theme-ink-626871,#626871);margin-right:5px}
@media(max-width:520px){.history-toolbar{align-items:flex-start;gap:12px}.history-sort-label{margin-left:auto}#history-page>.stats-panel{grid-template-columns:1fr}#history-page .mini-stats{margin:3px 0}}

/* Rankings float above the current page, with an independently scrolling list. */
.leaderboard-button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:7px;background:none;color:var(--muted);transition:color .2s,background .2s}
.leaderboard-button svg{transition:transform .3s cubic-bezier(.22,1,.36,1)}
.leaderboard-button:hover,.leaderboard-button[aria-expanded=true]{color:var(--lime);background:var(--theme-surface-ffffff05,#ffffff05)}
.leaderboard-button:hover svg{transform:translateY(-2px) rotate(-6deg)}
dialog.leaderboard-surface{padding:24px;width:700px;max-width:calc(100vw - 40px);overflow:hidden;border:1px solid var(--theme-border-343942,#343942);border-radius:15px;background:var(--theme-surface-171a1f,#171a1f);box-shadow:0 24px 80px var(--theme-shadow-0008,#0008);color:var(--text)}
dialog.leaderboard-surface[open]{display:flex;flex-direction:column}
dialog.leaderboard-surface::backdrop{background:var(--theme-surface-08090d70,#08090d70);backdrop-filter:blur(2px)}
.leaderboard-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;flex:none}
.leaderboard-heading>div{display:flex;align-items:baseline;gap:12px}
dialog.leaderboard-surface h2{margin:0;font-size:25px;letter-spacing:-.8px;font-weight:600}
.leaderboard-limit{font-size:11px;color:var(--muted)}
.leaderboard-close{display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:6px;background:none;color:var(--muted);padding:0;flex:none}
.leaderboard-close:hover{color:var(--text);background:var(--theme-surface-ffffff07,#ffffff07)}
.leaderboard-tabs{display:grid;grid-template-columns:repeat(5,1fr);padding:4px;gap:4px;border:1px solid var(--theme-border-30353d,#30353d);border-radius:10px;background:var(--theme-surface-111419,#111419);flex:none}
.leaderboard-tabs button{padding:10px 6px;border:0;border-radius:6px;background:none;color:var(--muted);font-size:13px;transition:background .2s,color .2s}
.leaderboard-tabs button:hover{color:var(--text);background:none}
.leaderboard-tabs button[aria-selected=true]{color:var(--leaderboard-tab-selected-color,var(--theme-ink-f0f1f3,#f0f1f3));background:var(--leaderboard-tab-selected-bg,var(--theme-surface-2c3139,#2c3139));box-shadow:inset 0 0 0 1px var(--leaderboard-tab-selected-border,transparent)}
.leaderboard-roll-scopes,.leaderboard-recent-rarities{display:flex;flex:none;gap:0;margin-top:12px;border-bottom:1px solid var(--line);overflow-x:auto;overscroll-behavior:contain}
.leaderboard-roll-scopes button,.leaderboard-recent-rarities button{flex:1 0 auto;padding:8px 10px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font-size:11px;white-space:nowrap;transition:color .2s,border-color .2s}
.leaderboard-roll-scopes button:hover,.leaderboard-recent-rarities button:hover{color:var(--rarity-color,var(--text))}
.leaderboard-roll-scopes button[aria-selected=true],.leaderboard-recent-rarities button[aria-selected=true]{color:var(--rarity-color,var(--text));border-bottom-color:currentColor;background:var(--leaderboard-subtab-selected-bg,transparent)}
.leaderboard-panel{display:flex;flex-direction:column;min-height:0;flex:1}
dialog.leaderboard-surface .leaderboard-description{font-size:12px;color:var(--muted);margin:16px 0 10px;min-height:18px;flex:none;line-height:1.5}
.leaderboard-list{display:flex;flex-direction:column;gap:0;list-style:none;margin:0;padding:0;overflow:auto;overscroll-behavior:contain;min-height:0}
.leaderboard-row{display:grid;grid-template-columns:36px minmax(0,1fr) max-content 112px;align-items:center;gap:8px;flex:none;margin:0;padding:9px 10px;min-height:48px;border:0;border-bottom:1px solid var(--theme-border-ffffff07,#ffffff07);border-radius:0;background:var(--theme-surface-1d2026,#1d2026)}
.leaderboard-row:last-child{border-bottom:0}
.leaderboard-rank{display:grid;place-items:center;align-self:stretch;font-size:12px;font-variant-numeric:tabular-nums;color:var(--theme-ink-8b929e,#8b929e);line-height:1}
.leaderboard-player{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-width:0}
.leaderboard-you{background:var(--theme-surface-222821,#222821);box-shadow:none}
.leaderboard-you-tag,.profile-you-tag{display:inline-flex;align-items:center;padding:3px 6px;border:1px solid #c6ef8033;border-radius:4px;background:#c6ef8012;font-size:10px;line-height:1.2;font-weight:500;letter-spacing:0;color:var(--lime);white-space:nowrap}
.leaderboard-you-tag{flex:none;border-radius:0}
.leaderboard-roll{display:flex;align-items:center;justify-content:flex-end;justify-self:end;min-width:0;color:var(--rarity-color,var(--text));text-decoration:none}
.leaderboard-roll-line{display:grid;grid-template-columns:118px 86px;align-items:center;gap:8px;transition:filter .2s}
/* Compact cards for every roll rarity, sharing the roll's palette. */
.history-row .rarity,.leaderboard-roll-rarity{display:inline-flex;align-items:center;justify-content:center;flex:none;width:fit-content;padding:4px 7px;border:1px solid var(--theme-border-ffffff1c,#ffffff1c);border-radius:5px;background:var(--theme-surface-ffffff06,#ffffff06);font-size:10px;font-weight:600;letter-spacing:.7px;text-transform:uppercase;line-height:1.3;white-space:nowrap}
@supports (color:color-mix(in srgb,white,black)){.history-row .rarity,.leaderboard-roll-rarity{border-color:color-mix(in srgb,var(--rarity-color,currentColor) 28%,transparent);background:color-mix(in srgb,var(--rarity-color,currentColor) 9%,transparent)}}
.leaderboard-roll-rarity{justify-self:center;border-radius:0;padding:3px 6px;font-size:9px;letter-spacing:.5px}
.leaderboard-roll-line>strong{text-align:center;font-size:17px;font-weight:600;letter-spacing:1.5px;line-height:24px;white-space:nowrap;transition:color .2s}
.leaderboard-roll:hover .leaderboard-roll-line{filter:brightness(1.15)}
.leaderboard-value{display:flex;align-items:baseline;justify-content:flex-end;gap:5px;font-size:13px;font-variant-numeric:tabular-nums;font-weight:500;white-space:nowrap}
.leaderboard-value>span{font-size:10px;font-weight:400;color:var(--muted)}
.leaderboard-message{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:150px;margin:0;color:var(--muted);font-size:13px;text-align:center;line-height:1.6;padding:20px}
@media(max-width:760px){.leaderboard-button{width:30px;height:32px}.leaderboard-button svg{width:19px;height:19px}dialog.leaderboard-surface{width:calc(100vw - 32px);max-width:none;padding:18px}}
@media(max-width:580px){.leaderboard-row:not(.leaderboard-player-only){min-width:540px}}
@media(prefers-reduced-motion:reduce){.leaderboard-button,.leaderboard-button svg,.leaderboard-tabs button,.leaderboard-roll-line,.leaderboard-roll-line>strong{transition:none}}

.leaderboard-profile{min-width:0;font-size:14px;font-weight:500;line-height:22px;color:var(--text);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .2s}
.leaderboard-profile:hover{color:var(--lime)}
.leaderboard-player-only{grid-template-columns:36px minmax(0,1fr) max-content}
.leaderboard-recent{grid-template-columns:minmax(0,1fr) max-content 112px}
.leaderboard-self{flex:none;list-style:none;margin:12px 0 0;padding:12px 0 0;border-top:1px solid #c6ef8033;overflow-x:auto;overscroll-behavior:contain}
.leaderboard-self .leaderboard-rank{color:var(--lime)}
.leaderboard-unranked{font-size:12px;color:var(--muted)}
.profile-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}
.profile-heading h1{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:10px 0 8px;font-size:30px;letter-spacing:-1px}
.profile-heading p{font-size:13px;margin:0}
.profile-stats{border:1px solid var(--line);border-radius:15px;background:var(--panel);padding:28px;max-width:850px;margin:0 auto}
.profile-stats h2{font-size:14px;font-weight:500;color:var(--muted);margin:0 0 25px}
.profile-total>span{font-size:13px;color:var(--muted)}
.profile-total>strong{display:flex;align-items:baseline;gap:9px;font-size:clamp(32px,5vw,48px);font-weight:600;letter-spacing:-1.5px;margin:10px 0 26px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.profile-total small{font-size:16px;font-weight:500;color:var(--lime);letter-spacing:0}
.profile-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-top:1px solid var(--line)}
.profile-metric{padding:22px 0;display:flex;flex-direction:column;gap:9px;min-width:0;border-bottom:1px solid var(--line)}
.profile-metric:nth-child(even){padding-left:25px;border-left:1px solid var(--line)}
.profile-metric>span{font-size:12px;color:var(--muted)}
.profile-metric strong{white-space:nowrap;font-size:27px;font-weight:500;font-variant-numeric:tabular-nums}
.profile-metric small{font-size:12px;color:var(--muted);font-weight:400}
.profile-best strong{transition:color .2s}.profile-best:hover strong{color:var(--lime)}
.profile-stats .badge-rarity-progress{margin-top:25px}
.profile-message{font-size:14px;color:var(--muted);padding:35px 0}
.profile-roll-history{max-width:850px;margin:38px auto 0}
.profile-roll-history .section-heading{margin-bottom:18px}
.profile-roll-history .profile-message{margin:0;padding:18px 0}
@media(max-width:760px){.profile-heading{align-items:flex-start}.profile-heading h1{font-size:24px}.profile-heading .text-button{white-space:nowrap;font-size:12px;padding-top:6px}.profile-stats{padding:22px}.profile-metric strong{font-size:23px}.profile-total>strong{font-size:34px}}
@media(prefers-reduced-motion:reduce){.leaderboard-profile,.profile-best strong{transition:none}}

.leaderboard-place-1{--place-tint:#e9c66d0c}
.leaderboard-place-2{--place-tint:#c6d0dd08}
.leaderboard-place-3{--place-tint:#d4a0790a}
.leaderboard-row[class*="leaderboard-place-"]{background:linear-gradient(90deg,var(--place-tint),transparent 70%),var(--theme-surface-1d2026,#1d2026);box-shadow:none}
.leaderboard-row[class*="leaderboard-place-"] .leaderboard-rank{font-size:22px}
.leaderboard-row[class*="leaderboard-place-"].leaderboard-you{background:linear-gradient(90deg,var(--place-tint),transparent 70%),var(--theme-surface-222821,#222821);box-shadow:none}
.leaderboard-preview-exit{border:0;background:none;padding:0;color:var(--muted);font-size:10px;text-decoration:underline;text-underline-offset:3px}
.leaderboard-preview-exit:hover{color:var(--text)}


/* A slow sheen stays within each roll's rarity palette. */
.history-roll-letters{color:var(--rarity-color,var(--text))}
@supports (background-clip:text) and (color:color-mix(in srgb,white,black)){
  .history-roll-letters{background-image:linear-gradient(110deg,var(--rarity-color,var(--text)) 0%,var(--rarity-color,var(--text)) 24%,color-mix(in srgb,var(--rarity-color,var(--text)) var(--roll-sheen-light-share,65%),var(--roll-sheen-light,white)) 38%,var(--rarity-color,var(--text)) 52%,color-mix(in srgb,var(--rarity-color,var(--text)) var(--roll-sheen-dark-share,76%),var(--roll-sheen-dark,black)) 68%,var(--rarity-color,var(--text)) 84%,var(--rarity-color,var(--text)) 100%);background-size:240% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:history-roll-sheen 6s ease-in-out infinite alternate}
  .history-row:nth-child(3n+2) .history-roll-letters{animation-delay:-2s}
  .history-row:nth-child(3n+3) .history-roll-letters{animation-delay:-4s}
}
@keyframes history-roll-sheen{from{background-position:0% 50%}to{background-position:100% 50%}}
@media(prefers-reduced-motion:reduce){.history-roll-letters{animation:none;background:none;color:var(--rarity-color,var(--text));-webkit-text-fill-color:currentColor}}


/* Rank, identity, and roll rarity use accents on a shared charcoal surface. */
.badge-emojis{margin-right:.45em;white-space:nowrap;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:.95em;font-weight:400;letter-spacing:normal}
/* Earned weaker badges sit beneath their parent without repeating full cards. */
.badge-card>.badge-subordinates{grid-column:1/-1;grid-row:7;list-style:none;margin:8px 0 0;padding:7px 0 0 7px;border-top:1px solid var(--theme-border-ffffff0b,#ffffff0b)}
.badge-subordinate{display:flex;align-items:center;gap:8px;min-height:29px;font-size:12px;line-height:1.5;color:var(--muted)}
.badge-branch{flex:none;align-self:start;color:var(--theme-ink-666d77,#666d77);font-family:'IBM Plex Mono',monospace}
.badge-subordinate-name{min-width:0;color:var(--theme-ink-c2c6cd,#c2c6cd)}
.badge-subordinate-earned{font-size:9px;letter-spacing:.07em;text-transform:uppercase;color:var(--theme-ink-737b87,#737b87)}
.badge-subordinate>strong{flex:none;margin-left:auto;white-space:nowrap;color:var(--rarity-color,var(--text));font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
.badge-subordinate>strong>span{font-size:10px}
@media(max-width:480px){.badge-subordinate{gap:6px;font-size:11px}.badge-subordinate-earned{display:none}.badge-subordinate>strong{font-size:11px}}
@supports (color:color-mix(in srgb,white,black)){.leaderboard-roll-rarity{background:color-mix(in srgb,var(--rarity-color,currentColor) 6%,transparent);border-color:color-mix(in srgb,var(--rarity-color,currentColor) 22%,transparent)}}

#help-dialog .dialog-done{min-width:0}
#help-dialog .help-panel-links{justify-content:center;margin-top:20px}
#help-dialog .help-intro{margin-bottom:28px}#help-dialog .help-intro h2{margin:0 24px 14px 0}#help-dialog .help-intro p{margin:0}
#help-dialog p,#help-dialog li{font-size:14px;color:var(--theme-ink-b4b8bf,#b4b8bf)}
#help-dialog .help-section{margin-top:28px}
#help-dialog .help-section h2{margin:0 0 16px}
#help-dialog a{color:var(--lime);text-decoration:underline;text-underline-offset:3px}

#help-dialog .threshold-tier{display:inline-block;white-space:nowrap}

.roll-rarity-statistics{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.roll-rarity-statistics h3{margin:0 0 16px;font-size:13px;font-weight:500;color:var(--muted)}
.roll-rarity-preview{margin:0 0 16px;font-size:12px;color:var(--muted)}
.roll-rarity-stats{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.roll-rarity-stat{display:grid;grid-template-columns:88px minmax(24px,1fr) 126px 52px;align-items:center;gap:14px;min-height:28px}
.roll-rarity-stat .rarity{font-size:11px;letter-spacing:.8px}
.roll-rarity-track{height:4px;overflow:hidden;border-radius:8px;background:var(--theme-surface-ffffff0b,#ffffff0b)}
.roll-rarity-track>span{display:block;height:100%;border-radius:inherit;background:var(--rarity-color)}
.roll-rarity-track>span:not([data-progress="0"]){min-width:1px}
.roll-rarity-count{font-size:13px;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
.roll-rarity-count small{font-size:11px;color:var(--muted)}
.roll-rarity-percentage{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;text-align:right}
@media(max-width:520px){.roll-rarity-stats{gap:16px}.roll-rarity-stat{grid-template-columns:minmax(0,1fr) max-content 48px;gap:8px 12px}.roll-rarity-track{grid-column:1/-1;grid-row:2}.roll-rarity-count small{display:none}}

#history-roll-rarity-statistics{grid-column:1/-1}
#history-page .roll-rarity-statistics{margin:0;padding-top:21px}
.roll-rarity-status{margin:0;font-size:13px;color:var(--muted)}

/* Discord account controls share the utility row with help and settings. */
.account-control{position:relative;display:flex;align-items:center;min-width:0}
.discord-login{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid #858df055;background:#5865f218;color:var(--theme-ink-d6d9ff,#d6d9ff);border-radius:7px;padding:9px 12px;font:inherit;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s,transform .2s}
.discord-login:hover{background:#5865f232;border-color:#858df099}
.discord-login:active{transform:translateY(1px)}
.discord-login:disabled{opacity:.6;cursor:wait}
.discord-mark{flex:none;color:var(--discord-icon-color,#7f8cff)}
.topbar-actions #discord-login{display:grid;place-items:center;width:34px;height:34px;min-width:34px;padding:5px;border:0;background:none}
.topbar-actions #discord-login>span{display:none}
.topbar-actions #discord-login:hover{background:var(--theme-surface-ffffff05,#ffffff05)}
.account-menu-trigger{display:flex;align-items:center;gap:8px;background:none;border:0;color:var(--text);padding:8px 0;font:inherit;font-size:13px;cursor:pointer}
.account-menu-trigger>.discord-mark{width:18px;height:18px}
#account-name{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu-trigger>.filter-chevron{width:6px;height:6px;margin-left:3px}
.account-menu{position:absolute;right:0;top:calc(100% + 12px);min-width:175px;padding:7px;background:var(--theme-surface-202329,#202329);border:1px solid var(--theme-border-40454e,#40454e);border-radius:9px;box-shadow:0 15px 35px var(--theme-shadow-0006,#0006);z-index:30}
.account-menu>a,.account-menu>button{display:block;width:100%;border:0;background:none;color:var(--text);text-decoration:none;text-align:left;padding:10px 12px;border-radius:5px;font:inherit;font-size:13px;cursor:pointer}
.account-menu>a:hover,.account-menu>button:hover{background:var(--theme-surface-ffffff09,#ffffff09)}
.account-menu>button{color:var(--theme-ink-eeadb0,#eeadb0)}
#logout-error{margin:6px 12px;font-size:12px;color:var(--theme-ink-eeadb0,#eeadb0);max-width:220px}
.history-account{display:flex;justify-content:space-between;align-items:center;gap:22px;border-bottom:1px solid var(--line);padding:0 0 24px;margin-bottom:26px}
.history-account>div{display:flex;align-items:center;gap:13px;min-width:0}
.history-account>div>.discord-mark{width:24px;height:24px}
.history-account .guest-mark{display:grid;place-items:center;flex:none;width:24px;height:24px;color:var(--theme-ink-fff,#fff);font-size:29px;font-weight:800;line-height:1;transform:rotate(-10deg)}
.history-account strong{display:block;font-size:17px;font-weight:600;overflow-wrap:anywhere}
.history-account p{margin:5px 0 0;font-size:13px;color:var(--muted)}
.login-surface{text-align:left;width:430px;max-width:calc(100vw - 32px);padding:32px}
.login-discord-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:#5865f225;color:var(--theme-ink-aeb5ff,#aeb5ff);margin-bottom:22px}
.login-discord-icon .discord-mark{width:28px;height:28px}
.login-surface h2{margin:0 0 13px;font-size:24px}
.login-surface p{margin:0;font-size:14px}
.login-import-option{display:flex;align-items:flex-start;gap:12px;padding:18px 0;margin-top:18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);cursor:pointer}
.login-import-option input{margin:5px 0 0;accent-color:#8590ff;width:16px;height:16px;flex:none}
.login-import-option strong{display:block;font-size:13px;font-weight:600}
.login-import-option span>span{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.6}
.login-surface .login-error{margin:18px 0;color:var(--theme-ink-eeadb0,#eeadb0);font-size:13px}
.login-continue{width:100%;padding:12px;margin-top:24px}
.leaderboard-guest{font-size:inherit;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.discord-login[hidden],.account-menu-trigger[hidden],.account-menu[hidden],.login-import-option[hidden]{display:none}
@media(min-width:761px) and (max-width:1100px){.topbar{height:auto;min-height:78px;flex-wrap:wrap;padding:18px 32px 0;gap:15px}.topbar-actions{margin-left:auto;order:1;gap:12px}.topbar>nav{order:2;flex:0 0 calc(100% + 64px);width:calc(100% + 64px);margin-inline:-32px;height:48px}}
@media(max-width:760px){#account-name{max-width:105px}.history-account{gap:15px;padding-bottom:22px}.history-account p{font-size:12px}.history-account .discord-login{font-size:12px;padding:9px 10px}}
@media(max-width:480px){.topbar-actions{gap:6px}.topbar-actions #discord-login{width:30px;height:32px;padding:5px;border:0;background:none}.topbar-actions #discord-login>span{display:none}.account-menu-trigger>.discord-mark{display:none}#account-name{max-width:65px}.history-account{align-items:flex-start;flex-wrap:wrap}.history-account .discord-login{margin-left:37px}.login-surface{padding:26px}}
@media(prefers-reduced-motion:reduce){.discord-login{transition:none}}

/* Shared overall stats layout for personal history and public profiles. */
#history-page>.stats-panel.overall-stat-layout,.profile-stats.overall-stat-layout{display:block;padding:26px;max-width:none;width:100%;margin:0 0 32px}
.overall-stat-layout .section-label{font-size:23px;font-weight:500;letter-spacing:-.5px;color:var(--text);margin-bottom:25px}
.overall-stat-layout .stats-top-row{display:flex;align-items:center;justify-content:space-between;gap:30px;margin-bottom:24px}
.overall-stat-layout .total-stat{margin:0;min-width:0}
.overall-stat-layout .total-stat strong{margin-top:7px;font-size:clamp(32px,4vw,45px);font-variant-numeric:tabular-nums;white-space:nowrap}
.overall-stat-layout .stats-top-row>.mini-stat{min-width:100px;margin:0 16px}
.overall-stat-layout .mini-stat{display:flex;flex-direction:column;align-items:center;gap:9px;padding:0;min-width:0;text-align:center}
.overall-stat-layout .mini-stat-value{display:flex;align-items:center;justify-content:center;gap:9px;height:36px;min-height:36px;white-space:nowrap}
.overall-stat-layout .mini-stat-value>strong{font-size:28px;font-weight:600;line-height:36px;font-variant-numeric:tabular-nums}
.overall-stat-layout .mini-stat-value>.stat-icon{display:inline-flex;align-items:center;justify-content:center;font-size:27px;line-height:36px;height:36px;min-width:27px;color:var(--lime)}
.overall-stat-layout .mini-stat-value>.stat-icon.purple{color:var(--violet)}
.overall-stat-layout .mini-stat-caption{margin:0;font-size:12px;line-height:18px;color:var(--muted)}
.best-roll-row{display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:21px 0;margin-bottom:24px;color:var(--text);text-decoration:none}
a.best-roll-row{cursor:pointer}
a.best-roll-row:hover .mini-stat-caption{color:var(--text)}
.best-roll-row[aria-disabled="true"]{cursor:default}
.best-roll-row .best-stat{background:none;flex:none}
.best-roll-preview{display:flex;align-items:center;justify-content:flex-end;gap:16px;min-width:0}
.best-roll-preview .history-roll-letters{font-size:27px;letter-spacing:4px;line-height:1.4}
.best-roll-preview .rarity{flex:none}
.best-roll-preview .rarity{display:inline-flex;align-items:center;justify-content:center;width:fit-content;padding:4px 7px;border:1px solid color-mix(in srgb,var(--rarity-color,currentColor) 28%,transparent);border-radius:5px;background:color-mix(in srgb,var(--rarity-color,currentColor) 9%,transparent);font-size:10px;font-weight:600;letter-spacing:.7px;text-transform:uppercase;line-height:1.3;white-space:nowrap}
.overall-stat-layout .collection-progress{margin:0}
.overall-stat-layout .collection-progress>div:first-child{font-size:13px;gap:16px}
.overall-stat-layout .progress-track>div{height:100%;background:var(--button-bg,var(--lime));border-radius:inherit}
#history-page .overall-stat-layout .badge-rarity-progress,.overall-stat-layout .badge-rarity-progress{margin:24px 0 0;padding-top:22px;border-top:1px solid var(--line)}
.overall-stat-layout .badge-rarity-stat{background:var(--theme-surface-ffffff02,#ffffff02)}
.profile-roll-history{max-width:none;margin:32px 0 0}
.profile-stats.overall-stat-layout{margin-bottom:0}
.profile-badge-detail{margin:32px 0 0;display:flow-root;overflow-anchor:none;scroll-margin-block:16px}
.profile-badge-detail[hidden]{display:none}
.profile-collected-badges{border-top:1px solid var(--line);padding-top:22px;margin-top:24px}
.profile-collected-badges h3{font-size:14px;font-weight:500;color:var(--theme-ink-c6cad1,#c6cad1);margin:0 0 14px}
.profile-badge-tags{display:flex;flex-wrap:wrap;gap:7px}
.profile-badge-tag{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid color-mix(in srgb,var(--rarity-color,var(--theme-border-e2e5e8,#e2e5e8)) 23%,transparent);border-radius:4px;background:color-mix(in srgb,var(--rarity-color,#e2e5e8) 5%,transparent);color:var(--rarity-color,var(--theme-ink-e2e5e8,#e2e5e8));font:inherit;font-size:11.5px;font-weight:500;letter-spacing:0;line-height:1.4;text-align:left;cursor:pointer;transition:background .2s,border-color .2s,box-shadow .2s}
.profile-badge-tag>span{font-size:14px;line-height:1.2;flex:none}
.profile-badge-tag:hover{border-color:color-mix(in srgb,var(--rarity-color,var(--theme-border-e2e5e8,#e2e5e8)) 52%,transparent);background:color-mix(in srgb,var(--rarity-color,#e2e5e8) 9%,transparent)}
.profile-badge-tag[aria-pressed="true"]{border-color:var(--rarity-color,var(--theme-border-e2e5e8,#e2e5e8));background:color-mix(in srgb,var(--rarity-color,#e2e5e8) 13%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--rarity-color,#e2e5e8) 12%,transparent)}
.profile-badge-empty,.profile-badges-empty,.profile-badge-error p{margin:0;font-size:13px;color:var(--muted)}
.profile-badge-error{padding:18px 0}
.profile-badge-detail .profile-badge-empty{grid-column:1/-1;grid-row:auto;margin-top:8px;min-height:0}
#history-roll-rarity-statistics{margin:0}
#history-page .roll-rarity-statistics,.profile-roll-history .roll-rarity-statistics{margin:0 0 24px;padding:0;border:1px solid var(--line);border-radius:11px;background:var(--theme-surface-ffffff02,#ffffff02)}
.roll-rarity-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 20px;list-style:none;cursor:pointer;user-select:none}
.roll-rarity-disclosure>summary::-webkit-details-marker{display:none}
.roll-rarity-disclosure>summary h3{margin:0;font-size:14px;font-weight:500;color:var(--theme-ink-c6cad1,#c6cad1)}
.roll-rarity-disclosure>summary>.filter-chevron{margin-right:3px;transition:transform .3s cubic-bezier(.22,1,.36,1)}
.roll-rarity-disclosure[open]>summary>.filter-chevron{transform:rotate(225deg)}
.roll-rarity-content{padding:0 20px 18px}
@supports (interpolate-size:allow-keywords){.roll-rarity-disclosure{interpolate-size:allow-keywords}.roll-rarity-disclosure::details-content{block-size:0;opacity:0;overflow:hidden;transition:block-size .35s cubic-bezier(.22,1,.36,1),opacity .25s,content-visibility .35s allow-discrete}.roll-rarity-disclosure[open]::details-content{block-size:auto;opacity:1}}
@media(max-width:760px){#history-page>.stats-panel.overall-stat-layout,.profile-stats.overall-stat-layout{padding:21px}.best-roll-preview{gap:10px}.best-roll-preview .history-roll-letters{font-size:24px;letter-spacing:3px}.overall-stat-layout .stats-top-row>.mini-stat{margin:0;min-width:78px}}
@media(max-width:480px){.overall-stat-layout .stats-top-row{gap:16px}.overall-stat-layout .total-stat strong{font-size:clamp(20px,6vw,28px)}.overall-stat-layout .mini-stat-value>strong{font-size:24px}.best-roll-row{gap:16px}.best-roll-preview{flex-wrap:wrap;gap:6px 10px}.best-roll-preview .history-roll-letters{font-size:22px;letter-spacing:2.5px}.best-roll-preview .rarity{font-size:9px}.roll-rarity-disclosure>summary{padding:15px 16px}.roll-rarity-content{padding:0 16px 16px}.profile-badge-tag{font-size:11px;padding:6px 8px}}
@media(prefers-reduced-motion:reduce){.profile-badge-tag,.roll-rarity-disclosure>summary>.filter-chevron,.roll-rarity-disclosure::details-content{transition:none}}

/* Only badge names link to their collection entries. */
.badge-collection-link,.badge-subordinate-link{color:inherit;text-decoration:none}
.badge-collection-link:focus-visible,.badge-subordinate-link:focus-visible{outline:2px solid var(--badge-accent);outline-offset:2px;border-radius:2px}
#collection-grid .badge-card.collection-target{border-color:var(--badge-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--badge-accent) 35%,transparent);scroll-margin-top:24px;outline:none}
/* Footer links open small surfaces while keeping the current page in place. */
footer{display:flex;flex-direction:column;gap:16px;line-height:1.6}
.footer-primary{display:flex;flex-direction:column;align-items:stretch;gap:10px;width:100%}
.footer-brand-row{display:flex;align-items:baseline;justify-content:space-between;gap:18px;width:100%}
.footer-inspiration{white-space:nowrap}
.footer-links{display:flex;align-items:center;justify-content:flex-end;gap:14px;width:100%}
.footer-links button{border:0;background:none;padding:0;color:var(--theme-ink-d4d5d7,#d4d5d7);font-size:12px;line-height:1.6}
.footer-links button:hover{color:var(--lime)}
.footer-links>span{color:var(--theme-ink-626770,#626770)}
dialog.footer-surface{width:560px;max-width:calc(100vw - 32px);padding:28px;text-align:left;border:1px solid var(--theme-border-454a53,#454a53);border-radius:16px;background:var(--theme-surface-1a1d22,#1a1d22);box-shadow:0 24px 80px var(--theme-shadow-0008,#0008);overflow-y:auto;overscroll-behavior:contain;}
dialog.footer-surface::backdrop{background:var(--theme-surface-08090d99,#08090d99);backdrop-filter:blur(3px)}
.footer-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}
.footer-panel-heading h2{min-width:0;margin:0;font-size:26px;font-weight:600;letter-spacing:-.7px;text-wrap:balance}
.footer-panel-close{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;padding:0;border:0;background:none;color:var(--muted);border-radius:6px}
.footer-panel-close:hover{background:var(--theme-surface-ffffff09,#ffffff09);color:var(--text)}
dialog.privacy-surface{max-height:calc(100vh - 32px);max-height:min(740px,calc(100dvh - 32px));overflow:hidden}
dialog.privacy-surface[open]{display:flex;flex-direction:column}
.privacy-surface .footer-panel-heading{margin-bottom:18px;gap:12px;flex-shrink:0}
#privacy-title{min-width:0;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
@media(max-width:600px){#privacy-title:lang(ru){font-size:clamp(17px,5.6vw,24px)}}
.privacy-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:10px}
.privacy-content section+section{margin-top:20px}
.privacy-content h3{margin:0 0 6px;color:var(--text);font-size:15px;line-height:1.5}
.privacy-content p{margin:0;color:var(--theme-ink-b4b8bf,#b4b8bf);font-size:14px;line-height:1.65}
.privacy-content p+p{margin-top:8px}
.changelog-timeline{list-style:none;margin:0 0 10px 7px;padding:0;border-left:1px solid var(--theme-border-454b54,#454b54)}
.changelog-timeline>li{position:relative;padding:0 0 32px 24px;line-height:1.6}
.changelog-timeline>li:last-child{padding-bottom:12px}
.changelog-timeline>li::before{content:'';position:absolute;left:-5px;top:8px;width:9px;height:9px;border-radius:50%;background:var(--button-bg,var(--lime));box-shadow:0 0 0 5px var(--theme-shadow-1a1d22,#1a1d22)}
.changelog-timeline time{font-size:14px;font-weight:700;color:var(--text)}
.changelog-timeline p{margin:8px 0 0;font-size:14px;color:var(--theme-ink-c9cbd0,#c9cbd0)}
.changelog-points{list-style:disc;margin:8px 0 0;padding-left:18px}
.changelog-points>li{margin:8px 0 0;padding:0;font-size:14px;color:var(--theme-ink-c9cbd0,#c9cbd0)}
.changelog-points p{margin:0}
.changelog-timeline a{text-decoration:underline;text-underline-offset:3px}
.feedback-field{display:flex;flex-direction:column;gap:9px;margin-bottom:20px}
.feedback-field>span{font-size:13px;font-weight:600;color:var(--theme-ink-fff,#fff)}
.feedback-field textarea{width:100%;border:1px solid var(--theme-border-41464e,#41464e);border-radius:8px;background:var(--theme-surface-14171b,#14171b);color:var(--theme-ink-fff,#fff);font-family:inherit;font-size:14px;line-height:1.6;padding:11px 13px}
.feedback-field textarea{min-height:150px;max-height:360px;resize:vertical}
.feedback-field textarea::placeholder{color:var(--theme-ink-fff,#fff);opacity:.6}
.feedback-field textarea:focus-visible{outline:2px solid var(--lime);outline-offset:2px}
.feedback-anonymous-option{display:flex;align-items:center;gap:10px;margin:2px 0 20px;font-size:13px;color:var(--theme-ink-fff,#fff)}
.feedback-anonymous-option input{margin:0;width:16px;height:16px;accent-color:var(--lime)}
.feedback-verification{margin:0}
.feedback-verification:has(#feedback-turnstile:not(:empty)),.feedback-verification:has(#feedback-verification-note:not([hidden])),.feedback-verification:has(#feedback-verification-retry:not([hidden])){margin-bottom:20px}
.feedback-verification p{margin:8px 0 0;font-size:12px;line-height:1.5}
#feedback-verification-retry{margin-top:8px;padding:0;font-size:12px;color:var(--theme-ink-fff,#fff)}
#feedback-submit:disabled{cursor:default}
.feedback-form-footer{display:flex;align-items:center;justify-content:space-between;gap:20px}
#feedback-submit{flex-shrink:0;margin-left:auto;padding:11px 17px;font-size:13px;min-height:44px;background:var(--button-bg,var(--lime));color:#151915;border:1px solid var(--lime);border-radius:8px;font-weight:600}
#feedback-submit:hover:not(:disabled){background:var(--button-hover-bg,#d5f69e);border-color:var(--theme-border-d5f69e,#d5f69e)}
.feedback-status{margin:18px 0 0;font-size:13px;line-height:1.6}
#feedback-dialog,#feedback-dialog p{color:var(--theme-ink-fff,#fff)}
#feedback-dialog .footer-panel-close{color:var(--theme-ink-fff,#fff)}
#feedback-dialog .feedback-intro{margin:-4px 0 24px;font-size:14px;line-height:1.65;color:var(--theme-ink-b4b8bf,#b4b8bf);text-align:start}
dialog.feedback-success-surface{width:440px}
.feedback-success-surface .footer-panel-heading{margin-bottom:18px}
.feedback-success-surface p{margin:0 0 26px;font-size:14px;line-height:1.7;color:var(--theme-ink-b4b8bf,#b4b8bf)}
#feedback-success-done{display:block;margin-left:auto;min-height:42px;padding:10px 18px;font-size:13px;background:var(--button-bg,var(--lime));color:#151915;border:1px solid var(--lime);border-radius:8px;font-weight:600}
#feedback-success-done:hover{background:var(--button-hover-bg,#d5f69e);border-color:var(--theme-border-d5f69e,#d5f69e)}
@media(max-width:640px){.footer-primary{align-items:flex-start;flex-direction:column;gap:10px}.footer-brand-row{justify-content:space-between;gap:12px;width:100%}.footer-links{justify-content:flex-start}dialog.footer-surface{padding:23px}.feedback-form-footer{align-items:flex-start;flex-direction:column;gap:15px}}

@media (max-width:640px), (max-height:500px){
  dialog.feedback-surface[open]{display:flex;flex-direction:column;overflow:hidden;padding:16px}
  .feedback-surface .footer-panel-heading{flex:none;gap:12px;margin-bottom:10px}
  #feedback-title{min-width:0;white-space:normal;overflow-wrap:anywhere}
  .feedback-surface .footer-panel-close{width:44px;height:44px}
  .feedback-panel-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;margin-inline:-16px;padding:4px 16px}
  #feedback-dialog .feedback-intro{margin:0 0 16px}
  .feedback-field{margin-bottom:14px}
  .feedback-field textarea{font-size:16px;height:clamp(112px,24dvh,150px);min-height:112px}
  /* Allow the 300px horizontal widget to use the full panel width. */
  .feedback-verification{margin-inline:-16px}
  #feedback-turnstile{width:min(300px,100%);margin-inline:auto}
  #feedback-verification-note,#feedback-verification-retry{margin-inline:16px}
}
@media (max-width:344px){dialog.feedback-surface[open]{max-width:calc(100vw - 8px)}}

@supports (zoom:.88){
  @media (max-width:640px), (max-height:500px){
    .feedback-panel-content{scrollbar-gutter:stable both-edges}
    .feedback-verification{margin-inline:0}
    /* Keep Turnstile's horizontal layout width and reduce its footprint. */
    #feedback-turnstile{zoom:.88}
    #feedback-verification-note,#feedback-verification-retry{margin-inline:0}
  }
  @media (max-width:359px){
    dialog.feedback-surface[open]{max-width:calc(100vw - 16px)}
    #feedback-turnstile{zoom:.83}
  }
}

/* Dictionary witnesses stay compact and inherit the badge's rarity accent. */
.badge-evidence{display:grid;gap:6px}
.badge-evidence-row{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:12px;row-gap:3px}
.badge-evidence-words{color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
.badge-evidence-word{color:var(--muted);font-size:13px;font-weight:500;text-decoration:none;border-radius:2px;transition:color .18s}
.badge-evidence-word mark{color:var(--badge-accent,var(--lime));background:none;font-weight:600}
.badge-evidence-word:hover{color:var(--text)}
.badge-evidence-word:focus-visible{outline:2px solid var(--badge-accent,var(--lime));outline-offset:3px}
.badge-evidence-operator{white-space:pre-wrap}
.badge-evidence-note{color:var(--muted);font-size:11px;line-height:1.5;max-width:100%;overflow-wrap:anywhere}
.collection-back-to-top{position:fixed;z-index:8;right:max(24px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--lime);border-radius:10px;background:var(--button-bg,var(--lime));color:#151915;box-shadow:0 5px 20px var(--theme-shadow-0008,#0008);transition:background .2s,border-color .2s,transform .2s}
.collection-back-to-top[hidden]{display:none}
.collection-back-to-top:hover{background:var(--button-hover-bg,#d5f69e);border-color:var(--theme-border-d5f69e,#d5f69e);transform:translateY(-2px)}
.collection-back-to-top:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.collection-back-to-top svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:640px){.collection-back-to-top{right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom))}}

/* One shared click/tap meaning box, plus an optional inline reading layout. */
button.badge-evidence-word{border:0;background:none;padding:0;line-height:inherit;text-align:inherit;vertical-align:baseline;cursor:pointer}
.badge-evidence-label{display:none;color:var(--muted);font-size:13px;font-weight:500}
.badge-evidence-label mark{color:var(--badge-accent,var(--lime));background:none;font-weight:600}
.badge-evidence-inline-meaning{display:none;margin-left:5px;color:var(--muted);font-size:11px;font-weight:400;text-decoration:none;line-height:1.5}
.badge-evidence-inline-meaning:hover{text-decoration:underline;text-underline-offset:3px}
.badge-evidence-inline-meaning:focus-visible{outline:2px solid var(--badge-accent,var(--lime));outline-offset:3px;border-radius:2px}
.inline-badge-meanings button.badge-evidence-word{display:none}
.inline-badge-meanings .badge-evidence-label,.inline-badge-meanings .badge-evidence-inline-meaning{display:inline}
.badge-evidence-hint{color:var(--muted);font-size:11px;font-style:italic;line-height:1.5;animation:badge-meaning-hint 3s ease-in-out infinite}
@keyframes badge-meaning-hint{0%,100%{color:var(--muted)}50%{color:var(--text)}}
@media(prefers-reduced-motion:reduce){.badge-evidence-hint{animation:none}}
.inline-badge-meanings .badge-evidence-hint{display:none}
.badge-word-meaning{position:fixed;z-index:30;display:flex;align-items:center;gap:12px;width:max-content;max-width:min(360px,calc(100vw - 24px));max-height:min(280px,calc(100dvh - 24px));padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);box-shadow:0 8px 28px var(--theme-shadow-0008,#0008);overflow-y:auto;overscroll-behavior:contain;animation:badge-meaning-appear .16s ease-out}
.badge-word-meaning[hidden]{display:none}
.badge-word-meaning-text{min-width:0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.badge-word-meaning-source{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:5px;color:var(--muted)}
.badge-word-meaning-source:hover{color:var(--lime);background:var(--theme-surface-ffffff05,#ffffff05)}
.badge-word-meaning-source svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@keyframes badge-meaning-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}

.badge-sentence-meaning{display:block;color:var(--muted);font-size:12px;font-style:italic;line-height:1.5}
.badge-mutation-transcription{margin-left:6px;font-size:12px;color:var(--muted)}
.badge-mutation-transcription mark{color:var(--badge-accent);background:none;font-weight:700}

.badge-labels{grid-column:1;grid-row:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
.badge-odds{color:var(--muted);font-size:11px;font-weight:400;line-height:1.5;white-space:nowrap;font-variant-numeric:tabular-nums}
.badge-subordinate-odds{display:inline-flex;align-items:center}
@media(max-width:640px){.badge-labels{gap:7px}.badge-odds{font-size:10px}}

/* Utility icons share the same visible stroke weight at every rendered size. */
.topbar-actions svg{stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}
.topbar-actions :is(#discord-login,.account-menu-trigger,.leaderboard-button,.settings-button,.help-button,.language-toggle,.theme-toggle)>svg{width:21px;height:21px}
.topbar-actions svg :is(path,circle,rect,line,polyline,polygon,ellipse){vector-effect:non-scaling-stroke}
@media(max-width:760px){.topbar-actions :is(#discord-login,.account-menu-trigger,.leaderboard-button,.settings-button,.help-button,.language-toggle,.theme-toggle)>svg{width:19px;height:19px}}

/* Keep the same two-row navigation and centered content at every width. */
/* Fill short screens while keeping the footer in normal flow below longer pages. */
body{min-height:100vh;min-height:100svh;min-height:100dvh;display:flex;flex-direction:column}
.topbar{display:grid;grid-template-columns:auto minmax(0,1fr);height:auto;min-height:0;max-width:1000px;width:calc(100% - 48px);padding:18px 0 0;gap:14px 20px;margin:0 auto;flex:none}
.topbar .brand{grid-column:1;grid-row:1;font-size:24px;min-width:0}
.topbar-actions{grid-column:2;grid-row:1;order:initial;justify-content:flex-end;margin-left:0;gap:12px}
.topbar>nav{grid-column:1/-1;grid-row:2;order:initial;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;height:48px;margin:0;flex:none}
.topbar .nav{display:flex;align-items:center;justify-content:center;justify-self:center;width:fit-content;max-width:100%;gap:7px;min-width:0;font-size:14px}
.topbar .nav span{margin-left:0}
main{max-width:1000px;width:calc(100% - 48px);padding:34px 0 0;margin:0 auto;flex:1 0 auto;min-width:0}
footer{max-width:1000px;width:calc(100% - 48px);margin:34px auto 0;flex:none}
body:has(#daily-page:not([hidden])>.roll-stage:is(:not(.complete),.is-rolling),#daily-page:not([hidden]) #roll-button[aria-busy="true"])>footer{display:none}
.section-heading{gap:12px;min-width:0}
.section-heading>div{min-width:0}
.section-heading h2{font-size:clamp(17px,4.5vw,28px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.section-heading>span,.section-heading>.text-button{flex:none;white-space:nowrap}
#collection-page>.section-heading{align-items:center}
#collection-page>.section-heading h2{margin:0}
.profile-heading>div{min-width:0;flex:1}
.profile-heading h1{flex-wrap:nowrap;min-width:0;max-width:100%}
.profile-player-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-heading .profile-you-tag,.profile-heading>.text-button{flex:none}
html[data-published="true"] #daily-page #copy-button{display:block;width:min(260px,100%);min-height:50px;margin:16px auto 0;padding:12px 24px;border:0;border-bottom:4px solid var(--theme-border-8ba657,#8ba657);border-radius:8px;background:var(--button-bg,var(--lime));color:#151915;font-size:15px;font-weight:600;line-height:1.4}
html[data-published="true"] #daily-page #copy-button:hover{background:var(--button-hover-bg,#d5f69e)}
html[data-published="true"] #daily-page #copy-button:focus-visible{outline:2px solid var(--lime);outline-offset:4px}
.leaderboard-list,.leaderboard-self{overflow-x:hidden}
@media(max-width:650px){
  .topbar,main,footer{width:calc(100% - 32px)}
  .topbar{gap:12px 10px;padding-top:16px}
  .topbar .brand{font-size:21px}
  .topbar-actions{gap:6px}
  .topbar-actions .account-control{flex:none}
  .topbar-actions #discord-login,.topbar-actions .account-menu-trigger{display:grid;place-items:center;width:34px;height:34px;min-width:34px;padding:5px;border:0;background:none}
  .topbar-actions #discord-login>span,.topbar-actions #account-name,.topbar-actions .account-menu-trigger>.filter-chevron{display:none}
  .topbar-actions .account-menu-trigger>.discord-mark{display:block}
  .topbar .nav{font-size:clamp(11px,2.8vw,13px);gap:4px}
  .topbar .nav span{font-size:10px;padding:2px 4px}
  main{padding-top:24px}
  .section-heading{gap:8px}
  .section-heading>span{font-size:12px}
  #collection-page>.section-heading h2,#discover-title{white-space:normal;overflow:visible;text-wrap:balance}
  #collection-page #collection-count{font-size:12px}
  .profile-heading{gap:12px}
  .profile-heading h1{font-size:clamp(24px,7vw,30px)}
  dialog.leaderboard-surface{width:calc(100vw - 20px);max-width:none;padding:14px}
  .leaderboard-heading{gap:10px}
  .leaderboard-heading>div{gap:8px;min-width:0}
  dialog.leaderboard-surface h2{font-size:23px;white-space:nowrap}
  .leaderboard-tabs{gap:2px;padding:3px}
  .leaderboard-tabs button{font-size:12px;padding:9px 3px}
  .leaderboard-recent-rarities{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible}
  .leaderboard-recent-rarities button{padding:7px 2px;font-size:10px}
  .leaderboard-row{grid-template-columns:28px minmax(0,1fr) max-content;gap:3px 8px;min-width:0;min-height:64px;padding:8px}
  .leaderboard-row:not(.leaderboard-player-only){min-width:0}
  .leaderboard-rank{grid-column:1;grid-row:1/3}
  .leaderboard-player{grid-column:2;grid-row:1;min-width:0}
  .leaderboard-profile,.leaderboard-guest{font-size:13px;line-height:20px}
  .leaderboard-profile{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
  .leaderboard-value{grid-column:3;grid-row:1;font-size:12px;gap:4px}
  .leaderboard-value>span{font-size:9px}
  .leaderboard-roll{grid-column:2/-1;grid-row:2;justify-self:stretch;justify-content:stretch}
  .leaderboard-roll-line{grid-template-columns:minmax(0,1fr) 80px;width:100%;gap:8px}
  .leaderboard-roll-line>strong{text-align:left;font-size:17px;letter-spacing:1.5px}
  .leaderboard-roll-rarity{font-size:9px;padding:3px 5px}
  .leaderboard-player-only{min-height:44px}
  .leaderboard-player-only .leaderboard-rank{grid-row:1}
  .leaderboard-recent{grid-template-columns:minmax(0,1fr) max-content}
  .leaderboard-recent .leaderboard-player{grid-column:1}
  .leaderboard-recent .leaderboard-value{grid-column:2}
  .leaderboard-recent .leaderboard-roll{grid-column:1/-1}
}
@media(max-width:480px){
  .footer-links{flex-wrap:wrap;gap:4px 14px}
  .footer-links button{white-space:nowrap}
  .footer-links>span{display:none}
}
@media(max-width:360px){
  html[lang=en] #collection-page>.section-heading h2{font-size:16px}
}
@media(max-width:380px){.topbar .brand-name{display:none}.topbar .nav #nav-count{display:none}.leaderboard-you-tag{font-size:9px;padding:2px 4px}.leaderboard-value{font-size:11px}}

/* Floating panels keep a quiet scroll track, including while hovered. */
:is(dialog, .badge-word-meaning), dialog :is(.leaderboard-list, .leaderboard-self, .leaderboard-roll-scopes, .leaderboard-recent-rarities, textarea){
  --popup-scrollbar-thumb:color-mix(in srgb,var(--muted) 55%,transparent);
  --popup-scrollbar-thumb-hover:color-mix(in srgb,var(--muted) 85%,transparent);
  scrollbar-width:thin;
  scrollbar-color:var(--popup-scrollbar-thumb) transparent;
}
/* Explicit Chromium/WebKit parts keep native hover backgrounds out of the
   panels; Firefox uses the standard thin scrollbar above. */
@supports selector(::-webkit-scrollbar){
  :is(dialog, .badge-word-meaning), dialog :is(.leaderboard-list, .leaderboard-self, .leaderboard-roll-scopes, .leaderboard-recent-rarities, textarea){scrollbar-width:auto;scrollbar-color:auto}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar, dialog *::-webkit-scrollbar{width:10px;height:10px;background:transparent}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar-track, dialog *::-webkit-scrollbar-track{background:transparent;border:0;box-shadow:none;margin:8px}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar-track:hover, dialog *::-webkit-scrollbar-track:hover{background:transparent}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar-thumb, dialog *::-webkit-scrollbar-thumb{background-color:var(--popup-scrollbar-thumb);background-clip:padding-box;border:2px solid transparent;border-radius:10px;box-shadow:none}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar-thumb:hover, dialog *::-webkit-scrollbar-thumb:hover{background-color:var(--popup-scrollbar-thumb-hover)}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar-corner, dialog *::-webkit-scrollbar-corner{background:transparent}
  :is(dialog, .badge-word-meaning)::-webkit-scrollbar-button, dialog *::-webkit-scrollbar-button{display:none;width:0;height:0}
}
@media(forced-colors:active){
  :is(dialog, .badge-word-meaning), dialog :is(.leaderboard-list, .leaderboard-self, .leaderboard-roll-scopes, .leaderboard-recent-rarities, textarea){--popup-scrollbar-thumb:CanvasText;--popup-scrollbar-thumb-hover:Highlight}
}

.changelog-badges{margin:12px 0 0}
.changelog-timeline a.profile-badge-tag{color:var(--rarity-color);text-decoration:none}
.changelog-removed-badges .profile-badge-tag{cursor:default}

/* BEGIN GENERATED LOCALIZATION */
.language-picker{position:relative;display:flex;flex:none}
.language-toggle{display:grid;place-items:center;flex:none;width:34px;height:34px;min-width:34px;border:0;border-radius:7px;background:none;padding:0;color:var(--muted);transition:color .2s,background .2s}
.language-toggle svg{display:block;transition:transform .25s}
.language-toggle:hover,.language-toggle:focus-visible,.language-toggle[aria-expanded=true]{color:var(--lime);background:var(--theme-surface-ffffff05,#ffffff05)}
.language-toggle:hover svg{transform:rotate(-8deg)}
.language-menu{position:absolute;top:calc(100% + 9px);right:0;z-index:90;width:164px;max-width:calc(100vw - 32px);padding:6px;background:var(--theme-surface-20242a,#20242a);border:1px solid var(--theme-border-454b55,#454b55);border-radius:10px;box-shadow:0 12px 36px var(--theme-shadow-0008,#0008);transform-origin:top right;animation:language-menu-enter .16s ease-out}
.language-menu button{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:40px;padding:10px;border:0;border-radius:5px;background:transparent;color:var(--text);font:inherit;font-size:13px;text-align:left}
.language-menu button:hover,.language-menu button:focus-visible{background:var(--theme-surface-343a43,#343a43);outline:none}
.language-menu button[aria-checked=true]{color:var(--lime);background:var(--theme-surface-2c323a,#2c323a)}
.language-choice-label{display:inline-flex;align-items:center;gap:7px}
.language-choice-check{visibility:hidden}
.language-menu button[aria-checked=true] .language-choice-check{visibility:visible}
@keyframes language-menu-enter{from{opacity:0;transform:translateY(-4px) scale(.97)}to{opacity:1;transform:none}}
.topbar-actions .help-button{order:initial}
html[lang=ru] .word-meaning::before,html[lang=ru] #badge-word-meaning:not([hidden]) #badge-word-meaning-text::before{content:'Перевод на английский';display:block;color:var(--muted);font-size:10px;font-style:normal;font-weight:400;margin-bottom:3px}
html[lang=ru] .inline-badge-meanings .badge-evidence-inline-meaning::before{content:'англ. ';font-style:normal}
html[lang=ru] .badge-sentence-meaning::before{content:'По-английски: ';font-style:normal}
html[lang=ru] .badge-card h3{overflow-wrap:anywhere}
html[lang=ru] .leaderboard-tabs button{padding-inline:9px;font-size:13px;white-space:nowrap}
html[lang=ru] .leaderboard-you-tag,html[lang=ru] .profile-you-tag{white-space:nowrap}
html[lang=ru] .history-sort-trigger{min-width:0}
html[lang=ru] .history-sort-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){
  .topbar-actions{gap:3px}
  .topbar-actions #discord-login,.topbar-actions .account-menu-trigger,.topbar-actions .leaderboard-button,.topbar-actions .settings-button,.topbar-actions .help-button,.topbar-actions .language-toggle,.topbar-actions .theme-toggle{width:30px;min-width:30px;height:32px}
  html[lang=ru] .topbar .nav{font-size:clamp(10px,2.65vw,12px);gap:3px}
  html[lang=ru] .topbar .nav span{font-size:9px;padding:2px 3px}
  html[lang=ru] .leaderboard-tabs button{font-size:clamp(10px,2.65vw,12px);padding-inline:5px}
  html[lang=ru] .leaderboard-heading{align-items:flex-start}
  html[lang=ru] .leaderboard-heading>div{flex:1;flex-wrap:wrap;row-gap:5px;column-gap:10px}
  html[lang=ru] .leaderboard-heading h2{flex-basis:100%;font-size:clamp(20px,5.7vw,23px)}
  html[lang=ru] .leaderboard-heading .leaderboard-limit{white-space:nowrap}
  html[lang=ru] .footer-panel-heading h2{font-size:clamp(20px,5.4vw,24px)}
  html[lang=ru] .leaderboard-roll-rarity,html[lang=ru] .history-row>.rarity{font-size:9px;letter-spacing:0}
  html[lang=ru] .leaderboard-roll-line{gap:7px}
  html[lang=ru] .leaderboard-roll-line>.leaderboard-roll-rarity{min-width:73px}
  html[lang=ru] .history-toolbar{gap:10px}
  html[lang=ru] .section-heading h2{font-size:clamp(18px,5.4vw,24px)}
}
@media(prefers-reduced-motion:reduce){.language-toggle,.language-toggle svg{transition:none}.language-menu{animation:none}}

/* END GENERATED LOCALIZATION */
