/* Atelier — mobile-first PWA. Layout: telefon = obsah + spodní lišta; ≥960 px = boční navigace + mřížka. */
:root {
  --bg: #0F0E0C;
  --surface: #1A1815;
  --surface-2: #24211D;
  --sunken: #151311;
  --line: #2A2621;
  --line-2: #35302A;
  --text: #F2EDE4;
  --text-2: #C8BFB2;
  --muted: #A39B8F;
  --faint: #8F877B;
  --accent: #D2B07A;
  --accent-soft: rgba(210, 176, 122, 0.16);
  --accent-line: rgba(210, 176, 122, 0.4);
  --ink: #14120F;
  --warm: #E39A62;
  --cool: #8DB6CF;
  --ok: #9CC8A0;
  --danger: #C8564A;
  --alarm: #E5484D;
  --display: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;
  --nav-h: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
/* Chování jako nativní aplikace: tlačítka a ikony nejdou označit ani podržením otevřít menu. */
button, nav, .tile, .card, .nav, .side, svg, img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { touch-action: manipulation; }
@media (display-mode: standalone), (display-mode: fullscreen) {
  html, body { overscroll-behavior: none; }
}
.install-hint { display: flex; gap: 12px; align-items: center; }
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 30;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; }
.label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { min-height: 100%; display: flex; }
.side { display: none; }
.main {
  flex: 1;
  min-width: 0;
  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: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px));
}
.wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.topbar { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.topbar h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 36px; line-height: 1; text-wrap: balance; }
.topbar .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.topbar .grow { flex: 1; min-width: 0; }

