/* Kuddelmuddel 3D – Oberfläche. Touch zuerst: große Knöpfe, sichere Ränder (Notch), keine Hover-Abhängigkeit. */
:root {
  --ink: #1f2933;
  --ink2: #52606d;
  --paper: #fffdf7;
  --panel: rgba(255, 253, 247, 0.94);
  --panel-dark: rgba(22, 44, 60, 0.86);
  --teal: #1d3b4f;
  --teal2: #2b5876;
  --accent: #ff7a59;
  --accent2: #f25f3a;
  --yellow: #ffd166;
  --mint: #3ecf8e;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(10, 30, 50, 0.25), 0 2px 6px rgba(10, 30, 50, 0.15);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dock-h: 74px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #a9d6ef; color: var(--ink); font-family: var(--font); }
body { position: fixed; inset: 0; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
#app { position: absolute; inset: 0; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.hidden { display: none !important; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; -webkit-user-select: text; user-select: text; }

/* ------------------------------------------------------------ Start */
#boot { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 35%, #2f6f8f, #12293a); color: #fff; transition: opacity .5s; }
#boot.fade { opacity: 0; pointer-events: none; }
.boot-logo { font-size: clamp(34px, 8vw, 64px); font-weight: 900; letter-spacing: -1px; text-shadow: 0 4px 0 #0b1a25; }
.boot-logo span { color: var(--yellow); margin-left: 8px; }
.boot-sub { opacity: .8; }
.boot-bar { width: min(320px, 70vw); height: 10px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 5%; background: linear-gradient(90deg, var(--yellow), var(--accent)); border-radius: 99px; transition: width .3s; }

/* ------------------------------------------------------------ Knöpfe */
.btn { appearance: none; border: 0; border-radius: 14px; padding: 12px 18px; min-height: 46px; font-size: 16px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent2)); box-shadow: 0 4px 0 #c2410c, 0 6px 14px rgba(0,0,0,.18); transition: transform .08s, box-shadow .08s, filter .15s; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c2410c, 0 2px 6px rgba(0,0,0,.2); }
.btn:disabled { filter: grayscale(1) opacity(.55); cursor: not-allowed; }
.btn.ghost { background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 4px 0 #cbd2d9, 0 6px 14px rgba(0,0,0,.12); }
.btn.ghost:active { box-shadow: 0 1px 0 #cbd2d9; }
.btn.blue { background: linear-gradient(180deg, #4f9cf9, #2563eb); box-shadow: 0 4px 0 #1e40af, 0 6px 14px rgba(0,0,0,.18); }
.btn.green { background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: 0 4px 0 #166534, 0 6px 14px rgba(0,0,0,.18); }
.btn.red { background: linear-gradient(180deg, #f87171, #dc2626); box-shadow: 0 4px 0 #991b1b, 0 6px 14px rgba(0,0,0,.18); }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: 14px; border-radius: 12px; }
.btn.big { min-height: 58px; font-size: 19px; padding: 14px 26px; border-radius: 18px; }
.btn.wide { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; background: #eef2f7; font-size: 12px; font-weight: 700; color: var(--ink2); }
.tag.good { background: #dcfce7; color: #166534; } .tag.bad { background: #fee2e2; color: #991b1b; } .tag.warn { background: #fef3c7; color: #92400e; }
.meter { height: 8px; border-radius: 99px; background: #e4e7eb; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--mint); border-radius: 99px; }

/* ------------------------------------------------------------ HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
.topbar { position: absolute; top: calc(8px + var(--sat)); left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); display: flex; gap: 8px; align-items: flex-start; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.chip { display: flex; align-items: center; gap: 6px; background: var(--panel); border-radius: 14px; padding: 7px 12px; box-shadow: var(--shadow); font-weight: 800; font-size: 16px; white-space: nowrap; min-height: 42px; }
.chip .ico { font-size: 18px; }
.chip.money.neg { color: var(--red); }
.chip.flash { animation: flash .6s; }
@keyframes flash { 0% { transform: scale(1); } 30% { transform: scale(1.12); background: #fff7cc; } 100% { transform: scale(1); } }
.chip.date { font-weight: 700; font-size: 14px; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 12px; line-height: 1.15; }
.chip.date b { font-size: 15px; }
.daybar { width: 100%; height: 4px; border-radius: 9px; background: #e4e7eb; margin-top: 3px; overflow: hidden; }
.daybar i { display: block; height: 100%; background: var(--yellow); }
.goalchip { cursor: pointer; flex-direction: column; align-items: stretch; gap: 3px; min-width: 120px; padding: 6px 12px; }
.goalchip .gl { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink2); }
.goalchip .meter { height: 6px; }
.speed { display: flex; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin-left: auto; }
.speed button { border: 0; background: transparent; min-width: 44px; height: 42px; font-size: 15px; font-weight: 900; color: var(--ink2); cursor: pointer; }
.speed button.on { background: var(--teal); color: #fff; }
.speed1 { display: none; min-width: 52px; height: 42px; border: 0; border-radius: 14px; background: var(--teal); color: #fff; font-weight: 900; font-size: 15px; box-shadow: var(--shadow); margin-left: auto; cursor: pointer; }
.speed1.paused { background: var(--accent2); }
.iconbtn { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--panel); box-shadow: var(--shadow); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.iconbtn:active { transform: scale(.94); }
.iconbtn.on { background: var(--yellow); }
.camctl { position: absolute; right: calc(10px + var(--sar)); bottom: calc(var(--dock-h) + 22px + var(--sab)); display: flex; flex-direction: column; gap: 8px; }
.dock { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sab)); display: flex; gap: 6px; background: var(--panel-dark); padding: 7px; border-radius: 22px; box-shadow: var(--shadow); max-width: calc(100vw - 16px - var(--sal) - var(--sar)); overflow-x: auto; scrollbar-width: none; }
.dock::-webkit-scrollbar { display: none; }
.dock button { flex: 0 0 auto; border: 0; background: rgba(255,255,255,.08); color: #fff; border-radius: 16px; width: 72px; height: 60px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 800; letter-spacing: .2px; }
.dock button .ico { font-size: 25px; line-height: 1; }
.dock button.on { background: var(--yellow); color: var(--ink); }
.dock button:active { transform: scale(.94); }
.dock .badge { position: absolute; }

/* Werkzeugleiste beim Bauen */
.toolbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sab)); background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100vw - 16px)); }
.toolbar .tt { font-weight: 900; font-size: 16px; }
.toolbar .th { font-size: 14px; color: var(--ink2); }
.toolbar .row { flex-wrap: nowrap; }
.toolbar .row .btn { flex: 1; padding-left: 8px; padding-right: 8px; }

/* Berater */
.advisor { position: absolute; left: calc(10px + var(--sal)); bottom: calc(var(--dock-h) + 24px + var(--sab)); display: flex; align-items: flex-end; gap: 8px; max-width: min(520px, calc(100vw - 90px)); transition: transform .3s, opacity .3s; }
.advisor.off { transform: translateY(20px); opacity: 0; pointer-events: none; }
.advisor canvas { flex: 0 0 auto; border-radius: 50%; box-shadow: var(--shadow); background: #fff; }
.advisor .say { background: var(--paper); border-radius: 18px 18px 18px 4px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.35; position: relative; cursor: pointer; }
.advisor .say b { display: block; font-size: 12px; color: var(--ink2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.advisor .say.warn { background: #fff8e1; } .advisor .say.bad { background: #ffeceb; } .advisor .say.good { background: #ecfdf3; } .advisor .say.tip { background: #f3efff; }
.advisor .more { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: var(--ink2); }

/* Infokarte (Auswahl) */
.card { position: absolute; right: calc(10px + var(--sar)); top: calc(62px + var(--sat)); width: min(340px, calc(100vw - 20px)); max-height: calc(100% - 62px - var(--dock-h) - 40px - var(--sat) - var(--sab)); overflow: auto; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.card h3 { margin: 0; font-size: 18px; }
.card .x { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 12px; border: 0; background: #eef2f7; font-size: 18px; cursor: pointer; }
.card .head { display: flex; gap: 10px; align-items: center; padding-right: 34px; }
.card .face { border-radius: 50%; flex: 0 0 auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 14px; align-items: center; }
.kv > :nth-child(odd) { color: var(--ink2); font-weight: 700; }
.joke { font-style: italic; color: var(--ink2); font-size: 14px; background: #f6f3ea; border-radius: 12px; padding: 8px 10px; }

/* Panels (Bau, Personal …) */
.sheet-wrap { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 25, 40, .28); animation: fadeIn .18s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { background: var(--paper); width: min(820px, 100vw); max-height: min(86vh, 900px); border-radius: 24px 24px 0 0; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.9,.3,1.2); padding-bottom: var(--sab); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 760px) and (min-height: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 24px; max-height: 86vh; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.sheet-head h2 { margin: 0; font-size: 21px; flex: 1; }
.sheet-head .x { width: 42px; height: 42px; border-radius: 14px; border: 0; background: #eef2f7; font-size: 20px; cursor: pointer; }
.tabs { display: flex; gap: 6px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; border: 0; border-radius: 99px; padding: 9px 14px; font-weight: 800; font-size: 14px; background: #eef2f7; color: var(--ink2); cursor: pointer; }
.tabs button.on { background: var(--teal); color: #fff; }
.sheet-body { overflow: auto; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 2px 0 #e4e7eb, 0 2px 10px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 6px; cursor: pointer; border: 2px solid transparent; position: relative; }
.tile:active { transform: scale(.98); }
.tile.off { opacity: .5; }
.tile .tn { font-weight: 900; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tile .td { font-size: 13px; color: var(--ink2); line-height: 1.3; }
.tile .tp { font-weight: 900; color: var(--teal2); }
.tile .sw { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.tile .new { position: absolute; right: 10px; top: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 900; border-radius: 99px; padding: 2px 7px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 1px 0 #e4e7eb; }
.li .grow b { display: block; }
.cand { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 2px 0 #e4e7eb, 0 2px 10px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 8px; }
.cand .top { display: flex; gap: 10px; align-items: center; }
.skill { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink2); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stat { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 0 #e4e7eb; }
.stat .v { font-size: 22px; font-weight: 900; }
.stat .l { font-size: 12px; color: var(--ink2); font-weight: 700; }
.goal { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 0 #e4e7eb; }
.goal .meter { grid-column: 1 / -1; height: 10px; }
.chart { width: 100%; height: 160px; display: block; }
h4 { margin: 14px 0 8px; font-size: 15px; color: var(--ink2); text-transform: uppercase; letter-spacing: .6px; }

/* Fax (Ereignis-Dialoge) */
.modal-wrap { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(10, 25, 40, .45); padding: calc(12px + var(--sat)) 12px calc(12px + var(--sab)); animation: fadeIn .2s; }
.fax { width: min(560px, 100%); max-height: 100%; overflow: auto; background: #fbfaf3; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.4); padding: 22px 22px 18px; position: relative; font-family: "Courier New", ui-monospace, monospace; color: #222; animation: faxin .45s cubic-bezier(.2,.9,.3,1.1); transform-origin: top center;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 1px, transparent 1px 4px); touch-action: pan-y; }
@keyframes faxin { from { transform: translateY(-60px) scaleY(.6); opacity: 0; } }
.fax .fh { display: flex; justify-content: space-between; font-size: 12px; border-bottom: 2px dashed #999; padding-bottom: 8px; margin-bottom: 12px; letter-spacing: 1px; }
.fax h2 { font-family: var(--font); margin: 0 0 10px; font-size: 24px; }
.fax p { font-size: 15.5px; line-height: 1.45; margin: 0 0 12px; }
.fax .stamp { position: absolute; right: 18px; top: 46px; transform: rotate(12deg); border: 3px solid #c0392b; color: #c0392b; padding: 4px 10px; font-weight: 900; font-size: 18px; border-radius: 6px; opacity: .8; font-family: var(--font); }
.fax .row { font-family: var(--font); margin-top: 8px; }
.fax ul { font-family: var(--font); font-size: 15px; padding-left: 20px; }
.dialog { width: min(440px, 100%); background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; animation: up .2s; }
.dialog h2 { margin: 0; }
.dialog input, .panel input[type=text], .panel input[type=password] { width: 100%; border: 2px solid #d9e2ec; border-radius: 12px; padding: 12px; font-size: 18px; background: #fff; }

/* Toasts */
#toasts { position: absolute; top: calc(64px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: var(--panel-dark); color: #fff; border-radius: 99px; padding: 9px 16px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); animation: toast 2.6s forwards; max-width: 90vw; text-align: center; }
.toast.err { background: rgba(185, 28, 28, .92); }
.toast.good { background: rgba(21, 128, 61, .92); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.pa { position: absolute; top: calc(112px + var(--sat)); left: 50%; transform: translateX(-50%); background: #102a3a; color: #ffe8a3; font-family: "Courier New", monospace; font-weight: 700; padding: 6px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; max-width: 92vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; animation: toast 6s forwards; }
.emergency-banner { position: absolute; top: calc(62px + var(--sat)); left: calc(8px + var(--sal)); background: #b91c1c; color: #fff; font-weight: 900; border-radius: 12px; padding: 6px 12px; box-shadow: var(--shadow); font-size: 14px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { filter: brightness(1.25); } }

/* ------------------------------------------------------------ Menü */
#menu { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal)); background: linear-gradient(180deg, rgba(10,30,45,.15), rgba(10,30,45,.55)); overflow: auto; touch-action: pan-y; }
.menu-box { width: min(560px, 100%); display: flex; flex-direction: column; gap: 12px; }
.title { text-align: center; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.35); margin-bottom: 6px; }
.title h1 { font-size: clamp(38px, 9vw, 72px); margin: 0; font-weight: 900; letter-spacing: -1.5px; line-height: .95; }
.title h1 span { color: var(--yellow); }
.title p { margin: 8px 0 0; font-weight: 700; opacity: .95; font-size: clamp(14px, 3.6vw, 18px); }
.panel { background: var(--panel); border-radius: 24px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.panel h2 { margin: 0; font-size: 22px; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 18px; flex: 0 0 auto; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lv { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 2px 0 #e4e7eb; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 96px; position: relative; }
.lv.locked { opacity: .45; cursor: not-allowed; }
.lv .n { font-size: 12px; font-weight: 900; color: var(--accent2); }
.lv .t { font-weight: 900; font-size: 16px; line-height: 1.15; }
.lv .s { font-size: 12px; color: var(--ink2); }
.lv .done { position: absolute; right: 10px; top: 8px; font-size: 18px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.colors button.on { border-color: var(--ink); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef2f7; font-weight: 700; }
.seg { display: flex; background: #eef2f7; border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; font-weight: 800; cursor: pointer; color: var(--ink2); min-height: 38px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.status { font-size: 13px; color: #fff; text-align: center; opacity: .9; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.help p { margin: 0 0 10px; line-height: 1.45; }

/* Kleine Bildschirme (iPhone hochkant) */
@media (max-width: 600px) {
  :root { --dock-h: 64px; }
  .chip { font-size: 14px; padding: 6px 9px; min-height: 38px; }
  .chip.date { display: none; }
  .goalchip { min-width: 0; }
  .goalchip .gl span:first-child { display: none; }
  .speed { display: none; }
  .speed1 { display: block; height: 38px; }
  .topbar { gap: 6px; }
  .chip .ico { font-size: 15px; }
  #hud.tool-on .advisor, #hud.card-on .advisor { opacity: 0; pointer-events: none; transform: translateY(20px); }
  .advisor canvas { width: 48px !important; height: 48px !important; }
  .iconbtn { width: 42px; height: 42px; font-size: 20px; }
  .dock button { width: 60px; height: 52px; font-size: 10px; }
  .dock button .ico { font-size: 22px; }
  .card { top: auto; bottom: calc(var(--dock-h) + 18px + var(--sab)); right: 8px; left: 8px; width: auto; max-height: 48vh; }
  .advisor { max-width: calc(100vw - 78px - var(--sal) - var(--sar)); left: calc(6px + var(--sal)); }
  .advisor .say { font-size: 14px; }
  .camctl { bottom: calc(var(--dock-h) + 18px + var(--sab)); }
}
@media (max-height: 480px) {
  :root { --dock-h: 56px; }
  .dock button { height: 46px; width: 58px; }
  .dock button .ico { font-size: 20px; }
  .camctl { flex-direction: row; bottom: auto; top: calc(56px + var(--sat)); }
  .card { max-height: calc(100% - 70px - var(--dock-h)); }
}
