* { box-sizing: border-box; }
:root { --theme: #FF8A3D; }
html, body { margin: 0; min-height: 100%; background: #fff1df; color: #513323; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.page { max-width: 480px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom)); }
.stats { display: flex; gap: 8px; }
.stats > div { flex: 1; background: #fffaf3; border: 1px solid #f3d3b3; border-radius: 14px; padding: 12px 6px; text-align: center; }
.stats span { display: block; color: #94735c; font-size: 12px; }
.stats strong { display: block; margin-top: 5px; color: #c8560c; font-size: 24px; }
.game { margin-top: 12px; background: #fffcf7; border: 2px solid #ffc48d; border-radius: 18px; padding: 10px; }
.message { margin: 2px 0 12px; min-height: 34px; display: flex; align-items: center; justify-content: center; font-size: 13px; text-align: center; line-height: 1.4; }
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.tile { aspect-ratio: 1; min-width: 0; min-height: 44px; border: 1px solid var(--edge); border-bottom-width: 4px; border-radius: 10px; background: var(--tile); color: #433529; font: inherit; font-weight: 700; font-size: clamp(10px, 3vw, 14px); line-height: 1.4; padding: 3px; cursor: pointer; touch-action: manipulation; }
.tile.selected { outline: 3px solid #d95e0f; outline-offset: -2px; }
.tile:focus-visible { outline: 3px solid #513323; }
.tile.cleared { visibility: hidden; }
.board[aria-busy="true"] .tile { cursor: wait; }
.progress-panel { margin-top: 12px; background: #fffaf3; border: 1px solid #f3d3b3; border-radius: 16px; padding: 14px; }
.progress-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 14px; }
.progress-heading span { font-size: 11px; color: #94735c; }
.overall { height: 9px; border-radius: 10px; background: #f2dfc9; margin: 12px 0; overflow: hidden; }
.overall > div { height: 100%; width: 0; background: var(--theme); border-radius: inherit; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.plan span { border-left: 5px solid var(--edge); padding-left: 7px; }
.plan strong { color: #b25219; font-size: 12px; }
.hint { color: #96745c; font-size: 12px; line-height: 1.8; text-align: center; margin: 12px 0 0; }
.result { margin-top: 12px; padding: 16px; border: 2px solid var(--theme); border-radius: 16px; background: #fffaf3; text-align: center; }
.result strong { font-size: 20px; }
.result p { font-size: 14px; }
.result button { border: 0; border-radius: 12px; background: var(--theme); color: #42260f; min-height: 46px; width: 100%; font: inherit; font-weight: bold; cursor: pointer; }
[hidden] { display: none !important; }
