/* チーム分け「運命の絆と封印」（/team/ だけで読み込む）。
   サイト共通の style.css（ヘッダー・フッター・色・書体）の上に重ねる。
   舞台（夜空の占いテーブル）は暗く、設定パネルはサイトと同じ明るいカード。他のツールには当たらない。 */
.team-page {
  --tm-ink: #f6eedb;
  --tm-muted: #b8aed8;
  --gold: #E7C46A;
  --gold-2: #F6E0A3;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --tm-accent: var(--c-team, #8a5bd4);
  --tm-accent-deep: #6f43b8;
  --tm-accent-tint: #f3edfc;
}
.tm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- ページ ---------- */
.tm-main { max-width: 1240px; margin: 0 auto; padding: 4px 0 0; box-sizing: border-box; }
.tm-head { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 12px; text-align: center; }
.tm-title {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 5.2vw, 1.8rem); line-height: 1.25; letter-spacing: 0.03em; color: var(--text);
}
.tm-title::before {
  content: ""; width: 0.95em; height: 0.95em; background: var(--tm-accent);
  -webkit-mask: var(--ico-team) center / contain no-repeat; mask: var(--ico-team) center / contain no-repeat;
}
.tm-lead { margin: 0; font-size: 0.88rem; color: var(--muted); }
.tm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1024px) {
  .tm-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 22px; }
  .tm-setup { position: sticky; top: 14px; }
}
.tm-fair { margin: 14px 0 0; text-align: center; font-size: 0.8rem; color: var(--muted); }
.tm-fair b { color: var(--text); }

/* ---------- 舞台の上のボタン（効果音・動き・大きく映す） ---------- */
.tm-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 8px; margin: 0 0 8px; }
.tm-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted);
  font: inherit; font-size: 0.82rem; font-weight: 700; line-height: 1.2; cursor: pointer; touch-action: manipulation; white-space: nowrap;
}
.tm-toggle[aria-pressed="true"] { border-color: var(--tm-accent); background: var(--tm-accent-tint); color: var(--tm-accent-deep); }
@media (max-width: 699px) { .tm-toggle[data-fullscreen] { display: none; } }
@media (max-width: 359px) { .tm-toggle { padding: 6px 10px; font-size: 0.76rem; } }

