/* ===========================================================
   祝 還暦 ― 古関昌弘 還暦記念クイズ大会 2026
   想定：1920×1080 投影 / 司会PC専用
   テーマ：老舗料亭の祝事招待状（和紙 × 朱赤 × 金箔）
   =========================================================== */

:root {
  --bg: #FAF5EE;
  --bg-deep: #F3EBDC;
  --ink: #1A1A1A;
  --ink-sub: #4A4A4A;
  --red: #C8102E;
  --red-deep: #8B0000;
  --gold: #C9A45D;
  --gold-light: #E6C887;
  --accent-band: #F8E5D5;
  --shadow: 0 8px 32px rgba(26, 26, 26, 0.08);
  --shadow-card: 0 4px 16px rgba(139, 0, 0, 0.08);
  --serif: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', serif;
  --sans:  'Noto Sans JP', 'Yu Gothic', 'Hiragino Sans', sans-serif;
  --num:   'DM Serif Display', 'Cormorant', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  /* 微細な和紙ノイズ感 */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,164,93,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(200,16,46,0.04) 0%, transparent 50%);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

body { cursor: pointer; }

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ---------- 紅白幕（上下） ---------- */
.kohaku-band {
  position: fixed;
  left: 0;
  right: 0;
  height: 12px;
  z-index: 100;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0,
    var(--red) 80px,
    #FFFFFF 80px,
    #FFFFFF 160px
  );
  box-shadow: 0 2px 8px rgba(139,0,0,0.15);
}
.kohaku-top    { top: 0; }
.kohaku-bottom { bottom: 0; box-shadow: 0 -2px 8px rgba(139,0,0,0.15); }

/* ---------- 金粉レイヤー ---------- */
#kinpun-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}
.kinpun {
  position: absolute;
  background: radial-gradient(circle, var(--gold-light) 0%, var(--gold) 60%, transparent 100%);
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(0.4px);
  animation: kinpun-float linear forwards;
}
@keyframes kinpun-float {
  0%   { transform: translate(0, 0) rotate(0deg);          opacity: 0; }
  10%  { opacity: 0.55; }
  90%  { opacity: 0.55; }
  100% { transform: translate(-30vw, -110vh) rotate(360deg); opacity: 0; }
}

/* ---------- スクリーン共通 ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.screen.is-active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  animation: fadeRise 0.7s ease both;
}
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 共通 罫線（金細線） ---------- */
.top-rule, .q-rule {
  width: min(560px, 60vw);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  margin: 2.4vh 0;
  position: relative;
}
.top-rule::before, .q-rule::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
}

/* ---------- kbd ---------- */
kbd {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85em;
  padding: 0.1em 0.55em;
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--ink-sub);
  border: 1px solid var(--gold);
  box-shadow: 0 1px 0 rgba(201,164,93,0.3);
  margin: 0 0.15em;
}

/* ===========================================================
   料亭ボタン（朱赤 × 金縁）
   =========================================================== */
.ryotei-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  padding: 1em 3em;
  margin-top: 3vh;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  color: #FFFFFF;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  cursor: pointer;
  box-shadow:
    0 0 0 4px rgba(250,245,238,1),
    0 0 0 5px var(--gold),
    var(--shadow);
  font-family: var(--serif);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.ryotei-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.ryotei-btn:active { transform: translateY(1px); }
.ryotei-btn .btn-jp {
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}
.ryotei-btn .btn-en {
  font-family: var(--num);
  font-size: clamp(11px, 0.9vw, 14px);
  letter-spacing: 0.4em;
  opacity: 0.85;
  text-indent: 0.4em;
}
.ryotei-btn.small {
  padding: 0.7em 2em;
}
.ryotei-btn.small .btn-jp { font-size: clamp(18px, 1.6vw, 24px); }

.ghost-btn {
  margin-top: 1.5vh;
  padding: 0.45em 1.4em;
  background: transparent;
  color: var(--red-deep);
  border: 1px solid var(--red-deep);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.ghost-btn:hover {
  background: var(--red-deep);
  color: #FFFFFF;
}

/* ===========================================================
   TOPページ
   =========================================================== */
.screen-top { text-align: center; }
.top-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
}
.top-emblem {
  margin-bottom: 1vh;
}
.ensou {
  width: min(120px, 12vh);
  height: auto;
  animation: emblemFade 1.2s ease both;
}
@keyframes emblemFade {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.top-eyebrow {
  font-family: var(--num);
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--gold);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  margin-bottom: 1.5vh;
  text-transform: uppercase;
}

