/* ==========================================================================
   Trading Desk — vizuální systém
   Hluboký inkoust, šampaňské zlato a jemné vlasové linky. Tmavý vzhled je
   výchozí, světlý (porcelán) se zapíná přepínačem. Popisky zůstávají psané
   normálně, ne verzálkami, aby se dobře četly.
   ========================================================================== */

@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/manrope-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/fraunces-latin-opsz-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/fraunces-latin-ext-opsz-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-display: swap; font-weight: 100 900; src: url(fonts/fraunces-latin-wght-italic.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-display: swap; font-weight: 100 900; src: url(fonts/fraunces-latin-ext-wght-italic.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #07080b;
  --bg-elev: #0b0d12;
  --surface: #0f1117;
  --surface-2: #141721;
  --surface-3: #1b1f2b;
  --input: #0a0c11;
  --line: #20242f;
  --line-soft: #171a23;
  --line-strong: #2e3443;
  --text: #f4efe6;
  --text-2: #bdb5a8;
  --text-3: #857e73;
  --accent: #d6b36f;
  --accent-strong: #ecd39e;
  --accent-soft: rgba(214, 179, 111, .12);
  --accent-line: rgba(214, 179, 111, .38);
  --accent-ink: #1b1305;
  --gold: linear-gradient(135deg, #f3dfae 0%, #d6b36f 46%, #ad8641 100%);
  --green: #3fd3a1;
  --green-soft: rgba(63, 211, 161, .12);
  --red: #f27682;
  --red-soft: rgba(242, 118, 130, .12);
  --amber: #f59b55;
  --amber-soft: rgba(245, 155, 85, .14);
  --violet: #aa97f7;
  --violet-soft: rgba(170, 151, 247, .15);
  --blue: #7ea9ff;
  --blue-soft: rgba(126, 169, 255, .14);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 38%);
  --shadow: 0 40px 110px -34px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .025);
  --shadow-soft: inset 0 1px 0 rgba(255, 255, 255, .035), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --glow: 0 10px 30px -12px rgba(214, 179, 111, .55);
  --focus: 0 0 0 3px rgba(214, 179, 111, .28);
  --backdrop-glow: radial-gradient(1100px 560px at 8% -12%, rgba(214, 179, 111, .075), transparent 62%), radial-gradient(900px 520px at 104% -4%, rgba(126, 169, 255, .05), transparent 60%), radial-gradient(900px 700px at 60% 120%, rgba(63, 211, 161, .03), transparent 60%);
  --series-1: #c98500;
  --series-2: #3987e5;
  --series-3: #d95926;
  --series-4: #199e70;
  --series-5: #9085e9;
  --series-6: #e66767;
  --series-7: #008300;
  --series-8: #d55181;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 256px;
  --topbar-h: 76px;
  --toolbar-h: 64px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-family: "Manrope", "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "tnum" 0, "cv11";
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f0e7;
  --bg-elev: #faf7f1;
  --surface: #ffffff;
  --surface-2: #faf6ee;
  --surface-3: #f0e9dc;
  --input: #fffdf9;
  --line: #e3dacb;
  --line-soft: #ece5d8;
  --line-strong: #d1c4ad;
  --text: #17130c;
  --text-2: #4b4438;
  --text-3: #7c7364;
  --accent: #a8792b;
  --accent-strong: #86601d;
  --accent-soft: rgba(168, 121, 43, .1);
  --accent-line: rgba(168, 121, 43, .38);
  --accent-ink: #1b1305;
  --gold: linear-gradient(135deg, #f0d9a2 0%, #d0a95f 48%, #b08742 100%);
  --green: #0d8a61;
  --green-soft: rgba(13, 138, 97, .1);
  --red: #c13a4c;
  --red-soft: rgba(193, 58, 76, .09);
  --amber: #b5600e;
  --amber-soft: rgba(181, 96, 14, .11);
  --violet: #6a4fd0;
  --violet-soft: rgba(106, 79, 208, .1);
  --blue: #2f63c9;
  --blue-soft: rgba(47, 99, 201, .1);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 40%);
  --shadow: 0 34px 80px -34px rgba(70, 52, 20, .35), 0 0 0 1px rgba(70, 52, 20, .04);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 12px 28px -18px rgba(70, 52, 20, .28);
  --glow: 0 10px 26px -12px rgba(168, 121, 43, .55);
  --focus: 0 0 0 3px rgba(168, 121, 43, .22);
  --backdrop-glow: radial-gradient(1100px 560px at 8% -12%, rgba(208, 169, 95, .16), transparent 62%), radial-gradient(900px 520px at 104% -4%, rgba(47, 99, 201, .05), transparent 60%);
  --series-1: #eda100;
  --series-2: #2a78d6;
  --series-3: #eb6834;
  --series-4: #1baf7a;
  --series-5: #4a3aa7;
  --series-6: #e34948;
  --series-7: #008300;
  --series-8: #e87ba4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + var(--toolbar-h) + 56px); }
body { margin: 0; min-width: 320px; background: var(--backdrop-glow), var(--bg); background-attachment: fixed; color: var(--text); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
h1, h2, h3 { color: var(--text); }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: rgba(214, 179, 111, .3); color: var(--text); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.display { font-family: var(--font-display); font-optical-sizing: auto; }

.icon { width: 18px; height: 18px; flex: none; }
.value-positive { color: var(--green) !important; }
.value-negative { color: var(--red) !important; }
.direction-long { color: var(--green); }
.direction-short { color: var(--red); }
.direction-neutral { color: var(--text-2); }
.muted { color: var(--text-3); }
.num { text-align: right; }

/* ---------- Rozvržení ---------- */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-w); padding: 22px 14px 14px; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(214, 179, 111, .045), transparent 26%), var(--bg-elev); border-right: 1px solid var(--line-soft); overflow-y: auto; scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 0; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--font-display); font-size: 19px; font-weight: 560; letter-spacing: -.01em; line-height: 1.1; }
.brand small { margin-top: 2px; color: var(--text-3); font-size: 11.5px; letter-spacing: .04em; }
.brand-mark { position: relative; width: 38px; height: 38px; flex: none; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 9px 8px; border-radius: 11px; background: radial-gradient(120% 120% at 20% 0%, #2a2416, #0d0c0a 70%); border: 1px solid var(--accent-line); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .08); }
:root[data-theme="light"] .brand-mark { background: radial-gradient(120% 120% at 20% 0%, #2a2416, #14110b 70%); }
.brand-mark i { display: block; width: 5px; border-radius: 2px; background: var(--gold); }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 13px; }
.nav { margin-top: 20px; display: grid; gap: 1px; }
.nav-group { margin: 14px 12px 5px; color: var(--text-3); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; }
.nav-group:first-child { margin-top: 0; }
.nav-item { position: relative; width: 100%; min-height: 38px; border: 0; border-radius: 11px; background: transparent; color: var(--text-2); text-align: left; padding: 7px 12px; cursor: pointer; display: flex; gap: 11px; align-items: center; font-size: 14px; font-weight: 550; transition: background .18s ease, color .18s ease; }
.nav-item .icon { color: var(--text-3); transition: color .18s ease; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
a.nav-item { text-decoration: none; }
.nav-item.is-active { background: linear-gradient(90deg, var(--accent-soft), rgba(214, 179, 111, 0) 92%); color: var(--text); font-weight: 700; }
.nav-item.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); box-shadow: 0 0 14px rgba(214, 179, 111, .7); }
.nav-item.is-active .icon { color: var(--accent); }
.nav-flag { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-style: normal; font-weight: 750; white-space: nowrap; }
.nav-flag.is-soon { background: var(--amber); color: #231703; }
.nav-flag.is-gold { background: var(--gold); color: var(--accent-ink); box-shadow: var(--glow); }
.sidebar-foot { margin-top: auto; padding: 14px 0 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sidebar-foot > * { min-width: 0; }
.sidebar-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.server-state { display: flex; align-items: center; gap: 10px; min-width: 0; }
.server-state strong, .server-state small { display: block; }
.server-state strong { font-size: 12.5px; font-weight: 650; }
.server-state small { color: var(--text-3); font-size: 11.5px; }
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.status-dot.is-online { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft), 0 0 12px rgba(63, 211, 161, .6); }
.status-dot.is-offline { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.theme-toggle .icon:last-child { display: none; }
:root[data-theme="light"] .theme-toggle .icon:first-child { display: none; }
:root[data-theme="light"] .theme-toggle .icon:last-child { display: block; }
.sidebar-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(3, 4, 6, .6); backdrop-filter: blur(3px); }

.main-column { min-height: 100vh; margin-left: var(--sidebar-w); }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); padding: 0 32px; display: flex; align-items: center; gap: 18px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.5) blur(18px); border-bottom: 1px solid var(--line-soft); }
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { margin: 1px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 520; line-height: 1.12; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions select { width: auto; min-width: 150px; }
.topbar .mobile-menu { display: none; }
.menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: 290px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheen), var(--surface); box-shadow: var(--shadow); animation: modal-in .16s ease both; }
.menu button { width: 100%; display: grid; gap: 2px; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.menu button:hover { background: var(--surface-3); }
.menu strong { font-size: 14px; }
.menu small { color: var(--text-3); font-size: 12.5px; }

.workspace { width: min(1560px, 100%); margin: 0 auto; padding: 28px 32px 72px; }
.view { display: none; }
.view.is-active { display: block; animation: view-in .28s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Ovládací prvky ---------- */
.button { position: relative; min-height: 39px; padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 650; letter-spacing: .005em; white-space: nowrap; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.button .icon { width: 16px; height: 16px; }
.button:hover { border-color: var(--line-strong); background: var(--surface-3); }
.button:active { transform: translateY(1px); }
.button-primary { border-color: transparent; background: var(--gold); color: var(--accent-ink); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .45); }
.button-primary:hover { border-color: transparent; background: var(--gold); filter: brightness(1.07) saturate(1.05); box-shadow: 0 14px 34px -12px rgba(214, 179, 111, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.button-ghost { background: transparent; }
.button-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.button-small { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 10px; }
.button-block { width: 100%; min-height: 46px; font-size: 14.5px; }
.button:disabled { cursor: wait; opacity: .55; transform: none; filter: none; }
.button.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.button.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.button.danger:hover { background: var(--red-soft); }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-size: 13.5px; font-weight: 650; cursor: pointer; }
.text-button:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.icon-button { width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; font-size: 20px; line-height: 1; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.icon-button:hover { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }
.mini-button { padding: 4px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 650; white-space: nowrap; }
.mini-button:hover { background: var(--accent-soft); }
.mini-button.danger { color: var(--red); }
.mini-button.danger:hover { background: var(--red-soft); }
.mini-button:disabled { color: var(--text-3); cursor: not-allowed; background: transparent; }

label { display: grid; align-content: start; gap: 7px; color: var(--text-2); font-size: 12.5px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--input); color: var(--text); padding: 9px 12px; outline: 0; font-size: 14px; font-weight: 450; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input, select { min-height: 40px; }
textarea { resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-line); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .7; }
input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .5; background: var(--surface-3); }
select { cursor: pointer; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
code { color: var(--accent-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }

.field-grid { display: grid; gap: 12px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.field-with-action > span { display: flex; align-items: center; gap: 8px; }
.field-with-action select { flex: 1; min-width: 0; }
.field-with-action .mini-button { flex: none; }
.field-label { color: var(--text-2); font-size: 12.5px; font-weight: 650; }

.segmented, .type-switch, .tri-switch { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 4px; border-radius: 12px; background: var(--input); border: 1px solid var(--line); }
.segmented label, .type-switch label, .tri-switch label { display: block; cursor: pointer; }
.segmented input, .type-switch input, .tri-switch input { position: absolute; opacity: 0; pointer-events: none; }
/* Skrytá přepínací pole nesmí zdědit šířku 100 % – jinak roztáhnou stránku do strany. */
.segmented input, .type-switch input, .tri-switch input, .shape-options input, .ladder input, .mode-card input { width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; }
.segmented span, .type-switch span, .tri-switch span { display: block; padding: 7px 10px; border-radius: 9px; color: var(--text-3); text-align: center; font-size: 13.5px; font-weight: 650; white-space: nowrap; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.segmented label:hover span, .type-switch label:hover span, .tri-switch label:hover span { color: var(--text); }
.segmented input:focus-visible + span, .type-switch input:focus-visible + span, .tri-switch input:focus-visible + span, .shape-options input:focus-visible + span, .ladder input:focus-visible + span { box-shadow: var(--focus); }
.segmented input:checked + span, .type-switch input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .04); }
.type-switch input:checked + span { background: var(--gold); color: var(--accent-ink); box-shadow: var(--glow); }
.bias-block .segmented label:first-child input:checked + span, .tri-switch .is-long input:checked + span { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent); }
.bias-block .segmented label:last-child input:checked + span, .tri-switch .is-short input:checked + span { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent); }
.tri-switch .is-balance input:checked + span { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 35%, transparent); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 30px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 550; cursor: pointer; transition: all .18s ease; }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.is-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }
.chip-add { border-style: dashed; }
.chip-add:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-soft); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge-due { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.badge-soon { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.badge-gold { border-color: var(--accent-line); color: var(--accent-strong); background: var(--accent-soft); }
.badge-green { border-color: color-mix(in srgb, var(--green) 45%, transparent); color: var(--green); background: var(--green-soft); }
.badge-violet { border-color: color-mix(in srgb, var(--violet) 45%, transparent); color: var(--violet); background: var(--violet-soft); }
.badge .icon { width: 13px; height: 13px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--text-2); font-size: 12px; }

/* ---------- Karty a nadpisy ---------- */
.surface { background: var(--sheen), var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.section-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; }
.section-heading h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 540; line-height: 1.25; letter-spacing: -.01em; }
.section-heading h3 { margin: 0; font-family: var(--font-display); font-size: 16.5px; font-weight: 560; }
.section-heading > span { color: var(--text-3); font-size: 13px; text-align: right; }
.section-actions, .view-actions { display: flex; align-items: center; gap: 10px; }
.section-hint { margin: 12px 0 0; color: var(--text-3); font-size: 13px; }
.subhead { margin: 0 0 10px; color: var(--text); font-size: 14px; font-weight: 700; }
.subhead small { display: block; margin-top: 1px; color: var(--text-3); font-size: 12.5px; font-weight: 450; }
.empty-state { min-height: 150px; display: grid; place-items: center; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 14px; background: radial-gradient(80% 120% at 50% 0%, var(--accent-soft), transparent 70%); color: var(--text-3); text-align: center; font-size: 14px; }
.empty-state.compact { min-height: 96px; padding: 18px; }
.skeleton { height: 76px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.calc-hint { margin: 12px 0 0; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.6; }
.calc-hint strong { color: var(--text); }
.view-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.inline-fields { display: flex; align-items: flex-end; gap: 10px; }
.inline-fields label { min-width: 170px; }

/* ---------- Přehled ---------- */
.audit-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 16px 20px; border: 1px solid var(--red); border-radius: var(--radius); background: var(--red-soft); }
.audit-banner strong { display: block; font-size: 15px; }
.audit-banner p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; }
.audit-banner.is-soon { border-color: var(--amber); background: var(--amber-soft); }

