/* MS Info Channel - Spiele-Shell (Petrol #1A4D3E, Gold #D4AF37). Praefix g-. Kein Framework, keine Fremdquellen ausser Schrift. */
:root {
  --g-petrol: #1A4D3E; --g-petrol-d: #0f3128; --g-petrol-dd: #0a1f19; --g-petrol-l: #2a6b58;
  --g-gold: #D4AF37; --g-gold-l: #e8c65a; --g-text: #eef4f0; --g-muted: #a9bbb0;
  --g-ok: #5fd38d; --g-bad: #ff8a7a; --g-line: rgba(255,255,255,.14);
  --g-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --g-head: 'Playfair Display', Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.g-body { min-height: 100vh; min-height: 100dvh; font-family: var(--g-font); color: var(--g-text);
  background: radial-gradient(1200px 700px at 50% -10%, var(--g-petrol) 0%, var(--g-petrol-d) 55%, var(--g-petrol-dd) 100%) fixed;
  overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
.g-wrap { width: min(920px, 100% - 24px); margin: 0 auto; padding: 10px 0 28px; }
.g-top { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.g-back { color: var(--g-gold-l); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border: 1px solid var(--g-line); border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; }
.g-back:hover { background: rgba(212,175,55,.14); }
.g-title { font-family: var(--g-head); font-size: clamp(1.25rem, 4.5vw, 1.8rem); margin: 0; flex: 1; color: #fff; }
.g-title span { color: var(--g-gold); }
.g-best { font-size: .85rem; color: var(--g-muted); white-space: nowrap; }
.g-best b { color: var(--g-gold-l); }
.g-panel { background: rgba(255,255,255,.05); border: 1px solid var(--g-line); border-radius: 16px; padding: 14px; }
.g-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.g-stat { flex: 1 1 70px; background: rgba(0,0,0,.25); border: 1px solid var(--g-line); border-radius: 12px; padding: 6px 10px; text-align: center; min-width: 64px; }
.g-stat small { display: block; color: var(--g-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.g-stat b { font-size: 1.1rem; color: #fff; font-variant-numeric: tabular-nums; }
.g-btn { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--g-line); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 10px 18px; min-height: 44px; transition: transform .12s, background .12s; touch-action: manipulation; }
.g-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.g-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.g-btn.g-gold, .g-btn.g-primary { background: linear-gradient(135deg, var(--g-gold), var(--g-gold-l)); color: #10261d; border-color: transparent; }
.g-btn.g-on { background: var(--g-gold); color: #10261d; border-color: transparent; }
.g-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 10px 0; }
.g-center { text-align: center; }
.g-menu { text-align: center; padding: 18px 8px; }
.g-menu h2 { font-family: var(--g-head); margin: 0 0 6px; font-size: 1.5rem; }
.g-menu p { color: var(--g-muted); margin: 0 auto 14px; max-width: 46ch; line-height: 1.5; }
.g-diff { display: grid; gap: 8px; max-width: 360px; margin: 0 auto; }
.g-overlay { position: fixed; inset: 0; background: rgba(5,20,15,.82); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.g-modal { background: var(--g-petrol-d); border: 1px solid var(--g-gold); border-radius: 18px; padding: 22px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 18px 60px rgba(0,0,0,.5); }
.g-modal h3 { font-family: var(--g-head); font-size: 1.6rem; margin: 0 0 8px; color: var(--g-gold-l); }
.g-modal p { color: var(--g-text); margin: 6px 0; }
.g-modal .g-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.g-modal-back { color: var(--g-gold-l); }
.g-hidden { display: none !important; }
.g-note { font-size: .8rem; color: var(--g-muted); text-align: center; margin-top: 14px; line-height: 1.5; }
.g-note a { color: var(--g-gold-l); }
.g-help { font-size: .85rem; color: var(--g-muted); text-align: center; margin: 6px 0; }
.g-canvas { display: block; width: 100%; height: auto; border-radius: 14px; background: rgba(0,0,0,.3); touch-action: none; -webkit-user-select: none; user-select: none; }
.g-noselect { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.g-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--g-gold); color: #10261d; font-weight: 700; padding: 8px 16px; border-radius: 999px; z-index: 60; }
@media (max-width: 480px) { .g-wrap { width: calc(100% - 16px); } .g-panel { padding: 8px; border-radius: 12px; } .g-stat b { font-size: 1rem; } }
/* Handy-Vollhoehe (siehe games.js G.fit): Spielfeld fuellt 100dvh, kein Scrollen/Zoomen/Pull-to-refresh im Spiel */
.g-touch .g-keys { display: none; }
.g-touch-hint { display: none; }
.g-fillbox { display: contents; }
.g-touch .g-touch-hint { display: block; font-size: .85rem; color: var(--g-muted); text-align: center; margin: 6px 0; }
@media (max-width: 820px) {
  body.g-fit { overflow: hidden; overscroll-behavior: none; height: 100vh; height: 100dvh; min-height: 0; }
  body.g-fit .g-wrap { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 2px 0 6px; }
  body.g-fit .g-top { padding: 2px 0; flex: none; gap: 6px; }
  body.g-fit .g-back { min-height: 36px; padding: 4px 10px; }
  body.g-fit .g-title { font-size: 1.1rem; }
  body.g-fit .g-note, body.g-fit .g-keys { display: none; }
  body.g-fit #game { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: 6px; overscroll-behavior: none; overflow: hidden; }
  body.g-fit #game > * { flex: none; }
  body.g-fit #game > .g-playwrap:not(.g-hidden) { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  body.g-fit #game > .g-fillbox { flex: 1 1 0; min-height: 0; display: grid; place-items: center; container-type: size; overflow: hidden; }
  body.g-fit .g-fillbox > * { width: min(100cqw, calc(100cqh * var(--ar, 1))) !important; max-width: none !important; max-height: none !important; height: auto; margin: 0 !important; touch-action: none; }
  body.g-fit #game > .g-mj-fit { flex: 1 1 0; min-height: 0; }
  body.g-fit #game > .g-sol { flex: 1 1 0; min-height: 0; max-width: none; margin: 0; overflow: hidden; }
  body.g-fit .g-cw-lists { display: none; }
  /* Kreuzwortraetsel: Felder mindestens ~34 px gross; groesseres Gitter wird verschiebbar statt winzig. */
  body.g-fit #game > .g-fillbox.g-cw-fill { overflow: auto; align-items: start; justify-items: safe center; -webkit-overflow-scrolling: touch; }
  body.g-fit .g-cw-kb { gap: 4px; margin: 2px auto; }
  body.g-fit .g-cw-key { height: 36px; }
  body.g-fit .g-cw-menurow { display: none; }
  body.g-fit .g-cw-fill > * { width: max(min(100cqw, calc(100cqh * var(--ar, 1))), calc(var(--cols, 10) * 34px)) !important; touch-action: pan-x pan-y; }
  body.g-fit .g-cw-kb { width: 100%; }
  body.g-fit .g-playwrap > .g-st-tap { border-radius: 28px; }
  body.g-fit #game > .g-reflex-pad { flex: 1 1 0; min-height: 0; height: auto; }
  body.g-fit .g-playwrap > .g-st-tap { flex: 1 1 0; min-height: 0; height: auto; }
  body.g-fit .g-stats { flex: none; margin: 0 0 6px; gap: 6px; flex-wrap: nowrap; }
  body.g-fit .g-stat { flex: 1 1 0; min-width: 0; padding: 3px 6px; }
  body.g-fit .g-stat small { font-size: .6rem; letter-spacing: .04em; }
  body.g-fit .g-touch-hint { display: none; }
  body.g-fit .g-row { flex: none; margin: 6px 0 0; gap: 6px; }
  body.g-fit .g-btn { padding: 6px 10px; min-height: 40px; font-size: .88rem; }
  body.g-fit .g-canvas.g-fill { flex: 1 1 0; min-height: 0; width: 100%; height: auto; max-width: none; max-height: none; margin: 0; object-fit: contain; touch-action: none; overscroll-behavior: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
