/* 受付画面（S0〜S4・Q1〜Q5・B1・X1）。見本 v7（https://claude.ai/artifact/NZodmNqeRvmebwSbq7XWjp ・東城承認 2026-10-03）の CSS から、
   見本の外枠と操作パネルを除いて移したもの。正本は受付仕様書 docs/notes/261003_出席受付Web_受付仕様書.md。 */
/* 色・形は uni の theme.css（:root）から必要な分だけ転記。単一のライトテーマ */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #333;
  --sub: #666;
  --line: #e5e7eb;
  --primary: #2c3e6b;
  --secondary: #3a8fd4;
  --warm: #e8913a;
  --ok-bg: #e8f5e9;
  --ok-fg: #2e7d32;
  --warn-bg: #fff3e0;
  --warn-fg: #ef6c00;
  --danger-bg: #fff5f5;
  --danger-fg: #b42318;
  --th-bg: #f5f6f8;
  --muted-bg: #fafafa;
  --btn-bd: #d0d5dd;
  --btn-hover-bd: #aaa;
  --add-bg: #fff8f0;
  --aline: linear-gradient(90deg, var(--secondary), var(--warm));
  --radius: 10px;
  --radius-app: 14px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  --font: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #fff1e2;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
}

/* 1280×720 の論理画面を枠の幅へ縮尺する（JS が scale を与える） */
.screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 720px;
  transform-origin: 0 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  overflow: hidden;
}
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---------- 製品側のボタン（uni styles.css:915-973） ---------- */
.screen button {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  min-height: 44px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  position: relative;
}
.screen button:not(.secondary):not(.att-opt):not(.att-tray-slot):not(.att-back):not(.card-result-go):not(.pill)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--aline);
  pointer-events: none;
}
.screen button.secondary {
  background: var(--card);
  border: 1px solid var(--btn-bd);
  color: var(--ink);
  font-weight: 500;
}
.screen button.secondary:hover:not(:disabled) { border-color: var(--btn-hover-bd); }
.screen button:hover:not(:disabled):not(.secondary):not(.att-opt):not(.att-tray-slot):not(.att-back):not(.card-result-go):not(.pill) { filter: brightness(1.05); }
.screen button:focus-visible,
.screen summary:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ---------- S0 待機（3 層: 背景=水面 / ロゴ / 案内=水面の文字。text-six.src.html から転記） ----------
   動かすのは transform と opacity だけ。ぼかしは一度だけ掛けて、その層は動かさない。
   色の変化は文字色を変えず、青みの光の層を opacity で重ねて表す。
   1cqw = 論理画面の幅 1280px の 1%（12.8px）。
   data-active=true が前面（アクティブ）。data-anim は文字の切り替え中だけ付く（fwd / back）。 */
.idle {
  --drop: #4fb6e8;
  --drop-deep: #1a2fb5;
  --slow: 3;  /* 文字の切り替えの速さ。既定はゆっくり（3 倍。text-six.src.html の --slow: 3）。見本の操作で 1 に戻せる */
  display: block;
  container-type: inline-size;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.idle img { pointer-events: none; }
.idle .layer-bg { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--tone-top) 0%, var(--tone-bottom) 100%); }
.idle .layer-bg > * { position: absolute; }
.idle .calm { inset: 0; background: var(--tone-calm); opacity: 0; transition: opacity 800ms ease; }
.idle[data-active="true"] .calm { opacity: .78; }
.idle[data-active="true"] .layer-bg *,
.idle[data-active="true"] .logo-orbit { animation-play-state: paused; }

