/* AR花火 */
:root {
  --app-h: 100vh;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --gold: #ffc460;
  --pink: #ff6cbe;
  --cyan: #54e0ff;
  --ink: #f6f4ff;
  --glass: rgba(8, 10, 28, 0.62);
  --line: rgba(255, 255, 255, 0.22);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: var(--app-h);
  background: #05060f;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow: hidden;
  position: relative;
}

button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- 舞台（カメラ映像・暗さ・花火） ---- */
.stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--app-h);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background: #05060f;
}
.stage-video,
.stage-xr,
.stage-shade,
.stage-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.stage-video {
  object-fit: cover;
  visibility: hidden;
}
body[data-mode="camera"][data-ar="own"] .stage-video { visibility: visible; }
.stage-shade {
  background: rgb(2, 4, 18);
  opacity: 0;
  pointer-events: none;
}
.stage-gl { display: block; }
/* 8th Wall のときは、エンジンが映像を #xr に描き、花火も同じ canvas に描く（#gl と #shade は使わない） */
.stage-xr { display: none; }
body[data-ar="slam"] .stage-xr { display: block; }
body[data-ar="slam"] .stage-gl,
body[data-ar="slam"] .stage-shade { display: none; }

/* 照準: 花火が開く場所と大きさ。--d は開く大きさを画面に映した直径 */
.reticle {
  --d: 120px;
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
body[data-screen="play"] .reticle { opacity: 0.82; }
body[data-screen="play"].is-counting .reticle,
body[data-screen="play"][data-photo="1"] .reticle { opacity: 0; }
.reticle-ring {
  position: absolute;
  left: calc(var(--d) / -2);
  top: calc(var(--d) / -2);
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 224, 150, 0.8);
  box-shadow: 0 0 14px rgba(255, 196, 96, 0.3), inset 0 0 14px rgba(255, 196, 96, 0.16);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.reticle-cross {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 240, 200, 0.95);
  background: rgba(255, 196, 96, 0.25);
  box-shadow: 0 0 10px rgba(255, 196, 96, 0.7);
}
.reticle-tip {
  position: absolute;
  left: 50%;
  top: 14px;
  margin: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffe9bf;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.25s ease;
}
/* 文字は出しっぱなしにしない: 開始直後（3 秒）・ドラッグやピンチの間・大きさを変えた直後だけ */
.reticle.is-tip .reticle-tip,
.reticle.is-drag .reticle-tip { opacity: 1; }
.reticle.is-drag .reticle-ring {
  border-style: solid;
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(255, 196, 96, 0.6), inset 0 0 18px rgba(255, 196, 96, 0.28);
}
.reticle.is-drag .reticle-cross { transform: scale(1.3); }

.snap-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
}
.snap-flash.is-on { animation: snap 0.45s ease-out; }
@keyframes snap { from { opacity: 0.85; } to { opacity: 0; } }

/* ---- 画面 ---- */
.screen {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--app-h);
  z-index: 10;
}

/* ---- タイトル ---- */
.title-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(14px + var(--st)) calc(18px + var(--sr)) calc(18px + var(--sb)) calc(18px + var(--sl));
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(5, 6, 15, 0.7), rgba(5, 6, 15, 0) 70%),
    linear-gradient(to top, rgba(5, 6, 15, 0.86), rgba(5, 6, 15, 0) 46%);
}
body:not([data-screen="title"]) .title-screen { display: none; }

.back-link {
  align-self: flex-start;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 6, 15, 0.45);
}