.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: rgba(15, 14, 12, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.nav button {
  height: var(--nav-h);
  border: 0;
  background: transparent;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
}
.nav button[aria-current="page"] { color: var(--accent); }
.nav button[aria-current="page"] .nav-ic { background: var(--accent-soft); }
.nav-ic { width: 52px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }

@media (min-width: 960px) {
  .nav { display: none; }
  .side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 248px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 16px;
    border-right: 1px solid var(--line);
    background: var(--sunken);
  }
  .side .brand { font-family: var(--display); font-size: 30px; font-weight: 500; padding: 0 12px 20px; line-height: 1; }
  .side .brand small { display: block; font-family: var(--ui); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
  .side button {
    display: flex; align-items: center; gap: 12px;
    height: 48px; padding: 0 12px;
    border: 0; border-radius: 14px;
    background: transparent; color: var(--text-2);
    font-size: 15px; font-weight: 600; text-align: left;
  }
  .side button:hover { background: var(--surface); }
  .side button[aria-current="page"] { background: var(--surface-2); color: var(--accent); }
  .side .spacer { flex: 1; }
  .main { padding: 28px 40px 48px; }
  .topbar h1 { font-size: 44px; }
}

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.btn {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:hover { border-color: var(--accent-line); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn.warm { background: var(--warm); border-color: var(--warm); color: var(--ink); }
.btn.cool { background: var(--cool); border-color: var(--cool); color: var(--ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost-warn { color: #E8A577; border-color: #4A3A2E; }
.btn.block { width: 100%; }
.btn.big { min-height: 64px; font-size: 18px; border-radius: 20px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 24px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.icon-btn.lg { width: 60px; height: 60px; border-radius: 30px; }
.icon-btn.accent { color: var(--accent); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; color: var(--text-2); white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); }
button.pill { cursor: pointer; }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.pills::-webkit-scrollbar { display: none; }
.seg { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 92px), 1fr)); }
.seg.tight { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); }
.seg button {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--sunken); color: var(--text-2); font-weight: 650; font-size: 14px; padding: 0 6px;
}
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--accent); border-color: var(--accent); }
.switch { width: 52px; height: 30px; border-radius: 15px; background: #3A352E; position: relative; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--text); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(22px); }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid2 > .btn { padding: 0 12px; gap: 8px; white-space: nowrap; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.section-title h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 500; }
.note { font-size: 14px; color: var(--muted); line-height: 1.5; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty strong { color: var(--text-2); display: block; margin-bottom: 4px; font-size: 15px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; margin: 0; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(to right, var(--accent) var(--p, 50%), #2E2A25 var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 5px; background: #2E2A25; }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 5px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 14px; background: var(--text); margin-top: -9px; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 14px; background: var(--text); border: 0; }

/* ---------- home ---------- */
.hero { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hero .clock { font-family: var(--display); font-weight: 300; font-size: 72px; line-height: 0.85; letter-spacing: -2px; }
.hero .date { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.hero .grow { flex: 1 1 200px; min-width: 0; }
.hero .actions { display: flex; gap: 8px; }
.lock-pill { min-height: 48px; padding: 0 16px 0 12px; border-radius: 24px; border: 1px solid var(--line-2); background: var(--surface); display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.lock-pill.locked { color: var(--ok); border-color: #3C5240; }
.lock-pill.unlocked { color: var(--warm); border-color: #5A3E2C; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
  min-height: 148px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; text-align: left; color: inherit;
}
.tile:hover { border-color: var(--line-2); }
.tile .t-ic { width: 48px; height: 48px; border-radius: 24px; background: var(--surface-2); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tile .t-ic.on { background: var(--accent); color: var(--ink); }
.tile .t-ic.hot { background: var(--warm); color: var(--ink); }
.tile .t-name { font-size: 18px; font-weight: 700; }
.tile .t-sub { font-size: 14px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.tile.wide { grid-column: span 2; }
.now-playing { display: flex; align-items: center; gap: 14px; }
.art { width: 64px; height: 64px; border-radius: 14px; background: #2A211C; position: relative; overflow: hidden; flex-shrink: 0; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art .a1 { position: absolute; left: -20px; top: 22px; width: 76px; height: 76px; border-radius: 38px; background: #5A3A2C; }
.art .a2 { position: absolute; left: 30px; top: 10px; width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--accent); }
.quick-scenes { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quick-scenes::-webkit-scrollbar { display: none; }
.qs { flex-shrink: 0; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px 0 12px; border-radius: 26px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; }
.qs .glow { width: 26px; height: 26px; border-radius: 13px; }
.qs[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero .clock { font-size: 96px; }
}
@media (min-width: 1200px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile { min-height: 176px; padding: 20px; }
}

/* ---------- lights ---------- */
.rooms { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.room { position: relative; min-height: 168px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #171513; overflow: hidden; }
.room.on { background: #221E19; border-color: var(--accent-line); }
.room .open { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; text-align: left; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; color: inherit; }
.room .count { position: absolute; left: 16px; top: 18px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.room .name { font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1; }
.room .status { font-size: 14px; font-weight: 650; color: var(--faint); }
.room.on .status { color: var(--accent); }
.room .timer { font-size: 13px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.room .bulb { position: absolute; top: 12px; right: 12px; width: 64px; height: 64px; border-radius: 32px; border: 0; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.room.on .bulb { background: var(--accent); color: var(--ink); box-shadow: 0 0 0 7px var(--accent-soft), 0 0 30px rgba(210,176,122,.45); }
.room.na { opacity: .55; }
.light-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 20px; background: var(--sunken); }
.light-row .lr-btn { width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.light-row.on .lr-btn { background: var(--accent); color: var(--ink); box-shadow: 0 0 22px rgba(210,176,122,.35); }
.light-row .lr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.light-row .lr-name { font-weight: 700; }
.light-row .lr-val { font-weight: 700; color: var(--faint); }
.light-row.on .lr-val { color: var(--accent); }

/* ---------- blinds ---------- */
.blind-all { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .blind-all { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.blind-all button { min-height: 76px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 650; font-size: 15px; color: var(--text); }
.blind-all .big50 { font-family: var(--display); font-size: 28px; line-height: 24px; color: var(--accent); }
.blind { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.blind .win { width: 34px; height: 48px; border-radius: 6px; border: 2px solid #3A352E; background: #2B363D; position: relative; overflow: hidden; flex-shrink: 0; }
.blind .win i { position: absolute; left: 0; right: 0; top: 0; background: repeating-linear-gradient(180deg, #8A7F70 0 5px, #6E6559 5px 6px); }
.blind .win i.tilt { background: repeating-linear-gradient(180deg, #8A7F70 0 2px, transparent 2px 6px); }
.blind .b-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blind .b-status { font-size: 14px; color: var(--muted); }
.blind .b-status.act { color: var(--accent); }
.blind .b-btns { display: flex; gap: 6px; }
.blind .b-btns button { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }
.blind .b-btns button[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.blind .b-btns button[disabled] { opacity: .3; }
@media (min-width: 600px) { .blind .b-btns button { width: 56px; height: 56px; } }

/* ---------- climate ---------- */
.clim { display: grid; gap: 16px; }
@media (min-width: 820px) { .clim { grid-template-columns: 360px minmax(0, 1fr); align-items: start; } }
.dial { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; max-width: 100%; }
.dial svg { width: 100%; height: 100%; }
.dial .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.dial .val { font-family: var(--display); font-size: 88px; line-height: 1; }
.dial .st { font-weight: 700; font-size: 15px; }
.dial-ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 320px; margin: 0 auto; width: 100%; }
.dial-ctl .icon-btn { width: 68px; height: 68px; border-radius: 34px; }
.dial-ctl .room-t { text-align: center; }
.dial-ctl .room-t b { display: block; font-size: 22px; }

/* ---------- wellness ---------- */
.well { display: grid; gap: 14px; }
@media (min-width: 760px) { .well { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.well .big-t { font-family: var(--display); font-size: 84px; line-height: 0.95; }
.bar { height: 6px; border-radius: 3px; background: #2E2A25; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--warm); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.steps div { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--faint); }
.steps div i { height: 6px; border-radius: 3px; background: #2E2A25; }
.steps div.done { color: var(--text-2); }
.steps div.done i { background: var(--cool); }
.steps div.cur { color: var(--text-2); }
.steps div.cur i { background: #5E7E92; }

/* ---------- scenes ---------- */
.scenes { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .scenes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scene { min-height: 168px; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; color: inherit; gap: 10px; }
.scene[aria-pressed="true"] { border-color: var(--accent); background: #211E1A; }
.scene .ring { width: 56px; height: 56px; border-radius: 28px; display: flex; align-items: center; justify-content: center; }
.scene .ring i { width: 32px; height: 32px; border-radius: 16px; display: block; }
.scene .s-name { font-family: var(--display); font-size: 28px; line-height: 1; font-weight: 500; }
.scene .s-desc { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.scene .badge { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--accent); color: var(--ink); padding: 5px 9px; border-radius: 10px; }

/* ---------- music ---------- */
.player { display: grid; gap: 18px; }
@media (min-width: 720px) { .player { grid-template-columns: 260px minmax(0, 1fr); align-items: center; } }
.player .cover { width: 100%; max-width: 320px; aspect-ratio: 1; border-radius: 28px; position: relative; overflow: hidden; background: #2A211C; margin: 0 auto; }
.player .cover img { width: 100%; height: 100%; object-fit: cover; }
.player .cover .a1 { position: absolute; left: -25%; top: 35%; width: 110%; height: 110%; border-radius: 50%; background: #5A3A2C; }
.player .cover .a2 { position: absolute; left: 50%; top: 14%; width: 34%; height: 34%; border-radius: 50%; border: 2px solid var(--accent); }
.player .cover .a3 { position: absolute; left: 58%; top: 22%; width: 18%; height: 18%; border-radius: 50%; background: var(--accent); }
.transport { display: flex; align-items: center; justify-content: center; gap: 16px; }
.transport .play { width: 76px; height: 76px; border-radius: 38px; background: var(--accent); color: var(--ink); border: 0; display: flex; align-items: center; justify-content: center; }

/* ---------- door ---------- */
.door { display: grid; gap: 14px; }
@media (min-width: 820px) { .door { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.lock-big { width: 116px; height: 116px; border-radius: 58px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lock-big.locked { background: #1E2A20; color: var(--ok); }
.lock-big.unlocked { background: #2E2219; color: var(--warm); }
.cam { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: #161A1D; }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .tag { position: absolute; top: 12px; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(10,9,8,.72); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--text); }
.cam .tag.l { left: 12px; }
.cam .tag.r { right: 12px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.cam .tag .rec { width: 8px; height: 8px; border-radius: 4px; background: var(--alarm); }
.cam .msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }

/* ---------- sheets & overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 7, 6, 0.72); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet {
  width: 100%; max-width: 640px; max-height: calc(100% - 24px - env(safe-area-inset-top, 0px));
  overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 16px; animation: up .22s ease;
}
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 2px; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 500; line-height: 1; }
.sheet-head .grow { flex: 1; min-width: 0; }
@media (min-width: 720px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 28px; border-bottom: 1px solid var(--line-2); padding: 22px 24px 24px; }
  .sheet .grab { display: none; }
}
.full { position: fixed; inset: 0; z-index: 50; background: #0A0908; overflow-y: auto; animation: fade .18s ease; }
.full-in { max-width: 860px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 16px; min-height: 100%; }
.bell-ic { width: 56px; height: 56px; border-radius: 28px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px var(--accent-soft); animation: ring 1.4s ease-in-out infinite; }
.bell-title { font-size: 30px; line-height: 1; }
@media (min-width: 600px) { .bell-title { font-size: 40px; } }
.call-btns { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.call-btns .btn { min-height: 84px; flex-direction: column; gap: 6px; font-size: 14px; border-radius: 22px; padding: 0 8px; text-align: center; line-height: 1.2; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 20px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.banner b { font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: up .2s ease; }
@media (min-width: 960px) { .toast { bottom: 28px; } }
.offline { background: #3A2A20; color: #F3C9A8; border-color: #5A3E2C; }

/* ---------- assistant ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.msg-u { align-self: flex-end; max-width: 85%; background: var(--surface-2); border-radius: 20px 20px 6px 20px; padding: 12px 16px; }
.msg-a { align-self: flex-start; max-width: 85%; background: var(--sunken); border: 1px solid var(--accent-line); border-radius: 20px 20px 20px 6px; padding: 12px 16px; }
.orb { width: 120px; height: 120px; border-radius: 60px; margin: 0 auto; border: 0; background: var(--surface-2); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px rgba(210,176,122,.08), 0 0 0 22px rgba(210,176,122,.04); }
.orb.listening { background: var(--accent); color: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; min-height: 52px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--sunken); padding: 0 16px; }

/* ---------- login ---------- */
.login { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.login form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-family: var(--display); font-weight: 400; font-size: 56px; margin: 0 0 8px; line-height: 1; }
.login label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.login input[type=email], .login input[type=password] { min-height: 52px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 16px; font-size: 16px; }
.login .err { color: #F0A090; font-size: 14px; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-12deg); } 20% { transform: rotate(10deg); } 30% { transform: rotate(-6deg); } 40% { transform: rotate(0); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 10px rgba(210,176,122,.25), 0 0 0 22px rgba(210,176,122,.1); } 50% { box-shadow: 0 0 0 16px rgba(210,176,122,.18), 0 0 0 32px rgba(210,176,122,.06); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