/* 背景: 水面。ロゴの奥から輪が 3 本（10 秒周期・3.3 秒ずらし）、光の帯が 2 本 */
.idle .ring { left: 50%; top: calc(50% - 5cqw); width: 70cqw; height: 70cqw; margin: -35cqw 0 0 -35cqw; border-radius: 50%; border: .4cqw solid rgba(var(--tone-ring-rgb), .28); transform: scale(.9); opacity: .25; animation: idle-spread 10s ease-out infinite; }
.idle .r2 { animation-delay: -3.33s; }
.idle .r3 { animation-delay: -6.67s; }
@keyframes idle-spread { 0% { transform: scale(.4); opacity: 0; } 15% { opacity: .34; } 100% { transform: scale(1.4); opacity: 0; } }
.idle .band { width: 40cqw; height: 160%; top: -30%; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%); opacity: .7; transform-origin: center; }
.idle .b1 { left: 8cqw; animation: idle-caustic-a 46s ease-in-out infinite alternate; }
.idle .b2 { left: 56cqw; opacity: .45; animation: idle-caustic-b 58s ease-in-out -20s infinite alternate; }
@keyframes idle-caustic-a { from { transform: rotate(24deg) translateX(-8cqw); } to { transform: rotate(24deg) translateX(10cqw); } }
@keyframes idle-caustic-b { from { transform: rotate(24deg) translateX(8cqw); } to { transform: rotate(24deg) translateX(-10cqw); } }
/* 波紋をランダムに: 固定の輪の代わりに、雨粒のような輪を JS が置く */
.idle .rain { inset: 0; }
.idle[data-random="on"] .ring { display: none; }
.idle .rain-drop { position: absolute; width: 36cqw; height: 36cqw; margin: -18cqw 0 0 -18cqw; border-radius: 50%; border: .35cqw solid rgba(var(--tone-ring-rgb), .34); opacity: 0; transform: scale(.2); animation: idle-rain 4s ease-out forwards; }
@keyframes idle-rain { 0% { transform: scale(.2); opacity: 0; } 10% { opacity: .6; } 100% { transform: scale(1); opacity: 0; } }
/* WebGL の水面（ripple-three.src.html の 2 から転記）。ライブラリは canvas を z-index:-1 で差し込むため、
   ここで位置と重なりの文脈を作る。WebGL が使えないときは hidden にして、上の CSS の輪・帯・雨をそのまま使う */
.idle .layer-bg > .water { position: relative; z-index: 0; width: 100%; height: 100%; overflow: hidden;
  background: linear-gradient(180deg, var(--tone-top) 0%, var(--tone-bottom) 100%) center / 100% 100% no-repeat; }
/* WebGL・静止画の水面には輪と帯を焼き込んであるので、CSS の輪・帯・雨は出さない */
.idle[data-water="webgl"] .band, .idle[data-water="webgl"] .ring, .idle[data-water="webgl"] .rain,
.idle[data-water="static"] .band, .idle[data-water="static"] .ring, .idle[data-water="static"] .rain { display: none; }

/* 層 2: ロゴ。90 秒で数ピクセル周回（残像対策） */
.idle .logo-pos { position: absolute; left: 50%; top: calc(50% - 5cqw); transform: translate(-50%, -50%); width: 60cqw; }
.idle .logo-orbit { animation: idle-orbit 90s linear infinite; }
.idle .logo { display: block; width: 100%; height: auto; }
@keyframes idle-orbit {
  0%   { transform: translate(.3cqw, 0); }
  25%  { transform: translate(0, .3cqw); }
  50%  { transform: translate(-.3cqw, 0); }
  75%  { transform: translate(0, -.3cqw); }
  100% { transform: translate(.3cqw, 0); }
}

/* 層 3: 案内 = 水面の文字 */
.idle .layer-hint { position: absolute; left: 0; right: 0; bottom: 6.5cqw; display: flex; flex-direction: column; align-items: center; gap: 1.4cqw; }
/* .prompt は飾りと文字を一つの重なり順に閉じ込める（飾り z0、文字 z1） */
.idle .prompt { position: relative; isolation: isolate; display: flex; justify-content: center; }
.idle .deco { position: absolute; pointer-events: none; z-index: 0; }
.idle .hint {
  position: relative; z-index: 1; display: inline-flex; align-items: center;
  padding: 1.3cqw 4cqw; font-size: 3.1cqw; font-weight: 700; letter-spacing: .04em; line-height: 1.6;
}
/* 白い楕円（ぼかしは一度だけ・この層は動かさない）が文字の背後を常に明るく保つ */
.idle .glow, .idle .glow-cool { left: -12%; right: -12%; top: -45%; bottom: -45%; border-radius: 50%; filter: blur(1cqw); }
.idle .glow { background: radial-gradient(ellipse at center, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 45%, rgba(255,255,255,0) 72%); }
/* アクティブの色味: 色味ごとの光（水色=青み／温かみ=白に寄せた暖色）を同じ形で重ね、opacity だけで出し入れする */
.idle .glow-cool { background: radial-gradient(ellipse at center, var(--tone-glow-0) 0%, var(--tone-glow-45) 45%, var(--tone-glow-72) 72%);
  opacity: 0; transition: opacity calc(500ms * var(--slow)) ease; }
