/* Detail and accessibility refinements found in compiled-browser review. */
body.v2 #v2-home-title:focus,body.v2 #a11y-title:focus,body.v2 #learning-title:focus,body.v2 #learning-heading:focus{outline:none}
body.v2 .v2-step{text-transform:uppercase}
body.v2 .v2-smallprint,body.v2 .v2-demo-caption,body.v2 .v2-footer{color:#75627e}
body.v2:has(dialog[open]){overflow:hidden}
/* The older guide has ID-level styling. Match that specificity so it shares
   the new material rather than keeping its opaque legacy panel/backdrop. */
body.v2 #learning-dialog{width:min(580px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:rgba(253,251,255,.93);border:1px solid #ffffffe6;border-radius:28px;box-shadow:0 28px 100px #36245238,inset 0 1px 1px #fff;backdrop-filter:blur(28px) saturate(140%);-webkit-backdrop-filter:blur(28px) saturate(140%)}
body.v2 #learning-dialog::backdrop{background:#30233e35;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
body.v2 #learning-dialog header{background:rgba(253,251,255,.97)}
.v2-calendar-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.v2-calendar-nav button{min-width:0;font-size:12px!important;padding:8px!important;text-align:center!important}
.v2-weekday{font-size:10px;text-align:center;color:#7a6588;padding:8px 0;font-weight:700;letter-spacing:.05em}
body.v2 #dialog-actions .v2-calendar-day{position:relative;text-align:center;min-height:46px;background:#ede6f259;color:#8b7898;border-color:transparent}
body.v2 #dialog-actions .v2-calendar-day[data-availability="available"]{background:#fff;color:#57386f;border-color:#cfb7e7}
body.v2 #dialog-actions .v2-calendar-day[data-availability="available"]::after{content:'';position:absolute;bottom:5px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:#7544dd}
body.v2 #dialog-actions .v2-calendar-day[aria-pressed="true"]{background:#7845e6;color:#fff;border-color:#7845e6}body.v2 #dialog-actions .v2-calendar-day[aria-pressed="true"]::after{background:#fff}
body.v2-solid #learning-dialog{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){body.v2 #learning-dialog{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}body.v2 .v2-smallprint,body.v2 .v2-demo-caption,body.v2 .v2-footer{color:#504058}}

.v31-update-banner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;border:1px solid #d5c5e9;border-radius:16px;background:#faf6ff;padding:12px 14px;margin:12px 0;font-size:14px;color:#594970}.v31-update-banner button{padding:10px 14px;border-radius:12px;min-height:44px;white-space:nowrap;font:inherit;font-weight:700}
/* 2.1 mobile hierarchy and viewport-safe sheets. Never scale the whole UI down. */
body.v2{--v21-top:max(12px,env(safe-area-inset-top,0px));--v21-bottom:max(16px,env(safe-area-inset-bottom,0px))}
body.v2 .v2-shell{padding-bottom:var(--v21-bottom)}
body.v2 .v2-nav svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.v2 .v21-icon-dot{fill:currentColor;stroke:none}
body.v2 .v2-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
body.v2 dialog.v2-dialog,body.v2 #learning-dialog{max-height:calc(var(--v21-visible-height,100dvh) - var(--v21-top) - var(--v21-bottom));scrollbar-gutter:stable}
body.v2 dialog h2:focus{outline:none}
body.v2 #learning-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
body.v2 #learning-dialog header,body.v2 #learning-dialog footer{flex:none;position:relative}
body.v2 #learning-dialog .learning-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding:16px;flex:1}
body.v2 #learning-dialog footer{padding:12px 20px max(14px,env(safe-area-inset-bottom,0px));background:rgba(253,251,255,.96)}
body.v2 #learning-back{width:100%;text-align:center;font-weight:650}
body.v2 .v21-guide-tools button{display:block;width:100%;margin:8px 0}
body.v2 .v21-guide-tools summary{font-size:14px;color:#605174}
body.v2 .v21-archive-details{border-top:1px solid var(--line);margin:14px 0 0;padding:8px 0 0}
body.v2 .v21-archive-details summary{min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;color:#605174;font-weight:650;list-style:none}
body.v2 .v21-archive-details summary::before{content:'›';font-size:22px;transition:transform .15s}
body.v2 .v21-archive-details[open] summary::before{transform:rotate(90deg)}
body.v2 .v21-archive-details #dialog-body{font-size:13px;margin:4px 0 8px;line-height:1.5}
body.v2 .v21-archive-selection{font-size:13px;color:#605174;margin:10px 0 0;line-height:1.45}
body.v2 .v2-calendar-nav{grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;margin-bottom:6px}
body.v2 #dialog-actions .v2-calendar-nav button{min-height:44px;padding:6px!important;background:transparent;border-color:transparent;font-size:15px!important}
body.v2 #dialog-actions .v2-calendar-nav button:first-child,body.v2 #dialog-actions .v2-calendar-nav button:last-child{font-size:28px!important;font-weight:400}
body.v2 #a11y-dialog[data-kind="archive"] .v2-dialog-content{padding-top:8px}
body.v2 #a11y-dialog[data-kind="archive"] .v2-dialog-foot button{font-size:14px;text-align:center}
body.v2 #a11y-dialog[data-kind="archive"] #dialog-actions{gap:4px}
body.v2 #a11y-dialog[data-kind="archive"] .v2-dialog-foot{box-shadow:0 -8px 16px #f8f4fb80}
@media(max-width:520px){
 body.v2 .v2-shell{padding-left:max(14px,env(safe-area-inset-left,0px));padding-right:max(14px,env(safe-area-inset-right,0px));padding-top:6px}
 body.v2 .v2-header{min-height:58px;gap:6px}
 body.v2 .v2-brand img{width:150px}
 body.v2 .v2-nav{padding:2px}
 body.v2 .v2-home{padding:22px 4px 20px}
 body.v2 .v2-home h1{font-size:clamp(38px,10.8vw,46px);line-height:1.08;margin-bottom:14px}
 body.v2 .v2-home .v2-intro{font-size:14px;line-height:1.6;margin-bottom:20px}
 body.v2 .v2-home .v2-home-actions{grid-row:4;gap:9px}
 body.v2 .v2-home .v2-hero-art{grid-row:5;margin-top:20px;height:196px}
 body.v2 .v2-home .v2-smallprint{grid-row:6;margin-top:8px;font-size:11px;line-height:1.5}
 body.v2 .v2-demo{transform:scale(.40) rotate(-5deg)}
 body.v2 .v2-demo-caption{top:175px;font-size:11px}
 body.v2 .v2-spark-one{top:16px;right:12%}body.v2 .v2-spark-two{left:10%;bottom:42px}
 body.v2 .v2-home .v2-eyebrow{font-size:9px;letter-spacing:.13em;margin-bottom:16px}
 body.v2 .v2-home-actions .v2-text-button{font-size:13px;min-height:44px;padding:8px}
 body.v2 .v2-home-actions button{font-size:14px}
 body.v2 .v2-home-actions .v2-daily{font-size:16px;min-height:54px;padding:14px 18px}
 body.v2 .v2-footer{padding:14px 0 12px;gap:6px}
 body.v2 .v2-footer>span{font-size:10px}
 body.v2 .v2-footer nav{gap:0 16px}
 body.v2 .v2-footer button,body.v2 .v2-footer a{font-size:11px}
 body.v2 #accessible-game{margin-top:12px;margin-bottom:24px}
 body.v2 .v2-play-info{padding-bottom:14px}
 body.v2 #a11y-title{font-size:22px}
 body.v2 .v2-step{margin-top:10px}
 body.v2 #a11y-collected{margin-top:7px;font-size:12px}
 body.v2 #a11y-save{font-size:12px!important}
 body.v2 #learning-dialog{width:calc(100vw - 24px);border-radius:22px}
 body.v2 #learning-dialog header{padding:12px 16px}
 body.v2 #learning-dialog h2,body.v2 .v2-dialog-head h2{font-size:21px!important}
 body.v2 #learning-dialog .learning-content{padding:14px 18px}
 body.v2 #learning-dialog h3{font-size:21px;line-height:1.2;margin-bottom:12px}
 body.v2 #learning-dialog p{font-size:14px;line-height:1.55}
 body.v2 #learning-dialog button{font-size:14px;min-height:44px}
 body.v2 #learning-dialog nav{display:grid;grid-template-columns:1fr 1.25fr;margin:16px 0 8px}
 body.v2 #learning-dialog nav button{text-align:center}
 body.v2 #learning-dialog footer{padding:10px 16px 12px}
 body.v2 #learning-notice{font-size:12px!important;line-height:1.45}
 body.v2 .v2-dialog-content{padding-left:16px;padding-right:16px;padding-bottom:12px}
 body.v2 .v2-dialog-head{padding:10px 12px 10px 16px}
 body.v2 .v2-dialog-foot{padding:10px 16px 12px}
 body.v2 #dialog-actions .v2-calendar-day{min-height:44px;border-radius:12px}
 body.v2 .v2-weekday{padding:6px 0;font-size:11px}
 body.v2.larger-text #learning-dialog p,body.v2.larger-text #learning-dialog button{font-size:18px}
 body.v2.larger-text #learning-dialog h3{font-size:24px}
 body.v2.larger-text #a11y-title{font-size:27px}
}
@media(max-width:350px){body.v2 .v2-brand img{width:136px}body.v2 .v2-nav{gap:0;padding:1px}body.v2 .v2-header{gap:2px}body.v2 .v2-home h1{font-size:38px}body.v2 #a11y-title{font-size:20px}}
@media(max-height:500px){body.v2 #learning-dialog header{padding-top:8px;padding-bottom:8px}body.v2 #learning-dialog footer{padding-top:8px;padding-bottom:8px}}
