@charset "UTF-8";
:root { color-scheme: dark; --bg:#12130f; --ink:#3a2b1c; --cream:#fffdf3; --line:#3a3d32; --text:#f7f2e8; --muted:#b4b8a8; --accent:#ffd24a; --orange:#ffb580; --green:#b6d69e; --leaf:#7cb356; --fire:#e5603f; font-family:"Trebuchet MS","Segoe UI",Arial,sans-serif; }
* { box-sizing:border-box; }
html,body { margin:0; height:100%; overflow:hidden; background:var(--bg); color:var(--text); overscroll-behavior:none; }
button,input { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { opacity:.45; cursor:default; }
a { color:inherit; text-decoration:none; }
:focus-visible { outline:3px solid var(--orange); outline-offset:3px; }
.hidden { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
kbd { border:1px solid #ffffff44; background:#0004; color:inherit; font-family:inherit; font-size:.85em; padding:1px 6px; border-radius:4px; }
.game-root { position:fixed; inset:0; }

/* ---------- Menü-Bildschirme (Start & Lobby) ---------- */
.screen { position:absolute; inset:0; display:grid; place-items:center; overflow:auto; padding:70px 28px 28px;
  background:
    radial-gradient(ellipse at center, #0000 0%, #000b 100%),
    conic-gradient(#3b3225 25%, #30291f 0 50%, #3b3225 0 75%, #30291f 0) 0 0 / 96px 96px; }
.screen-corner { position:absolute; top:16px; display:flex; align-items:center; gap:10px; z-index:2; }
.screen-corner.left { left:18px; }
.screen-corner.right { right:18px; }
.pill-link { display:inline-flex; align-items:center; gap:8px; border:2px solid var(--ink); background:var(--cream); color:var(--ink); font-size:13px; font-weight:800; padding:8px 14px; border-radius:99px; box-shadow:0 3px 0 var(--ink); }
.pill-link:hover { background:#fff; }
.pill-link span { display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--ink); color:var(--cream); font-size:11px; }
.screen .language-switch { background:var(--cream); border:2px solid var(--ink); border-radius:99px; box-shadow:0 3px 0 var(--ink); padding:3px; }
.screen .language-switch button { color:var(--ink); border-radius:99px; font-weight:800; font-size:12px; padding:5px 10px; }
.screen .language-switch button[aria-pressed="true"] { background:var(--accent); color:var(--ink); }

.welcome-card { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:36px; align-items:center; width:min(1100px,100%); padding:38px 42px; background:var(--cream); color:var(--ink); border:4px solid var(--ink); border-radius:26px; box-shadow:0 10px 0 var(--ink),0 30px 60px #0008; }
.eyebrow { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:11px; font-weight:800; letter-spacing:2px; color:#b4572d; margin:0 0 14px; }
.prototype { border:2px solid #b4572d; padding:2px 6px; font-size:9px; border-radius:5px; letter-spacing:1.2px; }
h1 { font-size:clamp(38px,5vw,62px); line-height:1.02; letter-spacing:-2px; margin:0; font-weight:900; }
h1>span { color:#e0692f; }
.welcome-description { color:#6a5640; font-size:15px; line-height:1.7; margin:18px 0; }
.feature-tags { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.feature-tags>span { background:#f1e6cf; border:2px solid #d8c8a5; border-radius:99px; padding:5px 12px; font-size:12px; font-weight:700; color:#5a4631; }
.mode-switch { display:inline-flex; gap:6px; padding:4px; background:#efe3cb; border:2.5px solid var(--ink); border-radius:14px; margin-bottom:16px; flex-wrap:wrap; }
.lobby-mode-switch { margin:0 auto 18px; justify-content:center; }
.mode-btn { padding:7px 14px; border:2px solid transparent; border-radius:10px; background:transparent; color:#6a5640; font-size:13px; font-weight:800; transition:background .12s, color .12s; }
.mode-btn.active, .mode-btn[aria-pressed="true"] { background:var(--accent); color:var(--ink); border-color:var(--ink); box-shadow:0 2px 0 var(--ink); }
.button { display:inline-flex; align-items:center; justify-content:center; gap:20px; padding:12px 22px; border-radius:14px; font-size:15px; font-weight:800; border:3px solid var(--ink); min-height:46px; color:var(--ink); background:var(--cream); box-shadow:0 4px 0 var(--ink); transition:transform .08s, box-shadow .08s; }
.button:active:not(:disabled) { transform:translateY(4px); box-shadow:none; }
.primary { background:var(--accent); }
.primary:hover:not(:disabled) { background:#ffdd72; }
.secondary { background:#cfe9bb; }
.secondary:hover:not(:disabled) { background:#dcf1cb; }
.text-button { background:none; border-color:transparent; box-shadow:none; color:#6a5640; }
.text-button:hover { color:var(--ink); }
.solo-note { font-size:12px; color:#8a765f; margin:10px 0 20px; }
.online-box { border-top:3px dashed #d8c8a5; padding-top:18px; }
.online-heading { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.online-heading h2 { font-size:15px; margin:0; font-weight:800; }
.online-dot { width:9px; height:9px; background:var(--leaf); border:2px solid var(--ink); border-radius:50%; }
.online-box label { font-size:12px; font-weight:700; color:#7a6650; margin-right:10px; }
input { border:3px solid var(--ink); background:#fff; color:var(--ink); border-radius:12px; padding:9px 12px; font-size:14px; font-weight:700; max-width:100%; }
input::placeholder { color:#b3a58d; font-weight:600; }
#chef-name { width:200px; }
.room-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:12px; }
.room-actions .button { font-size:13px; padding:9px 14px; min-height:42px; gap:10px; }
.or-label { font-size:12px; color:#8a765f; font-weight:700; }
#join-form { display:flex; gap:8px; }
#room-code { width:96px; text-transform:uppercase; letter-spacing:3px; text-align:center; }
.connection-message { color:#c0431f; font-weight:700; font-size:13px; min-height:18px; margin:10px 0 0; }
.welcome-visual { overflow:hidden; border:4px solid var(--ink); border-radius:20px; transform:rotate(1.5deg); background:#283121; box-shadow:0 6px 0 var(--ink); }
.welcome-visual img { width:100%; height:auto; display:block; }
.visual-caption { padding:16px 20px 18px; color:var(--text); }
.visual-caption>span { color:#a9c28f; font-size:10px; font-weight:800; letter-spacing:2px; display:block; margin-bottom:8px; }
.visual-caption strong { font-size:20px; }
.visual-caption p { color:#c0cdb0; font-size:13px; margin:8px 0 0; }

.lobby-card { width:min(620px,100%); text-align:center; padding:36px 40px; background:var(--cream); color:var(--ink); border:4px solid var(--ink); border-radius:26px; box-shadow:0 10px 0 var(--ink),0 30px 60px #0008; }
.lobby-card .eyebrow { justify-content:center; }
.lobby-card h1 { font-size:clamp(30px,4vw,44px); }
.lobby-intro { color:#6a5640; font-size:15px; line-height:1.6; }
.code-box { display:flex; flex-direction:column; gap:8px; align-items:center; width:260px; margin:22px auto; padding:18px; border-radius:16px; border:3px dashed #7a8c5b; background:#e4f1d6; color:var(--ink); }
.code-box:hover { background:#eef8e3; }
.code-box>span { font-size:11px; font-weight:800; letter-spacing:2px; color:#5b7a3f; }
.code-box strong { font-size:40px; letter-spacing:8px; padding-left:8px; }
.code-box small { color:#6f8858; font-size:12px; font-weight:700; }
.lobby-players { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-bottom:22px; }
.player-pill { display:flex; align-items:center; gap:9px; border:3px solid var(--ink); background:#fff; border-radius:99px; padding:8px 16px; font-size:14px; font-weight:800; }
.player-dot { width:14px; height:14px; border-radius:50%; flex-shrink:0; border:2px solid var(--ink); }
.player-pill small { color:#7a8c5b; font-size:11px; }
.lobby-actions { display:flex; justify-content:center; gap:12px; }
.lobby-note { min-height:20px; color:#7a6650; font-size:13px; }

/* ---------- Spielbildschirm: Volle Breite, echte Arcade-Atmosphäre ---------- */
.play-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background-color: #181411;
  background-image: radial-gradient(ellipse at 50% 45%, #26201b 0%, #14110e 100%);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Obere Leiste: Kompakte Schiene über die gesamte Breite, verdeckt niemals das Spielfeld */
.hud-topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  flex: 0 0 68px;
  height: 68px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px max(16px, env(safe-area-inset-left)) 4px max(16px, env(safe-area-inset-right));
  background: linear-gradient(180deg, rgba(18, 14, 11, 0.95) 0%, rgba(22, 18, 14, 0.85) 100%);
  border-bottom: 2px solid #33271d;
  pointer-events: none;
  overflow: visible;
}
.hud-topbar > * { pointer-events: auto; }

.rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(180deg, #7c7c84, #494950);
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
  border-bottom: 1.5px solid var(--ink);
}

.orders {
  position: relative;
  top: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 680px;
  margin: 0 10px;
}

/* Freischaltungs-Banner in der oberen Leiste: stilvoll und nicht mitten im Spielfeld */
.unlock-banner {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: linear-gradient(135deg, #ffd359, #f59e0b);
  color: #3b2003;
  border: 2.5px solid #3b2003;
  border-radius: 99px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 3px 0 #3b2003;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  pointer-events: none;
  animation: unlockPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.unlock-banner.hidden {
  display: none !important;
}
.unlock-banner .unlock-icon {
  font-size: 18px;
  animation: bounce 0.8s infinite alternate;
}
@keyframes unlockPop {
  0% { transform: translate(-50%, -20px) scale(0.85); opacity: 0; }
  100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}

.order {
  position: relative;
  width: clamp(110px, 13vw, 148px);
  padding: 7px 10px 6px;
  background: #f3ead8;
  color: var(--ink);
  border-radius: 8px;
  border: 2px solid var(--ink);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  transform: rotate(-0.8deg);
}
.order:nth-child(even) { transform: rotate(0.8deg); }
.order:nth-child(3n) { transform: rotate(-0.4deg); }
.order::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #c33;
}
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.order-icon { font-size: 17px; line-height: 1; }
.order-title { font-size: 11px; font-weight: 900; letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-time { font-size: 10px; font-weight: 800; color: #8a6a45; font-variant-numeric: tabular-nums; }
.order-ingredients { margin-top: 2px; font-size: 12px; letter-spacing: 1.5px; text-align: center; white-space: nowrap; line-height: 1.1; }
.order-progress { height: 4px; margin-top: 4px; border-radius: 6px; background: var(--leaf); transition: width .15s linear; }
.order.urgent .order-progress { background: var(--fire); }
.order.urgent { animation: wobble .45s infinite alternate; }
@keyframes wobble { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }

/* Punkte links */
.hud-score {
  position: relative;
  top: 2px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.score-pill, .served-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--accent);
  color: #4a3300;
  border: 2.5px solid #4a3300;
  box-shadow: 0 2px 0 #4a3300;
}
.served-pill {
  background: #f3ead8;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}
.score-pill span, .served-pill span { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; }
.score-pill strong { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.served-pill strong { font-size: 16px; font-weight: 900; }
.mode-tag {
  display: none;
}

/* Uhr und Aktionen rechts */
.hud-top-right {
  position: relative;
  top: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.clock>div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #f3ead8;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}
.clock span { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #8a6a45; }
.clock strong { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock strong.urgent { color: var(--fire); animation: pulse .6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gbtn {
  min-width: 42px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 2.5px solid var(--ink);
  background: #f3ead8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--ink);
}
.gbtn.icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  font-size: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.gbtn.icon span {
  display: block;
  line-height: 1;
}
.gbtn:hover { background: #fff; }
.gbtn:active { transform: translateY(2px); box-shadow: none; }
.gbtn[aria-expanded="true"] { background: var(--accent); }
.gbtn[aria-pressed="false"] { opacity: 0.65; }

/* Spielbereich (Mitte): Liegt komplett frei zwischen Topbar und Bottombar */
.play-area {
  position: relative;
  flex: 1;
  min-height: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.stage-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: #181411;
}

canvas#kitchen-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #181411;
  cursor: pointer;
  touch-action: manipulation;
}

#kitchen-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: block;
}

#kitchen-3d-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.k3d-station-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.k3d-station-badge {
  background: rgba(26, 21, 17, 0.86);
  color: #f2e8d9;
  border: 1.5px solid rgba(204, 164, 114, 0.45);
  border-radius: 9px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.k3d-station-badge.ready {
  background: #2b4d22;
  border-color: #7ed957;
  color: #e6f9dc;
}

.k3d-station-badge.fire {
  background: #c93b22;
  border-color: #ffd24a;
  color: #fffdf3;
  animation: pulse .55s infinite alternate;
}

.k3d-progress {
  width: 56px;
  height: 6px;
  background: #1c1612;
  border: 1.5px solid #6e553e;
  border-radius: 99px;
  overflow: hidden;
}

.k3d-progress-fill {
  height: 100%;
  background: #84d654;
  transition: width 0.08s;
}

.k3d-chef-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(24, 19, 15, 0.9);
  color: #f7efe2;
  border: 1.5px solid #d4a86a;
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Untere Leiste: Dock für Hände & Team über die volle Breite */
.hud-bottombar {
  position: relative;
  z-index: 10;
  width: 100%;
  flex: 0 0 58px;
  height: 58px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px max(16px, env(safe-area-inset-left)) 8px max(16px, env(safe-area-inset-right));
  background: linear-gradient(0deg, rgba(20, 16, 12, 0.75) 0%, rgba(20, 16, 12, 0.3) 60%, transparent 100%);
  pointer-events: none;
  overflow: hidden;
}
.hud-bottombar > * { pointer-events: auto; }

.dock {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 95%;
  height: 100%;
}
.bubble {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  height: 44px;
  max-height: 44px;
  padding: 4px 16px 5px 14px;
  border-radius: 14px;
  background: #cfe9bb;
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}
.hand-title {
  grid-column: 1;
  grid-row: 1;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #4f6e37;
  line-height: 1;
  margin-bottom: 2px;
}
.hand-panel > strong {
  grid-column: 1;
  grid-row: 2;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.1;
}
.hand-panel > p {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #4a5f38;
  max-width: 280px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 10px;
  border-left: 2px solid rgba(58, 43, 28, 0.2);
}
.team-list { display: flex; align-items: center; gap: 8px; }
.team-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 99px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.team-row .player-dot { width: 10px; height: 10px; border-width: 2px; }
.team-row > span:last-child { margin-left: auto; padding-left: 6px; color: #7a6650; font-weight: 700; }
#room-badge { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.85); margin-left: 8px; white-space: nowrap; }

/* Hinweis-Toast: Ausgeblendet, da störend mitten im Spielfeld */
.toast {
  display: none !important;
}

/* Kochbuch-Overlay (Tab halten oder 📖) */
.recipes-panel { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); z-index: 50; }
.recipes-card { width: min(540px, 92%); max-height: 90vh; overflow: auto; padding: 26px 30px; background: var(--cream); color: var(--ink); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 10px 0 var(--ink); transform: rotate(-0.5deg); }
.recipes-card h2 { margin: 0 0 16px; font-size: 26px; }
.recipe { display: flex; gap: 14px; margin: 0 0 14px; align-items: center; }
.recipe-icon { font-size: 32px; }
.recipe h3 { font-size: 16px; margin: 0 0 4px; font-weight: 900; }
.recipe p { font-size: 13px; color: #6a5640; line-height: 1.4; margin: 0; font-weight: 700; }
.unlock-tag { display: inline-block; margin-bottom: 4px; padding: 2px 7px; background: #fdf3d0; color: #8c6008; border: 1.5px solid #d4a93a; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; }
.kitchen-tip { border-top: 2px dashed #d8c8a5; padding-top: 12px; margin-top: 12px; display: flex; gap: 10px; }
.kitchen-tip p { margin: 0; color: #6a5640; font-size: 12px; line-height: 1.5; font-weight: 700; }
.kitchen-tip strong { color: var(--ink); }
.controls-bar p { margin: 12px 0 0; font-size: 12px; color: #6a5640; line-height: 1.9; font-weight: 700; }
.controls-bar p > span { margin: 0 6px; }
.controls-bar kbd { background: #f1e6cf; border-color: #d8c8a5; color: var(--ink); }
.station-controls { font-size: 12px; color: #7a6650; margin-top: 10px; font-weight: 700; }
.station-controls summary { cursor: pointer; }
#station-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#station-buttons button { padding: 7px 10px; border: 2px solid var(--ink); border-radius: 8px; color: var(--ink); background: #f1e6cf; font-size: 11px; font-weight: 800; }

/* Ergebnis */
.result-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(28, 23, 16, 0.85); backdrop-filter: blur(4px); padding: 20px; z-index: 30; }
.result-card { text-align: center; width: min(380px, 100%); padding: 26px; border-radius: 22px; background: var(--cream); color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 10px 0 var(--ink); }
.result-card .eyebrow { justify-content: center; margin-bottom: 10px; font-size: 11px; }
.result-card h2 { font-size: 30px; margin: 0; letter-spacing: -1px; }
.result-stars { font-size: 34px; color: #f3b21c; letter-spacing: 6px; margin: 12px 0 4px; -webkit-text-stroke: 1.5px var(--ink); }
.result-score { font-size: 48px; display: block; font-weight: 900; font-variant-numeric: tabular-nums; }
.result-score-label { font-size: 10px; letter-spacing: 2px; font-weight: 800; color: #8a6a45; }
.result-card > p:not(.eyebrow) { font-size: 13px; color: #6a5640; font-weight: 700; line-height: 1.6; margin: 14px 0; }
.result-card .text-button { display: flex; margin: 8px auto 0; }

/* Hilfe-Dialog */
dialog { border: 4px solid var(--ink); color: var(--ink); background: var(--cream); border-radius: 22px; padding: 30px; width: 540px; max-width: calc(100% - 32px); box-shadow: 0 8px 0 var(--ink), 0 20px 80px rgba(0,0,0,0.7); }
dialog::backdrop { background: rgba(10, 12, 7, 0.85); backdrop-filter: blur(5px); }
dialog h2 { font-size: 28px; margin: 0 0 18px; letter-spacing: -1px; }
dialog ol { padding-left: 21px; font-size: 14px; line-height: 1.7; color: #5a4631; font-weight: 600; }
dialog li { margin-bottom: 10px; padding-left: 4px; }
dialog strong { color: var(--ink); }
.dialog-close { position: absolute; top: 10px; right: 16px; background: none; border: 0; color: #8a6a45; font-size: 30px; }
.help-warning, .help-controls { font-size: 13px; line-height: 1.7; color: #5a4631; padding: 12px 14px; border-radius: 10px; background: #f1e6cf; font-weight: 600; }
.help-warning { color: #7a3b1d; background: #fde0c4; }
dialog kbd { background: #e8dcc0; border-color: #c9b890; }
dialog .primary { margin-top: 8px; }

/* ---------- Responsive ---------- */
@media(max-width: 900px) {
  .welcome-card { grid-template-columns: 1fr; padding: 28px 24px; gap: 22px; }
  .welcome-visual { display: none; }
  .screen { align-items: start; padding-top: 64px; }
}
@media(max-width: 560px) {
  .welcome-card, .lobby-card { padding: 22px 16px; border-radius: 20px; }
  .or-label { display: none; }
  .room-actions { align-items: stretch; }
  .room-actions > .button { width: 100%; }
  #join-form { width: 100%; }
  #join-form input { flex: 1; width: 0; min-width: 70px; }
  #join-form button { flex: 1; }
  .pill-link { font-size: 12px; padding: 6px 10px; }
  .screen-corner.left a span { display: none; }
}

/* Schmale Bildschirme / Mobilgeräte */
@media(max-width: 768px) {
  .hud-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 0 10px 4px;
    flex: 0 0 84px;
    height: 84px;
  }
  .orders { margin: 0 4px; gap: 6px; }
  .order { width: clamp(70px, 18vw, 92px); padding: 10px 4px 6px; }
  .order-title { display: none; }
  .order-icon { font-size: 22px; }
  .order-ingredients { font-size: 11px; letter-spacing: 0; }
  .mode-tag, #room-badge { display: none; }
  .score-pill, .served-pill { padding: 4px 8px; }
  .score-pill strong { font-size: 16px; }
  .served-pill strong { font-size: 14px; }
  .clock>div { width: 56px; height: 56px; border-width: 3px; }
  .clock strong { font-size: 16px; }
  .gbtn { height: 34px; padding: 0 10px; font-size: 11px; }
  .gbtn.icon { width: 34px; min-width: 34px; height: 34px; }
  .hud-bottombar {
    flex: 0 0 48px;
    height: 48px;
    padding: 2px 10px 4px;
  }
  .bubble {
    height: 38px;
    max-height: 38px;
    padding: 2px 10px;
    grid-template-columns: auto;
  }
  .hand-panel > p { display: none; }
  .team-list { display: none; }
}

@media(max-height: 520px) {
  .hud-topbar {
    flex: 0 0 72px;
    height: 72px;
    padding: 0 10px 4px;
  }
  .order { width: 80px; padding: 8px 4px 6px; }
  .order-icon { font-size: 18px; }
  .order-title { display: none; }
  .order-time { font-size: 9px; }
  .order-ingredients { font-size: 10px; letter-spacing: 0; }
  .clock>div { width: 48px; height: 48px; border-width: 3px; }
  .clock strong { font-size: 14px; }
  .clock span { display: none; }
  .score-pill, .served-pill { padding: 3px 8px; }
  .score-pill strong { font-size: 15px; }
  .served-pill strong { font-size: 13px; }
  .hud-bottombar {
    flex: 0 0 42px;
    height: 42px;
    padding: 2px 10px 4px;
  }
  .bubble {
    height: 34px;
    max-height: 34px;
    padding: 2px 8px;
    grid-template-columns: auto;
  }
  .hand-panel > strong { font-size: 12px; }
  .hand-panel > p { display: none; }
}

@media(prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Touch-Layout (Handy/Tablet) ---------- */
html, body { touch-action: manipulation; -webkit-touch-callout: none; }
.touch-controls { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 25; }
.joystick, .touch-action { pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; }
.joystick {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: clamp(110px, 24vmin, 160px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 253, 243, 0.75);
  border: 4px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink);
}
.joystick::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 3px dashed rgba(58, 43, 28, 0.4); }
.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  aspect-ratio: 1;
  margin: -22% 0 0 -22%;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}
.joystick.active { background: rgba(255, 253, 243, 0.95); }
.touch-action {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: clamp(84px, 18vmin, 120px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: var(--accent);
  box-shadow: 0 5px 0 var(--ink);
  font-size: clamp(34px, 8vmin, 50px);
  display: grid;
  place-items: center;
  padding: 0;
}
.touch-action:active { transform: translateY(5px); box-shadow: none; background: #ffdd72; }

@media (pointer: coarse) {
  .touch-controls { display: block; }
  .gbtn { min-height: 40px; }
  .gbtn.icon { width: 44px; min-width: 44px; height: 44px; }
  .screen { -webkit-overflow-scrolling: touch; }
  .button, .pill-link, input { min-height: 48px; }
}