.idle[data-active="true"] .glow-cool { opacity: 1; }
.idle .emit { left: 50%; top: 50%; width: 16cqw; height: 16cqw; margin: -8cqw 0 0 -8cqw; border-radius: 50%;
  border: .3cqw solid rgba(var(--tone-ring-rgb), .45); z-index: -1; opacity: 0; transform: scale(.4);
  animation: idle-emit 10s ease-out infinite; }
/* 10 秒のうち最初の 35%（3.5 秒）で広がり、残りは待つ */
@keyframes idle-emit { 0% { transform: scale(.4); opacity: 0; } 4% { opacity: .75; } 35% { transform: scale(2.6); opacity: 0; } 100% { transform: scale(2.6); opacity: 0; } }
.idle[data-active="true"] .emit { animation: none; opacity: 0; }

/* 文字は 2 枚重ね（旧=タッチ／新=カード）。同じ格子の 1 マスに重ねるので、幅は長い方で固定され光が跳ねない */
.idle .texts { display: inline-grid; justify-items: center; align-items: center; }
.idle .t-old, .idle .t-new { grid-area: 1 / 1; white-space: nowrap; transform-origin: 50% 50%; }
.idle .t-old { color: var(--primary); }
.idle .t-new { color: var(--drop-deep); opacity: 0; }
.idle[data-active="true"] .t-old { opacity: 0; }
.idle[data-active="true"] .t-new { opacity: 1; }
.idle .ch { display: inline-block; }

/* 戻る（全案共通）= 浮いて入れ替わるの逆 */
.idle[data-anim="back"] .t-new { animation: idle-tf-out calc(220ms * var(--slow)) ease-in both; }
.idle[data-anim="back"] .t-old { animation: idle-tf-in calc(360ms * var(--slow)) ease-out calc(120ms * var(--slow)) both; }

/* t-fade 浮いて入れ替わる */
@keyframes idle-tf-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(.5cqw); opacity: 0; } }
@keyframes idle-tf-in { from { transform: translateY(-.5cqw); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.idle.t-fade[data-anim="fwd"] .t-old { animation: idle-tf-out calc(220ms * var(--slow)) ease-in both; }
.idle.t-fade[data-anim="fwd"] .t-new { animation: idle-tf-in calc(360ms * var(--slow)) ease-out calc(120ms * var(--slow)) both; }

/* t-ripple 波紋で入れ替わる */
.idle .disc { left: 50%; top: 50%; width: 20cqw; height: 20cqw; margin: -10cqw 0 0 -10cqw; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,.95) 0%, rgba(255,255,255,.85) 55%, rgba(255,255,255,0) 72%);
  opacity: 0; transform: scale(.2); }
@keyframes idle-disc { 0% { transform: scale(.2); opacity: 0; } 8% { opacity: .95; } 69% { transform: scale(2.2); opacity: .85; } 100% { transform: scale(2.3); opacity: 0; } }
@keyframes idle-op-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes idle-op-in { from { opacity: 0; } to { opacity: 1; } }
.idle.t-ripple[data-anim="fwd"] .disc { animation: idle-disc calc(650ms * var(--slow)) ease-out both; }
.idle.t-ripple[data-anim="fwd"] .t-old { animation: idle-op-out calc(200ms * var(--slow)) linear both; }
.idle.t-ripple[data-anim="fwd"] .t-new { animation: idle-op-in calc(300ms * var(--slow)) ease-out calc(200ms * var(--slow)) both; }

/* t-sink 沈んで浮かぶ */
.idle .sink-ring { left: 50%; top: 50%; width: 10cqw; height: 10cqw; margin: -5cqw 0 0 -5cqw; border-radius: 50%;
  border: .3cqw solid rgba(var(--tone-ring-rgb), .5); opacity: 0; transform: scale(.4); }
