/* Naverela — jedno sezení. Vzhled „Okno“ (2026-09-24, vybraný návrh CC).
   Jedna tichá tmavě zelená místnost. Vlevo klenuté okno s krajinou ze tří vrstev značky
   (písek / šalvěj / les), jezerem a sluncem jako papírové karty; na parapetu svíčka, lísteček
   s otázkou klienta a karty, které už padly. Vpravo se rozhovor píše jako kniha: Naverela serifem
   přímo na zdi, klient kurzívou s terakotovou pomlčkou (přímá řeč), nabídky jako věty, psaní jako
   další řádek stránky. Obloha provází sezení (body[data-sky]): soumrak → modrá hodina → noc → svítání.
   Pohyb pomalý (≥ 0,8 s) a prefers-reduced-motion ho vypne.
   Barvy „Ranné svetlo“ (provozovatel 2026-10-08 ze čtyř mockupů: „ta zelená prostě není ono“): světlá papírová zeď,
   tmavě hnědé písmo a terakota; okno s krajinou zůstává. Jediný vzhled, bez tmavé varianty. */

:root {
  color-scheme: light;
  --wall: #f3ece0;
  --wall-top: #f7f1e7;
  --wall-deep: #ebe1d0;
  --wall-strip: #efe7d9;
  --panel: #f8f3ea;
  --ink: #2b2520;          /* hlas Naverely */
  --ink-rgb: 43, 37, 32;   /* --ink pro průsvitné linky a podklady */
  --ink-2: #4a3f36;        /* hlas klienta */
  --muted: #6f6357;        /* tiché popisky (≥ 4,5:1 na zdi) */
  --shade-rgb: 92, 70, 48; /* teplé stíny na světlé zdi */
  --line: rgba(var(--ink-rgb), .12);
  --line-strong: rgba(var(--ink-rgb), .28);
  --rubric: #a5492c;       /* jména karet */
  --terra: #c4673f;
  --terra-deep: #a3502f;
  --sage: #9c8f7a;
  --paper: #fbf7ef;
  --paper-ink: #2b2520;
  --paper-muted: #6b5c4b;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.33, 0, .2, 1);
  --move: 2.4s;            /* pohyb prostoru */
  --fade: 1.2s;            /* vynořování */
  --sky-t: 3.6s;           /* změna světla */
  --tap: 44px;
  --ambient-x: 0px;
  --ambient-y: 0px;
  --wall-bg:
    radial-gradient(120% 90% at 20% 85%, #efe4d2 0%, rgba(239, 228, 210, 0) 60%),
    linear-gradient(180deg, var(--wall-top) 0%, var(--wall) 45%, var(--wall-deep) 100%);
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .8  0 0 0 0 .75  0 0 0 0 .66  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Rozměry místnosti jsou na body, aby je nálada (noc) mohla přepsat i s odvozenými hodnotami. */
body {
  --top-h: 78px;
  --stage: min(100vw, 1560px);
  --stage-x: calc((100vw - var(--stage)) / 2);
  --win-x: calc(var(--stage-x) + clamp(40px, 6.7vw, 96px));
  --win-w: clamp(280px, 29vw, 430px);
  --win-top: calc(var(--top-h) + 26px);
  --win-bottom: 150px;
  --gap: clamp(56px, 7.2vw, 104px);
  --room-w: calc(var(--win-x) + var(--win-w) + var(--gap));
  --flow: 640px;           /* šířka sazby */
  --hang: 34px;            /* okraj pro pomlčku přímé řeči */
}

* { box-sizing: border-box; }
html { background: var(--wall); scroll-padding-top: calc(78px + 24px); }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only,
.card-inline figcaption,
.sheet.signin > .eyebrow {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- zeď: omítka, zrno, ztmavení v noci ---------- */
.wall { position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image: var(--wall-bg); }
.hush { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--ink); opacity: 0; transition: opacity var(--move) var(--ease); }
.grain { position: fixed; inset: 0; z-index: 35; pointer-events: none; opacity: .5; mix-blend-mode: soft-light; background-image: var(--noise); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- hlavička: značka vlevo, tiché textové ovladače vpravo ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  height: var(--top-h);
  padding: 0 calc(var(--stage-x) + clamp(20px, 2.8vw, 40px));
}
/* Podklad pod hlavičkou i pod psacím řádkem se objeví, jen když pod nimi plyne text (body.scrolled,
   body.reading-back); v klidu zůstává zeď se světlem okna nepřerušená. */
.top::before {
  content: ""; position: absolute; inset: 0 0 -30px 0; z-index: -1; pointer-events: none;
  background-image: var(--wall-bg); background-attachment: fixed;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent);
  opacity: 0; transition: opacity .8s var(--ease);
}
body.scrolled .top::before { opacity: 1; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.brand .coin {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: #fffaf2; box-shadow: 0 0 0 1px rgba(var(--ink-rgb), .12), 0 2px 8px rgba(var(--shade-rgb), .18);
}
.brand .coin img { width: 24px; height: 24px; display: block; }
.brand .word { font: 600 27px/1 var(--display); letter-spacing: .01em; white-space: nowrap; }
.brand .tag {
  padding-left: 14px; margin-left: 2px; border-left: 1px solid rgba(var(--ink-rgb), .18);
  font: 400 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.brand .tag .txt-short { display: none; }
.top .grow { flex: 1; }

.controls { display: flex; align-items: center; gap: 2px; font: 400 13px/1 var(--sans); letter-spacing: .04em; }
.ctl {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 12px; border-radius: 19px; white-space: nowrap;
  color: var(--muted); background: transparent;
  transition: color .8s var(--ease), background-color .8s var(--ease);
}
.ctl:hover { color: var(--ink); background: rgba(var(--ink-rgb), .06); }
.ctl .ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ctl b { font-weight: 500; color: var(--ink); }
.ctl .state { color: var(--muted); transition: color .8s var(--ease); }
.ctl.toggle[aria-pressed="true"] .state, .ctl.toggle[data-on="true"] .state { color: var(--rubric); }
.ctl .txt-short { display: none; }
/* Nabídka hudby pod ikonou v hlavičce (skladby, tón 432 Hz, ticho) */
.music-menu {
  position: fixed; z-index: 45; display: grid; min-width: 210px; max-width: calc(100vw - 24px); padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel);
  box-shadow: 0 18px 40px rgba(var(--shade-rgb), .22); animation: rise .5s var(--ease) backwards;
}
.music-item {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font: 400 15px/1.3 var(--sans); text-align: left; cursor: pointer;
}
.music-item::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--muted); }
.music-item[aria-checked="true"] { color: var(--ink); }
.music-item[aria-checked="true"]::before { border-color: var(--terra); background: var(--terra); }
.music-item:hover, .music-item:focus-visible { background: rgba(var(--ink-rgb), .06); outline: none; }

.ctl .txt-short::after { content: attr(data-n); }
.sep { flex: none; width: 1px; height: 14px; margin: 0 6px; background: rgba(var(--ink-rgb), .16); }
.ctl.balance[hidden] + .sep { display: none; }
.ctl.balance { color: var(--ink); font-variant-numeric: tabular-nums; }
.ctl.balance .dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--sage); }
.ctl.balance.empty .dot { background: var(--terra); }
/* výběr země v patičce vedle právních odkazů (provozovatel 2026-10-04: v záhlaví rušil) */
.lang-foot { display: inline-flex; align-items: center; }
.lang-foot select { field-sizing: content; } /* šipka hned za názvem země (kde prohlížeč umí) */
/* bez přihlášení je Historie skrytá: oddělovač před ní by visel na konci záhlaví */
.controls .sep:has(+ .ctl.history[hidden]) { display: none; }
.lang-foot select {
  -webkit-appearance: none; appearance: none; border: 0; padding: 0 16px 0 0; cursor: pointer;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23a8b0a0' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 4px center;
  color: inherit; font: inherit; letter-spacing: inherit;
}
.lang-foot select:hover { color: var(--ink); }
.lang-foot select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang-foot select option { color: var(--paper-ink); background: var(--paper); }

/* ---------- místnost: okno vlevo, rozhovor vpravo ---------- */
.session {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: var(--room-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--top-h));
  transition: grid-template-columns var(--move) var(--ease);
}
.table { position: relative; min-width: 0; }

.frame {
  position: fixed; z-index: 2;
  left: var(--win-x); top: var(--win-top); width: var(--win-w);
  height: max(220px, calc(100vh - var(--win-top) - var(--win-bottom)));
  height: max(220px, calc(100dvh - var(--win-top) - var(--win-bottom)));
  transition: left var(--move) var(--ease), top var(--move) var(--ease), width var(--move) var(--ease), height var(--move) var(--ease);
}
.gate-frame { position: relative; z-index: 0; }
.frame::before,
.gate-frame::before { /* hloubka ostění */
  content: ""; position: absolute; inset: -14px -14px 0 -14px; z-index: -1; border-radius: 9999px 9999px 0 0;
  background: linear-gradient(90deg, #d3c6ae 0%, #e0d4bf 22%, #e4d9c6 78%, #d3c6ae 100%);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .05), 0 40px 90px rgba(var(--shade-rgb), .22);
  transition: border-radius var(--move) var(--ease), inset var(--move) var(--ease);
}

/* světlo okna na zdi, podle nálady */
.spill { position: absolute; left: 50%; top: 48%; width: 2000px; height: 1500px; transform: translate(-50%, -50%); z-index: -2; pointer-events: none; }
.spill i { position: absolute; inset: 0; opacity: 0; transition: opacity var(--sky-t) var(--ease); }
.spill [data-mood="dusk"] { background: radial-gradient(closest-side at 50% 50%, rgba(236, 162, 118, .17), rgba(236, 162, 118, .05) 55%, transparent 80%); }
.spill [data-mood="blue"] { background: radial-gradient(closest-side, rgba(150, 150, 175, .11), rgba(150, 150, 175, .03) 55%, transparent 80%); }
.spill [data-mood="night"] { background: radial-gradient(closest-side, rgba(120, 150, 185, .08), transparent 70%); }
.spill [data-mood="dawn"] { background: radial-gradient(closest-side, rgba(246, 214, 160, .20), rgba(246, 214, 160, .06) 55%, transparent 80%); }
body[data-sky="dusk"] .spill [data-mood="dusk"],
body[data-sky="blue"] .spill [data-mood="blue"],
body[data-sky="night"] .spill [data-mood="night"],
body[data-sky="dawn"] .spill [data-mood="dawn"] { opacity: 1; }

.arch { position: absolute; inset: 0; border-radius: 9999px 9999px 0 0; overflow: hidden; isolation: isolate; background: #20363f; transition: border-radius var(--move) var(--ease); }
.arch::after { /* sklo a vnitřní stín */
  content: ""; position: absolute; inset: 0; z-index: 20; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .03) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), inset 0 26px 44px rgba(0, 0, 0, .30), inset 0 -10px 24px rgba(0, 0, 0, .25);
}

/* Výhled: čtyři samostatné vrstvy (dají se později nahradit obrázky). Nová nálada se rozsvítí nad
   starou; stará zmizí až potom, takže prolínání nikdy neprosvítá tmou. */
