/* ClipForge Web – style. Mobile-first, jasny/ciemny motyw, kolor marki z ikony (#3AA4F9 na #101827). */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --surface-3: #e2e7f0;
  --text: #101827;
  --muted: #5b6678;
  --line: #dbe1ec;
  --brand: #1c86e0;
  --brand-strong: #0f6cbd;
  --brand-soft: rgba(28, 134, 224, 0.12);
  --on-brand: #ffffff;
  --danger: #d23b3b;
  --ok: #1f9d63;
  --warn: #c77a00;
  --shadow: 0 6px 24px rgba(16, 24, 39, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tl-bg: #e7ecf5;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0b1220;
  --surface: #131c2f;
  --surface-2: #1a2540;
  --surface-3: #243153;
  --text: #eef3fb;
  --muted: #9aa8c1;
  --line: #26334f;
  --brand: #3aa4f9;
  --brand-strong: #6bbcff;
  --brand-soft: rgba(58, 164, 249, 0.16);
  --on-brand: #06121f;
  --danger: #ff6b6b;
  --ok: #46d28f;
  --warn: #ffb13d;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --tl-bg: #0f1829;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1220;
    --surface: #131c2f;
    --surface-2: #1a2540;
    --surface-3: #243153;
    --text: #eef3fb;
    --muted: #9aa8c1;
    --line: #26334f;
    --brand: #3aa4f9;
    --brand-strong: #6bbcff;
    --brand-soft: rgba(58, 164, 249, 0.16);
    --on-brand: #06121f;
    --danger: #ff6b6b;
    --ok: #46d28f;
    --warn: #ffb13d;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    --tl-bg: #0f1829;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.8125rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > * { flex-shrink: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.hidden { display: none !important; }

/* ── układ aplikacji ── */
#app { height: 100%; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: fadein 0.2s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-t)) var(--gutter) 8px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.topbar h1 { font-size: 1.0625rem; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { flex: 1; overflow-y: auto; padding: var(--gutter); padding-bottom: calc(var(--gutter) + var(--safe-b) + 8px); -webkit-overflow-scrolling: touch; }
.page-narrow { width: 100%; max-width: none; margin: 0; } /* pełna szerokość ekranu */

/* ── przyciski ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 650; text-decoration: none; transition: transform 0.08s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-strong); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 0.9rem; border-radius: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  border: 0; border-radius: 14px; background: transparent; color: inherit;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.on { background: var(--brand-soft); color: var(--brand); }
.icon-btn[disabled] { opacity: 0.35; pointer-events: none; }

/* ── ekran startowy ── */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 28px 22px; color: #fff;
  background: radial-gradient(120% 140% at 85% 0%, #2b8cf0 0%, rgba(43, 140, 240, 0) 55%), linear-gradient(160deg, #101827 0%, #16254a 100%);
  box-shadow: var(--shadow);
}
.hero.has-photo { background-size: cover; background-position: center; }
.hero.has-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10, 18, 34, 0.95) 0%, rgba(14, 34, 76, 0.84) 55%, rgba(22, 84, 160, 0.62) 100%); }
.hero > * { position: relative; }
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-row img { width: 44px; height: 44px; border-radius: 12px; }
.brand-row b { font-size: 1.25rem; letter-spacing: 0.2px; }
.hero h2 { font-size: clamp(1.45rem, 5.5vw, 2.1rem); line-height: 1.15; font-weight: 800; max-width: 22ch; text-wrap: balance; }
.hero p { margin-top: 10px; opacity: 0.85; max-width: 38ch; }
.hero .btn { margin-top: 18px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  padding: 16px; min-height: 112px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.tile:hover { border-color: var(--brand); }
.tile .tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tile b { font-size: 1rem; }
.tile span.s { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.section-title h2 { font-size: 1.0625rem; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.proj { position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.proj-thumb { aspect-ratio: 16/10; width: 100%; display: block; object-fit: cover; background: var(--surface-3); border: 0; padding: 0; }
.proj-thumb.empty { display: grid; place-items: center; color: var(--muted); }
.proj-info { padding: 8px 10px 10px; }
.proj-info b { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-info span { font-size: 0.75rem; color: var(--muted); }
.proj-menu { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; background: rgba(0,0,0,.45); color: #fff; border-radius: 12px; }
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.showcase { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 720px) { .showcase { grid-template-columns: repeat(3, 1fr); } }
.shot { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: var(--surface-3); }
.shot figcaption { padding: 10px 12px; font-size: 0.85rem; color: var(--muted); }
.shot { margin: 0; }
.install-banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-top: 14px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--brand); }

/* ── edytor ── */
.editor { background: var(--bg); }
.preview-wrap { flex: none; display: flex; flex-direction: column; background: #05080f; }
.stage {
  position: relative; width: 100%; height: min(42vh, 440px); min-height: 180px;
  display: grid; place-items: center; overflow: hidden;
}
.stage-frame { position: relative; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.stage-frame video, .stage-frame img.pv, .stage-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage-frame .pv-blur { object-fit: cover; filter: blur(22px) brightness(.7); transform: scale(1.15); }
.stage-frame .vignette { position: absolute; inset: 0; pointer-events: none; }
.ov { position: absolute; transform: translate(-50%, -50%); text-align: center; white-space: pre; line-height: 1.18; touch-action: none; cursor: grab; padding: 0 4px; user-select: none; }
.ov.sel { outline: 2px dashed var(--brand); outline-offset: 4px; }
.stage-empty { color: #8fa0bd; text-align: center; padding: 20px; }
.transport { display: flex; align-items: center; gap: 4px; padding: 4px 8px; color: #fff; }
.transport .icon-btn { color: #fff; }
.transport .icon-btn:hover { background: rgba(255,255,255,.1); }
.transport .time { font-variant-numeric: tabular-nums; font-size: 0.85rem; opacity: 0.9; min-width: 0; flex: 1; text-align: center; }
.play-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--on-brand) !important; }
.play-btn:hover { background: var(--brand-strong) !important; }

.timeline-area { flex: none; background: var(--surface); border-top: 1px solid var(--line); }
.tl-bar { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tl-bar::-webkit-scrollbar { display: none; }
.tl-bar .icon-btn { width: 44px; height: 44px; }
.tl-bar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; flex: none; }
.timeline { position: relative; overflow-x: auto; overflow-y: hidden; background: var(--tl-bg); touch-action: pan-x; height: 188px; scrollbar-width: thin; }
.tl-inner { position: relative; height: 100%; }
.tl-ruler { position: absolute; top: 0; left: 0; right: 0; height: 22px; color: var(--muted); font-size: 0.6875rem; pointer-events: none; }
.tl-ruler i { position: absolute; top: 4px; padding-left: 4px; border-left: 1px solid var(--line); height: 14px; line-height: 14px; font-style: normal; }
.tl-track { position: absolute; left: 0; top: 26px; height: 64px; }
.clip {
  position: absolute; top: 0; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  background: var(--surface-3) center/auto 100% repeat-x; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none;
}
.clip.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); z-index: 3; }
.clip .label { position: absolute; left: 4px; bottom: 3px; font-size: 0.6875rem; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.6); max-width: calc(100% - 8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip .badge { position: absolute; right: 4px; top: 3px; font-size: 0.6875rem; padding: 1px 6px; border-radius: 6px; background: var(--brand); color: var(--on-brand); font-weight: 700; }
.clip.dragging { opacity: 0.85; z-index: 9; box-shadow: var(--shadow); }
.handle { position: absolute; top: 0; bottom: 0; width: 22px; z-index: 4; background: var(--brand); display: grid; place-items: center; color: var(--on-brand); touch-action: none; }
.handle.l { left: 0; border-radius: 8px 0 0 8px; }
.handle.r { right: 0; border-radius: 0 8px 8px 0; }
.handle::after { content: ''; width: 3px; height: 22px; border-radius: 3px; background: currentColor; opacity: 0.8; }
.tl-sub { position: absolute; left: 0; height: 22px; }
.tl-sub .bar { position: absolute; top: 0; height: 22px; border-radius: 7px; font-size: 0.6875rem; line-height: 22px; padding: 0 8px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: none; border: 2px solid transparent; }
.tl-sub .bar.sel { border-color: #fff; }
.bar.audio { background: #2f9e6b; }
.bar.voice { background: #c5497f; }
.bar.txt { background: #8a63d2; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #ff4d4d; z-index: 10; pointer-events: none; }
.playhead::before { content: ''; position: absolute; top: 0; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: #ff4d4d; }
.range-mark { position: absolute; top: 22px; height: 68px; background: rgba(255, 77, 77, 0.28); border-left: 2px solid #ff4d4d; border-right: 2px solid #ff4d4d; z-index: 2; pointer-events: none; }
.add-clip { position: absolute; top: 26px; height: 64px; width: 64px; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px; color: var(--brand); background: transparent; }
.tools { display: flex; gap: 4px; padding: 8px 8px calc(8px + var(--safe-b)); overflow-x: auto; background: var(--surface); border-top: 1px solid var(--line); scrollbar-width: none; }
.tools::-webkit-scrollbar { display: none; }
.tool { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 66px; padding: 8px 6px; border: 0; border-radius: 12px; background: transparent; font-size: 0.75rem; color: var(--text); }
.tool:hover { background: var(--surface-2); }
.tool[disabled] { opacity: 0.35; pointer-events: none; }
.tool.on { background: var(--brand-soft); color: var(--brand); }
.editor-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
@media (min-width: 900px) {
  .editor-body { flex-direction: column; overflow: hidden; }
  .editor-body .preview-wrap { flex: 1 1 auto; min-height: 0; }
  .editor-body .stage { height: 100%; flex: 1; }
  .editor-body .lower { flex: none; width: 100%; }
}
.lower { display: flex; flex-direction: column; flex: none; }
@media (max-height: 640px) { .stage { height: 32vh; } .timeline { height: 156px; } }

/* ── arkusze i formularze ── */
.sheet-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(5, 10, 20, 0.5); opacity: 0; transition: opacity 0.2s; pointer-events: auto; }
.sheet {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  transform: translateY(100%); transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); pointer-events: auto; padding-bottom: var(--safe-b);
}
.sheet-full { max-height: 94vh; height: 94vh; }
@media (min-width: 720px) { .sheet-root { align-items: center; } .sheet { border-radius: 22px; max-height: 84vh; } }
.sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet-root.open .sheet { transform: none; }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px 20px; }
.sheet-grab { position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--surface-3); }
.sheet-title { font-size: 1.0625rem; font-weight: 700; }
.sheet-body { padding: 8px 20px 20px; overflow-y: auto; }
.field-label { font-weight: 600; font-size: 0.9rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--brand); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.nowrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 0.9rem; white-space: nowrap; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 650; }
.chip[disabled] { opacity: 0.4; }
.slider { display: block; }
.slider-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.slider-out { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; --pct: 50%; }
input[type='range']::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--brand) var(--pct), var(--surface-3) var(--pct)); }
input[type='range']::-moz-range-track { height: 6px; border-radius: 6px; background: var(--surface-3); }
input[type='range']::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--brand); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); margin-top: -10px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
input[type='range']::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.toggle-text { display: flex; flex-direction: column; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { position: relative; flex: none; width: 52px; height: 30px; border-radius: 30px; background: var(--surface-3); transition: background 0.15s; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 0.15s; }
.toggle input:checked + .toggle-ui { background: var(--brand); }
.toggle input:checked + .toggle-ui::after { transform: translateX(22px); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid var(--brand); outline-offset: 2px; }
.bar { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; position: relative; }
.bar-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--brand), #7cc4ff); transform: scaleX(0); transform-origin: left; transition: transform 0.2s linear; }
.bar.indeterminate .bar-fill { transform: none; width: 40%; animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { from { left: -40%; } to { left: 100%; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.est { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.est b { font-size: 1.15rem; }
.warn-box { padding: 10px 12px; border-radius: 12px; background: rgba(199, 122, 0, 0.14); color: var(--warn); font-size: 0.875rem; }
.err-box { padding: 10px 12px; border-radius: 12px; background: rgba(210, 59, 59, 0.12); color: var(--danger); font-size: 0.875rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-grid button { font-size: 1.6rem; min-height: 46px; border: 0; background: transparent; border-radius: 10px; }
.emoji-grid button:hover { background: var(--surface-2); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--brand); }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta span { font-size: 0.8125rem; color: var(--muted); }
.thumb-sq { width: 56px; height: 56px; flex: none; border-radius: 10px; background: var(--surface-3) center/cover; display: grid; place-items: center; color: var(--muted); }
.drop { display: grid; place-items: center; text-align: center; gap: 8px; padding: 28px 16px; min-height: 160px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.result-video { width: 100%; max-height: 46vh; border-radius: 14px; background: #000; }
.result-img { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 14px; background: var(--surface-2); }
.seg { display: flex; padding: 4px; border-radius: 14px; background: var(--surface-2); gap: 4px; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); color: var(--brand); }
.gif-crop { position: absolute; border: 2px solid var(--brand); box-shadow: 0 0 0 9999px rgba(0,0,0,.5); touch-action: none; }

/* ── komunikaty ── */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(24px + var(--safe-b)); z-index: 200; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.toast { max-width: 520px; padding: 12px 18px; border-radius: 14px; background: #101827; color: #fff; box-shadow: var(--shadow); font-size: 0.9375rem; opacity: 0; transform: translateY(12px); transition: all 0.22s; }
.toast.in { opacity: 1; transform: none; }
.toast-error { background: #b3261e; }
.toast-ok { background: #17663f; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 300; }
.boot img { width: 84px; height: 84px; border-radius: 22px; animation: pulse 1.4s infinite ease-in-out; }
@keyframes pulse { 50% { transform: scale(0.92); opacity: 0.7; } }
.fs-player { position: fixed; inset: 0; z-index: 150; background: #000; display: flex; flex-direction: column; }
.fs-player video { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.fs-player .icon-btn { position: absolute; top: calc(8px + var(--safe-t)); right: 8px; background: rgba(0,0,0,.5); color: #fff; z-index: 2; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── przyciski pobierania w hero i stopka ── */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn.dl { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.55); text-decoration: none; backdrop-filter: blur(4px); }
.btn.dl:hover { background: rgba(255,255,255,.24); }
.site-footer { margin-top: 36px; padding: 22px 0 8px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.875rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
.site-footer a { color: var(--text); text-decoration: none; font-weight: 600; padding: 6px 2px; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer p + p { margin-top: 4px; }

/* ── pełna szerokość ekranu ── */
@media (min-width: 900px) { :root { --gutter: 28px; } }
@media (min-width: 1400px) { :root { --gutter: 40px; } }
@media (min-width: 1100px) {
  .hero { padding: 44px 48px; }
  .hero h2 { font-size: 2.6rem; max-width: 24ch; }
  .hero p { font-size: 1.125rem; max-width: 56ch; }
  .tiles { gap: 16px; }
  .tile { min-height: 132px; padding: 20px; }
  .showcase { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1000px) {
  .page-narrow.stack:has(> .card ~ .card) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; align-items: start; }
  .page-narrow.stack:has(> .card ~ .card) > :not(.card) { grid-column: 1 / -1; }
  .card.stack:has(> .slider) { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 32px; align-items: start; }
  .card.stack:has(> .slider) > b:first-child { grid-column: 1 / -1; }
}