.readiness { padding: 18px 20px 20px; margin-bottom: 16px; }
.readiness-score { white-space: nowrap; padding: 4px 11px; border-radius: 999px; background: var(--surface-3); color: var(--text-2) !important; font-size: 13px !important; font-weight: 600; }
.readiness-score.is-done { background: var(--green-soft); color: var(--green) !important; }
.readiness-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ready-item { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 4px 11px; min-height: 104px; padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.ready-item > i { grid-row: span 2; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 4px var(--surface-3); }
.ready-item strong { display: block; font-size: 14px; }
.ready-item p { margin: 2px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ready-item .mini-button { justify-self: start; margin-left: -8px; }
.ready-item.is-done > i { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.ready-item.is-warn > i { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.ready-item.is-bad > i { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.ready-item.is-info > i { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ready-item.is-todo { border-style: dashed; }
.ready-item.is-bad { border-color: color-mix(in srgb, var(--red) 45%, transparent); }

.metric-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.metric-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-strip article { position: relative; min-height: 112px; padding: 17px 19px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--sheen), var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.metric-strip article::after { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-line), transparent); opacity: .6; }
.metric-strip span, .metric-strip small { display: block; }
.metric-strip span { color: var(--text-2); font-size: 13px; font-weight: 600; }
.metric-strip strong { display: block; margin: 8px 0 2px; font-family: var(--font-display); font-size: 31px; font-weight: 520; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.metric-strip small { color: var(--text-3); font-size: 12.5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 16px; }
.equity-surface, .today-surface, .table-surface, .backup-intro, .backup-notes { padding: 18px 20px; }
.equity-chart { min-height: 260px; position: relative; overflow: hidden; }
.equity-chart svg { width: 100%; height: 260px; display: block; }
.equity-chart .grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.equity-chart .equity-fill { fill: url(#equityFill); }
.equity-chart .equity-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.equity-stop-top { stop-color: var(--accent); stop-opacity: .3; }
.equity-stop-bottom { stop-color: var(--accent); stop-opacity: 0; }
.equity-chart .axis-label { fill: var(--text-3); font-size: 11px; }

.prep-cards { display: grid; gap: 10px; }
.prep-card { padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.prep-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.prep-card header .muted { margin-left: auto; font-size: 12.5px; }
.prep-card header strong { font-size: 15px; }
.prep-card p { margin: 8px 0 0; color: var(--text-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prep-card footer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 10px; color: var(--text-3); font-size: 12.5px; }
.prep-card footer .mini-button { margin-left: auto; }
.prep-card.is-missing { border-style: dashed; background: transparent; }
.prep-card.is-missing .button { margin-top: 10px; }
.bias-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.bias-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.bias-chip em { padding: 1px 6px; border-radius: 999px; background: var(--bg); color: var(--text-3); font-size: 11.5px; font-style: normal; font-weight: 600; }
.bias-chip.is-long { background: var(--green-soft); color: var(--green); }
.bias-chip.is-short { background: var(--red-soft); color: var(--red); }
.bias-chip.is-balance { background: var(--amber-soft); color: var(--amber); }

.table-surface { margin-top: 16px; padding-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { position: sticky; top: 0; padding: 11px 12px; text-align: left; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .03em; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); vertical-align: middle; font-variant-numeric: tabular-nums; }
td strong { color: var(--text); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--surface-2); }
td.value-positive, td.value-negative { font-weight: 650; }
th.num, td.num { text-align: right; }
.is-broken-row td { background: var(--red-soft); }

/* ---------- Náhled trhu ---------- */
.plan-toolbar { position: sticky; top: var(--topbar-h); z-index: 20; margin: -26px -28px 0; padding: 12px 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.plan-toolbar-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.plan-toolbar-fields > label { width: 132px; }
.plan-toolbar-fields > label:nth-child(2) { width: 142px; }
.plan-toolbar-fields > label:nth-child(3) { width: 96px; }
.type-switch { align-self: flex-end; min-height: 38px; padding: 3px; }
.type-switch span { padding: 6px 13px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.plan-progress { display: flex; align-items: center; gap: 8px; margin-right: 6px; }
.plan-progress > span { width: 56px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.plan-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width .3s ease; }
.plan-progress em { min-width: 38px; color: var(--text-2); font-size: 13px; font-style: normal; font-weight: 650; font-variant-numeric: tabular-nums; }

.plan-steps { position: sticky; top: calc(var(--topbar-h) + var(--toolbar-h)); z-index: 19; display: flex; gap: 4px; margin: 0 -28px 18px; padding: 8px 28px; overflow-x: auto; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); scrollbar-width: none; }
.plan-steps::-webkit-scrollbar { display: none; }
.plan-steps button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.plan-steps button:hover { background: var(--surface-2); color: var(--text); }
.plan-steps i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-strong); }
.plan-steps .is-partial i { border-color: var(--amber); background: linear-gradient(90deg, var(--amber) 50%, transparent 50%); }
.plan-steps .is-done i { border-color: var(--green); background: var(--green); }
.plan-steps .is-locked { color: var(--text-3); }
.plan-steps .is-locked i { border-style: dashed; }

.timing { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 18px; padding: 16px 20px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), transparent 60%), var(--surface); }
.timing[data-phase="live"] { background: linear-gradient(120deg, var(--green-soft), transparent 60%), var(--surface); }
.timing h2 { margin: 3px 0 4px; font-family: var(--font-display); font-size: 21px; font-weight: 540; letter-spacing: -.01em; text-transform: none; }
.timing p:not(.eyebrow) { margin: 0; color: var(--text-2); font-size: 13.5px; max-width: 70ch; }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.timeline li { position: relative; padding: 18px 6px 0; text-align: center; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline li:first-child::before { left: 50%; }
.timeline li:last-child::before { right: 50%; }
.timeline li::after { content: ""; position: absolute; top: 0; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.timeline li.is-done::before { background: var(--green); }
.timeline li.is-done::after { border-color: var(--green); background: var(--green); }
.timeline li.is-next::after { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline strong { display: block; font-size: 13px; }
.timeline span { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 380px); gap: 20px; align-items: start; }
.plan-primary { min-width: 0; display: grid; gap: 16px; }
.plan-section, .inspector-block { scroll-margin-top: calc(var(--topbar-h) + var(--toolbar-h) + 64px); }
.plan-section { padding: 18px 20px 20px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.subsection { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.subsection .section-heading { align-items: center; }
.plan-inspector { position: sticky; top: calc(var(--topbar-h) + var(--toolbar-h) + 60px); min-width: 0; max-height: calc(100vh - var(--topbar-h) - var(--toolbar-h) - 76px); overflow-y: auto; display: grid; gap: 16px; padding-right: 2px; scrollbar-width: thin; }
.inspector-block { padding: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.inspector-block > label + label { margin-top: 12px; }
.inspector-block .segmented { margin-bottom: 14px; }
.working-conclusion { margin-bottom: 14px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); }
.working-conclusion span { color: var(--accent-strong); font-size: 12.5px; font-weight: 700; }
.working-conclusion p { margin: 5px 0 0; color: var(--text); font-size: 13.5px; line-height: 1.6; }

.bias-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bias-group { padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.pa-row { display: grid; grid-template-columns: 72px minmax(210px, 260px) minmax(0, 1fr); align-items: center; gap: 12px; }
.pa-row + .pa-row { margin-top: 8px; }
.pa-row > strong { font-size: 13.5px; }
.pa-row.is-muted { opacity: .55; }
.alignment { padding: 4px 11px; border-radius: 999px; background: var(--surface-3); color: var(--text-2) !important; font-size: 13px !important; font-weight: 600; }
.alignment.is-aligned.is-long { background: var(--green-soft); color: var(--green) !important; }
.alignment.is-aligned.is-short { background: var(--red-soft); color: var(--red) !important; }
.alignment.is-aligned.is-balance, .alignment.is-mixed { background: var(--amber-soft); color: var(--amber) !important; }

.shape-picker { margin: 0 0 18px; padding: 0; border: 0; }
.shape-picker legend, .ladder legend { margin-bottom: 10px; padding: 0; color: var(--text); font-size: 14px; font-weight: 650; }
.shape-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.shape-options label { display: block; cursor: pointer; }
.shape-options input { position: absolute; opacity: 0; pointer-events: none; }
.shape-options span { height: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); transition: border-color .15s ease, background .15s ease; }
.shape-options span:hover { border-color: var(--line-strong); }
.shape-glyph { width: 22px; height: 36px; fill: var(--text-3); }
.shape-options strong { font-size: 18px; line-height: 1.1; color: var(--text); }
.shape-options small { grid-column: 1 / -1; color: var(--text-3); font-size: 12.5px; font-weight: 400; line-height: 1.35; }
.shape-options input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.shape-options input:checked + span .shape-glyph { fill: var(--accent); }

.profile-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.profile-columns .text-button { margin-top: 10px; }
.ladder { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; }
.ladder label { display: block; cursor: pointer; }
.ladder input { position: absolute; opacity: 0; pointer-events: none; }
.ladder span { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.ladder span::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); }
.ladder label:hover span { border-color: var(--line-strong); color: var(--text); }
.ladder .is-upper span, .ladder .is-poc span, .ladder .is-lower span { margin-left: 16px; }
.ladder input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 650; }
.ladder input:checked + span::before { border-color: var(--accent); background: var(--accent); }
.ladder .is-above input:checked + span, .ladder .is-upper input:checked + span { border-color: var(--green); background: var(--green-soft); }
.ladder .is-below input:checked + span, .ladder .is-lower input:checked + span { border-color: var(--red); background: var(--red-soft); }
.ladder-hint { margin-top: 4px; color: var(--text-3); font-size: 12.5px; font-weight: 400; }

.gated-grid .gated { position: relative; }
.gate-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gate-label em { color: var(--text-3); font-size: 12px; font-style: normal; font-weight: 500; font-variant-numeric: tabular-nums; }
.gated.is-locked .gate-label { color: var(--text-3); }
.gated.is-locked .gate-label em { color: var(--amber); }
.gated.is-locked .gate-label em::before { content: "🔒 "; font-size: 11px; }
.gated.is-locked select { border-style: dashed; }

.weekly-context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; padding: 11px 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); font-size: 13.5px; }
.weekly-context > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.weekly-context small { color: var(--text-3); font-size: 12.5px; }
.weekly-context .mini-button { margin-left: auto; }
.weekly-context.is-ready { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.weekly-context.is-missing { border-style: dashed; }
.context-prices { display: inline-flex; gap: 8px; font-variant-numeric: tabular-nums; color: var(--text); }
.context-prices b { color: var(--text-3); font-size: 12px; font-weight: 600; }

.stack { display: grid; gap: 12px; }
.zone-row, .idea-row, .level-row, .ref-row { position: relative; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); animation: row-in .18s ease both; }
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.zone-row { border-left: 4px solid var(--line-strong); padding-left: 16px; }
.zone-row[data-direction="long"] { border-left-color: var(--green); }
.zone-row[data-direction="short"] { border-left-color: var(--red); }
.zone-row[data-direction="both"] { border-left-color: var(--accent); }
.row-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.row-head strong { display: flex; align-items: center; min-width: 0; font-size: 15px; }
.row-head strong span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-number { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; margin-right: 9px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 700; }
.zone-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: auto; justify-content: flex-end; }
.zone-metrics { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.va-badge { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12.5px; font-weight: 650; }
.va-badge[data-tone="at_val"], .va-badge[data-tone="near_val_below"], .va-badge[data-tone="near_val_inside"] { background: var(--green-soft); color: var(--green); }
.va-badge[data-tone="at_vah"], .va-badge[data-tone="near_vah_above"], .va-badge[data-tone="near_vah_inside"] { background: var(--red-soft); color: var(--red); }
.va-badge[data-tone="below_val"], .va-badge[data-tone="above_vah"] { background: var(--violet-soft); color: var(--violet); }
.remove-row { flex: none; padding: 4px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font-size: 13px; cursor: pointer; }
.remove-row:hover { color: var(--red); background: var(--red-soft); }
.zone-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.zone-grid-secondary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.dir-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.dir-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--input); }
.dir-switch button { padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); font-size: 13.5px; font-weight: 650; cursor: pointer; }
.dir-switch button:hover { color: var(--text); }
.dir-switch .dir-long[aria-pressed="true"] { background: var(--green-soft); color: var(--green); }
.dir-switch .dir-short[aria-pressed="true"] { background: var(--red-soft); color: var(--red); }
.dir-switch .dir-both[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.dir-hint { color: var(--text-3); font-size: 12.5px; }
.zone-row:not([data-direction=""]) .dir-hint { display: none; }
.conditions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cond { display: none; gap: 10px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-soft); background: var(--surface); }
.cond-title { margin: 0; font-size: 13.5px; font-weight: 700; }
.cond-long { border-left: 3px solid var(--green); }
.cond-long .cond-title { color: var(--green); }
.cond-short { border-left: 3px solid var(--red); }
.cond-short .cond-title { color: var(--red); }
.zone-row[data-direction="long"] .cond-long, .zone-row[data-direction="both"] .cond-long, .zone-row[data-direction="short"] .cond-short, .zone-row[data-direction="both"] .cond-short { display: grid; }
.zone-row[data-direction="long"] .conditions, .zone-row[data-direction="short"] .conditions { grid-template-columns: minmax(0, 1fr); }
.zone-row[data-direction=""] .conditions { display: none; }
.cond label { grid-template-columns: 1fr; }
.cond textarea.is-missing { border-style: dashed; border-color: color-mix(in srgb, var(--amber) 70%, transparent); background: var(--amber-soft); }
.token-field { display: grid; gap: 8px; margin-top: 14px; }
.row-extra { margin-top: 12px; }
.legacy-trigger input { border-style: dashed; }
.idea-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.idea-grid-secondary { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.level-row { padding: 12px 14px; }
.level-row[data-kind="support"] { border-left: 3px solid var(--green); }
.level-row[data-kind="resistance"] { border-left: 3px solid var(--red); }
.level-row[data-kind="pivot"] { border-left: 3px solid var(--amber); }
.level-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.level-grid .remove-row { margin-bottom: 6px; }
.ref-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 2fr; gap: 10px 12px; align-items: end; border-left: 3px solid var(--violet); }
.ref-tools { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: -2px; }
.ref-tools .ref-side { margin-right: auto; }
.ref-side { min-width: 100px; color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ref-side[data-side="up"] { color: var(--green); }
.ref-side[data-side="down"] { color: var(--red); }

.chart-section .dropzone { min-height: 150px; }
.dropzone { min-height: 190px; display: grid; place-content: center; gap: 4px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { display: none; }
.dropzone strong { color: var(--text); font-size: 15px; }
.dropzone span { color: var(--text-3); font-size: 13px; font-weight: 400; }
.screenshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.screenshot-grid:empty { display: none; }
.screenshot { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; }
.screenshot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .22s ease; }
.screenshot:hover img { transform: scale(1.03); }
.screenshot button { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; background: rgba(4, 8, 12, .75); color: #fff; cursor: pointer; }

.price-map svg { width: 100%; height: auto; display: block; }
.pm-grid { stroke: var(--line-soft); stroke-width: 1; }
.pm-tick { fill: var(--text-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.pm-label { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.pm-leader { stroke: var(--line-strong); stroke-width: .8; fill: none; }
.pm-va-band { fill: var(--accent-soft); }
.pm-weekly-band { fill: var(--violet-soft); opacity: .6; }
.pm-va { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 5 3; }
.pm-poc { stroke: var(--amber); stroke-width: 2; }
.pm-extreme { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; }
.pm-weekly { stroke: var(--violet); stroke-width: 1.4; stroke-dasharray: 6 3; }
.pm-close { stroke: var(--text); fill: var(--text); stroke-width: 1; stroke-dasharray: 1 3; }
.pm-zone { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.pm-zone.is-long { fill: var(--green-soft); stroke: var(--green); }
.pm-zone.is-short { fill: var(--red-soft); stroke: var(--red); }
.pm-level { stroke: var(--amber); stroke-width: 1.4; }
.pm-level.is-support { stroke: var(--green); }
.pm-level.is-resistance { stroke: var(--red); }
.pm-ref, .pm-ref-band { stroke: var(--violet); stroke-width: 1.2; stroke-dasharray: 3 2; fill: var(--violet-soft); }
.pm-label.pm-zone.is-long, .pm-label.pm-level.is-support { fill: var(--green); stroke: none; }
.pm-label.pm-zone.is-short, .pm-label.pm-level.is-resistance { fill: var(--red); stroke: none; }
.pm-label.pm-zone, .pm-label.pm-va { fill: var(--accent-strong); stroke: none; }
.pm-label.pm-poc, .pm-label.pm-level { fill: var(--amber); stroke: none; }
.pm-label.pm-weekly, .pm-label.pm-ref, .pm-label.pm-ref-band { fill: var(--violet); stroke: none; }
.pm-label.pm-close, .pm-label.pm-extreme { fill: var(--text-2); stroke: none; }

/* ---------- Historie náhledů ---------- */
.archive-list { display: grid; gap: 8px; }
.archive-row { display: grid; grid-template-columns: 190px 70px 90px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.archive-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.archive-date strong { display: block; font-size: 14.5px; }
.archive-date p { margin: 1px 0 0; color: var(--text-3); font-size: 12.5px; }
.type-tag { display: inline-block; margin-bottom: 3px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.type-tag.is-daily { background: var(--accent-soft); color: var(--accent-strong); }
.type-tag.is-weekly { background: var(--violet-soft); color: var(--violet); }
.archive-market { font-size: 15px; }
.archive-summary { min-width: 0; }
.archive-summary .bias-chips { margin: 0 0 4px; }
.archive-summary p { margin: 0; color: var(--text-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-actions { display: flex; align-items: center; gap: 4px; }
.archive-actions .muted { margin-right: 6px; font-size: 12.5px; }

/* ---------- Strategie, kalendář ---------- */
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; }
.legend-item i { width: 10px; height: 10px; flex: none; border-radius: 3px; background: var(--text-3); }
.legend-item strong { font-variant-numeric: tabular-nums; }
#view-strategies .equity-surface { margin-top: 0; }

.calendar-nav { display: flex; align-items: center; gap: 10px; }
.calendar-nav strong { min-width: 150px; font-size: 18px; text-align: center; text-transform: capitalize; }
.calendar-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-3); font-size: 13px; }
.calendar-summary strong { margin-left: 5px; color: var(--text); font-size: 15px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; color: var(--text-3); font-size: 12.5px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; color: var(--text-3); font-size: 12.5px; font-weight: 600; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-cell { min-height: 104px; padding: 9px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); color: var(--text-2); text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.calendar-cell:hover { border-color: var(--accent); }
.calendar-cell.is-empty { background: transparent; border-color: transparent; cursor: default; }
.calendar-cell.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.calendar-cell.is-win { background: var(--green-soft); }
.calendar-cell.is-loss { background: var(--red-soft); }
.calendar-cell.is-broken { border-color: var(--amber); }
.calendar-day { display: flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; font-weight: 700; }
.calendar-cell strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.calendar-cell small { color: var(--text-3); font-size: 12px; }
.calendar-mark { width: 17px; height: 17px; display: inline-grid; place-items: center; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 10.5px; font-style: normal; font-weight: 800; }
.calendar-mark.is-plan { background: var(--accent-soft); color: var(--accent-strong); }
.calendar-mark.is-week { background: var(--violet-soft); color: var(--violet); }
.calendar-mark.is-green { background: var(--green-soft); color: var(--green); }
.calendar-mark.is-amber { background: var(--amber-soft); color: var(--amber); }
.calendar-mark.is-red, .calendar-mark.is-broken { background: var(--red-soft); color: var(--red); }
.calendar-event { display: block; overflow: hidden; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event.is-news { background: var(--red-soft); color: var(--red); }
.calendar-event.is-holiday { background: var(--accent-soft); color: var(--accent-strong); }
.day-events { display: grid; gap: 8px; margin: 12px 0; }
.day-event { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; }
.day-event.is-news { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.day-event strong { font-size: 14px; }
.day-event p { margin: 2px 0 0; color: var(--text-3); font-size: 12.5px; }

/* ---------- Psychika ---------- */
.psyche-block { padding: 18px 20px; margin-bottom: 16px; }
.disclaimer { margin: 14px 0 0; padding: 11px 14px; border-left: 3px solid var(--line-strong); color: var(--text-3); font-size: 13px; line-height: 1.6; }
.psych-latest { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 12px; }
.psych-latest.is-green { border-color: var(--green); background: var(--green-soft); }
.psych-latest.is-amber { border-color: var(--amber); background: var(--amber-soft); }
.psych-latest.is-red { border-color: var(--red); background: var(--red-soft); }
.psych-latest strong { font-size: 15px; }
.psych-latest p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.psych-progress { margin: 0 0 10px; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.psych-step { position: relative; padding: 26px 26px 36px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.psych-step h3 { margin: 0 44px 20px 0; font-size: 22px; line-height: 1.4; letter-spacing: -.01em; }
.psych-options { display: grid; gap: 8px; }
.psych-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); text-align: left; font-size: 16px; line-height: 1.45; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.psych-option:hover { border-color: var(--accent); background: var(--surface-3); }
.psych-option span { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font-size: 13px; font-weight: 700; }
.psych-option:hover span { background: var(--accent-soft); color: var(--accent-strong); }
.psych-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.psych-option.is-selected span { background: var(--accent); color: var(--accent-ink); }
.psych-seconds { position: absolute; right: 20px; top: 22px; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.psych-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--surface-3); border-radius: 0 0 13px 13px; overflow: hidden; }
.psych-timer i { display: block; width: 100%; height: 100%; background: var(--accent); }
.psych-hint { margin: 14px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.6; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-dimension { padding: 14px 16px; border: 1px solid var(--line-soft); border-left-width: 4px; border-radius: 0 12px 12px 0; background: var(--surface-2); }
.profile-dimension.is-weak { border-left-color: var(--red); }
.profile-dimension.is-neutral { border-left-color: var(--amber); }
.profile-dimension.is-strong { border-left-color: var(--green); }
.profile-dimension > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.profile-dimension strong { font-size: 14px; }
.profile-dimension em { color: var(--text-3); font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums; }
.profile-bar { height: 6px; margin: 8px 0 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.profile-bar i { display: block; height: 100%; background: var(--text-3); }
.profile-dimension.is-weak .profile-bar i { background: var(--red); }
.profile-dimension.is-strong .profile-bar i { background: var(--green); }
.profile-dimension p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.profile-dimension small { display: block; margin-top: 8px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }

.rules-editor { display: grid; gap: 12px; margin-top: 14px; }
.rules-band { padding: 14px 16px; border: 1px solid var(--line-soft); border-left-width: 4px; border-radius: 0 12px 12px 0; display: grid; gap: 12px; }
.rules-band.is-green { border-left-color: var(--green); }
.rules-band.is-amber { border-left-color: var(--amber); }
.rules-band.is-red { border-left-color: var(--red); }
.rules-band legend { padding: 0 6px; color: var(--text); font-size: 14px; font-weight: 700; }
.rules-result { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line-soft); border-left-width: 4px; border-radius: 0 12px 12px 0; }
.rules-result.is-green { border-left-color: var(--green); }
.rules-result.is-amber { border-left-color: var(--amber); background: var(--amber-soft); }
.rules-result.is-red { border-left-color: var(--red); background: var(--red-soft); }
.rules-result ul { margin: 8px 0 0; padding-left: 18px; color: var(--text); font-size: 14px; line-height: 1.75; }

.calibration-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 12px; background: var(--accent-soft); }
.calibration-suggestion p { margin: 4px 0 0; font-size: 14px; }
.calibration-suggestion small { display: block; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }

.discipline-layout { display: grid; grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); gap: 16px; }
.discipline-list { display: grid; gap: 6px; align-content: start; max-height: 480px; overflow-y: auto; }
.discipline-day { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); color: var(--text-2); text-align: left; cursor: pointer; }
.discipline-day:hover { border-color: var(--accent); }
.discipline-day strong { font-size: 14px; color: var(--text); }
.discipline-day span { color: var(--text-3); font-size: 12.5px; }
.discipline-day em { font-style: normal; font-size: 13px; font-weight: 700; }
.discipline-detail { min-height: 200px; }
.pattern-list { display: grid; gap: 9px; margin: 12px 0; }
.pattern-list article { padding: 12px 14px; border-left: 3px solid var(--amber); border-radius: 0 10px 10px 0; background: var(--amber-soft); }
.pattern-list strong { font-size: 14px; }
.pattern-list p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.reflection { margin: 14px 0; padding: 13px 15px; border: 1px solid var(--line-soft); border-radius: 12px; }
.reflection ol, .reflection ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.7; }
.reflection .muted { margin: 10px 0 0; font-size: 13px; line-height: 1.55; }
.emotion-bars { display: grid; gap: 10px; margin-top: 12px; }
.emotion-bar { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.emotion-bar span { color: var(--text-2); font-size: 13.5px; }
.emotion-bar div { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.emotion-bar i { display: block; height: 100%; background: var(--amber); }
.emotion-bar em { color: var(--text-3); font-size: 12.5px; font-style: normal; white-space: nowrap; }

/* ---------- Účty ---------- */
.account-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.account-card { padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.account-card.is-due { border-color: var(--red); }
.account-card.is-soon { border-color: var(--amber); }
.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-head strong { font-size: 16px; }
.account-head p { margin: 3px 0 0; color: var(--text-3); font-size: 13px; }
.account-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; }
.account-figures div { min-width: 0; }
.account-figures dt { color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.account-figures dd { margin: 3px 0 0; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 8px; margin-top: 14px; }
.audit-verdict { padding: 13px 15px; border: 1px solid var(--line-soft); border-radius: 12px; color: var(--text); font-size: 14px; line-height: 1.6; }
.audit-verdict.is-ok { border-color: var(--green); background: var(--green-soft); }
.audit-verdict.is-warning { border-color: var(--red); background: var(--red-soft); }

/* ---------- Záloha ---------- */
.backup-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.backup-intro { min-height: 220px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.backup-intro h2 { margin: 6px 0 8px; font-family: var(--font-display); font-size: 24px; font-weight: 520; letter-spacing: -.01em; }
.backup-intro p:not(.eyebrow) { max-width: 520px; margin: 0 0 22px; color: var(--text-2); }
.backup-intro .button { margin-top: auto; }
.backup-notes { margin-top: 16px; padding: 22px 24px; }
.backup-notes h2 { margin: 0 0 16px; font-size: 17px; }
.backup-notes dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.backup-notes dl div { padding-right: 16px; border-right: 1px solid var(--line-soft); }
.backup-notes dl div:last-child { border-right: 0; }
.backup-notes dt { margin-bottom: 5px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.backup-notes dd { margin: 0; }
.backup-notes > p { margin: 16px 0 0; color: var(--text-3); font-size: 13px; }

/* ---------- Dialogy ---------- */
.modal { width: min(920px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 1px solid var(--line); border-top-color: var(--accent-line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal-wide { width: min(1040px, calc(100vw - 28px)); }
.modal-narrow { width: min(620px, calc(100vw - 28px)); }
.modal[open] { animation: modal-in .18s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal::backdrop, .lightbox::backdrop { background: rgba(3, 4, 6, .72); backdrop-filter: blur(6px) saturate(1.2); }
.modal form { padding: 0 24px; }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 -24px 16px; padding: 20px 24px 14px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 24px; font-weight: 520; letter-spacing: -.01em; }
.modal > form > label, .modal form > label { margin-top: 12px; }
.modal-actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 20px -24px 0; padding: 14px 24px 18px; background: var(--surface); border-top: 1px solid var(--line-soft); }
.modal-actions .spacer { flex: 1; }
.form-section { margin: 0 0 14px; padding: 14px 16px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.form-section legend { padding: 0 6px; color: var(--text); font-size: 14px; font-weight: 700; }
.form-section .calc-hint { background: var(--surface); }
.notes-grid { margin-top: 14px; }
.checkbox-field { margin: 0; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 12px; }
.checkbox-field legend { padding: 0 6px; color: var(--text); font-size: 14px; font-weight: 700; }
.checkbox-field legend span { color: var(--text-3); font-size: 12.5px; font-weight: 400; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
.checkbox-grid label { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.checkbox-grid label:hover { background: var(--surface-2); color: var(--text); }
.checkbox-grid input { width: 17px; height: 17px; min-height: 0; flex: none; padding: 0; accent-color: var(--accent); cursor: pointer; }
.trade-upload { margin-top: 14px !important; padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; cursor: pointer; }
.trade-upload input { padding: 0; min-height: auto; border: 0; background: transparent; }
.trade-upload span { color: var(--text-3); font-size: 12.5px; font-weight: 400; }
.button-calc { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-strong); }

.tv-export-dialog { width: min(1080px, calc(100vw - 28px)); }
.tv-export-shell { padding: 0 24px; }
.tv-export-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; padding: 12px 0; border-block: 1px solid var(--line-soft); }
.tv-export-meta div { padding: 0 14px; border-right: 1px solid var(--line-soft); }
.tv-export-meta div:first-child { padding-left: 0; }
.tv-export-meta div:last-child { padding-right: 0; border-right: 0; }
.tv-export-meta span, .tv-export-meta strong { display: block; }
.tv-export-meta span { margin-bottom: 3px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.tv-export-meta strong { color: var(--text); font-size: 15px; }
.tv-export-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.toggle-control { min-height: 64px; padding: 11px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--input); cursor: pointer; }
.toggle-control input { width: 17px; min-height: 17px; margin: 2px 0 0; accent-color: var(--accent); }
.toggle-control span, .toggle-control strong, .toggle-control small { display: block; }
.toggle-control strong { color: var(--text); font-size: 13.5px; }
.toggle-control small { margin-top: 3px; color: var(--text-3); font-size: 12.5px; font-weight: 400; line-height: 1.4; }
.range-control > div { min-height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--input); }
.range-control input { min-height: auto; padding: 0; border: 0; background: transparent; accent-color: var(--accent); box-shadow: none; }
.range-control output { min-width: 24px; color: var(--accent-strong); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.tv-export-status { min-height: 20px; margin: 14px 0 8px; color: var(--accent-strong); font-size: 13px; }
.tv-export-status.is-warning { color: var(--amber); }
.tv-code-field { gap: 7px; }
.tv-code-field textarea { min-height: 300px; resize: vertical; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; white-space: pre; tab-size: 4; }
.tv-export-help { margin: 10px 0 0; color: var(--text-3); font-size: 13px; }
.tv-export-help strong { color: var(--text-2); }

.lightbox { width: min(94vw, 1500px); max-height: 94vh; padding: 44px 12px 12px; border: 0; background: transparent; overflow: visible; }
.lightbox img { max-width: 100%; max-height: calc(94vh - 72px); margin: auto; display: block; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox .icon-button { position: absolute; top: 0; right: 0; background: rgba(0, 0, 0, .5); color: #fff; border-color: rgba(255, 255, 255, .25); }
.lightbox p { margin: 8px 0 0; color: #fff; text-align: center; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; min-width: 240px; max-width: 440px; padding: 13px 17px; border: 1px solid var(--line-strong); border-left: 3px solid var(--green); border-radius: 14px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); color: var(--text); font-size: 14px; font-weight: 550; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-error { border-left-color: var(--red); }
.toast.in-dialog { top: 20px; bottom: auto; transform: translateY(-10px); }
.toast.in-dialog.is-visible { transform: none; }


/* ---------- Barvy řad v grafech (ověřená paleta, pořadí pevné) ---------- */
polyline[data-series="1"] { stroke: var(--series-1); } circle[data-series="1"], .legend-item i[data-series="1"] { fill: var(--series-1); background: var(--series-1); }
polyline[data-series="2"] { stroke: var(--series-2); } circle[data-series="2"], .legend-item i[data-series="2"] { fill: var(--series-2); background: var(--series-2); }
polyline[data-series="3"] { stroke: var(--series-3); } circle[data-series="3"], .legend-item i[data-series="3"] { fill: var(--series-3); background: var(--series-3); }
polyline[data-series="4"] { stroke: var(--series-4); } circle[data-series="4"], .legend-item i[data-series="4"] { fill: var(--series-4); background: var(--series-4); }
polyline[data-series="5"] { stroke: var(--series-5); } circle[data-series="5"], .legend-item i[data-series="5"] { fill: var(--series-5); background: var(--series-5); }
polyline[data-series="6"] { stroke: var(--series-6); } circle[data-series="6"], .legend-item i[data-series="6"] { fill: var(--series-6); background: var(--series-6); }
polyline[data-series="7"] { stroke: var(--series-7); } circle[data-series="7"], .legend-item i[data-series="7"] { fill: var(--series-7); background: var(--series-7); }
polyline[data-series="8"] { stroke: var(--series-8); } circle[data-series="8"], .legend-item i[data-series="8"] { fill: var(--series-8); background: var(--series-8); }
polyline[data-series="other"] { stroke: var(--text-3); stroke-dasharray: 4 4; } circle[data-series="other"], .legend-item i[data-series="other"] { fill: var(--text-3); background: var(--text-3); }

/* ---------- Avatar a uživatel ---------- */
.avatar { --hue: 42; position: relative; width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: radial-gradient(120% 120% at 28% 18%, hsl(var(--hue) 72% 74%), hsl(var(--hue) 46% 36%) 72%, hsl(var(--hue) 40% 22%)); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong); user-select: none; }
.avatar.is-admin { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent), 0 0 16px rgba(214, 179, 111, .35); }
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; }
.user-chip { min-width: 0; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--sheen), var(--surface); }
.user-chip-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.user-chip-main:hover { background: var(--surface-2); }
.user-chip-main span:last-child { min-width: 0; }
.user-chip strong, .user-chip small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip strong { font-size: 13.5px; }
.user-chip small { color: var(--text-3); font-size: 11.5px; }
.user-chip small .icon { width: 11px; height: 11px; vertical-align: -1px; color: var(--accent); }
.user-chip .icon-button { width: 34px; height: 34px; border-color: transparent; }

/* ---------- Přihlášení ---------- */
.auth-body { min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr); }
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 44px; padding: 48px clamp(32px, 5vw, 72px); background: radial-gradient(120% 90% at 0% 0%, rgba(214, 179, 111, .17), transparent 55%), radial-gradient(80% 70% at 100% 100%, rgba(126, 169, 255, .08), transparent 60%), linear-gradient(160deg, #0e0f13, #07080b 70%); border-right: 1px solid rgba(214, 179, 111, .14); color: #f4efe6; isolation: isolate; }
.auth-hero .eyebrow { color: #d6b36f; }
.auth-hero .brand-mark { background: radial-gradient(120% 120% at 20% 0%, #2a2416, #0d0c0a 70%); }
.auth-hero-glow { position: absolute; z-index: -1; right: -160px; top: 16%; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 179, 111, .2), transparent 64%); pointer-events: none; }
.hero-profile { position: absolute; z-index: -1; right: 0; bottom: 34px; width: min(17vw, 220px); height: auto; transform: scaleX(-1); fill: rgba(214, 179, 111, .1); }
.hero-profile rect:nth-child(n+6):nth-child(-n+15) { fill: rgba(214, 179, 111, .2); }
.hero-profile rect:nth-child(n+9):nth-child(-n+9) { fill: rgba(236, 211, 158, .75); filter: drop-shadow(0 0 8px rgba(214, 179, 111, .6)); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand strong { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 560; }
.auth-brand small { display: block; color: rgba(244, 239, 230, .55); font-size: 12px; letter-spacing: .04em; }
.auth-pitch { max-width: 620px; }
.auth-pitch h1 { margin: 14px 0 20px; color: #f7f2e9; font-family: var(--font-display); font-size: clamp(40px, 4.4vw, 66px); font-weight: 430; line-height: 1.03; letter-spacing: -.022em; }
.auth-pitch h1 em { font-style: italic; font-weight: 400; background: linear-gradient(120deg, #f3dfae, #d6b36f 55%, #b58d47); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.auth-pitch p:not(.eyebrow) { max-width: 54ch; margin: 0; color: rgba(244, 239, 230, .7); font-size: 16px; line-height: 1.75; }
.auth-features { max-width: 560px; margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.auth-features li { display: flex; align-items: flex-start; gap: 14px; }
.auth-features .icon { width: 20px; height: 20px; padding: 10px; box-sizing: content-box; border: 1px solid rgba(214, 179, 111, .3); border-radius: 13px; background: rgba(214, 179, 111, .08); color: #e3c68b; }
.auth-features strong, .auth-features small { display: block; }
.auth-features strong { color: #f4efe6; font-size: 15px; }
.auth-features small { margin-top: 2px; color: rgba(244, 239, 230, .58); font-size: 13.5px; line-height: 1.55; }
.auth-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 28px 28px; }
.auth-theme { position: absolute; top: 22px; right: 22px; }
.auth-card { position: relative; width: min(470px, 100%); padding: 34px 32px 32px; border-radius: 24px; border: 1px solid var(--line); background: var(--sheen), var(--surface); box-shadow: var(--shadow); animation: modal-in .35s ease both; }
.auth-card::before { content: ""; position: absolute; inset: -1px 32px auto; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 26px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--input); }
.auth-tabs button { padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-3); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
.auth-tabs button:hover { color: var(--text); }
.auth-tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 3px rgba(0, 0, 0, .25); }
.auth-form, .auth-result { display: grid; gap: 16px; }
.auth-form header h2, .auth-result header h2 { margin: 5px 0 6px; font-family: var(--font-display); font-size: 32px; font-weight: 480; line-height: 1.1; letter-spacing: -.015em; }
.auth-form header p, .auth-result header p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.secret-field { position: relative; display: block; }
.secret-field input { padding-right: 88px; }
.secret-toggle { position: absolute; top: 50%; right: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 700; cursor: pointer; transform: translateY(-50%); }
.secret-toggle:hover { background: var(--accent-soft); }
.field-hint { color: var(--text-3); font-size: 12px; font-weight: 450; line-height: 1.45; overflow-wrap: anywhere; }
.field-hint.is-error { color: var(--red); font-weight: 600; }
input.is-invalid, input.is-invalid:hover { border-color: color-mix(in srgb, var(--red) 70%, transparent); box-shadow: 0 0 0 3px var(--red-soft); }
.auth-error { margin: 0; padding: 10px 13px; border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); border-radius: 11px; background: var(--red-soft); color: var(--red); font-size: 13.5px; font-weight: 650; }
.auth-note { margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: 14px; text-align: center; }
.auth-help { padding: 10px 13px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); }
.auth-help summary { color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.auth-help p { margin: 8px 0 0; color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
.optional { margin-left: 4px; color: var(--text-3); font-size: 12px; font-weight: 450; }
.secret-mode { margin: 0; padding: 0; border: 0; display: grid; gap: 9px; }
.secret-mode legend { margin-bottom: 8px; padding: 0; color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.mode-card { display: block; cursor: pointer; }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card > span { position: relative; display: grid; gap: 4px; padding: 14px 16px 14px 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.mode-card > span::before { content: ""; position: absolute; left: 16px; top: 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); transition: all .18s ease; }
.mode-card:hover > span { border-color: var(--line-strong); }
.mode-card strong { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14.5px; }
.mode-card strong .icon { width: 15px; height: 15px; color: var(--accent); }
.mode-card small { color: var(--text-3); font-size: 12.5px; font-weight: 450; line-height: 1.5; }
.mode-card input:checked + span { border-color: var(--accent-line); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent-line); }
.mode-card input:checked + span::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 38%, transparent 42%); box-shadow: 0 0 10px rgba(214, 179, 111, .5); }
.mode-card input:focus-visible + span { box-shadow: var(--focus); }
.mode-card.is-disabled { opacity: .5; cursor: not-allowed; }
.auth-foot { margin: 22px 0 0; color: var(--text-3); font-size: 12px; text-align: center; }

.key-card { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--accent-line); border-radius: 18px; background: radial-gradient(130% 150% at 0% 0%, rgba(214, 179, 111, .17), transparent 60%), var(--surface-2); box-shadow: var(--glow); }
.key-card-label { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12.5px; font-weight: 750; letter-spacing: .04em; }
.key-value { display: block; padding: 14px 12px; border: 1px dashed var(--accent-line); border-radius: 12px; background: var(--input); color: var(--text); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 17px; font-weight: 650; letter-spacing: .08em; line-height: 1.7; text-align: center; word-spacing: .15em; overflow-wrap: anywhere; user-select: all; }
.key-actions { display: flex; gap: 8px; }
.key-actions .button { flex: 1; }
.key-card p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.key-card p strong { color: var(--text); }
.key-confirm { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.key-confirm input { width: 18px; height: 18px; min-height: 18px; margin: 0; flex: none; }

/* ---------- Nástěnka ---------- */
.wall-layout { display: grid; grid-template-columns: minmax(0, 740px) minmax(260px, 330px); gap: 28px; justify-content: center; align-items: start; }
.wall-feed { min-width: 0; display: grid; gap: 18px; }
.wall-rail { position: sticky; top: calc(var(--topbar-h) + 26px); display: grid; gap: 16px; }
.rail-card { padding: 18px 18px 16px; }
.rail-card h3 { margin: 3px 0 12px; font-family: var(--font-display); font-size: 17px; font-weight: 560; }
.rail-card p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.member-list { display: grid; gap: 4px; max-height: 360px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.member-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.member-row:hover, .member-row.is-active { background: var(--surface-2); }
.member-row.is-active { box-shadow: inset 0 0 0 1px var(--accent-line); }
.member-row strong, .member-row small { display: block; }
.member-row strong { font-size: 13.5px; }
.member-row small { color: var(--text-3); font-size: 12px; }
.wall-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wall-filters .chip { display: inline-flex; align-items: center; gap: 6px; }
.wall-filter-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; }

.composer { padding: 18px 20px 14px; }
.composer-row { display: flex; align-items: flex-start; gap: 14px; }
.composer textarea { min-height: 58px; padding: 8px 0 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 16px; line-height: 1.6; resize: none; }
.composer textarea:focus { box-shadow: none; }
.composer-previews { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0 50px; }
.composer-previews:empty { display: none; }
.composer-previews figure { position: relative; width: 92px; height: 64px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.composer-previews img { width: 100%; height: 100%; object-fit: cover; display: block; }
.composer-previews button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; line-height: 1; }
.composer-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.composer-foot .spacer { flex: 1; }
.composer-foot small { color: var(--text-3); font-size: 12px; }
.attach-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; white-space: nowrap; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 650; cursor: pointer; }
.attach-button:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.attach-button input { display: none; }
.attach-button .icon { width: 17px; height: 17px; color: var(--accent); }

.post { position: relative; overflow: hidden; animation: row-in .3s ease both; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.post-author { min-width: 0; flex: 1; }
.post-author button { padding: 0; border: 0; background: transparent; color: var(--text); font-size: 14.5px; font-weight: 750; cursor: pointer; }
.post-author button:hover { color: var(--accent-strong); }
.post-author small { display: block; color: var(--text-3); font-size: 12.5px; }
.post-author .role-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 750; vertical-align: 1px; }
.post-kind { display: inline-flex; align-items: center; gap: 6px; }
.post-menu { position: relative; }
.post-text { margin: 12px 20px 0; color: var(--text); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-content { margin: 14px 20px 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 15px; background: var(--surface-2); }
.post-media { display: grid; gap: 4px; margin: 14px 20px 0; overflow: hidden; border-radius: 14px; }
.post-media.count-2 { grid-template-columns: 1fr 1fr; }
.post-media.count-3, .post-media.count-many { grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; }
.post-media.count-3 figure:first-child, .post-media.count-many figure:first-child { grid-row: span 2; }
.post-media figure { position: relative; margin: 0; min-height: 0; overflow: hidden; background: var(--surface-3); cursor: zoom-in; }
.post-media.count-1 figure { aspect-ratio: 16 / 9; }
.post-media.count-2 figure { aspect-ratio: 4 / 3; }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.post-media figure:hover img { transform: scale(1.025); }
.post-media .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; font-weight: 750; }
.post-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 14px; padding: 8px 14px; border-top: 1px solid var(--line-soft); }
.reaction { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--text-3); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .18s ease; }
.reaction .icon { width: 17px; height: 17px; }
.reaction:hover { background: var(--surface-2); color: var(--text); }
.reaction.is-mine { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); }
.reaction.is-mine .icon { filter: drop-shadow(0 0 6px rgba(214, 179, 111, .6)); }
.reaction em { font-style: normal; font-variant-numeric: tabular-nums; }
.reaction-people { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.comment-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text-3); font-size: 13px; font-weight: 700; cursor: pointer; }
.comment-toggle:hover { background: var(--surface-2); color: var(--text); }
.comment-toggle .icon { width: 17px; height: 17px; }
.comment-toggle em { font-style: normal; font-variant-numeric: tabular-nums; }
.comments { display: grid; gap: 12px; padding: 14px 20px 18px; border-top: 1px solid var(--line-soft); background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.comments-more { justify-self: start; }
.comment { display: flex; align-items: flex-start; gap: 10px; }
.comment-bubble { min-width: 0; flex: 1; padding: 9px 13px 10px; border: 1px solid var(--line-soft); border-radius: 4px 15px 15px 15px; background: var(--surface-2); }
.comment-bubble header { display: flex; align-items: baseline; gap: 8px; }
.comment-bubble strong { font-size: 13px; }
.comment-bubble time { color: var(--text-3); font-size: 11.5px; }
.comment-bubble .mini-button { margin-left: auto; padding: 1px 6px; font-size: 12px; }
.comment-bubble p { margin: 3px 0 0; color: var(--text); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: flex; align-items: flex-end; gap: 10px; }
.comment-form textarea { min-height: 40px; max-height: 180px; padding: 9px 14px; border-radius: 20px; resize: none; line-height: 1.45; }
.comment-form .icon-button { border-radius: 50%; border-color: transparent; background: var(--gold); color: var(--accent-ink); box-shadow: var(--glow); }
.comment-form .icon-button:hover { filter: brightness(1.07); }
.wall-more { justify-self: center; }
.wall-end { color: var(--text-3); font-size: 13px; text-align: center; }

/* ---------- Snímky na nástěnce ---------- */
.snap { display: grid; gap: 14px; padding: 16px 18px 18px; }
.snap-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; }
.snap-head h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 21px; font-weight: 540; line-height: 1.2; letter-spacing: -.01em; }
.snap-head p { margin: 2px 0 0; color: var(--text-3); font-size: 12.5px; }
.bias-seal { display: inline-grid; place-items: center; min-width: 108px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); text-align: center; }
.bias-seal span { color: var(--text-3); font-size: 11px; font-weight: 750; letter-spacing: .05em; }
.bias-seal strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: .03em; }
.bias-seal.is-long { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); color: var(--green); }
.bias-seal.is-short { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-soft); color: var(--red); }
.bias-seal.is-balance { border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-soft); color: var(--amber); }
.snap-bias { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.snap-bias div { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.snap-bias span, .snap-bias strong { display: block; }
.snap-bias span { color: var(--text-3); font-size: 11.5px; font-weight: 650; }
.snap-bias strong { margin-top: 1px; font-size: 13.5px; }
.snap-text { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.snap-text strong { color: var(--text); }
.snap-section-title { margin: 2px 0 -4px; color: var(--text-3); font-size: 12px; font-weight: 750; letter-spacing: .05em; }
.snap-zones { display: grid; gap: 8px; }
.snap-zone { display: grid; gap: 6px; padding: 11px 13px; border: 1px solid var(--line-soft); border-left: 3px solid var(--accent); border-radius: 4px 12px 12px 4px; background: var(--surface); }
.snap-zone[data-direction="long"] { border-left-color: var(--green); }
.snap-zone[data-direction="short"] { border-left-color: var(--red); }
.snap-zone header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.snap-zone header strong { font-size: 14px; }
.snap-zone .price { margin-left: auto; color: var(--text); font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.snap-zone p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.snap-zone p b { color: var(--text); font-weight: 700; }
.dir-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; }
.dir-pill.is-long { background: var(--green-soft); color: var(--green); }
.dir-pill.is-short { background: var(--red-soft); color: var(--red); }
.snap-ladder { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.ladder-row { display: grid; grid-template-columns: 86px 12px minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; font-size: 13px; }
.ladder-row:hover { background: var(--surface-2); }
.ladder-row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ladder-row i { width: 10px; height: 10px; border-radius: 3px; background: var(--text-3); }
.ladder-row span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder-row[data-tone="long"] i { background: var(--green); }
.ladder-row[data-tone="short"] i { background: var(--red); }
.ladder-row[data-tone="both"] i { background: var(--accent); }
.ladder-row[data-tone="va"] i { background: var(--blue); border-radius: 50%; }
.ladder-row[data-tone="poc"] i { background: var(--amber); border-radius: 50%; }
.ladder-row[data-tone="ref"] i { background: var(--violet); transform: rotate(45deg) scale(.85); }
.ladder-row[data-tone="cluster"] i { background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px rgba(214, 179, 111, .6); }
.snap-dn { padding: 6px 0; }
.snap-custom { margin-top: 2px; }
.ladder-row[data-tone="level"] i { height: 3px; border-radius: 2px; background: var(--text-2); }
.snap-trade { display: grid; grid-template-columns: minmax(150px, auto) minmax(0, 1fr); gap: 18px; align-items: center; }
.r-hero { display: grid; place-items: center; min-height: 118px; padding: 12px 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); text-align: center; }
.r-hero span { color: var(--text-3); font-size: 11.5px; font-weight: 750; letter-spacing: .05em; }
.r-hero strong { font-family: var(--font-display); font-size: 44px; font-weight: 520; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.r-hero small { color: var(--text-3); font-size: 12.5px; }
.r-hero.is-win { border-color: color-mix(in srgb, var(--green) 35%, transparent); background: radial-gradient(100% 100% at 50% 0%, var(--green-soft), transparent 70%), var(--surface); }
.r-hero.is-loss { border-color: color-mix(in srgb, var(--red) 35%, transparent); background: radial-gradient(100% 100% at 50% 0%, var(--red-soft), transparent 70%), var(--surface); }
.snap-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.snap-facts div { min-width: 0; }
.snap-facts dt { color: var(--text-3); font-size: 11.5px; font-weight: 700; }
.snap-facts dd { margin: 2px 0 0; color: var(--text); font-size: 14.5px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.snap-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.snap-stats div { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.snap-stats span, .snap-stats strong { display: block; }
.snap-stats span { color: var(--text-3); font-size: 11.5px; font-weight: 700; }
.snap-stats strong { margin-top: 2px; font-family: var(--font-display); font-size: 20px; font-weight: 560; font-variant-numeric: lining-nums tabular-nums; }
.snap-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Sdílení ---------- */
.share-status { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12.5px; font-weight: 700; }
.share-status .icon { width: 14px; height: 14px; }
.share-options { display: grid; gap: 8px; margin-top: 4px; }
.share-summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--accent-line); border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface-2); }
.share-summary .icon { width: 22px; height: 22px; color: var(--accent); }
.share-summary strong, .share-summary small { display: block; }
.share-summary strong { font-size: 15px; }
.share-summary small { color: var(--text-3); font-size: 12.5px; }
.share-warning { margin: 12px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.6; }

.picker-tabs { margin: 0 0 14px; }
.picker-list { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.picker-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.picker-row > div { min-width: 0; flex: 1; }
.picker-row strong, .picker-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-row strong { font-size: 14px; }
.picker-row small { color: var(--text-3); font-size: 12.5px; }
.privacy-card { margin-top: 16px; }
td .share-status { margin-right: 6px; vertical-align: middle; }

/* ---------- Správa ---------- */
.admin-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 16px; margin-bottom: 16px; align-items: start; }
.pending-list { display: grid; gap: 10px; }
.pending-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border: 1px solid var(--accent-line); border-radius: 15px; background: linear-gradient(135deg, var(--accent-soft), transparent 65%), var(--surface-2); }
.pending-card .who { min-width: 0; flex: 1; }
.pending-card strong, .pending-card small { display: block; }
.pending-card strong { font-size: 15px; }
.pending-card small { color: var(--text-3); font-size: 12.5px; }
.pending-card .actions { display: flex; gap: 8px; }
.settings-card { padding: 18px 20px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.switch-row:first-of-type { border-top: 0; padding-top: 4px; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 14px; }
.switch-row small { color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background .2s ease, border-color .2s ease; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .22s cubic-bezier(.3, .7, .3, 1), background .2s ease; }
.switch input:checked + i { background: var(--gold); border-color: transparent; box-shadow: var(--glow); }
.switch input:checked + i::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + i { box-shadow: var(--focus); }
.member-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.member-cell strong, .member-cell small { display: block; }
.member-cell small { color: var(--text-3); font-size: 12px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.is-active { background: var(--green-soft); color: var(--green); }
.status-badge.is-pending { background: var(--accent-soft); color: var(--accent-strong); }
.status-badge.is-blocked { background: var(--red-soft); color: var(--red); }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; color: var(--text-2); font-size: 18px; font-weight: 800; cursor: pointer; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary:hover, .row-menu[open] summary { border-color: var(--line); background: var(--surface-3); color: var(--text); }
.row-menu .menu { width: 230px; }
.row-menu .menu button { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.row-menu .menu button.danger { color: var(--red); }
.row-menu .menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--line-soft); }
.temp-secret { display: block; margin: 10px 0; padding: 12px; border: 1px dashed var(--accent-line); border-radius: 12px; background: var(--input); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .06em; text-align: center; user-select: all; }

/* ---------- Profil ---------- */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-card { padding: 22px 24px; }
.profile-card + .profile-card { margin-top: 0; }
.identity-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.identity-hero h2 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 520; letter-spacing: -.01em; }
.identity-hero p { margin: 3px 0 0; color: var(--text-3); font-size: 13px; }
.hue-range { -webkit-appearance: none; appearance: none; height: 12px; min-height: 12px; padding: 0; border: 0; border-radius: 999px; background: linear-gradient(90deg, hsl(0 60% 55%), hsl(60 60% 50%), hsl(120 50% 45%), hsl(180 55% 45%), hsl(240 55% 60%), hsl(300 55% 55%), hsl(360 60% 55%)); cursor: pointer; }
.hue-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 2px 8px rgba(0, 0, 0, .4); }
.hue-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
.security-state { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.security-state .icon { width: 26px; height: 26px; padding: 9px; box-sizing: content-box; border-radius: 13px; background: var(--surface-3); color: var(--text-2); }
.security-state strong, .security-state p { display: block; }
.security-state strong { font-size: 15px; }
.security-state p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.security-state.is-encrypted { border-color: var(--accent-line); background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface-2); }
.security-state.is-encrypted .icon { background: var(--gold); color: var(--accent-ink); box-shadow: var(--glow); }
.profile-form { display: grid; gap: 14px; }
.profile-form .button { justify-self: start; }
.privacy-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.privacy-list li { display: flex; gap: 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.privacy-list .icon { color: var(--accent); margin-top: 2px; }
.privacy-list strong { color: var(--text); }


/* ---------- DiNapoli v náhledu ---------- */
.dn-block + .dn-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.dn-trend { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 14px; }
.dn-trend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.dn-trend-row strong { font-size: 13.5px; }
.dn-trend-row .tri-switch { min-width: 140px; }
/* DiNapoli levely: jeden řádek na level, barva podle retracement / expanze. */
.dn-level-list { display: grid; gap: 6px; }
.dn-level-head, .dn-level-row { display: grid; grid-template-columns: 94px 88px 116px minmax(100px, 1fr) minmax(0, 1.5fr) auto 34px; gap: 8px; align-items: center; }
.dn-level-head { padding: 0 10px 0 15px; color: var(--text-3); font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.dn-level-row { padding: 7px 8px 7px 12px; border: 1px solid var(--line-soft); border-left: 3px solid var(--green); border-radius: 12px; background: var(--surface-2); animation: row-in .18s ease both; transition: box-shadow .18s ease, border-color .18s ease; }
.dn-level-row[data-group="expansion"] { border-left-color: var(--accent); }
.dn-level-row[data-status="revisited"] { border-left-style: dashed; background: var(--surface); }
.dn-level-row[data-status="revisited"] :is(select, input) { color: var(--text-2); }
.dn-level-row :is(select, input) { min-height: 36px; padding: 6px 10px; }
.dn-level-row label { gap: 4px; }
.dn-lbl { display: none; }
.dn-level-row[data-match="confluence"] { border-color: color-mix(in srgb, var(--green) 45%, transparent); box-shadow: 0 0 0 3px var(--green-soft); }
.dn-level-row[data-match="agreement"], .dn-level-row[data-match="both"] { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.dn-match { color: var(--green); font-size: 11.5px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.dn-level-row[data-match="agreement"] .dn-match, .dn-level-row[data-match="both"] .dn-match { color: var(--accent-strong); }
.dn-level-row .remove-row { padding: 4px; min-width: 30px; font-size: 18px; line-height: 1; }
.dn-tf-table .market-row { grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.dn-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dn-direction { color: var(--text-3); font-size: 12.5px; font-weight: 650; margin-right: 4px; }
.dn-level { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums; }
.dn-level b { font-size: 11.5px; font-weight: 800; letter-spacing: .03em; }
.dn-level.is-retracement { background: var(--green-soft); color: var(--green); }
.dn-level.is-expansion { background: var(--accent-soft); color: var(--accent-strong); }
.dn-level.is-revisited { opacity: .75; outline: 1px dashed currentColor; outline-offset: -1px; }
.dn-level i { font-style: normal; font-size: 10.5px; font-weight: 800; opacity: .8; }
.dn-clusters { display: grid; gap: 8px; margin-top: 14px; }
.dn-clusters:empty { display: none; }
.dn-cluster { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); border-radius: 13px; background: linear-gradient(120deg, var(--green-soft), transparent 70%), var(--surface-2); }
.dn-cluster.is-agreement { border-color: var(--accent-line); background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface-2); }
.dn-cluster.has-revisited { border-style: dashed; }
.dn-cluster > div { display: grid; gap: 2px; min-width: 0; }
.dn-cluster-type { color: var(--green); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; }
.dn-cluster.is-agreement .dn-cluster-type { color: var(--accent); }
.dn-cluster strong { font-family: var(--font-display); font-size: 19px; font-weight: 560; font-variant-numeric: lining-nums tabular-nums; }
.dn-cluster small { color: var(--text-3); font-size: 12.5px; overflow-wrap: anywhere; }
.dn-notes { margin-top: 12px; }
.pm-fib { stroke: var(--green); stroke-width: 1.1; stroke-dasharray: 4 3; }
.pm-objective { stroke: var(--accent); stroke-width: 1.1; stroke-dasharray: 1.5 3; }
.pm-cluster { fill: var(--accent-soft); stroke: var(--accent-line); stroke-width: 1; }
.pm-label.pm-fib { fill: var(--green); stroke: none; }
.pm-label.pm-objective, .pm-label.pm-cluster { fill: var(--accent-strong); stroke: none; }

/* ---------- Vlastní pole ve formulářích ---------- */
.custom-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 14px; align-items: start; }
.custom-fields:empty { display: none; }
.custom-field { display: grid; align-content: start; gap: 7px; }
.custom-field .field-label { color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.custom-field.span-all { grid-column: 1 / -1; }
.tri-switch.compact span { padding: 6px 8px; }
.tri-switch .is-neutral input:checked + span { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-line); }
.custom-fieldset legend { display: flex; align-items: center; gap: 8px; }

/* ---------- Rozbor vlastních polí ---------- */
.custom-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.custom-stat { padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface-2); }
.custom-stat header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin-bottom: 10px; }
.custom-stat header strong { font-size: 14.5px; }
.custom-stat header span { font-size: 12.5px; }
.custom-stat-rows { display: grid; gap: 8px; }
.custom-stat-row { display: grid; grid-template-columns: minmax(64px, 110px) minmax(0, 1fr) 70px; grid-template-areas: "value bar r" "meta meta meta"; align-items: center; gap: 2px 10px; }
.custom-stat-row .value { grid-area: value; color: var(--text); font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-stat-row .bar { grid-area: bar; position: relative; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.custom-stat-row .bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.custom-stat-row .bar i { display: block; height: 100%; border-radius: 3px; }
.custom-stat-row .bar i.is-positive { background: var(--green); }
.custom-stat-row .bar i.is-negative { background: var(--red); }
.custom-stat-row strong { grid-area: r; text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.custom-stat-row small { grid-area: meta; color: var(--text-3); font-size: 12px; }

/* ---------- Nastavení ---------- */
.settings-layout { display: grid; grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-tabs { position: sticky; top: calc(var(--topbar-h) + 22px); display: grid; gap: 4px; }
.settings-tabs button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--text-2); text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.settings-tabs button:hover { background: var(--surface-2); }
.settings-tabs button.is-active { border-color: var(--accent-line); background: linear-gradient(120deg, var(--accent-soft), transparent 80%), var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
.settings-tabs button .icon { width: 20px; height: 20px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--surface-2); color: var(--text-3); }
.settings-tabs button.is-active .icon { background: var(--gold); color: var(--accent-ink); }
.settings-tabs strong, .settings-tabs small { display: block; }
.settings-tabs strong { font-size: 14px; }
.settings-tabs small { color: var(--text-3); font-size: 12px; }
.settings-panel { display: none; padding: 22px 24px 24px; }
.settings-panel.is-active { display: block; animation: view-in .24s ease both; }
.settings-lead { max-width: 76ch; margin: -4px 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.settings-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: grid; gap: 12px; }
.settings-block .button { justify-self: start; }
.method-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.method-card { position: relative; display: grid; align-content: start; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--sheen), var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.method-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.method-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-line), var(--glow); background: radial-gradient(120% 120% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface-2); }
.method-card[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--accent-ink); font-size: 13px; font-weight: 800; }
.method-card strong { margin-top: 6px; font-family: var(--font-display); font-size: 20px; font-weight: 560; }
.method-card small { color: var(--text-3); font-size: 13px; line-height: 1.5; }
.method-glyph { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.method-glyph-mp { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.method-glyph i { display: block; height: 4px; border-radius: 2px; background: var(--accent); opacity: .85; }
.method-glyph-mp i:nth-child(1) { width: 10px; } .method-glyph-mp i:nth-child(2) { width: 18px; } .method-glyph-mp i:nth-child(3) { width: 28px; } .method-glyph-mp i:nth-child(4) { width: 36px; background: var(--accent-strong); } .method-glyph-mp i:nth-child(5) { width: 26px; } .method-glyph-mp i:nth-child(6) { width: 16px; } .method-glyph-mp i:nth-child(7) { width: 8px; }
.method-glyph-dn .icon, .method-glyph-both .icon { width: 42px; height: 42px; color: var(--green); }
.method-glyph-both { align-items: center; }
.method-glyph-both i { width: 4px; height: auto; align-self: stretch; margin: 8px 0; }
.method-glyph-both i:nth-child(2) { margin: 2px 0; } .method-glyph-both i:nth-child(3) { margin: 12px 0; }
.method-cards.compact .method-card { padding: 16px; }
.method-cards.compact .method-card strong { font-size: 18px; }
.plan-preview { margin-top: 20px; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: 15px; }
.preview-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 13px; font-weight: 650; }
.preview-steps i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--accent-ink); font-size: 11.5px; font-style: normal; font-weight: 800; }
.toggle-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.toggle-group { padding: 6px 14px; border: 1px solid var(--line-soft); border-radius: 15px; background: var(--surface-2); }
.toggle-group > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 4px; }
.toggle-group > header strong { font-size: 14px; }
.toggle-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.toggle-group > header + .toggle-row, .toggle-group > .toggle-row:first-child { border-top: 0; }
.toggle-row .switch { margin-top: 1px; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { color: var(--text); font-size: 13.5px; }
.toggle-row small { margin-top: 2px; color: var(--text-3); font-size: 12.5px; font-weight: 450; line-height: 1.45; }
.method-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-style: normal; font-weight: 800; }
.token-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.token-chip { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; cursor: default; }
.token-chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; }
.token-chip button:hover { background: var(--red-soft); color: var(--red); }
.inline-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-add input { width: auto; min-width: 150px; flex: 1; }
.field-scopes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-list { display: grid; gap: 6px; }
.field-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.field-item strong, .field-item small { display: block; }
.field-item strong { font-size: 14px; }
.field-item small { color: var(--text-3); font-size: 12.5px; }
.field-item.is-archived { opacity: .6; border-style: dashed; }
.field-actions { display: flex; align-items: center; gap: 2px; }
.icon-button.small { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.toggle-inline { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 40px; cursor: pointer; }
.toggle-inline input { width: 17px; min-height: 17px; margin: 0; }
.field-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; color: var(--text-3); font-size: 13px; }
.markets-table { display: grid; gap: 6px; margin-bottom: 14px; }
.market-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.2fr) minmax(120px, 1fr) auto; gap: 8px; align-items: center; }
.market-head span { color: var(--text-3); font-size: 12px; font-weight: 700; }
.readiness-grid[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.readiness-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.readiness-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Průvodce ---------- */
.onboarding { width: min(760px, calc(100vw - 28px)); }
.onboarding form { padding: 0 28px; }
.onboarding-head { padding: 28px 0 18px; text-align: center; }
.onboarding-head h2 { margin: 6px 0 16px; font-family: var(--font-display); font-size: 32px; font-weight: 480; letter-spacing: -.015em; }
.onboarding-steps { display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.onboarding-steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font-size: 13px; font-weight: 700; }
.onboarding-steps li::before { content: counter(step); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 11.5px; }
.onboarding-steps li.is-active { color: var(--text); background: var(--accent-soft); }
.onboarding-steps li.is-active::before, .onboarding-steps li.is-done::before { background: var(--gold); color: var(--accent-ink); }
.onboarding-page { min-height: 240px; }
.market-picker { margin-bottom: 14px; }
.market-picker .chip { min-width: 58px; min-height: 36px; justify-content: center; font-weight: 700; }
.onboarding-defaults { margin-top: 18px; }

/* ---------- Responzivita ---------- */
/* Strategie: statistiky vlevo, playbook se schématy vpravo (na užší obrazovce pás nahoře). */
.strategy-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.strategy-main { min-width: 0; }
.strategy-rail { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--topbar-h) - 32px); padding: 18px 16px 16px; overflow: hidden; }
.strategy-rail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.strategy-rail-head h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 540; letter-spacing: -.01em; }
.strategy-rail-head .button { flex: none; min-height: 36px; padding: 7px 13px; font-size: 13.5px; }
.strategy-search { min-height: 36px; padding: 7px 11px; font-size: 13.5px; }
.strategy-cards { display: grid; align-content: start; grid-auto-rows: max-content; gap: 10px; min-height: 0; margin: 0 -6px; padding: 2px 6px 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.strategy-card { display: block; width: 100%; padding: 0; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.strategy-card:hover, .strategy-card:focus-visible { border-color: var(--accent-line); box-shadow: var(--shadow-soft); transform: translateY(-1px); outline: 0; }
.strategy-card:focus-visible { box-shadow: var(--focus); }
.strategy-thumb { display: block; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line-soft); background: #0d1017; overflow: hidden; }
.strategy-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.strategy-card:hover .strategy-thumb img { transform: scale(1.03); }
.strategy-thumb.is-empty { display: grid; place-items: center; background: radial-gradient(120% 120% at 20% 0%, var(--accent-soft), transparent 60%), var(--surface-3); color: var(--accent); font-family: var(--font-display); font-size: 30px; font-weight: 520; letter-spacing: .02em; }
.strategy-card-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.strategy-card-body strong { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.strategy-meta { color: var(--text-3); font-size: 12px; font-weight: 550; }
.strategy-desc { display: -webkit-box; color: var(--text-2); font-size: 12.5px; line-height: 1.45; white-space: pre-line; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.strategy-stats { margin-top: 2px; color: var(--text-3); font-size: 12px; }
.strategy-stats b { font-weight: 700; }
.strategy-empty { display: grid; gap: 6px; padding: 18px 14px; border: 1.5px dashed var(--line-strong); border-radius: 13px; color: var(--text-3); font-size: 13px; line-height: 1.5; text-align: center; }
.strategy-empty strong { color: var(--text); font-size: 14px; }

.strategy-preview-inner { padding: 0 24px; }
.strategy-preview-body { display: grid; gap: 12px; }
.strategy-preview-figure { margin: 0; border: 1px solid var(--line-soft); border-radius: 14px; background: #0d1017; overflow: hidden; cursor: zoom-in; }
.strategy-preview-figure img { display: block; width: 100%; max-height: 58vh; object-fit: contain; }
.strategy-preview-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.strategy-preview-thumbs:empty { display: none; }
.strategy-preview-thumbs button { flex: none; width: 104px; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #0d1017; cursor: pointer; overflow: hidden; opacity: .7; transition: opacity .18s ease, border-color .18s ease; }
.strategy-preview-thumbs button.is-on, .strategy-preview-thumbs button:hover { border-color: var(--accent); opacity: 1; }
.strategy-preview-thumbs img { display: block; width: 100%; height: 100%; object-fit: contain; }
.strategy-preview-stats { color: var(--text-3); font-size: 13px; }
.strategy-preview-stats b { font-weight: 700; }
.strategy-preview-notes { color: var(--text); font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.strategy-preview-notes.is-empty { color: var(--text-3); font-style: italic; }

@media (max-width: 1180px) {
  .strategy-layout { grid-template-columns: 1fr; }
  .strategy-rail { position: static; order: -1; max-height: none; }
  .strategy-cards { grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .strategy-card { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .strategy-rail-head { flex-wrap: wrap; }
  .strategy-cards { grid-auto-columns: 78%; }
}

/* Obchodní plán */
.tp-toolbar .plan-toolbar-fields > label.tp-title-field { width: 230px; }
.tp-toolbar .plan-toolbar-fields > label:nth-child(2) { width: 148px; }
.tp-toolbar .plan-toolbar-fields > label:nth-child(3) { width: 136px; }
.tp-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tp-version { align-self: center; margin-bottom: 6px; }
.tp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); gap: 20px; align-items: start; }
.tp-main { min-width: 0; display: grid; gap: 16px; }
.tp-main label small { margin-left: 4px; color: var(--text-3); font-weight: 500; }
.tp-lead { margin: -6px 0 16px; max-width: 78ch; line-height: 1.55; }
.tp-gap { margin-top: 14px; }
.tp-add { margin-top: 10px; }
.tp-empty { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-3); font-size: 13.5px; }
.tp-chip-input { width: 160px; min-height: 30px; padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.field-grid.three .span-3, .field-grid.four .span-4 { grid-column: 1 / -1; }
.tp-long textarea { border-left: 3px solid var(--green); }
.tp-short textarea { border-left: 3px solid var(--red); }
.tp-balance textarea { border-left: 3px solid var(--amber); }
.tp-priority-a textarea { border-left: 3px solid var(--accent); }
.tp-priority-b textarea { border-left: 3px solid var(--text-2); }
.tp-priority-c textarea { border-left: 3px solid var(--line-strong); }
.tp-skip textarea { border-left: 3px solid var(--red); background: color-mix(in srgb, var(--red) 4%, var(--input)); }
.tp-windows { display: grid; gap: 10px; }
.tp-window { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) 104px 104px 150px; gap: 10px 12px; padding: 12px 44px 12px 14px; border: 1px solid var(--line-soft); border-left: 3px solid var(--green); border-radius: 12px; background: var(--surface-2); }
.tp-window.is-watch { border-left-color: var(--accent); }
.tp-window.is-off { border-left-color: var(--red); }
.tp-window-note { grid-column: span 2; }
.tp-days { grid-column: span 2; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; }
.tp-days button { min-width: 34px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-3); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.tp-days button.is-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); }
.tp-remove { position: absolute; top: 8px; right: 8px; }
.tp-items { display: grid; gap: 10px; }
.tp-item { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface-2); transition: border-color .18s ease, background .18s ease; }
.tp-item.is-on { border-color: var(--accent-line); background: var(--surface); box-shadow: var(--shadow-soft); }
.tp-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.tp-toggle { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.tp-toggle input { width: 18px; min-height: 18px; height: 18px; flex: none; }
.tp-toggle span { display: grid; min-width: 0; }
.tp-toggle strong { color: var(--text); font-size: 14.5px; font-weight: 700; }
.tp-toggle small { color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.tp-thumb { flex: none; display: grid; place-items: center; width: 64px; height: 40px; overflow: hidden; border-radius: 8px; background: #0d1017; }
.tp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tp-thumb.is-empty { background: linear-gradient(135deg, #2a2316, #14110c); color: var(--accent-strong); font-family: var(--font-display); font-size: 16px; }
.tp-item-body { padding: 0 14px 14px; }
.tp-item-body.field-grid { padding-top: 0; }
.tp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-aside { position: sticky; top: calc(var(--topbar-h) + var(--toolbar-h) + 64px); display: grid; gap: 16px; }
.tp-guide, .tp-history { padding: 18px 20px; }
.tp-guide h2, .tp-history h2 { margin: 3px 0 12px; font-family: var(--font-display); font-size: 19px; font-weight: 540; }
.tp-guide ol { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.tp-guide strong { color: var(--text); }
.tp-version-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.tp-version-row:first-child { border-top: 0; }
.tp-version-row div { display: grid; }
.tp-version-row strong { font-size: 14px; }
.tp-version-row small { color: var(--text-3); font-size: 12.5px; }
.tp-version-row.is-current strong { color: var(--accent-strong); }
@media (max-width: 1180px) {
  .tp-layout { grid-template-columns: 1fr; }
  .tp-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tp-aside { grid-template-columns: 1fr; }
  .tp-window { grid-template-columns: 1fr 1fr; padding-right: 14px; padding-top: 40px; }
  .tp-window-name, .tp-window-note, .tp-days { grid-column: 1 / -1; }
  .tp-toolbar .plan-toolbar-fields > label.tp-title-field { width: 100%; }
}

/* Osobnost a silné stránky (Psychika) */
.persona { display: grid; gap: 16px; }
.persona-empty { max-width: 760px; margin: 0; line-height: 1.6; }
.persona-empty strong { color: var(--text); }
.persona-focus { padding: 16px 18px; border: 1px solid var(--accent-line); border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.persona-focus .eyebrow { margin: 0 0 10px; }
.persona-focus .muted { margin: 10px 0 0; font-size: 13px; }
.persona-focus-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: focus; }
.persona-focus-list li { counter-increment: focus; display: grid; gap: 2px; min-width: 190px; flex: 1 1 190px; padding: 10px 12px 10px 40px; position: relative; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.persona-focus-list li::before { content: counter(focus); position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 750; }
.persona-focus-list strong { font-size: 14px; }
.persona-focus-list span { color: var(--text-3); font-size: 12.5px; }
.persona-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.persona-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.persona-block .eyebrow { margin: 0 0 10px; }
.persona-traits { display: grid; gap: 8px; }
.persona-trait { padding: 12px 14px; border: 1px solid var(--line-soft); border-left: 4px solid var(--line-strong); border-radius: 0 12px 12px 0; background: var(--surface-2); }
.persona-trait.is-risk { border-left-color: var(--amber); }
.persona-trait > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.persona-trait strong { font-size: 14px; }
.persona-trait em { color: var(--text-3); font-style: normal; font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.persona-trait.is-risk em { color: var(--amber); }
.persona-trait .profile-bar i { background: var(--accent); }
.persona-trait p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.persona-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.persona-theme { --domain: var(--text-3); padding: 12px 14px; border: 1px solid var(--line-soft); border-top: 3px solid var(--domain); border-radius: 12px; background: var(--surface-2); }
.persona-theme header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.persona-theme header small { color: var(--text-3); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.persona-theme p { margin: 6px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.persona-theme p b { color: var(--text); font-weight: 650; }
.persona-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; }
.persona-bottom > span { color: var(--text-3); font-size: 13px; margin-right: 4px; }
.is-executing { --domain: var(--violet); }
.is-influencing { --domain: var(--amber); }
.is-relationship { --domain: var(--blue); }
.is-thinking { --domain: var(--green); }
.theme-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; border: 1px solid color-mix(in srgb, var(--domain) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--domain) 12%, transparent); color: var(--text); font-size: 13px; font-weight: 650; white-space: nowrap; }
.theme-chip:not(:has(b)) { padding-left: 10px; }
.theme-chip b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--domain); color: var(--bg); font-size: 11.5px; font-weight: 800; }

.big5-progress { height: 4px; margin: -4px 0 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.big5-progress i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s ease; }
.psych-source { margin: -8px 0 12px; color: var(--accent); font-size: 12.5px; font-weight: 650; letter-spacing: .02em; }

.strength-modes { margin-bottom: 4px; }
.strength-selected { display: grid; gap: 6px; margin: 12px 0 16px; padding: 0; list-style: none; }
.strength-selected li { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.strength-selected li.tp-empty { justify-content: center; padding: 12px; color: var(--text-3); font-size: 13px; }
.strength-en { color: var(--text-3); font-size: 12.5px; }
.strength-actions { margin-left: auto; display: flex; gap: 2px; }
.strength-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.strength-domain { padding: 12px; border: 1px solid var(--line-soft); border-top: 3px solid var(--domain); border-radius: 12px; background: var(--surface-2); }
.strength-domain > p { margin: 0 0 8px; color: var(--text-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.strength-domain > div { display: flex; flex-wrap: wrap; gap: 6px; }
.strength-option { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.strength-option:hover:not(:disabled) { border-color: var(--domain); color: var(--text); }
.strength-option.is-on { border-color: var(--domain); background: color-mix(in srgb, var(--domain) 14%, transparent); color: var(--text); }
.strength-option b { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 999px; background: var(--domain); color: var(--bg); font-size: 11px; font-weight: 800; }
.strength-option:disabled { opacity: .35; cursor: not-allowed; }

/* Dýchání: karta v Psychice, nabídka po testu, cvičení */
.breath-card-body { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px; }
.breath-card-orb { width: 86px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); }
.breath-card-orb i { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--blue) 50%, transparent), color-mix(in srgb, var(--blue) 10%, transparent) 70%); animation: breath-card 12s ease-in-out infinite; }
@keyframes breath-card { 0%, 100% { transform: scale(.45); } 33% { transform: scale(.95); } }
.breath-card-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.breath-card-facts div { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.breath-card-facts dt { color: var(--text-3); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.breath-card-facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 19px; }
.breath-card-facts p { margin: 6px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }

.breath-offer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.breath-offer.is-amber { border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-soft); }
.breath-offer.is-red { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-soft); }
.breath-offer i { width: 38px; aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 60%, transparent) 0 32%, color-mix(in srgb, var(--blue) 14%, transparent) 70%); animation: breath-dot 12s ease-in-out infinite; }
@keyframes breath-dot { 0%, 100% { transform: scale(.72); } 33% { transform: scale(1); } }
.breath-offer p { margin: 0; font-size: 14px; line-height: 1.5; }

@property --phase { syntax: '<color>'; inherits: true; initial-value: #857e73; }
.breath-modal { width: min(760px, calc(100vw - 28px)); }
.breath-shell { padding: 0 24px; }
.breath-reason { margin: 0 0 14px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.55; }
.breath-choice { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.breath-choice legend { margin-bottom: 8px; padding: 0; color: var(--text-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.breath-patterns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.breath-option, .breath-sound { display: grid; align-content: start; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.breath-option:hover, .breath-sound:hover { border-color: var(--line-strong); }
.breath-option.is-on, .breath-sound.is-on { border-color: var(--accent); background: var(--accent-soft); }
.breath-option strong, .breath-sound strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14.5px; }
.breath-option span, .breath-sound span { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.breath-tag { padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-style: normal; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.breath-custom { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.breath-sounds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.breath-sound { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.breath-sound strong, .breath-sound span { grid-column: 2; }
.breath-sound-icon { grid-row: 1 / span 2; width: 30px; height: 30px; margin-top: 2px; border-radius: 9px; background: var(--surface-3); position: relative; overflow: hidden; }
.breath-sound-icon::after { content: ""; position: absolute; inset: 0; }
.breath-sound-icon.is-ocean::after { background: repeating-radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--blue) 60%, transparent) 0 2px, transparent 2px 6px); }
.breath-sound-icon.is-drone::after { background: radial-gradient(circle, color-mix(in srgb, var(--violet) 70%, transparent) 0 30%, transparent 31%), radial-gradient(circle, color-mix(in srgb, var(--violet) 25%, transparent) 0 62%, transparent 63%); }
.breath-sound-icon.is-bowls::after { background: radial-gradient(ellipse 70% 40% at 50% 62%, color-mix(in srgb, var(--accent) 75%, transparent) 0 55%, transparent 57%); }
.breath-sound-icon.is-rain::after { background: repeating-linear-gradient(105deg, transparent 0 5px, color-mix(in srgb, var(--blue) 55%, transparent) 5px 6.5px); }
.breath-sound-icon.is-chimes::after { background: radial-gradient(circle at 30% 35%, var(--green) 0 3px, transparent 4px), radial-gradient(circle at 65% 55%, var(--green) 0 2.5px, transparent 3.5px), radial-gradient(circle at 45% 75%, var(--green) 0 2px, transparent 3px); }
.breath-sound-icon.is-off::after { background: linear-gradient(135deg, transparent 46%, var(--text-3) 46% 54%, transparent 54%); }
.breath-audio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 12px; }
.breath-volume { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; color: var(--text-2); font-size: 13.5px; }
.breath-volume input { flex: 1; accent-color: var(--accent); }
.breath-check { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.breath-check input { width: 17px; height: 17px; min-height: 0; flex: none; padding: 0; cursor: pointer; }
.breath-volume input { min-height: 0; padding: 0; border: 0; background: none; }
.breath-note { margin: 4px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.breath-total { color: var(--text-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }

.breath-stage { --phase: var(--text-3); display: grid; justify-items: center; gap: 14px; padding: 8px 0 24px; transition: --phase 1.2s ease; }
.breath-stage[data-phase="inhale"] { --phase: var(--blue); }
.breath-stage[data-phase="hold"] { --phase: var(--accent); }
.breath-stage[data-phase="exhale"] { --phase: var(--green); }
.breath-orb { position: relative; width: min(340px, 74vw); aspect-ratio: 1; display: grid; place-items: center; }
.breath-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.breath-ring-track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.breath-ring-progress { fill: none; stroke: var(--phase); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 603.19; stroke-dashoffset: 603.19; }
.breath-circle { position: absolute; inset: 6%; border-radius: 50%; transform: scale(.38); will-change: transform;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--phase) 58%, transparent), color-mix(in srgb, var(--phase) 22%, transparent) 58%, color-mix(in srgb, var(--phase) 8%, transparent));
  box-shadow: 0 0 80px -18px color-mix(in srgb, var(--phase) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--phase) 50%, transparent); }
.breath-center { position: relative; display: grid; justify-items: center; gap: 2px; text-align: center; pointer-events: none; }
.breath-center strong { font-family: var(--font-display); font-size: 26px; font-weight: 520; letter-spacing: -.01em; }
.breath-center span { min-height: 1.1em; font-size: 54px; font-weight: 300; line-height: 1.05; font-variant-numeric: tabular-nums; }
.breath-meta { margin: 0; color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.breath-controls { display: flex; gap: 8px; }
.breath-stage.is-paused .breath-orb { opacity: .55; }
.breath-done { display: grid; justify-items: center; gap: 6px; padding: 18px 0 0; text-align: center; }
.breath-done h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 520; }
.breath-done p { max-width: 440px; margin: 0; color: var(--text-2); line-height: 1.6; }
.breath-done .modal-actions { align-self: stretch; }
.breath-done-mark { width: 72px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--green) 55%, transparent), color-mix(in srgb, var(--green) 10%, transparent) 70%); box-shadow: 0 0 50px -12px var(--green); }
.breath-modal.is-running .modal-head { border-bottom-color: transparent; }
@media (max-width: 720px) {
  .persona-grid, .strength-catalog, .breath-card-facts { grid-template-columns: minmax(0, 1fr); }
  .breath-card-body { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .breath-patterns, .breath-sounds { grid-template-columns: minmax(0, 1fr); }
  .breath-custom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breath-offer { grid-template-columns: auto minmax(0, 1fr); }
  .breath-offer .button { grid-column: 1 / -1; }
}
@media (min-width: 721px) and (max-width: 980px) {
  .breath-sounds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Odkaz pro ATAS (Sdílet v náhledu) */
.atas-intro { margin: 0 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.atas-intro strong { color: var(--text); }
.atas-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.atas-status div { display: grid; gap: 3px; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.atas-status span { color: var(--text-3); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.atas-status strong { font-size: 14px; font-weight: 650; }
.atas-status strong.is-live { color: var(--green); }
.atas-link { margin-bottom: 12px; }
.atas-link label { display: grid; gap: 6px; }
.atas-howto { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.atas-howto summary { cursor: pointer; font-weight: 650; font-size: 14px; }
.atas-howto ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 7px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.atas-howto p { margin: 10px 0 2px; color: var(--text-3); font-size: 13px; line-height: 1.55; }
.atas-howto code { padding: 1px 5px; border-radius: 5px; background: var(--surface-3); font-size: 12.5px; word-break: break-all; }
.atas-howto a { color: var(--accent); }
@media (max-width: 640px) {
  .atas-status { grid-template-columns: minmax(0, 1fr); }
}

/* Napojení na cTrader (Účty a audit, Správa) */
.broker-panel { padding: 18px 20px; margin-bottom: 16px; }
.broker-panel .section-heading { margin-bottom: 8px; }
.broker-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.broker-note { margin: 0; max-width: 78ch; color: var(--text-3); font-size: 13.5px; line-height: 1.55; }
.broker-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 12px; margin-top: 14px; }
.broker-list:empty { display: none; }
.broker-card { display: grid; align-content: start; min-width: 0; }
.broker-card.is-pending { border-style: dashed; border-color: var(--accent-line); }
.broker-card .account-head p b { color: var(--text-2); font-weight: 650; }
.broker-card .account-actions { flex-wrap: wrap; align-items: center; }
.broker-card .account-actions .spacer { flex: 1; }
.broker-link { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.broker-hint { margin: 10px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.broker-error { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 13px; }
.broker-empty { margin: 14px 0 0; color: var(--text-3); font-size: 13px; }
.broker-positions { margin-top: 14px; }
.broker-positions table { font-size: 13px; }
.broker-positions td, .broker-positions th { padding-top: 7px; padding-bottom: 7px; }
.ctrader-settings { margin-bottom: 16px; }
.ctrader-steps { display: grid; gap: 5px; margin: 0 0 16px; padding-left: 20px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.ctrader-steps a { color: var(--accent); }
.ctrader-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.ctrader-form-actions { display: flex; align-items: center; gap: 8px; }
.ctrader-form-actions .spacer { flex: 1; }

@media (min-width: 1760px) {
  .bias-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1380px) {
  .readiness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-strip.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shape-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zone-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zone-grid > .span-2 { grid-column: span 2; }
  .idea-grid, .idea-grid-secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .ref-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ref-row .grow { grid-column: 1 / -1; }
}

@media (max-width: 1180px) {
  .plan-layout { grid-template-columns: 1fr; }
  .plan-inspector { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-inspector .bias-block { grid-row: span 2; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .field-grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tv-export-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-columns { grid-template-columns: 1fr; }
  .timing { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 170px 60px minmax(0, 1fr) auto; }
  .archive-row > .badge { display: none; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 62px; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: none; }
  .main-column { margin-left: 0; }
  .topbar .mobile-menu { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 12px; }
  .topbar h1 { font-size: 19px; }
  .top-actions select { display: none; }
  .workspace { padding: 18px 16px 48px; }
  .plan-toolbar { position: static; margin: -18px -16px 0; padding: 12px 16px; flex-direction: column; align-items: stretch; }
  .plan-steps { top: var(--topbar-h); margin: 0 -16px 16px; padding: 8px 16px; }
  .toolbar-actions { flex-wrap: wrap; }
  .plan-progress { margin-right: auto; }
  .plan-inspector { grid-template-columns: 1fr; }
  .plan-inspector .bias-block { grid-row: auto; }
  .readiness-grid, .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-list, .backup-layout, .broker-list { grid-template-columns: 1fr; }
  .broker-link, .ctrader-form { grid-template-columns: 1fr; }
  .discipline-layout, .profile-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conditions { grid-template-columns: 1fr; }
  .calendar-cell { min-height: 76px; }
  .calendar-event { display: none; }
}

@media (max-width: 640px) {
  .top-actions .button { padding-inline: 10px; }
  .top-actions #quickTrade { display: none; }
  .readiness-grid, .metric-strip, .metric-strip.four { grid-template-columns: 1fr; }
  .view-toolbar { align-items: stretch; flex-direction: column; }
  .inline-fields { display: grid; grid-template-columns: 1fr 1fr; }
  .inline-fields label { min-width: 0; }
  .plan-toolbar-fields { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-toolbar-fields > label { min-width: 0; }
  .plan-toolbar-fields .type-switch { grid-column: 1 / -1; }
  .field-grid.two, .field-grid.three, .field-grid.four { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .zone-grid, .zone-grid-secondary, .idea-grid, .idea-grid-secondary, .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zone-grid > .span-2, .zone-grid-secondary > .span-2, .idea-grid > .span-2, .idea-grid-secondary > .span-2, .idea-grid-secondary > .span-3 { grid-column: 1 / -1; }
  .level-grid, .ref-row { grid-template-columns: 1fr 1fr; }
  .level-grid > .span-2, .level-grid > .span-3, .ref-row .grow, .ref-tools { grid-column: 1 / -1; }
  .pa-row { grid-template-columns: 1fr; gap: 6px; }
  .shape-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .timeline li::before { display: none; }
  .row-head { flex-wrap: wrap; }
  .zone-badges { order: 3; width: 100%; justify-content: flex-start; margin-left: 0; }
  .screenshot-grid { grid-template-columns: 1fr 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .account-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-banner { flex-direction: column; align-items: stretch; }
  .archive-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .archive-summary, .archive-actions { grid-column: 1 / -1; }
  .backup-notes dl { grid-template-columns: 1fr; }
  .backup-notes dl div { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 0 0 12px; }
  .tv-export-meta { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tv-export-meta div { padding: 0; border-right: 0; }
  .tv-export-settings { grid-template-columns: 1fr; }
  .emotion-bar { grid-template-columns: 1fr; gap: 4px; }
  .modal form, .tv-export-shell { padding: 0 16px; }
  .modal-head { margin: 0 -16px 14px; padding: 16px; }
  .modal-actions { margin: 18px -16px 0; padding: 12px 16px 16px; }
  .modal-actions .spacer { display: none; }
  .calibration-suggestion { flex-direction: column; align-items: stretch; }
}


@media (max-width: 1180px) {
  .wall-layout { grid-template-columns: minmax(0, 1fr); }
  .wall-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-top, .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { gap: 26px; padding: 32px 24px 36px; border-right: 0; border-bottom: 1px solid rgba(214, 179, 111, .14); }
  .auth-features, .hero-profile { display: none; }
  .auth-pitch h1 { font-size: clamp(34px, 8vw, 46px); }
  .auth-panel { padding: 28px 16px 24px; }
  .auth-theme { position: fixed; top: 14px; right: 14px; z-index: 5; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
}

@media (max-width: 640px) {
  .wall-rail { grid-template-columns: 1fr; }
  .post-head, .comments { padding-inline: 14px; }
  .post-text, .post-content, .post-media { margin-inline: 14px; }
  .composer-previews { margin-left: 0; }
  .composer-foot { flex-wrap: wrap; }
  .composer-foot .spacer { display: none; }
  .composer-foot .button { margin-left: auto; }
  .wall-rail .rail-card:first-child { display: none; }
  .snap-trade { grid-template-columns: 1fr; }
  .snap-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-card { padding: 26px 20px 22px; border-radius: 20px; }
  .auth-form .field-grid.two { grid-template-columns: 1fr; }
  .key-value { font-size: 15px; }
}


@media (max-width: 1180px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .dn-level-head { display: none; }
  .dn-level-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 34px; row-gap: 6px; }
  .dn-level-row .grow { grid-column: 2 / 4; }
  .dn-level-row .dn-match { grid-column: 1 / 4; }
  .dn-level-row .dn-match:empty { display: none; }
  .dn-level-row .remove-row { grid-column: 4; grid-row: 1; }
  .dn-lbl { display: block; font-size: 11px; color: var(--text-3); }
}

@media (max-width: 480px) {
  .dn-level-row { grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; }
  .dn-level-row .grow, .dn-level-row .dn-match { grid-column: 1 / 3; }
  .dn-level-row .remove-row { grid-column: 3; }
}

@media (max-width: 900px) {
  .readiness-grid[data-count] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .settings-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-tabs small { display: none; }
  .settings-panel { padding: 18px 16px; }
  .method-cards, .field-scopes { grid-template-columns: 1fr; }
  .toggle-groups, .custom-stats { grid-template-columns: 1fr; }
  .market-row { grid-template-columns: 1fr 1fr; }
  .market-row .remove-row { grid-column: 1 / -1; justify-self: end; }
  .market-head { display: none; }
  .onboarding form { padding: 0 16px; }
  .readiness-grid[data-count] { grid-template-columns: 1fr; }
}

@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .plan-toolbar, .plan-steps, .remove-row, .text-button, .dropzone { display: none !important; }
  .main-column { margin: 0; }
  .workspace { width: 100%; padding: 0; }
  .view { display: none !important; }
  #view-plan { display: block !important; }
  .plan-layout { grid-template-columns: 1fr; }
  .plan-inspector { position: static; max-height: none; overflow: visible; }
}
