﻿:root {
  color-scheme: light;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4efe4;
  color: #24221c;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: #f4efe4; }
button, canvas { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 24px; }
.app-header { display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: end; gap: 48px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; color: #a83d2b; font-size: 12px; font-weight: 800; letter-spacing: .22em; }
h1 { margin: 0; font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; }
h1 span { color: #da5c42; }
.intro { max-width: 430px; margin: 0 0 6px; color: #6b675c; font-size: 16px; line-height: 1.8; }
.board-card { overflow: hidden; border: 1px solid rgba(36, 34, 28, .14); border-radius: 28px; background: #fffdf8; box-shadow: 0 24px 70px rgba(63, 52, 32, .12); }
.character-picker { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px 18px 24px; border-bottom: 1px solid rgba(36, 34, 28, .1); background: #faf6ed; }
.character-picker-copy { min-width: 130px; display: grid; gap: 3px; }
.character-picker-copy span { color: #686256; font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.character-picker-copy strong { color: #24221c; font-size: 18px; line-height: 1.2; }
.character-options { min-width: 0; display: flex; justify-content: flex-end; gap: 10px; }
.character-option { min-width: 148px; min-height: 60px; display: flex; align-items: center; gap: 11px; padding: 7px 15px 7px 8px; border: 1px solid rgba(36, 34, 28, .14); border-radius: 18px; background: #fffdf8; color: #4d493f; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(63, 52, 32, .04); transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.character-option:hover { transform: translateY(-1px); border-color: rgba(168, 61, 43, .42); }
.character-option:active { transform: translateY(1px); }
.character-option:focus-visible { outline: 3px solid rgba(218, 92, 66, .28); outline-offset: 2px; }
.character-option[aria-pressed="true"] { border-color: #a83d2b; background: #fff0e8; color: #8e2f20; box-shadow: 0 6px 18px rgba(168, 61, 43, .13); }
.character-option img { width: 46px; height: 46px; flex: 0 0 46px; object-fit: contain; border-radius: 12px; background: #fff; }
.board-toolbar { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 18px 14px 24px; border-bottom: 1px solid rgba(36, 34, 28, .1); }
.status { display: flex; align-items: center; gap: 10px; color: #676258; font-size: 14px; font-weight: 650; }
.status-dot { width: 9px; height: 9px; border-radius: 99px; background: #70a66a; box-shadow: 0 0 0 5px rgba(112, 166, 106, .13); }
.toolbar-actions { display: flex; gap: 10px; }
.button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-weight: 750; cursor: pointer; transition: transform .18s ease, opacity .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button-primary { background: #24221c; color: #fffdf8; }
.button-secondary { background: #eee9dd; color: #38352e; }
.canvas-wrap { position: relative; min-height: 560px; height: min(66vh, 700px); overflow: hidden; background-color: #fffdf8; background-image: radial-gradient(rgba(45, 42, 34, .11) 1px, transparent 1px); background-size: 22px 22px; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.canvas-hint { position: absolute; left: 50%; top: 50%; display: grid; justify-items: center; transform: translate(-50%, -50%); color: #989183; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.canvas-hint.is-hidden { opacity: 0; transform: translate(-50%, -46%); }
.hint-arrow { color: #da5c42; font-size: 38px; transform: rotate(-25deg); }
.canvas-hint strong { color: #5d594f; font-size: 19px; }
.canvas-hint small { margin-top: 7px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 4px 0; color: #635e53; font-size: 12px; }
@media (max-width: 760px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 26px; }
  .app-header { grid-template-columns: 1fr; gap: 18px; }
  h1 { font-size: clamp(42px, 13vw, 62px); }
  .intro { font-size: 14px; }
  .character-picker { display: grid; gap: 12px; padding: 14px; }
  .character-picker-copy { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .character-options { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .character-option { min-width: 0; min-height: 58px; gap: 9px; padding: 6px 10px 6px 7px; }
  .character-option img { width: 42px; height: 42px; flex-basis: 42px; }
  .board-toolbar { flex-wrap: wrap; align-items: center; padding: 14px; }
  .status { min-width: 0; max-width: none; flex: 1 1 160px; }
  .toolbar-actions { margin-left: auto; }
  .button { min-height: 44px; padding: 0 14px; font-size: 13px; }
  .canvas-wrap { height: 62vh; min-height: 420px; }
  .app-footer { flex-direction: column; gap: 4px; }
}

