/* Planer sesji – style 1:1 z makiety Designera (design/makieta.css, 25.10.2026), bez panelu makiety. */
/* Planer sesji – makieta (Designer, 2026-10-25)
   Dwa „materiały”: CIEMNIA (praca twórcza na obrazach) i PAPIER (scenariusz: czytanie w studiu, wydruk). */

@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-400Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* ciemnia */
  --bg: #121110;
  --bg-2: #191816;
  --surface: #1f1e1b;
  --surface-2: #282622;
  --line: #34322d;
  --line-soft: #26241f;
  --text: #eeebe4;
  --text-2: #b9b4a9;
  --muted: #8b867b;
  /* jedyny kolor akcji: czerwień lampy ciemniowej = „robimy” */
  --red: #ff5a3c;
  --red-ink: #2a0d07;
  --red-soft: rgba(255, 90, 60, .14);
  /* bursztyn = ostrzeżenia „czego w Kapsel nie ma” */
  --amber: #f0b54a;
  --amber-soft: rgba(240, 181, 74, .12);
  --amber-ink: #2b1d04;
  --sun: #f6cf6a;
  --focus: #9cc2ff;
  /* papier */
  --paper: #f5f2ec;
  --paper-2: #ebe7de;
  --ink: #1b1a17;
  --ink-2: #4c4942;
  --ink-3: #7b766c;
  --paper-line: #d9d3c7;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
  --r-s: 6px;
  --tile: 240px;
  --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.loading { padding: 80px 24px; text-align: center; color: var(--muted); }

/* ───────── górny pasek ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--top-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: rgba(18, 17, 16, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--text); position: relative; flex: none;
}
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--red); }
.brand-name { font-family: var(--serif); font-size: 21px; letter-spacing: .01em; white-space: nowrap; }
.crumb { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-2); }
.crumb .sep { color: var(--line); }
.crumb .proj { font-family: var(--serif); font-size: 21px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stepper { display: flex; gap: 2px; margin: 0 auto; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px; }
.stepper a {
  display: flex; align-items: baseline; gap: 7px; text-decoration: none;
  padding: 6px 14px 6px 12px; border-radius: 999px; color: var(--text-2); white-space: nowrap;
}
.stepper a .n { font-family: var(--serif); font-size: 16px; color: var(--muted); }
.stepper a:hover { color: var(--text); }
.stepper a.on { background: var(--surface-2); color: var(--text); }
.stepper a.on .n { color: var(--red); }
.topbar .right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.stepper + .right { margin-left: 0; }
.saved { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.saved::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6fbf73; }
.saved.busy::before { background: var(--amber); }
.saved.err { color: #e0826b; } .saved.err::before { background: #d8401f; }  /* aplikacja: zapis się nie udał */
body.paper .saved.err { color: #b4321a; }

/* dolny pasek zakładek (telefon) */
.tabbar { display: none; }

/* ───────── przyciski i kontrolki ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); border-color: #4a4740; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: var(--red-ink); font-weight: 600; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.kbd { font: 11px/1 var(--sans); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-2); padding: 5px 13px; border-radius: 999px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  transition: all .12s;
}
.chip:hover { border-color: #57534a; color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.chip .k { font-size: 10.5px; opacity: .55; }

.field label, .label {
  display: block; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.input, .textarea, .select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 9px 11px; color: var(--text); outline: none; transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: #6a665c; background: var(--surface); }
.textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }

.klimat-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; vertical-align: -1px; }
.klimat-dot.jasny { background: #ece8df; }
.klimat-dot.ciemny { background: #0b0b0a; box-shadow: inset 0 0 0 1.5px #77736a; }

.warn-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--amber); font-size: 12px; font-weight: 600; }
.q-badge { display: inline-flex; align-items: center; gap: 3px; color: #b9d1ff; font-size: 12px; font-weight: 700; }
.sun-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--sun); font-size: 12px; font-weight: 600; }

/* ───────── ekran: lista projektów ───────── */
.page { max-width: 1240px; margin: 0 auto; padding: 40px 28px 120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1; margin: 0; letter-spacing: -.01em; }
.page-head p { margin: 10px 0 0; color: var(--text-2); max-width: 560px; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.pcard {
  display: block; text-decoration: none; border-radius: 14px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line-soft); transition: transform .2s, border-color .2s;
}
.pcard:hover { transform: translateY(-2px); border-color: var(--line); }
.pcard .cover { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 16/10; background: var(--bg); }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.pcard .cover img:first-child { grid-row: span 2; }
.pcard .cover.empty { display: flex; align-items: center; justify-content: center; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--bg-2) 0 12px, var(--bg) 12px 24px); }
.pcard .meta { padding: 16px 18px 18px; }
.pcard h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 4px; line-height: 1.1; }
.pcard .facts { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.progress-dots { display: flex; gap: 5px; margin-top: 12px; }
.progress-dots span { height: 3px; flex: 1; border-radius: 2px; background: var(--line); }
.progress-dots span.on { background: var(--text-2); }
.pcard.new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 300px;
  border: 1.5px dashed var(--line); background: transparent; color: var(--text-2); cursor: pointer; font: inherit; }
.pcard.new .plus { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 26px; color: var(--text); }
.pcard.new strong { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--text); }

/* ───────── ekran: koncepcja ───────── */
.concept { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: calc(100vh - var(--top-h)); }
.concept-hero { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow: hidden; background: #000; }
.concept-hero .mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 2px; }
.concept-hero .mosaic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.concept-hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.82)); }
.concept-hero .title { position: absolute; left: 36px; right: 36px; bottom: 34px; }
.concept-hero .title .eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.concept-hero .title h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 7vw, 104px); line-height: .92; margin: 8px 0 14px; letter-spacing: -.015em; }
.concept-hero .stats { display: flex; gap: 22px; color: var(--text-2); }
.concept-hero .stats b { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--text); display: block; line-height: 1; }
.concept-form { padding: 44px 48px 120px; max-width: 760px; }
.concept-form h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 6px; }
.concept-form .lead { color: var(--text-2); margin: 0 0 30px; }
.concept-form .field { margin-bottom: 22px; }
.concept-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.concept-form .bigq { font-family: var(--serif); font-size: 26px; line-height: 1.25; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 0 10px; }
.concept-form .bigq:focus { background: transparent; border-color: var(--text-2); }
.klimaty { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.klimat-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-2); }
.klimat-card .strip { display: grid; grid-template-columns: repeat(4, 1fr); height: 74px; }
.klimat-card .strip img { width: 100%; height: 100%; object-fit: cover; }
.klimat-card .body { padding: 10px 12px 12px; }
.klimat-card .body b { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.klimat-card .body p { margin: 0; color: var(--text-2); font-size: 13px; }
.studio-box { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--bg-2); color: var(--text-2); font-size: 13.5px; }
.next-row { display: flex; justify-content: flex-end; margin-top: 30px; }