@keyframes idle-sink-ring { 0% { transform: scale(.4); opacity: 0; } 15% { opacity: .75; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes idle-ts-out { from { transform: translateY(0) scale(1); opacity: 1; } to { transform: translateY(1.2cqw) scale(.96); opacity: 0; } }
@keyframes idle-ts-in { from { transform: translateY(1.2cqw) scale(1.04); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.idle.t-sink[data-anim="fwd"] .sink-ring { animation: idle-sink-ring calc(500ms * var(--slow)) ease-out both; }
.idle.t-sink[data-anim="fwd"] .t-old { animation: idle-ts-out calc(280ms * var(--slow)) ease-in both; }
.idle.t-sink[data-anim="fwd"] .t-new { animation: idle-ts-in calc(420ms * var(--slow)) ease-out calc(180ms * var(--slow)) both; }

/* t-chars 一文字ずつ: 切り替え中は 2 枚とも見せ、各文字が出入りする */
@keyframes idle-tc-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(.6cqw); opacity: 0; } }
@keyframes idle-tc-in { from { transform: translateY(-.6cqw); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.idle.t-chars[data-anim="fwd"] .t-old, .idle.t-chars[data-anim="fwd"] .t-new { opacity: 1; }
.idle.t-chars[data-anim="fwd"] .t-old .ch { animation: idle-tc-out calc(160ms * var(--slow)) ease-in calc(var(--i) * 25ms * var(--slow)) both; }
.idle.t-chars[data-anim="fwd"] .t-new .ch { animation: idle-tc-in calc(220ms * var(--slow)) ease-out calc((220ms + var(--i) * 22ms) * var(--slow)) both; }

/* t-slide 水流 */
@keyframes idle-tl-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-2cqw); opacity: 0; } }
@keyframes idle-tl-in { from { transform: translateX(2cqw); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.idle.t-slide[data-anim="fwd"] .t-old { animation: idle-tl-out calc(240ms * var(--slow)) ease-in both; }
.idle.t-slide[data-anim="fwd"] .t-new { animation: idle-tl-in calc(360ms * var(--slow)) ease-out calc(160ms * var(--slow)) both; }

/* t-flip 札がめくれる */
.idle.t-flip .texts { perspective: 30cqw; }
@keyframes idle-tp-out { from { transform: rotateX(0deg); opacity: 1; } to { transform: rotateX(-90deg); opacity: 0; } }
@keyframes idle-tp-in { from { transform: rotateX(90deg); opacity: 0; } to { transform: rotateX(0deg); opacity: 1; } }
.idle.t-flip[data-anim="fwd"] .t-old { animation: idle-tp-out calc(240ms * var(--slow)) ease-in both; }
.idle.t-flip[data-anim="fwd"] .t-new { animation: idle-tp-in calc(300ms * var(--slow)) ease-out calc(240ms * var(--slow)) both; }

/* カードの図・準備の点・触れた位置の波紋 */
.idle .card-glyph { display: flex; align-items: center; gap: 1.6cqw; font-size: 1.7cqw; font-weight: 600; color: var(--primary); opacity: 0; transform: translateY(1cqw); transition: opacity 500ms ease 150ms, transform 500ms ease 150ms; }
.idle .card-glyph .member-card { --k: .6; }
.idle[data-active="true"] .card-glyph { opacity: 1; transform: translateY(0); }
.idle .ready-dot { position: absolute; right: 2.4cqw; top: 2.2cqw; width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: #c9d2dc; }
.idle[data-active="true"] .ready-dot { background: #2e7d32; box-shadow: 0 0 0 .5cqw rgba(46,125,50,.18); }
.idle .ripple { position: absolute; width: 6cqw; height: 6cqw; margin: -3cqw 0 0 -3cqw; border-radius: 50%; border: .4cqw solid rgb(var(--tone-ring-rgb)); pointer-events: none; animation: idle-ripple 900ms ease-out forwards; }
@keyframes idle-ripple { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(6); opacity: 0; } }
.idle .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- S1〜S4・X1 共通: 水面の続き（S0 アクティブ時の落ち着いた水面を静止で敷く） ----------
   画面ごとのカードは置かない。中身は 1280×720 の面全体に組む（外側の余白 64px）。
   動かすのは transform と opacity だけ。 */
.screen { --brand: #1a2fb5; --muted-red: #b42318; }
/* 色味（data-tone）: S0 の水面と S1〜X1 の .water-bg の地・輪・覆いだけを切り替える。
   文字色・入室の青・弱い赤は変えない。退室の橙は温かみの地で 3:1 を割るため、線と時刻だけ濃くする
   （#e8913a / #fff1e2 = 2.22:1 → #c9772a = 3.08:1）。切り替えは即時（色の transition は付けない） */
#screen, #screen[data-tone="warm"] {
  --tone-top: #fffaf4;
  --tone-bottom: #fff1e2;
  --tone-ring-rgb: 236, 165, 96;
  --tone-calm: #fff8f0;
  --tone-wcalm: #fff7ee;
  --tone-glow-0: rgba(255, 253, 250, .98);
  --tone-glow-45: rgba(255, 251, 245, .92);
  --tone-glow-72: rgba(255, 251, 245, 0);
  --tone-exit: #c9772a;
}
#screen[data-tone="cool"] {
  --tone-top: #f4fafd;
  --tone-bottom: #e8f4fa;
  --tone-ring-rgb: 79, 182, 232;
  --tone-calm: #eef7fc;
  --tone-wcalm: #eef7fc;
  --tone-glow-0: rgba(236, 244, 255, .97);
  --tone-glow-45: rgba(214, 232, 252, .9);
  --tone-glow-72: rgba(214, 232, 252, 0);
  --tone-exit: var(--warm);
}
.water-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--tone-top) 0%, var(--tone-bottom) 100%); }
.water-bg > * { position: absolute; }
.water-bg .w-ring { left: 50%; top: 296px; width: 896px; height: 896px; margin: -448px 0 0 -448px;
  border-radius: 50%; border: 5px solid rgba(var(--tone-ring-rgb), .26); }
