/* 喫茶ほしぞらのソリティア — 色はCSS変数（コーヒーと夜空） */
:root {
  --accent: #a2541f; --accent-ink: #ffffff; --accent-soft: #f6e6d6;
  --table: #5b3a22; --back: #233256; --back-line: #f2cf86;
  --card: #fffdf8; --card-line: #d8cfc0; --suit-red: #c42f2b; --suit-black: #1d1b18;
  --slot: rgba(255, 244, 220, .32); --hint: #ffd36b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #f0a868; --accent-ink: #1a120c; --accent-soft: #3a2616;
    --table: #3f2716; --back: #1b2746; --card: #f7f2e8; --card-line: #9d927f;
  }
}
:root[data-theme="dark"] {
  --accent: #f0a868; --accent-ink: #1a120c; --accent-soft: #3a2616;
  --table: #3f2716; --back: #1b2746; --card: #f7f2e8; --card-line: #9d927f;
}

/* タイトル */
.hs-hero { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, #1b2746, #4a2f1d); }
.hs-hero img, .hs-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-hero video { opacity: 0; transition: opacity .6s; }
.hs-hero.is-video video { opacity: 1; }
.hs-hero-sign { position: absolute; left: 14px; bottom: 12px; color: #fff; font-family: var(--font-serif); font-weight: 700; font-size: 22px; line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); display: none; }
.hs-hero-sign small { display: block; font-size: 12px; letter-spacing: .2em; opacity: .85; }
.hs-hero.is-empty .hs-hero-sign { display: block; }
.hs-shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.hs-mini { aspect-ratio: 5 / 7; border-radius: 6px; background: var(--card); border: 1px solid var(--card-line); color: var(--suit-black); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.hs-mini.is-red { color: var(--suit-red); }
.hs-mini.is-back { background: var(--back) url(assets/back.webp) center / cover; border-color: transparent; }
.hs-reread { display: grid; gap: 6px; margin-top: 8px; }
.hs-reread-btn { justify-content: flex-start; min-height: 42px; font-size: 14px; }
.hs-master { font-family: var(--font-serif); font-size: 16px; }
.hs-dealing { padding: 40px 18px; }
.hs-spin { width: 34px; height: 34px; margin: 10px auto 0; border-radius: 50%; border: 4px solid var(--surface-2); border-top-color: var(--accent); animation: hs-spin .8s linear infinite; }
@keyframes hs-spin { to { transform: rotate(360deg); } }

/* プレイ画面 */
.hs-play { margin: -8px -10px 0; }
.hs-hud { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; }
.hs-hud-l { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.hs-stage { font-size: 16px; }
.hs-goal { font-size: 12px; color: var(--text-sub); }
.hs-hud-r { display: flex; gap: 10px; font-size: 13px; color: var(--text-sub); white-space: nowrap; }
.hs-hud-r b { color: var(--text); font-size: 17px; font-variant-numeric: tabular-nums; }
.hs-board { position: relative; width: 100%; border-radius: 14px; background: var(--table) url(assets/table.webp) center / cover; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: inset 0 0 40px rgba(0, 0, 0, .35); }
.hs-slot { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border: 2px dashed var(--slot); border-radius: calc(var(--cw) * .1); color: var(--slot); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(var(--cw) * .42); }
.hs-slot-stock { cursor: pointer; touch-action: none; }
.hs-slot-c { font-size: calc(var(--cw) * .3); }
.hs-card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .1); background: var(--card); border: 1px solid var(--card-line); color: var(--suit-black); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .17s ease-out; touch-action: none; cursor: pointer; overflow: hidden; font-family: var(--font); }
.hs-card.is-red { color: var(--suit-red); }
.hs-card.no-anim, .hs-card.is-drag { transition: none; }
.hs-card.is-drag { box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
.hs-c-r { position: absolute; left: 6%; top: 1%; font-weight: 900; font-size: calc(var(--cw) * .34); line-height: 1.05; letter-spacing: -.06em; }
.hs-c-s { position: absolute; right: 6%; top: 2%; font-size: calc(var(--cw) * .3); line-height: 1.05; }
.hs-c-big { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-size: calc(var(--cw) * .62); line-height: 1; }
.hs-c-face { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; font-family: var(--font-serif); font-weight: 900; font-size: calc(var(--cw) * .58); line-height: 1; }
.hs-c-face small { display: block; font-family: var(--font); font-size: calc(var(--cw) * .26); font-weight: 400; margin-top: 1px; }
.hs-card.is-down { background: var(--back) url(assets/back.webp) center / cover; border-color: rgba(0, 0, 0, .35); cursor: default; }
.hs-card.is-down > * { display: none; }
.hs-card.hs-hint, .hs-slot.hs-hint, .hs-tool.hs-hint { outline: 3px solid var(--hint); outline-offset: -1px; animation: hs-pulse 1s ease-in-out 3; }
@keyframes hs-pulse { 50% { outline-color: transparent; } }
.hs-card.hs-nope { animation: hs-nope .3s; }
@keyframes hs-nope { 30% { margin-left: -4px; } 70% { margin-left: 4px; } }
.hs-play.is-won .hs-board { box-shadow: inset 0 0 0 3px var(--hint), inset 0 0 40px rgba(0, 0, 0, .35); }
.hs-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 4px 4px; }
.hs-tools > [hidden] { display: none; }
.hs-tool { min-height: 46px; padding: 8px 6px; font-size: 15px; }

/* 結果 */
.hs-final .hs-clear { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin: 0; }
.hs-unit { font-size: .4em; margin-left: 4px; color: var(--text); }
.hs-time { font-size: 15px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .hs-play { margin: 0; } }
