/* PLEVIX 3D — jeden stylopis pre uvodnu stranku aj studio. */

/* Inter je uz v projekte kvoli 3D textu, tak ho pouzijeme aj na rozhranie.
   TTF je vacsi nez woff2, ale server ho posiela zabalene a odpada tym
   zavislost na cudzom CDN - stranka funguje aj bez internetu. */
@font-face {
  font-family: "Inter UI";
  src: url("../fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter UI";
  src: url("../fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --bg: #f7f8fb;
  --bg-deep: #eceff5;
  --panel: #ffffff;
  --panel-2: #f9fafc;
  --line: #e3e7ef;
  --line-soft: #edf0f6;
  --ink: #0f1420;
  --ink-soft: #5b6478;
  --ink-faint: #8b94a8;
  --brand: #2f6fed;
  --brand-2: #7b5cf0;
  --brand-ink: #ffffff;
  --brand-soft: #edf3ff;
  --ok: #16a34a;
  --warn: #b4541a;
  --warn-bg: #fff3e8;
  --stage-1: #eef1f7;
  --stage-2: #dfe4ee;

  --r-xs: 8px;
  --r-sm: 11px;
  --r: 16px;
  --r-lg: 22px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --sh-2: 0 2px 4px rgba(16, 24, 40, .04), 0 12px 28px -10px rgba(16, 24, 40, .16);
  --sh-3: 0 4px 8px rgba(16, 24, 40, .05), 0 28px 60px -20px rgba(16, 24, 40, .28);

  --font: "Inter UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --top-h: 62px;
}

[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-deep: #070a0f;
  --panel: #12161f;
  --panel-2: #161b26;
  --line: #232a37;
  --line-soft: #1b212c;
  --ink: #eef1f7;
  --ink-soft: #a2acbf;
  --ink-faint: #6f7a8e;
  --brand: #5b90ff;
  --brand-2: #9b7cff;
  --brand-ink: #05101f;
  --brand-soft: #16223a;
  --warn: #ffb083;
  --warn-bg: #30200f;
  --stage-1: #10141c;
  --stage-2: #080b11;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .5), 0 16px 34px -14px rgba(0, 0, 0, .7);
  --sh-3: 0 6px 14px rgba(0, 0, 0, .55), 0 34px 70px -24px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.021em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ hlavicka */

.top {
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 clamp(.9rem, 3vw, 1.8rem);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(1.6) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 700; letter-spacing: -.03em; }
.brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--brand) 60%, transparent);
}
.brand__name { font-size: 1.06rem; }
.top__nav { display: flex; align-items: center; gap: clamp(.4rem, 1.6vw, 1.2rem); font-size: .93rem; }
.top__nav a { text-decoration: none; color: var(--ink-soft); }
.top__nav a:hover { color: var(--ink); }
.top__lang {
  border: 1px solid var(--line); border-radius: 999px;
  padding: .2rem .6rem; font-size: .76rem; font-weight: 700; letter-spacing: .05em;
}

/* ------------------------------------------------------------------ tlacidla */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: .66rem 1.1rem; font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; background: var(--panel); color: var(--ink);
  transition: background .16s, border-color .16s, transform .06s, box-shadow .16s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand-2) 55%, var(--brand)));
  color: var(--brand-ink); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--primary[disabled] { filter: grayscale(.7) brightness(.9); cursor: not-allowed; box-shadow: none; }
.btn--ghost { border-color: var(--line); color: var(--ink-soft); background: var(--panel); }
.btn--ghost:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn--sm { padding: .42rem .8rem; font-size: .86rem; }
.btn--lg { padding: .82rem 1.5rem; font-size: 1rem; }
.btn--block { width: 100%; }

.icon-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  width: 32px; height: 32px; border-radius: var(--r-xs); cursor: pointer; font-size: 1rem; line-height: 1;
}
.icon-btn:hover { color: var(--ink); }

