/* Klapqa – tmavý, filmový. Jediný akcent je žlutá klapka. */
:root {
  --bg: #0B0C0E;
  --bg2: #0F1012;
  --surface: #17181C;
  --surface2: #1C1D22;
  --line: #26282D;
  --line2: #34363C;
  --paper: #F2EFE8;
  --text2: #C9C5BC;
  --muted: #A19E96;
  --yellow: #F5C542;
  --yellow-hi: #FFD970;
  --red: #FF6B6B;
  --ink: #141414;
  --doto: 'Doto', ui-monospace, monospace;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --top: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; }
#app { height: 100dvh; display: flex; flex-direction: column; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--yellow); }
a:hover { color: var(--yellow-hi); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ——— Hlavička ——— */
.top {
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 24px 0;
  display: flex; align-items: center; gap: 16px;
  background: rgba(11, 12, 14, 0.92); border-bottom: 1px solid #1E2024;
  position: relative; z-index: 20; flex: none;
}
.logo { font-family: var(--doto); font-weight: 900; font-size: 24px; letter-spacing: 0.04em; color: var(--paper); text-decoration: none; line-height: 1; }
.logo:hover { color: var(--paper); }
.logo.big { font-size: 56px; opacity: 0.9; }
.board-title { background: none; border: 0; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 14px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-title:hover { color: var(--paper); background: var(--surface); }
.spacer { flex: 1; }
.sync { width: 8px; height: 8px; border-radius: 50%; background: #4A4D54; flex: none; transition: background 0.2s; }
.sync.saving { background: var(--yellow); animation: pulse 1s ease-in-out infinite; }
.sync.offline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.sync.error { background: var(--red); }
@keyframes pulse { 50% { opacity: 0.35; } }
.nav { margin: 0 auto; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); }
.nav-item { height: 36px; padding: 0 16px; border-radius: 9px; border: 0; background: none; color: var(--text2); font-size: 14px; text-decoration: none; display: flex; align-items: center; }
.nav-item.on { background: var(--paper); color: var(--ink); font-weight: 600; }
.nav-item.on:hover { color: var(--ink); }
.nav-item.soon { color: #6E6B65; cursor: default; }
.share-btn { gap: 8px; }

/* ——— Tlačítka a formuláře ——— */
.btn { height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #2C2E34; background: var(--surface2); color: var(--paper); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #24262C; color: var(--paper); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn.primary:hover { background: var(--yellow-hi); color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--surface2); }
.btn.big { height: 54px; font-size: 16px; width: 100%; border-radius: 14px; }
.btn.small { height: 36px; font-size: 13px; padding: 0 12px; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--text2); }
.icon-btn:hover { background: var(--surface2); color: var(--paper); }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.row > .field { flex: 1; }
.field > label, .label, .field .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
input[type=text], input[type=url], input[type=search], input[type=password], input[type=number], input[type=date], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface2); color: var(--paper); font-size: 16px; outline: none;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { border-color: var(--yellow); }
input::placeholder, textarea::placeholder { color: #6E6B65; }
input.big-num { font-size: 28px; font-family: var(--doto); font-weight: 900; height: 64px; }
.color-input { width: 64px; height: 64px; border: 0; padding: 0; background: none; border-radius: 12px; flex: none; align-self: flex-end; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 1px solid var(--line2); border-radius: 12px; }
.hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.form-error { margin: 0; min-height: 1em; color: var(--red); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: var(--surface2); color: var(--text2); font-size: 13px; }
.chip.on { background: var(--paper); color: var(--ink); font-weight: 500; }

/* ——— Panel (sheet) ——— */
.sheet-root { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.18s; }
.sheet { position: relative; width: min(460px, calc(100vw - 32px)); max-height: min(86dvh, 760px); display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); transform: translateY(12px); opacity: 0; transition: transform 0.18s ease-out, opacity 0.18s; }
.sheet.wide { width: min(640px, calc(100vw - 32px)); }
.sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet-root.open .sheet { transform: none; opacity: 1; }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 4px 20px; }
.sheet-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.sheet-body { padding: 8px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.results { display: flex; flex-direction: column; gap: 4px; }
.result { text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--surface2); font-size: 13px; line-height: 1.35; color: var(--text2); }
.result:hover { color: var(--paper); background: #24262C; }
.fx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.fx-item { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.fx-item:hover { border-color: var(--line2); background: var(--surface2); }
.fx-item strong { font-size: 15px; font-weight: 600; }
.fx-cat { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; }
.fx-desc { font-size: 13px; line-height: 1.4; color: var(--text2); }
.share-row { display: flex; flex-direction: column; gap: 8px; }
.share-row .row { align-items: center; }
.share-row input { min-height: 44px; font-size: 13px; }
.view-box { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); align-items: flex-start; }
.view-box .share-row { align-self: stretch; }

/* ——— Nástěnka ——— */
.board { position: relative; flex: 1; overflow: hidden; }
.viewport {
  position: absolute; inset: 0; overflow: hidden; outline: none; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  background-color: var(--bg);
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px);
  background-size: 24px 24px;
}
.viewport:active { cursor: grabbing; }
.viewport.drop { box-shadow: inset 0 0 0 2px var(--yellow); }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.link-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.link-line { fill: none; stroke: var(--paper); stroke-opacity: 0.55; stroke-width: 1.3; }
.link.sel .link-line, .link:hover .link-line { stroke-opacity: 1; stroke-width: 2; }
.link-dot { fill: var(--paper); }
.link-line.temp { stroke: var(--yellow); stroke-opacity: 1; stroke-dasharray: 5 5; }

.card { position: absolute; left: 0; top: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--paper); cursor: pointer; transition: box-shadow 0.12s; }
.card.has-shot { border-color: var(--yellow); }
.card.sel { box-shadow: 0 0 0 2px var(--paper); }
.card.target { box-shadow: 0 0 0 3px var(--yellow); }
.card.dragging { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); cursor: grabbing; }
.card img { display: block; width: 100%; -webkit-user-drag: none; pointer-events: none; }
.shot-badge { position: absolute; left: 10px; top: 10px; z-index: 2; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 600; display: flex; align-items: center; white-space: nowrap; }
.card > .shot-badge { top: -11px; left: 12px; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; }
.card-meta .muted { letter-spacing: 0.02em; }
.label.mono { font-size: 10px; }

