:root {
  --wine: #471b30;
  --wine-deep: #28101e;
  --wine-light: #6e2a49;
  --gold: #f1c453;
  --gold-deep: #b77900;
  --gold-soft: #f8e7b4;
  --paper: #f7f1e5;
  --paper-2: #fffaf0;
  --ink: #2c2226;
  --muted: #75676c;
  --green: #32664b;
  --red: #a53535;
  --line: rgba(71, 27, 48, .16);
  --shadow: 0 24px 70px rgba(40, 16, 30, .14);
  --radius: 22px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--wine-deep); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 10%, #fffdf7 0, var(--paper) 44%, #eee3d0 100%); font-size: 1.0625rem; font-weight: 400; line-height: 1.62; }
button, input, audio { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-150%); background: white; padding: .8rem 1rem; border-radius: 8px; }
.skip-link:focus { transform: none; }

.game-header {
  position: sticky; top: 0; z-index: 50;
  min-height: 76px; padding: 12px clamp(16px, 4vw, 60px);
  display: grid; grid-template-columns: auto minmax(130px, 460px) auto; align-items: center; gap: clamp(14px, 3vw, 42px);
  color: white; background: rgba(40, 16, 30, .96); border-bottom: 1px solid rgba(241, 196, 83, .25);
  backdrop-filter: blur(16px);
}
.brand-button { display: flex; align-items: center; gap: 10px; color: white; background: none; border: 0; padding: 0; text-align: left; }
.brand-button b { display: block; font-size: 1rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.brand-button small { display: block; color: var(--gold-soft); font-size: .75rem; letter-spacing: .12em; }
.crown-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border: 1px solid rgba(241,196,83,.45); border-radius: 50%; color: var(--gold); font-size: 1.45rem; }
.progress-wrap { width: 100%; }
.progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-family: Arial, sans-serif; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #f8f0e2; }
.progress-label-button {
  background: none;
  border: 0;
  color: #f8f0e2;
  font: inherit;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}
.progress-label-button:hover { color: var(--gold); }
.progress-track { height: 4px; overflow: hidden; background: rgba(255,255,255,.16); border-radius: 4px; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: inherit; transition: width .35s ease; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.team-launch { min-height: 42px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(241,196,83,.55); border-radius: 999px; color: var(--wine-deep); background: var(--gold); font-size: .82rem; font-weight: 700; }
.team-launch:hover, .team-launch:focus-visible { background: #ffd66a; }
.short-label { display: none; }
.icon-button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: white; background: rgba(255,255,255,.07); font-weight: 650; }
.icon-button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }

main { min-height: calc(100vh - 125px); }
.stage { display: none; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: clamp(46px, 7vw, 88px) 0 80px; }
.stage.active { display: block; animation: stage-in .42s ease both; }
@keyframes stage-in { from { opacity: 0; transform: translateY(12px); } }