.title-top { text-align: center; margin-top: 4px; }
.kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 196, 96, 0.7);
}
.logo {
  margin: 0;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.logo-ar {
  display: inline-block;
  font-size: clamp(44px, 14vw, 88px);
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  -webkit-text-stroke: 2px var(--pink);
  text-shadow: 0 0 18px rgba(255, 108, 190, 0.85), 0 0 42px rgba(255, 108, 190, 0.5);
  margin-right: 0.08em;
  transform: skewX(-8deg);
}
.logo-hanabi {
  font-size: clamp(56px, 18vw, 112px);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  color: #fff7e4;
  text-shadow: 0 0 14px rgba(255, 196, 96, 0.95), 0 0 40px rgba(255, 150, 60, 0.6);
}
.lead {
  margin: 14px auto 0;
  max-width: 26em;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.title-bottom {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary {
  border: 0;
  color: #1c0d00;
  background: linear-gradient(135deg, #ffe08a, var(--gold) 45%, #ff8f5a);
  box-shadow: 0 6px 24px rgba(255, 160, 70, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-main { font-size: 18px; }
.btn-sub { font-size: 11px; font-weight: 700; opacity: 0.75; margin-top: 2px; letter-spacing: 0; }
.btn-ghost { background: rgba(10, 12, 30, 0.55); }
.btn-small { min-height: 44px; font-size: 15px; padding: 8px 18px; }

.start-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  color: #ffe2a8;
}
.start-status.is-error {
  color: #fff;
  background: rgba(150, 20, 60, 0.6);
  border: 1px solid rgba(255, 108, 190, 0.6);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: left;
}
.notes {
  margin: 0;
  padding: 0 0 0 1.2em;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}
.notice {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
}
.notice a { color: rgba(255, 255, 255, 0.8); }

/* ---- プレイ画面 ---- */
.play-screen { pointer-events: none; touch-action: manipulation; }
.play-screen > * { pointer-events: auto; }
.play-screen .hint,
.play-screen .hint * { pointer-events: none; }
body:not([data-screen="play"]) .play-screen { display: none; }

.hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(8px + var(--st)) calc(10px + var(--sr)) 8px calc(10px + var(--sl));
  background: linear-gradient(to bottom, rgba(4, 5, 14, 0.6), rgba(4, 5, 14, 0));
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-title {
  margin: 0 2px 0 4px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(255, 196, 96, 0.8);
  white-space: nowrap;
}
.hud-mode {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(84, 224, 255, 0.16);
  border: 1px solid rgba(84, 224, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  pointer-events: none;
}
.hud-space { flex: 1; pointer-events: none; }
.icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  cursor: pointer;
  touch-action: manipulation;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn-text span { font-size: 12px; font-weight: 800; }
#btn-sound .ico-off { display: none; }
#btn-sound[aria-pressed="false"] .ico-on { display: none; }
#btn-sound[aria-pressed="false"] .ico-off { display: block; }
#btn-sound[aria-pressed="false"] { color: #ffb0c8; }
body:not([data-mode="camera"]) #btn-shade { display: none; }
body:not([data-sky="1"]) #btn-sky { display: none; }
#btn-sky[aria-pressed="true"] {
  color: #d8f4ff;
  border-color: rgba(84, 224, 255, 0.7);
  background: rgba(84, 224, 255, 0.18);
}
#btn-sky[aria-pressed="false"] { opacity: 0.75; }
/* 「空だけ」が出ると上の段が詰まるので、狭い画面では方式の表示を隠す */
@media (max-width: 479px) {
  body[data-sky="1"] .hud-mode { display: none; }
}
@media (max-width: 359px) {
  #btn-sky span { display: none; }
  #btn-sky { padding: 0 6px; min-width: 36px; }
}

/* 記念撮影のカウントダウン */
.count {
  position: absolute;
  left: 50%;
  top: 30%;
  margin: 0;
  transform: translate(-50%, -50%);
  font: 900 108px/1 "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  color: #fff7e4;
  text-shadow: 0 0 18px rgba(255, 196, 96, 0.95), 0 4px 24px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}
.count.is-word { font-size: 64px; letter-spacing: 0.06em; }
.count.pop { animation: count-pop 0.9s ease-out; }
@keyframes count-pop { from { transform: translate(-50%, -50%) scale(1.5); opacity: 0.2; } 30% { opacity: 1; } to { transform: translate(-50%, -50%) scale(1); opacity: 0.95; } }
body.is-counting .panel,
body.is-counting .hint { opacity: 0.18; pointer-events: none; }

.hint {
  position: absolute;
  left: 50%;
  top: calc(64px + var(--st));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  padding: 10px 18px;
  border-radius: 16px;
  background: rgba(5, 6, 15, 0.55);
  border: 1px solid rgba(255, 196, 96, 0.45);
  box-shadow: 0 0 22px rgba(255, 196, 96, 0.22);
  transition: opacity 0.6s ease;
}
.hint.is-hidden { opacity: 0; }
.hint-main { margin: 0; font-size: 16px; font-weight: 800; }
.hint-sub { margin: 4px 0 0; font-size: 12px; font-weight: 600; opacity: 0.85; }
.hint-sub:empty { display: none; }

.resume {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(5, 6, 15, 0.8);
  border: 1px solid var(--line);
}
.resume p { margin: 0 0 10px; font-weight: 700; }

.panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px calc(10px + var(--sr)) calc(12px + var(--sb)) calc(10px + var(--sl));
  background: linear-gradient(to top, rgba(4, 5, 14, 0.82), rgba(4, 5, 14, 0.55) 70%, rgba(4, 5, 14, 0));
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.now-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fold-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 0 10px 0 6px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.fold-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.fold-btn[aria-expanded="false"] svg { transform: rotate(180deg); }

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 8px;
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 13px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(10, 12, 30, 0.6);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.chip[aria-checked="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #1c0d00;
  box-shadow: 0 0 14px rgba(255, 196, 96, 0.6);
}
.swatches {
  display: flex;
  justify-content: flex-start;
  gap: 7px;
  padding: 2px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.swatches::-webkit-scrollbar { display: none; }
.swatch {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: var(--c);
  box-shadow: 0 0 10px var(--g, transparent);
  cursor: pointer;
  touch-action: manipulation;
  padding: 0;
}
.swatch[aria-checked="true"] {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 16px var(--g, #fff);
}
/* 入るときは中央、入らないときは左から横にスクロール（justify-content: center だと左端が切れて届かない） */
.swatch:first-child { margin-left: auto; }
.swatch:last-child { margin-right: auto; }
.panel.is-folded .panel-pick { display: none; }

.actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "sm sh sk" "kn kn kn";
  align-items: center;
  gap: 10px 14px;
  max-width: 560px;
  margin: 0 auto;
}
#btn-starmine { grid-area: sm; }
#btn-shutter { grid-area: sh; }
#btn-shaku { grid-area: sk; }
/* 下の段: 記念撮影とまわり一面を半分ずつ */
.actions-row {
  grid-area: kn;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-act-kinen {
  min-height: 46px;
  padding: 4px 8px;
  border-color: rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 196, 96, 0.28));
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
}
.btn-act-kinen small,
.btn-act-show small { font-size: 10px; font-weight: 700; opacity: 0.85; letter-spacing: 0; margin-top: 1px; white-space: nowrap; }
.btn-act-show {
  min-height: 46px;
  padding: 4px 8px;
  border-color: rgba(130, 200, 255, 0.65);
  background: linear-gradient(135deg, rgba(84, 224, 255, 0.26), rgba(170, 120, 255, 0.3));
  box-shadow: 0 0 16px rgba(120, 170, 255, 0.3);
}
.btn-act-show.is-on {
  border-color: #fff;
  background: linear-gradient(135deg, rgba(84, 224, 255, 0.5), rgba(190, 120, 255, 0.52));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 24px rgba(150, 200, 255, 0.7);
  animation: show-glow 1.8s ease-in-out infinite;
}
@keyframes show-glow { 50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 10px rgba(150, 200, 255, 0.35); } }
.chip:first-child { margin-left: auto; }
.chip:last-child { margin-right: auto; }
.btn-act {
  min-height: 48px;
  border-radius: 24px;
  font-size: 15px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 108, 190, 0.6);
  background: linear-gradient(135deg, rgba(255, 108, 190, 0.32), rgba(84, 224, 255, 0.22));
  box-shadow: 0 0 16px rgba(255, 108, 190, 0.3);
}
.btn-act-gold {
  border-color: rgba(255, 196, 96, 0.75);
  background: linear-gradient(135deg, rgba(255, 196, 96, 0.4), rgba(255, 120, 60, 0.25));
  box-shadow: 0 0 16px rgba(255, 196, 96, 0.35);
}
.btn-act.is-running { opacity: 0.6; }
.shutter {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: transparent;
  padding: 5px;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}
.shutter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.12s;
}
.shutter:active span { transform: scale(0.88); }

@media (max-width: 359px) {
  .swatches { gap: 5px; }
  .swatch { width: 28px; height: 28px; }
  .chip { height: 34px; padding: 0 11px; font-size: 14px; }
  .actions { gap: 8px; }
  .btn-act { font-size: 13px; letter-spacing: 0; padding: 6px 6px; white-space: nowrap; }
  .btn-act-kinen small, .btn-act-show small { display: none; }
  .btn-act-kinen, .btn-act-show { min-height: 40px; }
}

/* 横向き: 操作ボタンを右に縦に並べ、下の段を短くする */
@media (orientation: landscape) and (max-height: 560px) {
  .hint { top: calc(54px + var(--st)); }
  .panel {
    right: calc(108px + var(--sr));
    padding-top: 18px;
    padding-bottom: calc(8px + var(--sb));
  }
  .panel-pick { display: flex; align-items: center; gap: 10px; }
  .panel-pick .chips { flex: 1 1 auto; min-width: 0; margin: 0; padding: 2px 0; }
  .panel-pick .swatches { flex: 0 0 auto; padding: 2px 0; gap: 5px; }
  .swatch { width: 28px; height: 28px; }
  .actions {
    position: fixed;
    right: calc(10px + var(--sr));
    bottom: calc(10px + var(--sb));
    width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
  }
  .btn-act { width: 92px; min-height: 40px; font-size: 12px; letter-spacing: 0; padding: 4px; white-space: nowrap; }
  .shutter { width: 60px; height: 60px; order: -1; }
  .actions-row { display: contents; }
  #btn-kinen, #btn-show { order: 0; min-width: 0; }
  #btn-starmine, #btn-shaku { order: 1; }
  .btn-act-kinen small, .btn-act-show small { display: none; }
  .count { top: 50%; font-size: 84px; }
  .count.is-word { font-size: 56px; }
}

/* ---- モーダル ---- */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--app-h);
  z-index: 30;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(3, 4, 12, 0.72);
  padding: calc(14px + var(--st)) calc(14px + var(--sr)) calc(14px + var(--sb)) calc(14px + var(--sl));
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.modal-box {
  width: 100%;
  max-width: 520px;
  margin: auto 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(12, 14, 34, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.modal-title { margin: 0 0 12px; font-size: 18px; font-weight: 900; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.modal-actions .btn { flex: 1 1 140px; }

.photo-figure { margin: 0; text-align: center; }
.photo-figure img {
  max-width: 100%;
  max-height: calc(var(--app-h) - 230px);
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #000;
  -webkit-touch-callout: default;
}
.photo-note { margin: 8px 0 0; font-size: 12px; text-align: center; opacity: 0.8; }

.help-list { margin: 0; padding-left: 1.2em; font-size: 14px; line-height: 1.7; }
.help-list li + li { margin-top: 6px; }
.help-sub { margin: 16px 0 8px; font-size: 15px; }
.help-types {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 13px;
  line-height: 1.55;
}
.help-types dt { font-weight: 800; color: var(--gold); white-space: nowrap; }
.help-types dd { margin: 0; }
.help-credit { margin: 14px 0 0; font-size: 11px; line-height: 1.6; opacity: 0.7; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(230px + var(--sb));
  transform: translateX(-50%);
  z-index: 35;
  margin: 0;
  width: max-content; /* left: 50% のままだと画面の半分の幅で折り返す */
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(5, 6, 15, 0.86);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
@media (orientation: landscape) and (max-height: 560px) {
  .toast { bottom: calc(110px + var(--sb)); }
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 50;
  padding: 12px;
  border-radius: 12px;
  background: #400;
}

@media (prefers-reduced-motion: reduce) {
  .hint { transition: none; }
  .btn-act-show.is-on { animation: none; }
  .snap-flash.is-on { animation-duration: 0.01s; }
}
