:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #233044;
  background: #f2f5fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #ec9b32; outline-offset: 3px; }
.game-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 24px; }
.page-header { margin-bottom: 22px; }
.page-header h1 { margin: 4px 0 8px; font-size: clamp(2rem, 5vw, 3rem); }
.page-header p { margin-top: 0; }
.eyebrow { color: #536c95; font-weight: 700; letter-spacing: .08em; }
.game-panel { padding: 20px; border: 1px solid #d9e1ef; border-radius: 18px; background: #fff; box-shadow: 0 12px 36px #263c5b12; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.toolbar button { min-height: 42px; padding: 8px 16px; border: 1px solid #b9c5d8; border-radius: 9px; background: #fff; color: #233044; }
.toolbar .primary-button { border-color: #315aa8; background: #315aa8; color: #fff; font-weight: 700; }
.status { min-height: 1.5em; margin: 0; }
.board { position: relative; min-height: 330px; margin: 18px 0; overflow: auto; border: 1px solid #e0e7f1; border-radius: 12px; background: radial-gradient(ellipse at center, #f9fbff, #edf2fa); }
.card { position: absolute; width: 76px; height: 104px; display: grid; place-items: center; border: 1px solid #bccbe0; border-radius: 12px; background: linear-gradient(145deg, #fff, #edf3fc); box-shadow: 0 4px 9px #21385825; color: #253c62; font-size: 2rem; transition: transform .12s, box-shadow .12s, opacity .12s; }
.card:hover:not(:disabled) { z-index: 20 !important; transform: translateY(-5px); box-shadow: 0 8px 16px #21385835; }
.card:disabled, .card[aria-disabled="true"] { cursor: not-allowed; }
.card.is-blocked { filter: saturate(.45); opacity: .65; }
.card.is-removed { display: none; }
.tray-section h2 { display: flex; justify-content: space-between; font-size: 1rem; }
.tray { display: grid; grid-template-columns: repeat(7, minmax(48px, 76px)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.tray-slot { min-height: 72px; display: grid; place-items: center; border: 2px dashed #c5d0e0; border-radius: 10px; background: #f8faff; font-size: 1.8rem; }
.tray-slot:not(:empty) { border-style: solid; background: #eaf1ff; }
.notice { padding: 12px 16px; border-left: 4px solid #d18a19; border-radius: 5px; background: #fff5df; }
footer { padding-top: 18px; color: #5c687a; font-size: .9rem; }
@media (max-width: 620px) {
  .game-shell { width: min(100% - 20px, 1120px); padding-top: 18px; }
  .game-panel { padding: 12px; }
  .tray { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .tray-slot { min-height: 54px; font-size: 1.3rem; }
}