.top-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6vh;
  margin-bottom: 1vh;
}
.top-kanji {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(64px, 8vw, 130px);
  color: var(--red-deep);
  line-height: 1;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  word-break: keep-all;
}
.top-en {
  font-family: var(--num);
  font-size: clamp(72px, 9vw, 140px);
  color: var(--gold);
  line-height: 1;
}
.top-en .th {
  font-family: var(--num);
  font-size: 0.4em;
  vertical-align: super;
  color: var(--gold);
}

.top-subtitle {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 38px);
  color: var(--ink);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  word-break: keep-all;
  margin-top: 0.8vh;
}
.top-date {
  font-family: var(--num);
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--ink-sub);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  margin-top: 0.6vh;
}

/* ヒーロー画像（kanreki_hero.png）／全画面共通 */
.hero-portrait {
  display: block;
  width: clamp(200px, 40vw, 480px);
  max-height: 60vh;
  height: auto;
  object-fit: contain;
  margin: 2rem auto 1rem;
  animation: emblemFade 1.4s ease 0.3s both, gentleFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 6px 20px rgba(139,0,0,0.12));
}
.hero-portrait.small {
  width: clamp(120px, 22vw, 260px);
  max-height: 32vh;
  margin: 1rem auto 0.6rem;
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.top-howto {
  margin-top: 2.5vh;
  font-size: clamp(12px, 1vw, 15px);
  color: var(--ink-sub);
  letter-spacing: 0.05em;
}

/* ===========================================================
   出題画面
   =========================================================== */
.screen-question {
  justify-content: flex-start;
  padding: 6vh 6vw 4vh;
}
.q-header {
  width: 100%;
  max-width: 1500px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2vw;
  padding-bottom: 2vh;
  border-bottom: 1px solid var(--gold);
  margin-bottom: 3vh;
}
.q-no {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--ink-sub);
  letter-spacing: 0.1em;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}
.q-no-kanji {
  font-size: clamp(24px, 2.2vw, 36px);
  color: var(--red-deep);
  font-weight: 900;
}
.q-no-sep { color: var(--gold); }
.q-category {
  justify-self: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 26px);
  color: var(--red-deep);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  padding: 0.3em 1.4em;
  border-top:    1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  white-space: nowrap;
}
.q-category em {
  font-style: normal;
  font-size: 0.7em;
  color: var(--gold);
  margin-left: 0.5em;
  letter-spacing: 0.1em;
}
.q-timer {
  position: relative;
  width: clamp(96px, 11vh, 140px);
  height: clamp(96px, 11vh, 140px);
  justify-self: end;
}
.timer-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring-bg {
  fill: none;
  stroke: rgba(201,164,93,0.2);
  stroke-width: 4;
}
.timer-ring-fg {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.q-timer.warn .timer-ring-fg { stroke: var(--red); }
.q-timer.warn .timer-num     { color: var(--red); }
.timer-num {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--num);
  font-size: clamp(32px, 4.4vh, 56px);
  color: var(--ink);
}

.q-body {
  flex: 1;
  width: 100%;
  max-width: 1500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3vh;
}
.q-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  word-break: keep-all;
  line-break: strict;
  letter-spacing: 0.08em;
  padding: 0 1em;
  max-width: 1400px;
}
.q-choices {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2vh 2.4vw;
  width: 100%;
  max-width: 1400px;
}
.q-choices li {
  background: #FFFFFF;
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 1em 1.4em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 36px);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.8em;
  box-shadow: var(--shadow-card);
  word-break: keep-all;
  animation: choiceRise 0.6s ease both;
  letter-spacing: 0.05em;
}
.q-choices li:nth-child(1) { animation-delay: 0.10s; }
.q-choices li:nth-child(2) { animation-delay: 0.20s; }
.q-choices li:nth-child(3) { animation-delay: 0.30s; }
.q-choices li:nth-child(4) { animation-delay: 0.40s; }
@keyframes choiceRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.q-choices .num {
  width: 1.7em; height: 1.7em;
  border-radius: 50%;
  background: var(--bg);
  color: var(--red-deep);
  border: 1px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--num);
  font-size: 0.85em;
  flex-shrink: 0;
}

.q-narration {
  font-family: var(--serif);
  font-style: normal;
  font-size: clamp(16px, 1.4vw, 22px);
  color: var(--ink-sub);
  text-align: center;
  max-width: 1100px;
  line-height: 1.7;
  letter-spacing: 0.08em;
}