/* ------------------------------------------------------------ uvodna stranka */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(2.6rem, 7vw, 5.6rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 5vw, 3.4rem);
}
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%;
  background:
    radial-gradient(50% 50% at 22% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(45% 45% at 78% 20%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.hero__in { position: relative; max-width: 1100px; margin: 0 auto; text-align: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem; font-weight: 600; color: var(--brand);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 999px; padding: .32rem .9rem; margin-bottom: 1.3rem;
  backdrop-filter: blur(8px);
}
.hero__h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.9rem); letter-spacing: -.04em; max-width: 20ch;
  margin-inline: auto; font-weight: 800;
}
.hero__sub { font-size: clamp(1rem, 1.9vw, 1.2rem); color: var(--ink-soft); max-width: 62ch; margin-inline: auto; }
.hero__cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.7rem; }
.hero__tags {
  list-style: none; display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap;
  padding: 0; margin: 1.9rem 0 0; font-size: .74rem; color: var(--ink-faint);
}
.hero__tags li {
  border: 1px solid var(--line); border-radius: 999px; padding: .2rem .64rem;
  font-family: var(--mono); background: color-mix(in srgb, var(--panel) 60%, transparent);
}

/* pas s ukazkami hned pod hlavickou */
.showcase {
  position: relative; max-width: 1180px; margin: clamp(1.4rem, 4vw, 2.6rem) auto 0;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.showcase__grid {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.showcase__item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: .5rem; box-shadow: var(--sh-1); display: block; text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.showcase__item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.showcase__item img { width: 100%; height: auto; aspect-ratio: 9 / 7; object-fit: contain; display: block; border-radius: var(--r-sm); background: var(--panel-2); }
.showcase__item span { display: block; font-size: .8rem; color: var(--ink-soft); text-align: center; padding: .45rem .2rem .15rem; }

/* tri sposoby, ako zacat */
.ways {
  display: grid; gap: 1rem; max-width: 1100px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem) 0;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.way {
  position: relative; display: block; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem 1.4rem; box-shadow: var(--sh-1);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.way:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.way__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 13px; margin-bottom: .9rem; font-size: 1.15rem;
  background: var(--brand-soft); color: var(--brand);
}
.way h3 { font-size: 1.1rem; }
.way p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.way__go { display: inline-block; margin-top: .8rem; font-size: .86rem; font-weight: 600; color: var(--brand); }

.features {
  display: grid; gap: 1rem; max-width: 1100px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; box-shadow: var(--sh-1); }
.feature h2 { font-size: 1rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem); }
.section--alt { background: var(--bg-deep); border-block: 1px solid var(--line); }
.section__head { max-width: 1100px; margin: 0 auto 2rem; text-align: center; }
.section__head h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -.03em; }
.section__head p { color: var(--ink-soft); margin: 0; }
.section__cta { text-align: center; margin: 2.4rem 0 0; }

.tracklist { max-width: 1180px; margin: 0 auto 2.6rem; }
.tracklist__head { margin-bottom: 1rem; }
.tracklist__head h3 { font-size: 1.22rem; }
.tracklist__head p { font-size: .92rem; color: var(--ink-soft); margin: 0; max-width: 70ch; }
.tracklist__cat {
  display: flex; align-items: center; gap: .45rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-faint); margin: 1.6rem 0 .7rem;
}
.tracklist__cat span { font-size: .95rem; text-transform: none; letter-spacing: 0; opacity: .8; }

.cards {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}
.card a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--sh-1);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.card a:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-3px); box-shadow: var(--sh-2); }
.card__img {
  /* height:auto je nutne - bez neho vyhra atribut height z HTML a pomer stran
     sa neuplatni, takze by karty vyrastli do neumernej vysky */
  width: 100%; height: auto; aspect-ratio: 9 / 7; object-fit: contain; display: block;
  background: linear-gradient(160deg, var(--stage-1), var(--stage-2));
  padding: .35rem;
}
.card__body { padding: .75rem .85rem .9rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.card h3 { font-size: .95rem; margin: 0; }
.card p {
  font-size: .82rem; color: var(--ink-soft); margin: 0; flex: 1;
  /* dva riadky staci - karty tak zostanu rovnako vysoke */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.card__go { font-size: .8rem; font-weight: 600; color: var(--brand); margin-top: .5rem; }

.steps {
  list-style: none; padding: 0; margin: 0 auto; max-width: 1000px;
  display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.step__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; margin-bottom: .7rem;
  background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: .9rem;
}
.step h3 { font-size: 1.02rem; }
.step p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

.foot { border-top: 1px solid var(--line); background: var(--panel); padding: 2.2rem clamp(1rem, 4vw, 2rem); }
.foot__in { max-width: 1180px; margin: 0 auto; font-size: .88rem; color: var(--ink-soft); }
.foot__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.foot__meta a { color: var(--ink-soft); }

/* ------------------------------------------------------------------- studio */

.page--app { height: 100%; overflow: hidden; }
.page--app #main { height: calc(100dvh - var(--top-h)); }
.page--app .foot { display: none; }

.studio { display: grid; grid-template-columns: 312px minmax(0, 1fr) 316px; height: 100%; }

.studio__left, .studio__right {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel);
}
.studio__left { border-right: 1px solid var(--line); }
.studio__right { border-left: 1px solid var(--line); }
.panel-scroll { overflow-y: auto; padding: 1rem .9rem 2rem; scrollbar-width: thin; flex: 1; min-height: 0; }

.panel__title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); font-weight: 700; margin: 0 0 .7rem;
}
.panel + .panel, .panel { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); }
.panel__actions { display: flex; gap: .4rem; margin-top: 1rem; }
.panel__actions .btn { flex: 1; }

