/* =========================================================
   AI審査システム 共通スタイル
   方針: Bootstrap標準ベース。審査員スマホ操作の視認性・誤操作防止を最優先。
   ========================================================= */

:root {
  --score-btn-size: 56px;
}

/* =========================================================
   審査員ログイン時のウェルカム演出（PitchLight スプラッシュ）
   方針: 重厚感・落ち着き（コンシェルジュ感）。タップするまで進まない。
   ========================================================= */
.welcome-splash {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f4ecd8;
  /* 深い紺〜黒の落ち着いた背景＋中央のやわらかな光だまり */
  background:
    radial-gradient(ellipse at 50% 42%, rgba(40, 60, 110, .35) 0%, rgba(10, 16, 32, 0) 55%),
    radial-gradient(ellipse at 50% 50%, #141d33 0%, #0a1020 55%, #05080f 100%);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  overflow: hidden;
  /* 最初のフレームから不透明にして、下の一覧画面が一瞬も見えないようにする */
  opacity: 1;
}

/* ① 準備中（ぐるぐる）。再生準備が整うまで表示し、is-playing で消す */
.welcome-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(214, 184, 122, .25);
  border-top-color: #d6b87a;
  border-radius: 50%;
  animation: wsSpin .9s linear infinite;
}
.welcome-splash.is-playing .welcome-loader { display: none; }

/* ロゴ背後のごく淡い金色の光輪（華美にしない）。再生開始で出す */
.welcome-splash::before {
  content: "";
  position: absolute;
  top: 38%;
  left: 50%;
  width: 70vmin;
  height: 70vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(214, 184, 122, .16) 0%, rgba(214, 184, 122, 0) 62%);
  filter: blur(8px);
  opacity: 0;
  pointer-events: none;
}
.welcome-splash.is-playing::before { animation: wsTextIn 1.8s ease .3s forwards; }

.welcome-inner { position: relative; }
/* ② 演出の各要素。初期状態は不可視。is-playing が付いてから動き出す */
.welcome-logo {
  width: min(64vw, 360px);
  height: auto;
  display: block;
  margin: 0 auto 1.4rem;
  opacity: 0;
  transform: scale(.965);
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .55));
}
.welcome-rule {
  width: 0;
  height: 1px;
  margin: 0 auto 1.2rem;
  background: linear-gradient(to right, transparent, rgba(214, 184, 122, .85), transparent);
}
.welcome-hello {
  font-size: 1rem;
  letter-spacing: .55em;
  padding-left: .55em;
  color: #d6b87a;
  opacity: 0;
}
.welcome-name {
  margin-top: .5rem;
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: #f6efdd;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .6);
  opacity: 0;
}
.welcome-hint {
  position: absolute;
  bottom: 8%;
  font-size: .85rem;
  letter-spacing: .25em;
  padding-left: .25em;
  color: rgba(244, 236, 216, .5);
  opacity: 0;
}
.welcome-splash.is-playing .welcome-logo  { animation: wsLogoIn 1.6s cubic-bezier(.22, .61, .36, 1) .1s forwards; }
.welcome-splash.is-playing .welcome-rule  { animation: wsRule 1.1s ease 1s forwards; }
.welcome-splash.is-playing .welcome-hello { animation: wsTextIn 1.2s ease 1.3s forwards; }
.welcome-splash.is-playing .welcome-name  { animation: wsTextIn 1.3s ease 1.8s forwards; }
.welcome-splash.is-playing .welcome-hint  { animation: wsTextIn 1.2s ease 2.7s forwards, wsPulse 2.6s ease 3.5s infinite; }

/* ③ 退場（タップ時にJSが付与） */
.welcome-splash.is-leaving { animation: wsOut .6s ease forwards; }