.vista { position: absolute; inset: 0; z-index: 0; }
.view { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 0s linear var(--sky-t); }
body[data-sky="dusk"] .view[data-mood="dusk"],
body[data-sky="blue"] .view[data-mood="blue"],
body[data-sky="night"] .view[data-mood="night"],
body[data-sky="dawn"] .view[data-mood="dawn"] { z-index: 2; opacity: 1; transition: opacity var(--sky-t) var(--ease); }
/* Výhled je papírová koláž ve stylu karet (jedna krajina, čtyři světla). Kresba pod obrázkem zůstává
   jako záloha: když se obrázek nenačte, app.js ho odebere a kresba se ukáže. */
.view .scene-img {
  position: absolute; inset: 0; z-index: 1; display: block;
  width: 100%; height: 100%; object-fit: cover; object-position: center 50%;
}
.view.has-img > :not(.scene-img) { display: none; }   /* app.js třídu odebere, když se obrázek nenačte */
/* noc: rozevřené okno ukáže měsíc; světlo krajiny pomalu dýchá */
body[data-sky="night"] .view[data-mood="night"] .scene-img { object-position: center 28%; animation: night-breathe 10s ease-in-out infinite; }
@keyframes night-breathe { 0%, 100% { filter: brightness(.9); } 45% { filter: brightness(1.06); } }
/* brána: název na obloze potřebuje tichý stín horní části výhledu */
.gate-frame .view .scene-img { object-position: center 44%; }
.gate-frame .vista::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 58%; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 26, 28, .5) 0%, rgba(16, 26, 28, .22) 60%, rgba(16, 26, 28, 0) 100%);
}
.view .sky { position: absolute; inset: 0; }
.view .glow { position: absolute; left: 0; right: 0; bottom: 0; height: 66%; background: radial-gradient(60% 52% at 50% 70%, rgba(255, 200, 150, .55), rgba(255, 200, 150, 0) 70%); }
.view .sun {
  position: absolute; left: 50%; bottom: 32.5%; width: 62px; height: 62px; border-radius: 50%; transform: translate(-50%, 50%);
  background: radial-gradient(circle at 45% 40%, #f7b48a 0%, #e98a61 58%, #d8744f 100%);
  box-shadow: 0 0 60px 18px rgba(240, 160, 110, .35);
}
.view .stars {
  position: absolute; left: 0; top: 0; width: 2px; height: 2px; border-radius: 50%; background: transparent;
  box-shadow:
    38px 64px 0 0 rgba(255, 246, 228, .9), 92px 132px 0 0 rgba(255, 246, 228, .6), 146px 48px 0 .5px rgba(255, 246, 228, .85),
    204px 108px 0 0 rgba(255, 246, 228, .55), 262px 70px 0 0 rgba(255, 246, 228, .8), 318px 150px 0 0 rgba(255, 246, 228, .5),
    356px 92px 0 .5px rgba(255, 246, 228, .75), 60px 196px 0 0 rgba(255, 246, 228, .45), 180px 214px 0 0 rgba(255, 246, 228, .4),
    236px 178px 0 0 rgba(255, 246, 228, .6), 402px 60px 0 0 rgba(255, 246, 228, .7), 448px 138px 0 0 rgba(255, 246, 228, .5),
    506px 84px 0 .5px rgba(255, 246, 228, .8), 560px 170px 0 0 rgba(255, 246, 228, .45), 612px 104px 0 0 rgba(255, 246, 228, .65),
    664px 58px 0 0 rgba(255, 246, 228, .7), 700px 190px 0 0 rgba(255, 246, 228, .4), 120px 262px 0 0 rgba(255, 246, 228, .35),
    290px 250px 0 0 rgba(255, 246, 228, .35), 520px 240px 0 0 rgba(255, 246, 228, .35);
}
.view .moon, .view .halo { position: absolute; right: 22%; top: 17%; width: 36px; height: 36px; border-radius: 50%; }
.view .moon { background: radial-gradient(circle at 40% 38%, #fbf4e4 0%, #ece1c9 70%, #d9cdb2 100%); }
.view .halo { background: rgba(236, 226, 200, .18); box-shadow: 0 0 40px 22px rgba(236, 226, 200, .18); animation: breathe 10s ease-in-out infinite; }
.view .cloud { position: absolute; height: 24px; fill: #efe2cf; opacity: 0; animation: drift 90s linear infinite alternate; }
.view .cloud.c1 { left: -10%; top: 38%; width: 58%; }
.view .cloud.c2 { left: 50%; top: 33%; width: 46%; }
.view .hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 52%; display: block; }
.ridge { filter: drop-shadow(0 -2px 3px rgba(20, 20, 20, .22)); }

.view[data-mood="dusk"] { --refl: .8; }
.view[data-mood="dusk"] .sky { background: linear-gradient(180deg, #1f3540 0%, #35505c 26%, #6f7686 48%, #b58f8d 64%, #e3a887 78%, #f1c7a2 90%, #f4d6b6 100%); }
.view[data-mood="dusk"] .cloud.c1 { opacity: .16; }
.view[data-mood="dusk"] .cloud.c2 { opacity: .1; }
.view[data-mood="dusk"] .hills { filter: brightness(.9) saturate(.95); }

.view[data-mood="blue"] { --refl: .12; }
.view[data-mood="blue"] .sky { background: linear-gradient(180deg, #132632 0%, #233d4b 32%, #44596a 56%, #7c7584 72%, #b98a80 86%, #cf9f86 100%); }
.view[data-mood="blue"] .stars { opacity: .45; }
.view[data-mood="blue"] .glow { opacity: .45; }
.view[data-mood="blue"] .cloud.c1 { opacity: .1; }
.view[data-mood="blue"] .hills { filter: brightness(.62) saturate(.8); }

.view[data-mood="night"] { --refl: 0; }
.view[data-mood="night"] .sky { background: linear-gradient(180deg, #0c1820 0%, #15283a 40%, #243a4d 70%, #3b4c5c 88%, #4d5a66 100%); }
.view[data-mood="night"] .cloud.c1 { opacity: .1; }
.view[data-mood="night"] .cloud.c2 { opacity: .08; }
.view[data-mood="night"] .hills { filter: brightness(.42) saturate(.7); }

.view[data-mood="dawn"] { --refl: 0; }
.view[data-mood="dawn"] .sky { background: linear-gradient(180deg, #6c8793 0%, #98aeb1 28%, #c9c7b8 52%, #ecd2b0 72%, #f5dcb8 88%, #f7e6c9 100%); }
.view[data-mood="dawn"] .sun {
  left: 36%; bottom: 47%; width: 58px; height: 58px;
  background: radial-gradient(circle at 45% 40%, #fff1d0 0%, #f6d492 65%, #efc27a 100%);
  box-shadow: 0 0 80px 30px rgba(250, 226, 170, .45);
}
.view[data-mood="dawn"] .cloud.c1 { opacity: .45; }
.view[data-mood="dawn"] .cloud.c2 { opacity: .3; }
.view[data-mood="dawn"] .hills { filter: brightness(1.04); }

.paper {
  position: absolute; inset: 0; z-index: 15; pointer-events: none; opacity: .55; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .9  0 0 0 0 .85  0 0 0 0 .78  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
}
.arch-title { position: absolute; z-index: 12; left: 0; right: 0; top: 15%; padding: 0 12px; text-align: center; }
.arch-title .name { margin: 0; font: 500 58px/1.05 var(--display); letter-spacing: .02em; color: #f6eee0; text-shadow: 0 2px 24px rgba(10, 20, 25, .35); }
.arch-title .tagline { margin: 6px 0 0; font: italic 500 22px/1.3 var(--display); color: #eadfcb; }

/* ---------- parapet: karty, které padly, lísteček s otázkou, svíčka ---------- */
.sill {
  position: absolute; top: 100%; left: -34px; right: -34px; height: 22px; border-radius: 2px;
  background: linear-gradient(180deg, #d2c4ab 0, #c2b399 3px, #b0a187 5px, #9e8f75 100%);
  box-shadow: 0 22px 34px -10px rgba(var(--shade-rgb), .38);
  transition: left var(--move) var(--ease), right var(--move) var(--ease), height var(--move) var(--ease);
}
.sill-row {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 22;
  display: flex; align-items: flex-end; gap: 12px; padding: 0 18px;
  pointer-events: none;
}
.sill-row > * { pointer-events: auto; }
.slots { --card-w: clamp(38px, calc(var(--win-w) * .145), 62px); display: flex; align-items: flex-end; gap: 8px; flex: 0 1 auto; min-width: 0; }
.slots:empty { display: none; }
.slot {
  position: relative; flex: 0 1 var(--card-w); min-width: 26px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden;
  visibility: hidden; opacity: 0; transform-origin: 50% 100%; transform: rotate(var(--r, 0deg));
  box-shadow: 0 8px 18px rgba(var(--shade-rgb), .27), 0 1px 2px rgba(var(--shade-rgb), .24);
  transition: translate .8s var(--ease);
}
/* karta doputuje na parapet, až se v promluvě otočí */
.slot.revealed { visibility: visible; opacity: 1; cursor: zoom-in; animation: sill-in 1.8s var(--ease) 1.5s backwards; }
.slot.revealed:hover { translate: 0 -3px; }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes sill-in { from { opacity: 0; transform: translateY(-22px) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }

.q {
  flex: 0 1 150px; min-width: 96px; margin: 0 0 0 auto;
  padding: 9px 11px 10px; border-radius: 2px;
  background: #efe5d2; color: #26302b; font: italic 400 14px/1.3 var(--serif);
  transform-origin: 50% 100%; transform: rotate(3deg);
  box-shadow: 0 8px 16px rgba(var(--shade-rgb), .24);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; overflow-wrap: anywhere;
  animation: note-in 1.8s var(--ease) backwards;
}
.q.empty { display: none; }
@keyframes note-in { from { opacity: 0; transform: rotate(3deg) translateY(-14px); } to { opacity: 1; transform: rotate(3deg); } }

.candle { position: relative; flex: none; width: 18px; height: 48px; margin-left: auto; transform-origin: 50% 100%; }
.q:not(.empty) + .candle { margin-left: 22px; }
.candle .body { position: absolute; inset: 0; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #d8ccb4 0%, #f3eadb 45%, #cfc2a8 100%); box-shadow: 0 6px 12px rgba(var(--shade-rgb), .24); }
.candle .wick { position: absolute; left: 8px; top: -5px; width: 2px; height: 6px; border-radius: 1px; background: #3a2f26; }
.candle .flame {
  position: absolute; left: 3px; top: -27px; width: 12px; height: 22px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 70%, #fffaf0 0%, #ffe2a6 35%, #f5a95a 70%, rgba(245, 169, 90, 0) 100%);
  transform-origin: 50% 100%; transition: opacity 2s var(--ease); animation: sway 7s ease-in-out infinite;
}
.candle .light {
  position: absolute; left: 50%; top: -18px; width: 260px; height: 260px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 196, 120, .22), rgba(255, 196, 120, .06) 55%, transparent); transition: opacity 2s var(--ease);
}
.candle .smoke { position: absolute; left: 1px; top: -40px; width: 16px; height: 36px; opacity: 0; transition: opacity 3s var(--ease) 1s; }

@keyframes sway { 0%, 100% { transform: rotate(-1.5deg) scaleY(1); } 50% { transform: rotate(1.5deg) scaleY(1.04); } }
@keyframes drift { from { transform: translateX(-6%); } to { transform: translateX(8%); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .55; } 40% { transform: scale(1.9); opacity: 1; } }

/* ---------- nálady místnosti ---------- */
body[data-sky="night"] { --win-w: min(740px, 52vw); --room-w: calc(var(--win-x) + var(--win-w) + var(--gap)); }
body[data-sky="night"] .hush { opacity: .38; }
body[data-sky="night"] .messages > .msg:not(:last-child) { opacity: .6; }
body[data-sky="night"].reading-back .messages > .msg,
body[data-sky="night"] .messages > .msg:hover,
body[data-sky="night"] .messages > .msg:focus-within { opacity: 1; }
body[data-sky="dawn"] .candle .flame,
body[data-sky="dawn"] .candle .light { opacity: 0; }
body[data-sky="dawn"] .candle .smoke { opacity: .5; }

/* ---------- rozhovor psaný jako kniha ---------- */
.thread {
  position: relative; z-index: 3; min-width: 0;
  display: flex; flex-direction: column;
  padding-right: calc(var(--stage-x) + clamp(24px, 4.4vw, 64px));
}
/* Start bez problikávání (plán §18.2 bod 1): dokud app.js neví, zda ukázat přihlášení, bránu nebo sezení,
   vlákno a composer se neukazují; pak se klidně objeví. */
body[data-boot="pending"] .messages,
body[data-boot="pending"] .composer { visibility: hidden; opacity: 0; }
.msg.instant { animation: none; }
.messages,
.composer { transition: opacity .9s var(--ease); }
.messages {
  width: 100%; max-width: calc(var(--flow) + var(--hang));
  padding: clamp(40px, 12vh, 132px) 0 30px var(--hang);
  display: flex; flex-direction: column; gap: 34px;
}
.msg { position: relative; min-width: 0; transition: opacity var(--move) var(--ease); animation: rise 1.2s var(--ease) backwards; }

/* Naverela: serif přímo na zdi, bez bubliny a avatara */
.msg.guide .body { font: 400 22px/1.62 var(--serif); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.guide .body .seg:empty { display: none; }
.msg.guide .body .w { animation: word-in .9s ease both; }
.msg.guide .body .s { border-radius: 2px; transition: background-color .8s var(--ease); }
.msg.guide .body .s.now { background: linear-gradient(0deg, rgba(217, 142, 106, .28) 0, rgba(217, 142, 106, .28) 34%, transparent 34%); }
.cn { font-weight: 500; color: var(--rubric); animation: rubric-in 1.6s var(--ease) backwards; }

/* Klient: kurzíva s terakotovou pomlčkou, jako přímá řeč v knize */
.msg.user .body { position: relative; font: italic 400 20.5px/1.55 var(--serif); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .body::before,
.offer .btn::before,
.memory-choices .btn::before,
.chip::before {
  content: ""; position: absolute; left: calc(2px - var(--hang)); top: .82em; width: 18px; height: 1px; background: var(--terra);
}

.typing { display: flex; gap: 7px; align-items: center; height: 36px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); opacity: .25; animation: hush-dot 2.8s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: .45s; }
.typing i:nth-child(3) { animation-delay: .9s; }

@keyframes hush-dot { 0%, 100% { opacity: .2; } 45% { opacity: .75; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes word-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rubric-in { from { color: var(--ink); } to { color: var(--rubric); } }

/* ---------- karta v promluvě: karta vlevo, její odstavec vpravo ---------- */
.reveal { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 0 30px; align-items: start; margin: 18px 0; }
.reveal .seg { min-width: 0; padding-top: 2px; }
.reveal .fam {
  display: block; margin: 0 0 6px; white-space: normal;
  font: 400 11.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  animation: fade-in 1.2s var(--ease) 1.2s backwards;
}
.reveal .fam .nm { display: block; margin: 4px 0 2px; font: 500 25px/1.2 var(--display); letter-spacing: 0; text-transform: none; color: var(--rubric); animation: fade-in 1.6s var(--ease) backwards; }
.card-inline { margin: 0; width: 108px; animation: card-in 1.4s var(--ease) backwards; }
.card-inline.revealed { cursor: zoom-in; }
.card-inline .flip { position: relative; width: 100%; aspect-ratio: 2 / 3; perspective: 900px; transform: rotate(var(--tilt, 0deg)); transition: translate .8s var(--ease); }
.reveal:hover .card-inline.revealed .flip { translate: 0 -3px; }
.card-inline .inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.7s cubic-bezier(.45, 0, .2, 1); }
.card-inline.revealed .inner { transform: rotateY(180deg); }
.card-inline .face {
  position: absolute; inset: 0; overflow: hidden; border-radius: 6px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 14px 30px rgba(var(--shade-rgb), .27), 0 2px 4px rgba(var(--shade-rgb), .21);
}
.card-inline .face.front { transform: rotateY(180deg); }
.card-inline img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- hlas: tichý kulatý přehrávač ---------- */
.voice {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 12px 0 0;
  font: 400 12.5px/1.3 var(--sans); letter-spacing: .06em; color: var(--muted);
}
.voice .play {
  position: relative; height: 32px; flex: none; border-radius: 16px; padding: 0 14px 0 12px;
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink);
  font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid rgba(var(--ink-rgb), .32);
  transition: background-color .8s var(--ease), border-color .8s var(--ease), color .8s var(--ease);
}
.voice .play::after { content: ""; position: absolute; inset: -6px; border-radius: 22px; }
.voice .play:hover { border-color: var(--ink); }
.voice .play svg { width: 10px; height: 10px; fill: currentColor; }
.voice.playing .play { background: var(--ink); border-color: var(--ink); color: var(--wall); }
/* úvod přihlášení: hlas nezačne sám, tlačítko je proto výrazné (provozovatel 2026-10-04) */
.voice.invite .play { height: 40px; padding: 0 18px 0 15px; font-size: 12px; background: var(--ink); border-color: var(--ink); color: var(--wall); }
.voice .bar, .voice .t { display: none !important; } /* bez času a průběhu (přání provozovatele 2026-09-28) */
.voice .bar { position: relative; display: none; width: 140px; height: 2px; border-radius: 1px; overflow: hidden; background: rgba(var(--ink-rgb), .16); }
.voice.started .bar { display: block; }
.voice .bar i { display: block; width: 0; height: 100%; background: var(--terra); transition: width .25s linear; }
.voice .t { font-variant-numeric: tabular-nums; }
.voice .ai { padding-left: 12px; border-left: 1px solid rgba(var(--ink-rgb), .14); }
.voice .ai:empty { display: none; }
.voice.pending .play, .voice.pending .bar { opacity: .45; }
.voice .status { font: italic 400 15px/1.4 var(--serif); letter-spacing: 0; color: var(--muted); }

/* ---------- tlačítka ---------- */
.btn {
  min-height: var(--tap); padding: 0 22px; border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid rgba(var(--ink-rgb), .32); background: transparent; color: var(--ink);
  font: 500 13px/1.25 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-align: center;
  transition: background-color .8s var(--ease), border-color .8s var(--ease), color .8s var(--ease), box-shadow .8s var(--ease);
}
.btn:hover { border-color: var(--ink); background: rgba(var(--ink-rgb), .05); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--wall); box-shadow: 0 10px 30px rgba(var(--shade-rgb), .22); }
.btn.primary:hover { background: #463c33; border-color: #463c33; box-shadow: 0 12px 36px rgba(196, 103, 63, .22); }
.btn.quiet { padding: 0 12px; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); background: transparent; border-color: transparent; }
.btn[disabled] { opacity: .42; cursor: default; box-shadow: none; }
.btn[aria-disabled="true"] { opacity: .42; box-shadow: none; } /* klepnutelné: ukáže, co chybí */
.btn.primary[disabled]:hover { background: var(--ink); }
/* Čeká na server (watchBusyButtons): tlačítko nezešedne, za popiskem pomalu dýchají tečky. */
.btn.is-busy[disabled] { opacity: 1; cursor: progress; }
.btn.is-busy::after, .link-quiet.is-busy::after { content: '…'; margin-left: .2em; animation: hush-dot 1.2s ease-in-out infinite; }
.link-quiet.is-busy { cursor: progress; }
.step-status { margin: 12px 0 0; color: var(--muted); font-style: italic; animation: status-breathe 2.4s ease-in-out infinite; }
/* Start a vstup (test provozovatele 2026-10-01: 2–3 s jen pozadí, „jako by se to nenačetlo“): klidná věta „Chvíľku…“,
   až když start trvá déle než půl vteřiny; s připraveným vláknem zmizí. Tlačítko v práci nebledne, jen dýchá. */
.boot-status { display: none; }
body[data-boot="pending"] .boot-status {
  display: block; margin: 28px 0 0 var(--hang); color: var(--muted); font-style: italic;
  opacity: 0; animation: rise .8s var(--ease) .5s forwards, status-breathe 2.4s ease-in-out 1.3s infinite;
}
.btn.working, .btn.working[disabled] { opacity: 1; cursor: progress; animation: status-breathe 2.4s ease-in-out infinite; }
@keyframes status-breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* ---------- nabídka = věty, které můžete říct ---------- */
.offer,
.memory-choices { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 16px 0 0; animation: rise 1.4s var(--ease) backwards; }
.offer .btn,
.offer .btn.primary,
.memory-choices .btn,
.memory-choices .btn.primary {
  position: relative; min-height: var(--tap); padding: 8px 0; border: 0; border-bottom: 1px solid rgba(217, 142, 106, .45); border-radius: 0;
  justify-content: flex-start; text-align: left; background: none; box-shadow: none; color: var(--ink);
  font: italic 400 20.5px/1.3 var(--serif); letter-spacing: 0; text-transform: none;
}
.offer .btn::before,
.memory-choices .btn::before { top: calc(8px + .65em); }
.offer .btn:hover,
.memory-choices .btn:hover { color: var(--terra-deep); border-color: var(--terra); background: none; }
.music-ask .memory-choices .btn.selected { color: var(--terra); border-bottom-color: var(--terra); }

/* ---------- soukromý záznam: papír s voskovou pečetí ---------- */
.receipt {
  position: relative; max-width: 600px; margin: 22px 0 58px; padding: 32px 44px 34px;
  background-color: var(--paper); color: var(--paper-ink); border-radius: 3px;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, .22) 0, rgba(255, 255, 255, 0) 45%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .36  0 0 0 0 .24  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  box-shadow: 0 36px 70px rgba(var(--shade-rgb), .3), 0 3px 8px rgba(var(--shade-rgb), .21);
  transform: rotate(-.5deg);
  animation: letter-in 2s var(--ease) backwards;
}
@keyframes letter-in { from { opacity: 0; transform: rotate(-.5deg) translateY(14px); } to { opacity: 1; transform: rotate(-.5deg); } }
.receipt header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px;
  padding-bottom: 14px; border-bottom: 1px solid rgba(43, 37, 32, .16);
  font: 400 12px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--paper-muted);
}
.receipt dl { margin: 4px 0 0; }
.receipt .row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 12px 0; border-bottom: 1px solid rgba(43, 37, 32, .10); }
.receipt .row:last-child { border-bottom: 0; }
.receipt dt { padding-top: 6px; font: 400 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--paper-muted); }
.receipt dd { margin: 0; font: 400 19.5px/1.5 var(--serif); color: var(--paper-ink); overflow-wrap: anywhere; }
.receipt .row.one dd { font: italic 500 27px/1.28 var(--display); color: var(--paper-ink); }
.receipt .cards {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 14px; padding: 16px 104px 0 0;
  border-top: 1px solid rgba(43, 37, 32, .10);
  font: 400 13px/1.45 var(--sans); letter-spacing: .04em; color: var(--paper-muted);
}
.receipt .cards img { width: 30px; height: 45px; border-radius: 3px; object-fit: cover; box-shadow: 0 2px 5px rgba(var(--shade-rgb), .15); }
.receipt .cards .names { margin-left: 8px; flex: 1 1 180px; }
.receipt .note { margin: 14px 0 0; max-width: 380px; padding-right: 96px; font: 400 13px/1.55 var(--sans); color: var(--paper-muted); }
.seal {
  position: absolute; right: -30px; bottom: -44px; width: 138px; height: 138px;
  transform: rotate(-8deg); filter: drop-shadow(0 6px 10px rgba(40, 12, 6, .5));
  animation: seal-in 2.2s var(--ease) 1.4s backwards;
}
@keyframes seal-in { from { opacity: 0; transform: scale(1.07) rotate(-8deg); } to { opacity: 1; transform: rotate(-8deg); } }
.seal-text { font: 500 7.4px var(--sans); letter-spacing: .9px; fill: rgba(255, 226, 208, .85); }
.seal-text.shade { fill: rgba(70, 20, 8, .45); }

/* ---------- chyba / zkusit znovu ---------- */
/* Oznámení aplikace po konci sezení (plán §26): zřetelně systém, ne řeč Naverely — bezpatkové, rámeček, popisek */
.app-notice {
  display: grid; justify-items: start; gap: 6px; padding: 12px 16px;
  border: 1px dashed var(--line-strong); border-radius: 12px;
  font: 400 15px/1.5 var(--sans); color: var(--ink-2);
}
.app-notice p { margin: 0; }
.app-notice-label { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
/* Souhlas čl. 9 (L1b) pod krátkou řečí Naverely: celé znění k rozbalení, políčko poznámek, dvě volby se stejnou
   váhou (stejná třída, šířka i pořadí v toku) */
.consent-box { display: grid; gap: 12px; margin-top: 14px; }
.consent-text { display: grid; gap: 10px; }
.consent-text > p:not(.declaration-links) { margin: 0; font: 400 15px/1.5 var(--sans); color: var(--ink-2); }
.consent-full { font: 400 14px/1.55 var(--sans); color: var(--ink-2); }
.consent-full summary { cursor: pointer; width: fit-content; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.consent-full[open] summary { margin-bottom: 8px; }
.consent-full p { margin: 0 0 8px; }
.consent-notes { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; font: 400 15px/1.5 var(--sans); color: var(--ink-2); }
.consent-notes input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.consent-actions .btn { flex: 1 1 180px; }
.notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px 0 10px 18px; border-left: 2px solid var(--terra);
  font: 400 15px/1.5 var(--sans); color: var(--ink-2);
}
.notice p { margin: 0; flex: 1 1 220px; }

/* ---------- psaní = další řádek stránky ---------- */
.composer {
  position: sticky; bottom: 0; z-index: 4;
  width: 100%; max-width: calc(var(--flow) + var(--hang));
  padding: 22px 0 18px var(--hang);
}
.composer::before { /* stejná zeď jako za rozhovorem, text pod řádkem tiše mizí */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--wall-bg); background-attachment: fixed;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px); mask-image: linear-gradient(180deg, transparent 0, #000 22px);
  opacity: 0; transition: opacity .8s var(--ease);
}
body.reading-back .composer::before { opacity: 1; }
/* bez políčka (brána 18+ a souhlasu, po krizi) není co připnout: patička plyne pod obsahem a nepřekrývá ho (mobil) */
.composer:has(.write[hidden]) { position: relative; }
.chips { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 0 0 12px; }
.chips::before { content: attr(aria-label); margin: 0 0 6px; font: 400 11.5px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.chip {
  position: relative; min-height: var(--tap); padding: 8px 0; text-align: left;
  font: italic 400 17.5px/1.35 var(--serif); color: var(--ink-2);
  border-bottom: 1px solid rgba(var(--ink-rgb), .14);
  animation: rise 1.2s var(--ease) backwards;
  transition: color .8s var(--ease), border-color .8s var(--ease);
}
.chip::before { top: calc(8px + .675em); background: rgba(217, 142, 106, .6); }
.chip:hover { color: var(--ink); border-color: var(--terra); }
.write {
  position: relative; display: flex; align-items: flex-end; gap: 10px;
  padding: 4px 0 10px; border-bottom: 1px solid rgba(var(--ink-rgb), .4);
  transition: border-color 1s var(--ease), box-shadow 1s var(--ease);
}
.write:focus-within { border-color: var(--terra); box-shadow: 0 1px 0 var(--terra); }
.write.preview-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.composer.preview-composer { position: relative; bottom: auto; }
.preview-suggestions { margin: 0; min-width: 0; }
.preview-suggestions .chip { max-width: 100%; overflow-wrap: anywhere; }
.preview-suggestions .chip::before { display: none; }
.preview-consent { display: flex; align-items: flex-start; gap: 12px; font: 400 14px/1.6 var(--sans); color: var(--ink); cursor: pointer; }
.preview-consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--terra); }
.preview-form .send { justify-self: end; width: auto; max-width: 100%; padding: 10px 14px; border-radius: 22px; line-height: 1.4; height: auto; min-height: var(--tap); }
.preview-form .send .txt { display: inline; }
.preview-crisis a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.preview-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
/* Přední dveře „Tichý herbár“ (provozovatel 2026-10-13, naverela_landing_choice_1013b = S2b; návrh v deliverable
   ab39eaea648fed831534): vše před přihlášením (otázka zdarma, odpověď, e-mail a kód, pozdrav vracejícího se) na papíře
   se zeleným inkoustem; vlevo velké jméno s lístkem, který se dokreslí, vpravo věta a otázka na lince. body.front-door
   je v šabloně, app.js ji po přihlášení (bootSession) odebere. Barvy, hlavička a jméno s lístkem platí přes body.herbar
   (šablona, trvale) i po přihlášení — viz „Herbář i po přihlášení“ níž. */
.front-brand { display: none; }
body.herbar {
  --ink: #293c2c; --ink-rgb: 41, 60, 44; --ink-2: #3a4d3c; --muted: #53614e; --terra: #4f6a4a; --terra-deep: #3f5a3c;
  --rubric: #4f6a4a; --sage: #8e9a7e; --shade-rgb: 60, 72, 50; --panel: #f8f5ec; --paper: #fbf9f2;
  --wall: #f5f1e6; --wall-strip: #f5f1e6;
  --wall-bg: radial-gradient(ellipse at 15% 75%, rgba(220, 226, 201, .33), transparent 55%), linear-gradient(#f5f1e6, #f5f1e6);
}
html:has(body.herbar) { background: #f5f1e6; }
body.front-door .table { display: none; }
body.front-door .top .brand, body.front-door .controls > :not(#dailySkip, #musicToggle, #voiceToggle, .front-legal) { display: none; }
/* „Podmienky a súkromie“ v hlavičce předních dveří (provozovatel 2026-10-14): tichá položka, rozbalí tři odkazy pod
   sebou; patička s odkazy se před přihlášením neukazuje (po přihlášení zůstává rozbalená dole) */
.front-legal { display: none; }
body.herbar .front-legal { display: block; position: relative; }
body.herbar .composer .foot { display: none; }
/* karty, o Naverele (a výběr země) jen po přihlášení, v nabídce „Viac“ */
body.front-door .front-legal-links :is([data-legal="cards"], [data-legal="about"]) { display: none; }
.front-legal > summary {
  display: flex; align-items: center; height: var(--tap); padding: 0 10px; list-style: none; cursor: pointer;
  font: 400 13px/1 var(--sans); letter-spacing: .02em; color: var(--muted);
}
.front-legal > summary::-webkit-details-marker { display: none; }
.front-legal > summary:hover, .front-legal[open] > summary { color: var(--ink); }
.front-legal-links {
  position: absolute; right: 0; top: calc(100% - 4px); z-index: 40; display: flex; flex-direction: column; gap: 10px;
  min-width: 210px; padding: 14px 18px; background: #f5f1e6; border: 1px solid rgba(var(--ink-rgb), .14);
  font: 400 13px/1.4 var(--sans); box-shadow: 0 12px 28px -18px rgba(var(--ink-rgb), .45);
}
.front-legal-links a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(var(--ink-rgb), .3); }
/* „Vypočuť“ v předních dveřích jako tichý text s ikonou v tenkém kroužku místo tmavé pilulky (provozovatel 2026-10-14:
   „to vypočuť udělat nějak hezčeji než takové škaredé tlačítko“); hraje-li, kroužek ztmavne */
body.herbar .voice .play, body.herbar .voice.invite .play, body.herbar .voice.playing .play {
  height: auto; padding: 4px 2px; gap: 12px; border: 0; border-radius: 0; background: none; color: var(--ink);
  font: 500 12px/1 var(--sans); letter-spacing: .18em;
}
body.herbar .voice .play svg {
  box-sizing: content-box; width: 9px; height: 9px; padding: 10px; border: 1px solid #76856b; border-radius: 50%;
  transition: border-color .8s var(--ease), background-color .8s var(--ease);
}
body.herbar .voice .play:hover svg { border-color: var(--ink); }
body.herbar .voice.playing .play svg { border-color: var(--ink); background: rgba(var(--ink-rgb), .08); }
/* hudba a hlas jen tam, kde je co poslouchat (hlasová odpověď, pozdrav s „Vypočuť“): přehrávač pustí i hudbu
   a bez přepínače by nešla vypnout; první obrazovka zůstává jen s „Prihlásiť sa“ */
body.front-door:not(:has(.messages .voice)) :is(#musicToggle, #voiceToggle) { display: none; }
body.herbar .front-brand {
  display: block; position: relative; z-index: 0; align-self: start; min-height: 380px;
  padding: calc(clamp(40px, 12vh, 132px) + 40px) 0 60px calc(var(--stage-x) + clamp(28px, 6.5vw, 96px));
}
.front-word { margin: 0 0 18px; font: 500 clamp(72px, 7vw, 105px)/1 var(--display); letter-spacing: -.065em; color: var(--ink); }
.front-tag { margin: 0; font: 400 12px/1.4 var(--sans); letter-spacing: .15em; color: var(--muted); }
.front-plant {
  position: absolute; z-index: -1; width: 255px; height: 270px; top: calc(clamp(40px, 12vh, 132px) + 192px);
  left: calc(var(--stage-x) + clamp(28px, 6.5vw, 96px) + 78px); color: #778368;
}
.front-plant path, .front-plant circle { stroke-dasharray: 900; stroke-dashoffset: 900; animation: front-draw 4.5s ease-out .3s forwards; }
@keyframes front-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .front-plant path, .front-plant circle { animation: none; stroke-dashoffset: 0; } }
body.herbar .write textarea, body.herbar .write .auth-input { font-family: var(--display); font-size: 22px; }
/* Herbář i po přihlášení (provozovatel 2026-10-14: „po přihlášení jsem zase zpět na staré webovce? Musíme upravit i to“
   a „co je tam nutné nechat dej do headeru“): místo okna vlevo jméno s lístkem jako na předních dveřích; karty výkladu
   leží pod jménem na tenké lince a pod nimi otázka (lístek mezitím ustoupí). Okno, parapet, svíčka a noční ztmavení
   zmizí; patička pod psaním se neukazuje a odkazy jsou v nabídce „Viac“ v hlavičce. */
body.herbar .front-brand { grid-column: 1; grid-row: 1; }
body.herbar .table { grid-column: 1; grid-row: 1; }
body.herbar .thread { grid-column: 2; grid-row: 1; }
body.herbar:not(.front-door) .top .brand { display: none; }
body.herbar .brand .coin { display: none; }
body.herbar:not(.front-door) .front-brand { position: sticky; top: var(--top-h); }
body.herbar[data-sky] .hush { opacity: 0; }
body.herbar[data-sky="night"] { --win-w: clamp(280px, 29vw, 430px); }
body.herbar:not(.front-door) .frame {
  left: calc(var(--stage-x) + clamp(28px, 6.5vw, 96px)); top: calc(var(--top-h) + clamp(40px, 12vh, 132px) + 250px);
  width: var(--win-w); height: auto;
}
body.herbar .frame::before, body.herbar :is(.spill, .arch, .sill, .candle) { display: none; }
body.herbar:not(.front-door) .sill-row { position: static; flex-direction: column; align-items: flex-start; gap: 18px; padding: 0; }
body.herbar:not(.front-door) .slots {
  --card-w: clamp(60px, calc(var(--win-w) * .2), 86px); align-self: stretch; gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid #76856b;
}
body.herbar .slot { border-radius: 3px; box-shadow: 0 6px 14px rgba(var(--ink-rgb), .14), 0 1px 2px rgba(var(--ink-rgb), .12); }
body.herbar:not(.front-door) .q {
  flex: none; min-width: 0; max-width: none; margin: 0; padding: 0; border-radius: 0; background: none; box-shadow: none;
  transform: none; animation: herbar-fade 1.8s var(--ease) backwards;
  font: italic 400 19px/1.4 var(--display); color: var(--ink-2); -webkit-line-clamp: 3;
}
@keyframes herbar-fade { from { opacity: 0; } to { opacity: 1; } }
body.herbar:is(.has-table, :has(.q:not(.empty))) .front-plant { opacity: 0; transition: opacity 1.2s var(--ease); }
/* tlačítka bez tmavé pilulky: obrys inkoustem (Nové sedenie, Pokračovať, nabídky) */
body.herbar .btn.primary { background: none; border-color: var(--ink); color: var(--ink); box-shadow: none; }
body.herbar .btn.primary:hover { background: rgba(var(--ink-rgb), .06); border-color: var(--ink); box-shadow: none; }
body.herbar .btn.primary[disabled]:hover { background: none; }
/* pečeť záznamu sezení ve vosku barvy inkoustu místo cihlové */
body.herbar .seal { filter: hue-rotate(98deg) saturate(.55) brightness(.92) drop-shadow(0 6px 10px rgba(30, 40, 25, .42)); }
/* brána (údržba, záložní přihlášení) bez okna: jméno a podtitul na papíře */
.gate-herbar { margin: 4px 0 22px; text-align: center; }
.gate-herbar .name { margin: 0; font: 500 52px/1 var(--display); letter-spacing: -.04em; color: var(--ink); }
.gate-herbar .tagline { margin: 12px 0 0; font: 400 12px/1.4 var(--sans); letter-spacing: .15em; color: var(--muted); }
/* otázka zdarma: velká věta, pod ní tichý podtitul, otázka na lince a textové „Odoslať →“ */
.msg.guide.preview-intro .body { font: 400 14px/1.6 var(--sans); color: var(--muted); }
.preview-intro .body .hl { display: block; margin-bottom: 14px; font: 400 clamp(38px, 3.4vw, 48px)/1.12 var(--display); color: var(--ink); }
.write.preview-form { padding: 0; gap: 0; border-top: 1px solid #76856b; border-bottom: 0; }
.write.preview-form:focus-within { box-shadow: none; }
.write.preview-form textarea { min-height: 140px; padding: 24px 0; border-bottom: 1.5px solid var(--ink); font: italic 400 22px/1.5 var(--display); }
.preview-form .send {
  justify-self: end; margin-top: 14px; padding: 14px 0 14px 18px; border: 0; border-radius: 0; color: var(--ink);
  font: 500 14px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
}
.preview-form .send svg { stroke: var(--ink); }
.preview-form .send:hover { color: var(--terra); }
.preview-form .send[disabled] { opacity: .5; }
/* souhlas čl. 9 mezi polem a tlačítkem (Petr 2026-10-28, varianta C) */
.preview-form .preview-note { margin: 10px 0 0; font: 400 13px/1.45 var(--sans); color: rgba(var(--ink-rgb), .62); }
/* karta „Celé sedenie zdarma“ pod odpovědí zdarma (Petr 2026-10-29; dřív drobný odkaz bez kliků): co sedení dá a že
   nic nestojí, tlačítko s dotykovou plochou aspoň 44 px */
.preview-form .preview-continue-card {
  display: grid; gap: 6px; margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--paper);
}
.preview-form .preview-continue-title { font: 500 20px/1.25 var(--display); color: var(--ink); }
.preview-form .preview-continue-body { font: 400 14px/1.5 var(--sans); color: rgba(var(--ink-rgb), .78); }
.preview-form .preview-continue {
  justify-self: stretch; min-height: var(--tap); margin-top: 6px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper); cursor: pointer; font: 500 14px/1.3 var(--sans); letter-spacing: .04em;
}
.preview-form .preview-continue:hover { background: var(--terra-deep); border-color: var(--terra-deep); }
.preview-form .preview-continue:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* pokračování do sedení pod tlačítkem výkladu e-mailem (Petr 2026-11-05): stejná velikost, tichší */
.preview-form .preview-continue.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.preview-form .preview-continue.secondary:hover { background: transparent; color: var(--terra-deep); border-color: var(--terra-deep); }
/* horoskop na dnes (plán §43): 12 znamení nad políčkem, tři sloupce i na úzkém telefonu, dotyková plocha 44 px */
.preview-form .horoscope-signs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.preview-form .horoscope-sign {
  min-height: var(--tap); padding: 8px 6px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper);
  color: var(--ink); cursor: pointer; font: 400 14.5px/1.2 var(--sans); overflow-wrap: anywhere;
}
.preview-form .horoscope-sign:hover { border-color: var(--terra-deep); color: var(--terra-deep); }
.preview-form .horoscope-sign:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (min-width: 560px) { .preview-form .horoscope-signs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* výklad e-mailem (plán §44): tichá nabídka nad políčkem pro e-mail a nezaškrtnuté políčko karty dne */
.reading-offer { margin: 0 0 14px; color: var(--muted); font: 400 15px/1.55 var(--sans); }
.reading-offer-text { margin: 0 0 10px; color: var(--ink); }
.reading-offer-daily { display: flex; gap: 10px; align-items: flex-start; min-height: var(--tap); padding: 6px 0; cursor: pointer; }
.reading-offer-daily input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--terra-deep); }
.reading-offer-daily input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.reading-sent { position: fixed; left: 50%; bottom: 24px; z-index: 40; width: min(92vw, 460px); transform: translateX(-50%); padding: 14px 18px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper); color: var(--paper-ink); font: 400 15px/1.5 var(--sans);
  box-shadow: 0 10px 30px rgba(var(--shade-rgb), .18); cursor: pointer; }
.preview-crisis { margin: 18px 0 0; padding: 18px; border: 1px solid var(--terra); border-radius: 8px; color: var(--ink); background: rgba(217, 142, 106, .12); white-space: pre-wrap; overflow-wrap: anywhere; font: 400 16px/1.65 var(--sans); }
.preview-form textarea:focus-visible, .preview-consent input:focus-visible, .preview-suggestions .chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
/* Naverela přemýšlí a odpovídá: řádek pro psaní tiše ustoupí a nejde do něj psát (setBusy) */
.write { transition: opacity .8s var(--ease), border-color 1s var(--ease), box-shadow 1s var(--ease); }
.write.is-waiting { opacity: .28; pointer-events: none; }
.write textarea,
.write .auth-input {
  flex: 1; min-width: 0; min-height: 36px; max-height: 180px; resize: none;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font: italic 400 20.5px/1.5 var(--serif); padding: 3px 0 0;
}
.write textarea::placeholder,
.write .auth-input::placeholder { color: #8f8274; opacity: 1; }
.auth-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 12px; }
.signin-captcha { display: flex; justify-content: flex-start; }
/* Google a Facebook jako světlé karty stránky přes celou šířku (provozovatel 2026-10-24, varianta C). Pravidla značky
 * Google (developers.google.com/identity/branding-guidelines): barevné G beze změny na bílém podkladu; Facebook (#0866FF)
 * stejně na bílém kruhu (plán §39). */
.social-btn,
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box;
  width: 100%; min-height: 50px; padding: 0 18px; border-radius: 14px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06), 0 6px 18px -10px rgba(var(--ink-rgb), .25);
  font: 400 15.5px/1.2 var(--sans); letter-spacing: .02em;
  transition: border-color .3s var(--ease);
}
.social-btn:hover, .google-btn:hover { border-color: var(--line-strong); }
.social-btn:focus-visible, .google-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.social-btn:disabled, .google-btn:disabled { opacity: .6; cursor: default; }
.social-btn-mark,
.google-btn-mark {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(var(--ink-rgb), .08);
}
.social-btn-logo,
.google-btn-logo { flex: none; width: 18px; height: 18px; }
/* Po klepnutí stránka odchází na Google či Facebook (na mobilu 2–3 s): kroužek kolem loga, druhá volba ztlumená. */
.social-btn-mark { position: relative; }
.social-btn.is-leaving { cursor: progress; border-color: var(--line-strong); }
.social-btn.is-leaving .social-btn-mark::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(var(--ink-rgb), .12); border-top-color: var(--ink);
  animation: social-leaving .8s linear infinite;
}
.signin-alt:has(.is-leaving) .social-btn:not(.is-leaving) { opacity: .45; transition: opacity .3s var(--ease); }
@keyframes social-leaving { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .social-btn.is-leaving .social-btn-mark::after { animation: none; border-color: var(--ink); }
}
.write textarea:disabled { opacity: .5; }
.send {
  flex: none; height: var(--tap); padding: 0 4px 0 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  transition: opacity .8s var(--ease), color .8s var(--ease);
}
.send svg { width: 18px; height: 18px; fill: none; stroke: var(--terra); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.send:hover { color: var(--terra-deep); }
.send[disabled] { opacity: .4; cursor: default; }
.composer .foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin: 10px 0 0; }
/* přihlášení: Google jako první a nejrychlejší možnost nad políčkem pro e-mail (Petr 2026-10-29; od 2026-10-04 bylo pod
   ním), pod ním „alebo e-mailom“ mezi linkami */
.signin-alt { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin: 14px 0 12px; }
.signin-alt-hint { margin-top: -4px; text-align: center; font: 400 12px/1.5 var(--sans); letter-spacing: .02em; color: var(--muted); }
.signin-alt-or { display: flex; align-items: center; gap: 12px; font: 400 12px/1.5 var(--sans); letter-spacing: .06em; color: var(--muted); }
.signin-alt-or::before, .signin-alt-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sms-email-note { color: var(--ink-2); }
.fine { margin: 0; font: 400 12px/1.5 var(--sans); letter-spacing: .02em; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; gap: 2px 14px; font: 400 12px/1.5 var(--sans); letter-spacing: .02em; color: var(--muted); }
.legal-links a { color: inherit; text-underline-offset: 3px; text-decoration-color: rgba(217, 142, 106, .6); }
.legal-links a:hover { color: var(--ink); }
/* Před přihlášením jen tichý odkaz „Podmienky a súkromie“ vpravo (rozbalí odkazy, provozovatel 2026-10-08: „vše pod jedno
   tlačítko/link“); po přihlášení app.js přidá body.signed-in a rozbalí seznam natrvalo i s poznámkou o AI. */
.legal-more > summary {
  display: inline-block; min-height: var(--tap); padding: 12px 0; cursor: pointer; list-style: none;
  font: 400 12px/1.5 var(--sans); letter-spacing: .02em; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(196, 103, 63, .5);
}
.legal-more > summary::-webkit-details-marker { display: none; }
.legal-more > summary:hover { color: var(--ink); }
.legal-more > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
body:not(.signed-in) .composer .foot { justify-content: flex-end; }
body:not(.signed-in) .composer .fine { display: none; }
body.signed-in .legal-more > summary { display: none; }
/* během otázky zdarma rozbaluje patičku odkaz ve větě souhlasu; vlastní odkaz patičky by ho jen opakoval */
.composer.preview-composer .legal-more > summary { display: none; }
/* „Prihlásiť sa“ v záhlaví jen během otázky zdarma (provozovatel 2026-10-08) */
.ctl.signin { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(196, 103, 63, .5); }

/* zamčený řádek: ukončené sezení / žádné otevřené sezení */
.session-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 6px 0 14px; border-bottom: 1px solid var(--line);
}
.session-bar p { margin: 0; flex: 1 1 240px; font: italic 400 19px/1.5 var(--serif); color: var(--ink-2); }

/* tichá poznámka: otevřené sezení patří jiné zemi (po přepnutí v hlavičce) */
.market-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 4px 0 12px; border-bottom: 1px solid var(--line);
}
.market-note p { margin: 0; flex: 1 1 260px; font: italic 400 16px/1.5 var(--serif); color: var(--muted); }

/* ---------- překryvné dialogy: tmavé desky ve stejné místnosti ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 24px;
  overflow-x: hidden; overflow-y: auto;
  background: rgba(var(--ink-rgb), .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade-in .9s var(--ease) backwards;
}
.sheet {
  position: relative; width: min(520px, 100%);
  display: grid; gap: 16px; padding: 32px 32px 28px;
  background: linear-gradient(180deg, #fffaf2 0%, var(--panel) 100%);
  border: 1px solid rgba(var(--ink-rgb), .10); border-radius: 16px;
  box-shadow: 0 40px 90px rgba(var(--shade-rgb), .28), 0 2px 6px rgba(var(--shade-rgb), .16);
  color: var(--ink); font-family: var(--sans);
  animation: rise 1s var(--ease) backwards;
}
.sheet .eyebrow { margin: 0; font: 400 11.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sheet h1 { margin: 0; font: 500 31px/1.18 var(--display); color: var(--ink); }
.sheet p { margin: 0; font: 400 15px/1.6 var(--sans); color: var(--ink-2); }
.sheet a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(217, 142, 106, .8); }
.sheet a:hover { color: var(--terra-deep); }
.sheet .err { color: var(--rubric); font-size: 14px; }
.sheet .foot { font-size: 12px; letter-spacing: .03em; color: var(--muted); }
.sheet .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: var(--tap); font: 400 15px/1.5 var(--sans); color: var(--ink-2); }
.check input {
  -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0;
  display: grid; place-items: center; cursor: pointer; border-radius: 6px;
  border: 1.5px solid rgba(var(--ink-rgb), .6); background: rgba(var(--ink-rgb), .04);
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
}
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--wall); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.check label { cursor: pointer; }
.sheet .disclosure { padding: 14px 16px; border-radius: 12px; background: rgba(var(--ink-rgb), .05); color: var(--ink); }
.sheet .privacy-note { font-size: 14px; }

/* Brána: malé okno za soumraku, pod ním klidný text a jeden krok dál. */
.overlay.gate {
  place-items: start center; padding: 22px 24px 40px;
  background-color: var(--wall); background-image: var(--wall-bg);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sheet.gate {
  width: min(660px, 100%); gap: 16px; padding: 0;
  justify-items: center; text-align: center;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.sheet.gate .gate-frame { width: min(360px, calc(100% - 68px)); height: clamp(240px, 34vh, 420px); margin: 14px 0 30px; }
.sheet.gate .disclosure { max-width: 600px; padding: 0; background: none; font: 400 20px/1.6 var(--serif); color: var(--ink); }
.sheet.gate .check { width: min(560px, 100%); text-align: left; font-size: 15.5px; }
.sheet.gate .check a { white-space: nowrap; }
.sheet.gate > p:not(.disclosure):not(.err):not(.foot) { max-width: 560px; font-size: 14px; color: var(--ink-2); }
.sheet.gate .acts { justify-content: center; margin-top: 8px; }
.sheet.gate .acts .btn.primary { min-height: 54px; padding: 0 44px; border-radius: 27px; font-size: 14.5px; letter-spacing: .16em; }
.sheet.gate .foot { margin-top: 6px; }
.sheet.signin h1 { font-size: 32px; }
/* Přihlášení je rozhovor (plán §18.2); karta zůstává jen pro výpadek Clerku. */
.sheet.signin .signin-intro { max-width: 460px; font: 400 18px/1.55 var(--serif); color: var(--ink-2); }

.history-list { display: grid; max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); }
.history-item {
  display: grid; gap: 4px; width: 100%; min-height: var(--tap); padding: 14px 10px; text-align: left;
  border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  transition: background-color .6s var(--ease);
}
.history-item:hover { background: rgba(var(--ink-rgb), .04); }
.history-item[aria-current="true"] { background: rgba(217, 142, 106, .08); }
.history-item b { font: 400 18px/1.35 var(--serif); color: var(--ink); }
.history-item span { font: 400 12.5px/1.4 var(--sans); color: var(--muted); }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.history-row .history-item { border-bottom: 0; }
.history-row .quiet-delete { padding-right: 10px; text-align: right; }
.history-row .quiet-confirm { justify-content: flex-end; }
.history-profile { justify-self: start; }

/* ---------- profil klienta: Moje údaje ---------- */
.profile-fields { display: grid; gap: 8px; width: min(420px, 100%); text-align: left; }
.profile-fields .field-label { margin-top: 6px; font: 400 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.profile-fields .field-label .optional { letter-spacing: .04em; text-transform: none; }
.profile-fields input[type="text"],
.profile-fields input[type="email"],
.profile-fields input[type="date"] {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(var(--ink-rgb), .04);
  font: 400 18px/1.4 var(--serif); color: var(--ink);
}
.profile-fields input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.profile-fields input::placeholder { color: var(--muted); }
/* odstoupení od smlouvy (L1c): výběr smlouvy a nepovinný důvod ve stylu polí profilu */
.withdrawal-form { width: min(520px, 100%); }
.withdrawal-form textarea {
  width: 100%; padding: 10px 14px; border-radius: 10px; resize: vertical;
  border: 1px solid var(--line-strong); background: rgba(var(--ink-rgb), .04);
  font: 400 17px/1.5 var(--serif); color: var(--ink);
}
.withdrawal-form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.withdrawal-contracts { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.withdrawal-contract { display: flex; gap: 10px; align-items: flex-start; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 400 15px/1.5 var(--sans); color: var(--ink-2); cursor: pointer; }
.withdrawal-contract input { margin-top: 4px; flex: none; }
.withdrawal-form .btn { margin-top: 10px; justify-self: start; }
.address-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; border: 0; min-width: 0; }
.address-choice legend { width: 100%; margin-bottom: 6px; padding: 0; }
.chip-radio {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--line-strong); cursor: pointer; font: 400 15px/1 var(--sans); color: var(--ink-2);
}
.chip-radio input { accent-color: var(--ink); }
.chip-radio:has(input:checked) { border-color: var(--ink); color: var(--ink); background: rgba(var(--ink-rgb), .06); }
.declined-note { margin: 0; font-size: 14px; color: var(--muted); }
.declaration-choices { display: grid; justify-items: start; gap: 10px; margin-top: 14px; }
.declaration-links { margin: 0; font: 400 13px/1.5 var(--sans); color: var(--muted); }
.declaration-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sheet .status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.sheet .hint { font-size: 13px; color: var(--muted); }
.profile-fields .zodiac-sign { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.profile-sheet-body { display: grid; gap: 14px; }
.profile-sheet-body > .btn { justify-self: start; }
.memory-settings { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.memory-settings h2 { margin: 0; font: 500 20px/1.3 var(--display); color: var(--ink); }
.notes-list { display: grid; margin: 0; padding: 0; list-style: none; }
.notes-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0;
  border-bottom: 1px solid var(--line); font: 400 15px/1.5 var(--sans); color: var(--ink-2);
}
.account-zone { display: grid; justify-items: start; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.account-zone .hint { margin: 0; overflow-wrap: anywhere; }
/* mazání schované: drobné textové odkazy s potvrzením na místě (plán §16.9 bod 3) */
.quiet-zone { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.link-quiet {
  min-height: 32px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font: 400 13px/1.4 var(--sans); color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px;
}
.link-quiet:hover { color: var(--ink); }
.link-quiet.danger { color: var(--rubric); }
.link-quiet[disabled] { opacity: .5; cursor: default; }
.quiet-confirm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.quiet-confirm .hint { width: 100%; }
/* otázka na poznámky v rozhovoru, hlasem Naverely, bez dialogu (plán §16.9 bod 1) */
.quiet-ask { margin: 18px 0 0; animation: rise 1.4s var(--ease) backwards; }
.quiet-ask .memory-text { margin: 0; font: 400 18px/1.6 var(--serif); color: var(--ink-2); }
.quiet-ask .memory-choices { margin-top: 8px; animation: none; } /* rodič už stoupá, jinak dvojitý posun */

/* ---------- klidná chvíle po přijaté pauze (Fáze 5B, B2; mockup D) ---------- */
/* přednost před nočním „čtením zpět“ (body[data-sky=night].reading-back rozsvěcí zprávy) */
body.calm[data-sky] .messages > :not(.calm-moment), body.calm .chips { opacity: .3; transition: opacity var(--move) var(--ease); }
.calm-moment { margin: 12px 0 0; animation: rise 1.8s var(--ease) backwards; }
.calm-moment .calm-lead { margin: 0 0 16px; font: 500 30px/1.3 var(--display); color: var(--ink); }
.calm-moment .calm-soft { margin: 0; font: 400 14.5px/1.6 var(--sans); letter-spacing: .02em; color: var(--muted); }
.calm-moment .calm-continue { margin-top: 26px; }

/* ---------- triptych pod výkladem tří karet (Fáze 5B, B3) ---------- */
.triptych {
  list-style: none; margin: 22px 0 0; padding: 0; max-width: 440px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2.4vw, 18px);
  animation: rise 1.6s var(--ease) backwards;
}
.triptych-card { display: grid; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.triptych-card img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 12px 26px rgba(var(--shade-rgb), .23); transition: transform .9s var(--ease); }
.triptych-card:hover img { transform: translateY(-3px); }
.triptych-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.triptych-role { margin-top: 4px; font: 400 11px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rubric); hyphens: auto; overflow-wrap: anywhere; }
.triptych-name { font: 400 15px/1.35 var(--serif); color: var(--ink-2); hyphens: auto; overflow-wrap: anywhere; }
/* výběr karty klepnutím, dokud výklad čeká na odpověď */
.triptych.choosing .triptych-card:hover img { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(var(--shade-rgb), .27); }
.triptych-hint { margin: 10px 0 0; font: 400 13px/1.5 var(--sans); letter-spacing: .02em; color: var(--muted); }

/* ---------- význam karty hlasem v detailu karty (Fáze 5B, B4) ---------- */
.detail-text .listen[aria-pressed="true"] { border-color: var(--terra); }
.detail-text .listen-note { font-size: 12.5px; letter-spacing: .03em; color: var(--muted); }

/* ---------- nabídka sezení (sheet) ---------- */
.sheet.billing { width: min(680px, 100%); margin: auto; gap: 18px; }
.sheet.billing h2 { margin: 0; font: 400 11.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sheet .billing-intro { font: 400 17px/1.6 var(--serif); color: var(--ink-2); }
.sheet .billing-loading { color: var(--muted); }
.wallet { display: grid; gap: 8px; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(var(--ink-rgb), .06); background: rgba(var(--ink-rgb), .04); }
.sheet .wallet-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: var(--ink-2); }
.wallet-head b { font: 500 23px/1.2 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.wallet .grants { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font: 400 13px/1.5 var(--sans); color: var(--muted); }
.sheet .test-strip { padding: 11px 16px; border-radius: 10px; border: 1px dashed rgba(217, 142, 106, .55); background: rgba(217, 142, 106, .06); font-size: 13.5px; color: var(--ink-2); }
.offer-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.offer-group legend { margin: 0 0 12px; padding: 0; font: 400 11.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.offer-card {
  position: relative; display: grid; align-content: start; gap: 3px;
  min-height: var(--tap); padding: 16px 18px; cursor: pointer;
  border: 1px solid rgba(var(--ink-rgb), .14); border-radius: 12px; background: rgba(var(--ink-rgb), .025);
  transition: border-color .6s var(--ease), background-color .6s var(--ease), box-shadow .6s var(--ease);
}
.offer-card:hover { border-color: rgba(var(--ink-rgb), .34); }
.offer-card:has(input:checked) { border-color: var(--terra); background: rgba(217, 142, 106, .08); box-shadow: inset 0 0 0 1px var(--terra); }
.offer-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@supports not selector(:has(*)) {
  .offer-card:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
}
.offer-card .name { font: 500 22px/1.2 var(--display); color: var(--ink); }
.offer-card .sub { font: 400 13px/1.45 var(--sans); color: var(--ink-2); }
.offer-card .count { margin-top: 6px; font: 400 12.5px/1.4 var(--sans); letter-spacing: .02em; color: var(--muted); }
.offer-card .price { margin-top: 10px; font: 500 21px/1.2 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.offer-card .vat { font: 400 12px/1.4 var(--sans); color: var(--muted); }
.offer-grid > .offer-card:only-child {
  grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px;
  grid-template-areas: "name price" "sub vat" "count .";
}
.offer-grid > .offer-card:only-child .name { grid-area: name; }
.offer-grid > .offer-card:only-child .sub { grid-area: sub; }
.offer-grid > .offer-card:only-child .count { grid-area: count; }
.offer-grid > .offer-card:only-child .price { grid-area: price; margin-top: 0; text-align: right; }
.offer-grid > .offer-card:only-child .vat { grid-area: vat; text-align: right; }
.sheet .terms { font-size: 12.5px; color: var(--muted); }
.subscription { display: grid; gap: 12px; justify-items: start; padding: 16px 18px; border: 1px solid rgba(var(--ink-rgb), .14); border-radius: 12px; background: rgba(var(--ink-rgb), .025); }
.subscription.past-due { border-color: rgba(217, 142, 106, .6); background: rgba(217, 142, 106, .07); }
.sheet .sub-status { color: var(--ink); }
.sheet .check.consent { padding: 14px 16px; border: 1px solid rgba(var(--ink-rgb), .14); border-radius: 12px; background: rgba(var(--ink-rgb), .03); line-height: 1.55; }
.sheet .check.consent.attention { border-color: var(--terra); animation: consent-attention 1.6s var(--ease); }
@keyframes consent-attention { 0% { box-shadow: 0 0 0 0 rgba(217, 142, 106, .45); } 100% { box-shadow: 0 0 0 10px rgba(217, 142, 106, 0); } }
.sheet .withdrawal { font-size: 13px; line-height: 1.55; color: var(--muted); }
.sheet .legal { font-size: 13.5px; }
.sheet .total { min-height: 1.5em; font-size: 14.5px; font-weight: 500; color: var(--ink); }
/* součet a tlačítka se lepí ke spodní hraně posouvaného překryvu, „Objednať“ je vždy v obraze */
.sheet .order-bar {
  position: sticky; bottom: -24px; z-index: 1;   /* záporný posun = vnitřní okraj překryvu */
  display: grid; gap: 10px; margin: 0 -32px; padding: 14px 32px;
  background: rgba(248, 243, 234, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.sheet .order-bar .acts { margin-top: 0; }
.sheet.billing .foot { margin-top: -4px; }
.sheet.credit { width: min(520px, 100%); }
.sheet .credit-live { font: 400 18px/1.6 var(--serif); color: var(--ink); }
.sheet.credit .typing { height: 18px; }

/* ---------- detail karty ---------- */
.sheet.card-detail { width: min(840px, 100%); grid-template-columns: 280px minmax(0, 1fr); gap: 36px; padding: 36px; align-items: start; }
.detail-card img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 30px 60px rgba(var(--shade-rgb), .3), 0 3px 8px rgba(var(--shade-rgb), .21); }
.detail-text { display: grid; gap: 14px; align-content: start; padding-top: 6px; }
.detail-text .eyebrow { color: var(--rubric); }
.detail-text h1 { font-size: 40px; line-height: 1.1; }
.sheet .detail-concept { font: 400 19px/1.6 var(--serif); color: var(--ink); }
.detail-text dl { margin: 6px 0 0; display: grid; }
.detail-text dt { padding-top: 14px; border-top: 1px solid var(--line); font: 400 11.5px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.detail-text dd { margin: 6px 0 14px; font: 400 17.5px/1.55 var(--serif); color: var(--ink-2); }

/* ---------- debug (?debug=1) ---------- */
.debug {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; padding: 6px 12px;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--wall-deep); color: var(--ink-2); border-top: 1px solid var(--line);
}
.debug b { font-weight: 600; color: var(--muted); }
.debug .ev { flex: 1; min-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.has-debug .composer { padding-bottom: 46px; }

/* ---------- užší desktop ---------- */
@media (max-width: 1180px) {
  .ctl .state, .ctl.history .txt { display: none; }
  .ctl.toggle[aria-pressed="true"]::after, .ctl.toggle[data-on="true"]::after { content: ""; position: absolute; right: 7px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--terra); }
}
@media (max-width: 1100px) and (min-width: 861px) {
  .brand .tag { display: none; }
  .msg.guide .body { font-size: 20px; }
  .msg.user .body, .offer .btn, .offer .btn.primary, .write textarea, .write .auth-input { font-size: 19px; }
  .reveal { grid-template-columns: 92px minmax(0, 1fr); gap: 0 22px; }
  .card-inline { width: 92px; }
}

/* ---------- mobil: okno nahoře jako oblouk, s kartami úzký pás parapetu ---------- */
@media (max-width: 860px) {
  /* klidná chvíle na mobilu: okno je nad rozhovorem, zbytek vlákna se na chvíli schová (Fáze 5B) */
  body.calm .messages > :not(.calm-moment), body.calm .chips { display: none; }
  body.calm .messages { padding-top: 20px; }
  body[data-sky="night"] .view[data-mood="night"] .scene-img { object-position: center 6%; } /* nízké okno: měsíc v obrázku celý */
  body { --top-h: 58px; --hang: 24px; }
  html { scroll-padding-top: calc(58px + 226px); }   /* přilepené velké okno (12 + 168 + 30 px) */
  html:has(body:is(.has-table, .window-compact)) { scroll-padding-top: calc(58px + 96px); }
  .top { gap: 6px; padding: 0 6px 0 16px; background: var(--wall-strip); box-shadow: 0 10px 18px -12px rgba(var(--shade-rgb), .36); }
  .top::before { display: none; }
  .brand { gap: 9px; }
  .brand .coin { width: 28px; height: 28px; }
  .brand .coin img { width: 21px; height: 21px; }
  .brand .word { font-size: 23px; }
  .brand .tag { padding-left: 9px; font-size: 11px; letter-spacing: .12em; }
  .brand .tag .txt { display: none; }
  .brand .tag .txt-short { display: inline; }
  .controls { gap: 0; }
  .ctl { height: var(--tap); min-width: var(--tap); padding: 0 8px; }
  .ctl b, .ctl .txt, .sep { display: none; }
  .ctl .txt-short { display: inline; }
  .ctl.balance { gap: 6px; padding: 0 9px; }
  .ctl.toggle[aria-pressed="true"]::after, .ctl.toggle[data-on="true"]::after { right: 6px; top: 10px; }

  .session { display: block; min-height: 0; overflow-x: clip; }
  /* okno je pod hlavičkou vždy vidět (volba provozovatele 2026-10-01); velikost řídí stav, ne rolování */
  .table {
    position: sticky; top: var(--top-h); z-index: 6; padding: 12px 26px 30px;
    transition: padding var(--move) var(--ease), background-color .6s var(--ease), box-shadow .6s var(--ease);
  }
  .view .scene-img { transition: object-position var(--move) var(--ease); }
  .frame { position: relative; left: auto; top: auto; width: auto; height: 168px; }
  .frame::before, .gate-frame::before { inset: -9px -9px 0 -9px; border-radius: 50% 50% 0 0 / 70% 70% 0 0; }
  .arch { border-radius: 50% 50% 0 0 / 70% 70% 0 0; }
  .spill { width: 900px; height: 700px; }
  .sill { left: -18px; right: -18px; height: 14px; }
  .view .hills { height: 78%; }
  .view .sun { bottom: 45%; width: 40px; height: 40px; }
  .view[data-mood="dusk"] .sky { background: linear-gradient(180deg, #2a4450 0%, #6f7686 22%, #c7968b 36%, #e8b08c 46%, #f3d3b2 56%); }
  .view[data-mood="dawn"] .sun { bottom: 58%; width: 38px; height: 38px; }
  .sill-row { gap: 8px; padding: 0 12px 0 14px; }
  .slots { --card-w: 34px; gap: 5px; }
  .q { flex: 0 1 auto; max-width: 58%; padding: 5px 9px 6px; font-size: 12.5px; line-height: 1.25; -webkit-line-clamp: 2; }
  .q:not(.empty) + .candle { margin-left: 10px; }
  .candle { transform: scale(.7); }
  .candle .light { width: 140px; height: 140px; }

  /* pod velkým oknem plyne text (přihlášení, souhlas): podklad jako u hlavičky */
  body.scrolled .table { background-color: var(--wall-strip); box-shadow: 0 12px 18px -14px rgba(var(--shade-rgb), .42); }

  /* s kartami, nebo když se rozhovor pod velké okno už nevejde (window-compact, app.js), se okno pomalu (--move)
     složí do úzkého pásu parapetu, který zůstává pod hlavičkou */
  body:is(.has-table, .window-compact) .table {
    position: sticky; top: var(--top-h); z-index: 20; padding: 8px 12px 16px;
    background: var(--wall-strip); box-shadow: 0 12px 18px -14px rgba(var(--shade-rgb), .42);
  }
  body:is(.has-table, .window-compact) .frame { height: 62px; }
  body:is(.has-table, .window-compact) .frame::before { inset: -6px -6px 0 -6px; border-radius: 16px 16px 0 0; }
  body:is(.has-table, .window-compact) .arch { border-radius: 12px 12px 0 0; }
  body:is(.has-table, .window-compact) .spill { display: none; }
  body:is(.has-table, .window-compact) .view .hills { height: 100%; }
  body:is(.has-table, .window-compact) .view .scene-img { object-position: center 54%; }   /* úzký pás: horizont a jezero */
  body:is(.has-table, .window-compact) .sill { left: -10px; right: -10px; height: 10px; }
  body:is(.has-table, .window-compact) .slots { --card-w: 30px; }
  body:is(.has-table, .window-compact) .q:not(.empty) { display: block; white-space: nowrap; text-overflow: ellipsis; }
  /* noc: okno se znovu rozevře */
  body[data-sky="night"]:is(.has-table, .window-compact) .frame { height: 168px; }
  body[data-sky="night"]:is(.has-table, .window-compact) .arch { border-radius: 50% 50% 0 0 / 70% 70% 0 0; }
  body[data-sky="night"]:is(.has-table, .window-compact) .view .hills { height: 78%; }
  /* přední dveře na mobilu: jméno a lístek nahoře, pod nimi věta a otázka */
  body.front-door .front-brand { min-height: 212px; padding: 18px 20px 0 calc(20px + var(--hang)); }
  .front-word { font-size: 76px; }
  .front-tag { font-size: 11px; }
  .front-plant { width: 150px; height: 165px; top: 60px; left: auto; right: 4px; opacity: .72; }
  .preview-intro .body .hl { font-size: 34px; margin-bottom: 10px; }
  .msg.guide.preview-intro .body { font-size: 13px; }
  .write.preview-form textarea { min-height: 120px; }

  .thread { padding: 0 20px; }
  .messages { padding: 4px 0 24px var(--hang); gap: 24px; }
  .msg.guide .body { font-size: 18.5px; line-height: 1.58; }
  .msg.user .body, .offer .btn, .offer .btn.primary, .write textarea { font-size: 18.5px; }
  .msg.user .body::before, .offer .btn::before, .chip::before { left: calc(0px - var(--hang)); width: 13px; }
  .chip { font-size: 16.5px; }
  .offer { gap: 0; margin-top: 12px; }
  .reveal { display: flow-root; margin: 18px 0 14px; }
  .card-inline { float: left; width: 96px; margin: 4px 18px 6px 0; }
  .reveal .fam { font-size: 10.5px; letter-spacing: .16em; margin-bottom: 4px; }
  .reveal .fam .nm { font-size: 22px; }
  .voice .play { height: 34px; }
  .voice .bar { width: 84px; }
  .composer { padding: 16px 0 calc(12px + env(safe-area-inset-bottom, 0px)) var(--hang); }
  .write { gap: 4px; }
  .send { width: var(--tap); height: var(--tap); padding: 0; justify-content: center; border-radius: 50%; border: 1px solid rgba(217, 142, 106, .55); }
  .send .txt { display: none; }
  .receipt { margin: 18px 4px 52px 0; padding: 24px 20px 28px; }
  .receipt .row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .receipt dt { padding-top: 0; }
  .receipt dd { font-size: 18px; }
  .receipt .row.one dd { font-size: 23px; }
  .receipt .cards { padding-right: 70px; }
  .receipt .note { padding-right: 64px; }
  .seal { right: -8px; bottom: -36px; width: 100px; height: 100px; }
  .overlay.gate { padding: 12px 20px 48px; }
  .sheet.gate .gate-frame { width: calc(100% - 88px); height: 300px; margin: 18px 0 30px; }
  .gate-frame .view .hills { height: 52%; }
  .gate-frame .view .sun { bottom: 32.5%; width: 52px; height: 52px; }
  .gate-frame .view[data-mood="dusk"] .sky { background: linear-gradient(180deg, #1f3540 0%, #35505c 26%, #6f7686 48%, #b58f8d 64%, #e3a887 78%, #f1c7a2 90%, #f4d6b6 100%); }
  .arch-title .name { font-size: 44px; }
  .arch-title .tagline { font-size: 19px; }
  .sheet.gate .disclosure { font-size: 18.5px; }

  /* herbář po přihlášení na mobilu: malé jméno v hlavičce místo velkého, okno pryč; karty výkladu (a otázka) jako tichý
     pás pod hlavičkou, jen když na stole něco leží */
  body.herbar:not(.front-door) .top .brand { display: flex; }
  body.herbar:not(.front-door) .front-brand { display: none; }
  html:has(body.herbar:not(.front-door)) { scroll-padding-top: calc(58px + 24px); }
  html:has(body.herbar:not(.front-door).has-table) { scroll-padding-top: calc(58px + 96px); }
  body.herbar:not(.front-door) .table {
    position: sticky; top: var(--top-h); z-index: 20; padding: 10px 16px 12px;
    background: #f5f1e6; box-shadow: 0 12px 18px -16px rgba(var(--ink-rgb), .35);
  }
  body.herbar:not(.front-door):not(.has-table):not(:has(.q:not(.empty))) .table { display: none; }
  body.herbar:not(.front-door) .frame { position: relative; left: auto; top: auto; width: auto; height: auto; }
  body.herbar:not(.front-door) .sill-row { flex-direction: row; align-items: center; gap: 14px; }
  body.herbar:not(.front-door) .slots { --card-w: 36px; flex: none; align-self: auto; gap: 6px; padding: 0; border: 0; }
  body.herbar:not(.front-door) .q { flex: 1 1 auto; font-size: 15.5px; line-height: 1.3; -webkit-line-clamp: 2; }
}
@media (max-width: 480px) {
  /* triptych: dlouhé popisky DE/HU se zalomí, písmo menší (plán §16.8 bod 10) */
  .triptych { gap: 10px; }
  .triptych-role { font-size: 10px; letter-spacing: .1em; }
  .triptych-name { font-size: 13.5px; }
  .calm-moment .calm-lead { font-size: 25px; }
}
@media (max-width: 620px) {
  .overlay { padding: 16px; }
  .overlay[data-variant="billing"] { padding: 12px 0 0; }
  .sheet { padding: 26px 22px 22px; }
  .sheet h1 { font-size: 27px; }
  .sheet.gate { padding: 0; }
  .sheet.billing {
    width: 100%; margin: auto 0 0; gap: 16px;
    padding: 24px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0; border-bottom: 0;
  }
  .sheet.billing .order-bar { bottom: 0; margin: 0 -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .offer-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .offer-grid > .offer-card {
    grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; padding: 14px 16px;
    grid-template-areas: "name price" "sub vat" "count .";
  }
  .offer-grid > .offer-card .name { grid-area: name; }
  .offer-grid > .offer-card .sub { grid-area: sub; }
  .offer-grid > .offer-card .count { grid-area: count; margin-top: 2px; }
  .offer-grid > .offer-card .price { grid-area: price; margin-top: 0; text-align: right; font-size: 19px; }
  .offer-grid > .offer-card .vat { grid-area: vat; text-align: right; }
  .sheet.billing .acts .btn { flex: 1 1 auto; }
  .sheet.card-detail { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 20px 22px; }
  .detail-card { width: 190px; justify-self: center; }
  .detail-text h1 { font-size: 32px; }
}
/* telefony do 400 px: značka a štítek AI se musí vejít vedle ovladačů (terč 40 × 44 px splňuje WCAG 2.5.8) */
@media (max-width: 400px) {
  .ctl { min-width: 40px; }
  .brand { gap: 7px; }
  .brand .word { font-size: 21px; }
  .brand .tag { padding-left: 7px; }
}
@media (max-width: 374px) {
  .brand .word { display: none; }
  .card-inline { width: 84px; margin-right: 14px; }
  .msg.guide .body { font-size: 17.5px; }
}

/* pohyb jen tehdy, když je vítaný */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  body[data-boot="pending"] .boot-status { opacity: .8; }
  .card-inline .inner { transform: none !important; }
  .card-inline:not(.revealed) .face.front { display: none; }
  .card-inline.revealed .face.back { display: none; }
  .card-inline .face.front { transform: none; }
}
.referral-settings .referral-link {
  display: block; width: 100%; box-sizing: border-box; margin: .75rem 0;
  min-height: var(--tap); padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(var(--ink-rgb), .04);
  font: 400 15px/1.4 var(--sans); color: var(--ink);
}
.referral-settings .referral-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.referral-settings .acts, .referral-notice .acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.referral-invited { margin: .5rem 0 .25rem; }