/* rezimy */
.modes { display: grid; gap: 2px; padding: .55rem; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.mode {
  display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto;
  align-items: center; gap: 0 .55rem; text-align: left;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  border-radius: var(--r-sm); padding: .5rem .6rem; font: inherit; color: var(--ink-soft);
  transition: background .14s, color .14s;
}
.mode:hover { background: var(--panel); color: var(--ink); }
.mode__icon {
  grid-row: 1 / 3; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; font-size: 1rem;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft);
}
.mode__name { font-weight: 600; font-size: .92rem; color: var(--ink); }
.mode__desc { font-size: .74rem; color: var(--ink-faint); line-height: 1.35; }
.mode.is-active { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 32%, transparent); }
.mode.is-active .mode__name { color: var(--brand); }
.mode.is-active .mode__icon { background: var(--brand); border-color: var(--brand); color: #fff; }

/* vstupy */
.input { margin-bottom: 1.3rem; }
.input__label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .4rem; }
.input__text, .input__search {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .6rem .7rem; resize: vertical;
}
.input__text:focus, .input__search:focus { background: var(--panel); }
.input__text { min-height: 3.4em; }
.input--ai .btn { margin-top: .6rem; }
.input__note { font-size: .78rem; color: var(--ink-faint); margin: .6rem 0 0; line-height: 1.45; }
.input__note--off { color: var(--warn); background: var(--warn-bg); border-radius: var(--r-xs); padding: .5rem .6rem; }

.drop {
  position: relative; display: grid; place-items: center; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--r); background: var(--panel-2);
  padding: 1.3rem .9rem; cursor: pointer; transition: border-color .15s, background .15s;
  min-height: 132px;
}
.drop:hover, .drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop__empty { display: grid; gap: .25rem; }
.drop__icon { font-size: 1.6rem; color: var(--ink-faint); }
.drop__empty strong { font-size: .92rem; }
.drop__hint { font-size: .76rem; color: var(--ink-faint); }
.drop__filled { display: grid; gap: .4rem; justify-items: center; width: 100%; }
.drop__preview { max-width: 100%; max-height: 96px; border-radius: var(--r-xs); background: #fff; }
.drop__name { font-size: .78rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.drop__change { font-size: .74rem; color: var(--brand); font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.pill {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  border-radius: 999px; padding: .22rem .6rem; font: inherit; font-size: .74rem; cursor: pointer;
}
.pill:hover { color: var(--ink); }
.pill.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* dlazdice stylov */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tile {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-sm);
  padding: .3rem .3rem .45rem; cursor: pointer; font: inherit; text-align: center;
  transition: border-color .14s, transform .12s, box-shadow .14s;
}
.tile:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); transform: translateY(-2px); box-shadow: var(--sh-1); }
.tile.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 26%, transparent); }
.tile__img {
  width: 100%; height: auto; aspect-ratio: 9 / 7; object-fit: contain; display: block;
  border-radius: var(--r-xs); background: linear-gradient(160deg, var(--stage-1), var(--stage-2));
}
.tile__name { display: block; font-size: .76rem; margin-top: .3rem; line-height: 1.25; color: var(--ink-soft); }
.tile.is-active .tile__name { color: var(--brand); font-weight: 600; }
.tiles__empty { font-size: .84rem; color: var(--ink-faint); text-align: center; padding: 1.4rem 0; }

/* scena */
.studio__stage { position: relative; min-width: 0; background: radial-gradient(120% 90% at 50% 0%, var(--stage-1), var(--stage-2)); }
.stage-wrap { position: absolute; inset: 0; }
#stage { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#stage:active { cursor: grabbing; }
.stage-wrap.is-busy #stage { opacity: .5; transition: opacity .15s; }