.q-footer {
  position: absolute;
  bottom: 3vh;
  font-size: clamp(11px, 0.9vw, 14px);
  color: var(--ink-sub);
  letter-spacing: 0.1em;
}
.q-footer.dark { color: rgba(255,255,255,0.85); }

/* ===========================================================
   正解発表
   =========================================================== */
.screen-answer {
  background:
    radial-gradient(ellipse at top, rgba(248,229,213,0.4) 0%, transparent 70%),
    var(--bg);
  padding: 6vh 5vw 4vh;
}
.ans-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;
  max-width: 1300px;
  text-align: center;
}
.ans-seal {
  width: min(180px, 18vh);
  animation: sealStamp 0.7s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
.ans-seal svg { width: 100%; height: auto; }
@keyframes sealStamp {
  0%   { opacity: 0; transform: scale(0.4) rotate(-15deg); }
  60%  { opacity: 1; transform: scale(1.1) rotate(0deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.ans-label {
  font-family: var(--serif);
  font-weight: 900;
  color: var(--red-deep);
  display: flex;
  align-items: center;
  gap: 0.4em;
  animation: ansLabelIn 0.8s ease 0.2s both;
}
.ans-label-jp {
  font-size: clamp(50px, 6vw, 100px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}
.ans-label-mark {
  font-size: clamp(50px, 6vw, 100px);
  color: var(--gold);
}
@keyframes ansLabelIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ans-question {
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 28px);
  color: var(--ink-sub);
  max-width: 1100px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  padding: 0 1em;
  word-break: keep-all;
}
.ans-text {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 88px);
  color: var(--red-deep);
  padding: 0.4em 1.6em;
  border-top:    2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  word-break: keep-all;
  animation: ansTextReveal 1s ease 0.4s both;
  max-width: 90vw;
}
@keyframes ansTextReveal {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.ans-correct-no {
  font-family: var(--num);
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--gold);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}
.ans-narration {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 26px);
  color: var(--ink);
  background: rgba(255,255,255,0.6);
  padding: 1.4em 1.8em 1.4em 1.8em;
  border-radius: 4px;
  border-left: 3px solid var(--gold);
  max-width: 1100px;
  width: min(1100px, 92vw);
  line-height: 1.85;
  letter-spacing: 0.06em;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  text-align: left;
  box-sizing: border-box;
}

/* ===========================================================
   結果画面
   =========================================================== */
.screen-result {
  padding: 6vh 5vw 5vh;
}
.result-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1300px;
  width: 100%;
}
.result-eyebrow {
  font-family: var(--num);
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--gold);
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  margin-bottom: 2vh;
}
.result-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 4.4vw, 76px);
  color: var(--red-deep);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  line-height: 1.4;
  word-break: keep-all;
}
.result-lead {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 26px);
  color: var(--ink-sub);
  letter-spacing: 0.1em;
  margin-bottom: 3vh;
  word-break: keep-all;
}
.winners-grid {
  width: 100%;
  max-width: min(1200px, 92vw);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4vh 1.6vw;
  margin-bottom: 3vh;
  margin-left: auto;
  margin-right: auto;
}
.winner-slot {
  background: #FFFFFF;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0.7em 1em;
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 22px);
  box-shadow: var(--shadow-card);
}
.winner-slot .winner-no {
  font-family: var(--num);
  color: var(--red-deep);
  width: 1.8em;
  text-align: center;
  border-right: 1px solid var(--gold);
  padding-right: 0.4em;
  font-size: 1.1em;
}
.winner-slot input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
  outline: none;
  padding: 0.2em 0.4em;
  min-width: 0;
}
.winner-slot input::placeholder {
  color: #BBB;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.result-actions {
  display: flex;
  gap: 1.5vw;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.result-thanks {
  margin-top: 3vh;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 2vw, 34px);
  color: var(--red-deep);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  word-break: keep-all;
}

/* ===========================================================
   写真クイズ枠
   =========================================================== */
.q-photo {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
}
.q-photo img {
  max-width: 100%;
  max-height: 38vh;
  border-radius: 4px;
  border: 1px solid var(--gold);
  box-shadow: var(--shadow-card);
  background: #FFF;
  object-fit: contain;
}
.q-photo .photo-missing {
  background: #FFF;
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 1em 1.4em;
  color: var(--ink-sub);
  font-family: var(--serif);
  font-size: clamp(14px, 1.2vw, 18px);
  text-align: center;
  max-width: 700px;
}
.q-photo .photo-missing small {
  display: block;
  margin-top: 0.4em;
  font-size: 0.8em;
  color: #999;
}