@keyframes wsIn     { to { opacity: 1; } }
@keyframes wsOut    { to { opacity: 0; visibility: hidden; } }
@keyframes wsSpin   { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes wsLogoIn { to { opacity: 1; transform: scale(1); } }
@keyframes wsTextIn { to { opacity: 1; } }
@keyframes wsRule   { to { width: min(48vw, 260px); } }
@keyframes wsPulse  { 0%, 100% { opacity: .5; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .welcome-splash, .welcome-splash::before, .welcome-loader, .welcome-logo, .welcome-rule,
  .welcome-hello, .welcome-name, .welcome-hint { animation-duration: .01ms !important; }
}

/* ---- 採点対象の固定ヘッダ（採点画面上部に常時表示）---- */
.team-banner {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #0d6efd;
  color: #fff;
  padding: .75rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.team-banner .order-badge {
  font-size: .85rem;
  opacity: .9;
}
.team-banner .team-name {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.team-banner .theme-name {
  font-size: 1rem;
  opacity: .95;
}
/* 発表概要（エントリーシート要約）: バナーの下に置く独立ボックス。小さい文字で */
.entry-summary {
  padding: .5rem .7rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  color: #495057;
  font-size: .85rem;
  line-height: 1.5;
}
.judge-mode .entry-summary { font-size: .95rem; }

/* ---- 点数ボタン（0〜5）。大きく・押しやすく・選択状態を明確に ---- */
.score-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.score-buttons .score-btn {
  width: var(--score-btn-size);
  height: var(--score-btn-size);
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid #adb5bd;
  border-radius: 12px;
  background: #fff;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all .1s ease;
}
.score-buttons .score-btn:active {
  transform: scale(.95);
}
.score-buttons .score-btn.selected {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .25);
}
/* 締切後・閲覧時: 操作不可。未選択の点数はグレーアウトして選択値を見やすく */
.score-buttons.jt-readonly .score-btn { pointer-events: none; cursor: default; }
.score-buttons.jt-readonly .score-btn:not(.selected) {
  opacity: .35;
  background: #e9ecef;
  border-color: #ced4da;
  color: #adb5bd;
}

/* 未入力の採点項目を強調（提出前チェック用） */
.score-item.unfilled {
  border-left: 4px solid #ffc107;
}
.score-item {
  border-left: 4px solid transparent;
}

/* ---- コメントテンプレート選択（iPad前提: 大きくタップしやすく）---- */
.comment-tpl-check {
  padding: .35rem .5rem .35rem 2.2rem;
  margin-bottom: .35rem;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  background: #fff;
}
.comment-tpl-check .form-check-input {
  width: 1.5rem;
  height: 1.5rem;
  margin-left: -1.7rem;
  margin-top: .1rem;
  cursor: pointer;
}
.comment-tpl-check .form-check-label {
  cursor: pointer;
  font-size: 1.05rem;
  padding-left: .35rem;
}
.comment-tpl-check:has(.form-check-input:checked) {
  background: #e7f1ff;
  border-color: #0d6efd;
}

/* ---- 進捗バッジ ---- */
.status-not_started { color: #6c757d; }
.status-draft       { color: #fd7e14; }
.status-submitted   { color: #198754; }
.status-locked      { color: #0d6efd; }

/* ---- 受賞（結果検討・授賞）: 選んだ賞を見やすく ---- */
.award-chosen {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #d1e7dd;
  border: 2px solid #198754;
  border-radius: 10px;
  padding: .5rem .8rem;
}
.award-chosen-icon { font-size: 1.3rem; line-height: 1; }
.award-chosen-name { font-size: 1.15rem; font-weight: 800; color: #0f5132; }
.award-chosen-meta { font-size: .85rem; color: #14653a; }

/* ---- viewer 結果発表（会場投影。文字大きく情報少なく）---- */
.result-stage {
  text-align: center;
  padding: 2rem 1rem;
}
.result-stage .rank {
  font-size: 2.5rem;
  font-weight: 800;
}
.result-stage .winner-team {
  font-size: 3rem;
  font-weight: 800;
}
.result-stage .winner-theme {
  font-size: 1.5rem;
  color: #495057;
}

/* ---- 結果発表スライドショー（会場投影・疑似PowerPoint）---- */
.ss-stage {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #1b3b6f 0%, #0d1b2a 70%);
  color: #fff;
  z-index: 2000;
  overflow: hidden;
}
.ss-slide {
  position: absolute;
  inset: 0;
  /* クロスフェード（ディゾルブ）のため全スライドを常時レイアウトに残し、opacityで切替える。
     前のスライドが消えつつ次が現れるので、PowerPointのフェードのように自然に切り替わる。 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3vh 2vw 7vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}
.ss-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1; /* フェード中、現在のスライドを前面に */
}
@media (prefers-reduced-motion: reduce) {
  .ss-slide { transition: opacity .15s ease; } /* 動きを抑える設定時は短めに */
}

.ss-event-title { font-size: clamp(1.7rem, 3.2vw, 3rem); opacity: .9; margin-bottom: .8rem; }
.ss-big-title   { font-size: clamp(3.6rem, 9vw, 8rem); font-weight: 800; line-height: 1.08; }
.ss-sub         { font-size: clamp(1.5rem, 3vw, 2.6rem); opacity: .85; margin-top: 1.4rem; }

.ss-rank        { font-size: clamp(3.2rem, 9vw, 7.5rem); font-weight: 800; letter-spacing: .05em; line-height: 1.05; }
.ss-rank-1 { color: #ffd700; text-shadow: 0 0 28px rgba(255,215,0,.55); }
.ss-rank-2 { color: #d0d6dd; }
.ss-rank-3 { color: #e29a5c; }
/* チーム名も1行固定（長い時はJS=fitTeam でフォント縮小して1行に収める） */
.ss-team        { font-size: clamp(3.2rem, 8vw, 7.2rem); font-weight: 800; margin-top: .5rem;
                  margin-left: auto; margin-right: auto; line-height: 1.12; white-space: nowrap; }
/* 発表タイトルは必ず1行（長い時はJS=fitTheme でフォント縮小して1行に収める） */
.ss-theme       { font-size: clamp(2.1rem, 4.8vw, 4rem); opacity: .95; margin-top: .6rem;
                  white-space: nowrap; line-height: 1.2; }
.ss-org         { font-size: clamp(1.6rem, 3.4vw, 2.8rem); opacity: .8; margin-top: .5rem;
                  white-space: nowrap; }
.ss-score       { font-size: clamp(1.7rem, 3.8vw, 2.8rem); margin-top: .9rem; }
.ss-score small { opacity: .7; font-size: .6em; }

.ss-comment {
  max-width: 84rem;
  margin: 1.8rem auto 0;
  font-size: clamp(1.4rem, 2.6vw, 2.3rem);
  line-height: 1.75;
}
.ss-points {
  list-style: none;
  padding: 0;
  margin: 1.1rem auto 0;
  max-width: 70rem;
  text-align: left;
}
.ss-points li {
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  padding: .35rem 0 .35rem 2.3rem;
  position: relative;
  line-height: 1.45;
}
.ss-points li::before { content: "✓"; position: absolute; left: 0; color: #6ee7a8; font-weight: 700; }
.ss-col-title { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 700; margin-bottom: .3rem; }

/* 受賞スライド（賞ベース発表） */
.ss-award-cat { font-size: clamp(1.1rem, 2.2vw, 1.8rem); opacity: .8; letter-spacing: .08em; }
/* 賞名も1行固定（長い時はJS=fitAward でフォント縮小して1行に収める） */
.ss-award {
  font-size: clamp(3.4rem, 8.8vw, 7.6rem);
  font-weight: 800;
  line-height: 1.08;
  margin: .4rem auto .2rem;
  white-space: nowrap;
}
/* 賞名は部門に関わらず全部ゴールド */
.ss-award-campus,
.ss-award-business,
.ss-award-sponsor  { color: #ffd700; text-shadow: 0 0 28px rgba(255, 215, 0, .5); }
.ss-good-label {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  font-weight: 700;
  color: #6ee7a8;
}

/* ---- 結果発表ボタン / ドラムロール演出 ---- */
.ss-award-slide .ss-drumroll,
.ss-award-slide .ss-winner { display: none; }

.ss-reveal-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  margin-top: 2.4rem;
  display: inline-flex; flex-direction: column; align-items: center; gap: .7rem;
  animation: ss-btn-pulse 1.4s ease-in-out infinite;
}
.ss-reveal-face {
  display: inline-block;
  font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: .1em;
  color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .35);
  padding: .5em 1.15em; border-radius: .55em;
  border: 3px solid rgba(255, 255, 255, .9);
  background: linear-gradient(#46a6ff, #1f6fe0 55%, #1860c8);
  box-shadow:
    inset 0 3px 3px rgba(255, 255, 255, .55),
    inset 0 -7px 12px rgba(0, 0, 0, .22),
    0 8px 0 #0f47a0,
    0 14px 24px rgba(0, 0, 0, .45);
  transition: transform .08s ease, box-shadow .08s ease;
}
.ss-reveal-btn:hover .ss-reveal-face { background: linear-gradient(#5ab0ff, #2a78ea 55%, #1f6ad6); }
.ss-reveal-btn:active .ss-reveal-face {
  transform: translateY(5px);
  box-shadow:
    inset 0 3px 3px rgba(255, 255, 255, .5),
    inset 0 -4px 8px rgba(0, 0, 0, .22),
    0 3px 0 #0f47a0,
    0 6px 12px rgba(0, 0, 0, .4);
}
.ss-reveal-hint { font-size: clamp(1.2rem, 2.4vw, 1.8rem); color: rgba(255, 255, 255, .85); }
@keyframes ss-btn-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }

.ss-award-slide[data-state="rolling"] .ss-reveal-btn,
.ss-award-slide[data-state="revealed"] .ss-reveal-btn { display: none; }

.ss-award-slide[data-state="rolling"] .ss-drumroll { display: flex; }
.ss-drumroll {
  margin-top: 2.4rem;
  min-height: 1.3em;
  align-items: center; justify-content: center;
  font-size: clamp(2.4rem, 6.5vw, 5.4rem); font-weight: 800;
  color: #fff; opacity: .9;
  text-shadow: 0 0 26px rgba(126, 224, 255, .4);
  animation: ss-roll-shake .14s linear infinite;
}
@keyframes ss-roll-shake {
  0%   { transform: translateY(-4px) skewX(-1.5deg); filter: blur(.4px); }
  50%  { transform: translateY(4px) skewX(1.5deg); filter: blur(0); }
  100% { transform: translateY(-4px) skewX(-1.5deg); filter: blur(.4px); }
}

.ss-award-slide[data-state="revealed"] .ss-winner {
  display: block;
  animation: ss-winner-pop .6s cubic-bezier(.2, .9, .3, 1.4);
}
@keyframes ss-winner-pop {
  0%   { opacity: 0; transform: scale(.6); }
  60%  { opacity: 1; transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* 受賞スライドの3ゾーン: 上=賞名 / 中=発表者情報 / 下=2行要約 */
/* 賞状フレーム分、左右に少し内側マージンを取る */
.ss-award-slide { justify-content: center; padding: 6vh 4.5vw 6vh; gap: 1.2vh; }
/* 発表後は中央寄せにしつつ、下に余白を多めに取り全体を少し上へ寄せる */
.ss-award-slide[data-state="revealed"] { justify-content: center; gap: 2.6vh; padding: 9vh 4.5vw 11vh; }
.ss-award-mid { display: flex; flex-direction: column; align-items: center; }

/* 金フレーム画像（assets/img/gold_award_frame.png）を受賞スライドに重ねる。
   中央は透明なので文字に被らない。クリックは透過。 */
.ss-frame {
  position: absolute;
  /* <img>は置換要素のため width:auto + left/right 指定だと実寸で左寄せになる。
     中央に固定し、画面より少しだけ大きく引き伸ばして左右対称に配置する。 */
  top: 50%;
  left: 50%;
  width: calc(100% + 2.6vw);   /* 左右に各1.3vwだけ外へ */
  height: calc(100% + 3.2vh);  /* 上下に各1.6vhだけ外へ */
  transform: translate(-50%, -50%);
  object-fit: fill;
  pointer-events: none;
  z-index: 1;          /* 背景より前・操作UI(2100)より後ろ */
}

.ss-summary { display: none; max-width: none; width: 100%; margin-top: 5vh; } /* 発表者情報から1行分ほど下げる */
.ss-award-slide[data-state="revealed"] .ss-summary { display: block; animation: ss-fade .5s ease .12s both; }
/* 賞名・チーム情報より一段控えめ。1行を基本に、収まらない行だけJSで少し縮小→最後は折り返し。 */
.ss-summary > div { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.45; opacity: .9; white-space: nowrap; }
.ss-summary > div + div { margin-top: .25rem; }

/* ラスト確定演出: 紙吹雪 */
.ss-confetti-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2050; }
.ss-confetti {
  position: absolute; top: -8vh; border-radius: 2px; opacity: .95;
  animation-name: ss-confetti-fall; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes ss-confetti-fall {
  0%   { transform: translateY(-8vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(112vh) rotate(900deg); opacity: .85; }
}

/* ===== 各受賞の発表演出（毎回 何かしらの効果。ラストは盛大に）===== */
/* 中央から弾けるゴールドバースト */
@keyframes ss-burst-out {
  0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)); opacity: 0; }
}
.ss-burst-piece {
  position: absolute; top: 50%; left: 50%; border-radius: 2px;
  animation: ss-burst-out var(--dur) cubic-bezier(.12, .6, .28, 1) forwards;
}
/* 下から立ちのぼるキラキラ */
@keyframes ss-rise {
  0%   { transform: translateY(0) scale(.2); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateY(-92vh) scale(1); opacity: 0; }
}
.ss-rise-piece {
  position: absolute; bottom: -4vh; color: #ffd86b;
  text-shadow: 0 0 10px rgba(255, 200, 90, .9);
  animation: ss-rise var(--dur) ease-in forwards;
}
/* 左下・右下のクラッカーから中央へ発射する紙吹雪（軌道はJSのWeb Animationsで付与） */
.ss-pop-piece {
  position: absolute; top: 0; left: 0;
  will-change: transform, opacity;
}

/* ===== タイトル画面（結果発表）劇場風アニメーション ===== */
.ss-title-slide {
  padding: 0;
  background:
    radial-gradient(circle at 50% 82%, rgba(255, 197, 76, .20), transparent 18%),
    radial-gradient(circle at 50% 42%, rgba(18, 64, 116, .45), transparent 45%),
    linear-gradient(180deg, #020712 0%, #061933 48%, #020713 100%);
}
.sst-curtain {
  position: absolute; top: 0; width: 16%; height: 100%; opacity: .6;
  background: repeating-linear-gradient(90deg,
    rgba(3, 14, 33, .95) 0px, rgba(4, 28, 63, .9) 18px, rgba(0, 5, 15, .95) 38px);
  filter: blur(.6px); z-index: 1;
}
.sst-curtain-left  { left: 0;  transform: skewX(-3deg); }
.sst-curtain-right { right: 0; transform: skewX(3deg); }
.sst-spotlight {
  position: absolute; top: -10%; width: 38vw; height: 78vh;
  background: radial-gradient(ellipse at top,
    rgba(255, 225, 154, .95) 0%, rgba(255, 190, 80, .30) 24%, rgba(255, 190, 80, .10) 48%, transparent 72%);
  filter: blur(10px); mix-blend-mode: screen; transform-origin: top center;
  animation: sst-spot 7s ease-in-out infinite alternate; z-index: 2;
}
.sst-spot-left  { left: -6%;  transform: rotate(-24deg); }
.sst-spot-right { right: -6%; transform: rotate(24deg); animation-delay: -2s; }
@keyframes sst-spot { from { opacity: .65; filter: blur(12px); } to { opacity: .95; filter: blur(7px); } }
.sst-sparkles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.sst-confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }
.sst-arcs {
  position: absolute; left: 50%; bottom: -18%; width: 120vw; height: 46vh;
  transform: translateX(-50%); border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at center, rgba(255, 210, 106, .42) 0%, transparent 8%),
    repeating-radial-gradient(ellipse at center, transparent 0px, transparent 34px,
      rgba(255, 190, 72, .20) 36px, rgba(255, 190, 72, .20) 39px, transparent 42px);
  opacity: .9; animation: sst-arc 4s ease-in-out infinite alternate; z-index: 2;
}
@keyframes sst-arc { from { opacity: .62; transform: translateX(-50%) scale(1); } to { opacity: 1; transform: translateX(-50%) scale(1.015); } }
.sst-horizon {
  position: absolute; left: 50%; bottom: 11.5%; width: 86vw; height: 2px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 188, 64, .75), rgba(255, 243, 190, 1), rgba(255, 188, 64, .75), transparent);
  box-shadow: 0 0 18px rgba(255, 197, 80, .95), 0 0 45px rgba(255, 177, 54, .75);
  animation: sst-horizon 2.6s ease-in-out infinite alternate; z-index: 3;
}
@keyframes sst-horizon { from { opacity: .65; } to { opacity: 1; } }
.sst-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding-bottom: 4vh; text-align: center; z-index: 10;
}
/* ※ 文字がゆっくり出てくる演出（fade/reveal）は不要との指示により無し。最初から表示。 */
.sst-event {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(20px, 2.2vw, 38px); letter-spacing: .14em; color: #ffd98a;
  text-shadow: 0 0 12px rgba(255, 194, 82, .65), 0 2px 2px rgba(0, 0, 0, .75);
}
.sst-ornament {
  width: min(38vw, 520px); height: 1px; margin: 2.4vh 0 3.2vh; position: relative;
  background: linear-gradient(90deg, transparent, #d59a34, #fff0b5, #d59a34, transparent);
}
.sst-ornament::before {
  content: "✦"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
  color: #f6c66b; font-size: 20px; text-shadow: 0 0 10px rgba(255, 199, 92, .9);
}
.sst-ornament-bottom { width: min(30vw, 420px); margin: 2vh 0 0; }
.sst-main {
  position: relative; font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 700; line-height: .98; letter-spacing: .02em;
  font-size: clamp(72px, 11vw, 190px); color: transparent;
  background: linear-gradient(180deg, #fff7c9 0%, #ffe08f 20%, #d99933 45%, #fff1b0 65%, #9f5d1e 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 16px rgba(255, 184, 64, .34)) drop-shadow(0 6px 4px rgba(0, 0, 0, .72));
}
.sst-main::after {
  content: ""; position: absolute; top: -18%; left: -35%; width: 30%; height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95), rgba(255, 218, 112, .75), transparent);
  transform: skewX(-18deg); animation: sst-shine 5.2s ease-in-out 3s infinite;
}
@keyframes sst-shine { 0% { left: -40%; opacity: 0; } 12% { opacity: 1; } 28% { left: 110%; opacity: 0; } 100% { left: 110%; opacity: 0; } }
.sst-divider {
  width: min(42vw, 620px); height: 1px; margin: 5vh 0 2.7vh; position: relative;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 110, .7), transparent);
}
.sst-divider::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px;
  transform: translate(-50%, -50%) rotate(45deg); background: #fff2b7;
  box-shadow: 0 0 12px #fff2b7, 0 0 28px #ffb338, 0 0 55px #ff9b1f;
}
.sst-sub {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 38px); letter-spacing: .12em; color: #ffd98a;
  text-shadow: 0 0 10px rgba(255, 194, 82, .65), 0 2px 2px rgba(0, 0, 0, .8);
}
.sst-vignette {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, .48) 100%);
}

/* ナビ・操作 */
.ss-nav {
  position: fixed;
  bottom: 2.5vh;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  z-index: 2100;
}
.ss-nav .btn { border-radius: 999px; }
.ss-counter { color: rgba(255,255,255,.85); font-size: 1.1rem; min-width: 5rem; text-align: center; }
.ss-top-bar {
  position: fixed;
  top: 1.5vh; right: 1.5vw;
  z-index: 2100;
  display: flex; gap: .5rem;
}
.ss-hint {
  position: fixed; bottom: .6vh; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.4); font-size: .85rem; z-index: 2100;
}

/* =========================================================
   審査員スマートフォン専用（らくらくスマホ志向 / 高齢者配慮）
   .judge-mode を body に付与して有効化。文字大きめ・余白広め・
   タップ領域大・コントラスト強め。
   ========================================================= */
.judge-mode { font-size: 1.12rem; }
.judge-mode main.container { max-width: 720px; }

/* 審査員スマホでは上部タイトルを追従させない（画面が小さいため） */
.judge-mode .team-banner { padding: 1rem 1.1rem; position: static; }
.judge-mode .team-banner .order-badge { font-size: 1rem; }
.judge-mode .team-banner .team-name { font-size: 1.7rem; line-height: 1.25; }
.judge-mode .team-banner .theme-name { font-size: 1.15rem; }

.judge-mode .jt-guide {
  font-size: 1.15rem;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 10px;
  padding: .7rem 1rem;
}

/* 採点項目カード */
.judge-mode .jt-item {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1.2rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.judge-mode .jt-item.unfilled { border-left: 6px solid #ffc107; }
.judge-mode .jt-item-index { font-size: 1rem; color: #6c757d; margin-bottom: .35rem; }
.judge-mode .jt-item-name { font-size: 1.45rem; font-weight: 800; line-height: 1.3; }
.judge-mode .jt-item-desc { font-size: 1.05rem; color: #495057; margin: .35rem 0 .9rem; line-height: 1.5; }

/* 1〜5 の大きな採点ボタン（横並び・等幅・大タップ領域） */
.judge-mode .jt-scale { display: flex; gap: .5rem; flex-wrap: nowrap; }
.judge-mode .jt-scale .score-btn {
  flex: 1 1 0;
  width: auto;
  height: 68px;
  font-size: 1.8rem;
  border-radius: 14px;
  border-width: 2px;
}
.judge-mode .jt-scale .score-btn.selected {
  box-shadow: 0 0 0 4px rgba(13,110,253,.30);
}
.judge-mode .jt-scale-legend {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: #6c757d;
  margin-top: .4rem;
  padding: 0 .1rem;
}

.judge-mode .jt-comment { font-size: 1.1rem; }

/* ステップ式（1項目ずつ大きく表示） */
.judge-mode .jt-stepbar {
  font-size: 1.2rem; font-weight: 800; color: #0d6efd;
  text-align: center; margin-bottom: .8rem;
}
.judge-mode .jt-step {
  display: none;
  background: #fff; border: 1px solid #dee2e6; border-radius: 14px;
  padding: 1.4rem 1.2rem 1.6rem; margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  min-height: 46vh;
}
.judge-mode .jt-step.active { display: block; animation: jt-fade .18s ease; }
@keyframes jt-fade { from { opacity: .35; } to { opacity: 1; } }
.judge-mode .jt-readonly .jt-step { display: block; min-height: 0; }
.judge-mode .jt-step.unfilled { border-left: 6px solid #ffc107; }
.judge-mode .jt-step-index { font-size: 1rem; color: #6c757d; margin-bottom: .5rem; }
.judge-mode .jt-step .jt-item-name { font-size: 1.6rem; }
.judge-mode .jt-step .jt-item-desc { font-size: 1.12rem; }
.judge-mode .jt-step .jt-scale { margin-top: 1.1rem; }
.judge-mode .jt-step .jt-scale .score-btn { height: 76px; font-size: 2rem; }

/* 操作ボタン: 普通の1スクロール（固定せず、内容の最後に大きく配置） */
.judge-mode .jt-actions {
  padding: 1rem 0 1.4rem;
  margin-top: 1rem;
  display: grid;
  gap: .7rem;
  border-top: 1px solid #dee2e6;
}
.judge-mode .jt-btn { font-size: 1.3rem; padding: .8rem 1rem; border-radius: 12px; }
.judge-mode .jt-progress { text-align: center; font-size: 1.05rem; color: #495057; }

/* チーム一覧・イベント一覧のタップ項目を大きく */
.judge-mode .list-group-item { font-size: 1.1rem; padding: 1.1rem 1rem; }
.judge-mode .list-group-item .fw-bold { font-size: 1.35rem; }
.judge-mode .badge.fs-6 { font-size: 1.05rem !important; padding: .5rem .7rem; }

/* 欠席チームの行: 背景グレー・グレーアウトして押せない（一覧には残す） */
.team-row.team-absent {
  background-color: #e9ecef !important;
  color: #868e96 !important;
  pointer-events: none;
  cursor: default;
}
.team-row.team-absent .code-chip { filter: grayscale(1); opacity: .75; }
.team-row.team-absent .fw-bold,
.team-row.team-absent .text-truncate { color: #868e96 !important; }

/* 自動更新ボタンのぐるぐる回転（オンの間だけ回す） */
@keyframes ar-spin { to { transform: rotate(360deg); } }
#autoRefreshBtn .ar-icon { display: block; }
#autoRefreshBtn.ar-spinning .ar-icon { animation: ar-spin 1.2s linear infinite; }

/* 発表番号コードバッジ（管理者と同じ配色: 学生=シアン / 企業=オレンジ） */
.code-chip { display: inline-block; font-weight: 700; padding: .1em .55em; border-radius: .35em; line-height: 1.25; }
.code-chip-student { background: #cff4fc; color: #055160; }
.code-chip-company { background: #ffe5d0; color: #8a3b00; }
.code-chip.chip-sm { font-size: .8rem; padding: .05em .4em; }
/* 発表順の通し番号（コードの左に表示） */
.seq-order { display: inline-flex; align-items: center; justify-content: center;
             min-width: 1.9em; height: 1.9em; padding: 0 .35em; border-radius: 50%;
             background: #e9ecef; color: #495057; font-weight: 700; font-size: .95rem; line-height: 1; }
.seq-order.seq-order-sm { min-width: 1.7em; height: 1.7em; font-size: .8rem; }

/* 受賞した賞バッジ（一覧に小さく表示。2件なら col-6 で1行2列） */
.award-badge { background: #fff3cd; color: #664d03; font-weight: 600; font-size: .8rem; }
.judge-mode .award-badge { font-size: .95rem; }

/* チーム一覧の折り畳み（コンパクト）表示 */
/* team-full は .d-flex(display:flex!important) を持つため、隠す側も !important で上書き */
.team-compact { display: none; }
#teamList.compact .team-full { display: none !important; }
#teamList.compact .team-compact { display: flex; line-height: 1.15; }

/* 得点順の基準で、表示する点数を片方だけにする（発表順では両方表示） */
#teamList.score-personal .ov-score { display: none; }
#teamList.score-overall .my-score { display: none; }
/* 簡易表示は既定で個人のみ。全体基準のときだけ全体に切替 */
#teamList.compact .team-compact .ov-score { display: none; }
#teamList.compact.score-overall .team-compact .ov-score { display: inline; }
/* 簡易モードは行間を詰めて1画面の情報量を増やす */
#teamList.compact .list-group-item { padding-top: .12rem; padding-bottom: .12rem; }
.judge-mode #teamList.compact .list-group-item { font-size: 1rem; }
.judge-mode #teamList.compact .list-group-item .fw-bold { font-size: 1.05rem; }

/* 一覧ツールバー（全部/学生/企業・発表順/得点順・折り畳み）を1行に収める */
.judge-toolbar .btn { font-size: .85rem; padding: .3rem .5rem; white-space: nowrap; }
.judge-mode .judge-toolbar .btn { font-size: .9rem; }

/* 省略モードのステータス短縮バッジ（[締] など） */
.status-mini { font-size: .8rem; padding: .15em .45em; }
.judge-mode .status-mini { font-size: .9rem; }

/* ---- スマホ向け微調整 ---- */
@media (max-width: 576px) {
  :root { --score-btn-size: 52px; }
  .team-banner .team-name { font-size: 1.1rem; }
  .judge-mode .jt-scale .score-btn { height: 60px; font-size: 1.5rem; }
  .judge-mode .jt-item-name { font-size: 1.3rem; }
}

/* ---- 画面切替前のカウントダウン演出（本番モードへの切替など） ---- */
.pitch-countdown {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #21314f 0%, #16233b 100%);
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  animation: pc-fade .3s ease;
}
@keyframes pc-fade { from { opacity: 0; } to { opacity: 1; } }
.pitch-countdown .pc-inner { max-width: 90vw; }
.pitch-countdown .pc-msg {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.pitch-countdown .pc-num {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.pitch-countdown .pc-sub {
  margin-top: 1rem;
  font-size: 1.1rem;
  opacity: .85;
}
@media (max-width: 576px) {
  .pitch-countdown .pc-msg { font-size: 1.3rem; }
  .pitch-countdown .pc-num { font-size: 4.5rem; }
  .pitch-countdown .pc-sub { font-size: 1rem; }
}

/* ---- 通知トースト（件名を太字・枠線を赤で目立たせる）---- */
.toast.pitch-notify {
  border: 2px solid #dc3545;
  box-shadow: 0 .5rem 1rem rgba(220, 53, 69, .25);
}
.toast.pitch-notify .toast-header {
  background-color: #fdecef;
  border-bottom: 1px solid #f5c2c7;
}
.toast.pitch-notify .toast-header strong {
  font-weight: 800;          /* 件名を太文字に */
  color: #dc3545;
}

/* ---- 結果発表の所属（学校名・研究室名／会社名）---- */
.result-stage .winner-org {
  font-size: 1.4rem;
  color: #6c757d;
  margin-bottom: .25rem;
}

/* ---- ログイン記録（全アカウントの最終ログインを4色で色分け）----
   紺=ログイン中 / 薄い青=直近10分以内 / グレー=最終ログインあり / 白=未ログイン */
.lr-online td { background-color: #1a237e !important; color: #fff !important; }
.lr-online td .text-muted { color: #c5cae9 !important; }
.lr-online td a { color: #fff !important; }
.lr-recent td { background-color: #cfe2ff !important; }
.lr-has    td { background-color: #e9ecef !important; }
.lr-never  td { background-color: #ffffff !important; }
/* 凡例の色チップ */
.lr-chip { display: inline-block; width: 1rem; height: 1rem; border: 1px solid #ced4da;
           border-radius: 3px; vertical-align: -2px; margin-right: .25rem; }
.lr-chip.lr-c-online { background-color: #1a237e; }
.lr-chip.lr-c-recent { background-color: #cfe2ff; }
.lr-chip.lr-c-has    { background-color: #e9ecef; }
.lr-chip.lr-c-never  { background-color: #ffffff; }