.stage__top {
  position: absolute; top: 1rem; left: 1.2rem; right: 1.2rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  pointer-events: none;
}
.stage__title h1 { font-size: 1.2rem; margin: 0; letter-spacing: -.025em; }
.stage__title p { font-size: .85rem; color: var(--ink-soft); margin: .2rem 0 0; max-width: 48ch; }

.chip {
  display: inline-flex; align-items: baseline; gap: .35rem;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line); border-radius: 999px; padding: .26rem .7rem;
  font-size: .78rem; backdrop-filter: blur(8px); white-space: nowrap;
}
.chip b { font-weight: 600; font-family: var(--mono); font-size: .78rem; }
.chip i { font-style: normal; color: var(--ink-faint); font-size: .72rem; }
.chip--warn { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

.stage__stats {
  position: absolute; left: 1.2rem; bottom: 1rem;
  display: flex; gap: .4rem; flex-wrap: wrap; max-width: 46%;
}

.stage__tools {
  position: absolute; bottom: 1rem; right: 1.2rem;
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; justify-content: flex-end;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--line); border-radius: 999px; padding: .34rem .5rem;
  box-shadow: var(--sh-1); backdrop-filter: blur(10px);
}
.seg { display: inline-flex; background: var(--panel-2); border-radius: 999px; padding: 2px; }
.seg__btn {
  border: 0; background: transparent; color: var(--ink-soft); cursor: pointer;
  font: inherit; font-size: .78rem; padding: .22rem .62rem; border-radius: 999px;
}
.seg__btn.is-active { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }
.colors { display: inline-flex; gap: 4px; }
.mini-select {
  font: inherit; font-size: .78rem; color: var(--ink-soft); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: .18rem .5rem; cursor: pointer;
}
.swatch { width: 19px; height: 19px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.swatch.is-active { border-color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--ink-soft); cursor: pointer; }

.stage__empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; pointer-events: none; }
.stage__emptyBox {
  text-align: center; color: var(--ink-faint); max-width: 34ch;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem 1.6rem;
  backdrop-filter: blur(6px);
}
.stage__emptyBox span { font-size: 1.8rem; display: block; margin-bottom: .4rem; opacity: .55; }
.stage__emptyBox p { margin: 0; font-size: .92rem; }

.stage__busy {
  position: absolute; top: 1rem; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .5rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem;
  font-size: .8rem; color: var(--ink-soft); box-shadow: var(--sh-1);
}
.spinner {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-top-color: var(--brand); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--bg); border-radius: 999px;
  padding: .5rem 1.1rem; font-size: .86rem; box-shadow: var(--sh-2);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1); z-index: 60; margin: 0;
}
.toast.is-on { transform: translate(-50%, 0); }

/* parametre */
.params { display: grid; gap: .85rem; }
.field { display: grid; gap: .3rem; }
.field[hidden] { display: none; }
.field__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.field__label { font-size: .84rem; font-weight: 600; }
.field__value { font-size: .78rem; color: var(--ink-soft); font-family: var(--mono); }
.field__hint { font-size: .74rem; color: var(--ink-faint); margin: 0; line-height: 1.4; }
.field__row { display: grid; grid-template-columns: 1fr 66px; gap: .45rem; align-items: center; }
.field__range { width: 100%; accent-color: var(--brand); }
.field__num, .field__text, .field__select {
  font: inherit; font-size: .87rem; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-xs); padding: .35rem .5rem; width: 100%;
}
.field__text { resize: vertical; min-height: 2.2em; }
.field__select { cursor: pointer; }
.field--bool { grid-template-columns: 1fr auto; align-items: center; }
.field--bool .field__head { grid-column: 1; justify-content: flex-start; }
.switch { position: relative; display: inline-flex; margin-left: auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand); outline-offset: 2px; }
.field__color { display: flex; align-items: center; gap: .5rem; }
.field__color input[type="color"] { width: 40px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.field__hex { font-family: var(--mono); font-size: .74rem; color: var(--ink-faint); text-transform: uppercase; }
.field__file { display: grid; gap: .3rem; }
.field__filename { font-size: .74rem; color: var(--ink-faint); font-family: var(--mono); overflow-wrap: anywhere; }

/* export */
.export { position: relative; padding: .8rem .9rem 1rem; border-top: 1px solid var(--line); background: var(--panel); }
.menu {
  position: absolute; right: .9rem; bottom: 4rem; left: .9rem; z-index: 10;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-3); padding: .35rem; display: grid; gap: 2px; max-height: 62vh; overflow: auto;
}
.menu__item {
  display: grid; grid-template-columns: 50px 1fr; align-items: baseline; gap: .5rem;
  border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left;
  padding: .45rem .55rem; border-radius: var(--r-xs); cursor: pointer;
}
.menu__item:hover { background: var(--panel-2); }
.menu__item strong { font-size: .76rem; font-family: var(--mono); color: var(--brand); }
.menu__item span { font-size: .82rem; color: var(--ink-soft); display: block; }
.menu__item em { display: block; font-style: normal; font-size: .71rem; color: var(--ink-faint); margin-top: .1rem; }
.menu__item.is-primary { background: var(--brand-soft); }

