/* smartNFC Hub: gemeinsames Aussehen aller Kundenseiten.
   Die Akzentfarbe kommt pro Kunde aus dem Logo (oder aus config.js) und wird per hub.js in --bh/--bs/--bl gesetzt. */
:root {
  --outer: #e9e9e5;
  --bg: #f5f5f3;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #666662;
  --line: #e1e1dc;
  --soft: #ececE8;
  --logo-ink: #111111;
  --logo-gray: #7d7d79;
  --tl: 36%;
  --tintl: 94%;
  --bh: 150; --bs: 0%; --bl: 22%;
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --accent: hsl(var(--bh) var(--bs) var(--bl));
  --accent-text: hsl(var(--bh) var(--bs) var(--tl));
  --tint: hsl(var(--bh) calc(var(--bs) * .6) var(--tintl));
}
@media (prefers-color-scheme: dark) {
  :root {
    --outer: #0b0b0b; --bg: #131312; --surface: #1d1d1b; --ink: #f5f5f3; --muted: #a5a5a0; --line: #2f2f2c; --soft: #262624;
    --logo-ink: #f5f5f3; --logo-gray: #8f8f8a; --tl: 70%; --tintl: 17%; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--outer); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[hidden] { display: none !important; }

.page { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; overflow: hidden; }
@media (min-width: 520px) { .page { margin-block: 24px; min-height: 0; border-radius: 28px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.35); } }

.cover { height: 150px; position: relative; background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000)); overflow: hidden; }
.cover.photo { background-size: cover; background-position: center; }
.cover svg { position: absolute; right: -60px; top: -50px; width: 260px; height: 260px; fill: none; stroke: #fff; }
.id { padding: 0 20px; margin-top: -44px; position: relative; }
.avatar { width: 88px; height: 88px; border-radius: 50%; background: #fff; border: 4px solid var(--bg); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.12); overflow: hidden; }
.avatar img { width: 56px; height: 56px; object-fit: contain; }
.avatar img.own { width: 100%; height: 100%; object-fit: cover; }
.id h1 { margin: 12px 0 0; font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.id p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.links { display: grid; gap: 10px; padding: 20px 16px 8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; text-decoration: none; color: inherit; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 13px 14px; cursor: pointer; min-width: 0; }
.row:active { transform: scale(.985); }
.row .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.row .t { min-width: 0; flex: 1; }
.row .t b { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; }
.row .t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.row .chev { color: var(--muted); flex: none; }
.row.primary { background: var(--accent); border-color: var(--accent); color: #fff; padding-block: 16px; }
.row.primary .ico { background: rgba(255,255,255,.18); color: #fff; }
.row.primary .t small, .row.primary .chev { color: rgba(255,255,255,.88); }
.stars { display: flex; gap: 2px; margin-top: 4px; }
.stars svg { width: 14px; height: 14px; fill: #fff; stroke: none; }

.socials { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 16px 0; }
.soc { flex: 1 1 0; min-width: 104px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 10px; text-decoration: none; color: inherit; font-weight: 600; font-size: 14px; }
.soc svg { color: var(--accent-text); flex: none; }

.powered { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px 16px 24px; color: var(--muted); font-size: 12px; }
.powered .brandlogo { height: 34px; }
.brandlogo svg { height: 100%; width: auto; display: block; }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.veil { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 8; opacity: 0; pointer-events: none; transition: opacity .2s; }
.veil.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; max-height: 88vh; max-height: 88dvh; z-index: 9; background: var(--surface); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; transform: translateY(102%); transition: transform .26s ease; padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet .sh { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px 6px; }
.sheet .sh h2 { margin: 0; font-size: 19px; font-weight: 800; }
.sheet .x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--soft); font-size: 20px; line-height: 1; cursor: pointer; }
.sheet .sb { overflow-y: auto; padding: 4px 18px 22px; }
@media (prefers-reduced-motion: reduce) { .sheet, .veil, .toast { transition: none; } }

.mtools { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 4px 0 8px; }
.msearch { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 10px 16px; }
.mchips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.mchips::-webkit-scrollbar { display: none; }
.chip { flex: none; white-space: nowrap; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.mcat { margin: 16px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.mitem { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mi { min-width: 0; }
.mi b { font-weight: 600; display: block; }
.mdesc { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.mextra { display: block; font-family: var(--mono); font-size: 11px; color: var(--accent-text); margin-top: 3px; }
.mp { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.sync, .note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

.wifi { display: grid; gap: 10px; }
.kv { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kv small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.kv .v { font-family: var(--mono); font-size: 17px; margin-top: 2px; user-select: all; word-break: break-all; }
.cta { border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 700; padding: 14px 16px; cursor: pointer; width: 100%; font-size: 15px; }
.cta:disabled { opacity: .5; cursor: not-allowed; }
.cta.ghost { background: var(--soft); color: var(--ink); }
.lbl { font-size: 13px; font-weight: 700; margin: 10px 0 4px; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.ta { width: 100%; min-height: 104px; resize: vertical; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 12px; }
.anon { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12.5px; margin: 10px 0 12px; }
.thanks { text-align: center; padding: 18px 6px 6px; }
.thanks .big { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--tint); color: var(--accent-text); display: grid; place-items: center; }
.thanks h3 { margin: 0 0 4px; font-size: 18px; }
.thanks p { margin: 0 0 16px; color: var(--muted); }

.toast { position: fixed; left: 16px; right: 16px; bottom: 18px; max-width: 448px; margin: 0 auto; z-index: 12; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