/* ナレーションON badge */
#narration-badge.on { color: var(--gold); }
.ghost-btn.on {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===========================================================
   全要素 文字溢れ防止（共通強化）
   =========================================================== */
* { line-break: strict; }
.q-text, .ans-question, .ans-text, .ans-narration,
.q-narration, .top-subtitle, .top-kanji,
.result-title, .result-lead, .result-thanks,
.q-choices li {
  overflow-wrap: break-word;
  word-break: keep-all;
  line-break: strict;
  padding-right: 0.4em;
}
html, body { overflow: auto; }
#app { overflow: auto; }

/* ===========================================================
   レスポンシブ 4段階 break point
   =========================================================== */

/* タブレット ~1024px */
@media (max-width: 1024px) {
  .q-header { gap: 1.5vw; padding-bottom: 1.5vh; margin-bottom: 2vh; }
  .q-choices { grid-template-columns: 1fr 1fr; gap: 1.6vh 1.6vw; }
  .q-choices li { padding: 0.9em 1.1em; font-size: clamp(18px, 2vw, 28px); }
  .q-text { font-size: clamp(28px, 3.4vw, 48px); padding: 0 0.6em; }
  .ans-text { font-size: clamp(34px, 4.6vw, 64px); padding: 0.4em 1.2em; }
  .winners-grid { grid-template-columns: 1fr 1fr 1fr; }
  .hero-portrait { width: clamp(180px, 38vw, 360px); max-height: 44vh; }
}

/* タブレット縦 / 中型スマホ ~768px */
@media (max-width: 768px) {
  .screen { padding: 4vh 4vw; }
  .screen-question { padding: 5vh 4vw 3vh; }
  .q-header {
    grid-template-columns: 1fr auto;
    gap: 1vh 3vw;
    padding-bottom: 1.2vh;
    margin-bottom: 1.8vh;
  }
  .q-no { grid-column: 1; }
  .q-category { grid-column: 1 / -1; justify-self: start; font-size: 16px; padding: 0.2em 1em; }
  .q-timer { grid-column: 2; grid-row: 1; width: 80px; height: 80px; }
  .q-choices { grid-template-columns: 1fr; gap: 1.2vh; }
  .q-choices li { font-size: 18px; padding: 0.9em 1em; }
  .winners-grid { grid-template-columns: 1fr 1fr; }
  .top-kanji { font-size: clamp(48px, 12vw, 72px); }
  .top-en { font-size: clamp(54px, 14vw, 80px); }
  .top-subtitle { font-size: clamp(18px, 4vw, 26px); letter-spacing: 0.1em; }
  .q-text { font-size: clamp(22px, 4.6vw, 32px); padding: 0 0.4em; line-height: 1.55; }
  .ans-text { font-size: clamp(28px, 6vw, 44px); padding: 0.35em 1em; }
  .ans-label-jp, .ans-label-mark { font-size: clamp(36px, 8vw, 56px); }
  .ans-question { font-size: clamp(16px, 3.4vw, 22px); }
  .ans-narration { font-size: clamp(15px, 3.4vw, 20px); padding: 1em 1.2em; }
  .result-title { font-size: clamp(32px, 7.6vw, 54px); }
  .result-thanks { font-size: clamp(18px, 4.4vw, 28px); }
  .hero-portrait { width: clamp(160px, 60vw, 320px); max-height: 36vh; margin: 1.2rem auto 0.6rem; }
  .ryotei-btn { padding: 0.9em 2.4em; }
  .ryotei-btn .btn-jp { font-size: clamp(20px, 5vw, 28px); letter-spacing: 0.25em; }
  kbd { font-size: 11px; }
}

/* スマホ ~480px（vote主用途） */
@media (max-width: 480px) {
  .screen { padding: 3vh 3vw; }
  .top-eyebrow { font-size: 11px; letter-spacing: 0.3em; }
  .top-kanji { font-size: clamp(42px, 14vw, 60px); letter-spacing: 0.1em; }
  .top-en { font-size: clamp(48px, 16vw, 68px); }
  .top-subtitle { font-size: clamp(16px, 4.4vw, 22px); }
  .top-date { font-size: 11px; }
  .q-text { font-size: clamp(20px, 5.4vw, 26px); padding: 0 0.3em; }
  .q-choices li { font-size: 16px; padding: 0.8em 0.9em; }
  .q-choices .num { width: 1.5em; height: 1.5em; font-size: 0.8em; }
  .ans-text { font-size: clamp(24px, 7vw, 36px); letter-spacing: 0.1em; padding: 0.3em 0.8em; }
  .ans-label-jp, .ans-label-mark { font-size: clamp(32px, 9vw, 44px); }
  .ans-question { font-size: clamp(14px, 3.6vw, 18px); }
  .ans-narration { font-size: clamp(14px, 3.6vw, 18px); padding: 0.9em 1em; line-height: 1.75; }
  .result-title { font-size: clamp(28px, 8vw, 42px); letter-spacing: 0.1em; }
  .result-lead { font-size: clamp(14px, 4vw, 18px); }
  .winners-grid { grid-template-columns: 1fr; gap: 0.8vh; }
  .q-timer { width: 64px; height: 64px; }
  .timer-num { font-size: 24px; }
  .hero-portrait { width: clamp(140px, 70vw, 260px); max-height: 30vh; }
  .top-howto { font-size: 10px; }
  .kohaku-band { height: 8px; }
}

/* 投影 1920px+（最終確認） */
@media (min-width: 1920px) {
  .q-text { font-size: clamp(48px, 4vw, 72px); }
  .q-choices li { font-size: clamp(28px, 2.2vw, 40px); padding: 1.2em 1.6em; }
  .ans-text { font-size: clamp(56px, 5vw, 96px); }
  .hero-portrait { width: clamp(280px, 28vw, 540px); }
}

@media print { body { display: none; } }

/* ===== PATCH 8: カテゴリ非表示+文字溢れ修正 ===== */
.q-category, .qcat, #q-category { display: none !important; }
.q-text, .qtext, .problem-text, #q-problem, .ans-question, .ans-narration {
  max-width: min(92vw, 1100px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(1rem, 3vw, 3rem) !important;
  padding-right: clamp(1rem, 3vw, 3rem) !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  line-break: strict !important;
  box-sizing: border-box !important;
}
.q-text, .qtext, .problem-text, #q-problem {
  font-size: clamp(1.4rem, 3vw, 3.4rem) !important;
  line-height: 1.55 !important;
}