.notice { max-width: 60ch; margin: 2rem auto; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); }


/* ------------------------------------------------------- ucet a prihlasenie */

.userchip { display: inline-flex; align-items: center; }
.userchip__link {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: .18rem .55rem .18rem .18rem;
  background: var(--panel);
}
.userchip__link:hover { border-color: var(--brand); }
.userchip__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; font-weight: 700;
  background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff;
}
.userchip__credits { font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }

body.is-locked { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.modal__back { position: absolute; inset: 0; background: rgba(8, 11, 18, .55); backdrop-filter: blur(4px); }
.modal__box {
  position: relative; width: min(420px, 100%); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: var(--sh-3); max-height: 92dvh; overflow: auto;
}
.modal__x {
  position: absolute; top: .7rem; right: .8rem; border: 0; background: transparent;
  font-size: 1.4rem; line-height: 1; color: var(--ink-faint); cursor: pointer;
}
.modal__x:hover { color: var(--ink); }
.modal__title { font-size: 1.4rem; margin: 1rem 0 .3rem; }
.modal__lead { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1.2rem; }
.seg--wide { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg--wide .seg__btn { padding: .4rem .5rem; font-size: .88rem; }

.form { display: grid; gap: .8rem; }
.form .field { gap: .25rem; }
.form .field__label { font-size: .8rem; color: var(--ink-soft); }
.form .field__text { padding: .58rem .7rem; font-size: .95rem; }
.form__error {
  margin: 0; font-size: .84rem; color: #b42318; background: #fef3f2;
  border-radius: var(--r-xs); padding: .5rem .7rem;
}
.form__error.is-ok { color: var(--ok); background: #ecfdf3; }
[data-theme="dark"] .form__error { background: #2b1414; }
[data-theme="dark"] .form__error.is-ok { background: #10241a; }
.form__note { margin: 0; font-size: .78rem; color: var(--ink-faint); text-align: center; }
.form--inline { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.form--inline .form__error { grid-column: 1 / -1; }

.account { padding: clamp(1.6rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) 4rem; }
.account__in { max-width: 980px; margin: 0 auto; display: grid; gap: 2.2rem; }
.acc-head {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.3rem 1.5rem; box-shadow: var(--sh-1);
}
.acc-head h1 { font-size: 1.5rem; margin: 0; }
.acc-head__mail { margin: .2rem 0 0; font-size: .88rem; color: var(--ink-soft); }
.acc-head__credits { margin-left: auto; text-align: right; }
.acc-head__credits b { display: block; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.acc-head__credits i { font-style: normal; font-size: .78rem; color: var(--ink-faint); }
.acc-guest { text-align: center; padding: 3rem 1rem; }
.acc-block h2 { font-size: 1.15rem; margin-bottom: .9rem; }
.acc-empty, .acc-off { color: var(--ink-faint); font-size: .9rem; }

.packs { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pack {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.2rem; display: grid; gap: .25rem; box-shadow: var(--sh-1);
}
.pack h3 { font-size: 1rem; margin: 0; }
.pack__credits { font-size: 1.5rem; font-weight: 700; }
.pack__price { font-size: 1.1rem; color: var(--brand); font-weight: 600; }
.pack__per { font-style: normal; font-size: .76rem; color: var(--ink-faint); margin-bottom: .6rem; }

.mygrid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mycard {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1);
}
.mycard__img {
  width: 100%; height: auto; aspect-ratio: 9 / 7; object-fit: contain; display: block;
  background: linear-gradient(160deg, var(--stage-1), var(--stage-2));
}
.mycard__body { padding: .8rem .9rem 1rem; }
.mycard__body h3 { font-size: .95rem; margin: 0 0 .15rem; overflow-wrap: anywhere; }
.mycard__meta { font-size: .78rem; color: var(--ink-faint); margin: 0 0 .7rem; }
.mycard__row { display: flex; flex-wrap: wrap; gap: .3rem; }
.mycard__badge {
  position: absolute; top: .6rem; left: .6rem; font-size: .7rem; font-weight: 600;
  background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: .12rem .55rem;
}
.btn--danger:hover { border-color: #d92d20; color: #d92d20; }
.btn.is-on { border-color: var(--brand); color: var(--brand); }

.ledger { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ledger td { padding: .5rem .2rem; border-bottom: 1px solid var(--line-soft); }
.ledger td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ledger .is-plus { color: var(--ok); }
.ledger .is-minus { color: var(--ink-soft); }

.acc-lead { color: var(--ink-soft); font-size: .92rem; margin: -.4rem 0 1rem; max-width: 62ch; }
.acc-right {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.2rem; margin-bottom: .7rem;
}
.acc-right > div { flex: 1 1 320px; }
.acc-right h3 { font-size: .95rem; margin: 0 0 .2rem; }
.acc-right p { font-size: .82rem; color: var(--ink-faint); margin: 0; max-width: 62ch; }
.acc-right > .btn { margin-left: auto; }
.acc-right--danger { border-color: #f0c6c2; background: #fff8f7; }
.acc-kill { border: 1px solid #f0c6c2; border-radius: var(--r); padding: 1rem 1.2rem; background: #fff8f7; }

/* pravne stranky - jeden stlpec, siroke riadkovanie, ziadne ozdoby */
.legal { padding: clamp(1.6rem, 5vw, 3.2rem) clamp(1rem, 4vw, 2rem) 4.5rem; }
.legal__in { max-width: 72ch; margin: 0 auto; }
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 .6rem; letter-spacing: -.02em; }
.legal__lead { font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 2.2rem; }
.legal h2 {
  font-size: 1.1rem; margin: 2.2rem 0 .6rem; padding-top: 1.3rem;
  border-top: 1px solid var(--line-soft);
}
.legal p, .legal li { line-height: 1.7; color: var(--ink-soft); }
.legal p { margin: 0 0 .8rem; }
.legal ul { margin: 0 0 .9rem; padding-left: 1.1rem; display: grid; gap: .35rem; }
.legal strong { color: var(--ink); }
.legal__id {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.2rem; line-height: 1.85; color: var(--ink-soft);
}
.legal__id strong { display: block; font-size: 1.02rem; margin-bottom: .2rem; }

.gallery {
  display: grid; gap: .9rem; max-width: 1180px; margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1); }
.gcard:hover { border-color: var(--brand); box-shadow: var(--sh-2); }
.gcard__link { display: block; text-decoration: none; }
.gcard__img {
  width: 100%; height: auto; aspect-ratio: 9 / 7; object-fit: contain; display: block;
  background: linear-gradient(160deg, var(--stage-1), var(--stage-2));
}
.gcard__body { padding: .75rem .85rem .9rem; }
.gcard__body h3 { font-size: .92rem; margin: 0 0 .1rem; overflow-wrap: anywhere; }
.gcard__meta { font-size: .76rem; color: var(--ink-faint); margin: 0 0 .5rem; }

.export .btn--block + .btn--block { margin-top: .4rem; }

/* ------------------------------------------------------------------- mobil */

@media (max-width: 1180px) {
  .studio { grid-template-columns: 268px minmax(0, 1fr) 280px; }
  .mode__desc { display: none; }
}

@media (max-width: 900px) {
  .page--app { overflow: auto; height: auto; }
  .page--app #main { height: auto; }
  .studio { grid-template-columns: 1fr; height: auto; }
  .studio__left, .studio__right { border: 0; border-bottom: 1px solid var(--line); }
  .panel-scroll { overflow: visible; max-height: none; }
  .modes { grid-template-columns: repeat(4, 1fr); }
  .mode { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: .5rem .3rem; }
  .mode__icon { grid-row: auto; }
  .mode__desc { display: none; }
  .studio__stage { height: 56dvh; min-height: 320px; }
  .stage__title p { display: none; }
  .stage__stats { max-width: none; position: static; padding: .7rem 1rem 0; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .export { position: static; }
  .menu { position: static; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