.hero-stage { position: relative; width: 100%; max-width: none; overflow: hidden; padding: clamp(56px, 8vw, 110px) clamp(16px, 6vw, 90px) 60px; background: linear-gradient(145deg, var(--wine-deep), var(--wine) 58%, #6c2b49); color: white; }
.hero-glow { position: absolute; inset: -20% auto auto 46%; width: 58vw; height: 58vw; border-radius: 50%; background: radial-gradient(circle, rgba(241,196,83,.22), transparent 66%); pointer-events: none; }
.hero-grid { position: relative; width: min(1120px, 100%); margin: auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.eyebrow { margin: 0 0 10px; font-weight: 700; font-size: .76rem; line-height: 1.3; letter-spacing: .15em; text-transform: uppercase; color: var(--wine-light); }
.hero-stage .eyebrow, .cinema-hero .eyebrow { color: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1:focus, h2:focus { outline: none; }
h1, h2, h3 { font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-weight: 600; text-wrap: balance; }
h1 { max-width: 800px; margin-bottom: 24px; font-size: clamp(2.8rem, 6vw, 5.25rem); line-height: 1.02; letter-spacing: -.038em; }
h2 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.06; letter-spacing: -.025em; color: var(--wine); }
h3 { margin-bottom: 12px; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.2; color: var(--wine); }
h4 { margin: 22px 0 8px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--wine); font-weight: 700; }
.hero-lead, .lead { font-size: clamp(1.1rem, 1.7vw, 1.32rem); line-height: 1.62; }
.hero-lead { max-width: 690px; color: #f9ecdf; }
.mission-card { max-width: 670px; display: flex; gap: 18px; margin-top: 34px; padding: 22px; border: 1px solid rgba(241,196,83,.35); border-radius: 16px; background: rgba(255,255,255,.06); }
.mission-icon { color: var(--gold); font-size: 1.8rem; }
.mission-card b { display: block; margin-bottom: 5px; color: var(--gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mission-card p { margin: 0; line-height: 1.5; color: #f8ede2; }
.mission-card p + p { margin-top: 10px; color: white; }
.hero-crest { position: relative; display: grid; place-items: center; width: min(340px, 72vw); aspect-ratio: .82; margin: auto; color: var(--gold); border: 1px solid rgba(241,196,83,.4); border-radius: 48% 48% 42% 42% / 28% 28% 60% 60%; background: linear-gradient(165deg, rgba(241,196,83,.14), rgba(255,255,255,.03)); box-shadow: inset 0 0 70px rgba(241,196,83,.08); }
.crest-crown { font-size: clamp(7rem, 13vw, 11rem); text-shadow: 0 15px 34px rgba(0,0,0,.28); transform: translateY(-8%); }
.crest-stars { position: absolute; top: 13%; font-size: 1.6rem; }
.crest-ribbon { position: absolute; bottom: 16%; padding: 10px 25px; color: var(--wine-deep); background: var(--gold); border-radius: 999px; font-family: Arial, sans-serif; font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-3deg); }

.mode-panel, .quiz-card { position: relative; width: min(1120px, 100%); margin: 58px auto 0; padding: clamp(24px, 4vw, 42px); border: 1px solid rgba(241,196,83,.28); border-radius: var(--radius); background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 28px 80px rgba(15,5,10,.24); }
.mode-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; align-items: center; }
.mode-panel h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode-card, .choice-card { min-height: 150px; padding: 22px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--paper-2); color: var(--ink); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mode-card:hover, .mode-card:focus-visible, .choice-card:hover, .choice-card:focus-visible { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 14px 30px rgba(40,16,30,.11); }
.mode-card b, .mode-card span:not(.mode-icon), .choice-card b, .choice-card small { display: block; }
.mode-card b, .choice-card b { margin: 8px 0 6px; font-size: 1.12rem; color: var(--wine); }
.mode-card span:not(.mode-icon), .choice-card small { color: var(--muted); line-height: 1.45; }
.mode-icon, .choice-card > span { color: var(--wine-light); font-size: 2rem; }
.quiz-card { color: var(--ink); }
.quiz-number { position: absolute; top: -16px; left: 28px; padding: 8px 13px; color: var(--wine-deep); background: var(--gold); border-radius: 999px; font-family: Arial, sans-serif; font-weight: 900; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.hint-line { margin: 0 0 24px; color: var(--muted); font-size: 1.06rem; }
.coat-of-arms-hint { margin: 0 0 28px; padding: 18px; display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.coat-of-arms-hint img { width: 100%; max-height: 130px; object-fit: contain; }
.coat-of-arms-hint figcaption { color: var(--muted); line-height: 1.5; }
.coat-of-arms-hint a { color: var(--wine); font-weight: 700; }
fieldset { margin: 0 0 24px; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 14px; font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 2rem); color: var(--wine); }
.answer { display: block; margin: 9px 0; }
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer span { position: relative; display: block; padding: 15px 18px 15px 50px; border: 1px solid var(--line); border-radius: 12px; background: white; transition: .2s ease; }
.answer span::before { content: ""; position: absolute; left: 18px; top: 50%; width: 16px; height: 16px; border: 2px solid #9c8e92; border-radius: 50%; transform: translateY(-50%); }
.answer input:checked + span { color: var(--wine); border-color: var(--gold); background: #fff8e5; box-shadow: inset 4px 0 var(--gold); }
.answer input:checked + span::before { border: 5px solid var(--wine); }
.answer input:focus-visible + span { outline: 3px solid rgba(241,196,83,.6); outline-offset: 2px; }
.feedback { min-height: 1.45em; margin: 14px 0 0; font-weight: 600; color: var(--red); }
.feedback.success { color: var(--green); }

.partner-preview { width: min(1120px, 100%); margin: 34px auto 0; padding: 20px 28px; display: grid; grid-template-columns: 1fr 1fr 1.55fr; align-items: center; gap: clamp(24px, 5vw, 64px); border-radius: 16px; background: white; }
.partner-preview img { width: 100%; max-height: 82px; object-fit: contain; }
.partner-preview picture { display: block; }

.stage-head { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.stage-head h2 { margin-bottom: 0; }
.stage-glyph { display: grid; place-items: center; width: 82px; aspect-ratio: 1; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); background: var(--wine); font-size: 2.4rem; box-shadow: var(--shadow); }
.geo-card { margin: 0 0 30px; }
.geo-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid #d8cda8; border-radius: 14px; background: #fff9e8; }
.geo-copy { display: flex; align-items: center; gap: 13px; min-width: 0; }
.geo-pin { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; color: white; background: var(--wine); border-radius: 50%; }
.geo-copy b, .geo-copy small { display: block; }
.geo-copy small { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.geo-button { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--wine); border-radius: 999px; color: var(--wine); background: transparent; font-family: Arial, sans-serif; font-size: .78rem; font-weight: 800; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: 44px; }
.letter-block { width: min(780px, 100%); margin: 0 auto 44px; }
.letter-block .story-callout { margin-bottom: 18px; }
.story-panel, .final-story { max-width: 780px; margin: 0 auto; padding: clamp(24px, 4vw, 46px); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.feature-image, .wide-image { width: 100%; max-height: 620px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.wide-image { max-height: 680px; margin-bottom: 38px; }
.parchment-image { object-fit: contain; background: #eee0bf; }
.photo-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-stack img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; }
.photo-stack img:first-child { grid-column: 1 / -1; height: 260px; }
details { margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { padding: 15px 0; color: var(--wine); font-family: Arial, sans-serif; font-weight: 800; cursor: pointer; }
details p { padding: 0 0 14px; line-height: 1.65; }
.challenge-block { margin-top: 38px; padding: clamp(24px, 5vw, 50px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.84); box-shadow: var(--shadow); }
.reveal-card { margin-top: 28px; padding: clamp(22px, 4vw, 36px); border-left: 5px solid var(--gold); border-radius: 0 16px 16px 0; background: #fff8e2; }
.reveal-card img { margin: 18px 0; }
.story-callout { padding: 14px 17px; border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; color: var(--wine); background: #fff4d0; }
.audio-intro { margin: 4px 0 18px; padding: 15px 18px; border-radius: 12px; color: var(--wine); background: #f4ead5; }
.nightwatch-message { margin: 20px 0 28px; padding: 20px 22px; border: 1px solid #80bdb5; border-radius: 14px; color: #194e49; background: #e5f5f2; }
.nightwatch-message p { margin-bottom: 14px; font-weight: 700; }
.nightwatch-message p:last-child { margin-bottom: 0; }
.hotspot-wrap { position: relative; overflow: hidden; width: min(680px, 100%); margin: 24px auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #ddd; }
.hotspot-wrap img { width: 100%; }
.hotspot { position: absolute; width: 54px; height: 54px; border: 3px solid white; border-radius: 50%; color: var(--wine-deep); background: var(--gold); box-shadow: 0 0 0 8px rgba(241,196,83,.26), 0 8px 22px rgba(0,0,0,.25); animation: pulse 1.8s ease-in-out infinite; }
.hotspot span { position: absolute; left: 50%; top: calc(100% + 12px); width: max-content; max-width: 170px; padding: 7px 10px; border-radius: 7px; color: white; background: rgba(40,16,30,.92); font-family: Arial, sans-serif; font-size: .72rem; font-weight: 800; transform: translateX(-50%); }
.note-hotspot { left: 48%; top: 65%; }
.crown-hotspot { left: 38%; top: 44%; }
@keyframes pulse { 50% { box-shadow: 0 0 0 15px rgba(241,196,83,0), 0 8px 22px rgba(0,0,0,.25); } }
.photo-upload { display: inline-block; margin: 12px 0 5px; padding: 12px 16px; border: 1px dashed var(--wine); border-radius: 10px; color: var(--wine); background: white; font-family: Arial, sans-serif; font-weight: 800; cursor: pointer; }
.photo-upload input { display: block; max-width: 100%; margin-top: 8px; font-weight: 400; }
.photo-preview img { width: min(280px, 100%); margin: 14px 0; border-radius: 12px; }
.zoomable-image { cursor: zoom-in; transition: transform .18s ease, filter .18s ease; }
.zoomable-image:hover { filter: brightness(1.04); transform: translateY(-2px); }
.zoomable-image:focus-visible { outline: 4px solid var(--gold); outline-offset: 4px; }
blockquote { margin: 24px 0; padding: 22px 28px; border-left: 4px solid var(--gold); color: var(--wine); background: var(--paper-2); font-size: 1.1rem; line-height: 1.7; }
.riddle-code { display: inline-block; padding: 12px 16px; border-radius: 10px; background: var(--wine); color: var(--gold-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; }
.text-answer { display: block; margin: 24px 0 14px; color: var(--wine); font-weight: 700; }
.text-answer input { display: block; width: min(440px, 100%); margin-top: 8px; padding: 14px 16px; border: 1px solid #ab999f; border-radius: 10px; background: white; font-family: Arial, sans-serif; font-size: 1rem; }
.text-answer input:focus { outline: 3px solid rgba(241,196,83,.5); border-color: var(--wine); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 13px 20px; border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 700; letter-spacing: .015em; }
.primary-button { border: 1px solid var(--wine); color: white; background: var(--wine); box-shadow: 0 9px 20px rgba(71,27,48,.19); }
.primary-button:hover, .primary-button:focus-visible { background: var(--wine-light); }
.secondary-button { border: 1px solid var(--wine); color: var(--wine); background: white; }
.secondary-button:hover, .secondary-button:focus-visible { color: white; background: var(--wine); }
.external { margin: 6px 0; }
.asset-placeholder { min-height: 220px; margin: 26px 0; padding: 28px; display: grid; place-items: center; align-content: center; gap: 12px; border: 2px dashed #b99aa7; border-radius: 18px; color: var(--wine); background: #fbf4e9; text-align: center; }
.asset-placeholder span { font-size: 3.4rem; color: var(--gold); }
.asset-placeholder figcaption { max-width: 560px; }
.location-photo { margin: 26px 0; }
.location-photo .wide-image { margin-bottom: 10px; }
.location-photo figcaption { color: var(--muted); font-size: .92rem; line-height: 1.5; text-align: center; }

.image-dialog { width: min(1100px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 52px 16px 16px; border: 0; border-radius: 18px; color: white; background: #160b11; box-shadow: 0 30px 100px rgba(0,0,0,.6); }
.image-dialog::backdrop { background: rgba(10, 4, 7, .86); backdrop-filter: blur(4px); }
.image-dialog img { width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 10px; }
.image-dialog p { margin: 12px 5px 0; color: #f5e9dc; text-align: center; }
.image-dialog-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: white; background: rgba(255,255,255,.1); font-size: 1.6rem; line-height: 1; }
.image-dialog-close:hover, .image-dialog-close:focus-visible { color: var(--wine-deep); background: var(--gold); }

/* Start-CTA */
.start-cta { display: flex; margin: 40px auto 0; padding: 18px 42px; font-size: 1.05rem; letter-spacing: .04em; }

/* Rätsel-Hilfen */
.howto { margin: 12px 0 18px; padding-left: 22px; color: var(--ink); }
.howto li { margin: 4px 0; }
.riddle-list { margin: 12px 0 22px; padding-left: 22px; color: var(--ink); }
.riddle-list li { margin: 6px 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95rem; background: var(--paper-2); padding: 6px 10px; border-radius: 6px; border-left: 3px solid var(--gold); }

/* Stadtpark-Bankbild */
.park-bank-image { width: auto; max-width: min(420px, 90%); max-height: 420px; object-fit: contain; margin: 0 auto 32px; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.audio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 34px 0; }
.audio-grid article { padding: 22px; border-radius: 16px; color: white; background: var(--wine); }
.audio-grid article > span { color: var(--gold); font-family: Arial, sans-serif; font-size: .74rem; font-weight: 900; }
.audio-grid h3 { margin: 7px 0 15px; color: white; }
audio { width: 100%; min-height: 42px; }
video { width: 100%; max-height: 620px; margin: 18px 0; border-radius: 14px; background: #171014; }
.inline-quiz fieldset + fieldset { margin-top: 32px; }
.inline-quiz legend { font-size: 1.25rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice-card { min-height: 190px; }
.choice-card > span { display: block; font-size: 2.7rem; }
.branch-gallery { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin: 26px 0; }
.branch-gallery img { width: 100%; height: 300px; object-fit: cover; border-radius: 15px; }
.branch-gallery img + img { height: 210px; align-self: end; }

.vessel-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.vessel-legend span { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--wine); background: var(--paper-2); font-weight: 800; }
.vessel-legend img { width: 90px; height: 65px; object-fit: cover; border-radius: 9px; }
.ingredient-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.ingredient { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.ingredient img { width: 100%; height: 110px; object-fit: cover; }
.ingredient-body { padding: 12px; }
.ingredient b { display: block; margin-bottom: 9px; color: var(--wine); }
.ingredient-controls { display: flex; gap: 6px; }
.ingredient-controls button { flex: 1; padding: 8px 4px; border: 1px solid #b5a6aa; border-radius: 7px; color: var(--ink); background: #f8f3ec; font-family: Arial, sans-serif; font-size: .72rem; font-weight: 800; }
.ingredient-controls button[aria-pressed="true"] { color: white; border-color: var(--wine); background: var(--wine); }

.cinema-hero { position: relative; overflow: hidden; min-height: 430px; margin-bottom: 36px; display: flex; align-items: end; border-radius: var(--radius); box-shadow: var(--shadow); }
.cinema-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30,6,17,.92), rgba(30,6,17,.08) 70%); }
.cinema-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinema-hero div { position: relative; z-index: 1; padding: clamp(30px, 6vw, 70px); }
.cinema-hero h2 { max-width: 760px; color: white; }
.final-story { text-align: center; }
.final-story blockquote { text-align: left; }
.partners { margin-top: 50px; padding: clamp(25px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.partner-grid { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: clamp(24px, 4vw, 55px); align-items: center; }
.partner-grid img { width: 100%; max-height: 120px; object-fit: contain; }
.partner-grid picture img { max-height: 100px; }

.site-footer { min-height: 64px; padding: 18px clamp(16px, 4vw, 60px); display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #dfd2d7; background: var(--wine-deep); font-family: Arial, sans-serif; font-size: .78rem; }
.site-footer button { padding: 7px 0; border: 0; border-bottom: 1px solid #907d85; color: #dfd2d7; background: none; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); width: min(420px, calc(100% - 28px)); padding: 14px 18px; border-radius: 12px; color: white; background: var(--wine-deep); box-shadow: 0 18px 50px rgba(0,0,0,.3); text-align: center; transform: translate(-50%, 140%); transition: transform .28s ease; }
.toast.show { transform: translate(-50%, 0); }
.hidden { display: none !important; }

.team-bar { position: sticky; z-index: 45; top: 78px; width: min(100% - 30px, 1040px); margin: 14px auto 0; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid rgba(241,196,83,.55); border-radius: 15px; color: white; background: rgba(43,14,28,.96); box-shadow: 0 12px 34px rgba(28,7,17,.22); font-family: Arial, sans-serif; }
.team-bar > div:first-child { display: flex; align-items: center; gap: 10px; }
.team-bar b, .team-bar small { display: block; }
.team-bar small { margin-top: 2px; color: #e9dce1; font-size: .72rem; }
.team-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #76c890; box-shadow: 0 0 0 5px rgba(118,200,144,.14); }
.team-dot.offline { background: #d99a78; box-shadow: 0 0 0 5px rgba(217,154,120,.14); }
.team-bar-actions { display: flex; gap: 8px; }
.team-bar button { min-height: 36px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: white; background: rgba(255,255,255,.08); font: 700 .74rem Arial, sans-serif; }
.team-bar button:hover, .team-bar button:focus-visible { background: rgba(255,255,255,.17); }

.team-panel { margin-top: 42px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.team-panel > div:first-child { max-width: 720px; }
.team-panel > div:first-child > p:not(.eyebrow) { color: var(--ink); }
.team-panel h2 { max-width: 760px; margin: 5px 0 12px; font-size: clamp(1.9rem, 3.4vw, 3.2rem); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.team-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.team-choice { min-height: 165px; padding: 20px; border: 1px solid #cdbcc2; border-radius: 16px; color: var(--wine); background: white; text-align: left; box-shadow: 0 8px 25px rgba(50,22,35,.07); }
.team-choice:hover, .team-choice:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.team-choice > span, .team-choice b, .team-choice small { display: block; }
.team-choice > span { margin-bottom: 12px; color: var(--gold-deep); font-size: 2rem; }
.team-choice b { margin-bottom: 7px; font-size: 1rem; }
.team-choice small { color: #685a60; line-height: 1.45; }
.team-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 24px; }
.team-form label { color: var(--wine); font-family: Arial, sans-serif; font-size: .82rem; font-weight: 800; }
.team-form input { width: 100%; margin-top: 7px; padding: 13px 14px; border: 1px solid #ab999f; border-radius: 10px; font: 1rem Arial, sans-serif; }
.team-form input:focus { outline: 3px solid rgba(241,196,83,.5); border-color: var(--wine); }
.team-form-actions, .team-form .feedback { grid-column: 1 / -1; }
.team-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.room-code-input { text-transform: uppercase; letter-spacing: .18em; font-weight: 900 !important; }
.room-ready { margin-top: 24px; padding: 24px; border-left: 5px solid var(--gold); border-radius: 0 14px 14px 0; background: #fff8e2; }
.room-code { margin: 7px 0 10px; color: var(--wine); font: 900 clamp(2.1rem, 7vw, 3.5rem)/1 Arial, sans-serif; letter-spacing: .18em; }

@media (max-width: 820px) {
  .game-header { grid-template-columns: auto 1fr auto; min-height: 68px; padding: 10px 14px; gap: 12px; }
  .brand-button b { font-size: .82rem; }
  .brand-button small, #progress-label { display: none; }
  .crown-mark { width: 38px; }
  .progress-copy { justify-content: flex-end; }
  .hero-grid, .mode-panel, .story-grid { grid-template-columns: 1fr; }
  .hero-crest { width: min(290px, 75vw); }
  .mode-panel { margin-top: 42px; }
  .story-grid { gap: 26px; }
  .story-grid > img { order: -1; }
  .branch-gallery { grid-template-columns: 1fr 1fr; }
  .ingredient-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: 1fr 1fr; }
  .partner-grid picture { grid-column: 1 / -1; }
  .team-bar { top: 68px; }
  .team-choice-grid { grid-template-columns: 1fr; }
  .team-choice { min-height: 120px; }
  .team-panel h2 { font-size: clamp(2rem, 8vw, 3rem); }
  .wide-label { display: none; }
  .short-label { display: inline; }
}

@media (max-width: 560px) {
  .stage { width: min(100% - 22px, 1120px); padding-top: 38px; }
  .hero-stage { width: 100%; padding-left: 12px; padding-right: 12px; }
  h1 { font-size: clamp(2.35rem, 10vw, 3.35rem); line-height: 1.04; overflow-wrap: normal; word-break: normal; hyphens: none; }
  .hero-crest { width: 225px; }
  .mission-card { padding: 17px; }
  .mode-grid, .choice-grid, .audio-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 128px; }
  .quiz-card, .challenge-block { padding: 24px 17px; }
  .coat-of-arms-hint { grid-template-columns: 82px 1fr; gap: 14px; padding: 14px; }
  .partner-preview { grid-template-columns: 1fr 1fr; gap: 18px; padding: 17px; }
  .partner-preview img { max-height: 62px; }
  .partner-preview picture { grid-column: 1 / -1; }
  .partner-preview picture img { max-height: 96px; }
  .stage-head { align-items: flex-end; }
  .stage-glyph { width: 60px; font-size: 1.8rem; }
  .geo-inner { align-items: stretch; flex-direction: column; }
  .geo-button { width: 100%; }
  .photo-stack img, .photo-stack img:first-child { height: 150px; }
  .hotspot { width: 48px; height: 48px; }
  .branch-gallery img, .branch-gallery img + img { height: 190px; }
  .vessel-legend { grid-template-columns: 1fr; }
  .ingredient img { height: 92px; }
  .ingredient-controls { flex-direction: column; }
  .cinema-hero { min-height: 380px; }
  .partner-grid { grid-template-columns: 1fr; }
  .partner-grid picture { grid-column: auto; }
  .partner-grid img { max-height: 95px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .team-bar { width: calc(100% - 20px); align-items: flex-start; flex-direction: column; }
  .team-bar-actions { width: 100%; }
  .team-bar-actions button { flex: 1; }
  .team-form { grid-template-columns: 1fr; }
  .team-form label, .team-form-actions, .team-form .feedback { grid-column: 1; }
  .room-code { font-size: 2rem; }
  .riddle-list li { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
