:root{--paper:var(--sc-brand-cream);--ink:var(--sc-brand-teal);--muted:var(--sc-brand-slate);--line:var(--sc-brand-silver);--gold:var(--sc-brand-gold-tint);--surface:var(--sc-brand-ivory)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 'DM Sans','Noto Sans Myanmar',sans-serif}a{color:inherit;text-decoration:none}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #947641;outline-offset:4px}header{max-width:1280px;margin:auto;min-height:94px;display:flex;align-items:center;gap:30px;padding:20px 36px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;font-size:21px;font-weight:700;letter-spacing:-.6px}.brand small{display:block;font-size:10px;letter-spacing:.8px;font-weight:500}nav{display:flex;gap:28px;margin-left:auto;font-size:14px;font-weight:600}#sign-out{font-size:13px;color:var(--muted)}main{max-width:1208px;padding:44px 36px 70px;margin:auto}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:var(--sc-brand-gold-text);margin:0 0 12px}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(32px,5vw,52px);line-height:1.2;letter-spacing:-1.7px;margin:12px 0}h2{font-size:23px;line-height:1.4;letter-spacing:-.6px;margin-bottom:20px}h3{font-size:16px}p[lang=my]{font-family:'Noto Sans Myanmar',sans-serif;line-height:2;font-size:15px}.profile-hero{border:1px solid #dcd7c9;background:var(--sc-brand-ivory);border-radius:24px;padding:38px;display:flex;align-items:center;justify-content:space-between;gap:24px;margin:20px 0 24px}.identity{display:flex;align-items:center;gap:26px;min-width:0}.identity>div{min-width:0}.identity h1{overflow-wrap:anywhere}.identity p{margin:0;color:var(--muted)}.identity .student-avatar{width:124px;height:124px;border:5px solid white;box-shadow:0 8px 25px #263e4812}.private-tag{font-size:11px;color:#5b695d;letter-spacing:.2px}.primary,.secondary{display:inline-flex;justify-content:center;align-items:center;gap:20px;border-radius:11px;min-height:46px;padding:12px 20px;font-weight:600;font-size:14px;border:1px solid transparent;white-space:nowrap}.primary{background:var(--sc-brand-teal);color:#fff}.primary:hover{background:var(--sc-brand-teal-hover)}.secondary{background:transparent;color:var(--ink);border-color:var(--line)}.primary:disabled,.secondary:disabled{opacity:.6;cursor:wait}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:28px}.stat{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:23px}.stat strong{display:block;font-size:32px;font-weight:500;letter-spacing:-1px}.stat span{font-size:12px;color:var(--muted)}.layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:24px}.panel{padding:28px;border-radius:20px;background:var(--surface);border:1px solid var(--line);margin-bottom:24px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px}.section-title h2{margin-bottom:12px}.section-title a{font-size:12px;white-space:nowrap}.pill{padding:7px 12px;border-radius:30px;background:var(--sc-brand-gold-tint);font-size:12px;white-space:nowrap}.week{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;margin:22px 0}.day{text-align:center;font-size:11px;color:var(--muted)}.day strong{display:grid;place-items:center;height:52px;border-radius:13px;background:#f4f2ec;margin:8px 0;color:#83908b;font-size:17px}.day.active strong{background:#e4ece5;color:#345a45}.day.today strong{outline:2px solid var(--sc-brand-gold);outline-offset:2px}.muted{color:var(--muted);font-size:12px}.activity>p{margin-bottom:0}.subjects{display:grid;grid-template-columns:1fr 1fr;gap:12px}.subject{display:block;padding:18px;border:1px solid var(--line);border-radius:13px;transition:background .15s}.subject:hover{background:#f4f1e9}.subject h3{margin:0 0 8px;font-size:15px}.subject small{color:var(--muted);font-size:11px}.track{height:5px;background:#eeeae0;border-radius:10px;overflow:hidden;margin-top:14px}.track i{display:block;height:100%;background:#7c998c;border-radius:10px}.next{background:#e7eee7}.next h2{font-size:29px;line-height:1.3}.next .primary,.next .secondary{display:flex;width:100%;margin-top:12px}.next .secondary{border:0;padding-bottom:0}.result{padding:14px 0;border-bottom:1px solid var(--line);font-size:13px}.result strong{display:block}.result span{color:var(--muted);font-size:12px}.text-link{display:inline-block;margin-top:18px;font-size:13px;font-weight:600}footer{max-width:1136px;margin:auto;padding:24px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted);display:flex;justify-content:space-between}dialog{width:740px;max-width:calc(100% - 28px);max-height:90dvh;border:1px solid var(--line);border-radius:22px;padding:28px;background:var(--surface);color:var(--ink);box-shadow:0 30px 100px #1e343b33}dialog::backdrop{background:#20313d88;backdrop-filter:blur(4px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start}.dialog-head h2{font-size:28px}.icon{border:0;background:#f0eee7;width:40px;height:40px;border-radius:50%;font-size:26px;color:var(--ink)}.edit-preview{display:flex;align-items:center;gap:18px;padding:18px;background:var(--paper);border-radius:14px;margin-bottom:24px}.edit-preview .student-avatar{width:72px;height:72px}.edit-preview strong{overflow-wrap:anywhere}label{display:block;font-weight:600;font-size:14px;margin-bottom:8px}input{padding:12px 14px;width:100%;border:1px solid #cdcfc8;border-radius:10px;background:var(--sc-brand-ivory);color:var(--ink);min-height:46px}.hint{font-size:12px;color:var(--muted);line-height:1.7;margin:8px 0 22px}.avatar-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:16px 0}.avatar-option{border:1px solid var(--line);border-radius:13px;background:var(--sc-brand-ivory);padding:12px 6px;color:var(--ink);display:flex;align-items:center;flex-direction:column;gap:7px;min-width:0}.avatar-option .student-avatar{width:76px;height:76px}.avatar-option strong{font-size:12px}.avatar-option small{font-size:9px;color:var(--muted)}.avatar-option[aria-pressed=true]{border:2px solid #718c79;background:#edf2e9;box-shadow:0 0 0 2px #718c791a}.dialog-actions{position:sticky;bottom:-28px;background:var(--surface);padding:16px 0 4px;display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--line)}#save-status{font-size:13px;color:#8d3d36}.skip{position:absolute;top:-80px;left:20px;padding:12px;background:white;z-index:10}.skip:focus{top:10px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}[hidden]{display:none!important}@media(max-width:800px){header{padding:18px 20px;flex-wrap:wrap;gap:18px}nav{order:3;width:100%;justify-content:space-between;gap:12px;font-size:13px}#sign-out{margin-left:auto}main{padding:28px 18px 45px}.profile-hero{padding:24px;align-items:flex-start;flex-direction:column}.identity{gap:18px}.identity .student-avatar{width:88px;height:88px}.identity h1{font-size:32px}.identity p{font-size:12px}.stat-grid{grid-template-columns:1fr 1fr;gap:10px}.stat{padding:18px}.layout{grid-template-columns:1fr}.panel{padding:22px}aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}footer{margin:0 18px}.section-title{align-items:flex-start}.week{gap:6px}.pill{font-size:10px}dialog{padding:22px}.avatar-option .student-avatar{width:60px;height:60px}}@media(max-width:500px){aside{display:block}.avatar-grid{grid-template-columns:repeat(3,1fr)}.subjects{grid-template-columns:1fr}.section-title h2{font-size:20px}.profile-hero .primary{width:100%}.private-tag{font-size:10px}.identity .student-avatar{width:76px;height:76px}.stat strong{font-size:28px}.day strong{height:42px}.dialog-actions{bottom:-22px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* The expanded gallery remains readable and navigable on small phones. */
#avatar-search{margin-bottom:10px}#avatar-series{width:100%;font:inherit;font-size:14px;color:var(--ink);border:1px solid #cdcfc8;background:var(--surface);border-radius:10px;padding:12px;min-height:46px}#gallery-count{margin:10px 0 0}.avatar-option{min-height:148px;justify-content:flex-start}.avatar-option strong{line-height:1.5;text-align:center;overflow-wrap:anywhere}.avatar-option small{font-size:10px;line-height:1.5;text-align:center;overflow-wrap:anywhere}.avatar-grid{gap:12px}.edit-preview{position:relative}.dialog-head>div{min-width:0}.section-title>.muted{font-size:11px;max-width:145px;text-align:right;line-height:1.6}.dialog-actions{z-index:2;padding-bottom:12px}#save-status button{white-space:normal}.saved-status{padding:12px 16px;background:#e7eee7;border-radius:12px;font-size:14px;margin-bottom:20px}#status{overflow-wrap:anywhere}#nickname{word-break:normal}.identity .student-avatar{aspect-ratio:1}.result strong{overflow-wrap:anywhere}header nav a{white-space:nowrap}dialog button:focus-visible,select:focus-visible{outline:3px solid #947641;outline-offset:3px}@media(max-width:500px){.avatar-option{padding:12px 6px;min-height:132px}.avatar-option strong{font-size:11px}.avatar-option small{font-size:10px}.avatar-grid{gap:9px}.section-title>h3{max-width:52%;font-size:15px}.section-title>.muted{font-size:10px;max-width:118px}.dialog-head h2{font-size:24px}.dialog-head .icon{flex-shrink:0}.identity{align-items:center}.profile-hero{gap:20px}.profile-hero p[lang=my]{font-size:12px;line-height:2.1}.stat span{line-height:1.6;display:block}.day{font-size:10px}.panel .section-title{gap:10px}.panel .section-title .pill{white-space:normal;text-align:center;max-width:90px}.dialog-actions{gap:10px}.dialog-actions button{flex:1;min-width:0;padding-inline:12px}footer{gap:20px;font-size:11px}.primary,.secondary{white-space:normal;text-align:center}header{gap:14px}}
/* Account editor: static character gallery, scrollable content, always reachable Save. */
.profile-hero[data-theme=cream],.edit-preview[data-theme=cream]{background:#f5f0e5}
.profile-hero[data-theme=silver],.edit-preview[data-theme=silver]{background:#eceeec}
.profile-hero[data-theme=gold],.edit-preview[data-theme=gold]{background:#eee3c8}
#profile-goal{font-size:16px;line-height:1.9;color:#35464a;margin-top:12px;overflow-wrap:anywhere}
.profile-subject-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.profile-subject-tags a{border:1px solid #bac0b7;background:var(--sc-brand-ivory);padding:6px 12px;border-radius:24px;font-size:13px;min-height:36px;display:inline-flex;align-items:center}
#editor{padding:0;overflow:hidden;width:780px;max-height:92dvh}#profile-form{display:flex;flex-direction:column;max-height:92dvh;margin:0}#editor .dialog-head{padding:22px 26px 12px;flex-shrink:0;border-bottom:1px solid var(--line)}#editor .dialog-head h2{font-size:23px;line-height:1.8;margin:0}#editor .dialog-head .eyebrow{margin-bottom:4px}
.editor-body{overflow-y:auto;overscroll-behavior:contain;padding:22px 26px;min-height:0;scroll-padding:20px}.editor-section{margin:0 0 24px}.editor-section h3{font-size:17px;line-height:1.9}.editor-section label,.editor-section summary{line-height:1.9}.editor-section input,.editor-section textarea{font-family:inherit;font-size:16px;line-height:1.8}.editor-section textarea{width:100%;padding:12px 14px;border:1px solid #cdcfc8;border-radius:10px;background:var(--surface);color:var(--ink);resize:vertical;min-height:90px}.editor-section .hint{font-size:13px;line-height:1.9;color:#536269}.editor-section fieldset{border:0;padding:0;margin:0 0 22px}.editor-section legend{font-weight:600;margin-bottom:12px}.editor-section summary{cursor:pointer;font-size:14px;padding:12px 0}.private-name{border-top:1px solid var(--line)}.private-name[open] label{margin-top:12px}
#editor .edit-preview{gap:16px;margin-bottom:26px;padding:20px;min-height:112px}#editor .edit-preview>div{min-width:0}#preview-name{display:block;font-size:22px;line-height:1.8}#preview-goal{font-size:14px;line-height:1.9;margin:6px 0 0;overflow-wrap:anywhere}.preview-caption{font-size:12px;color:#536269;line-height:1.9}
#study-subjects,#theme-options{display:flex;flex-wrap:wrap;gap:10px}#study-subjects label,#theme-options label{display:flex;align-items:center;gap:9px;border:1px solid #cdd0c8;border-radius:12px;padding:10px 12px;min-height:48px;margin:0;font-weight:500;font-size:14px}#study-subjects label:has(:checked),#theme-options label:has(:checked){border-color:#8c713d;background:#f3ead4}#study-subjects input,#theme-options input,#favorites-only{width:18px;height:18px;min-height:18px;margin:0;accent-color:#796039;flex-shrink:0}.theme-swatch{display:block;width:20px;height:20px;border:1px solid #9f9f94;border-radius:50%}.theme-swatch.cream{background:#f5f0e5}.theme-swatch.silver{background:#eceeec}.theme-swatch.gold{background:#eee3c8}
.gallery-filters{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:end;margin-top:14px}.gallery-filters label{font-size:13px}.favorites-toggle{display:flex;align-items:center;gap:10px;min-height:48px;font-weight:500}#editor .avatar-choice{position:relative;min-width:0;padding-bottom:0}#editor .avatar-option{width:100%;height:100%;padding-bottom:54px;position:relative}#editor .avatar-option[aria-pressed=true]{border:2px solid #8c713d;background:#f4ecd9;box-shadow:none}#editor .selection-check{display:none;position:absolute;top:6px;left:6px;width:22px;height:22px;border-radius:50%;background:#796039;color:#fff;font-size:14px;align-items:center;justify-content:center}#editor .avatar-option[aria-pressed=true] .selection-check{display:flex}.favorite-character{position:absolute;bottom:7px;left:calc(50% - 22px);width:44px;height:44px;border:1px solid #cbc9bd;border-radius:50%;background:var(--sc-brand-ivory);color:#5e542f;font-size:24px}.favorite-character[aria-pressed=true]{background:#eadbb6;border-color:#8c713d}.gallery-empty{grid-column:1/-1;font-size:15px;line-height:1.9;padding:16px;background:var(--paper);border-radius:12px}
.profile-privacy{padding:18px;border:1px solid var(--line);border-radius:14px;background:#f7f6f1}.profile-privacy p{font-size:14px;line-height:1.9;margin-bottom:12px}.profile-privacy a{font-size:14px;text-decoration:underline}.editor-footer{flex-shrink:0;border-top:1px solid var(--line);background:var(--surface);padding:0 26px max(12px,env(safe-area-inset-bottom))}#editor .dialog-actions{position:static;border:0;padding:12px 0 0;align-items:center}#change-status{font-size:12px;color:#536269;line-height:1.8;margin-right:auto;max-width:230px}#save-status{margin:0;font-size:14px;line-height:1.9;max-height:100px;overflow:auto}#save-status:not(:empty){padding-top:12px}#editor .primary,#editor .secondary{min-height:48px}#editor :focus-visible{outline:3px solid #796039;outline-offset:3px}#editor,#editor *,#editor *::before,#editor *::after{animation:none!important;transition:none!important;transform:none!important}
@media(max-width:500px){#editor{max-width:calc(100% - 16px);border-radius:18px;max-height:94dvh}#profile-form{max-height:94dvh}#editor .dialog-head{padding:16px 16px 12px}#editor .dialog-head h2{font-size:19px}.editor-body{padding:18px 16px}.editor-footer{padding-inline:16px}#editor .edit-preview{padding:16px}.gallery-filters{grid-template-columns:1fr}.gallery-filters label{margin:0}.favorites-toggle{min-height:44px}#editor .dialog-actions{flex-wrap:wrap}#change-status{max-width:none;flex:0 0 100%;margin:0}#editor .dialog-actions button{flex:1}#editor .avatar-grid{gap:8px}#editor .avatar-option{min-height:175px}#study-subjects{display:grid;grid-template-columns:1fr 1fr}#study-subjects label{font-size:13px;padding:10px 8px}#theme-options{gap:7px}#theme-options label{padding:9px;font-size:12px}.profile-subject-tags a{font-size:12px}#preview-name{font-size:20px}}

/* Sidebar actions share one alignment and predictable tap area. */
aside .panel :is(a.primary,a.secondary){display:flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;min-height:48px;margin:12px 0 0;padding:12px 16px;line-height:1.8;text-align:center}
body>footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px}body>footer>a{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap}