.water-bg .w1 { transform: scale(.55); opacity: .32; }
.water-bg .w2 { transform: scale(.9); opacity: .2; }
.water-bg .w3 { transform: scale(1.3); opacity: .12; }
.water-bg .w-calm { inset: 0; background: var(--tone-wcalm); opacity: .78; }

/* 各画面の中身が 320ms で浮かぶ（動きを減らす設定では下の全体上書きで即時） */
@keyframes screen-rise { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.rise { animation: screen-rise 320ms ease-out both; }

.full {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px;
  text-align: center;
}
.full p { margin: 0; }
.accent-rule { display: block; width: 120px; height: 2px; border-radius: 1px; background: var(--brand); }

/* ---------- S1 読み取り直後 ---------- */
.card-reading { gap: 28px; }
.card-reading-text { font-size: 48px; font-weight: 500; line-height: 1.4; color: var(--primary); }
.card-reading-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 5px solid rgba(44, 62, 107, 0.14);
  border-top-color: var(--brand);
  animation: card-reading-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes card-reading-spin { to { transform: rotate(360deg); } }

/* ---------- S2 結果（面全体がタップ領域） ---------- */
.card-result { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.card-result.has-go { padding-bottom: 196px; }
.card-result-stack { display: flex; flex-direction: column; align-items: center; }
.full .card-result-greeting { font-size: 34px; font-weight: 500; line-height: 1.4; color: var(--primary); letter-spacing: .04em; }
.full .card-result-name { margin-top: 10px; font-size: 88px; font-weight: 700; line-height: 1.2; color: var(--ink); letter-spacing: .02em; }
.card-result .accent-rule { margin-top: 30px; }
.full .card-result-meta { margin-top: 18px; font-size: 30px; font-weight: 400; line-height: 1.4; color: var(--sub); font-variant-numeric: tabular-nums; }
.full .card-result-next { margin-top: 30px; font-size: 26px; font-weight: 400; line-height: 1.5; color: var(--ink); }
.card-result.is-exit .accent-rule { background: var(--tone-exit, var(--warm)); }
.full.is-exit .card-result-meta { color: var(--tone-exit, var(--warm)); }
.result-go-wrap { position: absolute; left: 0; right: 0; bottom: 96px; display: flex; justify-content: center; }

/* 大きな丸ボタン（S2・S3） */
.screen button.pill {
  min-height: 84px;
  height: 84px;
  padding: 0 48px;
  border-radius: 999px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.screen button.pill.pill-brand { background: var(--brand); color: #fff; border: 0; }
.screen .card-result-go { min-width: 360px; }

/* ---------- S3 選択 ---------- */
.card-choice { justify-content: flex-start; padding-top: 120px; }
.full .card-choice-lead { font-size: 34px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.card-choice .accent-rule { margin-top: 28px; }
.card-choice-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 48px; }
.screen .card-choice-actions button.pill { min-width: 520px; }
.screen .card-choice-actions button.pill.secondary { background: #fff; border: 2px solid var(--btn-bd); color: var(--ink); font-weight: 700; }
.screen .card-choice-actions button.pill.quiet { background: transparent; border: 0; color: var(--sub); font-weight: 500; text-decoration: none; }
.choice-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brand); opacity: .45;
  transform-origin: 0 50%; transform: scaleX(1); }
.choice-timer.run { animation: choice-countdown 30s linear both; }
@keyframes choice-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- S4 失敗・X1 受付できません ---------- */
.card-fail, .card-blocked { padding-bottom: 160px; }
.card-fail-head { display: flex; align-items: center; gap: 18px; }
.card-fail-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--muted-red); flex: none; }
.full .card-fail-title { font-size: 48px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.card-fail .accent-rule, .card-blocked .accent-rule { margin-top: 28px; }
.card-fail .accent-rule { background: var(--muted-red); opacity: .7; }
.card-blocked .card-fail-dot, .card-blocked .accent-rule { background: var(--primary); }
.full .card-fail-body { margin-top: 24px; font-size: 30px; font-weight: 400; line-height: 1.5; color: var(--ink); }
/* ---------- 塾生カードの図（実物のラベルを模す。90:29 ≒ 420×136。--k で縮尺） ---------- */
.member-card {
  --k: 1;
  display: flex;
  align-items: center;
  gap: calc(18px * var(--k));
  width: calc(420px * var(--k));
  height: calc(136px * var(--k));
  padding: 0 calc(22px * var(--k)) 0 calc(16px * var(--k));
  background: #fff;
  border: 1px solid var(--btn-bd);
  border-radius: calc(8px * var(--k));
  box-shadow: 0 6px 18px rgba(26, 47, 181, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: left;
  flex: none;
}
.member-card-qr { width: calc(104px * var(--k)); height: calc(104px * var(--k)); flex: none; background: #fff; }
.member-card-qr.qr-fallback { background: #e9ecf0; }
.member-card-qr img, .member-card-qr canvas { width: 100% !important; height: 100% !important; }
.member-card-info { display: flex; flex-direction: column; justify-content: center; gap: calc(6px * var(--k)); min-width: 0; }
.member-card-logo { display: block; width: calc(120px * var(--k)); height: auto; margin-bottom: calc(4px * var(--k)); }
.member-card-name { font-size: calc(22px * var(--k)); font-weight: 700; line-height: 1.25; color: var(--ink); white-space: nowrap; }
.member-card-no { font-size: calc(18px * var(--k)); line-height: 1.2; color: var(--sub); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

/* ---------- Q1〜Q5 質問（uni styles.css:1014-1436・幅 900px 以上の値） ---------- */
#v-questions {
  justify-content: flex-start;
  align-items: stretch;
  background: linear-gradient(180deg, #ffffff 0%, #fff9f1 100%);
  color: #333;
}
.att-chrome {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 12px 16px 4px;
  min-height: 48px;
  z-index: 6;
}
.screen .att-back {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  min-height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--sub);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.screen .att-back:hover:not(:disabled) { color: var(--ink); background: rgba(0, 0, 0, 0.04); }
.screen .att-back:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; }
.screen .att-back:disabled { opacity: 0.4; cursor: not-allowed; }

.att-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 32px 40px;
  text-align: center;
  position: relative;
  min-height: 0;
}
.att-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 920px;
}
.att-who { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.att-q {
  margin: 0;
  font-size: 31px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
  font-family: inherit;
}
.att-opts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}
.screen .att-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 148px;
  min-height: 176px;
  padding: 18px 14px 14px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(200, 150, 90, 0.14);
  transform-origin: 50% 100%;
  transition: border-color 0.15s ease, background 0.15s ease,
    transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
}
.screen .att-opt:hover:not(:disabled) {
  border-color: var(--secondary);
  background: var(--th-bg);
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(200, 150, 90, 0.22);
}
.screen .att-opt:active:not(:disabled) { transform: scale(1.08, 0.8); transition: transform 0.06s; }
.screen .att-opt:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }
.screen .att-opt:disabled { cursor: default; opacity: 1; }
.att-opt img { width: 124px; height: 124px; object-fit: contain; display: block; pointer-events: none; }
.att-opt.att-opt-tall img { width: 96px; height: 140px; }
.att-opt .att-lbl { font-family: inherit; font-size: 1.1rem; font-weight: 500; color: var(--sub); }
.att-opts.picked .att-opt { opacity: 0.45; }
.screen .att-opts.picked .att-opt.sel,
.screen .att-opt.sel { opacity: 1; border-color: var(--warm); background: var(--add-bg); }
.att-opt.sel .att-lbl { color: var(--ink); }
.att-prog { margin: 4px 0 0; font-size: 1.1rem; letter-spacing: 0.2em; color: var(--secondary); font-weight: 600; }
.att-prog span { display: inline-block; }
.att-status { min-height: 1.25em; margin: 0; font-size: 0.95rem; font-weight: 600; }
.att-status.err { color: var(--danger-fg); }
.att-done { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.att-done-title { font-size: 30px; }

/* もちもち・落下もちっ遷移（uni styles.css:2203-2399 をそのまま転記） */
@keyframes att-jelly-pop {
  0%   { transform: scale(1.08, 0.8); }
  30%  { transform: scale(0.9, 1.16); }
  52%  { transform: scale(1.08, 0.92); }
  74%  { transform: scale(0.97, 1.05); }
  100% { transform: scale(1); }
}
.screen .att-opt.jelly { animation: att-jelly-pop 0.55s linear 1; }
@keyframes att-dot-hop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-12px) scale(1.35, 0.85); }
  70% { transform: translateY(2px) scale(0.9, 1.15); }
  100% { transform: translateY(0) scale(1); }
}
.att-prog span.hop { animation: att-dot-hop 0.5s ease-out 1; }
@keyframes att-drop-out {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(110%); opacity: 0; }
}
.att-body.att-drop-out, .att-confirm.att-drop-out {
  animation: att-drop-out 0.32s cubic-bezier(0.5, 0, 0.85, 0.4) forwards;
}
@keyframes att-drop-in {
  0%   { transform: translateY(-120%) scale(1, 1); }
  55%  { transform: translateY(0) scale(1, 1); }
  68%  { transform: translateY(0) scale(1.05, 0.84); }
  82%  { transform: translateY(-2.5%) scale(0.97, 1.07); }
  92%  { transform: translateY(0) scale(1.015, 0.97); }
  100% { transform: translateY(0) scale(1, 1); }
}
.att-body.att-drop-in, .att-confirm.att-drop-in {
  transform-origin: 50% 100%;
  animation: att-drop-in 0.7s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes att-toss-up {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-120%); opacity: 0; }
}
.att-body.att-toss-up, .att-confirm.att-toss-up {
  animation: att-toss-up 0.32s cubic-bezier(0.5, 0, 0.85, 0.4) forwards;
}
@keyframes att-rise-in {
  0%   { transform: translateY(110%) scale(1, 1); }
  55%  { transform: translateY(0) scale(1, 1); }
  68%  { transform: translateY(0) scale(1.05, 0.86); }
  84%  { transform: translateY(-2%) scale(0.97, 1.06); }
  100% { transform: translateY(0) scale(1, 1); }
}
.att-body.att-rise-in {
  transform-origin: 50% 0%;
  animation: att-rise-in 0.7s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.att-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 920px;
}
.att-confirm-title { font-size: 38px; }
.att-confirm-icons { display: flex; gap: 26px; justify-content: center; min-height: 88px; }
.att-confirm-icons img { width: 84px; height: 84px; object-fit: contain; }
.att-confirm-sub { margin: 0; font-size: 1rem; color: var(--sub); }
@keyframes att-card-spring {
  0% { transform: scale(0.6); opacity: 0; }
  55% { transform: scale(1.08); opacity: 1; }
  75% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.att-confirm.att-spring, .att-done.att-spring {
  animation: att-card-spring 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) 1;
}
@keyframes att-icon-leap {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-22px) scale(1.2) rotate(-5deg); }
  75% { transform: translateY(3px) scale(0.94, 1.05); }
  100% { transform: translateY(0) scale(1); }
}
.att-confirm-icons img.leap { animation: att-icon-leap 0.55s ease-out 1; }

