/* 射的ドット（/shateki/・2026-11-24）: 入口はサイトの明るい地のまま、遊ぶ画面（.st-game）は画面全体を使う
   色: 夜の藍 --snight・紅 --sred・木 --swood・金 --sgold。的の絵の色は site/js/shateki/art.js、うち手と屋台は site/js/shateki/draw.js */
:root { --snight: #1f2349; --spanel: #fff8ec; --sline: #ecd9b8; --sink: #2d1d12; --smut: #7d6a55; --sred: #c8322f; --swood: #6c3f1f; --sgold: #f4c143; }

/* ── 入口 ── */
.st-top { display: grid; gap: 16px; padding-top: 8px; }
.st-hero { position: relative; margin: 0; border-radius: 20px; overflow: hidden; background: var(--snight); display: grid; box-shadow: 0 18px 40px -26px rgba(20, 15, 50, .85); }
.st-hero canvas { display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 64vh; }
.st-hero-cap { display: grid; gap: 2px; padding: 12px 16px 10px; color: #fff; background: linear-gradient(180deg, #3b1f14, #2a1810); }
.st-eb { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #ffd27a; }
.st-hero-cap b { font-family: var(--f-round); font-size: clamp(28px, 8.5vw, 42px); line-height: 1.15; letter-spacing: .04em; text-shadow: 0 2px 16px rgba(10, 5, 30, .7); }
.st-top .lead b { color: #b8292a; }
.st-start { display: grid; gap: 10px; }
.st-start .btn.go { --go: #c8322f; --go-step: #8c1f20; --go-soft: rgba(140, 31, 32, .5); }
.st-note { font-size: 13px; color: var(--muted); }
.st-note b { color: var(--ink); }
.st-pick { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 4px 12px; }
.st-pick[hidden] { display: none; }
.st-pick summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; padding: 4px 0 12px; max-height: 260px; overflow: auto; }
.st-cell { display: grid; justify-items: center; gap: 1px; min-height: 48px; padding: 5px 2px 4px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 800 14px/1.2 var(--f-round); cursor: pointer; }
.st-cell.now { border-color: var(--sred); background: #fff1ee; }
.st-mini { display: flex; gap: 1px; }
.st-mini svg { width: 11px; height: 11px; }
.st-stars svg.on, .st-mini svg.on { fill: var(--sgold); stroke: #b77a06; stroke-width: 1.4; stroke-linejoin: round; }
.st-stars svg.off, .st-mini svg.off { fill: rgba(120, 95, 60, .16); stroke: rgba(120, 95, 60, .25); stroke-width: 1.2; }
.st-h2 { font-size: 20px; margin-top: 12px; }
.st-how { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
.st-how li { counter-increment: st; position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 50px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.st-how li::before { content: counter(st); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sred); color: #fff; font: 800 14px/1 var(--f-round); }
.st-how b { font-size: 15.5px; }
.st-how span { font-size: 13.5px; color: var(--ink2); line-height: 1.6; }
.st-how span b { font-size: inherit; }
.st-faq details { border-bottom: 1px solid var(--line); padding: 10px 2px; }
.st-faq summary { cursor: pointer; font-weight: 700; }
.st-faq p { margin-top: 6px; font-size: 14px; color: var(--ink2); }

/* ── 遊ぶ画面 ── */
html.st-lock, html.st-lock body { overflow: hidden; overscroll-behavior: none; }
.st-game { position: fixed; inset: 0; z-index: 2147483000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: var(--snight); color: var(--sink); font-family: var(--f-body); line-height: 1.5; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.st-game button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.st-hud { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 7px max(10px, env(safe-area-inset-left, 0px)); background: #3b1f14; color: #fbf1dc; }
.st-title { display: grid; line-height: 1.2; min-width: 0; flex: 1 1 auto; }
.st-title b { font: 800 17px/1.2 var(--f-round); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-title span { font-size: 12px; color: #f2cf8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-left { display: flex; align-items: baseline; gap: 4px; padding: 4px 12px; border-radius: 999px; background: #fbf1dc; color: var(--sink); white-space: nowrap; }
.st-left b { font: 900 21px/1 var(--f-round); font-variant-numeric: tabular-nums; min-width: 1.8em; text-align: right; }
.st-left span { font-size: 12px; font-weight: 700; color: var(--smut); }
.st-menu-btn { display: grid; gap: 3px; place-content: center; flex: none; width: 40px; height: 38px; border: 1px solid rgba(251, 241, 220, .35); border-radius: 10px; background: rgba(255, 255, 255, .08); }
.st-menu-btn i { display: block; width: 17px; height: 2px; border-radius: 2px; background: #fbf1dc; }
.st-fieldbox { position: relative; min-height: 0; overflow: hidden; }
#st-field { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; cursor: pointer; }
.st-banner { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 9px 15px; border-radius: 12px; background: rgba(255, 248, 232, .96); color: var(--sink); border: 2px solid var(--sgold); font-size: 14px; font-weight: 800; text-align: center; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .8); pointer-events: none; animation: st-in .25s ease-out; }
.st-banner.hot { background: rgba(200, 50, 47, .97); border-color: #ffb3a8; color: #fff; }
.st-banner.big { padding: 12px 22px; font: 900 24px/1.3 var(--f-round); border-width: 3px; box-shadow: 0 0 0 4px rgba(244, 193, 67, .35), 0 16px 36px -14px rgba(0, 0, 0, .8); }
.st-banner[hidden] { display: none; }
.st-toast { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 12px; background: rgba(255, 250, 240, .97); border: 1px solid var(--sline); color: var(--sink); font-size: 13.5px; font-weight: 700; text-align: center; box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .6); pointer-events: none; }
.st-toast[hidden] { display: none; }
.st-toast.in { animation: st-in .2s ease-out; }
.st-tools { display: flex; gap: 8px; padding: 7px max(10px, env(safe-area-inset-right, 0px)) max(9px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); justify-content: center; background: #3b1f14; }
.st-tool { position: relative; flex: 1 1 0; max-width: 130px; min-width: 0; min-height: 54px; display: grid; justify-items: center; align-content: center; gap: 1px; padding: 6px 2px 5px; border-radius: 14px; border: 0; background: #fbf1dc; color: var(--sink); box-shadow: 0 3px 0 #b8925c; }
.st-tool:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8925c; }
.st-tool svg { width: 26px; height: 26px; color: var(--sink); }
.st-tool span { font-size: 12px; font-weight: 800; white-space: nowrap; }
.st-tool em { position: absolute; top: -7px; right: -3px; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--sred); color: #fff; font: 800 12px/1.4 var(--f-round); font-style: normal; text-align: center; font-variant-numeric: tabular-nums; }
.st-tool.zero { opacity: .5; }
.st-tool.zero em { background: #8d7b63; }
.st-tool[disabled] { opacity: .4; cursor: default; }

/* 札（メニュー・クリア・おしまい） */
.st-sheet { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 14px; background: rgba(15, 10, 35, .55); animation: st-fade .2s ease-out; }
.st-sheet[hidden] { display: none; }
.st-card { width: min(420px, 100%); max-height: calc(100% - 4px); overflow: auto; padding: 18px 18px 16px; border-radius: 20px; background: var(--spanel); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); display: grid; gap: 12px; animation: st-up .25s ease-out; }
.st-card h2 { font: 900 23px/1.3 var(--f-round); text-align: center; }
.st-card .sub { font-size: 13.5px; color: var(--smut); text-align: center; margin: -4px 0 0; }
.st-clear-eb { text-align: center; color: var(--sred); font-size: 13px; font-weight: 800; letter-spacing: .08em; margin: 0 0 -8px; }
.st-prize-box { display: grid; place-items: center; }
.st-prize { width: 150px; height: 150px; border-radius: 10px; border: 6px solid #8a5228; box-shadow: 0 8px 20px -10px rgba(60, 30, 10, .7); background: #f8efdc; }
.st-stars.big { display: flex; justify-content: center; gap: 6px; }
.st-stars.big svg { width: 44px; height: 44px; animation: st-star .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.st-stars.big svg:nth-child(2) { animation-delay: .15s; width: 52px; height: 52px; margin-top: -8px; }
.st-stars.big svg:nth-child(3) { animation-delay: .3s; }
.st-best { text-align: center; font-size: 13.5px; font-weight: 700; color: #2f8f5f; margin: 0; }
.st-best:empty { display: none; }
.st-acts { display: grid; gap: 8px; }
.st-acts .btn { min-height: 48px; font: 700 16px/1.3 var(--f-round); color: var(--sink); }
.st-acts .btn.st-main { background: var(--sred); color: #fff; box-shadow: 0 4px 0 #8c1f20; }
.st-menu-list { display: grid; gap: 8px; }
.st-menu-list button { min-height: 48px; border-radius: 12px; border: 1px solid var(--sline); background: #fff; font-weight: 700; }
.st-help { display: grid; gap: 8px; font-size: 13.5px; line-height: 1.6; }
.st-help p { margin: 0; }
.st-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.st-leg { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: center; gap: 0 4px; padding: 4px 6px; border-radius: 12px; background: #2b2f5c; color: #fbf1dc; font-size: 11px; font-weight: 700; }
.st-leg canvas:first-child { width: 46px; height: 46px; grid-row: span 2; }
.st-leg canvas:nth-child(2) { width: 18px; height: 18px; border-radius: 3px; }
/* 共有のかたまり（../js/share.js の shareBlock）。札の中なので、上の余白をつめて見出しを小さく左に */
.st-sharebox .section { margin-top: 2px; gap: 10px; }
.st-sharebox .share > h2 { font: 800 15px/1.3 var(--f-round); text-align: left; }
.st-sharebox .btn { min-height: 50px; color: #fff; font: 700 16px/1.3 var(--f-round); }
.st-sharebox .seg button { font: 700 13px/1.5 var(--f-body); }
.st-sharebox .share-apps { grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); }
.st-sharebox .seg button:not([aria-pressed="true"]) { color: var(--smut); }
/* 全画面のゲームの上に出す: 知らせ（.toast）と、画像を長押しで保存する窓（.share-sheet・アプリの中のブラウザ） */
.st-lock .toast, .st-lock .share-sheet { z-index: 2147483100; }
.st-lock .pc-cols .toast { left: 50%; }

@keyframes st-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes st-star { from { opacity: 0; transform: scale(.2) rotate(-40deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .st-banner, .st-toast.in, .st-card, .st-sheet, .st-stars.big svg { animation: none; } }

@media (max-width: 360px) {
  .st-hud { gap: 6px; }
  .st-title b { font-size: 15.5px; }
  .st-title span { font-size: 11px; }
  .st-left { padding: 4px 9px; }
  .st-left b { font-size: 19px; }
  .st-menu-btn { width: 36px; }
  .st-tool span { font-size: 11px; }
}
@media (min-width: 700px) {
  .st-tools { gap: 12px; }
  .st-tool { max-width: 150px; }
  .st-hero canvas { width: min(100%, 430px); justify-self: center; max-height: none; }
}