/* ===== PATCH 10: 横スクロール禁止+レスポンシブ強化 ===== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}
* { max-width: 100% !important; box-sizing: border-box !important; }
.hero-portrait, .hero-img, img.kanreki, img[src*="kanreki"] {
  max-width: min(320px, 28vw) !important;
  max-height: 40vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 1rem auto !important;
}
.top-title, h1, .h-jukanreki, .title-main {
  font-size: clamp(2rem, 6vw, 5rem) !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  line-height: 1.3 !important;
  padding: 0 1rem !important;
  max-width: 92vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.winners-grid {
  width: 92vw !important;
  max-width: 1100px !important;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 28vw), 1fr)) !important;
}
section, .screen, main {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* ===========================================================
   PATCH 15: スライドショー（TOP小・結果大）
   - フェード遷移3秒切替
   - 既存の img[src*="kanreki"] 一括縮小ルールを枠内で上書き
   =========================================================== */

/* TOP サブスライドショー（ヒーロー下・小さく） */
.sub-hero-slideshow {
  position: relative;
  width: clamp(180px, 28vw, 280px);
  height: clamp(140px, 22vh, 200px);
  margin: 1rem auto 1.2rem;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(139,0,0,0.10);
  border: 1px solid var(--gold);
  background: #FFFCF7;
}
.sub-hero-slideshow img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  margin: 0 !important;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
}
.sub-hero-slideshow img.is-active {
  opacity: 1 !important;
  z-index: 2;
}

/* 結果発表 大スライドショー（中央・大きく） */
.finale-slideshow {
  position: relative;
  width: min(800px, 92vw);
  height: clamp(280px, 60vh, 600px);
  margin: 2.5vh auto 2vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(139,0,0,0.15);
  border: 2px solid var(--gold);
  background: #FFFCF7;
}
.finale-slideshow img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  margin: 0 !important;
  opacity: 0;
  transition: opacity 1.1s ease-in-out;
  background: #FFFCF7;
}
.finale-slideshow img.is-active {
  opacity: 1 !important;
  z-index: 2;
}