/* ───────── ekran: moodboard ───────── */
.toolbar {
  position: sticky; top: var(--top-h); z-index: 30;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 20px; background: rgba(18,17,16,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.toolbar .lbl { color: var(--muted); font-size: 12.5px; }
.toolbar .grow { flex: 1; }
.size { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.size input { width: 110px; accent-color: var(--text); }
.count { color: var(--text-2); font-size: 13px; white-space: nowrap; }
.count b { color: var(--text); }
.count .r { color: var(--red); }

.board { padding: 8px 20px 140px; }
.hint-line { color: var(--muted); font-size: 12.5px; padding: 10px 0 0; display: flex; gap: 14px; flex-wrap: wrap; }
.group { padding-top: 26px; }
.group-head {
  display: flex; align-items: baseline; gap: 14px; padding: 0 0 12px;
  position: sticky; top: calc(var(--top-h) + 61px); z-index: 10; background: var(--bg);
  padding-top: 8px;
}
.group-head .letter { font-family: var(--serif); font-size: 40px; line-height: .8; color: var(--muted); width: 30px; }
.group-head h2 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 0; line-height: 1.1; }
.group-head .sub { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.group-head .sub .r { color: var(--red); }
.group-head .go { margin-left: auto; }
.group.off .grid { opacity: .45; }
.group.off h2::after { content: " · poza sesją"; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.group.drop-target .grid { outline: 1.5px dashed var(--text-2); outline-offset: 6px; border-radius: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 6px; min-height: 90px; }
.grid.empty-drop { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--line); border-radius: var(--r); color: var(--muted); }

.tile { position: relative; aspect-ratio: 3/2; background: #000; overflow: hidden; border-radius: 3px; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .2s; }
.tile img.contain { object-fit: contain; }
.tile:hover img { transform: scale(1.025); }
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 28%, transparent 62%, rgba(0,0,0,.6)); opacity: 0; transition: opacity .15s; }
.tile:hover::after, .tile.sel::after { opacity: 1; }
.tile .num { position: absolute; top: 8px; right: 9px; z-index: 2; font: 11px/1 var(--sans); letter-spacing: .04em; color: rgba(255,255,255,.75); opacity: 0; transition: opacity .15s; }
.tile:hover .num { opacity: 1; }
.tile .robimy {
  position: absolute; top: 7px; left: 7px; z-index: 3; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.85); background: rgba(0,0,0,.25); display: grid; place-items: center;
  opacity: 0; transition: opacity .12s, transform .12s; padding: 0;
}
.tile .robimy svg { width: 14px; height: 14px; stroke: #fff; opacity: .0; }
.tile:hover .robimy { opacity: 1; }
.tile .robimy:hover svg { opacity: .7; }
.tile.on .robimy { opacity: 1; background: var(--red); border-color: var(--red); }
.tile.on .robimy svg { opacity: 1; stroke: var(--red-ink); }
.tile.on { box-shadow: inset 0 0 0 2px var(--red); }
.tile.on img { opacity: .96; }
.tile .marks { position: absolute; left: 8px; bottom: 7px; right: 8px; z-index: 2; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #fff; }
.tile .marks .m { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 6px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.tile .marks .setl { margin-left: auto; font-family: var(--serif); font-size: 15px; opacity: 0; transition: opacity .15s; }
.tile:hover .marks .setl { opacity: .9; }
.tile .undesc { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.6); color: var(--text-2); }
.tile.sel { outline: 2.5px solid var(--focus); outline-offset: -2.5px; }
.tile.dragging { opacity: .35; }
.tile.ins-before::before, .tile.ins-after::before { content: ""; position: absolute; top: 0; bottom: 0; width: 4px; z-index: 5; background: var(--text); border-radius: 2px; }
.tile.ins-before::before { left: 0; }
.tile.ins-after::before { right: 0; }

.actionbar {
  position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: #2c2a26; border: 1px solid #45423b; box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.actionbar .n { font-weight: 600; margin-right: 6px; white-space: nowrap; }

.banner {
  display: flex; gap: 16px; align-items: flex-start; margin: 18px 0 4px; padding: 16px 18px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg-2);
}
.banner .ico { font-size: 20px; line-height: 1; }
.banner h3 { margin: 0 0 4px; font-size: 15px; }
.banner p { margin: 0; color: var(--text-2); }
.banner .cmd { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.banner code { font: 13px/1.4 ui-monospace, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; color: var(--text); }

.dropzone {
  margin: 40px auto; max-width: 760px; border: 1.5px dashed var(--line); border-radius: 18px; padding: 54px 30px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.035), transparent 70%);
}
.dropzone .big { font-family: var(--serif); font-size: 40px; line-height: 1.05; margin: 14px 0 8px; }
.dropzone p { color: var(--text-2); margin: 0 auto 22px; max-width: 500px; }
.dropzone .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; text-align: left; }
.dropzone .steps div { border-top: 1px solid var(--line); padding-top: 12px; color: var(--text-2); font-size: 13px; }
.dropzone .steps b { display: block; color: var(--text); font-family: var(--serif); font-weight: 400; font-size: 20px; margin-bottom: 2px; }
.dropzone.hover { border-color: var(--text); }
.import-box { max-width: 760px; margin: 40px auto; }
.import-box .bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 14px 0 10px; }
.import-box .bar i { display: block; height: 100%; width: 0; background: var(--text); transition: width .12s linear; }
.import-box .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 3px; margin-top: 18px; }
.import-box .thumbs img { width: 100%; aspect-ratio: 3/2; object-fit: cover; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ───────── podgląd obrazu (lupa) ───────── */
.viewer { position: fixed; inset: 0; z-index: 170; display: grid; grid-template-columns: minmax(0, 1fr) 400px; background: #0a0a09; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.viewer .stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 28px 70px; min-height: 0; }
.viewer .stage img { max-width: 100%; max-height: calc(100vh - 56px); object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20,20,18,.7); color: var(--text); font-size: 20px; }
.viewer .nav.prev { left: 14px; } .viewer .nav.next { right: 14px; }
.viewer .close { position: absolute; top: 14px; left: 14px; }
.viewer .robimy-flag { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); background: var(--red); color: var(--red-ink); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.viewer .panel { background: var(--bg-2); border-left: 1px solid var(--line-soft); overflow-y: auto; padding: 18px 22px 30px; display: flex; flex-direction: column; gap: 20px; }
.viewer .panel .head { display: flex; align-items: center; gap: 10px; }
.viewer .panel .head .id { font-family: var(--serif); font-size: 34px; line-height: 1; }
.viewer .panel .head .pos { color: var(--muted); font-size: 13px; }
.btn-robimy { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 15px; }
.btn-robimy:hover { border-color: var(--red); }
.btn-robimy .box { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text-2); display: grid; place-items: center; }
.btn-robimy svg { width: 12px; height: 12px; stroke: var(--red-ink); opacity: 0; }
.btn-robimy .kbd { border-color: currentColor; opacity: .6; }
.btn-robimy.on { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.btn-robimy.on .box { border-color: var(--red-ink); background: var(--red-ink); }
.btn-robimy.on svg { stroke: var(--red); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.note-wrap { position: relative; }
.note-state { position: absolute; right: 10px; bottom: 9px; font-size: 11.5px; color: var(--muted); opacity: 0; transition: opacity .3s; }
.note-state.show { opacity: 1; }
.poza-quote { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 0; padding-left: 14px; border-left: 2px solid var(--red); }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 8px 12px; align-items: center; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv .select { padding: 6px 30px 6px 9px; }
.by-claude { font-size: 12px; color: var(--muted); }
.shortcuts { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line-soft); padding-top: 14px; }

/* ───────── ekran: sety ───────── */
.sets { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.setlist { border-right: 1px solid var(--line-soft); padding: 18px 14px 120px; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; }
.setlist .sl-head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 6px 12px; }
.setlist .sl-head h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0; }
.setlist .sec { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 18px 8px 8px; }
.scard { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r); text-decoration: none; border: 1px solid transparent; position: relative; }
.scard:hover { background: var(--bg-2); }
.scard.on { background: var(--surface); border-color: var(--line); }
.scard .mini { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; width: 74px; height: 56px; border-radius: 5px; overflow: hidden; background: #000; }
.scard .mini img { width: 100%; height: 100%; object-fit: cover; }
.scard .mini img:first-child { grid-row: span 2; }
.scard .t { display: flex; align-items: baseline; gap: 7px; }
.scard .t .l { font-family: var(--serif); font-size: 19px; color: var(--muted); }
.scard .t .name { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard .f { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.scard .f .r { color: var(--red); }
.scard.off { opacity: .5; }
.scard .handle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); opacity: 0; cursor: grab; }
.scard:hover .handle { opacity: 1; }
.scard.drop-before { box-shadow: 0 -2px 0 var(--text); }

.setcard { padding: 26px 34px 140px; min-width: 0; }
.sc-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.sc-head .letter { font-family: var(--serif); font-size: 72px; line-height: .78; color: var(--muted); }
.sc-head .titles { flex: 1; min-width: 260px; }
.sc-head h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.02; margin: 0 0 8px; outline: none; border-radius: 6px; }
.sc-head h1[contenteditable="true"]:hover { box-shadow: 0 0 0 1px var(--line); }
.sc-head h1[contenteditable="true"]:focus { box-shadow: 0 0 0 1.5px var(--text-2); }
.sc-head .facts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--text-2); font-size: 13.5px; }
.sc-head .facts .r { color: var(--red); }
.sc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.toggle .sw { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle.on .sw { background: #5c9e62; }
.toggle.on .sw::after { transform: translateX(16px); }

.filmstrip { display: flex; gap: 6px; overflow-x: auto; padding: 22px 0 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.filmstrip .tile { flex: none; height: 230px; width: auto; aspect-ratio: 3/2; scroll-snap-align: start; }
.strip-hint { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 32px; }

.callout { margin: 22px 0 6px; border-radius: 12px; border: 1px solid rgba(240,181,74,.45); background: var(--amber-soft); padding: 16px 18px; }
.callout h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 9px; color: var(--amber); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.callout ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.callout li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
.callout li::before { content: "!"; width: 18px; height: 18px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-top: 2px; }
.callout .zam { display: inline-block; margin-top: 4px; color: var(--text); }
.callout .zam b { color: var(--amber); font-weight: 600; }
.callout.ok { border-color: var(--line); background: var(--bg-2); }
.callout.ok h3 { color: var(--text-2); }
.callout.sun { border-color: rgba(246,207,106,.35); background: rgba(246,207,106,.07); }
.callout.sun h3 { color: var(--sun); }

.kp { margin-top: 22px; border: 1px solid var(--line-soft); border-radius: 14px; padding: 4px 26px; }  /* karta setu – wariant A (design/karta-setu.html, wybór Pawła) */
.kp-sec { padding: 20px 0 22px; position: relative; }
.kp-sec + .kp-sec { border-top: 1px solid var(--line-soft); }
.kp-sec.kp-przepis { padding-top: 4px; padding-bottom: 4px; }
.kp h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kp h4 svg { width: 16px; height: 16px; stroke: var(--text-2); fill: none; stroke-width: 1.6; flex: none; }
.kp p { margin: 0; color: var(--text); line-height: 1.55; max-width: 68ch; white-space: pre-wrap; }
.kp p.empty { color: var(--muted); font-style: italic; }
.kp .lead { font-size: 16.5px; line-height: 1.5; color: var(--text); max-width: 62ch; }
.kp .edit { position: absolute; top: 16px; right: 0; opacity: 0; }
.kp-sec:hover > .edit, .kp-row:hover .edit { opacity: 1; }
.kp-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.kp-h h4 { margin: 0; }
.kpara { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: flex-start; }
.krys { margin: 0; }
.krys svg.sp { display: block; width: 100%; height: auto; border-radius: 10px; }
.krys figcaption { font-size: 11.5px; line-height: 1.4; color: var(--muted); margin-top: 6px; }
.wA .krys { width: 520px; max-width: 100%; }
/* legenda obok rysunku (legendaHTML z { zwiezla: true }): numer, nazwa, odległość pod nazwą; szerokość wg treści */
.kpara .sp-leg.sp-leg-k { list-style: none; margin: 0; padding: 0; width: max-content; max-width: 300px; display: grid; grid-template-columns: none; gap: 9px; font-size: 13.5px; }
.kpara .sp-leg.sp-leg-k li { display: grid; grid-template-columns: 20px auto; gap: 0 9px; align-items: start; padding: 0; border: 0; }
.kpara .sp-leg.sp-leg-k .n { grid-row: span 2; width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.kpara .sp-leg.sp-leg-k .t { color: var(--text); line-height: 1.3; }
.kpara .sp-leg.sp-leg-k small { color: var(--muted); font-size: 12px; line-height: 1.35; text-align: left; max-width: none; }
.kpara .sp-leg.sp-leg-k small:empty { display: none; }
.kp-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 4px 22px; padding: 16px 0; position: relative; }
.kp-row + .kp-row { border-top: 1px solid var(--line-soft); }
.kp-row h4 { margin: 2px 0 0; }
.kp-row .edit { top: 12px; }
.refnum { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 12.5px; cursor: pointer; }
.refnum:hover { background: var(--text); color: var(--bg); }
.sc-note { margin-top: 22px; }

.modal-back { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; animation: fade .12s; }
.modal { width: min(520px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 6px; }
.modal p { color: var(--text-2); margin: 0 0 16px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.picklist { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.picklist button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--bg); }
.picklist button:hover { border-color: var(--text-2); }
.picklist .l { font-family: var(--serif); font-size: 20px; width: 20px; color: var(--muted); }

/* niepotwierdzone = chłodny niebieskoszary, przerywana linia (inny kolor niż braki) */
.unsure { text-decoration: underline dashed rgba(156,194,255,.75); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.unsure-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px;
  color: #b9d1ff; border: 1px dashed rgba(156,194,255,.6); text-decoration: none; font-family: var(--sans); font-style: normal; }
.callout.ask { border-color: rgba(156,194,255,.4); background: rgba(156,194,255,.07); border-style: dashed; }
.callout.ask h3 { color: #b9d1ff; }
.callout.ask li::before { content: "?"; background: #b9d1ff; color: #0d1a33; }
.callout .ask-foot { margin-top: 12px; color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.askrow { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; margin: 0 0 10px; padding: 10px; border-radius: var(--r); border: 1px dashed rgba(156,194,255,.45); background: rgba(156,194,255,.06); color: var(--text); }
.askrow:hover { background: rgba(156,194,255,.12); }
.askrow .qmark { width: 26px; height: 26px; border-radius: 50%; background: #b9d1ff; color: #0d1a33; font-weight: 800; display: grid; place-items: center; }
.askrow small { display: block; color: var(--muted); font-size: 12px; }
.qlist { margin: 0; padding-left: 20px; display: grid; gap: 10px; max-height: 50vh; overflow: auto; color: var(--text); }
body.paper .unsure { text-decoration-color: #5a77b0; }
body.paper .unsure-tag { color: #2d4a85; border-color: #8ea6d6; background: #eef2fa; }
.asks { margin-top: 46px; border: 1.5px dashed #8ea6d6; border-radius: 12px; padding: 18px 22px; background: #f3f5fa; break-inside: avoid; }
.asks h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0 0 4px; }
.asks .lead { color: var(--ink-3); margin: 0 0 12px; font-size: 13.5px; }
.asks ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.asks li { font-size: 14px; }
.asks li small { color: var(--ink-3); margin-left: 8px; white-space: nowrap; }
.asks .btn { background: #fff; border-color: var(--paper-line); color: var(--ink); }


/* katalog Kapsel na karcie setu */
.kapsel { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-soft); }
.kapsel-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kapsel-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.kapsel-head .muted { font-size: 12.5px; flex: 1; }
.kapsel-row { display: flex; gap: 22px; flex-wrap: wrap; }
.kgroup .label { margin-bottom: 8px; }
.kels { display: flex; gap: 10px; flex-wrap: wrap; }
.kel { position: relative; margin: 0; width: 104px; cursor: zoom-in; }
.kel img { width: 104px; height: 132px; object-fit: cover; border-radius: 6px; background: #000; }
.kel figcaption { font-size: 12px; line-height: 1.3; color: var(--text-2); margin-top: 5px; }
.kel-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; opacity: 0; }
.kel:hover .kel-x { opacity: 1; }
.kapsel-foot { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.modal.wide { width: min(980px, 100%); max-height: 88vh; overflow-y: auto; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.kpick { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; background: transparent; text-align: left; font-size: 12px; color: var(--text-2); }
.kpick img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 6px; outline: 2px solid transparent; outline-offset: -2px; }
.kpick.on img { outline-color: var(--text); }
.kpick i { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.5); border: 1.5px solid #fff; display: grid; place-items: center; }
.kpick i svg { width: 12px; height: 12px; stroke: var(--bg); opacity: 0; }
.kpick.on i { background: var(--text); border-color: var(--text); }
.kpick.on i svg { opacity: 1; }

/* schemat ustawienia z góry */
.schemat { margin: 0; }
.schemat svg { width: 100%; max-width: 400px; display: block; overflow: visible; }
.schemat figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.sv-bg { fill: #8b867b; }
.sv-model { fill: var(--text); }
.sv-cam { fill: var(--text-2); } .sv-lens { fill: var(--text-2); }
.sv-lamp { fill: var(--amber); } .sv-lamp.extra { fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-dasharray: 3 2; }
.sv-beam { stroke: rgba(240,181,74,.35); stroke-width: 10; stroke-linecap: round; }
.sv-beam.hard { stroke: rgba(240,181,74,.7); stroke-width: 2; }
.sv-blenda { fill: #f3f0e8; } .sv-panel { fill: #000; stroke: #77736a; stroke-width: 1; }
.sv-shadow { fill: rgba(0,0,0,.55); }
.sv-okno { fill: #cfe0f2; stroke: #8fb0d3; stroke-width: 1; } .sv-okno-l { stroke: #8fb0d3; stroke-width: 1; }
.sv-sunbeam { stroke: rgba(246,207,106,.28); stroke-width: 22; stroke-linecap: round; }
body.paper .sv-sunbeam { stroke: rgba(240,190,60,.25); }
.sv-t { font: 10.5px var(--sans); fill: var(--text-2); } .sv-t.b { fill: var(--text); font-weight: 600; }
body.paper .sv-bg { fill: #9a9488; }
body.paper .sv-model { fill: var(--ink); }
body.paper .sv-cam, body.paper .sv-lens { fill: var(--ink-2); }
body.paper .sv-lamp { fill: #c88a10; } body.paper .sv-lamp.extra { fill: none; stroke: #c88a10; }
body.paper .sv-beam { stroke: rgba(200,138,16,.22); } body.paper .sv-beam.hard { stroke: rgba(200,138,16,.7); }
body.paper .sv-blenda { fill: #fff; stroke: #9a9488; stroke-width: 1; } body.paper .sv-panel { fill: #1b1a17; }
body.paper .sv-shadow { fill: rgba(0,0,0,.3); }
body.paper .sv-t { fill: var(--ink-2); } body.paper .sv-t.b { fill: var(--ink); }
.setup-wrap.has-sch { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; border-bottom: 1px solid var(--paper-line); align-items: start; }
.setup-wrap.has-sch .setup { border-bottom: 0; }
.setup-wrap .schemat { padding: 10px 0; }
.setup-wrap .schemat figcaption { color: var(--ink-3); }
.suninfo { font-size: 12px; color: #6b4b00; background: #fbf1d3; border-radius: 6px; padding: 6px 8px; margin-top: 6px; line-height: 1.4; }
.tl-sun.weak { background: #fbeec4; }

/* ───────── ekran: scenariusz (PAPIER) ───────── */
body.paper { background: var(--paper); }
body.paper .topbar { background: rgba(245,242,236,.9); border-color: var(--paper-line); color: var(--ink); }
body.paper .brand-mark { border-color: var(--ink); }
body.paper .crumb, body.paper .crumb .proj { color: var(--ink); }
body.paper .crumb .sep { color: var(--paper-line); }
body.paper .stepper { background: var(--paper-2); border-color: var(--paper-line); }
body.paper .stepper a { color: var(--ink-2); }
body.paper .stepper a .n { color: var(--ink-3); }
body.paper .stepper a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
body.paper .stepper a.on .n { color: #d8401f; }
body.paper .saved { color: var(--ink-3); }

.script { display: grid; grid-template-columns: 330px minmax(0, 1fr); color: var(--ink); }
.plan { padding: 22px 18px 120px; border-right: 1px solid var(--paper-line); position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; }
.plan h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 14px; }
.plan .pfield { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan label { display: block; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.plan .input, .plan .select { background: #fff; border-color: var(--paper-line); color: var(--ink); }
.plan .select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.plan .sec { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 8px; display: flex; justify-content: space-between; }
.porder { display: grid; gap: 4px; }
.plan .sun-order { width: 100%; margin: 0 0 8px; justify-content: center; }  /* aplikacja: „Ułóż sety wg słońca” */
.gear .foto-pog, .kel .foto-pog { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); }  /* aplikacja: zdjęcie sprzętu tylko poglądowe */
.kel .foto-pog { color: var(--muted); }
.kel img.sp, .kpick img.sp, .gear-cols li img.sp { object-fit: contain; background: #fff; }  /* zdjęcia sprzętu: cały przedmiot na białym */
.gear .ksp-li { cursor: pointer; } .gear .ksp-li:hover .gl { text-decoration: underline; }
.kpick .kp-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.kp-sub { font-size: 12px; color: var(--muted); margin: 10px 0 6px; }  /* aplikacja: grupy sprzętu w oknie katalogu */
.prow { display: grid; grid-template-columns: 16px 22px 1fr auto; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--paper-line); cursor: grab; }
.prow.dim { opacity: .5; cursor: default; background: transparent; }
.prow .grip { color: var(--ink-3); font-size: 12px; letter-spacing: -2px; }
.prow .l { font-family: var(--serif); font-size: 19px; color: var(--ink-3); }
.prow .nm { font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .nm small { display: block; color: var(--ink-3); font-size: 11.5px; }
.stepperm { display: inline-flex; align-items: center; border: 1px solid var(--paper-line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.stepperm button { border: 0; background: transparent; width: 24px; height: 24px; color: var(--ink-2); }
.stepperm button:hover { background: var(--paper-2); }
.stepperm span { font-size: 12px; min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.prow.drop-before { box-shadow: 0 -2px 0 var(--ink); }
.plan .warn { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #fbeed3; color: #6a4708; font-size: 13px; border: 1px solid #efd49b; }
.plan .warn.red { background: #fde3dc; color: #8a2410; border-color: #f4bfb1; }
.plan .total { display: flex; justify-content: space-between; font-size: 13px; margin-top: 10px; color: var(--ink-2); }
.plan .total b { color: var(--ink); }
.plan .actions { display: grid; gap: 8px; margin-top: 22px; }
.plan .btn { background: #fff; border-color: var(--paper-line); color: var(--ink); }
.plan .btn:hover { background: var(--paper-2); }
.plan .btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.doc { padding: 34px 48px 140px; max-width: 1060px; }
.doc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
.doc-head .eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.doc-head h1 { font-family: var(--serif); font-weight: 400; font-size: 62px; line-height: .95; margin: 6px 0 0; letter-spacing: -.01em; }
.doc-head .facts { text-align: right; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.doc-head .facts b { color: var(--ink); }

.timeline { margin: 20px 0 8px; }
.tl-bar { position: relative; height: 40px; border-radius: 8px; background: var(--paper-2); overflow: hidden; border: 1px solid var(--paper-line); }
.tl-seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 18px; color: var(--paper); background: var(--ink); border-right: 2px solid var(--paper); overflow: hidden; white-space: nowrap; }
.tl-seg.light { background: #c9c3b6; color: var(--ink); }
.tl-seg.ch { background: repeating-linear-gradient(135deg, var(--paper-2) 0 4px, #d8d2c5 4px 8px); }
.tl-seg.over { box-shadow: inset 0 -4px 0 #d8401f; }
.tl-sunrow { position: relative; height: 18px; margin-bottom: 3px; }
.tl-sun { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: #f6d985; color: #6b4b00; font-size: 11px; font-weight: 600; display: flex; align-items: center; padding: 0 7px; overflow: hidden; white-space: nowrap; }
.tl-end { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #d8401f; z-index: 3; }
.tl-scale { position: relative; height: 18px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-scale span { position: absolute; transform: translateX(-50%); top: 3px; }
.tl-scale span:first-child { transform: none; }
.tl-scale span:last-child { transform: translateX(-100%); }
.tl-legend { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.tl-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }

.sblock { margin-top: 38px; break-inside: auto; }
.sblock-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.sblock-head .big { font-family: var(--serif); font-size: 64px; line-height: .78; }
.sblock-head h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; margin: 0; }
.sblock-head .when { text-align: right; font-variant-numeric: tabular-nums; }
.sblock-head .when b { font-size: 20px; display: block; }
.sblock-head .when span { color: var(--ink-3); font-size: 13px; }
.setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--paper-line); }
.setup div:nth-child(3), .setup div:nth-child(4) { border-top: 1px solid var(--paper-line); }
.setup div:nth-child(3) { padding-left: 0; border-left: 0; }
.setup div { padding: 12px 14px 12px 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.setup div + div { padding-left: 14px; border-left: 1px solid var(--paper-line); }
.setup h5 { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.setup-warn { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 9px 0; font-size: 13px; color: #7a4f06; border-bottom: 1px solid var(--paper-line); }
.setup-warn span::before { content: "⚠ "; }
.setup-warn.sun { color: #8a6400; }
.setup-warn.sun span::before { content: "☀ "; }
.setup-warn .bad { color: #b1300f; font-weight: 600; }

.shot { display: grid; grid-template-columns: 30px 168px minmax(0, 1fr) 214px; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--paper-line); align-items: start; break-inside: avoid; }
.shot .no { font-family: var(--serif); font-size: 26px; line-height: 1; padding-top: 2px; }
.shot .no small { display: block; font-family: var(--sans); font-size: 10.5px; color: var(--ink-3); margin-top: 4px; letter-spacing: .04em; }
.shot .ph { position: relative; }
.shot .ph img { width: 168px; aspect-ratio: 3/2; object-fit: cover; border-radius: 3px; background: #000; cursor: zoom-in; }
.shot .ph .fr { position: absolute; left: 6px; bottom: 5px; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 3px; }
.shot .poza { font-family: var(--serif); font-size: 22px; line-height: 1.28; margin: 0 0 6px; }
.shot .wyraz { color: var(--ink-2); font-size: 13.5px; }
.shot .wyraz b { color: var(--ink); font-weight: 600; }
.shot .likes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.shot .likes span { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.shot .mynote { margin-top: 8px; font-size: 13.5px; color: var(--ink); padding: 6px 10px; border-left: 2px solid #d8401f; background: #fff; border-radius: 0 6px 6px 0; }
.shot .tech { display: grid; gap: 6px; font-size: 13px; }
.shot .tech .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.shot .tech .row span { color: var(--ink-3); }
.shot .tech select { border: 1px solid var(--paper-line); background: #fff; border-radius: 6px; padding: 3px 6px; color: var(--ink); font-size: 13px; max-width: 152px; }
.orient { display: inline-flex; border: 1px solid var(--paper-line); border-radius: 6px; overflow: hidden; }
.orient button { border: 0; background: #fff; padding: 3px 8px; font-size: 12px; color: var(--ink-3); }
.orient button.on { background: var(--ink); color: var(--paper); }
.done { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; cursor: pointer; font-size: 13px; color: var(--ink-2); user-select: none; }
.done .cb { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; background: #fff; }
.done .cb svg { width: 13px; height: 13px; stroke: var(--paper); opacity: 0; }
.done.on .cb { background: var(--ink); border-color: var(--ink); }
.done.on .cb svg { opacity: 1; }
.shot.isdone { opacity: .5; }

.gear { margin-top: 46px; break-before: page; }
.gear h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin: 0 0 4px; }
.gear .lead { color: var(--ink-3); margin: 0 0 16px; font-size: 13.5px; }
.gear-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.gear-cols h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.gear-cols ul { list-style: none; margin: 0; padding: 0; }
.gear-cols li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--paper-line); font-size: 13.5px; }
.gear-cols li small { color: var(--ink-3); white-space: nowrap; }
.gear-cols li { align-items: center; }
.gear-cols li img, .gear-cols li .noimg { width: 26px; height: 32px; object-fit: cover; border-radius: 3px; flex: none; background: var(--paper-2); }
.gear-cols li .gl { flex: 1; }
.costs { margin-top: 26px; border: 1px solid var(--ink); border-radius: 10px; padding: 14px 18px; display: grid; gap: 6px; max-width: 520px; font-variant-numeric: tabular-nums; }
.costs .row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.costs .row.sum { border-top: 1px solid var(--paper-line); padding-top: 8px; font-weight: 700; }
.costs .src { font-size: 11.5px; color: var(--ink-3); }

.empty-state { text-align: center; padding: 90px 24px; max-width: 560px; margin: 0 auto; }
.empty-state .big { font-family: var(--serif); font-size: 42px; line-height: 1.05; margin: 12px 0 8px; }
.empty-state p { color: var(--ink-2); margin: 0 0 22px; }
.empty-state .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.empty-state .btn { background: #fff; border-color: var(--paper-line); color: var(--ink); }
.empty-state .btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.jump { display: none; }

/* ───────── toast i panel makiety ───────── */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 30px); z-index: 200; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 999px; background: #f0ece4; color: #1a1916; box-shadow: 0 14px 40px rgba(0,0,0,.4); transition: all .2s; font-size: 13.5px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: #1a1916; color: #f0ece4; border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 12.5px; }
.has-actionbar .toast { bottom: calc(86px + var(--safe-b)); }


/* ───────── telefon ───────── */
@media screen and (max-width: 860px) {
  :root { --top-h: 52px; }
  body { font-size: 15px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .stepper, .saved span.txt { display: none; }
  .brand-name { display: none; }
  .crumb .proj { font-size: 20px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 6px 6px calc(6px + var(--safe-b)); background: rgba(18,17,16,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-soft);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; color: var(--muted); font-size: 11px; padding: 4px 0; }
  .tabbar a .n { font-family: var(--serif); font-size: 20px; line-height: 1; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .n { color: var(--red); }
  body.paper .tabbar { background: rgba(245,242,236,.95); border-color: var(--paper-line); }
  body.paper .tabbar a { color: var(--ink-3); }
  body.paper .tabbar a.on { color: var(--ink); }
  body.no-tabs .tabbar { display: none; }

  .page { padding: 24px 16px 110px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 40px; }
  .projects { grid-template-columns: 1fr; }

  .concept { grid-template-columns: minmax(0, 1fr); }
  .concept-hero { position: relative; top: 0; height: 58vh; }
  .concept-hero .title { left: 18px; right: 18px; bottom: 20px; }
  .concept-form { padding: 26px 16px 120px; }
  .concept-form .row2, .klimaty { grid-template-columns: 1fr; }

  .toolbar { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar .lbl, .size, .toolbar .grow, .toolbar .count { display: none; }
  .seg button { padding: 6px 12px; }
  .board { padding: 0 8px 120px; }
  .group-head { top: calc(var(--top-h) + 57px); padding-left: 4px; gap: 10px; flex-wrap: wrap; }
  .group-head .letter { font-size: 30px; width: 22px; }
  .group-head h2 { font-size: 22px; }
  .group-head .go { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .tile .robimy { opacity: 1; width: 30px; height: 30px; background: rgba(0,0,0,.35); }
  .tile .robimy svg { opacity: 0; }
  .tile.on .robimy svg { opacity: 1; }
  .tile .num { display: none; }
  .hint-line { display: none; }
  .actionbar { bottom: calc(70px + var(--safe-b)); max-width: calc(100% - 16px); overflow-x: auto; }

  .viewer { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .viewer .stage { padding: 52px 0 6px; position: sticky; top: 0; z-index: 2; background: #0a0a09; }
  .viewer .stage img { max-height: 38vh; width: 100%; box-shadow: none; }
  .viewer .close { top: 8px; left: 8px; }
  .viewer .robimy-flag { top: 14px; }
  .viewer .nav { top: auto; bottom: 14px; transform: none; width: 40px; height: 40px; }
  .viewer .panel { border-left: 0; overflow: visible; padding: 16px 16px 40px; }
  .shortcuts { display: none; }

  .sets { grid-template-columns: minmax(0, 1fr); }
  .setlist { position: static; height: auto; border-right: 0; padding: 12px 10px 110px; }
  .sets.has-card .setlist { display: none; }
  .sets:not(.has-card) .setcard { display: none; }
  .setcard { padding: 14px 16px 120px; }
  .sc-head .letter { font-size: 48px; }
  .sc-head h1 { font-size: 32px; }
  .filmstrip .tile { height: 150px; }
  .kp { padding: 2px 16px; } .kp-row { grid-template-columns: 1fr; }
  .wA .krys { width: 100%; } .kpara .sp-leg.sp-leg-k { max-width: none; width: auto; }
  .kp .lead { font-size: 15.5px; }
  .back-link { display: inline-flex !important; }

  .script { grid-template-columns: minmax(0, 1fr); }
  .plan { display: none; }
  .doc { padding: 18px 16px 120px; }
  .doc-head { flex-direction: column; align-items: flex-start; }
  .doc-head h1 { font-size: 44px; }
  .doc-head .facts { text-align: left; }
  .tl-scale span.half { display: none; }
  .jump { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: var(--top-h); z-index: 20; background: var(--paper); padding: 10px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-bottom: 1px solid var(--paper-line); scrollbar-width: none; }
  .jump a { flex: none; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--paper-line); background: #fff; font-size: 13px; color: var(--ink); white-space: nowrap; }
  .jump a .l { font-family: var(--serif); font-size: 16px; margin-right: 4px; }
  .jump a.done-all { background: var(--ink); color: var(--paper); }
  .sblock { scroll-margin-top: calc(var(--top-h) + 56px); }
  .sblock-head { grid-template-columns: auto 1fr; }
  .sblock-head .big { font-size: 48px; }
  .sblock-head h2 { font-size: 26px; }
  .sblock-head .when { grid-column: 1 / -1; text-align: left; display: flex; gap: 10px; align-items: baseline; }
  .sblock-head .when b { display: inline; font-size: 17px; }
  .setup { grid-template-columns: 1fr; }
  .setup-wrap.has-sch { grid-template-columns: 1fr; }
  .kel { width: 92px; } .kel img { width: 92px; height: 116px; }
  .kel-x { opacity: 1; }
  .setup div, .setup div + div { padding: 10px 0; border-left: 0; }
  .setup div + div { border-top: 1px solid var(--paper-line); }
  .shot { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 0 20px; }
  .shot .no { display: flex; align-items: baseline; gap: 10px; font-size: 30px; }
  .shot .no small { display: inline; font-size: 13px; margin: 0; }
  .shot .ph img { width: 100%; }
  .shot .poza { font-size: 24px; }
  .shot .tech { grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 14px; }
  .shot .tech .row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .done { grid-column: 1 / -1; font-size: 16px; padding: 10px 0 0; }
  .done .cb { width: 28px; height: 28px; }
  .gear-cols { grid-template-columns: 1fr; }
  .toast { bottom: calc(76px + var(--safe-b)); }
}
.back-link { display: none; margin-bottom: 10px; }
.print-only { display: none; }

/* ───────── wydruk A4 (scenariusz) ───────── */
@page { size: A4; margin: 12mm 12mm 14mm; }
@media print {
  :root { --top-h: 0px; }
  body, body.paper { background: #fff !important; color: #000; font-size: 10.5pt; }
  .topbar, .tabbar, .plan, .toast, .jump, .no-print, .actionbar { display: none !important; }
  .script { display: block; }
  .doc { padding: 0; max-width: none; }
  .doc-head h1 { font-size: 34pt; }
  .tl-bar, .tl-seg, .tl-sun, .shot .ph img, .shot .ph .fr { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sblock { margin-top: 8mm; }
  .sblock + .sblock { break-before: page; margin-top: 0; }
  .asks { break-before: page; margin-top: 0; }
  .costs { break-inside: avoid; }
  .sblock-head { break-after: avoid; }
  .setup, .setup-warn { break-inside: avoid; break-after: avoid; }
  .shot { grid-template-columns: 12mm 46mm minmax(0, 1fr) 40mm; gap: 4mm; padding: 3mm 0; }
  .shot .no small { font-size: 7pt; }
  .shot .tech { font-size: 9pt; gap: 1.5mm; }
  .shot .tech select { display: none; }
  .print-only { display: block !important; }
  .shot .tech .row { display: block; }
  .shot .tech .row span { display: block; font-size: 7.5pt; }
  .shot .tech .done { grid-column: 1 / -1; margin-top: 0; }
  .shot .ph img { width: 46mm; }
  .shot .poza { font-size: 14pt; }
  .shot .tech select { border: 0; appearance: none; -webkit-appearance: none; padding: 0; background: none; font-size: 9.5pt; max-width: none; }
  .orient button:not(.on) { display: none; }
  .orient, .orient button.on { border: 0; background: none !important; color: #000 !important; padding: 0; }
  .done .cb { width: 4mm; height: 4mm; }
  .done span.t { display: none; }
  .shot.isdone { opacity: 1; }
  .gear-cols { grid-template-columns: repeat(3, 1fr); }
  .setup-wrap.has-sch { grid-template-columns: minmax(0, 1fr) 55mm; }
  .tl-sun { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* planer w chmurze: ekran logowania i „Wyloguj” (tylko po zalogowaniu Google) */
.loading p { margin: 0 0 20px; }
.topbar .wyloguj { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.topbar .wyloguj:hover { color: var(--text); }
/* link dla ekipy: duży obraz referencji w oknie */
.modal .ekipa-ref { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: 8px; }

/* ───────── planer w chmurze (Designer, etap 5): wejście, Wyloguj, link dla ekipy, widok ekipy ───────── */
.wejscie { max-width: 420px; margin: 12vh auto 0; padding: 0 24px 40px; text-align: center; }
.wejscie h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.05; margin: 0 0 12px; letter-spacing: -.01em; }
.wejscie p { color: var(--text-2); margin: 0 0 24px; }
.wejscie .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.wejscie .drobny { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.btn.google { gap: 10px; } .g-ico { width: 18px; height: 18px; flex: none; }
body.paper .wejscie h1 { color: var(--ink); } body.paper .wejscie p { color: var(--ink-2); }
body.paper .wejscie .btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topbar .wyloguj { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; color: var(--text-2); font-size: 13.5px; text-decoration: none; }
.topbar .wyloguj svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar .wyloguj:hover { color: var(--text); background: var(--surface); }
/* okno „Link dla ekipy” na jasnym scenariuszu: papierowe, jak reszta ekranu */
body.paper .modal { background: #fbfaf6; border-color: var(--paper-line); color: var(--ink); box-shadow: 0 30px 80px rgba(40,30,10,.28); }
body.paper .modal h2 { color: var(--ink); } body.paper .modal p { color: var(--ink-2); }
body.paper .modal .btn { background: #fff; border-color: var(--paper-line); color: var(--ink); }
body.paper .modal .btn:hover { background: var(--paper-2); }
body.paper .modal .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
body.paper .modal .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
body.paper .modal .input { background: #fff; border-color: var(--paper-line); color: var(--ink); }
body.paper .modal-back { background: rgba(40,34,24,.35); }
.link-stan { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.05); color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.link-stan .kropka { width: 9px; height: 9px; border-radius: 50%; background: #a8a194; flex: none; }
.link-stan.on { background: #e6f1e6; color: #24502a; } .link-stan.on .kropka { background: #3e8a46; } .link-stan b { color: inherit; }
.link-pole { display: flex; gap: 8px; margin: 0 0 10px; }
.link-pole .input { flex: 1; min-width: 0; font-size: 13px; text-overflow: ellipsis; }
.link-pole .btn { flex: none; }
.link-uwaga { font-size: 13px; padding-left: 12px; border-left: 3px solid #e0b25a; margin: 0 0 16px !important; }
.modal .foot { flex-wrap: wrap; }
/* widok ekipy: znacznik w pasku */
.ekipa-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--paper-line); color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 860px) { .wejscie { margin-top: 8vh; } .wejscie h1 { font-size: 36px; } .link-pole { flex-direction: column; } }
/* widok ekipy na komputerze: bez panelu planu dnia scenariusz zajmuje całą szerokość (wcześniej wpadał w wąską kolumnę 330 px) */
body.ekipa .script { grid-template-columns: minmax(0, 1fr); } body.ekipa .doc { margin: 0 auto; width: 100%; }
