:root {
  color-scheme: light;
  --bg: #111318;
  --bg2: #1a2028;
  --panel: #f7f1e4;
  --paper: #fffaf0;
  --ink: #1a1c20;
  --muted: #6c7280;
  --line: #d7c7a9;
  --gold: #c99a42;
  --rose: #b95d6c;
  --teal: #237b78;
  --green: #3f8f69;
  --blue: #486e9f;
  --danger: #b84d4d;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(201, 154, 66, 0.22), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(35, 123, 120, 0.2), transparent 26%),
    linear-gradient(145deg, var(--bg), #273036 54%, #3a2630);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

/* ── Display typography ── */
h1, h2, h3,
.welcome-title,
.landing-copy h2,
.role-card strong {
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  letter-spacing: -0.01em;
}

.eyebrow-label, .topbar .eyebrow {
  font-family: 'Josefin Sans', system-ui, sans-serif;
  letter-spacing: 0.14em;
}

/* ── Gold shimmer animation ── */
@keyframes goldShimmer {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

@keyframes maskFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-12px) rotate(1deg); }
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.app.projector-app,
.app:has(.projector-shell) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.landing {
  display: grid;
  gap: 18px;
}

.landing-hero {
  min-height: calc(100vh - 210px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.landing-copy {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-height: 540px;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid rgba(180, 192, 210, 0.22);
  border-radius: 8px;
  color: #f0f2f6;
  background: linear-gradient(150deg, #07070c 0%, #0c0c14 55%, #060a10 100%);
  box-shadow: 0 32px 100px rgba(0,0,0,0.65), 0 0 0 1px rgba(180,192,210,0.1);
}

/* left-side gradient: protects text legibility against the photo on the right */
.landing-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(7,7,12,1) 0%,
    rgba(7,7,12,0.92) 40%,
    rgba(7,7,12,0.35) 65%,
    rgba(7,7,12,0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* subtle inner frame line */
.landing-copy::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(180, 192, 210, 0.12);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

/* text content above gradient */
.landing-copy > * {
  position: relative;
  z-index: 3;
}

/* ── 仮面写真スライドショー ── */
.hero-mask-slideshow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 62%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-mask-photo.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% center;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-mask-photo.slide.active {
  opacity: 1;
}

.hero-mask-dots {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.mask-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(220, 225, 235, 0.28);
  transition: background 0.5s;
}

.mask-dot.active {
  background: rgba(220, 225, 235, 0.9);
}

.landing-copy h2 {
  max-width: 800px;
  margin-bottom: 18px;
  font-size: clamp(36px, 6.5vw, 80px);
  font-weight: 700;
  line-height: 1.08;
  color: #eef0f5;
  text-shadow: 0 2px 40px rgba(180,192,220,0.2);
}

.landing-copy .lead {
  max-width: 720px;
  color: rgba(255, 250, 240, 0.86);
  font-size: 18px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(620px, 100%);
  margin-top: 28px;
}

.hero-stats div {
  min-height: 88px;
  padding: 12px;
  border: 1px solid rgba(255, 250, 240, 0.26);
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.52);
}

.hero-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: var(--gold);
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 250, 240, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.role-board {
  display: grid;
  gap: 12px;
}

.role-card {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 170px;
  padding: 26px 24px;
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.5) inset;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.role-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

.role-card strong {
  display: block;
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 1.15;
  font-weight: 700;
}

.role-card small {
  color: #37414a;
  font-size: 14px;
  line-height: 1.6;
}

.role-kicker {
  font-family: 'Josefin Sans', system-ui, sans-serif;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.host-role {
  background: linear-gradient(140deg, #fffaf0 0%, #fff4d6 60%, #ffeeb0 100%);
  border-color: rgba(201, 154, 66, 0.5);
}

.player-role {
  background: linear-gradient(140deg, #f0faf7 0%, #ddf4ee 60%, #c8ede5 100%);
  border-color: rgba(35, 123, 120, 0.4);
}

.profile-role {
  background: linear-gradient(140deg, #fdf0f3 0%, #f9dfe6 60%, #f0cad5 100%);
  border-color: rgba(185, 93, 108, 0.35);
}

.partylist-role {
  background: linear-gradient(140deg, #f0f3fa 0%, #dde4f4 60%, #cad3ec 100%);
  border-color: rgba(72, 110, 159, 0.35);
}

.game-guide-role {
  background: linear-gradient(140deg, #f4fbfb 0%, #d9eeee 58%, #f4e6c8 100%);
  border-color: rgba(35, 123, 120, 0.35);
}

.diagnosis-results-role {
  background: linear-gradient(140deg, #fff8ed 0%, #f8e5c5 56%, #e8cf9f 100%);
  border-color: rgba(174, 113, 38, 0.42);
}

.role-card:hover,
.role-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 56px rgba(0,0,0,0.28), 0 0 0 2px rgba(201,154,66,0.45), 0 1px 0 rgba(255,255,255,0.5) inset;
  border-color: rgba(201,154,66,0.55);
  outline: none;
}

.landing-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.landing-flow div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px 14px;
  align-items: start;
  min-height: 118px;
  padding: 20px 18px;
  border: 1px solid rgba(201, 154, 66, 0.22);
  border-radius: 10px;
  background: rgba(247, 241, 228, 0.97);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-flow div:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.15);
}

.landing-flow span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1208, #2a1e08);
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(201,154,66,0.4);
}

.landing-flow strong {
  font-size: 17px;
}

.landing-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.shell {
  display: grid;
  gap: 16px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fffaf0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 250, 240, 0.42);
  border-radius: 8px;
  color: var(--gold);
  font-weight: 900;
}

.eyebrow, .label {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(26px, 5vw, 44px); line-height: 1; }
h2 { margin-bottom: 10px; font-size: clamp(24px, 4vw, 38px); line-height: 1.12; }
h3 { margin-bottom: 8px; }

.status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  max-width: min(420px, 100%);
  padding: 8px 12px;
  border: 1px solid rgba(255, 250, 240, 0.36);
  border-radius: 999px;
  color: #fffaf0;
  font-size: 12px;
  font-weight: 900;
}

.status-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.2;
}

.status-text strong,
.status-text small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-text small {
  color: rgba(255, 250, 240, 0.74);
  font-size: 11px;
}

.topbar-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.topbar-button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(255, 250, 240, 0.36);
  background: transparent;
  color: #fffaf0;
  font-size: 12px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
}
.dot.ok { background: var(--green); }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  align-items: start;
}

.panel, .hero, .card {
  background: var(--panel);
  border: 1px solid rgba(255, 250, 240, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero { padding: clamp(20px, 5vw, 44px); min-height: 420px; display: grid; align-content: center; }
.panel { padding: 18px; }
.card { padding: 16px; background: var(--paper); box-shadow: none; border-color: var(--line); }

.lead {
  color: #39424c;
  line-height: 1.75;
  font-size: 16px;
  max-width: 720px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.auth-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.74);
  color: var(--ink);
}

.auth-box.compact {
  max-width: 390px;
  margin-top: 14px;
  margin-bottom: 0;
  background: rgba(255, 250, 240, 0.9);
}

.auth-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-weight: 900;
}

.auth-actions {
  display: grid;
  gap: 8px;
}

.room-history {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.room-history-list {
  display: grid;
  gap: 8px;
}

.room-history-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.room-history-item strong {
  grid-row: span 2;
  color: var(--teal);
  font-size: 18px;
}

.room-history-item span {
  font-weight: 900;
}

.room-history-item small {
  color: var(--muted);
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  text-align: center;
  overflow-wrap: anywhere;
}

.button.primary { border-color: var(--teal); background: var(--teal); color: white; }
.button.gold { border-color: var(--gold); background: var(--gold); color: #201914; }
.button.danger { border-color: var(--danger); background: var(--danger); color: white; }
.button.auth-button {
  cursor: pointer;
  transition: transform .08s ease, filter .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.button.auth-button:active {
  transform: translateY(1px) scale(.99);
  filter: brightness(.92);
}
.button.google-auth-button {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #fff;
  box-shadow: 0 6px 14px rgba(26,115,232,.22);
}
.button.google-auth-button:hover {
  background: #1765cc;
  border-color: #1765cc;
}
.button.apple-auth-button {
  border-color: #111318;
  background: #111318;
  color: #fff;
  box-shadow: 0 6px 14px rgba(17,19,24,.22);
}
.button.apple-auth-button:hover {
  background: #000;
  border-color: #000;
}
.button.anonymous-auth-button {
  border-color: #8a7a5d;
  background: #f7efe0;
  color: #201914;
}
.button.anonymous-auth-button:hover {
  background: #efe1c8;
}
.button.auth-pending,
.button.google-auth-button.auth-pending,
.button.apple-auth-button.auth-pending,
.button.anonymous-auth-button.auth-pending {
  border-color: #8a7a5d !important;
  background: #b8aa8a !important;
  color: #201914 !important;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.18) !important;
  cursor: progress !important;
}
.button:disabled {
  border-color: #d8c9ae;
  background: #efe6d6;
  color: #6b6255;
  opacity: 1;
  cursor: not-allowed;
}
.button.primary:disabled,
.button.gold:disabled,
.button.danger:disabled {
  border-color: #d8c9ae;
  background: #efe6d6;
  color: #6b6255;
}
.button.full { width: 100%; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span { color: var(--muted); font-size: 13px; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
}
.field textarea { min-height: 86px; resize: vertical; }
.field-note { color: var(--muted); font-size: 12px; font-weight: 400; margin-top: -2px; }

.menu-list, .stack { display: grid; gap: 12px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.section-head > span:not(.phase-badge) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.party-program,
.party-activity,
.party-guide {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

aside.panel > .party-program {
  margin: 10px 0 14px;
}

.program-list,
.activity-list {
  display: grid;
  gap: 8px;
}

.program-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.program-item:disabled {
  cursor: default;
}

.program-item.inactive {
  opacity: 0.48;
  background: rgba(255, 250, 240, 0.5);
}

.program-item.inactive .program-num {
  background: #d8cbb3;
  color: #6d6251;
}

.program-item.clickable {
  cursor: pointer;
}

.program-item.clickable:hover {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.program-item.active {
  border-color: var(--teal);
  background: #e6f3ee;
  box-shadow: inset 3px 0 0 var(--teal);
}

.program-item.done {
  background: #f3ead8;
}

.host-mask-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.host-mask-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(160px, 2fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 250, 240, 0.72);
}

.host-mask-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.host-mask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.host-mask-chips span {
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal);
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(230, 243, 238, 0.9);
}

.muted {
  color: var(--muted);
}

.program-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #201914;
  font-size: 12px;
  font-weight: 900;
}

.program-item strong,
.program-item small {
  display: block;
}

.program-item small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.program-children {
  display: block;
  margin-top: 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.program-child-button,
.program-child-label {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid rgba(31, 133, 128, 0.35);
  border-radius: 6px;
  background: rgba(31, 133, 128, 0.08);
  color: var(--teal);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  padding: 6px 8px;
  text-align: left;
}

.program-child-button.active,
.program-child-label.active {
  background: rgba(31, 133, 128, 0.2);
  border-color: var(--teal);
  color: var(--ink);
}

.survey-title-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 18px;
}

.survey-title-list span {
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: rgba(31, 133, 128, 0.1);
  color: var(--teal);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  padding: 8px 14px;
}

.projector-shell .survey-title-list span {
  font-size: clamp(24px, 3vw, 44px);
  padding: 12px 22px;
}

.activity-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.activity-row:hover {
  border-color: var(--teal);
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.4;
}

.activity-row time {
  justify-self: end;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.participant-name {
  font-weight: 900;
}

.participant-name-female {
  color: #d94f8c;
}

.participant-name-male {
  color: #1598d3;
}

.uid-line,
.uid-code,
.attendance-uid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.uid-code {
  font-size: 0.92em;
}

[data-host-participant-uid] { cursor: context-menu; }

.button.compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.admin-edit-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: rgba(228, 246, 239, .72);
  display: grid;
  gap: 10px;
}

.admin-mini-edit {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.admin-survey-edit {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.admin-survey-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.admin-survey-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-survey-main {
  display: grid;
  gap: 8px;
}

.admin-survey-main strong {
  font-size: 13px;
  line-height: 1.5;
}

.admin-survey-main select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.admin-danger-zone {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-danger-zone small {
  color: var(--muted);
  line-height: 1.6;
}

.admin-mini-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-mini-row small {
  display: block;
  color: var(--muted);
}

.admin-mini-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-check-card {
  width: 100%;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 14px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: rgba(255, 250, 240, .94);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.profile-check-card:hover {
  border-color: var(--gold);
}

.profile-check-card strong {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
}

.profile-check-card span:not(.label),
.profile-check-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.profile-check-card em {
  justify-self: start;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 133, 128, .12);
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.skip-context-menu {
  position: fixed;
  z-index: 200;
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}
.skip-context-menu .label { margin: 0 0 4px; }
.skip-context-menu button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}
.skip-context-menu button:hover { border-color: var(--danger); color: var(--danger); }

.guide-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.guide-card h3 {
  margin-bottom: 8px;
}

.guide-card p,
.guide-card li {
  color: #39424c;
  line-height: 1.65;
}

.guide-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.game-option {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-align: left;
}
.game-option.active { border-color: var(--teal); background: #e6f3ee; }

.participant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.participant-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.participant-card:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(18, 33, 39, 0.12);
  transform: translateY(-1px);
}

.participant-card h3 { margin: 0 0 4px; font-size: 16px; }
.participant-card p { margin: 0 0 6px; color: #3a424c; line-height: 1.45; }
.participant-card small { color: var(--muted); }

.intro-section-title {
  font-size: clamp(22px, 2.4vw, 34px);
  margin-bottom: 8px;
}

.attendance-board {
  margin: 0 0 16px;
  padding: 18px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: rgba(228, 246, 239, .86);
}

.attendance-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1;
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.attendance-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
}

.attendance-card[data-attendance-request-uid] { cursor: pointer; }
.attendance-card[data-attendance-request-uid]:hover { border-color: var(--gold); }
.attendance-card.calling {
  border-color: #c14d4d;
  background: #fff0ee;
  box-shadow: 0 0 0 3px rgba(193, 77, 77, .18);
}
.attendance-card.answered {
  border-color: var(--teal);
  background: #e2f3ec;
}

.attendance-name {
  font-size: clamp(26px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.1;
}

.attendance-uid {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.attendance-reply {
  color: var(--muted);
  font-size: clamp(20px, 3vw, 42px);
  font-weight: 800;
}

.attendance-card.answered .attendance-reply { color: #0b6b5f; }
.attendance-card.calling .attendance-reply { color: #a03434; }

.attendance-prompt {
  margin-bottom: 16px;
  padding: 18px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: #e2f3ec;
}

.attendance-prompt.answered {
  border-color: var(--gold);
  background: #fff4d6;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.participant-spotlight {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(17, 19, 24, 0.74);
  backdrop-filter: blur(7px);
}

.participant-spotlight-page {
  position: relative;
  display: grid;
  align-content: center;
  gap: clamp(18px, 3vw, 30px);
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 48px));
  padding: clamp(24px, 5vw, 64px);
  border: 1px solid rgba(255, 250, 240, 0.82);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
}

.spotlight-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.spotlight-hero {
  display: grid;
  grid-template-columns: clamp(92px, 14vw, 148px) 1fr;
  gap: clamp(16px, 3vw, 34px);
  align-items: center;
}

.spotlight-avatar {
  display: grid;
  place-items: center;
  width: clamp(92px, 14vw, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: clamp(40px, 7vw, 78px);
  font-weight: 900;
}

.spotlight-hero h2 {
  margin: 0;
  font-size: clamp(44px, 8vw, 96px);
}

.spotlight-handle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 12px;
}

.spotlight-card {
  min-height: 150px;
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.spotlight-card p {
  margin-bottom: 0;
  color: #2b333c;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.6;
}

.spotlight-card strong {
  font-size: clamp(38px, 6vw, 72px);
}

.spotlight-mask-hidden { color: var(--muted); margin-bottom: 10px; }

.spotlight-mask-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.spotlight-mask-line span {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8df;
  color: var(--ink);
  font-size: clamp(20px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.question-card {
  display: grid;
  gap: 14px;
}

.survey-answer-list {
  display: grid;
  gap: 10px;
}

.survey-answer-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.survey-answer-row:hover {
  border-color: var(--teal);
  background: rgba(228,246,239,.8);
}

.survey-answer-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #161616;
  font-weight: 900;
}

.survey-answer-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.survey-answer-main strong,
.survey-answer-main small {
  overflow-wrap: anywhere;
}

.survey-answer-main em {
  color: var(--gold-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .02em;
}

.survey-answer-main small {
  color: var(--muted);
  font-size: 14px;
}

.survey-category-progress {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.survey-category-chip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.5);
  color: var(--muted);
  font-size: 13px;
}

.survey-category-chip strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.survey-category-chip.active {
  border-color: var(--teal);
  background: rgba(228,246,239,.9);
}

.survey-category-chip.done {
  background: rgba(201,154,66,.12);
}

.field.compact {
  gap: 6px;
  margin: 0;
}

.field.compact span {
  font-size: 12px;
}

.diag-intro {
  margin: 0;
  padding: 12px 14px;
  background: rgba(201,154,66,0.07);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5dccb;
}
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.progress.mini {
  height: 8px;
  margin-top: 8px;
}

.room-code-display {
  display: inline-grid;
  place-items: center;
  min-height: 86px;
  min-width: 220px;
  margin: 8px 0 16px;
  padding: 12px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
  color: var(--gold);
  font-size: clamp(42px, 8vw, 76px);
  font-weight: 900;
  letter-spacing: 0;
}

.host-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.host-metrics div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.host-metrics strong {
  display: block;
  font-size: 36px;
  line-height: 1;
  color: var(--teal);
}

.host-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 900;
}

.progress-list {
  display: grid;
  gap: 8px;
}

.progress-row {
  display: grid;
  grid-template-columns: 42px 1fr 86px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.progress-row:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(18, 33, 39, 0.12);
  transform: translateY(-1px);
}

.progress-row.ready {
  border-color: var(--green);
  background: #edf7ef;
}

.progress-row strong,
.progress-row small {
  display: block;
}

.progress-row small {
  color: var(--muted);
  margin-top: 2px;
}

.ready-badge {
  justify-self: end;
  min-width: 74px;
  padding: 7px 9px;
  border-radius: 999px;
  background: #e1d7c5;
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.progress-row.ready .ready-badge {
  background: var(--green);
  color: white;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-align: left;
}
.option-button.active { border-color: var(--teal); background: #e5f3ef; }
.option-button.pending { opacity: 1; cursor: wait; box-shadow: inset 4px 0 0 var(--teal); }
.option-button.correct { border-color: var(--green); background: #e8f5ed; }
.option-button:disabled { cursor: wait; }
.option-button.sparkle {
  border-color: var(--gold);
  animation: answer-pop 500ms ease-out;
}
.option-button.sparkle::before,
.option-button.sparkle::after {
  content: "";
  position: absolute;
  inset: -35%;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 32%, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 24%, rgba(255, 213, 107, 0.95) 0 3px, transparent 4px),
    radial-gradient(circle at 82% 66%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 36% 78%, rgba(212, 161, 62, 0.9) 0 3px, transparent 4px);
  opacity: 0;
  animation: answer-sparkle 500ms ease-out;
}
.option-button.sparkle::after {
  transform: rotate(24deg);
  animation-delay: 80ms;
}

@keyframes answer-pop {
  0% { transform: scale(1); }
  38% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes answer-sparkle {
  0% { opacity: 0; transform: scale(0.82) rotate(0deg); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.16) rotate(18deg); }
}

.option-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.option-button.option-nomatch {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}
.option-button.option-nomatch .option-index { background: var(--muted); }

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 10px;
}

.panel-tile {
  position: relative;
  min-height: 116px;
  border: 1px solid #8f7d5f;
  border-radius: 8px;
  background: linear-gradient(145deg, #2a3138, #111318);
  color: #fffaf0;
  font-size: 30px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.06);
  transform-style: preserve-3d;
  animation: buildIn 420ms both;
}
.panel-tile.used { background: #5b5348; color: #d8c8aa; }
.panel-tile.active { outline: 4px solid rgba(201, 154, 66, 0.55); }

@keyframes buildIn {
  from { opacity: 0; transform: rotateY(80deg) scale(0.85); }
  to { opacity: 1; transform: rotateY(0) scale(1); }
}

.projection {
  min-height: calc(100vh - 130px);
}

.projector-shell {
  width: 100%;
  min-height: 100vh;
  padding: 16px;
}

.projector-shell .projector-topbar,
.projector-shell main,
.projector-shell .panel {
  width: 100%;
  max-width: none;
}

.projector-shell .intro-stage-host {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
}

.projector-shell .intro-panel {
  min-height: calc(100vh - 150px);
}

.projector-join {
  display: grid;
  grid-template-columns: auto 104px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  color: var(--ink);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  color-scheme: only light;
  forced-color-adjust: none;
}

.projector-join-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}

.projector-join-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.projector-join-copy strong {
  color: var(--teal);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}

.projector-join-qr {
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff !important;
  border: 2px solid #ffffff;
  color-scheme: only light;
  forced-color-adjust: none;
  filter: none !important;
  mix-blend-mode: normal;
  isolation: isolate;
}

.projector-center-qr {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 1.8vw, 24px);
  width: min(520px, 72vw);
  margin: clamp(18px, 3vw, 42px) auto clamp(12px, 2vw, 28px);
  padding: clamp(16px, 2.4vw, 28px);
  border: 2px solid rgba(31, 133, 128, .38);
  border-radius: 12px;
  background: #fffaf0;
  color: var(--ink);
  color-scheme: only light;
  forced-color-adjust: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.projector-center-qr-code {
  display: grid;
  place-items: center;
  width: min(360px, 48vw);
  aspect-ratio: 1;
  padding: clamp(12px, 1.6vw, 20px);
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #ffffff !important;
  color-scheme: only light;
  forced-color-adjust: none;
}

.projector-center-qr-copy {
  display: grid;
  gap: 4px;
  color: var(--ink);
  text-align: center;
}

.projector-center-qr-copy span {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
}

.projector-center-qr-copy strong {
  color: var(--teal);
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(42px, 5.5vw, 86px);
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.qr-code-projector {
  display: block;
  width: 92px;
  height: 92px;
}

.qr-stable,
.qr-code-projector,
.qr-code-small,
.qr-code-large,
.qr-code-hero {
  display: block;
  background: transparent !important;
  color: #000000 !important;
  color-scheme: only light;
  forced-color-adjust: none;
  filter: none !important;
  mix-blend-mode: normal;
  opacity: 1 !important;
}

.qr-stable rect,
.qr-code-projector rect,
.qr-code-small rect,
.qr-code-large rect,
.qr-code-hero rect {
  fill: #ffffff !important;
}

.qr-stable path,
.qr-code-projector path,
.qr-code-small path,
.qr-code-large path,
.qr-code-hero path {
  fill: #000000 !important;
  stroke: transparent !important;
}

.qr-code-hero {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

@media (max-width: 760px) {
  .projector-topbar {
    align-items: start;
  }

  .projector-join {
    grid-template-columns: 1fr 88px;
    width: 100%;
  }

  .projector-join-copy {
    text-align: left;
  }

  .projector-join-copy strong {
    font-size: 26px;
  }

  .qr-code-projector {
    width: 76px;
    height: 76px;
  }
}

/* ── INTRO フェーズ：左パネルを広く使う ── */
.intro-stage-host {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 20px;
  min-height: calc(100vh - 130px);
  align-items: start;
}

.intro-panel {
  padding: 20px;
}

.big-question {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 500px;
  align-content: center;
  text-align: center;
  overflow: hidden;
}
.big-question h2 { font-size: clamp(48px, 9vw, 120px); line-height: 1.15; }
.big-question .target-name { color: var(--teal); font-size: clamp(28px, 5vw, 56px); font-weight: 900; }

/* ── 正解発表オーバーレイ ── */
.reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 16, 0.93);
  pointer-events: none;
  animation: revealOverlayOut 0.5s ease forwards;
  animation-delay: 2.2s;
}

.sparkle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: sparklePop 0.8s ease-out forwards;
}

.reveal-announce {
  position: relative;
  z-index: 1;
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 0 50px rgba(201, 154, 66, 0.7), 0 0 100px rgba(201, 154, 66, 0.3);
  animation: revealTextAnim 2.2s ease forwards;
  letter-spacing: 0.04em;
}

/* 正解ボックスのズームイン */
.vote-box.reveal-correct {
  animation: correctFlash 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 2.4s;
}

/* 正解者バッジの点滅 */
.voter-badge.voter-winner {
  background: var(--gold);
  color: #1a1209;
  animation: voterGlow 0.4s ease alternate infinite;
  animation-delay: 2.7s;
}

@keyframes revealOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes sparklePop {
  0%   { opacity: 0; transform: scale(0) rotate(0deg); }
  25%  { opacity: 1; transform: scale(1.3) rotate(90deg); }
  65%  { opacity: 0.7; transform: scale(0.9) rotate(220deg) translateY(-8px); }
  100% { opacity: 0; transform: scale(0.1) rotate(360deg) translateY(-20px); }
}

@keyframes revealTextAnim {
  0%   { opacity: 0; transform: scale(0.3) translateY(30px); }
  18%  { opacity: 1; transform: scale(1.15) translateY(0); }
  28%  { transform: scale(1); }
  75%  { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes correctFlash {
  0%   { transform: scale(1); box-shadow: none; }
  50%  { transform: scale(1.12); box-shadow: 0 0 30px rgba(63, 143, 105, 0.8), 0 0 60px rgba(63, 143, 105, 0.3); border-color: var(--green); }
  100% { transform: scale(1.05); box-shadow: 0 0 14px rgba(63, 143, 105, 0.5); }
}

@keyframes voterGlow {
  from { background: var(--gold); box-shadow: 0 0 5px rgba(201, 154, 66, 0.6); transform: scale(1); }
  to   { background: #ffd84d; box-shadow: 0 0 18px rgba(255, 216, 77, 0.9); transform: scale(1.1); }
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vote-box {
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-align: left;
}
.vote-box strong { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.3; display: block; }
.vote-box.correct { border-color: var(--green); box-shadow: inset 0 0 0 3px rgba(63, 143, 105, 0.2); }
.voter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.voter-badge { padding: 8px 16px; border-radius: 999px; background: #e7e0d1; font-size: clamp(16px, 1.8vw, 26px); font-weight: 900; }

.scoreboard {
  display: grid;
  gap: 8px;
}
.score-row {
  display: grid;
  grid-template-columns: 42px 1fr 70px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.score-row.winner { border-color: var(--gold); background: #fff0c9; }
.rank { font-size: 22px; font-weight: 900; color: var(--gold); }
.points { text-align: right; font-weight: 900; }

.board-with-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 18px;
  align-items: start;
}

.live-scoreboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  padding: 14px;
}

.scoreboard.compact {
  gap: 6px;
}

.scoreboard.compact .score-row {
  grid-template-columns: 34px 1fr 64px;
  padding: 8px;
}

.scoreboard.compact .rank {
  font-size: 18px;
}

@media (max-width: 760px) {
  .board-with-score {
    grid-template-columns: 1fr;
  }
}

.mask-set {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.mask-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.mask-card strong { display: block; margin-bottom: 6px; }
.mask-card p { margin: 0; color: var(--muted); line-height: 1.55; }

.matching-guide {
  display: grid;
  gap: 18px;
  font-size: clamp(16px, 1.5vw, 22px);
}

/* ── マッチング ヒーロー演出 ── */
.match-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(24px, 4vw, 44px) 20px 30px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e1708 0%, #150f04 100%);
  border: 1px solid rgba(201, 154, 66, 0.45);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(201, 154, 66, 0.15);
}

.match-hero-sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.match-hero-sparkles .sparkle { animation: sparkleAmbient 2.6s ease-in-out infinite; }

@keyframes sparkleAmbient {
  0%, 100% { opacity: 0.12; transform: scale(0.6); }
  50%      { opacity: 0.85; transform: scale(1.2); }
}

.match-hero-eyebrow {
  position: relative;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #f0d080;
  opacity: 0.85;
  margin: 0 0 14px;
}

.match-hero-portraits {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 3vw, 30px);
  margin-bottom: 14px;
}

.match-hero-portrait {
  position: relative;
  width: clamp(96px, 20vw, 160px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #150f04;
  box-shadow: 0 0 0 3px rgba(20, 15, 5, 0.8), 0 0 26px 4px var(--glow, rgba(201, 154, 66, 0.4));
  animation: portraitPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.match-hero-portrait.side-a { --glow: rgba(35, 168, 160, 0.55); box-shadow: 0 0 0 3px #7fd4cf, 0 0 26px 6px rgba(35, 168, 160, 0.55); }
.match-hero-portrait.side-b { --glow: rgba(225, 110, 130, 0.55); box-shadow: 0 0 0 3px #e4a3b1, 0 0 26px 6px rgba(225, 110, 130, 0.55); animation-delay: 0.08s; }
.match-hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }

@keyframes portraitPop {
  from { opacity: 0; transform: scale(0.5) rotate(-6deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.match-hero-names {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2.5vw, 26px);
  margin-bottom: 18px;
}

.match-hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(30px, 6vw, 56px);
  letter-spacing: 0.02em;
}
.match-hero-name.side-a { color: #7fd4cf; text-shadow: 0 0 24px rgba(35, 123, 120, 0.55); }
.match-hero-name.side-b { color: #e4a3b1; text-shadow: 0 0 24px rgba(185, 93, 108, 0.55); }

.match-hero-link {
  font-size: clamp(20px, 3vw, 30px);
  color: #f5e09a;
  animation: maskFloat 3.4s ease-in-out infinite;
}

.match-meter {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 6px auto 20px;
}

.match-meter-ring {
  width: clamp(96px, 16vw, 132px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#f5e09a calc(var(--pct) * 1%), rgba(255, 255, 255, 0.1) 0);
  animation: meterGrow 1s ease-out both;
}

.match-meter-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #150f04;
}

.match-meter-value {
  position: relative;
  z-index: 1;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: #f5e09a;
}
.match-meter-value small { font-size: 0.5em; opacity: 0.8; }

.match-meter-label {
  position: relative;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(245, 224, 154, 0.75);
  margin: 0;
}

.match-meter-copy {
  position: relative;
  max-width: 760px;
  margin: 6px auto 14px;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.match-meter-copy h2 {
  margin: 0;
  color: #f5e09a;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
}

.match-meter-copy p {
  margin: 0;
  color: rgba(255, 250, 240, 0.86);
  line-height: 1.7;
  font-size: clamp(14px, 1.35vw, 18px);
  text-align: center;
}

@keyframes meterGrow {
  from { filter: brightness(1.8); transform: scale(0.85); opacity: 0; }
  to   { filter: brightness(1); transform: scale(1); opacity: 1; }
}

.match-hero-intro {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 250, 240, 0.82);
  line-height: 1.7;
  font-size: clamp(14px, 1.4vw, 18px);
}

.match-people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

/* ── カード共通 ── */
.match-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(201, 154, 66, 0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, #201a0d 0%, #171006 100%);
  color: #fdf6e6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(201, 154, 66, 0.12);
  animation: maskCardIn 0.5s ease both;
}
.matching-guide > .match-card:nth-of-type(2) { animation-delay: 0.08s; }
.matching-guide > .match-card:nth-of-type(3) { animation-delay: 0.16s; }
.matching-guide > .match-card:nth-of-type(4) { animation-delay: 0.24s; }

.match-card .label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f0d080;
  opacity: 0.85;
  margin: 0;
}

.match-card h3 {
  margin: 4px 0 8px;
  font-family: 'Cormorant Garamond', serif;
  color: #f5e09a;
  font-size: clamp(22px, 2.6vw, 32px);
}

.match-card p {
  line-height: 1.7;
  font-size: clamp(14px, 1.5vw, 17px);
  color: rgba(253, 246, 230, 0.88);
}

.match-card.person { position: relative; overflow: hidden; }
.match-card.person::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--inner-texture, none);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.match-card.person > * { position: relative; z-index: 1; }
.match-card.person.side-a { box-shadow: inset 4px 0 0 #237b78, 0 4px 20px rgba(0, 0, 0, 0.35); }
.match-card.person.side-b { box-shadow: inset 4px 0 0 #b95d6c, 0 4px 20px rgba(0, 0, 0, 0.35); }

.match-portrait-thumb {
  width: clamp(84px, 22vw, 120px);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(201, 154, 66, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.match-portrait-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }

.match-mask-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.match-mask-chip {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
}
.match-mask-chip.functional { background: rgba(201, 154, 66, 0.18); border: 1px solid rgba(201, 154, 66, 0.55); color: #f0d080; }
.match-mask-chip.inner { background: rgba(100, 80, 160, 0.22); border: 1px solid rgba(150, 120, 220, 0.5); color: #c8b8f0; }

.match-mask-voice {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(245, 224, 154, 0.9);
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 154, 66, 0.25);
}

.match-card blockquote,
.topic-guide blockquote {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(201, 154, 66, 0.1);
  color: rgba(253, 246, 230, 0.92);
  line-height: 1.65;
  font-size: clamp(13px, 1.4vw, 16px);
}

.match-chip-block { margin-top: 10px; }

.match-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.match-chips span {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 700;
}
.match-chips.close span { background: rgba(80, 180, 120, 0.2); border: 1px solid rgba(80, 180, 120, 0.4); color: #88d4a0; }
.match-chips.diff span { background: rgba(185, 93, 108, 0.2); border: 1px solid rgba(185, 93, 108, 0.4); color: #e8a0a8; }

/* ── 会話スクリプト（チャット風） ── */
.chat-script { display: grid; gap: 10px; }

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  animation: maskCardIn 0.4s ease both;
}
.chat-bubble .chat-name {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.7;
  margin-bottom: 3px;
}
.chat-bubble p { margin: 0; font-size: clamp(13px, 1.4vw, 16px); line-height: 1.6; }

.chat-bubble.from-a {
  justify-self: start;
  background: rgba(35, 123, 120, 0.22);
  border: 1px solid rgba(35, 123, 120, 0.4);
  border-bottom-left-radius: 2px;
}
.chat-bubble.from-b {
  justify-self: end;
  background: rgba(185, 93, 108, 0.22);
  border: 1px solid rgba(185, 93, 108, 0.4);
  border-bottom-right-radius: 2px;
  text-align: right;
}

.topic-guide {
  padding: 14px 0;
  border-top: 1px solid rgba(201, 154, 66, 0.2);
}
.topic-guide:first-of-type { border-top: 0; padding-top: 0; }

.topic-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(201, 154, 66, 0.25);
  color: #f5e09a;
  font-size: 13px;
  vertical-align: middle;
}

.match-hero-note {
  position: relative;
  max-width: 560px;
  margin: 8px auto 0;
  color: rgba(245, 224, 154, 0.75);
  line-height: 1.7;
  font-size: clamp(12px, 1.2vw, 15px);
}

.match-true-value {
  font-style: italic;
  color: rgba(245, 224, 154, 0.85);
}

.match-impact-inline { display: grid; gap: 6px; margin-top: 4px; }
.match-impact-inline .good,
.match-chemistry-note.good,
.mutual-impact-block .good,
.topic-impact {
  padding-left: 12px;
  border-left: 3px solid #6fbf8f;
  color: rgba(253, 246, 230, 0.92);
}
.match-impact-inline .caution,
.match-chemistry-note.caution,
.mutual-impact-block .caution,
.topic-caution {
  padding-left: 12px;
  border-left: 3px solid #d18a6a;
  color: rgba(253, 246, 230, 0.8);
}
.match-chemistry-note { margin: 4px 0 0; line-height: 1.7; }
.match-chemistry-note strong { color: #f0d080; }

.mutual-impact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.mutual-impact-block { display: grid; gap: 6px; }
.mutual-impact-block.side-a { box-shadow: inset 3px 0 0 #237b78; padding-left: 10px; }
.mutual-impact-block.side-b { box-shadow: inset 3px 0 0 #b95d6c; padding-left: 10px; }
.mutual-impact-direction {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #f0d080;
  opacity: 0.85;
  margin: 0;
}
.mutual-impact-tip {
  font-style: italic;
  color: rgba(245, 224, 154, 0.9);
}

.timeline-list { display: grid; gap: 10px; }
.timeline-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(201, 154, 66, 0.2);
}
.timeline-row:first-child { border-top: 0; padding-top: 0; }
.timeline-range {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #f5e09a;
  white-space: nowrap;
}
.timeline-row p { margin: 0; }

.match-card.mission {
  background: linear-gradient(135deg, #123c37 0%, #0c2724 100%);
  border-color: rgba(35, 123, 120, 0.6);
}
.match-card.mission .label,
.match-card.mission h3 {
  color: #fffaf0;
}

.notice {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8df;
  color: #4d3f23;
  line-height: 1.6;
}

.danger-notice {
  border-color: rgba(191, 71, 71, .55);
  background: #fff0ed;
  color: #8a2d25;
  font-weight: 700;
}

.mini-game-panel,
.mini-game-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mini-game-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.mini-game-card:hover {
  border-color: var(--teal);
  background: #edf7f5;
}

.mini-game-card.locked {
  cursor: default;
  opacity: 0.72;
}

.mini-game-card.locked:hover {
  border-color: var(--line);
  background: var(--paper);
}

.mini-game-card.active {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.mini-game-card.done {
  border-color: var(--green);
  background: #e8f5ed;
}

.mini-game-card strong {
  font-size: 15px;
}

.mini-game-card span,
.mini-game-card small {
  color: var(--muted);
  line-height: 1.45;
}

.mini-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.mini-stage-members {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.mini-stage-member {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.7);
}

.mini-stage-member.done {
  border-color: var(--green);
  background: #e8f5ed;
}

.mini-stage-member small {
  color: var(--muted);
  font-weight: 900;
}

.mini-status {
  padding: 3px 6px;
  border-radius: 999px;
  background: #e1d7c5;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.mini-status.ok {
  background: #dcefe4;
  color: #226046;
}

.mini-status.no {
  background: #f4dada;
  color: #8a3030;
}

.target-mini-strip {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.target-mini-strip {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
  background: #fff8df;
}

.target-mini-strip div {
  display: grid;
  gap: 2px;
}

.target-mini-strip strong {
  color: var(--gold);
  font-size: 12px;
}

.target-mini-strip span {
  color: var(--ink);
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 13, 0.72);
  backdrop-filter: blur(8px);
}

.login-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 250, 240, 0.72);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.login-modal h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1.2;
}

.login-modal .auth-box {
  margin-top: 16px;
  margin-bottom: 0;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.hidden { display: none !important; }

/* URL share button */
.url-share-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 140ms, background 140ms;
}

.url-share-btn:hover {
  border-color: var(--teal);
  background: #edf7f5;
}

.url-share-text {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--teal);
}

.url-share-icon {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--muted);
  transition: color 140ms;
}

.url-share-btn:hover .url-share-icon {
  color: var(--teal);
}

/* 参加者招待ボタン（パーティー名＋メッセージ＋URLをまとめてコピー） */
.invite-share-btn {
  border-color: var(--gold);
}
.invite-share-btn:hover {
  border-color: var(--gold);
  background: #2a2010;
}
.invite-share-btn:hover .url-share-icon {
  color: var(--gold);
}

.qr-invite-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  margin: 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  color-scheme: only light;
  forced-color-adjust: none;
}

.qr-invite-card:hover {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.line-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  margin: 8px 0 12px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #05a64b;
  background: #06c755;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(6, 199, 85, 0.18);
}

.line-share-btn:hover {
  background: #05b84e;
  color: #ffffff;
}

.qr-invite-code {
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff !important;
  border: 2px solid #ffffff;
  color-scheme: only light;
  forced-color-adjust: none;
  filter: none !important;
  mix-blend-mode: normal;
  isolation: isolate;
}

.qr-code-small {
  width: 82px;
  height: 82px;
  display: block;
}

.qr-invite-copy {
  display: grid;
  gap: 4px;
}

.qr-invite-copy strong {
  font-size: 15px;
}

.qr-invite-copy small,
.qr-pip-url {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.qr-pip {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.72);
}

.qr-pip-panel {
  position: relative;
  width: min(560px, 94vw);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0,0,0,0.34);
}

.qr-pip-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffaf0;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.qr-pip-code {
  display: grid;
  place-items: center;
  padding: 20px;
  margin: 16px 0 12px;
  border-radius: 8px;
  background: #ffffff !important;
  border: 2px solid #ffffff;
  color-scheme: only light;
  forced-color-adjust: none;
  filter: none !important;
  mix-blend-mode: normal;
  isolation: isolate;
}

.qr-code-large {
  width: min(360px, 76vw);
  height: min(360px, 76vw);
  display: block;
}

.flyer-create-btn {
  margin: 8px 0 14px;
}

.flyer-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 14, 0.74);
  overflow: auto;
}

.flyer-panel {
  position: relative;
  width: min(760px, 96vw);
  max-height: 96vh;
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0,0,0,0.34);
}

.flyer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffaf0;
  color: var(--ink);
  font-size: 22px;
}

.flyer-help {
  margin: 4px 0 14px;
  color: #52606b;
  line-height: 1.6;
}

.flyer-designs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 16px;
}

.flyer-design {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 900;
}

.flyer-design.active {
  border-color: var(--teal);
  background: #e6f3ee;
  color: #164f4d;
}

.flyer-preview-wrap {
  display: grid;
  place-items: center;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4ede0;
}

#flyerCanvas {
  display: block;
  width: min(320px, 76vw);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.24);
}

/* ホストメッセージ入力欄 */
.host-message-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 8px;
}
.host-message-input:focus {
  outline: none;
  border-color: var(--teal);
}

/* ── ホストからのアナウンス ── */
.announcement-banner {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(201, 154, 66, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(201, 154, 66, 0.16), rgba(201, 154, 66, 0.06));
  animation: maskCardIn 0.4s ease both;
}
.announcement-banner .label { margin: 0; }
.announcement-banner p:last-child {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ── 参加者ウェルカム画面 ── */
.welcome-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.welcome-card {
  max-width: 560px;
  width: 100%;
  color-scheme: light;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 60% 10%, rgba(201,154,66,0.07), transparent 50%),
    linear-gradient(160deg, #fffef8 0%, #fffaf0 100%);
  border: 1.5px solid rgba(201,154,66,0.35);
  border-radius: 16px;
  padding: 32px 36px 40px;
  display: grid;
  gap: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28), 0 0 0 1px rgba(201,154,66,0.1);
}

.welcome-flyer {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(201,154,66,0.38);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 72% 5%, rgba(201,154,66,0.12), transparent 44%),
    linear-gradient(155deg, #fffef9 0%, #fff9ed 100%);
  box-shadow: 0 14px 40px rgba(67,45,14,0.10);
}

.welcome-flyer-meta {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-top: 1px solid rgba(201,154,66,0.28);
  border-bottom: 1px solid rgba(201,154,66,0.28);
}

.welcome-flyer-meta span {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.welcome-flyer-meta strong {
  color: #8a611c;
}

.welcome-line-share {
  margin: -2px 0 0;
}

.welcome-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gold);
  color: #1a1209;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  justify-self: start;
}

.welcome-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}

.welcome-host-msg {
  padding: 12px 16px;
  background: rgba(63, 143, 105, 0.08);
  border-left: 3px solid var(--green);
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  white-space: pre-wrap;
}

.welcome-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.welcome-features {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.welcome-features li {
  padding: 8px 12px;
  background: var(--bg);
  color: #fffaf0;
  border-radius: 8px;
  font-size: 13px;
}

.welcome-login-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.welcome-top-button {
  margin-top: 14px;
}

.welcome-login-note {
  font-size: 13px;
  color: var(--ink);
  opacity: 0.7;
  margin-bottom: 14px;
  line-height: 1.6;
}

.welcome-account-card {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.82);
  color: var(--ink);
}

.welcome-account-card div {
  display: grid;
  gap: 2px;
}

.welcome-account-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.welcome-account-card strong {
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .welcome-card {
    padding: 20px 14px 28px;
  }

  .welcome-flyer {
    padding: 18px 14px;
  }
}

/* Party list page */
.party-section {
  display: grid;
  gap: 8px;
}

.party-section-label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.party-list-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 8px 14px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 8px;
  background: rgba(247, 241, 228, 0.06);
  color: #fffaf0;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.party-list-item:hover {
  background: rgba(247, 241, 228, 0.12);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.party-list-code {
  font-size: 16px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.party-list-info {
  display: grid;
  gap: 3px;
}

.party-list-info strong {
  font-size: 15px;
  line-height: 1.3;
}

.party-list-host,
.party-list-venue {
  font-size: 12px;
  color: rgba(255, 250, 240, 0.6);
}

.party-list-host {
  color: rgba(255, 250, 240, 0.78);
  font-weight: 800;
}

.partylist-role {
  background: linear-gradient(135deg, rgba(236, 228, 255, 0.97), rgba(255, 250, 240, 0.96));
}

/* Hosted room list */
.hosted-rooms {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.hosted-room-list {
  display: grid;
  gap: 8px;
}

.hosted-room-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.hosted-room-item:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 20px rgba(18, 33, 39, 0.1);
  transform: translateY(-1px);
}

.hosted-room-code {
  font-size: 16px;
  font-weight: 900;
  color: var(--teal);
  letter-spacing: 0.02em;
}

.hosted-room-info {
  display: grid;
  gap: 2px;
}

.hosted-room-info strong {
  font-size: 14px;
  line-height: 1.3;
}

.hosted-room-info span {
  font-size: 12px;
  color: var(--muted);
}

.hosted-room-info .room-host-name {
  color: var(--ink);
  font-weight: 900;
}

.phase-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e1d7c5;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

/* Intro timer */
.spotlight-timer {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.spotlight-timer-body {
  display: grid;
  grid-template-columns: min(200px, 38%) 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 10px;
}

.spotlight-timer-side {
  display: grid;
  gap: 8px;
}

.intro-timer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.timer-select {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.intro-timer-plain {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 900;
  text-align: center;
  color: var(--ink);
}
.intro-timer-plain.warning { color: #b0413e; }

.intro-timer-circle-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(260px, 100%);
  margin: 0 auto;
}

.intro-timer-svg {
  width: 100%;
  height: auto;
  display: block;
}

.timer-track {
  fill: none;
  stroke: #e5dccb;
  stroke-width: 12;
}

.timer-fill {
  fill: none;
  stroke: var(--teal);
  stroke-width: 12;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.85s linear, stroke 0.3s;
}

.timer-fill.warning {
  stroke: var(--danger);
}

.timer-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(44px, 14vw, 76px);
  font-weight: 900;
  color: var(--ink);
  pointer-events: none;
  line-height: 1;
}

.timer-text-countdown {
  font-size: clamp(60px, 18vw, 100px);
  color: var(--teal);
}

.timer-text-warning {
  color: var(--danger);
}

.timer-text-done {
  font-size: clamp(44px, 12vw, 68px);
  color: var(--rose);
}

@media (max-width: 920px) {
  .grid-2 { grid-template-columns: 1fr; }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-copy { min-height: 520px; }
  .landing-flow { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, minmax(54px, 1fr)); gap: 6px; }
  .panel-tile { min-height: 74px; font-size: 22px; }
  .vote-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .host-metrics { grid-template-columns: 1fr; }
  .progress-row { grid-template-columns: 42px 1fr; }
  .ready-badge { justify-self: start; grid-column: 2; }
  .activity-row { grid-template-columns: 42px 1fr; }
  .activity-row time { grid-column: 2; justify-self: start; }
  .participant-spotlight { padding: 10px; }
  .participant-spotlight-page { min-height: calc(100vh - 20px); padding: 22px; }
  .spotlight-hero { grid-template-columns: 1fr; justify-items: start; }
  .spotlight-grid { grid-template-columns: 1fr; }
  .spotlight-mask-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spotlight-timer-body { grid-template-columns: 1fr; }
  .intro-timer-circle-wrap { width: min(180px, 60%); }
  .guide-game-card { grid-template-columns: 1fr; }
  .guide-game-card dl div { grid-template-columns: 1fr; gap: 2px; }
  .game-adder-row { flex-direction: column; align-items: stretch; }
}

/* ── Mask Reveal Screen ─────────────────────────────────────── */
.mask-reveal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.mask-reveal-header {
  text-align: center;
  margin-bottom: 36px;
}

.mask-reveal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 6vw, 42px);
  color: #c99a42;
  margin: 8px 0 16px;
  letter-spacing: 0.05em;
}

.mask-reveal-section-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c99a42;
  opacity: 0.8;
  margin-bottom: 16px;
  padding-left: 4px;
}

.mask-reveal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.mask-reveal-card {
  background: linear-gradient(135deg, #1e1708 0%, #150f04 100%);
  border: 1px solid rgba(201,154,66,0.45);
  border-radius: 12px;
  padding: 24px 22px 20px;
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(201,154,66,0.15);
  animation: maskCardIn 0.5s ease both;
}

.mask-reveal-card:nth-child(2) { animation-delay: 0.12s; }

@keyframes maskCardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mask-reveal-badge {
  display: inline-block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.badge-functional {
  background: rgba(201,154,66,0.18);
  border: 1px solid rgba(201,154,66,0.6);
  color: #f0d080;
}

.badge-inner {
  background: rgba(100,80,160,0.2);
  border: 1px solid rgba(150,120,220,0.5);
  color: #c8b8f0;
}

.mask-reveal-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 4vw, 28px);
  color: #f5e09a;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

.mask-reveal-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245,224,154,0.75);
  margin: 0 0 14px;
}

.mask-reveal-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}

.mask-reveal-label {
  white-space: nowrap;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}

.mask-reveal-label.blessing {
  background: rgba(80,180,120,0.2);
  color: #88d4a0;
  border: 1px solid rgba(80,180,120,0.35);
}

.mask-reveal-label.curse {
  background: rgba(200,80,80,0.15);
  color: #e8a0a0;
  border: 1px solid rgba(200,80,80,0.3);
}

.mask-reveal-voice {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(245,224,154,0.9);
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(201,154,66,0.2);
}

.mask-reveal-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(201,154,66,0.2);
}

/* ── Game Adder ─────────────────────────────────────────────── */
.game-adder {
  margin: 16px 0;
  padding: 16px;
  background: rgba(201,154,66,0.06);
  border: 1px solid rgba(201,154,66,0.25);
  border-radius: 10px;
}

.program-builder-note {
  margin: 0 0 12px;
  color: #52606b;
  font-size: 13px;
  line-height: 1.65;
}

.program-builder {
  display: grid;
  gap: 10px;
}

.program-stage-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(201,154,66,0.38);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
}

.program-stage-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.program-stage-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #111318;
  font-weight: 900;
}

.program-stage-head strong,
.program-stage-head small {
  display: block;
}

.program-stage-head strong {
  color: var(--ink);
  font-size: 15px;
}

.program-stage-head small {
  margin-top: 3px;
  color: #5e6872;
  font-size: 12px;
  line-height: 1.5;
}

.program-stage-empty {
  margin: 0;
  color: #7a828b;
  font-size: 12px;
}

.stage-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-selected-pill {
  padding: 5px 9px;
  border: 1px solid rgba(35,123,120,0.5);
  border-radius: 999px;
  background: rgba(35,123,120,0.1);
  color: #1f6f6c;
  font-size: 12px;
  font-weight: 800;
}

.game-adder-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.game-select {
  flex: 1;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  appearance: auto;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.game-card-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #c99a42;
  min-width: 22px;
  text-align: center;
  line-height: 1;
}

.game-card-body {
  flex: 1;
  min-width: 0;
}

.game-card-name {
  background: none;
  border: none;
  padding: 0;
  color: #f5e09a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(201,154,66,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.game-card-name:hover { color: #c99a42; }

.game-card-category {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(201,154,66,0.16);
  color: #d7aa56;
  font-size: 10px;
  font-weight: 900;
}

.game-card-stage {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,0.68);
  font-size: 11px;
  font-weight: 800;
}

.game-card-short {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.button-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.button-icon:hover { background: rgba(255,255,255,0.1); color: #fff; }
.button-icon.danger:hover { background: rgba(200,60,60,0.25); color: #f88; border-color: rgba(200,60,60,0.5); }
.button-icon.program-move-button {
  color: #f0c667;
  font-size: 20px;
  font-weight: 900;
}
.button-icon:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.button-icon:disabled:hover {
  background: transparent;
  color: inherit;
}

@media (max-width: 560px) {
  .game-card {
    align-items: flex-start;
  }

  .game-card-actions {
    display: grid;
    grid-template-columns: repeat(2, 30px);
  }
}

/* ── Game Detail Popup ──────────────────────────────────────── */
.game-detail-popup {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  width: min(340px, calc(100vw - 32px));
  background: linear-gradient(135deg, #1e1a0c 0%, #141008 100%);
  border: 1px solid rgba(201,154,66,0.55);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,154,66,0.12);
  z-index: 900;
  animation: popupIn 0.2s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: translateY(calc(-50% + 10px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

.game-detail-inner {
  padding: 22px 20px 20px;
  position: relative;
}

.game-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-detail-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.game-detail-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #f5e09a;
  margin: 0 0 10px;
  padding-right: 24px;
  line-height: 1.3;
}

.game-detail-desc {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
  margin: 0 0 14px;
}

.game-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.game-detail-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #c99a42;
  margin-right: 8px;
}

/* ── Game Guide Page ───────────────────────────────────────── */
.game-guide-page main {
  display: grid;
  gap: 18px;
}

.game-guide-hero {
  min-height: auto;
}

.game-guide-section {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 52px rgba(0,0,0,0.14);
}

.game-guide-section h3 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 46px);
  color: var(--ink);
}

.category-grid,
.course-grid,
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.course-card,
.category-card,
.type-card,
.guide-game-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
}

.course-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  min-height: 176px;
  padding: 16px;
}

.course-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.course-name {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.course-card p {
  margin: 0;
  color: #46505a;
  line-height: 1.6;
}

.course-card small {
  display: block;
  margin-top: 10px;
  color: #68717a;
  line-height: 1.55;
}

.category-card,
.type-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 154px;
  padding: 16px;
}

.category-card strong,
.type-card strong {
  font-size: 16px;
  line-height: 1.55;
}

.category-card p,
.type-card p,
.guide-game-card p,
.guide-game-card dd {
  color: #46505a;
  line-height: 1.65;
}

.category-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201,154,66,0.16);
  color: #8d641d;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.stage-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(35,123,120,0.12);
  color: #1f6f6c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.guide-game-list {
  display: grid;
  gap: 12px;
}

.guide-game-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 18px;
  padding: 18px;
}

.guide-game-card h4 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.guide-game-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.guide-game-card dl div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(215,199,169,0.68);
}

.guide-game-card dt {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.guide-game-card dd {
  margin: 0;
  font-size: 14px;
}

.precheck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.precheck-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
}

.precheck-card.done {
  border-color: rgba(35, 123, 120, 0.55);
  background: linear-gradient(135deg, #fffdf8 0%, #e7f5ef 100%);
}

.precheck-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.precheck-meta span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.precheck-meta em {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.precheck-card h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.precheck-card p {
  margin: 0;
  color: #46505a;
  line-height: 1.65;
}

.precheck-status {
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid rgba(215, 199, 169, 0.7);
  border-radius: 8px;
  color: var(--teal);
  font-weight: 900;
}

.diagnosis-results-hero { margin-bottom: 18px; }

.diagnosis-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.diagnosis-result-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 235px;
  padding: 20px;
  border: 1px solid rgba(201, 154, 66, 0.48);
  border-radius: 10px;
  background: linear-gradient(145deg, #fffdf8, #f7edda);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 22px rgba(40, 32, 20, 0.09);
  transition: transform .18s ease, box-shadow .18s ease;
}

.diagnosis-result-card:hover,
.diagnosis-result-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(40, 32, 20, 0.16);
  outline: 2px solid rgba(201, 154, 66, 0.55);
}

.diagnosis-result-card > span { color: var(--gold); font-size: 12px; font-weight: 900; }
.diagnosis-result-card h3 { margin: 0; font-size: 23px; }
.diagnosis-result-card p { margin: 0; line-height: 1.65; }
.diagnosis-result-card small { margin-top: auto; color: #6e665c; }
.diagnosis-result-card em { color: var(--teal); font-style: normal; font-weight: 900; }

.diagnosis-result-detail {
  display: grid;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.diagnosis-result-detail > header,
.diagnosis-detail-section {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
}

.diagnosis-result-detail > header h2 { margin-bottom: 8px; }
.diagnosis-result-detail > header small { color: #6e665c; }
.diagnosis-detail-section > h3 { margin-top: 0; }

.diagnosis-answer-history {
  display: grid;
  gap: 10px;
  padding-left: 26px;
}

.diagnosis-answer-history li { padding: 10px 12px; background: #f7f1e6; border-radius: 7px; }
.diagnosis-answer-history strong,
.diagnosis-answer-history span { display: block; }
.diagnosis-answer-history span { margin-top: 5px; color: var(--teal); font-weight: 800; }

.diagnosis-score-list { display: grid; gap: 7px; }
.diagnosis-score-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.diagnosis-score-list strong { color: var(--teal); }

.twoshot-move-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #7a2020);
  background-size: 200% 200%;
  animation: twoshot-move-pulse 1.1s ease-in-out infinite;
}

.twoshot-card-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}

.twoshot-card-row.projector-row {
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
  overflow-x: visible;
  justify-content: center;
}

.twoshot-pair-card {
  flex: 0 0 min(220px, 72vw);
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(201,154,66,0.48);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  text-align: center;
}

.twoshot-pair-card.projector {
  flex-basis: min(280px, 30vw);
  min-height: 150px;
  font-size: clamp(18px, 2.2vw, 30px);
}

.twoshot-pair-card span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.twoshot-pair-card strong {
  display: block;
  font-size: 1.1em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.twoshot-pair-card em {
  color: var(--teal);
  font-style: normal;
  font-weight: 900;
}

.twoshot-rest-card {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(215,199,169,0.75);
  border-radius: 8px;
  background: #fff8df;
  color: var(--ink);
  font-weight: 800;
}

.twoshot-match-table-panel {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(35, 136, 128, 0.35);
  border-radius: 10px;
  background: #fffdf8;
}

.twoshot-match-table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.twoshot-match-table-heading h3,
.twoshot-match-table-heading p { margin: 0; }
.twoshot-match-table-heading > strong { color: var(--teal); }

.twoshot-match-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.twoshot-match-legend .done { color: #246b50; }
.twoshot-match-legend .current { color: #a56a00; }
.twoshot-match-legend .pending { color: #736b60; }

.twoshot-match-table-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #ded5c5;
  border-radius: 8px;
}

.twoshot-match-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  text-align: center;
}

.twoshot-match-table th,
.twoshot-match-table td {
  min-width: 84px;
  padding: 9px 7px;
  border-right: 1px solid #e4dccf;
  border-bottom: 1px solid #e4dccf;
}

.twoshot-match-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4ecdd;
}

.twoshot-match-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f4ecdd;
  text-align: left;
}

.twoshot-match-table thead th:first-child { left: 0; z-index: 3; }
.twoshot-match-table tr:last-child > * { border-bottom: 0; }
.twoshot-match-table tr > *:last-child { border-right: 0; }
.twoshot-match-table td span { display: block; font-size: 20px; font-weight: 900; }
.twoshot-match-table td small { display: block; white-space: nowrap; font-size: 10px; font-weight: 900; }
.twoshot-match-table td.done { background: #e4f4e9; color: #246b50; }
.twoshot-match-table td.current { background: #fff0bd; color: #a56a00; }
.twoshot-match-table td.pending { background: #f4f1eb; color: #736b60; }

@media (max-width: 700px) {
  .twoshot-match-table-heading { align-items: flex-start; flex-direction: column; }
}

.twoshot-status-big {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
  margin: 10px 0 18px;
}

.twoshot-status-item {
  min-width: 0;
  padding: clamp(12px, 2.4vw, 22px);
  border: 2px solid rgba(35, 136, 128, 0.55);
  border-radius: 10px;
  background: linear-gradient(135deg, #fffdf8 0%, #e7f5ef 100%);
  color: var(--ink);
  text-align: center;
}

.twoshot-status-item span,
.twoshot-status-item small {
  display: block;
  color: var(--teal);
  font-weight: 900;
  letter-spacing: .06em;
}

.twoshot-status-item span {
  font-size: clamp(14px, 3.8vw, 28px);
}

.twoshot-status-item strong {
  display: block;
  margin: 4px 0;
  font-size: clamp(44px, 13vw, 112px);
  font-weight: 900;
  line-height: .95;
  overflow-wrap: anywhere;
}

.twoshot-status-item small {
  font-size: clamp(13px, 3.3vw, 24px);
}

.twoshot-status-big.admin .twoshot-status-item strong {
  font-size: clamp(32px, 7vw, 72px);
}

.twoshot-status-big.projector .twoshot-status-item strong {
  font-size: clamp(72px, 12vw, 150px);
}

.twoshot-guest-compat-list {
  display: grid;
  gap: 10px;
}

.twoshot-guest-compat-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(215,199,169,0.75);
  border-radius: 8px;
  background: #fffdf8;
}

.twoshot-guest-compat-item.current {
  border-color: var(--teal);
  background: #e7f5ef;
}

.twoshot-guest-compat-item.inactive {
  opacity: .58;
}

.twoshot-guest-compat-item small {
  display: block;
  margin-top: 2px;
  color: #66727d;
  font-weight: 800;
}

.twoshot-compat-card {
  margin: 0;
  animation: none !important;
}

.twoshot-compat-card.disabled {
  filter: grayscale(.25);
}

.twoshot-compat-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(215,199,169,0.7);
}

.twoshot-compat-card .match-meter-ring,
.twoshot-detail-guide .match-meter-ring,
.twoshot-detail-guide .match-hero-link,
.twoshot-detail-guide .match-card,
.twoshot-detail-guide .chat-bubble {
  animation: none !important;
}

.twoshot-detail-guide {
  margin-top: 12px;
}

.twoshot-detail-guide .match-hero {
  padding: clamp(18px, 4vw, 34px) 14px 24px;
}

.twoshot-move-screen h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 40px);
}

.twoshot-move-countdown {
  font-size: clamp(48px, 12vw, 96px);
  font-weight: 900;
  line-height: 1;
}

.twoshot-next-title {
  margin: 8px 0 0;
  color: #fff8df;
  font-size: clamp(18px, 3vw, 34px);
}

.twoshot-rest-card.projector-rest {
  background: rgba(255, 248, 223, 0.94);
  color: #201914;
  font-size: clamp(16px, 2vw, 26px);
}

.ending-thanks-title {
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1.08;
  text-align: center;
}

.ending-feedback-results {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.ending-feedback-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ending-feedback-heading h3 {
  margin: 4px 0 0;
}

.ending-feedback-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ending-feedback-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ending-feedback-counts {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ending-feedback-counts li {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.ending-feedback-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ending-feedback-detail {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.ending-feedback-detail summary {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  cursor: pointer;
}

.ending-feedback-detail dl {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) 1fr;
  gap: 8px 14px;
  margin: 14px 0 0;
}

.ending-feedback-detail dt {
  color: var(--muted);
  font-weight: 800;
}

.ending-feedback-detail dd {
  margin: 0;
  white-space: pre-wrap;
}

.ending-compat-page {
  width: min(100%, 980px);
  margin: 0 auto;
}

.ending-compat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.ending-save-actions {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.ending-compat-capture {
  width: 100%;
  padding: clamp(8px, 2vw, 18px);
  border-radius: 10px;
  background: #0f0b04;
}

.ending-compat-capture .twoshot-detail-guide {
  margin-top: 0;
}

.ending-compat-capture .twoshot-detail-guide .match-hero {
  min-height: auto;
}

@media (max-width: 720px) {
  .ending-feedback-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ending-feedback-metrics,
  .ending-feedback-summary-grid {
    grid-template-columns: 1fr;
  }

  .ending-feedback-detail dl {
    grid-template-columns: 1fr;
  }

  .ending-feedback-detail dd {
    margin-bottom: 6px;
  }

  .ending-compat-page {
    width: 100%;
  }

  .ending-compat-capture {
    padding: 6px;
  }
}

@keyframes twoshot-move-pulse {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 0 0 rgba(184, 77, 77, 0); }
  50% { background-position: 100% 50%; box-shadow: 0 0 40px rgba(184, 77, 77, 0.6); }
}
