/* The idea pinboard (src/pins/pinboard.js), from mockup 02 and the shared pin/pin.css on branch
   claude/entry-mockups, with mockup 03's slim bar. Every rule is scoped to #pins so nothing here
   reaches the editor; the editor is hidden underneath while the pinboard is open. */
html.pins-open body { background: #fff; }
html.pins-open body > :not(#pins):not(#intro) { visibility: hidden; }
#pins {
  --bg: #ffffff;
  --soft: #f4f3ef;
  --line: #e6e3dc;
  --ink: #1f2b30;
  --ink-2: #66707a;
  --ink-3: #a2a7ab;
  --gold: #b08a4e;
  --gold-2: #dcc8a2;
  --gold-soft: #f7f0e3;
  --danger: #c0473b;
  --r: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Heebo", Arial, sans-serif;
  position: fixed; inset: 0; z-index: 900; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; color-scheme: light;
}
#pins[hidden] { display: none; }
#pins * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
#pins button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; min-height: 0; }
#pins input { font: inherit; color: inherit; }
#pins h2, #pins h3, #pins h4, #pins p { font-family: var(--font); }
#pins .grow { flex: 1; min-width: 0; }
#pins .ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
#pins .ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#pins .ic.tiny { width: 11px; height: 11px; }
#pins[dir="rtl"] .ic.flip svg, #pins[dir="rtl"] .ic.tiny svg { transform: scaleX(-1); }

/* ---- the feed and its slim bar (03) ---- */
#pins .view { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#pins .view::-webkit-scrollbar { display: none; }
#pins .z-bar { position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top, 0px); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .35s var(--ease); }
#pins .z-bar.away { transform: translateY(-100%); }
#pins .z-in { display: flex; align-items: center; gap: 4px; height: 58px; max-width: 1200px; margin: 0 auto; padding: 0 8px 0 16px; }
#pins[dir="rtl"] .z-in { padding: 0 16px 0 8px; }
#pins .wordmark { font-size: 22px; font-weight: 600; letter-spacing: -.035em; }
#pins .wordmark::after { content: "·"; color: var(--gold); margin-inline-start: 1px; }
#pins .icon-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); transition: background .2s; }
#pins .icon-btn:active { background: var(--soft); }
#pins .z-search { display: flex; align-items: center; gap: 8px; width: 0; height: 38px; padding: 0; overflow: hidden; border-radius: 12px; background: var(--soft); color: var(--ink-2); transition: width .35s var(--ease), padding .35s; }
#pins .z-search .ic { width: 18px; height: 18px; }
#pins .z-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
#pins .z-bar.searching .wordmark, #pins .z-bar.searching .z-in > .grow, #pins .z-bar.searching .z-create, #pins .z-bar.searching .z-plan { display: none; }
#pins .z-bar.searching .z-search { flex: 1; width: auto; padding: 0 12px; }
#pins .z-toggle .ic:last-child { display: none; }
#pins .z-bar.searching .z-toggle .ic:first-child { display: none; }
#pins .z-bar.searching .z-toggle .ic:last-child { display: inline-flex; }
#pins .zf { position: relative; }
#pins .zf.on { color: var(--gold); }
#pins .zf[data-n]:not([data-n=""])::after { content: attr(data-n); position: absolute; top: 3px; inset-inline-end: 3px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 9px; font-weight: 700; }
#pins .z-create .ic { width: 21px; height: 21px; padding: 0; }
#pins .z-create { background: #e9ece2; border-radius: 12px; width: 40px; height: 34px; margin-inline: 2px; }
#pins .z-plan { flex: none; height: 34px; padding: 0 12px; margin-inline-start: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--gold-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
#pins .board { max-width: 1200px; margin: 0 auto; padding-top: 6px; padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ---- the pin card ---- */
#pins .masonry { display: flex; gap: 12px; padding: 0 14px 28px; }
#pins .mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
#pins .pin { cursor: pointer; opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
#pins .pin.in { opacity: 1; transform: none; }
#pins .art { position: relative; overflow: hidden; border-radius: var(--r); transition: transform .35s var(--ease), box-shadow .35s; }
#pins .pin:active .art { transform: scale(.975); }
@media (hover: hover) { #pins .pin:hover .art { box-shadow: 0 14px 28px -18px rgba(40, 40, 30, .45); transform: translateY(-2px); } }
#pins .art-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; direction: ltr; } /* the drawing and its "900 mm" read left to right in Hebrew too */
/* Free / Locked sits bottom-left (bottom-start in Hebrew), clear of the menu button (Lior 2026-10-21). */
#pins .art .badge { position: absolute; bottom: 10px; inset-inline-start: 10px; }
#pins .art.hero .badge { bottom: 16px; inset-inline-start: 16px; }
#pins .badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.94); font-size: 11.5px; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
#pins .badge .ic { width: 12px; height: 12px; }
#pins .pin-row { display: flex; align-items: center; gap: 6px; padding: 0 2px; }
#pins .pin-row:first-of-type { margin-top: 9px; }
#pins .pin-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
#pins .who { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 12px; color: var(--ink-2); text-align: start; }
#pins .who > span:not(.avatar):not(.ic) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pins .pin-row .who { flex: 1; }
#pins .heart, #pins .more { display: grid; place-items: center; flex: none; width: 30px; height: 28px; color: var(--ink); }
#pins .heart .ic { width: 21px; height: 21px; }
#pins .heart.on { color: #d9546b; }
#pins .heart.on svg { fill: currentColor; }
#pins .heart.pop .ic { animation: pins-pop .45s var(--spring); }
@keyframes pins-pop { 40% { transform: scale(1.4); } }
#pins .more .ic { width: 20px; height: 20px; }
#pins .avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 600; }
#pins .empty { padding: 40px 24px; text-align: center; color: var(--ink-2); }

/* ---- the drawings' moving parts: hover on a pointer, .play when tapped or in view ---- */
#pins .art-svg .mv { transition: transform .9s var(--spring), opacity .6s var(--ease), fill .4s; }
#pins .art-svg .door { transform-box: fill-box; transform-origin: left center; }
#pins .art-svg .glow { opacity: 0; }
@media (hover: hover) {
  #pins .pin:hover .door, #pins .art.hero:hover .door { transform: scaleX(.3) skewY(-8deg); }
  #pins .pin:hover .drawer, #pins .art.hero:hover .drawer { transform: translate(-9px, 7px); }
  #pins .pin:hover .slide, #pins .art.hero:hover .slide { transform: translateX(-58px); }
  #pins .pin:hover .glow, #pins .art.hero:hover .glow { opacity: 1; }
  #pins .pin:hover .bulb, #pins .art.hero:hover .bulb { fill: #ffe27a; }
}
#pins .art.play .door { transform: scaleX(.3) skewY(-8deg); }
#pins .art.play .drawer { transform: translate(-9px, 7px); }
#pins .art.play .slide { transform: translateX(-58px); }
#pins .art.play .glow { opacity: 1; }
#pins .art.play .bulb { fill: #ffe27a; }

/* ---- toast ---- */
#pins .toast { position: absolute; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: 440px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -14px rgba(40,40,30,.35); font-size: 13px; animation: pins-toast .45s var(--spring); }
@keyframes pins-toast { from { opacity: 0; transform: translateY(12px); } }
#pins .toast > span { flex: 1; }
#pins .toast button { color: var(--gold); font-weight: 600; }

/* ---- sheets ---- */
#pins .sheet-layer { position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(31,43,48,0); transition: background .3s; }
#pins .sheet-layer.in { background: rgba(31,43,48,.22); }
#pins .sheet { width: 100%; max-width: 520px; max-height: 86%; overflow-y: auto; padding: 8px 10px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0; background: #fff; transform: translateY(100%); transition: transform .45s var(--spring); }
#pins .sheet-layer.in .sheet { transform: none; }
#pins .grab { width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--line); }
#pins .sheet-title { margin: 2px 10px 4px; font-size: 18px; }
#pins .sheet-sub { margin: 0 10px 10px; color: var(--ink-2); font-size: 13px; }
#pins .sheet-head { display: flex; align-items: center; gap: 12px; padding: 2px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
#pins .sheet-head .art.thumb { width: 44px; flex: none; border-radius: 10px; }
#pins .sheet-head > div { display: grid; }
#pins .sheet-head small { color: var(--ink-2); }
#pins .sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 10px; border-radius: 12px; text-align: start; transition: background .2s; }
#pins .sheet-row:active { background: var(--soft); }
#pins .sheet-row.danger { color: var(--danger); }
#pins .sheet-row.mk > .ic { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); }
#pins .sr { display: grid; }
#pins .sr small { color: var(--ink-3); }
#pins .sheet-cancel { display: block; width: calc(100% - 20px); margin: 8px auto 0; height: 46px; border-radius: 12px; background: var(--soft); font-weight: 600; }
#pins .block-head { display: grid; justify-items: center; text-align: center; padding: 4px 10px 14px; }
#pins .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; padding: 0 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; transition: transform .25s var(--ease); }
#pins .btn:active { transform: scale(.97); }
#pins .btn:disabled { background: var(--soft); color: var(--ink-2); cursor: default; transform: none; }
#pins .btn .ic { width: 18px; height: 18px; color: var(--gold-2); }
#pins .btn.ghost { width: auto; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
#pins .btn.danger { width: calc(100% - 20px); margin: 0 10px; background: var(--danger); }
#pins .fgroups { display: grid; gap: 16px; padding: 6px 10px 10px; }
#pins .fgroup h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
#pins .chips { display: flex; flex-wrap: wrap; gap: 6px; }
#pins .chip { flex: none; height: 32px; padding: 0 13px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--ink); transition: background .2s, box-shadow .2s, transform .25s var(--ease); }
#pins .chip:active { transform: scale(.94); }
#pins .chip.on { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); color: #7a5d2d; }
#pins .sheet-actions { display: flex; gap: 10px; padding: 8px 10px 0; }
#pins .sheet-actions .btn:last-child { flex: 1; }

/* ---- layers: detail, designer (a centred column on a wide screen) ---- */
#pins .layer { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #fff; opacity: 0; transform: translateY(20px); transition: opacity .3s, transform .45s var(--ease); }
@media (min-width: 700px) { #pins .layer { inset: 0 calc(50% - 280px); box-shadow: 0 0 0 100vmax rgba(31,43,48,.22); } #pins .art.hero { max-height: 60vh; } }
#pins .layer.in { opacity: 1; transform: none; }
#pins .layer-top { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px; pointer-events: none; }
#pins .layer-top > * { pointer-events: auto; }
#pins .round { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
#pins .layer .scroll { flex: 1; overflow-y: auto; touch-action: pan-y; scrollbar-width: none; }
#pins .art.hero { margin: 0; border-radius: 0 0 28px 28px; cursor: pointer; }
#pins .hint { margin: 8px 18px 0; font-size: 11px; color: var(--ink-3); }
#pins .eyebrow { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
#pins .detail-body { display: grid; gap: 12px; padding: 12px 18px 20px; }
#pins .detail-body .eyebrow { color: var(--gold); }
#pins .detail-body h2 { margin: -6px 0 0; font-size: 26px; letter-spacing: -.02em; }
#pins .detail-who { display: flex; align-items: center; justify-content: space-between; }
#pins .detail-who .who { font-size: 14px; color: var(--ink); font-weight: 600; gap: 10px; }
#pins .facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-block: 1px solid var(--line); }
#pins .facts div { padding: 10px 0; }
#pins .facts dt { font-size: 11px; color: var(--ink-3); }
#pins .facts dd { margin: 0; font-weight: 600; }
#pins .locknote { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); }
#pins .locknote > .ic { color: var(--gold); }
#pins .locknote > div { display: grid; font-size: 13px; }
#pins .locknote span { color: var(--ink-2); }
#pins .detail-actions { display: flex; align-items: center; gap: 4px; }
#pins .report { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
#pins .report .ic { width: 18px; height: 18px; }
#pins .fine { margin: 0; font-size: 11px; color: var(--ink-3); }
#pins .cta { padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); }
#pins .cta-note { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-2); text-align: center; }
#pins .designer-layer .scroll { padding-top: calc(62px + env(safe-area-inset-top, 0px)); }
#pins .d-head { display: grid; justify-items: center; gap: 4px; padding: 0 24px 20px; text-align: center; }
#pins .d-head .avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--gold-2); margin-bottom: 6px; }
#pins .d-head h2 { margin: 0; font-size: 22px; }
#pins .d-handle { font-size: 12px; color: var(--ink-3); }
#pins .d-head p { margin: 4px 0; color: var(--ink-2); font-size: 13px; }
#pins .d-stats { display: flex; gap: 18px; margin: 4px 0 8px; font-size: 13px; color: var(--ink-2); }
#pins .d-stats b { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { #pins *, #pins *::before, #pins *::after { transition: none !important; animation: none !important; } #pins .pin { opacity: 1; transform: none; } }
