* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f6dfbf; color: #65412a; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
body { overscroll-behavior: none; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.page { position: relative; max-width: 480px; min-height: 100svh; margin: 0 auto; overflow: hidden; background: #f6dfbf; }
.game-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.game { position: relative; min-height: 100svh; padding: max(14px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.status { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 2px solid #e3ae70; border-radius: 20px; background: #fff4df; box-shadow: 0 4px 0 #b9804b44; }
.stat { display: flex; align-items: center; gap: 9px; flex: 1; padding: 4px 8px; }
.stat .mp-icon { color: #ff8a3d; font-size: 30px; }
.stat small { display: block; font-size: 12px; color: #957251; }
.stat strong { display: block; font-size: 27px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.status.urgent #timer { color: #cf4b36; }
.play-area { padding: 10px; background: #fce9cc; border: 3px solid #d99550; border-radius: 18px; box-shadow: 0 5px 0 #9e612c55; }
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.tile { position: relative; width: 100%; aspect-ratio: 1; padding: 0; border: 2px solid #e6b97b; border-radius: 10px; background: #fff8e7; overflow: hidden; cursor: pointer; box-shadow: 0 2px 0 #bc874e; transition: border-color .12s, transform .12s; }
.tile-face { display: block; width: 100%; height: 100%; border-radius: 7px; background-image: url('images/gen/gptimg_1795700906_look.png'); background-repeat: no-repeat; background-size: 714.286% 1428.571%; pointer-events: none; }
.tile.selected { border: 3px solid #2497ff; box-shadow: 0 0 0 2px #9bd8ff, 0 0 15px #349aff99; transform: translateY(-2px); z-index: 1; }
.tile.selected::after { content: ''; position: absolute; inset: 0; background: #319dff22; pointer-events: none; }
.tile:focus-visible { outline: 3px solid #2497ff; outline-offset: 2px; }
.tile.removing { animation: eliminate .34s ease-out forwards; pointer-events: none; }
.tile.removing::after { content: ''; position: absolute; inset: 0; border: 4px solid #fff6a6; border-radius: inherit; box-shadow: inset 0 0 18px #fff; }
.tile.empty { visibility: hidden; pointer-events: none; }
.feedback { margin: 0; padding: 12px 10px; border-radius: 14px; background: #fff6e9ed; color: #795338; text-align: center; font-size: 13px; line-height: 1.6; }
.settlement { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 24px; background: #422715a8; }
.settlement[hidden] { display: none; }
.result-card { width: 100%; padding: 30px 20px; border: 3px solid #ff8a3d; border-radius: 24px; text-align: center; background: #fff5e4; box-shadow: 0 12px 36px #38201044; }
.result-card h2 { margin: 0 0 12px; color: #a75a23; font-size: 26px; }
.result-card p { line-height: 1.6; }
.result-values { display: flex; justify-content: space-around; margin: 24px 0; color: #98704e; }
.result-values strong { display: block; margin-top: 8px; color: #df732d; font-size: 32px; }
.result-note { font-size: 13px; color: #95775d; }
@keyframes eliminate { 0% { transform: scale(1); filter: brightness(1); } 35% { transform: scale(1.12); filter: brightness(1.6); } 100% { transform: scale(.1) rotate(12deg); opacity: 0; } }
@media (max-height: 650px) { .game { gap: 10px; padding-top: 10px; } .status { padding: 5px 10px; } .stat strong { font-size: 23px; } .play-area { padding: 7px; } .board { gap: 3px; } .feedback { padding: 6px; } }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile.removing { animation-duration: .05s; } }
