@font-face{font-family:'DictionaryRetro';src:url('/fonts/share-tech-mono.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
/* System fallbacks are intentional for Japanese glyphs. */
.radical-card-heading{display:flex;align-items:center;gap:24px}.radical-card-heading>div{min-width:0}.radical-card-heading h2{margin:8px 0;font-size:24px;overflow-wrap:anywhere}.radical-card-heading p{margin:0;color:var(--muted)}.radical-glyph{font-size:62px;line-height:1.4;flex-shrink:0;min-width:82px;text-align:center;color:var(--gold)}.radical-result .result-bottom{gap:16px;flex-wrap:wrap}.radical-other{margin-top:20px;border-top:1px solid var(--border);padding-top:16px}.radical-other summary{cursor:pointer;color:var(--muted);overflow-wrap:anywhere}.radical-other ul{padding-left:20px;margin:14px 0 0}.radical-panel>.quiet{margin:12px 0 0}.radical-panel .button{display:inline-block}.radical-forms{list-style:none;padding:0;margin:0;display:grid;gap:18px}.radical-forms li{display:flex;align-items:center;gap:20px}.radical-forms li>span:last-child{overflow-wrap:anywhere;min-width:0}.radical-form-glyph{font-size:36px;min-width:48px;display:inline-block;vertical-align:middle;color:var(--gold);flex-shrink:0}.kanji-radical p{margin:14px 0 0}@media(max-width:520px){.radical-card-heading{gap:14px}.radical-card-heading h2{font-size:20px}.radical-glyph{font-size:48px;min-width:56px}.radical-forms li{gap:12px}}
@font-face{font-family:'DictionaryPixel';src:url('/fonts/pixelify-sans.ttf') format('truetype');font-style:normal;font-weight:400 700;font-display:swap}
:root{color-scheme:dark;--bg:#171a19;--surface:#202421;--border:#b6ba9b24;--gold:#e8c48b;--text:#eeede2;--muted:#b5b9ac;--green:#bad0ac;--jp:'Yu Gothic','Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:30px}body{margin:0;background:radial-gradient(ellipse at 85% 10%,#2b32282e,transparent 50%),var(--bg);color:var(--text);font-family:DictionarySans,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:15px;line-height:1.65}a{color:var(--gold);text-decoration:none}a:hover{text-decoration:underline;text-underline-offset:4px}button,input{font:inherit}button,a,input,summary{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:4px}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.25;font-weight:600}h1{font-size:clamp(32px,4.8vw,62px);letter-spacing:-1.6px}h2{font-size:25px;letter-spacing:-.5px}h3{font-size:17px}p{margin-bottom:16px}code{font-size:13px;overflow-wrap:anywhere;color:var(--green)}[lang=ja]{font-family:var(--jp)}.skip{position:absolute;top:-100px;left:12px;padding:12px;background:var(--gold);color:#161b16;z-index:5}.skip:focus{top:12px}.site-header{max-width:1220px;margin:auto;padding:24px 30px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px;color:var(--text);font-size:16px;letter-spacing:2px;font-weight:650;line-height:1.4}.brand:hover{text-decoration:none}.brand b{color:var(--gold);font-weight:400}.brand small{display:block;color:var(--muted);font-size:9px;letter-spacing:3px;margin-top:4px}.site-header nav{display:flex;gap:28px;align-items:center}.tags-link{color:var(--muted);font-size:13px}.game-link{padding:9px 17px;border:1px solid #bdaa7860;border-radius:6px;font-size:13px}.game-link span{margin-left:16px}main{max-width:1160px;margin:auto}.hero{border:1px solid var(--border);border-radius:12px;min-height:530px;position:relative;overflow:hidden;background:linear-gradient(90deg,#17221df7 15%,#17221dce 50%,#17221d10),linear-gradient(0deg,#17221dea,transparent 65%),url('/assets/forest-crossroads-20260928.webp') 75% 50%/cover}.hero-content{position:relative;z-index:1;padding:52px 54px 32px;max-width:850px}.eyebrow{color:var(--gold);letter-spacing:2.5px;font-size:10px;font-weight:700;margin-bottom:19px}.hero h1{margin-bottom:20px;line-height:1.08;font-weight:550}.hero h1 span{color:#ead6ae}.lead{font-size:19px;color:#d0d5c6;line-height:1.55}.hero-seal{position:absolute;right:9%;top:90px;color:#dfddbb50;text-align:center;transform:rotate(-7deg);border:1px solid #babb9a44;padding:10px 22px}.hero-seal span{display:block;font-size:92px;font-family:serif;line-height:1.1}.hero-seal small{letter-spacing:5px;font-family:var(--jp);font-size:12px}.search-form{max-width:790px}.search-form label{display:block;font-size:12px;color:#cdd1c1;margin-bottom:9px}.hero-search{margin-top:28px}.search-row{display:flex;align-items:center;background:#f0efe4;color:#253024;border:1px solid #fff7;box-shadow:0 6px 25px #0003;border-radius:7px;padding:6px;gap:8px}.search-icon{font-size:31px;padding-left:10px;line-height:1}.search-row input{flex:1;min-width:0;width:100%;background:transparent;border:0;color:#202c22;font-size:16px;padding:10px 0;outline-offset:0}.search-row input::placeholder{color:#6f776a;opacity:1}.search-row button{border:0;border-radius:4px;background:#304836;color:#f1efd8;padding:12px 20px;cursor:pointer;white-space:nowrap;font-weight:600}.search-row button:hover{background:#223c2b}.search-row button span{padding-left:20px}.search-help{font-size:12px;color:#c2c8b8;margin:12px 0 0}.search-help a{color:#dddbbd;text-decoration:underline;text-underline-offset:3px}.quick-paths{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0 48px}.quick-paths>a{display:flex;align-items:center;gap:16px;background:#222722;padding:22px;border:1px solid var(--border);border-radius:8px;color:var(--text);transition:border-color .15s,background .15s}.quick-paths>a:hover{background:#2c3229;border-color:#d8c49a60;text-decoration:none}.quick-paths strong{display:block;font-size:14px;margin-bottom:3px}.quick-paths div>span{display:block;font-size:11px;color:var(--muted)}.quick-paths b{margin-left:auto;font-weight:400;color:var(--gold)}.path-icon{font-size:28px;width:39px;flex-shrink:0;color:var(--gold)}.path-icon.kana{font-size:30px}.coverage{display:grid;grid-template-columns:1fr 1.1fr;gap:50px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:35px 0;margin-bottom:62px}.coverage .eyebrow{margin-bottom:14px}.coverage h2{font-size:26px;margin-bottom:0}.coverage p:not(.eyebrow){color:var(--muted);font-size:14px;margin:0 0 12px}.coverage strong{font-weight:500;color:var(--text)}.coverage a{font-size:13px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:22px}.section-heading h1,.section-heading h2{margin:0}.section-heading .eyebrow{margin-bottom:10px}.section-heading>a{font-size:13px;flex-shrink:0}.quiet{color:var(--muted);font-size:13px}.guide>p{font-size:14px;max-width:820px;color:var(--muted)}.tag-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-top:25px;align-items:start}.tag-group{padding:26px 24px;background:var(--surface);border:1px solid var(--border);border-radius:9px;min-width:0}.tag-group h3{font-size:18px;color:#e4d5b9;margin-bottom:10px}.tag-group>.quiet{font-size:12px;max-width:850px;margin-bottom:0}.tag-group dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 28px;margin:20px 0 0}.tag-group dl>div{min-width:0;margin:0}.tag-group dl>div:last-child{margin-bottom:0}.tag-group dt{margin-bottom:6px}.tag-group dd{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.tag,.inline-tag{display:inline-block;border:1px solid #b7c79833;border-radius:5px;padding:4px 8px;color:#d6ddbc;background:#a8bb7d0a;font-family:ui-monospace,Consolas,monospace;font-size:12px;overflow-wrap:anywhere;max-width:100%}.tag:hover,.inline-tag:hover{background:#afbc8530;text-decoration:none;border-color:#b7c79877}.syntax-note{padding:28px;border:1px dashed #b6ba9b30;border-radius:9px;margin-top:20px}.syntax-note h3{font-size:16px}.syntax-note p{font-size:13px;color:var(--muted);margin-bottom:10px}.syntax-note p:last-child{margin:0}.syntax-note code{color:#ced6b4}.bottom-game{display:grid;grid-template-columns:1fr 1.1fr;gap:50px;align-items:center;margin:60px 0 30px}.bottom-game>.game-card{margin:0}.bottom-game>div{padding-right:20px}.bottom-game>div>p{font-size:14px}.game-card{padding:28px;border:1px solid #dbbd7a35;border-radius:9px;background:linear-gradient(120deg,#343626,#242c23);margin-top:22px}.game-card .eyebrow{font-size:8px;display:block;line-height:1.8}.game-card h2{color:#f0ddaf;font-size:24px;margin-bottom:14px;line-height:1.3}.game-card p{font-size:13px;color:#c6cbb8}.game-card .quiet{font-size:11px;margin:16px 0 0}.button{display:inline-flex;gap:40px;align-items:center;background:#e3c691;border:1px solid #edc87d;color:#252d21;border-radius:5px;padding:10px 16px;font-size:13px;font-weight:650}.button:hover{background:#f0d9ab;text-decoration:none}footer{max-width:1160px;margin:65px auto 0;border-top:1px solid var(--border);padding:30px 0 45px;display:flex;gap:24px;align-items:center;font-size:12px}footer p{margin:0;color:var(--muted)}.footer-brand{font-size:14px;color:var(--text);font-weight:600}footer nav{margin-left:auto;display:flex;gap:22px}footer nav a{color:var(--muted)}.search-bar{background:#202720;border:1px solid var(--border);border-radius:9px;padding:22px 28px;margin-bottom:35px}.search-bar .search-form{max-width:none}.search-bar .search-help{margin-bottom:0}.search-bar .search-form label{font-size:11px}.search-bar .search-row{box-shadow:none}.results-section>.section-heading h1{font-size:32px;letter-spacing:-.5px}.results-grid,.entry-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:28px;align-items:start}.results-grid aside{position:sticky;top:20px}.result{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:24px 28px;margin-bottom:14px;min-width:0}.result-top{display:flex;align-items:start;justify-content:space-between;gap:18px}.result h2{font-size:20px;margin-bottom:14px}.result h2>a{color:var(--text)}.jp{display:block;font-size:31px;font-weight:500;line-height:1.45;overflow-wrap:anywhere}.reading{display:block;font-size:13px;letter-spacing:.7px;color:#c5cfb2;font-weight:400;line-height:1.8}.badges{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.badge{display:inline-block;border:1px solid #b5b59a35;border-radius:4px;padding:3px 7px;font-size:10px;color:#ccc9b4;white-space:nowrap;font-weight:400;letter-spacing:.1px}.badge.common{border-color:#98b47c33;color:#b6c99e;background:#8aa56a10}.kind{color:var(--gold);font-size:9px;font-weight:650;letter-spacing:1.5px}.meaning{margin:0 0 10px;color:#e5e3d5;font-size:16px}.pending{font-size:11px;color:#d1be94;display:inline-block;background:#b38e5520;padding:3px 8px;border-radius:4px}.english{font-size:13px;color:var(--muted);overflow-wrap:anywhere}.english span{font-size:11px}.result-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:12px;border-top:1px solid var(--border);padding-top:14px;margin-top:17px}.result-bottom>a{font-size:12px}.analysis{border-left:2px solid #a7bd86;background:#a9bd8d0b;padding:12px 16px;margin:8px 0 16px;border-radius:0 5px 5px 0}.analysis p{font-size:13px;margin:6px 0 0}.analysis .quiet{font-size:12px}.panel{padding:26px;background:var(--surface);border:1px solid var(--border);border-radius:9px;margin-bottom:22px;min-width:0}.panel h2{font-size:21px;margin-bottom:18px}.panel h3{font-size:15px}.panel p:last-child{margin-bottom:0}.panel p,.panel li{overflow-wrap:anywhere}.quick-tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}.notice{border:1px solid #dfc58c35;border-radius:6px;padding:12px 18px;font-size:12px;background:#dfc58c09;color:#cfcbb8}.pagination{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:25px 0;font-size:12px}.pagination a{border:1px solid var(--border);padding:9px 14px;border-radius:5px}.pagination>span{color:var(--muted)}.empty{text-align:center;padding:40px 25px}.empty>span{font-size:52px;color:var(--gold)}.empty h2{margin-top:20px}.empty p{color:var(--muted);font-size:14px}.kanji-result{display:flex;gap:24px;align-items:center}.kanji-tile{font-size:45px;line-height:1.4;width:85px;flex-shrink:0;text-align:center;padding:8px;background:#181f19;border:1px solid var(--border);border-radius:6px;color:#f0e8cf}.kanji-result h2{font-size:17px;margin:10px 0 4px}.kanji-result .reading,.kanji-result .quiet{margin:0}.open-card{margin-left:auto;font-size:22px}.crumbs{display:flex;gap:14px;color:var(--muted);font-size:12px;margin:20px 0 30px}.entry-heading{padding:0 0 35px}.entry-heading h1{font-size:40px;margin-bottom:10px;overflow-wrap:anywhere}.entry-heading h1 .jp{font-size:60px;line-height:1.3}.entry-heading .reading{font-size:18px;letter-spacing:1px;margin-top:8px}.romaji{color:var(--muted);font-size:14px;margin:5px 0 15px}.entry-heading .eyebrow{margin-bottom:14px}.senses{padding-left:24px;margin:0}.senses li{padding-left:10px;margin-bottom:24px}.senses li:last-child{margin-bottom:0}.senses li::marker{color:var(--gold);font-size:13px}.senses h3{font-size:18px;margin-bottom:10px}.senses p{font-size:14px;margin-bottom:8px}.example{margin:0;padding:22px 0;border-top:1px solid var(--border)}.example:last-child{padding-bottom:0}.example blockquote{font-size:20px;margin:0 0 5px;line-height:1.8}.example .reading{font-size:12px;margin-bottom:12px}.example figcaption{font-size:14px;color:var(--muted)}.word-kanji{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px}.word-kanji>a{display:flex;align-items:center;flex-direction:column;text-align:center;padding:18px 10px;border:1px solid var(--border);border-radius:6px;background:#151e1833}.word-kanji>a:hover{background:#34402b;text-decoration:none}.kanji-glyph{font-size:42px;color:#eee3c8}.word-kanji strong{font-size:12px;color:var(--text);font-weight:400;margin-top:8px}.word-kanji .reading{font-size:10px}.variants{font-size:19px;line-height:1.8}.source-panel p{font-size:12px;color:var(--muted)}.source-panel>a{font-size:12px}.source-panel details{margin-top:20px;font-size:12px}.source-panel summary{cursor:pointer;color:var(--gold)}.source-panel details p{margin-top:12px}.kanji-heading{display:flex;align-items:center;gap:32px}.hero-kanji{font-size:100px;line-height:1.2;width:156px;height:166px;border:1px solid var(--border);border-radius:8px;display:grid;place-items:center;background:#202720;color:#e8ddbe;flex-shrink:0}.kanji-heading h1{font-size:34px;letter-spacing:-.5px}.readings-grid{display:grid;grid-template-columns:1fr 1fr;gap:25px}.readings-grid h3{color:var(--gold);font-size:12px}.readings-grid p{font-size:20px}.separator{color:var(--muted);font-size:13px}.stroke-preview{display:flex;gap:25px;align-items:center}.stroke-preview svg{width:150px;height:150px;border:1px solid var(--border);border-radius:6px;padding:8px;flex-shrink:0;background:#172018}.stroke-preview path{fill:none;stroke:#e5d3ab;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.stroke-preview .stroke-grid{stroke:#bec69e35;stroke-width:.6;stroke-dasharray:3 3}.stroke-preview p{font-size:12px;color:var(--muted)}.components{margin-bottom:0}.components>div{padding:12px 0;border-top:1px solid var(--border)}.components dt{font-size:19px;margin-bottom:7px}.components dd{margin:0;font-size:13px;color:var(--muted)}.related{margin-top:34px}.related>.section-heading{margin-bottom:10px}.related>.section-heading h2{font-size:22px}.prose{max-width:860px;line-height:1.8}.prose h2{margin-top:32px}.prose h2:first-child{margin-top:0}.prose p,.prose li{font-size:14px;color:#c8cdbc}.prose li{margin:10px 0}.error{margin:40px 0;padding:45px;min-height:230px}.error h1{font-size:30px}
@media(min-width:1400px){.hero{min-height:555px}.hero-content{padding-top:58px}.hero-seal{right:10%}}
@media(max-width:1220px){main,footer{margin-left:30px;margin-right:30px}.hero-seal{right:5%}.hero-content{padding:40px}.hero{min-height:500px}.quick-paths>a{padding:18px;gap:10px}}
@media(max-width:920px){.hero-seal{display:none}.hero{background-position:80% 50%}.tag-group dl{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-paths{gap:10px}.quick-paths>a{align-items:start}.quick-paths .path-icon{display:none}.quick-paths b{display:none}.coverage,.bottom-game{gap:30px}.results-grid,.entry-grid{grid-template-columns:minmax(0,1fr) 240px;gap:18px}.panel{padding:22px}.result{padding:22px}.result-top{display:block}.result-top .badges{margin-bottom:12px}.site-header nav{gap:18px}footer{flex-wrap:wrap}footer nav{width:100%;margin:0}.word-kanji{grid-template-columns:repeat(2,minmax(0,1fr))}.kanji-result{gap:15px}.kanji-tile{width:66px;font-size:38px}.kanji-result .open-card{display:none}}
@media(max-width:680px){main,footer{margin-left:16px;margin-right:16px}.site-header{padding:18px 16px;gap:10px}.brand{font-size:12px;letter-spacing:1.1px;gap:8px}.brand img{width:30px;height:30px}.brand small{font-size:8px;letter-spacing:2px}.tags-link{display:none}.game-link{font-size:11px;padding:8px 11px}.game-link span{margin-left:6px}.hero{min-height:0;border-radius:9px;background:linear-gradient(90deg,#17221df5,#17221db5),url('/assets/forest-crossroads-20260928.webp') 60% 50%/cover}.hero-content{padding:32px 22px 26px}.hero h1{font-size:39px;letter-spacing:-1.6px}.hero .eyebrow{font-size:8px;letter-spacing:1.6px}.lead{font-size:16px}.hero .lead br{display:none}.hero-search{margin-top:24px}.search-icon{display:none}.search-row{gap:4px;padding:5px}.search-row input{padding:10px 5px;font-size:16px}.search-row button{padding:11px 13px;font-size:13px}.search-row button span{display:none}.search-help{font-size:11px;line-height:1.9}.quick-paths{grid-template-columns:1fr;gap:8px;margin:14px 0 32px}.quick-paths>a{padding:13px 18px;align-items:center;gap:15px}.quick-paths .path-icon{display:block;font-size:23px;width:28px}.quick-paths b{display:block}.quick-paths strong{font-size:13px;margin-bottom:1px}.quick-paths div>span{font-size:11px}.coverage{grid-template-columns:1fr;gap:18px;padding:28px 4px;margin-bottom:38px}.coverage h2{font-size:23px}.coverage .eyebrow{font-size:9px}.coverage p:not(.eyebrow){font-size:13px}.section-heading{align-items:start}.section-heading>.quiet{display:none}.section-heading h2{font-size:24px}.section-heading .eyebrow{font-size:9px}.tag-grid{gap:12px}.tag-group dl{grid-template-columns:minmax(0,1fr);gap:17px}.tag-group{padding:23px}.tag-group>.quiet{min-height:0}.tag-group dl{display:grid;grid-template-columns:1fr 1fr;gap:18px 15px}.tag-group dl>div{margin:0;min-width:0}.tag{font-size:11px}.tag-group dd{font-size:11px}.tag-group h3{font-size:18px}.syntax-note{padding:22px}.bottom-game{grid-template-columns:1fr;gap:28px;margin:35px 0 0}.bottom-game>div{padding:0 4px}.game-card{padding:26px}.game-card h2{font-size:24px}footer{margin-top:40px;padding:25px 0 30px;gap:12px 20px}footer nav{display:grid;grid-template-columns:1fr 1fr;gap:13px;font-size:11px;margin-top:10px}.search-bar{padding:16px;margin-bottom:26px}.search-bar .search-form label{font-size:10px}.results-grid,.entry-grid{grid-template-columns:1fr}.results-grid aside{position:static}.results-section>.section-heading h1{font-size:27px}.section-heading>a{font-size:11px;flex-shrink:1;text-align:right}.result{padding:21px;margin-bottom:12px}.result-top{display:flex;gap:10px}.result-top .badges{max-width:120px;justify-content:end}.result h2{margin-bottom:12px}.jp{font-size:29px}.reading{font-size:12px}.meaning{font-size:15px}.result-bottom{gap:10px}.result-bottom a{font-size:11px}.panel{padding:23px;margin-bottom:16px}.panel h2{font-size:20px}.kanji-result{gap:18px}.kanji-tile{width:67px}.kanji-result .open-card{display:block;font-size:18px}.kanji-result h2{font-size:16px}.kanji-result .badge{font-size:9px}.crumbs{margin:15px 0 24px}.entry-heading{padding:0 6px 26px}.entry-heading h1 .jp{font-size:49px}.entry-heading .reading{font-size:16px}.entry-heading .eyebrow{font-size:9px}.entry-heading h1{font-size:33px}.word-kanji{grid-template-columns:repeat(auto-fit,minmax(105px,1fr))}.kanji-heading{gap:19px}.hero-kanji{width:98px;height:113px;font-size:72px}.kanji-heading h1{font-size:26px;letter-spacing:-.7px}.kanji-heading .eyebrow{margin-bottom:10px;font-size:8px}.kanji-heading .reading{font-size:13px;margin:0 0 10px}.kanji-heading .badge{font-size:9px}.readings-grid{gap:18px}.readings-grid p{font-size:18px}.stroke-preview svg{width:120px;height:120px}.stroke-preview{gap:18px}.error{padding:25px}.error h1{font-size:26px}.prose h1{font-size:28px}}
@media(max-width:360px){.hero-content{padding:28px 17px 22px}.hero h1{font-size:34px}.brand{font-size:11px}.tag-group{padding:20px}.tag-group dl{grid-template-columns:1fr}.result-top{display:block}.result-top .badges{max-width:none;justify-content:start}.kanji-heading{gap:14px}.hero-kanji{width:83px;font-size:64px}.kanji-heading h1{font-size:23px}.kanji-result{padding:18px;gap:12px}.kanji-result .open-card{display:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
/* A quiet, unmistakable invitation to the game; dictionary copy stays readable. */
.site-header .game-link{display:inline-flex;align-items:center;gap:14px;background:#dfc087;color:#253024;border:1px solid #efcf93;border-bottom:3px solid #9e8252;border-radius:6px;padding:10px 20px;font:600 20px/1.25 'DictionaryPixel',monospace;letter-spacing:.3px;white-space:nowrap;box-shadow:0 3px 0 #0b110c55}
.site-header .game-link:hover{background:#ecd3a4;text-decoration:none}.site-header .game-link span{margin:0;font-family:system-ui,sans-serif;font-size:17px}
.word-result-body{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:start}.result-kanji{display:flex;flex-wrap:wrap;gap:7px;max-width:154px;justify-content:end}.result-kanji>span{width:100%;text-align:right;font-size:10px;letter-spacing:1px;color:var(--muted)}.result-kanji a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:54px;padding:7px 8px;border:1px solid #bdcca23d;border-radius:5px;background:#162018;color:#e8ddbf}.result-kanji a:hover{background:#303e2b;text-decoration:none}.result-kanji b{font:400 25px/1.4 var(--jp)}.result-kanji small{font:400 9px/1.5 var(--jp);color:var(--muted);max-width:75px;overflow-wrap:anywhere}
@media(max-width:680px){.site-header .game-link{font-size:17px;padding:9px 12px;gap:8px}.site-header .game-link span{font-size:14px}.hero h1 span{font-size:.85em;letter-spacing:-1px}.word-result-body{gap:12px}.result-kanji{max-width:68px}.result-kanji a{min-width:52px;padding:5px}.result-kanji small{max-width:56px;font-size:8px}}
@media(max-width:360px){.site-header .game-link{font-size:16px;padding:9px 10px}.site-header .game-link span{display:none}.hero h1 span{font-size:.85em;letter-spacing:-1.2px}}

/* Readings remain legible at first glance, including the compact kanji links. */
.reading{font-size:16px;line-height:1.65;letter-spacing:.4px}
.entry-heading .reading{font-size:20px}.word-kanji .reading{font-size:15px}.example .reading{font-size:15px}
.result-kanji{max-width:218px}.result-kanji a{min-width:72px;padding:8px 10px}.result-kanji small{font-size:14px;line-height:1.65;max-width:86px;color:#c5cfb2}
.support-link{display:inline-flex;align-items:center;gap:6px;min-height:36px;color:var(--muted);font-size:13px;white-space:nowrap}
.support-link>span{font-size:18px;line-height:1}.support-link:hover{color:var(--gold)}
footer{flex-wrap:wrap}.dictionary-support{flex:0 0 100%;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 0 24px;border-bottom:1px solid var(--border)}
.dictionary-support>div{max-width:760px}.dictionary-support h2{font-size:17px;letter-spacing:0;margin:0 0 8px;color:#d5d8c9}.dictionary-support p{font-size:13px;line-height:1.8}
.support-link{padding:8px 13px;border:1px solid #b6ba9b40;border-radius:5px;color:#d5d8c9}
@media(max-width:680px){
 .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}.site-header .brand{grid-column:1;grid-row:1}.site-header nav{display:contents}.site-header .game-link{grid-column:2;grid-row:1}.site-header .support-link{grid-column:1/-1;grid-row:2;justify-self:end;min-height:32px;font-size:12px}
 .result-kanji{max-width:90px}.result-kanji a{min-width:66px;padding:7px}.result-kanji small{font-size:14px;max-width:74px}.entry-heading .reading{font-size:18px}.kanji-heading .reading{font-size:17px}
 .dictionary-support{align-items:start;flex-direction:column;gap:14px;padding-bottom:22px}.dictionary-support h2{font-size:16px}.dictionary-support p{font-size:13px}
}

.result-kanji small{text-align:center}.result-kanji small span{display:block}
@media(max-width:680px){.word-result-body .result-top{display:block}.word-result-body .result-top .badges{max-width:none;justify-content:start;margin-bottom:10px}}

.support-link,.support-link:hover,.support-link:focus-visible,.support-link>span{text-decoration:none}

/* The game card uses the same soft retro typeface as the game interface. */
.game-card .button{font:400 18px/1.4 'DictionaryRetro',monospace;letter-spacing:.1px;min-height:44px;gap:24px}
.brand img{display:block;flex-shrink:0;object-fit:contain}
/* Stroke order: the static steps remain usable without JavaScript. */
.stroke-player [hidden]{display:none!important}
.stroke-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.stroke-heading h2{margin:0}.stroke-heading .badge{font-size:12px}
.stroke-stage{display:grid;grid-template-columns:minmax(160px,240px) minmax(0,1fr);gap:28px;align-items:center}
.stroke-player svg{fill:none;stroke:#d0c7ab;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.stroke-canvas{display:block;width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:9px;padding:12px;background:#172018}
.stroke-player .stroke-grid{stroke:#bec69e25;stroke-width:.5;stroke-dasharray:3 3}
.stroke-outline{stroke:#545d4f}.stroke-ink{stroke:#b9c4a4}.stroke-ink .is-current,.stroke-highlight{stroke:#f1cc83}
.stroke-controls{min-width:0;display:grid;gap:12px}.stroke-status{margin:0;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.stroke-controls button{min-height:44px;border:1px solid #b7c79845;border-radius:6px;color:var(--text);background:#19231c;padding:8px 12px;font:inherit;font-size:13px;cursor:pointer}
.stroke-controls button:hover:not(:disabled){background:#34402b}.stroke-controls button:disabled{opacity:.38;cursor:default}
.stroke-controls .stroke-play{background:#dcc18b;border-color:#edc87d;color:#252d21;font-weight:650}
.stroke-controls button.stroke-play:hover:not(:disabled){background:#f0d9ab}.stroke-navigation{display:flex;gap:8px;align-items:center}.stroke-navigation button{flex:1;padding:8px}
.stroke-controls .stroke-repeat{font-size:12px;background:transparent;justify-self:start;padding:4px 10px;min-height:36px}
.stroke-speed{display:grid;gap:0;color:var(--muted);font-size:13px}.stroke-speed>span{display:flex;justify-content:space-between;align-items:center}.stroke-speed output{color:var(--gold);font-variant-numeric:tabular-nums;font-size:15px}
.stroke-speed input{width:100%;margin:0;min-height:36px;accent-color:#e3c691;cursor:pointer}.stroke-speed .stroke-speed-limits{font-size:11px}
.stroke-player :is(button,input,summary):focus-visible{outline:2px solid var(--gold);outline-offset:4px}
.stroke-steps{margin-top:22px;border-top:1px solid var(--border);padding-top:16px}.stroke-steps summary{cursor:pointer;color:var(--gold);font-size:14px;padding:5px 0}
.stroke-steps>p{margin:14px 0}.stroke-steps ol{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;padding:0;margin:0}
.stroke-steps li{position:relative;min-width:0;background:#172018;border:1px solid var(--border);border-radius:6px;padding:20px 3px 3px}
.stroke-steps svg{display:block;width:100%;aspect-ratio:1}.stroke-step-number{position:absolute;top:4px;left:9px;color:var(--gold);font-size:12px;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.stroke-stage{grid-template-columns:1fr;gap:18px}.stroke-canvas{max-width:240px;justify-self:center}.stroke-controls{width:100%;max-width:330px;justify-self:center}}

/* Examples stay beside the exact sense they illustrate. */
.sense-examples{margin:18px 0 6px;padding:16px 18px;border-left:2px solid #d7be854d;background:#14201955;border-radius:0 7px 7px 0}
.sense-examples .example-label{color:var(--gold);font-size:11px;letter-spacing:1.2px;text-transform:uppercase;margin:0 0 10px}
.sense-examples .example{padding:16px 0;margin:0}.sense-examples .example:first-of-type{border-top:0;padding-top:0}.sense-examples .example:last-child{padding-bottom:0}
.example mark{color:#f2d493;background:#dbc08012;border-radius:3px;padding:1px 2px;box-decoration-break:clone}
.sense-examples .reading{font-size:16px;letter-spacing:.4px;line-height:1.9;margin:4px 0 9px}.sense-examples figcaption{color:var(--text);font-size:15px}
.sense-examples .example-context{font-size:13px;color:var(--muted);margin:9px 0 0;line-height:1.65}
@media(max-width:480px){.sense-examples{padding:13px 12px;margin-left:-12px}.sense-examples blockquote{font-size:19px}}

/* Source-bound grammar and usage, scoped to the displayed sense. */
.word-grammar{color:var(--muted,#b9bdae);font-size:.93rem;line-height:1.65;margin:.7rem 0 .3rem;overflow-wrap:anywhere}.word-usage{color:var(--gold,#dfc58e);font-size:.9rem;line-height:1.65;margin:.25rem 0 .7rem;overflow-wrap:anywhere}.label-prefix{font-weight:600}.usage-note{border-left:2px solid #aebd91;padding:.55rem 1rem;line-height:1.75;background:#ffffff03}.senses>li>.word-grammar:first-child{margin-top:0}
/* Native disclosures work with touch and keyboard, without requests or JS. */
.n0-badge{position:relative;display:inline-block}
.n0-badge summary{cursor:pointer;list-style:none}
.n0-badge summary::-webkit-details-marker{display:none}
.n0-help{display:none;position:absolute;z-index:5;top:100%;left:0;width:min(280px,75vw);padding:16px;background:#202620;border:1px solid #59634d;border-radius:8px;box-shadow:0 8px 24px #0008;font-size:.9rem;line-height:1.6;color:#ede9d6;font-weight:400}
.n0-help p{margin:0 0 8px}
.n0-badge[open]>.n0-help{display:block}

.more-readings{margin:14px 0;max-width:100%}
.more-readings summary{cursor:pointer;color:#d5c990;font-size:.95rem;padding:5px 0}
.more-readings[open]>div{padding-top:8px}
.more-readings h3{font-size:.85rem;margin:10px 0 4px}
.more-readings p{overflow-wrap:anywhere;line-height:1.9}
.search-suggestions a{display:inline-block;margin:4px 6px;text-underline-offset:4px}
.kanji-result>div{min-width:0;flex:1}
.more-readings .readings-grid>div:only-child{grid-column:1/-1}
.readings-grid span[lang],.more-readings span[lang]{display:inline-block;max-width:100%}
@media(max-width:520px){.n0-help{transform:translateX(-35%)}.readings-grid{grid-template-columns:1fr;gap:14px}}

/* Documentary enrichment: reuse panels and native disclosure controls. */
.research-panel>summary{font-size:1.12rem;font-weight:600;cursor:pointer;line-height:1.5}.research-panel[open]>summary{margin-bottom:1rem}.research-reading,.research-meaning{padding:.8rem 0;border-bottom:1px solid var(--border,#3a4137)}.research-reading h3{font-size:.95rem}.research-sources{padding-left:1.3rem}.research-sources li{margin-bottom:1.2rem;scroll-margin-top:1rem}.research-panel p,.research-panel li{overflow-wrap:anywhere}.source-original{margin:.5rem 0}.source-original summary{cursor:pointer;font-size:.9rem}.kanji-tile,.word-kanji a,.result-kanji a,.radical-form-glyph{text-decoration:none!important}

/* Source-scoped labels: native disclosure works with keyboard, touch and mouse. */
.label-group{margin:.45rem 0;font-size:.85rem}.label-group-title{display:block;color:var(--muted,#b7bbae);font-size:.72rem;margin-bottom:.2rem}.label-badges{display:flex;flex-wrap:wrap;gap:.35rem}.source-label{max-width:100%}.source-label summary{cursor:pointer;border:1px solid #4c5846;border-radius:.35rem;padding:.15rem .5rem;color:#e1d6ae;overflow-wrap:anywhere}.source-label[open]{flex-basis:100%}.source-label-help{padding:.5rem .75rem;border-left:2px solid #81926c;font-size:.85rem}.source-label-help p{margin:.4rem 0}.result-sense{margin:.65rem 0}.result-sense>p{margin-bottom:.3rem}.source-evidence{margin-top:1rem}.source-evidence>summary{cursor:pointer}.source-evidence-sense{border-top:1px solid #3c4439;padding:.6rem 0}.variants>div,.word-reading{padding:.5rem 0;border-bottom:1px solid #3c4439}.variants a[lang=ja],.word-reading a[lang=ja],.variant-glyph{text-decoration:none}.linked-variants ul{list-style:none;padding:0}.linked-variants li{display:flex;flex-wrap:wrap;align-items:center;gap:.8rem;padding:.5rem 0}.linked-variants .variant-glyph{font-size:2rem}.linked-variants .reading{font-size:1rem;overflow-wrap:anywhere}.linked-variants .quiet{font-size:.8rem}

/* Keep long label names readable on phones. */
@media(max-width:680px){.tag-group dl{grid-template-columns:minmax(0,1fr);gap:17px}}

/* Source labels are supporting metadata, visually quieter than definitions. */
.source-label summary{font-size:.72rem;line-height:1.3;padding:.12rem .35rem;color:var(--muted,#b7bbae);border-color:#39453a}
.source-label-help{font-size:.78rem}
.reading-frequency ul{list-style:none;padding:0;margin:.5rem 0}.reading-frequency li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.15rem .8rem;padding:.4rem 0;border-bottom:1px solid #3c4439}.reading-frequency li .reading{font-size:1rem}.reading-frequency li span:last-child,.reading-frequency-credit{font-size:.8rem;color:var(--muted,#b7bbae)}
.stub-words ul{list-style:none;margin:.5rem 0;padding:0}.stub-words li{border-bottom:1px solid #3c4439}.stub-words li a{display:flex;flex-wrap:wrap;align-items:baseline;gap:.15rem .7rem;padding:.45rem 0}.stub-words li .reading{font-size:.85rem;color:var(--muted,#b7bbae)}
.kanji-heading>div:last-child{min-width:0;overflow-wrap:anywhere}
.kanji-heading .badge{white-space:normal;overflow-wrap:anywhere}

/* Grammar articles: level index and touch/keyboard-accessible contextual words. */
.grammar-level{margin:1rem 0}.grammar-level ul{list-style:none;padding:0;margin:.5rem 0}.grammar-level li{display:grid;grid-template-columns:minmax(9rem,30%) 1fr;gap:1rem;padding:.7rem 0;border-bottom:1px solid var(--border,#3a4137)}.grammar-level li:last-child{border:0}.grammar-level li span:last-child{color:var(--muted,#b7bbae)}
.grammar-article{max-width:920px;margin:auto}.grammar-article .panel{margin:1rem 0}.grammar-examples{padding-left:1.5rem}.grammar-example{padding:.7rem 0;border-bottom:1px solid var(--border,#3a4137)}.grammar-example:last-child{border:0}.grammar-example-ja{font-size:1.25rem;line-height:2;overflow-wrap:anywhere}.grammar-example p{margin:.2rem 0}.grammar-example .reading{font-size:.9rem;color:var(--muted,#b7bbae)}
.grammar-word{position:relative;display:inline-block;vertical-align:baseline}.grammar-word summary{display:inline;cursor:pointer;color:#e3d5a4;text-decoration:underline dotted;text-underline-offset:.2em}.grammar-word summary::marker{content:''}.grammar-word summary:focus-visible{outline:2px solid #e3d5a4;outline-offset:3px}.grammar-word-help{position:absolute;z-index:5;top:calc(100% + .2rem);left:0;width:max-content;max-width:min(19rem,75vw);padding:.7rem .85rem;border:1px solid #65745e;border-radius:.55rem;background:#202720;box-shadow:0 .5rem 1.5rem #0008;font-size:.9rem;line-height:1.5;white-space:normal}.grammar-word-help strong,.grammar-word-help a{display:block}.grammar-word-help p{margin:.4rem 0}.grammar-word-help a{margin-top:.4rem;font-size:.82rem}
@media(max-width:680px){.grammar-level li{grid-template-columns:1fr;gap:.2rem}.grammar-example-ja{font-size:1.1rem}.grammar-word-help{left:auto;right:0}}

/* Short-sentence analysis keeps the original text and possible readings visible. */
.sentence-form{margin:1rem 0}.sentence-form label{display:block;margin-bottom:.6rem;font-weight:600}.sentence-form .search-row{display:flex;gap:.5rem}.sentence-form input{flex:1;min-width:0}.sentence-original{font-size:1.45rem;line-height:1.7;overflow-wrap:anywhere}.sentence-tokens{display:flex;flex-wrap:wrap;gap:.6rem;padding:0;list-style:none}.sentence-token details{min-width:3rem;border:1px solid #4c5846;border-radius:.45rem;background:#202720}.sentence-token summary{cursor:pointer;padding:.3rem .55rem}.sentence-token summary small{display:block;color:var(--muted,#b7bbae);font-size:.72rem}.sentence-token details>div{max-width:20rem;padding:.4rem .7rem .75rem;font-size:.88rem}.sentence-token details p{margin:.3rem 0}.sentence-token details a{display:inline-block;margin-top:.35rem}.sentence-token.punctuation{align-self:center;font-size:1.2rem}.sentence-token summary:focus-visible{outline:2px solid #e3d5a4;outline-offset:2px}
@media(max-width:680px){.sentence-form .search-row{flex-direction:column}.sentence-original{font-size:1.2rem}.sentence-token details>div{max-width:min(18rem,80vw)}}
.phrase-also{font-size:1.25rem;margin:2rem 0 1rem}.analysis-links{font-size:.84rem;line-height:1.5;margin:.5rem 0 0}.analysis-links a{display:inline-block;margin:.15rem .15rem .15rem 0}.sentence-token details>div{overflow-wrap:anywhere}.sentence-result{margin-bottom:1.5rem}


/* Dictionary meanings lead the card; labels stay available but quieter. */
.result .meaning{border-left:3px solid #d6b878;background:#d5b6740c;border-radius:0 7px 7px 0;padding:12px 16px;margin:14px 0 12px;color:#f6f0df;font-size:18px;line-height:1.5}
.meaning-label{display:block;margin:0 0 5px;color:#d5b674;font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase}
.result .result-sense{margin:.35rem 0}
.result .result-sense>p{font-weight:600;margin:0 0 .25rem}
.result .result-sense .badges{opacity:.82}
.senses>li{border-top:1px solid #d8c79f3d;border-left:2px solid #9a8357;padding:20px 0 0 18px;margin-left:-8px}
.result .result-sense+.result-sense{border-top:1px solid #d8c79f30;padding-top:.55rem;margin-top:.55rem}
.senses h3{color:#f4e7c5;font-size:22px;line-height:1.35;margin:9px 0 7px}
.senses>li>.badges,.senses>li>.word-grammar,.senses>li>.word-usage{font-size:12px}

/* The mobile menu uses native details, so it works without scripts. */
.mobile-menu{display:none}
/* Keep the program visible in the desktop header without crowding narrower layouts. */
.site-header .program-link{color:#e8c48b;font-size:13px;white-space:nowrap}
.site-header .program-link:hover{color:#f3d9a8}
@media(max-width:1100px) and (min-width:681px){.site-header .tags-link{display:none}.site-header nav{gap:12px}.site-header .game-link{font-size:16px;padding:8px 12px}}
@media(max-width:680px){
  .site-header{position:relative}
  .site-header>nav{display:none}
  .mobile-menu{display:block;margin-left:auto}
  .mobile-menu>summary{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid #8f8063;border-radius:7px;background:#d8bc87;color:#20291f;cursor:pointer;font-size:13px;font-weight:700;list-style:none}
  .mobile-menu>summary::-webkit-details-marker{display:none}
  .mobile-menu>summary:focus-visible{outline:2px solid #f5db9d;outline-offset:3px}
  .menu-icon{font-size:16px;line-height:1}
  .mobile-menu[open]>summary{background:#e9d3a5}
  .mobile-menu>nav{position:absolute;z-index:20;top:calc(100% - 4px);left:16px;right:16px;display:grid;gap:0;padding:8px;border:1px solid #6d674f;border-radius:9px;background:#232c25;box-shadow:0 14px 30px #0009}
  .mobile-menu>nav a{display:block;padding:12px 13px;border-radius:5px;color:#f2ead4;font-size:14px}
  .mobile-menu>nav a:hover,.mobile-menu>nav a:focus-visible{background:#374438;text-decoration:none}
  .mobile-menu>nav a+a{border-top:1px solid #ffffff14}
  .result .meaning{font-size:17px;padding:11px 13px}
  .senses h3{font-size:20px}
}
.sentence-token .token-gloss{display:block;max-width:11rem;margin-top:4px;color:#f1dcaa;font-size:.86rem;font-weight:650;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.sentence-token summary>span[lang="ja"]{font-size:1.08rem}

/* Optional pronunciation stays secondary to the meaning. */
.dictionary-speech{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem .8rem;margin:.85rem 0 0}
.dictionary-speech button{border:1px solid #aa9365;border-radius:.4rem;background:#273127;color:#f1ddb3;padding:.35rem .7rem;cursor:pointer;font:inherit;font-size:.83rem}
.dictionary-speech button:disabled{opacity:.55;cursor:default}
.dictionary-speech button:focus-visible,.dictionary-pitch button:focus-visible{outline:2px solid #f5db9d;outline-offset:2px}
.dictionary-speech button[data-speech-state="pending"]{border-color:#d8bc87}
.dictionary-speech button[data-speech-state="playing"]{border-color:#e2cb95;background:#354936;box-shadow:0 0 0 2px #d8bc8740}
.dictionary-speech button[data-speech-state="playing"] .speech-symbol{display:inline-block;animation:speech-pulse .8s ease-in-out infinite}
@keyframes speech-pulse{50%{transform:scale(1.25);opacity:.55}}
@media(prefers-reduced-motion:reduce){.dictionary-speech button[data-speech-state="playing"] .speech-symbol{animation:none}}
.dictionary-speech label,.dictionary-speech [data-speech-status]{font-size:.75rem;color:var(--muted,#b7bbae)}
.dictionary-speech label{display:inline-flex;align-items:center;gap:.35rem;cursor:pointer}
.dictionary-speech input{accent-color:#c8aa70}
.dictionary-speech [data-speech-status]{flex-basis:100%;line-height:1.4}
.dictionary-speech [data-speech-status]:empty{display:none}

.dictionary-pitch{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem .8rem;margin:.7rem 0 0}
.dictionary-pitch button{border:1px solid #8f8063;border-radius:.4rem;background:#273127;color:#f1ddb3;padding:.35rem .7rem;cursor:pointer;font:inherit;font-size:.83rem}
.dictionary-pitch button[aria-pressed="true"]{border-color:#d8bc87;background:#354936}
.dictionary-pitch button span{margin-left:.25rem;color:#c4c5b4;font-size:.75rem}
.dictionary-pitch button[aria-pressed="true"] span{color:#f0d69d}
.dictionary-pitch .pitch-reading-choice{display:inline-flex;align-items:center;gap:.45rem;color:#ead9b6;font-size:.78rem}
.dictionary-pitch .pitch-reading-choice[hidden]{display:none}
.pitch-reading-choice select{border:1px solid #6f8069;border-radius:.35rem;background:#263127;color:#f1ddb3;padding:.22rem .4rem;font:inherit}
.dictionary-pitch [data-pitch-result]{flex-basis:100%;margin:.1rem 0 0;color:#f0e6cf;font-size:.84rem}
.pitch-patterns{display:flex;flex-wrap:wrap;gap:.75rem 1.1rem}
.pitch-pattern{display:inline-flex;align-items:flex-end;gap:0;font-size:1.35rem;line-height:1.6;white-space:nowrap}
.pitch-pattern small{margin-left:.3rem;color:#c7b58c;font-size:.75rem;align-self:center}
.pitch-mora{display:inline-block;padding:0 .08rem;border-color:#d8bc87;border-style:solid;border-width:0 0 2px;min-width:.8em;text-align:center}
.pitch-mora.high{border-width:2px 0 0}
.pitch-mora.drop{border-right-width:2px}

.handwriting-open{display:inline-flex;margin:.35rem 0 0;border:1px solid #6f8069;border-radius:.4rem;background:#263127;color:#e8d7af;padding:.35rem .65rem;cursor:pointer;font:inherit;font-size:.78rem}
.handwriting-open:hover,.handwriting-open:focus-visible{border-color:#d6bd88}
.handwriting-dialog{width:min(95vw,34rem);max-height:95vh;margin:auto;padding:0;border:1px solid #7d8b72;border-radius:.8rem;background:#1e261f;color:#eee7d5;box-shadow:0 1rem 3rem #000a}
.handwriting-dialog::backdrop{background:#000b}
.handwriting-inner{padding:1rem 1.2rem;overflow:auto;max-height:95vh}
.handwriting-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.handwriting-heading h2{font-size:1.15rem;margin:0}
.handwriting-heading button,.handwriting-controls button{border:1px solid #66735d;border-radius:.4rem;background:#29352b;color:#f0e2c5;padding:.35rem .65rem;cursor:pointer;font:inherit;font-size:.82rem}
.handwriting-dialog p{font-size:.85rem;line-height:1.5}
.handwriting-dialog canvas{display:block;width:min(100%,320px);height:auto;aspect-ratio:1;margin:.6rem auto;border:1px solid #7d8b72;border-radius:.5rem;background:#f9f5e9;touch-action:none;cursor:crosshair}
.handwriting-controls{display:flex;justify-content:center;gap:.6rem}
.handwriting-controls button:disabled{opacity:.5;cursor:default}
.handwriting-dialog ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;padding:0;list-style:none}
.handwriting-dialog li a{display:flex;align-items:center;gap:.35rem;min-height:4.5rem;padding:.35rem;border:1px solid #4f5d4b;border-radius:.45rem;color:#eee7d5;text-decoration:none;font-size:.72rem;line-height:1.3;overflow-wrap:anywhere}
.handwriting-dialog li a:hover,.handwriting-dialog li a:focus-visible{border-color:#d6bd88;background:#2d3a2f}
.handwriting-glyph{font-size:2rem;line-height:1;flex:none}
@media(max-width:520px){.handwriting-dialog ol{grid-template-columns:repeat(2,minmax(0,1fr))}}
