/* Văn Cường 2.1: one responsive site, device-specific layout. */
:root{--radius:18px}body{font-size:16px;line-height:1.55}.main{max-width:1320px;margin:0 auto;padding:24px clamp(20px,3vw,44px) 60px}.top{margin-bottom:10px}.side{height:100dvh}.nav{min-height:42px}.header{margin:18px 0}.header h1{font-size:clamp(29px,3.5vw,40px);letter-spacing:-1.2px}.sync-strip{display:flex;align-items:center;gap:8px;min-height:34px;font-size:13px;color:var(--muted);margin:0 0 12px}.sync-dot{width:8px;height:8px;flex:0 0 8px;background:#c68a43;border-radius:100%}.sync-dot.ok{background:#2b9c74}.sync-link{border:0;background:transparent;color:var(--green);font-weight:700;padding:7px;margin-left:auto;min-height:34px}.quicknav{display:none}.btn{min-height:44px}.kanjigrid .radcard{min-height:154px}.memory-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.memory-layout .memoryhero{margin:0;grid-template-columns:1fr}.memory-layout .kanjibox{min-height:205px;font-size:clamp(110px,12vw,180px)}.memory-layout .study-picture{min-height:172px}.memory-layout .study-picture svg{max-height:190px}.memory-layout h2{line-height:1.35;overflow-wrap:anywhere;font-size:clamp(22px,2.1vw,30px)}.memory-layout .memorynote{margin-top:14px}.memory-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.memory-actions button{min-height:54px}.memory-layout .tag{font-size:13px}.keyhint{color:var(--muted);font-size:12px;margin:10px 0}.kanji-toolbar{display:flex;gap:8px;flex-wrap:wrap}.kanji-toolbar .btn{flex:1}.memory-verse{white-space:pre-line;line-height:1.55}.memorynote small{font-size:12px}.study-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.study-tabs .btn{min-width:0}.study{max-width:740px}.flash{min-height:340px}.quicknav button{font:inherit}.memory-layout .study-picture .tiny{letter-spacing:.6px}.memory-art{width:100%;height:auto;max-width:320px}.dark .memory-art text{fill:#214736}.dark .memory-art .art-caption{fill:#45664d}
@media(min-width:1000px){.kanjigrid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.main{padding-top:30px}.card{padding:24px}.top{gap:16px}.memory-layout .memoryhero{grid-template-columns:1fr 1fr}.memory-layout{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}.memory-layout .kanjibox,.memory-layout .study-picture{min-height:230px}.memory-layout .kanjibox{font-size:clamp(100px,9vw,160px)}.side .brand{padding-bottom:10px}.memory-layout .study-picture svg{max-height:170px}}
@media(max-width:760px){.app{display:block}.side{display:none;position:fixed;width:min(83vw,310px);z-index:30;box-shadow:0 0 0 100vmax #0006}.side.open{display:block}.mobile{display:inline-flex}.main{padding:13px 12px calc(95px + env(safe-area-inset-bottom,0px))}.top{flex-wrap:wrap;gap:8px}.top>div:nth-child(2){flex:1;min-width:90px}.level{order:3;width:100%;justify-content:space-between}.level button{flex:1;min-height:38px;padding:4px 8px}.quicknav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:20;padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));background:var(--paper);border-top:1px solid var(--line);gap:2px}.quicknav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:0;background:transparent;color:var(--muted);font-size:11px;font-weight:650;border-radius:11px;min-height:50px;padding:2px}.quicknav button span{font-size:22px;line-height:1.2}.quicknav button.active{background:var(--light);color:var(--green)}.header{margin:10px 0 14px}.header h1{font-size:29px}.card{padding:15px}.memory-layout{display:flex;flex-direction:column;gap:12px}.memory-layout>div{width:100%}.memory-layout .memoryhero{grid-template-columns:1fr 1fr;gap:8px}.memory-layout .kanjibox,.memory-layout .study-picture{min-height:145px}.memory-layout .kanjibox{font-size:clamp(75px,24vw,115px)}.memory-layout .study-picture{padding:5px}.memory-layout .study-picture svg{max-height:123px}.memory-actions{margin-top:14px;position:sticky;bottom:calc(68px + env(safe-area-inset-bottom,0px));background:var(--paper);padding:8px 0;z-index:5}.keyhint{display:none}.study-tabs{gap:5px!important}.study-tabs .btn{font-size:12px;padding:7px 3px}.radgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.toast{bottom:calc(78px + env(safe-area-inset-bottom,0px));z-index:40}.flash{min-height:275px}.sync-strip{margin-bottom:7px}.memory-banner h2{font-size:21px}.kanji-toolbar .btn{font-size:13px;padding:8px}.field{font-size:16px} }
/* Keep grading controls after the mnemonic instead of obscuring the lesson on small screens. */
@media(max-width:760px){.memory-actions{position:static;padding:0}.memory-layout{margin-top:12px}.memory-layout .memorynote{margin:12px 0}.memory-layout .study-picture svg{max-height:115px}.top .tiny{font-size:10px;letter-spacing:.6px}}
