@font-face {
  font-family: "Open Sans";
  src: url("assets/open-sans-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("assets/open-sans-Semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("assets/open-sans-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans Condensed";
  src: url("assets/open-sans-CondBold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #101c34;
  --muted: #505c70;
  --paper: #f9f7f2;
  --line: #e5e1d8;
  --blue: #16459c;
  --red: #b71f2b;
  --gold-ink: #946000;
  --gold: #f9ba2d;
  --success: #176445;
  --error: #9c2730;
  --display: "Open Sans Condensed", "Arial Narrow", "Open Sans", sans-serif;
  font-family: "Open Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button:enabled { cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 3px solid #2657a9;
  outline-offset: 4px;
}
h1, h2, h3, p { margin: 0; }
.shell { width: min(100% - 4rem, 72rem); margin-inline: auto; }
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fffefb;
}
.header-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  flex: none;
  width: 46px;
  height: 31px;
  background: url("assets/my-german-doors.png") -34px -26px / 111px 111px no-repeat;
  mix-blend-mode: multiply;
}
.brand-name {
  font: 700 1.15rem/0.94 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.022em;
}
.brand-name span { display: block; }
.button {
  min-height: 2.75rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.63rem 0.95rem;
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}
.button-quiet { background: white; border-color: var(--line); }
.button-quiet:hover { background: #f3f5fa; border-color: #c9d3e3; }
.help-mark {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid #6b7687;
  border-radius: 50%;
  font-size: 0.73rem;
}
.intro { padding: 1.9rem 0 1.65rem; }
.eyebrow {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.intro h1 {
  margin: 0.06em 0 0.13em;
  font: 700 clamp(4rem, 8vw, 6.6rem)/0.99 var(--display);
  letter-spacing: -0.043em;
}
.ink-blue { color: var(--blue); }
.ink-red { color: var(--red); }
.ink-gold { color: var(--gold-ink); }
.intro > p:last-child { font-size: 1.06rem; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 19.25rem);
  align-items: start;
  gap: 1.35rem;
}
.game, .side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 3px 0 #19132208;
}
.game { overflow: hidden; }
.game-top { padding: 1rem 1.35rem 0.95rem; }
.round-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.875rem;
  font-weight: 800;
}
.score {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border-radius: 1rem;
  background: #fff4d5;
  color: #604616;
  padding: 0.21rem 0.6rem;
  font-size: 0.875rem;
  white-space: nowrap;
}
.score-star { color: #896000; font-family: system-ui, sans-serif; }
.progress {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.34rem;
  margin-top: 0.6rem;
}
.progress span { height: 0.26rem; border-radius: 1rem; background: #e9e9ea; }
.progress .is-current { background: #7997d1; }
.progress .is-right { background: var(--blue); }
.progress .is-wrong { background: #bf5860; }

.stage {
  padding: 1.22rem 1.3rem 1rem;
  border-block: 1px solid #eeebe3;
  background-color: #fbfaf6;
  background-image: radial-gradient(ellipse at 50% 46%, #fffefa 13%, #fbfaf600 76%), radial-gradient(#dedad094 0.65px, transparent 0.7px);
  background-size: auto, 11px 11px;
  text-align: center;
}
.prompt { margin-bottom: 1.1rem; }
.prompt-kicker { font-size: 0.9rem; font-weight: 800; color: var(--muted); }
.prompt h2 {
  margin: 0.16rem 0 0.11rem;
  font: 700 clamp(2.9rem, 7vw, 4.7rem)/1 var(--display);
  letter-spacing: -0.027em;
  overflow-wrap: anywhere;
}
.prompt h2:focus, .summary h2:focus { outline: none; }
.gloss { min-height: 1.35rem; font-size: 0.94rem; color: var(--muted); }

.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
  gap: clamp(0.55rem, 3.4vw, 2.5rem);
  width: min(100%, 37rem);
  margin-inline: auto;
}
.door {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.57rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  padding: 0.3rem 0.1rem 0.1rem;
  touch-action: manipulation;
}
.door-blue {
  --color: #2458b7;
  --shade: #13347c;
  --shadow: #10265b;
  --light: #7b9add;
  --tint: #e8effb;
  --label: #173d88;
}
.door-red {
  --color: #cf363d;
  --shade: #991d2b;
  --shadow: #711927;
  --light: #fb8880;
  --tint: #fae9e9;
  --label: #a11f2b;
}
.door-gold {
  --color: #ffca49;
  --shade: #e6a11d;
  --shadow: #956110;
  --light: #ffe08a;
  --tint: #fff2cb;
  --label: #704600;
}
.door-frame {
  position: relative;
  display: block;
  width: min(100%, 8.1rem);
  aspect-ratio: 0.65;
  border: 0.22rem solid var(--shadow);
  border-top-color: var(--shade);
  border-radius: 0.15rem 0.15rem 0.07rem 0.07rem;
  padding: 0.28rem;
  background: linear-gradient(115deg, var(--light), var(--color) 57%, var(--shade));
  box-shadow: 0 5px 0 -2px #2b1e161f, 0 10px 9px -7px #2b1e1659;
  perspective: 27rem;
  transition: translate 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.door-leaf, .door-light {
  position: absolute;
  inset: 0.23rem;
  border: 1px solid var(--shadow);
}
.door-light {
  display: grid;
  place-items: center end;
  padding-right: 12%;
  color: #0f5c38;
  background: linear-gradient(135deg, #c8e3c8, #eaf7e8);
  box-shadow: inset 3px 0 8px #183f392c;
  font: 800 clamp(1.1rem, 4vw, 2rem)/1 system-ui, sans-serif;
}
.door-leaf {
  transform-origin: left center;
  transition: transform 360ms cubic-bezier(.22, .76, .31, 1);
  background: linear-gradient(102deg, var(--light) -39%, var(--color) 60%, var(--shade) 131%);
  box-shadow: inset 0 0 0 1px var(--light);
}
.door-panel {
  position: absolute;
  inset-inline: 16% 19%;
  border: 1px solid var(--shadow);
  box-shadow: 0 1px 0 var(--light), inset 0 0 0 2px var(--light), inset 0 0 0 3px var(--shade);
  background: linear-gradient(128deg, var(--color) 14%, var(--shade) 125%);
}
.door-panel.upper { top: 9%; height: 43%; border-radius: 50% 50% 0 0 / 0.38rem 0.38rem 0 0; }
.door-panel.lower { bottom: 9%; height: 30%; }
.door-knob {
  position: absolute;
  right: 7%;
  top: 53%;
  width: 22%;
  height: 4%;
  min-height: 4px;
  border-radius: 30% 47% 47% 30%;
  background: linear-gradient(#ffebba, #b5791c);
  box-shadow: 0 1px 1px #140e10aa;
}
.door-knob::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -50%;
  width: 37%;
  height: 196%;
  background: #462d16;
  border: 1px solid #e6b457;
  border-radius: 30%;
  z-index: -1;
}
.door-caption {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  justify-content: center;
  min-height: 2.24rem;
  min-width: min(100%, 5.15rem);
  padding: 0.12rem 0.48rem 0.21rem;
  border-radius: 0.5rem;
  color: var(--label);
  background: var(--tint);
}
.door-label { font: 700 1.65rem/1 var(--display); }
.shortcut {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.17rem;
  color: #535d70;
  background: #ffffffb3;
  border: 1px solid #0002;
  border-radius: 0.25rem;
  font: 600 0.75rem/1 "Open Sans", sans-serif;
}
.door-result { display: none; font-family: system-ui, sans-serif; font-weight: 800; }
.door:enabled:hover .door-frame, .door:focus-visible .door-frame { translate: 0 -4px; box-shadow: 0 12px 13px -8px #2b1e1677; }
.door.is-open .door-leaf { transform: rotateY(-65deg); }
.door.is-open .door-caption { color: var(--success); background: #e7f4e8; }
.door.is-wrong .door-caption { color: var(--error); background: #fae9e9; }
.door.is-inactive .door-frame { opacity: 0.6; }
.door.is-open .door-result, .door.is-wrong .door-result { display: inline; }
.door:disabled .shortcut { display: none; }

.answer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.86rem 1.35rem;
  min-height: 5.15rem;
}
.feedback { display: flex; align-items: flex-start; gap: 0.65rem; }
.feedback-icon {
  flex: 0 0 1.75rem;
  height: 1.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #ecf0f7;
  color: var(--blue);
  font: 800 1rem/1 system-ui, sans-serif;
}
.feedback[data-state="right"] .feedback-icon { background: #e7f4e8; color: var(--success); }
.feedback[data-state="wrong"] .feedback-icon { background: #fae9e9; color: var(--error); }
.feedback-title { font-size: 0.92rem; font-weight: 800; line-height: 1.4; padding-top: 0.18rem; }
.feedback-note { color: var(--muted); font-size: 0.88rem; line-height: 1.53; margin-top: 0.18rem; }
.feedback-note:empty { display: none; }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover:enabled { background: #243c69; }
.button-primary:disabled { background: #e9e9e8; color: #5f6774; }
.next-button { flex: 0 0 auto; min-width: 8.75rem; }

.sidebar { display: grid; gap: 0.95rem; }
.side-card { padding: 1.12rem; }
.side-card h2 { font: 700 1.6rem/1.08 var(--display); }
.mode-options { display: grid; gap: 0.44rem; margin-top: 0.8rem; }
.mode {
  display: grid;
  grid-template-columns: 1.85rem minmax(0, 1fr) 0.875rem;
  align-items: center;
  gap: 0.56rem;
  border: 1px solid transparent;
  border-radius: 0.66rem;
  padding: 0.53rem 0.45rem;
  background: transparent;
  text-align: left;
}
.mode:hover { background: #f7f7f7; }
.mode[aria-pressed="true"] { border-color: #c7d5ef; background: #edf3fd; }
.mode strong, .mode small { display: block; }
.mode strong { font-size: 0.94rem; font-weight: 800; }
.mode small { margin-top: 0.13rem; font-size: 0.875rem; line-height: 1.38; color: var(--muted); }
.mode-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.85rem;
  height: 1.85rem;
  gap: 2px;
  border-radius: 0.4rem;
  background: #f6f2e9;
}
.mix-icon { background: #dfe9fb; }
.mix-icon span { width: 4px; height: 11px; border-radius: 1px; background: var(--blue); }
.mix-icon span:nth-child(2) { background: var(--red); }
.mix-icon span:nth-child(3) { background: #df9d16; }
.suffix-icon { color: var(--red); font-weight: 800; font-size: 1.15rem; padding-bottom: 0.35rem; }
.pair-icon span { width: 7px; height: 11px; border: 1.5px solid #825e18; border-radius: 1px; }
.mode-indicator { width: 0.8rem; height: 0.8rem; border: 1px solid #a8abba; border-radius: 50%; }
.mode[aria-pressed="true"] .mode-indicator { border: 4px solid var(--blue); background: white; }
.method { background: #fffcf1; border-color: #ede2c5; }
.method-stripe { display: flex; gap: 3px; margin-bottom: 0.62rem; }
.method-stripe i { display: block; width: 1rem; height: 0.22rem; border-radius: 2px; background: var(--blue); }
.method-stripe i:nth-child(2) { background: var(--red); }
.method-stripe i:nth-child(3) { background: var(--gold); }
.method p { margin-top: 0.54rem; font-size: 0.95rem; color: #514c43; line-height: 1.54; }
.rules-button { padding-inline: 0; margin-top: 0.26rem; color: #183e88; text-align: left; text-decoration: underline; text-underline-offset: 0.18em; background: transparent; }
.rules-button:hover { color: #09204e; }
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-block: 0.9rem 1.1rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer span:first-child { font-weight: 600; }

.summary { margin: 0; border-top: 1px solid #eeebe3; padding: 2rem 1.35rem; text-align: center; }
.summary-mark { display: inline-flex; gap: 0.35rem; margin-bottom: 0.85rem; }
.summary-mark span { width: 0.9rem; height: 1.35rem; border-radius: 0.1rem; background: var(--blue); }
.summary-mark span:nth-child(2) { background: var(--red); }
.summary-mark span:nth-child(3) { background: var(--gold); }
.summary h2 { font: 700 clamp(2.5rem, 6vw, 3.7rem)/1 var(--display); }
.summary-score { margin: 0.65rem 0 1.1rem; font-weight: 800; }
.review { width: min(100%, 29rem); margin: 0 auto 1.1rem; padding: 0.85rem; border-radius: 0.65rem; background: #f6f5f0; text-align: left; }
.review h3 { font-size: 1rem; }
.review ul { margin: 0.5rem 0 0; padding-left: 1.3rem; }
.review li + li { margin-top: 0.22rem; }

dialog {
  width: min(100% - 1.75rem, 33rem);
  max-height: calc(100% - 1.75rem);
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 55px #10192836;
}
dialog::backdrop { background: #0c17297d; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 0.55rem; margin-bottom: 0.65rem; }
.dialog-heading h2 { font: 700 2rem/1.05 var(--display); }
.close-dialog { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.45rem; }
.close-dialog:hover { background: #f3f5fa; }
dialog p, .help-steps { line-height: 1.5; }
.help-steps { margin: 0.8rem 0; padding-left: 1.35rem; }
.help-steps li + li { margin-top: 0.6rem; }
.dialog-aside { margin-block: 0.8rem; border-left: 3px solid var(--gold); padding: 0.45rem 0.7rem; background: #fffae9; }
.rules-table { width: 100%; border-collapse: collapse; margin-block: 0.8rem; font-size: 0.9rem; text-align: left; }
.rules-table th, .rules-table td { padding: 0.4rem 0.45rem; border-bottom: 1px solid var(--line); }
.rules-table th { background: #eff3fa; }
.rules-table td:nth-child(2) { font-weight: 800; }
.sources { font-size: 0.875rem; color: var(--muted); }
.sources a { color: var(--blue); text-underline-offset: 0.18em; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 0.9rem; }

@media (max-width: 58rem) {
  .shell { width: min(100% - 2rem, 46rem); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 36rem) {
  .shell { width: calc(100% - 1.25rem); }
  .header-inner { min-height: 3.7rem; padding-inline: 0.2rem; }
  .intro { padding: 1.14rem 0.22rem 1.15rem; }
  .intro h1 { font-size: clamp(3.65rem, 13vw, 4.9rem); }
  .intro > p:last-child { font-size: 1rem; }
  .layout { gap: 0.9rem; }
  .game-top { padding: 0.74rem 0.82rem 0.72rem; }
  .stage { padding: 0.93rem 0.7rem 0.77rem; }
  .prompt { margin-bottom: 0.65rem; }
  .prompt h2 { font-size: clamp(2.75rem, 11vw, 4.05rem); }
  .doors { gap: 0.68rem; max-width: 26rem; }
  .door-frame { width: min(93%, 6.7rem); }
  .door-caption { gap: 0.34rem; }
  .answer-bar { align-items: stretch; flex-direction: column; gap: 0.58rem; padding: 0.72rem 0.8rem; }
  .next-button { width: 100%; }
  .sidebar { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .mode { padding: 0.55rem; }
  .mode small { line-height: 1.3; }
  .site-footer { margin-top: 0.95rem; }
}
@media (max-width: 21rem) {
  .door-leaf, .door-light { inset: 0.15rem; }
  .door-frame { border-width: 0.17rem; }
  .door-caption { min-width: 3.4rem; }
  .stage { padding-inline: 0.55rem; }
}
@media (pointer: coarse) {
  .shortcut { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