.card-note { background: var(--surface2); border-color: transparent; padding: 14px 16px; }
.card-note.has-shot { border-color: var(--yellow); padding-top: 20px; }
.note-text { font-size: 15px; line-height: 1.45; color: #E6E2D9; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-note .card-meta { margin-top: 10px; }

.thumb { position: relative; border-radius: 11px 11px 0 0; overflow: hidden; background: #202A33; min-height: 72px; }
.thumb img { max-height: 380px; object-fit: cover; }
.thumb-host { display: none; }
.thumb.no-img { height: 150px; display: grid; place-items: center; }
.thumb.no-img img { display: none; }
.thumb.no-img .thumb-host { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 0 16px; text-align: center; overflow-wrap: anywhere; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(15, 16, 18, 0.8); color: var(--paper); display: grid; place-items: center; }
.link-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.link-title { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.img-wrap { position: relative; border-radius: 11px 11px 0 0; overflow: hidden; background: #202A33; display: grid; place-items: center; }
.img-wrap img { height: 100%; object-fit: cover; }
.card-image figcaption { padding: 8px 12px; }

.swatch { height: 56px; border-radius: 11px 11px 0 0; }
.color-meta { padding: 6px 10px; font-size: 11px; color: var(--text2); }

.card-place { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.map { position: relative; height: 110px; border-radius: 8px; overflow: hidden; background-color: #1C2024; }
.map-empty { background-image: linear-gradient(90deg, #262B30 1px, transparent 1px), linear-gradient(#262B30 1px, transparent 1px); background-size: 22px 22px; }
.map-tiles { position: absolute; left: 0; top: 0; width: 768px; height: 768px; filter: invert(1) hue-rotate(180deg) grayscale(0.6) brightness(0.8) contrast(0.9); }
.map-tiles img { position: absolute; width: 256px; height: 256px; }
.map-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 6px rgba(245, 197, 66, 0.25); }
.map-attr { position: absolute; right: 4px; bottom: 2px; font-size: 8px; color: rgba(242, 239, 232, 0.55); }
.place-body { display: flex; flex-direction: column; gap: 4px; }
.place-name { font-size: 14px; font-weight: 500; }

.card-effect { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.card-effect.has-shot { padding-top: 20px; }
.fx-name { font-size: 16px; font-weight: 600; }
.fx-text { font-size: 13px; line-height: 1.45; color: var(--text2); }
.fx-link { font-size: 12px; align-self: flex-start; }
.card-effect .card-meta { margin-top: 4px; }

.port, .resize { display: none; position: absolute; z-index: 3; }
.card.sel .port { display: block; right: -10px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--paper); border: 4px solid var(--bg); cursor: crosshair; }
.card.sel .resize { display: block; right: -2px; bottom: -2px; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--paper) 50%, var(--paper) 60%, transparent 60%, transparent 72%, var(--paper) 72%, var(--paper) 82%, transparent 82%); border-radius: 0 0 11px 0; }

/* Ovládání nad plochou */
.toolbar { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tool { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--text2); display: grid; place-items: center; }
.tool:hover { background: var(--surface2); color: var(--paper); }
.tool-short { font: 600 11px/20px var(--mono); height: 20px; }
.tool-label { display: none; }
.tool-sep { height: 1px; background: var(--line); margin: 2px 6px; }

.selbar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); max-width: calc(100% - 32px); }
.sel-btn { height: 44px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--text2); display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.sel-btn:hover { background: var(--surface2); color: var(--paper); }
.sel-btn.danger:hover { color: var(--red); }
.sel-close { margin-left: 4px; }

.zoom { position: absolute; right: 20px; bottom: 20px; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.zoom .icon-btn { width: 36px; height: 36px; }
.zoom-label { font-size: 12px; color: var(--muted); min-width: 48px; text-align: center; }
.board.has-sel .zoom { display: none; }

.new-pill, .ro-pill, .connect-hint { position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--paper); }
.new-pill { right: 24px; top: 24px; }
.new-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.ro-pill { left: 24px; top: 24px; color: var(--muted); }
.connect-hint { left: 50%; bottom: 20px; transform: translateX(-50%); height: 52px; padding: 0 6px 0 16px; border-color: var(--yellow); }
.empty { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 1; width: min(380px, calc(100% - 48px)); text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; pointer-events: none; }
.empty p { margin: 0 0 6px; }
.empty-title { font-family: var(--doto); font-weight: 900; font-size: 28px; color: var(--paper); letter-spacing: 0.02em; }

.toast { position: fixed; left: 50%; bottom: calc(88px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 60; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--ink); color: var(--yellow); font-weight: 600; }
.toast span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast span:only-child { padding-right: 8px; white-space: normal; }

/* ——— Seznam, zámek, sdílení ——— */
.list, .loading { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 48px 20px calc(48px + var(--safe-b)); }
.loading { align-items: center; }
.list-inner, .lock, .share-target { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.list h1, .lock h1, .share-target h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.board-item:hover { border-color: var(--line2); color: var(--paper); }
.board-item-title { font-size: 17px; font-weight: 500; }
.lock { max-width: 380px; padding-top: 6vh; }
.lock-ico { color: var(--yellow); }
.share-target { max-width: 440px; }
.shared-url { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px; background: var(--surface2); border: 1.5px solid var(--surface2); font-size: 15px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--yellow); }
.radio input { accent-color: var(--yellow); width: 18px; height: 18px; }

/* ——— Telefon ——— */
@media (max-width: 640px) {
  :root { --top: 56px; }
  .top { padding-left: 16px; padding-right: 12px; gap: 10px; }
  .logo { font-size: 19px; }
  .board-title { display: none; }
  .nav { margin: 0 auto; }
  .nav-item { padding: 0 10px; font-size: 13px; height: 34px; }
  .share-btn { width: 44px; padding: 0; }
  .share-btn span { display: none; }

  .toolbar { left: 0; right: 0; top: auto; bottom: 0; transform: none; flex-direction: row; justify-content: space-between; gap: 0; padding: 6px 6px calc(6px + var(--safe-b)); border-radius: 18px 18px 0 0; border-width: 1px 0 0; }
  .tool { width: auto; flex: 1; height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
  .tool-label { display: block; font-size: 10px; color: var(--muted); }
  .tool-sep { display: none; }
  .board.has-sel .toolbar { display: none; }

  .selbar { left: 0; right: 0; bottom: 0; transform: none; max-width: none; border-radius: 18px 18px 0 0; border-width: 1px 0 0; padding: 6px 6px calc(6px + var(--safe-b)); justify-content: space-between; overflow-x: auto; }
  .sel-btn { flex-direction: column; gap: 3px; height: 54px; padding: 0 6px; font-size: 10px; flex: 1; min-width: 52px; }
  .sel-close { width: 44px; flex: none; }

  .zoom { right: 12px; top: 12px; bottom: auto; padding: 2px; }
  .zoom .icon-btn:not(:last-child), .zoom-label { display: none; }
  .zoom .icon-btn { width: 40px; height: 40px; }
  .new-pill { right: auto; left: 12px; top: 12px; }
  .ro-pill { left: 12px; top: 12px; }
  .connect-hint { bottom: calc(16px + var(--safe-b)); width: calc(100% - 24px); justify-content: space-between; }
  .card.sel .port { width: 28px; height: 28px; margin-top: -14px; right: -14px; }
  .card.sel .resize { width: 26px; height: 26px; }

  .sheet-root { align-items: flex-end; }
  .sheet, .sheet.wide { width: 100%; max-height: 90dvh; border-radius: 22px 22px 0 0; border-width: 1px 0 0; transform: translateY(40px); }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 8px auto 0; }
  .sheet-head { padding-top: 8px; }
  .sheet-body { padding-bottom: calc(20px + var(--safe-b)); }
  .sheet-actions .btn.primary { flex: 1; height: 52px; }
  .fx-list { grid-template-columns: 1fr; }
  .list { padding-top: 28px; }
  .list h1, .lock h1, .share-target h1 { font-size: 24px; }
}

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

/* ——— Pinterest nástěnka a výběr pinů ——— */
.mosaic { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 96px; gap: 2px; border-radius: 11px 11px 0 0; overflow: hidden; background: #202A33; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic.empty { display: grid; place-items: center; grid-template-columns: 1fr; grid-auto-rows: 150px; }
.mosaic.empty .thumb-host { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pick-pins { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 40px; padding: 0 16px; border-radius: 20px; border: 0; background: var(--paper); color: var(--ink); font: 600 13px var(--sans); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.15s; white-space: nowrap; }
.card:hover .pick-pins, .card.sel .pick-pins, .pick-pins:focus-visible { opacity: 1; }
@media (pointer: coarse) { .card.sel .pick-pins { opacity: 1; } .card:not(.sel) .pick-pins { pointer-events: none; } }
.pin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-items: start; }
.pin-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pin-img { position: relative; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--surface2); aspect-ratio: 3 / 4; }
.pin-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin-tile.on .pin-img { border-color: var(--yellow); }
.pin-tile.was:not(.on) .pin-img img { opacity: 0.45; }
.pin-check { position: absolute; right: 8px; top: 8px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: var(--yellow); color: var(--ink); font: 900 15px/28px var(--doto); }
.pin-was { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.65); font: 500 10px var(--mono); color: var(--paper); }
.pin-title { margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pin-name { min-height: 40px !important; padding: 8px 10px !important; font-size: 14px !important; }
@media (max-width: 640px) { .pin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ——— Klip a Scéna (zatím ve stavbě) ——— */
.soon-screen { flex: 1; display: grid; place-items: center; padding: 32px 20px calc(32px + var(--safe-b)); overflow-y: auto; }
.soon-inner { max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.soon-word { font-family: var(--doto); font-weight: 900; font-size: 64px; line-height: 1; letter-spacing: 0.02em; }
.soon-inner p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text2); }
.soon-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.soon-list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.soon-list li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--yellow); }
.soon-tag { align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font: 500 11px var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-item.on { cursor: default; }
.sheet-body > .sheet-actions:last-child { position: sticky; bottom: -20px; margin-bottom: -20px; padding-block: 12px 20px; background: var(--bg2); border-top: 1px solid var(--line); }
@media (max-width: 640px) { .sheet-body > .sheet-actions:last-child { bottom: calc(-20px - var(--safe-b)); margin-bottom: calc(-20px - var(--safe-b)); padding-bottom: calc(20px + var(--safe-b)); } }

/* ——— Úvodní animace ——— */
canvas.intro { position: fixed; inset: 0; z-index: 200; width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer; }