/* ---------- 舞台のまわり（かんたん設定・開始・完成後の操作） ---------- */
.team-page .stage { position: relative; min-width: 0; overflow-x: clip; overflow-clip-margin: 8px; }
.team-page .fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }
.quick { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; transition: opacity .3s; }
.quick.is-locked { opacity: .35; pointer-events: none; }
.stage[data-phase="play"] .quick { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
.q-people {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.q-people b { font-size: 0.95rem; }
.q-people span { color: var(--muted); font-size: 0.75rem; }
.q-people span::before { content: "✎ "; }
.q-teams { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); min-width: 0; }
.q-step { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; font: inherit; font-size: 22px; font-weight: 800; color: var(--text); cursor: pointer; touch-action: manipulation; }
.q-step:hover { background: var(--tm-accent-tint); }
.q-mid { display: grid; justify-items: center; line-height: 1.15; min-width: 6.2em; padding: 0 2px; }
.q-value { font-size: 0.95rem; font-weight: 800; white-space: nowrap; }
.q-sizes { font-size: 0.7rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
@media (max-width: 359px) {
  .q-step { width: 40px; height: 40px; font-size: 20px; }
  .q-mid { min-width: 5em; }
  .q-people { padding: 0 10px; gap: 4px; }
}

.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.95rem; font-weight: 800; cursor: pointer; touch-action: manipulation; text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .2s;
}
.tm-btn:active { transform: translateY(1px) scale(.99); }
.tm-btn-primary { background: linear-gradient(#f7dc8a, #d9aa45); border-color: #c69a3c; color: #2a1c04; box-shadow: 0 5px 0 #8f6a1e, 0 10px 22px rgba(194, 150, 60, .3); }
.tm-btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #8f6a1e; }
.tm-btn-big { min-height: 58px; min-width: min(100%, 320px); padding: 0 28px; font-size: 1.08rem; }
.tm-btn-ghost { background: transparent; }
.kbd { display: inline-block; padding: 0 5px; border: 1px solid currentColor; border-radius: 4px; font-size: 0.68rem; font-weight: 700; opacity: .7; }

.start-wrap { display: grid; justify-items: center; gap: 6px; margin: 14px 0 0; text-align: center; }
.start-note { margin: 0; max-width: 34em; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
/* 開始ボタンは、舞台が長くても画面の下に見えているように */
.stage[data-phase="idle"] .start-wrap {
  position: sticky; bottom: 0; z-index: 25; margin-top: 4px; padding: 14px 0 max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(251, 248, 244, 0), rgba(251, 248, 244, .94) 38%);
}
.team-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.meta { margin: 10px 0 0; text-align: center; font-size: 0.75rem; color: var(--muted); min-height: 1em; }
.skip-fab {
  position: fixed; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0;
  background: rgba(20, 18, 30, .86); color: #fff; font: inherit; font-weight: 800; font-size: 0.88rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); cursor: pointer;
}
.skip-fab[hidden] { display: none; }
.skip-short { display: none; }
/* スマホでは小さく（下の名簿を隠しにくく）。押せる大きさ（44px）は保つ */
@media (max-width: 559px) {
  .skip-fab { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); min-height: 44px; padding: 0 14px; font-size: 0.82rem; background: rgba(20, 18, 30, .8); }
  .skip-fab .skip-long, .skip-fab .kbd { display: none; }
  .skip-fab .skip-short { display: inline; }
}
.stage.is-fast::after { content: "はやおくり ×3"; position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 45; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 800; pointer-events: none; }

/* ---------- 設定パネル（サイトと同じ明るいカード） ---------- */
.tm-setup { box-sizing: border-box; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--card-shadow); }
.tm-setup-title { margin: 0 0 2px; font-size: 1.05rem; line-height: 1.3; }
.tm-field { display: grid; gap: 6px; margin: 14px 0 0; }
.tm-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; font-size: 0.86rem; font-weight: 800; color: var(--text); }
.tm-count { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.team-page .tm-hint { margin: 2px 0 0; font-size: 0.76rem; line-height: 1.55; font-weight: 600; color: var(--muted); }
.tm-names { min-height: 120px; font-size: 16px; }
.tm-sample-row, .tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-sample-row { margin-top: 4px; }
.tm-chip {
  min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--text); cursor: pointer; touch-action: manipulation;
}
.tm-chip[aria-pressed="true"] { border-color: var(--tm-accent); background: var(--tm-accent-tint); color: var(--tm-accent-deep); }
.tm-chip-accent { border-color: var(--tm-accent); color: var(--tm-accent-deep); }
.tm-chip:disabled, .tm-select:disabled { opacity: .45; cursor: not-allowed; }
.tm-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; justify-self: start; }
.tm-seg button { min-height: 40px; padding: 0 14px; border: 0; background: var(--surface); font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tm-seg button[aria-pressed="true"] { background: var(--tm-accent); color: #fff; }
.tm-team-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.tm-stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.tm-step { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-soft); font: inherit; font-size: 20px; font-weight: 800; color: var(--text); cursor: pointer; }
.tm-step-value { min-width: 7.5em; text-align: center; font-size: 0.82rem; font-weight: 800; }
.tm-summary { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--tm-accent-tint); color: var(--text); font-weight: 800; font-size: 0.86rem; }
.tm-summary:empty { display: none; }
.tm-error { min-height: 1.2em; margin: 8px 0 0; color: var(--danger); font-size: 0.82rem; font-weight: 800; }
.tm-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; background: #fffdf9; }
.tm-details[open] { padding-bottom: 12px; }
.tm-details > summary {
  cursor: pointer; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.84rem; font-weight: 800; color: var(--text); list-style: none;
}
.tm-details > summary::-webkit-details-marker { display: none; }
.tm-details > summary::after { content: "＋"; font-size: 16px; color: var(--muted); }
.tm-details[open] > summary::after { content: "−"; }
.tm-tn-sum { margin-left: auto; font-size: 0.72rem; font-weight: 800; color: var(--tm-accent-deep); }
.tm-tn-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tm-tn-row { display: grid; grid-template-columns: 18px 30px minmax(0, 1fr); align-items: center; gap: 6px; }
.tm-tn-no { font-size: 0.75rem; font-weight: 800; color: var(--muted); text-align: right; }
.tm-tn-swatch { width: 30px; height: 30px; display: grid; place-items: center; }
.tm-tn-swatch svg { width: 100%; height: 100%; }
.tm-tn-input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: var(--text); }
.tm-tn-row.is-dup .tm-tn-input { border-color: #d89a00; }
.tm-tn-note { color: #8a5a00; }
.tm-tn .tm-chip { margin-top: 8px; }
.tm-method { margin-top: 16px; }
.tm-seg-method { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
.tm-seg-method button { padding: 0 8px; }
.tm-str-panel { margin-top: 6px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: #fffdf9; }
.tm-str-legend { margin: 0 0 6px; }
.tm-str-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: grid; gap: 4px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.tm-str-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 40px; }
.tm-str-name { min-width: 0; font-size: 0.86rem; font-weight: 800; line-height: 1.25; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tm-str-pick { display: inline-flex; gap: 3px; }
.tm-str-b { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 0.86rem; font-weight: 800; color: var(--muted); cursor: pointer; touch-action: manipulation; }
.tm-str-b[aria-checked="true"] { border-color: var(--tm-accent); background: var(--tm-accent); color: #fff; }
.tm-str-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tm-str-stat { margin: 0; }
.tm-pair-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; margin-top: 8px; }
.tm-select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: var(--text); }
.tm-pair-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.tm-pair-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 2px 4px 2px 10px; border-radius: 10px; background: var(--bg-soft); font-size: 0.86rem; font-weight: 700; overflow-wrap: anywhere; }
.tm-pair-remove { min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: inherit; font-size: 0.76rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tm-setup.is-locked textarea, .tm-setup.is-locked input, .tm-setup.is-locked button, .tm-setup.is-locked select, .tm-setup.is-locked summary { pointer-events: none; opacity: .55; }
@media (max-width: 359px) {
  .tm-setup { padding: 14px 12px; }
  .tm-str-b { width: 32px; height: 34px; font-size: 0.8rem; }
  .tm-str-pick { gap: 2px; }
  .tm-str-name { font-size: 0.78rem; }
}

/* ---------- 舞台：夜空の占いテーブル ---------- */
/* テーブル */
.a-table { position: relative; border-radius: 22px; padding: 10px 10px 14px; overflow: hidden; isolation: isolate;
  background: radial-gradient(130% 70% at 50% 0%, #332a8c 0%, #1d1758 52%, #140f42 100%);
  border: 1px solid #463d9c; box-shadow: inset 0 0 0 1px rgba(231, 196, 106, .16), inset 0 -40px 80px rgba(0, 0, 0, .25), 0 22px 50px rgba(0, 0, 0, .35); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.a-table::before { content: ""; position: absolute; inset: 6px; border-radius: 17px; border: 1px solid rgba(231, 196, 106, .22); pointer-events: none; z-index: -1; }
.a-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .8;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 8%, #ffe7a8 50%, transparent 51%), radial-gradient(1.6px 1.6px at 72% 14%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 86% 26%, #cfd6ff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 6% 44%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 94% 52%, #ffe7a8 50%, transparent 51%), radial-gradient(1.3px 1.3px at 40% 4%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 60% 30%, #cfd6ff 50%, transparent 51%);
  animation: a-twinkle 5s ease-in-out infinite alternate; }
@keyframes a-twinkle { to { opacity: .45; } }

.a-top { position: relative; display: grid; justify-items: center; text-align: center; }
.a-words { order: -1; min-height: 70px; display: grid; align-content: center; justify-items: center; gap: 2px; padding: 2px 6px 0; }
.a-kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--gold); }
.a-head { margin: 0; font: 800 clamp(21px, 6vw, 31px)/1.25 var(--serif); color: #fff6df; text-shadow: 0 2px 14px rgba(140, 110, 255, .55); word-break: auto-phrase; text-wrap: balance; }
.a-head em { font-style: normal; color: #ffd76a; }
.a-remain { margin: 0; font: 700 15px var(--serif); color: #e9e2ff; }
.a-remain b { font-size: 28px; color: #ffd76a; margin: 0 2px; font-family: var(--serif); }
.rm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.rm-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(231, 196, 106, .55); background: rgba(231, 196, 106, .12); color: #fff3d0; font-size: 13px; font-weight: 800; transition: opacity .4s, transform .4s; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-chip.is-out { opacity: .25; transform: scale(.9); text-decoration: line-through; }

/* 占い師ねこ */
.teller { position: relative; width: min(220px, 58vw); aspect-ratio: 240 / 176; margin-top: -2px; --look: 0; }
.teller-svg { width: 100%; height: 100%; overflow: visible; }
.teller-svg :is(.t-eyes, .t-eye-open, .t-pupil, .t-tail, .t-aura, .t-swirl, .t-paw, .t-blush) { transform-box: fill-box; }
.t-eyes { transform-origin: 50% 50%; transition: transform .35s; }
.t-eye-open { transform-origin: 50% 50%; animation: a-blink 4.6s infinite; transition: opacity .2s; }
@keyframes a-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.t-eye-happy { opacity: 0; transition: opacity .2s; }
.t-pupil { transform: translateX(calc(var(--look) * 3px)); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.t-blush { transition: opacity .4s; }
.t-tail { transform-origin: 0% 100%; animation: a-tail 3.4s ease-in-out infinite; }
@keyframes a-tail { 50% { transform: rotate(9deg); } }
.t-aura { transform-origin: 50% 50%; opacity: .35; transition: opacity .5s; }
.t-swirl { transform-origin: 50% 50%; animation: a-swirl 4s linear infinite; }
@keyframes a-swirl { to { transform: rotate(360deg); } }
.t-paw { transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.teller.is-casting .t-aura, .teller.is-tense .t-aura { opacity: 1; animation: a-aura 1.4s ease-in-out infinite; }
.teller.is-tense .t-aura { animation-duration: .7s; }
@keyframes a-aura { 50% { transform: scale(1.12); opacity: .7; } }
.teller.is-casting .t-swirl { animation-duration: 1.6s; }
.teller.is-tense .t-swirl { animation-duration: .8s; }
.teller.is-tense .t-eyes { transform: scaleY(.62); }
.teller.is-tense .t-paw-l { transform: translate(4px, -2px); }
.teller.is-tense .t-paw-r { transform: translate(-4px, -2px); }
.teller.is-happy .t-eye-open { opacity: 0; }
.teller.is-happy .t-eye-happy { opacity: 1; }
.teller.is-happy .t-blush { opacity: .6; }
.teller.is-happy .t-paw-l { transform: translate(-2px, -10px) rotate(-14deg); }
.teller.is-happy .t-paw-r { transform: translate(2px, -10px) rotate(14deg); }
.teller.tap-l .t-paw-l, .teller.tap-r .t-paw-r { animation: a-tap .32s ease-out; }
@keyframes a-tap { 40% { transform: translateY(-7px); } }

.a-table[data-small="1"] .teller { width: min(170px, 46vw); }
.a-table[data-small="1"] .deck { left: calc(50% + min(170px, 46vw) * .36); }
.a-table[data-small="1"] .a-words { min-height: 60px; }

/* ルナのふきだし（ねこの左上） */
.bubble { position: absolute; top: 4%; right: 76%; z-index: 2; max-width: 8.6em; margin: 0; padding: 6px 10px; border-radius: 14px 14px 4px 14px; white-space: normal;
  background: #fff6df; color: #3a2a5a; font-size: 12px; font-weight: 800; line-height: 1.35; text-align: left; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transform-origin: 100% 100%; width: max-content; }
.bubble.is-pop { animation: a-bubble .38s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes a-bubble { from { transform: scale(.4); opacity: 0; } }
@media (max-width: 359px) { .bubble { font-size: 11px; max-width: 7em; } }
@media (min-width: 700px) { .bubble { font-size: 13px; } }

/* 山札 */
.deck { position: absolute; bottom: 4px; left: calc(50% + min(220px, 58vw) * .36); width: clamp(30px, 8vw, 42px); aspect-ratio: 2 / 3; }
.deck[hidden] { display: block !important; visibility: hidden; }
.dk { position: absolute; inset: 0; transform: translate(calc(var(--i) * -1px), calc(var(--i) * -1.6px)) rotate(calc(var(--i) * 2deg - 4deg)); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.dk svg { width: 100%; height: 100%; }

/* 陣営 */
.camps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; position: relative; z-index: 1; }
.camp { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 10px 7px 9px; border-radius: 14px; min-width: 0;
  background: rgba(9, 7, 36, .42); border: 1px solid rgba(231, 196, 106, .16);
  transition: background .7s, border-color .7s, box-shadow .7s, transform .3s; transition-delay: calc(var(--k, 0) * 110ms); }
.camp.is-hit { animation: a-hit .45s ease-out; }
@keyframes a-hit { 30% { box-shadow: 0 0 0 2px var(--cc), 0 0 26px color-mix(in srgb, var(--cc) 55%, transparent); } }
.camp.is-complete { border-color: color-mix(in srgb, var(--cc) 70%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--cc) 30%, transparent); }

.ccard { position: relative; width: min(86px, 62%); aspect-ratio: 2 / 3; perspective: 700px; }
.cc-in { position: absolute; inset: 0; transform-style: preserve-3d; }
.ccard.is-up .cc-in { transform: rotateY(180deg); }
.cc-back, .cc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 7px; overflow: hidden; box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
.cc-back svg { width: 100%; height: 100%; }
.cc-face { transform: rotateY(180deg); background: #fbf3dc; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; padding: 6% 6% 7%;
  box-shadow: inset 0 0 0 2px #fbf3dc, inset 0 0 0 3.5px #cfa94f, 0 6px 14px rgba(0, 0, 0, .4); }
.cf-num { font: 800 clamp(8px, 2.4vw, 11px)/1 var(--serif); color: var(--ci); letter-spacing: .06em; }
.cf-art { width: 100%; height: auto; aspect-ratio: 1; border-radius: 46% 46% 6px 6px / 40% 40% 6px 6px; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cc) 70%, #fff); }
.cf-en { font: 800 clamp(5px, 1.5vw, 7px)/1 var(--serif); color: var(--ci); letter-spacing: .04em; white-space: nowrap; overflow: hidden; max-width: 100%; }
.seal { position: absolute; right: -15px; top: -11px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  font: 900 11px/1 var(--serif); color: #fff6e0; letter-spacing: .02em; background: radial-gradient(circle at 35% 30%, #f06a6a, #b72424 60%, #8a1414);
  box-shadow: 0 0 0 2px #f7d98a, 0 4px 10px rgba(0, 0, 0, .45); transform: rotate(14deg) scale(0); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.7, .5, 1), opacity .2s; pointer-events: none; }
.camp.is-complete .seal { transform: rotate(14deg) scale(1); opacity: 1; }

.cinfo { text-align: center; min-width: 0; max-width: 100%; }
.cname { margin: 0; font: 800 clamp(13px, 3.8vw, 16px)/1.2 var(--serif); color: #fff3d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .6s; }
.ccount { margin: 1px 0 0; font-size: 11.5px; color: var(--tm-muted); font-weight: 700; transition: color .6s; }
.ccount b { color: var(--cc); font-size: 16px; margin-right: 1px; }

.roster { list-style: none; margin: 2px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(var(--rcols, 1), minmax(0, 1fr)); gap: 4px; }
.roster li { min-height: 27px; border-radius: 8px; font-size: 13px; font-weight: 800; display: flex; align-items: center; padding: 3px 8px; min-width: 0; }
.slot { border: 1.5px dashed rgba(231, 196, 106, .26); }
.slot.is-reserved { border-color: color-mix(in srgb, var(--cc) 60%, transparent); }
.slot.is-waiting { border-style: solid; border-color: var(--cc); animation: a-wait .8s ease-in-out infinite alternate; }
@keyframes a-wait { to { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 35%, transparent), 0 0 14px var(--cc); } }
.mem { background: color-mix(in srgb, var(--cc) 24%, #15123f); border: 1px solid color-mix(in srgb, var(--cc) 65%, transparent); color: #fff6e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; line-height: 19px; transition: background .7s, color .7s, border-color .7s; }
.mem::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cc); margin-right: 6px; vertical-align: 1px; }
.mem.is-new { animation: a-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes a-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* 自由な名前・強さ */
.cname[data-edit] { cursor: pointer; text-decoration: underline dotted rgba(231, 196, 106, .45); text-underline-offset: 4px; }
.stage[data-phase="play"] .cname[data-edit] { cursor: default; text-decoration: none; }
.cpow { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--cc) 22%, transparent); color: #ffe7a8; font-size: 11px; white-space: nowrap; }
.cpow i { font-style: normal; font-weight: 900; font-size: 13px; }
.camps.is-balance .mem[data-pw] { position: relative; padding-right: 26px; }
.camps.is-balance .mem[data-pw]::after { content: attr(data-pw); position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 75%, #000); color: #fff6df; font-size: 11px; font-weight: 900; }
.fly-face { align-content: center; gap: 4px; }
.fly-pw { font-size: clamp(8px, 2.4vw, 11px); letter-spacing: -.5px; color: var(--cc); white-space: nowrap; }
.a-power { margin: 4px 0 0; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 4px; padding: 4px 12px; border-radius: 999px; background: rgba(231, 196, 106, .14); border: 1px solid rgba(231, 196, 106, .45); color: #fff3d0; font-size: 13px; font-weight: 800; }
.a-power b { font-size: 18px; color: #ffd76a; }
.a-power small { font-size: 11px; color: #d6cdf2; font-weight: 700; }
.a-table.is-done .cname { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; }
.a-table.is-done .cpow { background: color-mix(in srgb, var(--cc) 16%, #fff); color: var(--ci); }
.a-table.is-done .camps.is-balance .mem[data-pw]::after { background: color-mix(in srgb, var(--cc) 85%, #000); }

/* 小さい画面で陣営が多いとき：札を小さく横に */
.camps[data-density="compact"] { gap: 7px; }
.camps[data-density="compact"] .camp { grid-template-columns: 30px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 7px; padding: 7px 6px; }
.camps[data-density="compact"] .ccard { width: 30px; grid-row: 1; }
.camps[data-density="compact"] .cinfo { text-align: left; }
.camps[data-density="compact"] .cname { font-size: 12.5px; }
.camps[data-density="compact"] .ccount { font-size: 10.5px; }
.camps[data-density="compact"] .ccount b { font-size: 13px; }
.camps[data-density="compact"] .roster { grid-column: 1 / -1; }
.camps[data-density="compact"] .roster li { min-height: 23px; font-size: 12px; padding: 1px 6px; line-height: 19px; }
.camps[data-density="compact"] .cf-num, .camps[data-density="compact"] .cf-en { display: none; }
.camps[data-density="compact"] .cc-face { grid-template-rows: 1fr; padding: 3px; }
.camps[data-density="compact"] .seal { width: 24px; height: 24px; font-size: 8px; right: auto; left: -9px; top: -8px; }

/* 配られる札 */
.flylayer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.fly { position: absolute; left: 0; top: 0; width: clamp(64px, 18vw, 96px); aspect-ratio: 2 / 3; perspective: 800px; will-change: transform; }
.fly-in { position: absolute; inset: 0; transform-style: preserve-3d; }
.fly-back, .fly-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 22px rgba(0, 0, 0, .5); }
.fly-back svg { width: 100%; height: 100%; }
.fly-face { transform: rotateY(180deg); background: linear-gradient(#fffaf0, #f3e4c2); display: grid; place-items: center; padding: 8px 6px; text-align: center;
  box-shadow: inset 0 0 0 2px #fffaf0, inset 0 0 0 3.5px var(--cc), 0 10px 22px rgba(0, 0, 0, .5); }
.fly-face::before, .fly-face::after { content: "✦"; position: absolute; left: 0; right: 0; font-size: 11px; color: var(--cc); }
.fly-face::before { top: 6px; } .fly-face::after { bottom: 6px; }
.fly-name { font: 800 clamp(14px, 4vw, 18px)/1.25 var(--serif); color: #2e2210; overflow-wrap: anywhere; }
.fly.is-long .fly-name { font-size: clamp(10px, 2.8vw, 13px); }
.fly.is-live { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--cc) 80%, transparent)); z-index: 2; }

/* 完成：各陣営がタロットの名簿札になる */
.a-table.is-done .camp { background: linear-gradient(#fdf8ea, #f4e6c6); border: 2px solid #d4ad55; box-shadow: 0 0 0 3px rgba(212, 173, 85, .22), 0 14px 28px rgba(0, 0, 0, .38); }
.a-table.is-done .cname { color: var(--ci); }
.a-table.is-done .ccount { color: #7a6845; }
.a-table.is-done .mem { background: #fffdf6; color: #2b2112; border-color: color-mix(in srgb, var(--cc) 50%, #e8dcc0); white-space: normal; overflow-wrap: anywhere; line-height: 1.35; padding-top: 4px; padding-bottom: 4px; }
.a-table.is-done .mem::before { vertical-align: 1px; }

@media (max-width: 379px) {
  .a-table.is-done .cname { -webkit-line-clamp: 3; }
  .camps.is-balance .mem[data-pw] { padding-right: 20px; }
  .camps.is-balance .mem[data-pw]::after { right: 2px; min-width: 15px; height: 16px; font-size: 10px; border-radius: 5px; }
  .camps.is-balance .mem::before { display: none; }
  .a-table { padding: 8px 6px 12px; }
  .camps { gap: 6px; }
  .camp { padding: 8px 4px 7px; }
  .roster li { padding: 2px 5px; font-size: 12.5px; }
  .mem::before { width: 5px; height: 5px; margin-right: 4px; }
}
@media (min-width: 700px) {
  .a-table { padding: 16px 18px 20px; }
  .teller { width: min(250px, 40vw); }
  .deck { left: calc(50% + min(250px, 40vw) * .36); }
  .camps { gap: 14px; }
  .camp { padding: 12px 10px 12px; }
  .roster li { font-size: 14px; min-height: 30px; }
}
.is-team-reduced .t-tail, .is-team-reduced .t-swirl, .is-team-reduced .a-sky, .is-team-reduced .t-eye-open { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .t-tail, .t-swirl, .a-sky { animation: none !important; } }

/* ---------- 開始・反応・成立・完成・強さ・大画面 ---------- */
/* 開始ボタン：開始前だけ、やわらかく光って呼ぶ */
.stage[data-phase="idle"] #startBtn { animation: app-call 2.6s ease-in-out infinite; }
@keyframes app-call { 50% { box-shadow: 0 6px 0 #8f6a1e, 0 0 0 6px rgba(231, 196, 106, .18), 0 12px 34px rgba(231, 196, 106, .55); } }

/* ルナ：完成後は小さくなって名簿を上へ。陣営が成立するたびに小さく跳ねる */
.teller { transition: width .5s ease; }
.a-table.is-settled .teller { width: min(150px, 40vw); }
@media (min-width: 700px) { .a-table.is-settled .teller { width: min(190px, 26vw); } }
.teller.is-react .teller-svg { animation: app-hop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes app-hop { 40% { transform: translateY(-6px) scale(1.03); } }

/* 札の着地：行がぽんと入り、陣営の札が少し沈む */
.camp.is-hit .ccard { animation: app-sink .38s ease-out; }
@keyframes app-sink { 35% { transform: translateY(3px) scale(.97); } }
.mem.is-new { animation: app-in .42s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes app-in { 0% { transform: translateX(-8px) scale(.82); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* 陣営の成立：札のまわりに光の輪が1回広がり、札が輝く */
.halo { position: absolute; inset: -4px; border-radius: 10px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 0 var(--cc); }
.camp.is-bless .halo { animation: app-halo 1s ease-out; }
@keyframes app-halo { 0% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--cc) 90%, #fff), 0 0 18px 4px color-mix(in srgb, var(--cc) 70%, transparent); } 100% { opacity: 0; box-shadow: 0 0 0 16px transparent, 0 0 30px 10px transparent; } }
.camp.is-bless .ccard { animation: app-shine .9s ease-out; }
@keyframes app-shine { 30% { transform: translateY(-4px) scale(1.06); filter: brightness(1.35) drop-shadow(0 0 12px var(--cc)); } }

/* 全陣営の完成：すべての札が一斉に輝く（粒は少なめ） */
.a-table.is-glow .camp .ccard { animation: app-all 1.5s ease-out; }
.a-table.is-glow .camp { animation: app-all-camp 1.5s ease-out; }
@keyframes app-all { 25% { transform: translateY(-5px) scale(1.07); filter: brightness(1.45) drop-shadow(0 0 16px var(--cc)); } }
@keyframes app-all-camp { 25% { box-shadow: 0 0 0 2px var(--cc), 0 0 34px color-mix(in srgb, var(--cc) 55%, transparent); } }

/* 強さ：全員が公開されてから。合計は数え上げ、名簿の数字はふわっと出る */
.camps.is-power .cpow { animation: app-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.camps.is-power .mem[data-pw]::after { animation: app-fade .5s ease-out; }
@keyframes app-pop { 0% { transform: scale(.6); opacity: 0; } }
@keyframes app-fade { 0% { opacity: 0; } }
.a-power { animation: app-pop .5s cubic-bezier(.3, 1.6, .5, 1); }

/* 大きな画面・プロジェクター */
@media (min-width: 1500px) {
  .page { max-width: 1640px; grid-template-columns: minmax(0, 1fr) 360px; }
  .teller { width: 270px; }
  .roster li { font-size: 15.5px; min-height: 32px; }
  .cname { font-size: 18px; }
  .ccard { width: min(104px, 62%); }
}
/* 大きく映す（全画面）：設定は隠れて、舞台だけを大きく */
.stage:fullscreen { background: radial-gradient(1400px 900px at 50% -10%, #2c2474 0%, #151140 46%, #0b0920 100%); overflow-y: auto; padding: 2vh 3vw 3vh; }
.stage:fullscreen .quick, .stage:fullscreen .tm-toolbar { display: none; }
.fs-exit { display: none; }
.stage:fullscreen .fs-exit { display: block; position: fixed; top: 12px; right: 14px; z-index: 30; padding: 6px 14px; border: 1px solid rgba(231, 196, 106, .45); border-radius: 999px; background: rgba(20, 16, 54, .72); color: #f3e7c4; font: inherit; font-size: 13px; cursor: pointer; opacity: .55; transition: opacity .2s; }
.stage:fullscreen .fs-exit:hover, .stage:fullscreen .fs-exit:focus-visible { opacity: 1; }
.stage:fullscreen .a-table { min-height: 90vh; padding: 2vh 2vw; }
.stage:fullscreen .teller { width: clamp(220px, 20vw, 360px); }
.stage:fullscreen .a-table.is-settled .teller { width: clamp(160px, 13vw, 240px); }
.stage:fullscreen .a-head { font-size: clamp(28px, 3.2vw, 56px); }
.stage:fullscreen .a-kicker { font-size: clamp(13px, 1.1vw, 20px); }
.stage:fullscreen .camps { gap: 1.4vw; }
.stage:fullscreen .ccard { width: clamp(80px, 7vw, 140px); }
.stage:fullscreen .cname { font-size: clamp(16px, 1.6vw, 30px); }
.stage:fullscreen .roster li { font-size: clamp(14px, 1.3vw, 24px); min-height: 2.1em; }
.stage:fullscreen .fly { width: clamp(80px, 7vw, 130px); }
.stage:fullscreen .bubble { font-size: clamp(12px, 1vw, 18px); }

.is-team-reduced .stage[data-phase="idle"] #startBtn, .is-team-reduced #startBtn { animation: none !important; }

/* ---------- A+++：光の糸と最後の封印 ---------- */

/* ---------- 光の糸（陣営の左のふちを通るので、名前の上は通らない） ---------- */
.bonds { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; overflow: visible; }
.bond, .bond-glow { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke-opacity .35s; }
.bond { stroke: color-mix(in srgb, var(--c) 60%, #fff); stroke-width: 1.9; }
.bond-glow { stroke: var(--c); stroke-width: 6; opacity: .38; }
.bond-bead { fill: #fff6df; transform-box: fill-box; transform-origin: 50% 50%; filter: drop-shadow(0 0 3px var(--c)); }
.bond-g.is-gone .bond, .bond-g.is-lit .bond { stroke-width: 2.4; stroke: #fff6df; }
.bond-g.is-gone .bond-glow, .bond-g.is-lit .bond-glow { opacity: .6; stroke-width: 7; }
.bond-g.is-bless .bond { stroke-width: 2.2; }
.bond-g.is-bless .bond-glow { opacity: .45; stroke-width: 10; }
/* 主役交代：封印のあいだ、配布中の糸は静かに（封印から入った人の糸と、成立で吸いこまれる糸だけ明るい） */
.a-table.is-hush .bond-g:not(.is-lit):not(.is-gone):not(.is-bless) path { stroke-opacity: .16; }
.a-table.is-hush .bond-g:not(.is-lit) .bond-bead { opacity: .3; transition: opacity .35s; }

/* ---------- 封印：暗くなるテーブル、空いた席の光 ---------- */
.a-table::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .45s;
  background: radial-gradient(70% 55% at 50% 38%, transparent 0%, rgba(6, 4, 22, .35) 55%, rgba(6, 4, 22, .72) 100%); }
.a-table.is-sealing::after { opacity: 1; }
.a-table.is-sealing .camp :is(.ccard, .cinfo) { opacity: .6; transition: opacity .4s; }
.a-table.is-sealing .roster .mem { opacity: .62; transition: opacity .4s; }
.a-table.is-sealing .roster .mem.is-new { opacity: 1; }
.slot.is-open { border-style: solid; border-color: var(--cc); position: relative; z-index: 4; background: color-mix(in srgb, var(--cc) 14%, transparent);
  animation: a3-open 1s ease-in-out infinite alternate; }
@keyframes a3-open { to { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 40%, transparent), 0 0 18px var(--cc); } }

/* ---------- 封印した札 ---------- */
.seal-stage { position: absolute; left: 0; right: 0; z-index: 5; display: grid; justify-items: center; pointer-events: none; }
.seal-stage[hidden] { display: none; }
.seal-row { display: flex; justify-content: center; gap: clamp(10px, 3vw, 22px); pointer-events: auto; }
.sealcard { position: relative; width: var(--sw, clamp(58px, 16vw, 96px)); aspect-ratio: 2 / 3; padding: 0; border: 0; background: none; border-radius: 9px; cursor: pointer; perspective: 800px; touch-action: manipulation;
  --cc: #E7C46A; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); animation: a3-breathe 1.6s ease-in-out infinite;
  transition: scale .22s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; }
.sealcard:nth-child(2) { animation-delay: -.5s; } .sealcard:nth-child(3) { animation-delay: -1s; }
@keyframes a3-breathe { 50% { transform: translateY(-4px); filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .5)) drop-shadow(0 0 10px rgba(231, 196, 106, .45)); } }
.sealcard:hover:not(:disabled) { transform: translateY(-6px) scale(1.04); }
.sealcard:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; }
.sealcard:disabled { cursor: default; animation: none; }
.sealcard.is-gone { visibility: hidden; }
.sealcard.is-opening { animation: none; z-index: 2; }
/* ルナの左右に分けて置くとき（低い画面）：ふきだしは隠して、ルナの顔と封印を見せる */
.seal-row.is-split { display: block; position: relative; width: 100%; }
.seal-row.is-split .sealcard { position: absolute; top: 0; }
.a-table.is-split .bubble { visibility: hidden; }
/* 開いた札は名前が読める大きさに（上端はそのまま、下へ広がる＝ルナの目を隠さない）。ほかの封印は少し下がる */
.sealcard.is-zoom { scale: var(--zoom, 1.2); transform-origin: 50% 0; }
.seal-row.is-reading .sealcard:not(.is-opening):not(.is-gone) { opacity: .55; }
.sc-in { position: absolute; inset: 0; transform-style: preserve-3d; }
.sc-back, .sc-face { position: absolute; inset: 0; border-radius: 9px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sc-back svg { width: 100%; height: 100%; }
.sc-face { transform: rotateY(180deg); display: grid; align-content: center; justify-items: center; gap: 5px; padding: 7px 5px; text-align: center;
  background: linear-gradient(#fffaf0, #f3e4c2); box-shadow: inset 0 0 0 2px #fffaf0, inset 0 0 0 3.5px #d7b45a; transition: box-shadow .25s; }
.sc-name { font: 800 clamp(14px, 4vw, 19px)/1.25 var(--serif); color: #2e2210; overflow-wrap: anywhere; }
.sealcard.is-long .sc-name { font-size: clamp(10px, 2.8vw, 13px); }
.sc-team { min-height: 1.2em; font: 800 clamp(9px, 2.4vw, 12px)/1.2 var(--serif); color: var(--cc); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sealcard.is-told .sc-face { box-shadow: inset 0 0 0 2px #fffaf0, inset 0 0 0 4px var(--cc), 0 0 22px var(--cc); }
.sealcard.is-told .sc-team { opacity: 1; transform: none; }

/* ルナの肉球の封蝋（割れると左右に落ちる） */
.wax { position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.wax-l, .wax-r { position: absolute; inset: 0; border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 35% 30%, #f06a5a, #b42424 58%, #7c1010); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .35), 0 2px 4px rgba(0, 0, 0, .4), 0 0 0 2px rgba(247, 217, 138, .55); }
.wax-l { clip-path: polygon(0 0, 54% 0, 44% 36%, 56% 60%, 46% 100%, 0 100%); }
.wax-r { clip-path: polygon(54% 0, 100% 0, 100% 100%, 46% 100%, 56% 60%, 44% 36%); }
.wax-paw { position: absolute; inset: 22%; width: 56%; height: 56%; color: #ffd98a; opacity: .92; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.sc-key { position: absolute; right: 5px; top: 4px; font: 800 10px var(--serif); color: rgba(255, 231, 168, .7); }
/* 次に自動で開く封印：細い光の輪が一周する */
.sealcard.is-next::before { content: ""; position: absolute; inset: -5px; border-radius: 12px; pointer-events: none;
  background: conic-gradient(#ffd76a calc(var(--p, 0) * 1%), transparent 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
  animation: a3-ring var(--auto, 1000ms) linear forwards; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes a3-ring { to { --p: 100; } }
.is-team-reduced .sealcard { animation: none !important; }

/* ---------- 見出しの高さは最後まで同じ（陣営がずれない）。封印の場所が足りないときは陣営を少し下げる ---------- */
.a-table[style*="--words-h"]:not(.is-settled) .a-words { min-height: var(--words-h); }
.team-page .camps { margin-top: calc(10px + var(--seal-room, 0px)); transition: margin-top .35s ease; }

/* ---------- 低い PC 画面で陣営が2段のとき：札を横に置いて1画面に収める ---------- */
.camps[data-density="side"] .camp { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 10px; row-gap: 7px; padding: 9px 9px 10px; }
.camps[data-density="side"] .ccard { width: 50px; grid-row: 1; }
.camps[data-density="side"] .cinfo { text-align: left; }
.camps[data-density="side"] .roster { grid-column: 1 / -1; }
.camps[data-density="side"] .cf-en { display: none; }
.camps[data-density="side"] .cc-face { grid-template-rows: auto 1fr; padding: 4px; }
.camps[data-density="side"] .seal { width: 28px; height: 28px; font-size: 9px; right: auto; left: -11px; top: -9px; }
.camps[data-density="side"] .halo { inset: -3px; border-radius: 8px; }
.a-table[data-fit="tight"] .teller { width: min(176px, 40vw); }
.a-table[data-fit="tight"] .deck { left: calc(50% + min(176px, 40vw) * .36); }
.a-table[data-fit="tight"] .a-words { min-height: 56px; }
.a-table[data-fit="tight"] .roster li { min-height: 26px; }
.a-table[data-fit="tight"].is-settled .teller { width: min(150px, 30vw); }
.a-table[data-fit="tighter"] .teller { width: min(150px, 36vw); }
.a-table[data-fit="tighter"] .deck { left: calc(50% + min(150px, 36vw) * .36); }
.a-table[data-fit="tighter"] .a-words { min-height: 50px; }
.a-table[data-fit="tighter"] .a-head { font-size: 22px; }
.a-table[data-fit="tighter"] .camps { gap: 8px; }
.a-table[data-fit="tighter"] .camps[data-density="side"] .camp { padding: 6px 7px 7px; row-gap: 5px; }
.a-table[data-fit="tighter"] .camps[data-density="side"] .ccard { width: 40px; }
.a-table[data-fit="tighter"] .roster { gap: 3px; }
.a-table[data-fit="tighter"] .roster li { min-height: 22px; font-size: 12.5px; padding-top: 1px; padding-bottom: 1px; line-height: 18px; }
.a-table[data-fit="tighter"].is-settled .teller { width: min(130px, 30vw); }

/* 動きをひかえめに（このページの舞台だけ） */
.is-team-reduced .stage *, .is-team-reduced .stage *::before, .is-team-reduced .stage *::after { animation-iteration-count: 1 !important; animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
