/* Reisebegleiter: dunkles Schwarz-Gelb wie MartzelMedia, Handy zuerst */
:root {
  --bg: #0d0c0a; --surface: #1a1814; --surface-2: #24211b; --line: #34302a;
  --fg: #f4f0e4; --muted: #a39d8f; --accent: #f6c715; --on-accent: #17140a; --warn: #ff9b6b;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-thai: "Noto Sans Thai", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f2e6; --surface: #fffdf6; --surface-2: #ece6d3; --line: #d9d1ba;
    --fg: #1b1810; --muted: #6a6454; --accent: #c99a00; --on-accent: #17140a; --warn: #b4501f;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f2e6; --surface: #fffdf6; --surface-2: #ece6d3; --line: #d9d1ba;
  --fg: #1b1810; --muted: #6a6454; --accent: #c99a00; --on-accent: #17140a; --warn: #b4501f;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: 80px;
}
.app { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
h1, h2 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: 22px; letter-spacing: -0.01em; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top-r { display: flex; align-items: center; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-small { font-size: 16px; color: var(--muted); font-weight: 500; white-space: nowrap; }
/* Netz-Anzeige: nur Punkt, grün = Internet da, rot = kein Internet */
.dot { width: 12px; height: 12px; border-radius: 50%; background: #3fbf5a; box-shadow: 0 0 0 3px rgba(63, 191, 90, .2); flex: none; }
.dot.off { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .25); }
.brand { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--line); background: #0d0c0a; padding: 5px; display: grid; place-items: center; }
.brand img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand:hover { border-color: var(--accent); }

.bar { display: grid; gap: 8px; }
.me { background: transparent; border: 0; padding: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--fg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.me:hover { color: var(--accent); }
/* Länderkürzel neben dem Namen, öffnet das Menü */
.cc { flex: none; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 6px; padding: 1px 6px; font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.lbl.gap { margin-top: 8px; }
.fix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.fix div { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 3px 4px; text-align: center; line-height: 1.25; font-variant-numeric: tabular-nums; }
.fix b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fix span { display: block; font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; min-width: 0; }
.seg button { background: transparent; border: 0; padding: 6px 8px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--muted); min-width: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.seg.small button { padding: 5px 9px; font-size: 13px; }
.lbl { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; display: block; }

.rate { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.rate strong { color: var(--fg); font-variant-numeric: tabular-nums; font-weight: 600; }
.banner { background: var(--surface); border: 1px solid var(--warn); color: var(--warn); border-radius: 10px; padding: 7px 12px; font-size: 13px; }

.panel { display: flex; flex-direction: column; gap: 10px; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mic { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; position: relative; }
.mic svg { width: 32px; height: 32px; }
.mic .i-stop { display: none; width: 26px; height: 26px; }
.mic.listening .i-mic { display: none; }
.mic.listening .i-stop { display: block; }
.mic::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.mic.listening::after { animation: ring 1.1s ease-out infinite; }
.mic.busy { opacity: .6; }
@keyframes ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mic.listening::after { animation: none; opacity: .7; } }
.status { font-size: 13px; color: var(--muted); min-height: 18px; text-align: center; }
.type { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chips.left { justify-content: flex-start; }
.chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.de { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.target { font-family: var(--font-display); font-size: 25px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.th, [lang="th"] { font-family: var(--font-thai); }
.target[lang="th"] { font-weight: 600; }
.roman { color: var(--accent); font-size: 15px; font-style: italic; }
.roman:empty { display: none; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.keep { background: var(--accent); color: var(--on-accent); border: 0; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; font-size: 13px; color: var(--fg); }
.note { font-size: 12px; color: var(--muted); margin: 0; }
.err { color: var(--warn); min-height: 18px; }

.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form .reg-only { display: flex; flex-direction: column; gap: 10px; }
.form .reg-only[hidden] { display: none !important; }

.tools { display: grid; gap: 6px; }
input[type="text"], input[type="search"], input[type="number"], input[type="password"], select {
  width: 100%; min-width: 0; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font: inherit;
}
.card input[type="text"], .card input[type="password"], .card select, .stage input { background: var(--bg); }
.list { display: flex; flex-direction: column; gap: 6px; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.entry .t { font-weight: 600; overflow-wrap: anywhere; }
.entry .r { grid-column: 1; color: var(--accent); font-size: 13px; font-style: italic; }
.entry .meta { grid-column: 1; font-size: 12px; color: var(--muted); }
.tag { display: inline-block; font-size: 10px; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); margin-right: 6px; color: var(--fg); }
.acts { grid-column: 2; grid-row: 1 / span 3; display: flex; gap: 6px; align-items: center; }
.del { background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: 12px; color: var(--muted); }
.say { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 1px solid var(--accent); color: var(--accent); border-radius: 7px; padding: 4px 8px; font-size: 12px; font-weight: 600; }
.say svg { width: 14px; height: 14px; flex: none; }
.say.on { background: var(--accent); color: var(--on-accent); }
.actions .say { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.empty { color: var(--muted); font-size: 14px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.add input[type="text"], .add .keep, .add .check { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

.calc { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.calc label { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.calc input { font-size: 18px; font-variant-numeric: tabular-nums; background: var(--bg); }
.out { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); z-index: 5; }
.tabs div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tabs button { background: transparent; border: 0; border-radius: 9px; padding: 8px 4px; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(64px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); z-index: 6; }
.toast.show { opacity: 1; }
.foot { font-size: 12px; color: var(--muted); margin: 0; }

.legal { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); }
.legal::backdrop { background: rgba(0, 0, 0, .6); }
.legal-in { display: flex; flex-direction: column; max-height: calc(100dvh - 50px); }
.legal-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.legal-head img { width: 36px; height: 36px; background: #0d0c0a; border-radius: 8px; padding: 5px; }
.legal-head h2, .dlg-h { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--fg); font-weight: 700; }
.legal-head p { margin: 0; font-size: 12px; color: var(--muted); }
.legal-body { overflow-y: auto; padding: 4px 18px 8px; font-size: 13px; line-height: 1.55; }
.legal-body.pad { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.legal-body h3 { font-family: var(--font-display); font-size: 14px; margin: 14px 0 4px; color: var(--accent); }
.legal-body p { margin: 0 0 6px; }
.legal-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.legal-foot .keep { width: 100%; }
.legal-foot.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