.att-tray {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 20;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.25), bottom 0.4s ease;
}
.att-tray.big { transform: translateX(-50%) scale(1.18); bottom: 26px; }
.screen .att-tray-slot {
  width: 56px;
  height: 56px;
  min-height: 56px;
  border-radius: 50%;
  border: 0;
  background: #f3e9d8;
  box-shadow: inset 0 3px 7px rgba(180, 140, 90, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: default;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.att-tray-slot img { width: 40px; height: 40px; object-fit: contain; pointer-events: none; }
.screen .att-tray-slot.filled {
  background: var(--card);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(232, 145, 58, 0.28);
}
.screen .att-tray-slot.filled:hover { transform: translateY(-4px) scale(1.08); box-shadow: 0 8px 18px rgba(232, 145, 58, 0.35); }
.screen .att-tray-slot.current { box-shadow: 0 0 0 3px rgba(232, 145, 58, 0.45), 0 4px 12px rgba(232, 145, 58, 0.2); }
.screen .att-tray-slot:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
@keyframes att-slot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 145, 58, 0.55); }
  100% { box-shadow: 0 0 0 16px rgba(232, 145, 58, 0); }
}
.screen .att-tray-slot.pulse { animation: att-slot-pulse 0.5s ease-out 1; }
.att-fly-icon { position: absolute; z-index: 40; width: 72px; height: 72px; pointer-events: none; }
.att-tray-hint {
  position: absolute;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: #a97b46;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(232, 145, 58, 0.22);
  z-index: 20;
  white-space: nowrap;
  transition: font-size 0.25s ease, padding 0.25s ease;
  animation: att-hint-float 3s ease-in-out infinite;
}
@keyframes att-hint-float {
  0%, 100% { transform: translateX(-50%) translateY(0); box-shadow: 0 6px 16px rgba(232, 145, 58, 0.22); }
  50% { transform: translateX(-50%) translateY(-6px); box-shadow: 0 12px 20px rgba(232, 145, 58, 0.16); }
}
.att-tray-hint.big { font-size: 1rem; padding: 8px 20px; animation: att-hint-float-big 2.6s ease-in-out infinite; }
@keyframes att-hint-float-big {
  0%, 100% { transform: translateX(-50%) translateY(0); box-shadow: 0 6px 18px rgba(232, 145, 58, 0.26); }
  50% { transform: translateX(-50%) translateY(-9px); box-shadow: 0 16px 24px rgba(232, 145, 58, 0.16); }
}

