/* DailyBrainArc V0.793 — Hanoi Atelier: game-scoped presentation layer only.
   Original puzzle generation, move legality, solvers, records and storage are untouched. */
:root{--ha-ink:#18352e;--ha-forest:#173e34;--ha-forest2:#225749;--ha-brass:#c39c55;--ha-cream:#f7f3e9;--ha-text:#23453b}
body:has(.h793-page){background:#f6f4ed;color:#18382f}
body:has(.h793-page) .preview-note{background:#eaece4;color:#66766c;font-size:11px;line-height:1.3;padding:3px 10px}
body:has(.h793-page) .topbar{background:#fffdf7;border-bottom:1px solid #e6e7d9}
body:has(.h793-page) .mobile-dock{background:#fffdf8}
.h793-page{max-width:1180px!important;--accent:#245d4a;--good:#2c8b69;--panel:#fffdf8;--bg:#f4f0e6;--line:#e1e4d6;--muted:#66796d;--text:#19392f}
.h793-page.gamepage{padding-top:10px}
.h793-page .gameheader{display:flex;align-items:center;gap:14px;margin:0 0 10px;padding:0 4px}
.h793-page .gameheader>div:first-child{min-width:0}
.h793-page .gameheader .eyebrow{display:block;color:#8d6c36;font-size:10px;letter-spacing:.2em;font-weight:950;margin-bottom:3px}
.h793-page .gameheader h1{font-family:Georgia,'Times New Roman',serif;font-size:clamp(28px,3.1vw,43px);letter-spacing:-.045em;line-height:1.07;margin:0;color:var(--ha-ink)}
.h793-page .gameheader .hanoi-tagline{font-weight:600;font-size:14px;color:#657568;margin:5px 0 0;line-height:1.25}
.h793-page .gameheader p:not(.hanoi-tagline){display:none}
.h793-page .gameheader .scorebox{display:flex!important;flex-direction:column;align-items:center;justify-content:center;min-width:108px;border:1px solid #e7dcc4;background:#fcf3e3;border-radius:14px;padding:10px 12px;box-shadow:none;color:#75562d}
.h793-page .scorebox small{font-size:10px;letter-spacing:.14em;font-weight:900;text-transform:uppercase}
.h793-page .scorebox strong{font-size:14px;white-space:nowrap;color:#79572a}
.h793-page .h302-play-card{background:#fffdf8;border:1px solid #e3e5d8;border-radius:25px;box-shadow:0 13px 35px #2e4a3620,0 2px 5px #142a2412;padding:15px!important;overflow:visible}
.h793-page .h302-size-row{display:flex;gap:7px;align-items:center;flex-wrap:nowrap;overflow-x:auto;padding:1px 1px 8px;margin:0 0 4px;scrollbar-width:thin;scrollbar-color:#c6cfbf transparent}
.h793-page .h302-row-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:#8a6a37;margin-right:3px;flex-shrink:0}
.h793-page .h302-current-mode{border-radius:9px;background:#e8eee6;color:#2e674e;padding:8px 9px;white-space:nowrap;flex-shrink:0;font-size:11px}
.h793-page .h302-size-row>a,.h793-page .h302-modes>summary{background:#f6f5ee;border:1px solid #e4e7db;color:#567263;min-width:38px;border-radius:10px;padding:8px 10px;font-size:12px;line-height:1.25;font-weight:850;flex-shrink:0;transition:background .16s ease,border-color .16s ease,transform .16s ease}
.h793-page .h302-size-row>a.active{background:#234f40;border-color:#234f40;color:#fff;box-shadow:0 3px 10px #1b4b3d2a}
.h793-page .h302-size-row a:hover,.h793-page .h302-modes>summary:hover{border-color:#b7c9bc}
.h793-page .h302-modes{margin-left:auto;flex-shrink:0}
.h793-page .h302-modes>div{background:#fffef9;border:1px solid #dfe7d9;box-shadow:0 12px 26px #143a2e22}
.h793-page .h302-scorebar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:0 0 9px}
.h793-page .h302-scorebar>div{padding:8px 10px;border:1px solid #e7e9de;background:#fafaf5;border-radius:11px;display:flex;align-items:baseline;justify-content:space-between;gap:6px;min-width:0}
.h793-page .h302-scorebar small{font-size:10px;font-weight:900;color:#7d8a7e;white-space:nowrap}
.h793-page .h302-scorebar strong{font-size:17px;color:#254f40;font-weight:950;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.h793-page .h302-board-wrap{border-radius:21px;overflow:hidden;box-shadow:0 8px 21px #09241d28}
.h793-page .hanoi-board{--ha-disk-1:#f9c77a;--ha-disk-2:#db9b5b;--ha-disk-3:#bcd3bb;--ha-disk-4:#8dbaa0;--ha-disk-5:#e7d5a9;--ha-disk-6:#74a994;--ha-disk-7:#e3ad77;--ha-disk-8:#4d927a}
.h793-page .h302-play-card .hanoi-board{background:radial-gradient(circle at 52% -25%,#56826a44,transparent 63%),linear-gradient(165deg,#1d493c,#112d28);border:1px solid #365f4e;border-radius:20px;min-height:288px;padding:19px 13px 13px;gap:12px;box-shadow:inset 0 0 0 1px #ffffff10}
.h793-page .h302-play-card .hanoi-peg{height:255px;min-height:0;padding-bottom:26px;gap:4px;border-radius:15px;transition:background .16s ease;cursor:pointer;color:#fff}
.h793-page .h302-play-card .hanoi-peg::before{width:8px;bottom:29px;top:41px;background:linear-gradient(90deg,#a7804d,#f4daac 45%,#9b7549);border-radius:9px;box-shadow:0 1px 4px #0004}
.h793-page .h302-play-card .hanoi-peg::after{height:9px;left:2%;right:2%;bottom:19px;background:linear-gradient(180deg,#e4c496,#826440);box-shadow:0 5px 7px #041f1d4d;border-radius:9px}
.h793-page .hanoi-peg-label{font-size:11px;top:6px;letter-spacing:.1em;text-transform:uppercase;color:#c6e4d1;font-weight:950}
.h793-page .hanoi-peg.goal .hanoi-peg-label{color:#ffdfa0}
.h793-page .hanoi-disk{height:24px;min-height:24px;border-radius:8px;border:1px solid #ffffff5e;background:linear-gradient(180deg,#f0b96e,#c88d48);color:#254639;font-weight:950;font-size:12px;box-shadow:0 2px 2px #0005,inset 0 2px #ffffff5e;text-shadow:0 1px #ffffff4a;transform:translateZ(0)}
.h793-page .hanoi-disk:nth-child(8n+2){background:linear-gradient(180deg,#c9dfc1,#8db9a0)}
.h793-page .hanoi-disk:nth-child(8n+3){background:linear-gradient(180deg,#f3dba4,#d4aa62)}
.h793-page .hanoi-disk:nth-child(8n+4){background:linear-gradient(180deg,#add5c0,#6d9f86)}
.h793-page .hanoi-disk:nth-child(8n+5){background:linear-gradient(180deg,#f2c4a2,#db9879)}
.h793-page .hanoi-disk:nth-child(8n+6){background:linear-gradient(180deg,#a7d0cd,#68a19c)}
.h793-page .hanoi-disk:nth-child(8n+7){background:linear-gradient(180deg,#e6dfba,#c2ba85)}
.h793-page .hanoi-peg.is-selected,.h793-page .hanoi-peg.is-focus{box-shadow:inset 0 0 0 2px #e9c688;background:#ffffff1b}
.h793-page .hanoi-peg.is-legal,.h793-page .hanoi-peg.is-drop{background:#8acdab1c}
.h793-page .hanoi-peg.is-hint-source{box-shadow:inset 0 0 0 2px #f5c977;background:#f4d18f26}
.h793-page .hanoi-peg.is-hint-target{box-shadow:inset 0 0 0 2px #9fe9bd;background:#79c99832}
.h793-page .h302-primary-actions{display:grid;grid-template-columns:1.22fr .94fr .94fr 1.15fr .94fr;gap:8px;margin-top:10px}
.h793-page .h302-primary-actions .btn{border-radius:11px;min-width:0;min-height:42px;padding:9px 12px;font-size:13px;font-weight:900;background:#ebeee5;border:1px solid #d8e0d3;color:#30574a;box-shadow:none;white-space:nowrap}
.h793-page .h302-primary-actions .btn:first-child{background:#bf9855;border-color:#af8a4b;color:#fffdf3;box-shadow:0 3px 10px #b38a4260}
.h793-page .h302-primary-actions .btn:nth-child(2){background:#245b46;border-color:#245b46;color:#fff}
.h793-page .h302-primary-actions .btn:hover{filter:brightness(.965)}
.h793-page .h302-status{font-size:12px;line-height:1.35;padding:9px 11px;margin:9px 0 0;border:1px solid #e2e6d7;background:#f4f5ed;border-radius:10px;color:#3e6856}
.h793-page .h302-help{display:flex;gap:4px 12px;font-size:11px;color:#71867a;margin:7px 2px 0}
.h793-page .h302-more-controls{margin-top:11px;padding-top:10px}
.h793-page .h302-more-controls>summary,.h793-page .h302-advanced>summary{color:#345e4d;font-size:13px;font-weight:850}
.h793-page .h302-advanced{border:1px solid #e2e5d7;background:#fffdf8;border-radius:18px}
.h793-page .h302-advanced-body>.card{border-color:#e1e5d5}
.h793-page :is(a,button,summary,.hanoi-peg):focus-visible{outline:3px solid #d2a55e;outline-offset:3px}
@media(min-width:900px){.h793-page .h302-play-card{padding:15px 20px!important}.h793-page .h302-play-card .hanoi-board{min-height:300px}.h793-page .h302-play-card .hanoi-peg{height:264px}.h793-page .hanoi-disk{height:27px;min-height:27px}.h793-page .h302-primary-actions{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:760px){.h793-page .gameheader .scorebox{display:none!important}.h793-page .h302-play-card{padding:10px!important;border-radius:18px}.h793-page .h302-scorebar{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.h793-page .h302-scorebar>div{padding:5px 8px;min-height:27px;border-radius:8px}.h793-page .h302-scorebar strong{font-size:14px}.h793-page .h302-scorebar small{font-size:9px}.h793-page .h302-play-card .hanoi-board{min-height:253px;padding:12px 5px 8px;gap:4px;border-radius:14px}.h793-page .h302-play-card .hanoi-peg{height:228px;padding:0 1px 22px;gap:3px}.h793-page .hanoi-peg::after{bottom:12px!important}.h793-page .hanoi-peg::before{bottom:22px!important;top:35px!important}.h793-page .hanoi-disk{height:24px;min-height:24px;font-size:11px}.h793-page .h302-primary-actions{gap:5px}.h793-page .h302-primary-actions .btn{min-height:38px;font-size:11px;padding:7px 5px}}
@media(max-width:520px){.h793-page.gamepage{padding-top:7px}.h793-page .gameheader{margin-bottom:7px}.h793-page .gameheader .eyebrow{font-size:9px}.h793-page .gameheader h1{font-size:29px}.h793-page .gameheader .hanoi-tagline{font-size:12px;margin:4px 0 0}.h793-page .h302-size-row{gap:5px;padding-bottom:6px}.h793-page .h302-row-label{display:none}.h793-page .h302-current-mode{font-size:10px;padding:7px 8px}.h793-page .h302-size-row>a,.h793-page .h302-modes>summary{min-width:32px;padding:7px 8px;font-size:11px}.h793-page .h302-scorebar small{font-size:9px}.h793-page .h302-board-wrap{border-radius:13px}.h793-page .h302-play-card .hanoi-board{min-height:230px}.h793-page .h302-play-card .hanoi-peg{height:205px}.h793-page .hanoi-disk{height:22px;min-height:22px;border-radius:7px}.h793-page .h302-status{font-size:11px;padding:7px 8px;margin-top:7px}.h793-page .h302-help{font-size:10px}.h793-page .h302-more-controls{margin-top:8px}}
@media(max-width:359px){.h793-page .h302-play-card{padding:8px!important}.h793-page .h302-size-row>a{padding:7px 6px;min-width:29px}.h793-page .h302-primary-actions .btn{font-size:10px;padding:7px 2px}.h793-page .h302-scorebar>div{padding:4px 5px}}
@media(prefers-reduced-motion:reduce){.h793-page *{scroll-behavior:auto!important;animation-duration:0.01ms!important;transition-duration:0.01ms!important}}
/* Preserve access to all five nav destinations without a wrapped second row. */
@media(max-width:760px){body:has(.h793-page) .mobile-dock{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:1fr;align-items:stretch;gap:1px;left:7px;right:7px;bottom:max(6px,env(safe-area-inset-bottom));width:auto;min-height:0;padding:4px;border-radius:13px}body:has(.h793-page) .mobile-dock a{min-width:0;min-height:43px;font-size:10px;line-height:1.1;padding:4px 1px;gap:1px;white-space:nowrap}body:has(.h793-page) .mobile-dock a>span{font-size:12px}body:has(.h793-page) .preview-note{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:4px 12px}body:has(.h793-page) .h302-scorebar>div{gap:2px}body:has(.h793-page) .h302-scorebar strong{font-size:13px}}