/* B1 無操作の案内（uni styles.css:1105-1150） */
.att-idle-banner {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(232, 145, 58, 0.28);
  box-shadow: 0 10px 28px rgba(156, 87, 22, 0.12);
  text-align: center;
}
.att-idle-msg { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--ink); line-height: 1.45; }
.att-idle-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.screen .att-idle-actions > button { flex: 1 1 auto; min-width: 7.5rem; min-height: 44px; margin: 0; }

/* 動きを減らす設定（uni styles.css:2193-2200 と同じ全体上書き） */
@media (prefers-reduced-motion: reduce) {
  .screen *,
  .screen *::before,
  .screen *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .card-reading-dot { animation: none; }
  /* S3 の残り時間の線は縮めず、満ちたまま止めておく */
  .choice-timer.run { animation: none; }
  /* S0 はすべて静止。色と文言だけで示し、文字は即時に入れ替わる */
  #v-idle *,
  #v-idle *::before,
  #v-idle *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 受付のモニター全面（1280×720 の論理画面を、縦横比を保って画面いっぱいに縮尺する。JS が transform を与える） ---------- */
.display {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #fff1e2;
  outline: none;
  cursor: default;
}
.member-card-qr img { display: block; }

/* 番号の手入力（開発と非常用・K5。既定は hidden で、生徒の画面には出ない） */
.manual {
  position: absolute; left: 50%; top: 32px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--btn-bd); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 18px;
}
.manual input { font: inherit; font-size: 22px; width: 12em; min-height: 44px; padding: 4px 10px; border: 1px solid var(--btn-bd); border-radius: 8px; }

/* ---------- 職員の入口（受付仕様書 §3「職員の入口」） ---------- */
/* 右上の隅の見えない領域。3 秒押し続けると職員画面へ（kiosk_gesture.js）。合図は出さない */
.staff-corner {
  position: absolute; top: 0; right: 0; width: 120px; height: 120px; z-index: 50;
  background: transparent; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
/* 未登録の端末にだけ出す、職員が登録へ進むボタン。生徒向けの見出しより控えめに */
.screen button.blocked-staff, .full .blocked-staff {
  margin-top: 56px; display: inline-flex; align-items: center; min-height: 64px; padding: 0 36px;
  border: 2px solid var(--btn-bd, #c5ccd6); border-radius: 999px; background: #fff;
  color: var(--ink); font-size: 24px; font-weight: 700; text-decoration: none;
}
.full .blocked-staff:focus-visible { outline: 3px solid #3a8fd4; outline-offset: 3px; }
.full .blocked-staff:disabled { opacity: .5; cursor: default; }
