/* =========================================================================
   BATALANTO — design system
   Black canvas, Clash Display caps, yellow #F4C600 / orange #EB6434 / white,
   pastel product-card fills. Phone first; iPad rail ≥760; desktop frame ≥1180.
   ========================================================================= */

:root {
  --bg: #000;
  --s1: #111;
  --s2: #1a1a1a;
  --s3: #262626;
  --s4: #333;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --text: #fff;
  --mut: #a3a3a3;
  --dim: #6b6b6b;
  --yellow: #F4C600;
  --orange: #EB6434;
  --orange2: #ff7a4a;
  --mint: #C6F5C0;
  --pink: #F3A8E6;
  --salmon: #FF8B66;
  --lilac: #C7B6FF;
  --sky: #9fd3ff;
  --grey: #3d3d3d;
  --canvas: #FFCD6B;
  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;
  --display: 'Clash Display', 'Arial Black', system-ui, sans-serif;
  --body: 'General Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--yellow); color: #000; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
h1, h2 { overflow-wrap: break-word; }
.d, h1, h2, h3, .h { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .005em; line-height: 1.02; margin: 0; }
h1, .h1 { font-size: clamp(34px, 9vw, 56px); }
h2, .h2 { font-size: clamp(22px, 5.4vw, 30px); }
h3, .h3 { font-size: 18px; }
.k { font-family: var(--display); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mut); }
.mut { color: var(--mut); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.spaced { letter-spacing: .32em; text-transform: uppercase; font-size: 11px; font-weight: 500; }
p { margin: 0 0 .8em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px; padding: 0 22px; border-radius: 16px;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .03em; text-transform: uppercase;
  background: var(--orange); color: #fff; transition: transform .18s var(--ease), background .2s, opacity .2s;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn:hover { background: var(--orange2); }
.btn:active { transform: scale(.98); }
.btn .ic { width: 20px; height: 20px; }
.btn.block { display: flex; width: 100%; }
.btn.center { justify-content: center; }
.btn.yellow { background: var(--yellow); color: #000; }
.btn.white { background: #fff; color: #000; }
.btn.dark { background: var(--s3); color: #fff; }
.btn.dark:hover { background: var(--s4); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.ghost:hover { background: var(--s2); }
.btn.sm { min-height: 42px; padding: 0 16px; font-size: 13px; border-radius: 12px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn .ghostword { position: absolute; right: -10px; bottom: -14px; font-size: 44px; opacity: .1; pointer-events: none; letter-spacing: 0; }

.icon-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--s3); color: #fff; position: relative; transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--s4); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.light { background: #fff; color: #000; }
.icon-btn.yellow { background: var(--yellow); color: #000; }
.icon-btn.orange { background: var(--orange); }
.icon-btn.sm { width: 38px; height: 38px; }
.icon-btn .ic { width: 20px; height: 20px; }
.badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: var(--orange); color: #fff; font: 600 11px/19px var(--body); text-align: center; box-shadow: 0 0 0 3px var(--bg);
}
.badge:empty, .badge[data-n="0"] { display: none; }

.ic { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 99px;
  background: var(--s2); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s;
  box-shadow: inset 0 0 0 1px var(--line);
}
button.chip:hover { background: var(--s3); }
.chip.on { background: #fff; color: #000; box-shadow: none; }
.chip.yellow { background: var(--yellow); color: #000; box-shadow: none; }
.chip.orange { background: var(--orange); color: #fff; box-shadow: none; }
.chip .ic { width: 15px; height: 15px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px;
  background: #fff; color: #000; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill.dark { background: rgba(0, 0, 0, .78); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill.yellow { background: var(--yellow); color: #000; }
.pill.orange { background: var(--orange); color: #fff; }
.pill .star { color: var(--yellow); }
.price { background: #000; color: #fff; font: 600 13px var(--display); letter-spacing: .06em; padding: 7px 12px; border-radius: 10px; white-space: nowrap; }

.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.stack.lg { gap: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.scroller { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x proximity; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
hr.sep { border: 0; height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Avatars ---------- */
.av {
  --size: 44px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; position: relative;
  display: grid; place-items: center; overflow: visible; background: var(--av, var(--s3));
  font: 600 calc(var(--size) * .36) / 1 var(--display); color: #000; text-transform: uppercase;
}
.av img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.av.sq { border-radius: 30%; }
.av .dot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; background: #3ee07a; box-shadow: 0 0 0 2.5px var(--bg); }
.av-stack { display: flex; }
.av-stack .av { --size: 30px; box-shadow: 0 0 0 2.5px var(--ring, #000); margin-left: -9px; }
.av-stack .av:first-child { margin-left: 0; }
.av-stack .more { --size: 30px; background: #fff; color: #000; font-size: 11px; }

/* ---------- Fields ---------- */
.field { display: grid; gap: 7px; }
.field > span, .label { font-family: var(--display); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mut); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 15px 16px; border-radius: 14px; border: 1.5px solid var(--line2);
  background: var(--s1); color: #fff; font-size: 16px; outline: none; transition: border-color .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea, textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--yellow); background: #0c0c0c; }
.input::placeholder, .field ::placeholder { color: #5f5f5f; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.field .hint { font-size: 12px; color: var(--dim); }
.form-grid { display: grid; gap: 14px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--s4); position: relative; flex: none; transition: background .2s; cursor: pointer; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle input:checked { background: var(--orange); }
.toggle input:checked::after { transform: translateX(20px); }
.seg { display: flex; padding: 5px; border-radius: 16px; background: var(--s2); gap: 4px; }
.seg button { flex: 1; min-height: 44px; border-radius: 12px; font: 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--mut); transition: background .2s, color .2s; }
.seg button.on { background: #fff; color: #000; }
.pin-boxes { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.pin-boxes i { aspect-ratio: .82; border-radius: 12px; background: var(--s1); box-shadow: inset 0 0 0 1.5px var(--line2); display: grid; place-items: center; font: 600 22px var(--display); font-style: normal; transition: box-shadow .2s; }
.pin-boxes i.f { box-shadow: inset 0 0 0 1.5px #fff; }
.pin-boxes i.c { box-shadow: inset 0 0 0 2px var(--yellow); }
.pin-boxes input { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; letter-spacing: 2em; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.2); transition: transform .15s; }
.swatches button.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #fff; }
.err { color: #ff8a7a; font-size: 14px; }

/* ---------- Cards ---------- */
.card { background: var(--s1); border-radius: var(--r-lg); padding: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 24px; }
.ghost-word {
  position: absolute; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 54px; line-height: .8;
  color: rgba(255, 255, 255, .07); pointer-events: none; white-space: nowrap; letter-spacing: -.01em;
}
.c-orange { background: var(--orange); color: #fff; }
.c-yellow { background: var(--yellow); color: #000; }
.c-mint { background: var(--mint); color: #000; }
.c-pink { background: var(--pink); color: #000; }
.c-lilac { background: var(--lilac); color: #000; }
.c-grey { background: var(--grey); color: #fff; }
.c-salmon { background: var(--salmon); color: #000; }
.c-sky { background: var(--sky); color: #000; }
.c-yellow .ghost-word, .c-mint .ghost-word, .c-pink .ghost-word, .c-lilac .ghost-word, .c-salmon .ghost-word, .c-sky .ghost-word { color: rgba(0, 0, 0, .08); }

/* Category tiles (Popular / Trending style) */
.tiles { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x mandatory; }
.tiles::-webkit-scrollbar { display: none; }
.tile {
  flex: none; width: min(46vw, 210px); aspect-ratio: 1 / .98; border-radius: var(--r-md); padding: 16px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; scroll-snap-align: start; transition: transform .2s var(--ease);
}
.tile:active { transform: scale(.97); }
.tile .t { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 17px; line-height: 1.12; position: relative; z-index: 1; }
.tile .n { font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1; position: relative; z-index: 1; }
.tile .arrow { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; z-index: 1; }
.tile .ghost-word { left: 34%; top: 46%; }

/* ---------- Shell ---------- */
#app { min-height: 100dvh; }
.side, .tabbar, .topbar { display: none; }
body.authed .tabbar, body.authed .topbar { display: flex; }

.main { min-width: 0; }
.view { padding: 8px 16px calc(var(--tabbar-h) + 34px + var(--safe-b)); max-width: 1180px; margin: 0 auto; animation: viewIn .38s var(--ease); overflow-x: clip; }
body:not(.authed) .view { padding: 0; max-width: none; animation: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.topbar {
  position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: linear-gradient(#000 70%, rgba(0, 0, 0, 0));
}
.topbar .title { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; text-align: center; flex: 1; min-width: 0; }
.topbar .title.brand { letter-spacing: .14em; font-size: 17px; }
.topbar .title.root:not(.brand) { visibility: hidden; }
@media (min-width: 760px) { .topbar .title.brand { visibility: hidden; } }

.tabbar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
  height: var(--tabbar-h); border-radius: 26px; padding: 0 8px; align-items: center; justify-content: space-around;
  background: rgba(22, 22, 22, .86); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.tabbar a {
  flex: 1; height: 58px; border-radius: 19px; display: grid; place-items: center; align-content: center; gap: 3px;
  color: #8d8d8d; font: 600 9.5px var(--display); letter-spacing: .12em; text-transform: uppercase; position: relative; transition: color .2s, background .25s;
}
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a.on { color: #000; background: var(--yellow); }
.tabbar a .badge { top: 4px; right: calc(50% - 22px); box-shadow: 0 0 0 3px #161616; }
body.kb .tabbar, body.thread-open .tabbar { display: none; }

/* Page header (inside views) */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 6px 0 20px; }
.ph h1 { font-size: clamp(32px, 9vw, 48px); }
.ph .sub { color: var(--mut); margin-top: 6px; font-size: 15px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; gap: 12px; }
.sec-h h2 { font-size: 20px; }
.sec-h a, .sec-h button.link { font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.empty { text-align: center; padding: 42px 20px; border-radius: var(--r-lg); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--mut); }
.empty .h { color: #fff; font-size: 18px; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }

/* ---------- Feed ---------- */
.composer-cta { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); width: 100%; text-align: left; }
.composer-cta .ph-text { flex: 1; color: var(--dim); }
.feed { display: grid; gap: 14px; }
.post { background: var(--s1); border-radius: var(--r-lg); padding: 16px; box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.post-head .name { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; }
.post-head .meta { color: var(--dim); font-size: 12.5px; }
.post-body { white-space: pre-wrap; word-wrap: break-word; font-size: 16px; line-height: 1.55; }
.post-body.big { font-family: var(--display); font-weight: 500; font-size: 23px; line-height: 1.2; }
.post-media { display: grid; gap: 6px; margin: 12px -4px 0; border-radius: 20px; overflow: hidden; }
.post-media.n2 { grid-template-columns: 1fr 1fr; }
.post-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media.n3 > :first-child { grid-row: span 2; }
.post-media.n4 { grid-template-columns: 1fr 1fr; }
.post-media button { position: relative; overflow: hidden; background: var(--s2); border-radius: 0; }
.post-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; max-height: 560px; transition: transform .5s var(--ease); }
.post-media.n1 img { max-height: 620px; }
.post-media:not(.n1) img { aspect-ratio: 1; }
.post-media button:hover img { transform: scale(1.03); }
.post-project { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 18px; position: relative; overflow: hidden; }
.post-project .h { font-size: 18px; }
.post-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.react-btn { height: 36px; padding: 0 11px; border-radius: 99px; background: var(--s2); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; transition: background .2s, transform .15s; }
.react-btn:hover { background: var(--s3); }
.react-btn.on { background: var(--yellow); color: #000; }
.react-btn:active { transform: scale(.92); }
.react-btn b { font-weight: 600; font-size: 13px; }
.react-pick { display: flex; gap: 4px; padding: 5px; border-radius: 99px; background: #fff; position: absolute; z-index: 5; box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: pop .22s var(--ease); }
.react-pick button { width: 42px; height: 42px; border-radius: 50%; font-size: 24px; transition: transform .15s, background .15s; }
.react-pick button:hover { transform: scale(1.18); background: #f2f2f2; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(6px); } to { opacity: 1; transform: none; } }
.comments { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--s2); padding: 10px 14px; border-radius: 4px 18px 18px 18px; flex: 1; min-width: 0; }
.comment .bubble b { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 12.5px; letter-spacing: .04em; margin-right: 6px; }
.comment-form { display: flex; gap: 8px; align-items: center; }
.comment-form .input { min-height: 46px; padding: 11px 16px; border-radius: 99px; }
.more-btn { position: absolute; top: 12px; right: 12px; }

/* ---------- Product-style cards (projects, people) ---------- */
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr; }
.pcard {
  border-radius: var(--r-lg); padding: 18px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  min-height: 220px; transition: transform .25s var(--ease); isolation: isolate;
}
.pcard:hover { transform: translateY(-3px); }
.pcard .ghost-word { right: -8px; bottom: 54px; font-size: 64px; }
.pcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pcard .title { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 24px; line-height: 1.04; margin-top: auto; }
.pcard .client { font-size: 14px; opacity: .75; margin-top: -6px; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .go { width: 46px; height: 46px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; flex: none; }
.pcard.c-grey .go, .pcard.c-orange .go { background: #fff; color: #000; }
.progress { height: 6px; border-radius: 99px; background: rgba(0, 0, 0, .15); overflow: hidden; }
.c-grey .progress, .c-orange .progress, .card .progress { background: rgba(255, 255, 255, .16); }
.progress i { display: block; height: 100%; background: currentColor; border-radius: inherit; transition: width .4s var(--ease); }

.mcard { border-radius: var(--r-lg); overflow: hidden; position: relative; background: var(--s2); aspect-ratio: .78; display: block; isolation: isolate; transition: transform .25s var(--ease); }
.mcard:hover { transform: translateY(-3px); }
.mcard .photo { position: absolute; inset: 0; }
.mcard .photo img { width: 100%; height: 100%; object-fit: cover; }
.mcard .initials { position: absolute; inset: 0; display: grid; place-items: center; font: 600 64px var(--display); color: rgba(0,0,0,.75); }
.mcard .shade { position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.mcard .info { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.mcard .nm { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 17px; line-height: 1.05; }
.mcard .hl { font-size: 12.5px; color: rgba(255, 255, 255, .78); margin-top: 3px; }
.mcard .tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }

/* ---------- Detail pages ---------- */
.hero-detail { display: grid; gap: 16px; }
.hero-detail > .col { display: grid; gap: 16px; min-width: 0; align-content: start; }
.hero-detail > .col > * { min-width: 0; }
.hero-panel { border-radius: var(--r-xl); padding: 20px; position: relative; overflow: hidden; min-height: 260px; display: flex; flex-direction: column; isolation: isolate; }
.hero-panel .ghost-word { font-size: 110px; right: -14px; bottom: -14px; }
.hero-panel h1 { font-size: clamp(32px, 8vw, 52px); margin-top: auto; padding-top: 30px; position: relative; }
.info-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-block { border-radius: 16px; padding: 14px; min-height: 76px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.info-block .label { color: inherit; opacity: .7; }
.info-block .v { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 16px; line-height: 1.1; }
.info-block.c-yellow .label { color: #000; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.task .check { width: 28px; height: 28px; border-radius: 9px; box-shadow: inset 0 0 0 2px var(--line2); display: grid; place-items: center; flex: none; transition: background .2s; }
.task.done .check { background: var(--yellow); color: #000; box-shadow: none; }
.task.done .t { text-decoration: line-through; color: var(--dim); }
.crew-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.crew-row + .crew-row { border-top: 1px solid var(--line); }
.sticky-cta { position: sticky; bottom: calc(var(--tabbar-h) + 22px + var(--safe-b)); z-index: 5; margin-top: 18px; }
.sticky-cta .btn { box-shadow: 0 16px 36px rgba(0, 0, 0, .55); }

.person-hero { border-radius: var(--r-xl); overflow: hidden; position: relative; aspect-ratio: 1 / 1.05; background: var(--s2); max-height: 560px; width: 100%; }
.person-hero img { width: 100%; height: 100%; object-fit: cover; }
.person-hero .initials { position: absolute; inset: 0; display: grid; place-items: center; font: 600 120px var(--display); color: rgba(0,0,0,.72); }
.person-hero .tl { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.thumbs .th { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; text-align: center; padding: 10px; }
.thumbs .th b { font: 600 26px var(--display); display: block; }
.thumbs .th span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }

/* ---------- Events ---------- */
.ev { display: flex; gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); align-items: center; width: 100%; text-align: left; transition: background .2s; }
.ev:hover { background: #151515; }
.datebox { width: 64px; height: 70px; border-radius: 16px; background: var(--yellow); color: #000; display: grid; place-items: center; align-content: center; flex: none; }
.datebox b { font: 600 28px/1 var(--display); }
.datebox span { font: 600 10px var(--display); letter-spacing: .14em; text-transform: uppercase; }
.datebox.orange { background: var(--orange); color: #fff; }
.datebox.pink { background: var(--pink); }
.datebox.mint { background: var(--mint); }
.ev .t { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 17px; line-height: 1.1; }
.ev .m { color: var(--mut); font-size: 13.5px; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.ev .m span { display: inline-flex; align-items: center; gap: 4px; }
.ev .m .ic { width: 14px; height: 14px; }
.month-h { font: 600 12px var(--display); letter-spacing: .2em; color: var(--mut); text-transform: uppercase; margin: 22px 0 10px; }

/* ---------- Chat ---------- */
.chat-wrap { display: grid; }
.chat-list { display: grid; gap: 4px; min-width: 0; }
.chat-list > *, .split > *, .feed > *, .grid > *, .stack > * { min-width: 0; }
.thread-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; transition: background .2s; width: 100%; text-align: left; }
.thread-row:hover, .thread-row.on { background: var(--s1); }
.thread-row .grow .row { min-width: 0; gap: 8px; }
.thread-row .grow .row > :first-child { min-width: 0; flex: 1; }
.thread-row .t { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 15px; letter-spacing: .02em; }
.thread-row .l { color: var(--mut); font-size: 14px; }
.thread-row.unread .l { color: #fff; font-weight: 500; }
.thread-row .time { font-size: 12px; color: var(--dim); }
.thread-row .count { background: var(--orange); color: #fff; min-width: 22px; height: 22px; border-radius: 99px; font: 600 12px/22px var(--body); text-align: center; padding: 0 6px; }
.av-group { position: relative; width: 50px; height: 50px; flex: none; }
.av-group .av { --size: 34px; position: absolute; box-shadow: 0 0 0 2.5px var(--bg); }
.av-group .av:first-child { top: 0; left: 0; }
.av-group .av:last-child { right: 0; bottom: 0; }

.thread { display: flex; flex-direction: column; height: calc(100dvh - 0px); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 14px 10px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 3; }
.thread-head .t { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 16px; }
.thread-head .s { font-size: 12.5px; color: var(--mut); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.msg { max-width: min(78%, 520px); padding: 10px 14px; border-radius: 20px; background: var(--s2); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; line-height: 1.42; font-size: 15.5px; position: relative; }
.msg.mine { align-self: flex-end; background: var(--orange); color: #fff; }
.msg.mine + .msg.mine, .msg.theirs + .msg.theirs { margin-top: -1px; }
.msg.img { padding: 4px; background: var(--s2); }
.msg.img img { border-radius: 16px; max-height: 340px; width: auto; }
.msg.img .cap { padding: 6px 10px 4px; }
.msg-from { font: 600 11px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); margin: 10px 0 3px 4px; }
.msg-day { align-self: center; font: 600 10.5px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 14px 0 8px; }
.msg-time { align-self: flex-end; font-size: 11px; color: var(--dim); margin: 2px 4px 6px; }
.msg-time.l { align-self: flex-start; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: #000; }
.chat-compose textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; padding: 12px 16px; border-radius: 23px; background: var(--s2); border: 0; outline: none; line-height: 1.4; font-size: 16px; }
.chat-compose .icon-btn { width: 46px; height: 46px; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--mut); text-align: center; padding: 30px; }

/* ---------- Sheet / modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #0f0f0f; border-radius: 30px 30px 0 0; padding: 10px 18px calc(22px + var(--safe-b));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255,255,255,.08); animation: sheetUp .38s var(--ease);
}
.sheet.closing { animation: sheetDown .25s ease forwards; }
.scrim.closing { animation: fade .25s reverse forwards; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--s4); margin: 0 auto 14px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-h h2 { font-size: 24px; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.94); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.lightbox img { max-height: 92dvh; border-radius: 18px; }
.lightbox .icon-btn { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-grid a, .menu-grid button { aspect-ratio: 1; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; position: relative; overflow: hidden; }
.menu-grid .ic { width: 26px; height: 26px; }
.menu-grid span { font: 600 12.5px var(--display); letter-spacing: .06em; text-transform: uppercase; }

.list { display: grid; min-width: 0; }
.list > * { min-width: 0; }
.list > a, .list > button, .list > .li { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.list > :last-child { border-bottom: 0; }
.list .li-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--s2); display: grid; place-items: center; flex: none; }
.list .t { font-weight: 500; }
.list .s { font-size: 13px; color: var(--mut); }

/* Toast */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); top: calc(14px + var(--safe-t)); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #fff; color: #000; padding: 13px 18px; border-radius: 16px; font-weight: 500; box-shadow: 0 14px 34px rgba(0,0,0,.4); animation: toastIn .35s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--orange); color: #fff; }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

.skel { background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--r-lg); }
@keyframes sk { to { background-position: -200% 0; } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--s3); border-top-color: var(--yellow); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Member pass (Bauhaus card) ---------- */
.pass { border-radius: 24px; overflow: hidden; display: grid; grid-template-columns: 1fr 74px; background: #000; box-shadow: inset 0 0 0 1px var(--line2); aspect-ratio: 1.62; position: relative; }
.pass svg { width: 100%; height: 100%; display: block; }
.pass .num { background: #000; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font: 600 20px var(--display); letter-spacing: .1em; color: #fff; }
.pass .who { position: absolute; left: 16px; bottom: 14px; background: #000; color: #fff; padding: 8px 12px; border-radius: 12px; }
.pass .who b { font: 600 15px var(--display); text-transform: uppercase; display: block; letter-spacing: .04em; }
.pass .who span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }

/* =========================================================================
   PUBLIC (logged out)
   ========================================================================= */
.pub { min-height: 100dvh; background: #000; overflow-x: clip; }
.pub-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 12px; background: linear-gradient(#000 60%, transparent); }
.wordmark { font: 700 18px var(--display); letter-spacing: .2em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; }
.wordmark i { width: 26px; height: 26px; border-radius: 8px; background: var(--yellow); display: grid; place-items: center; font-style: normal; color: #000; font-size: 15px; letter-spacing: 0; }
.pub-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 18px 0 30px; display: grid; gap: 26px; }
.hero h1 { font-size: clamp(48px, 16.4vw, 150px); line-height: .9; letter-spacing: -.01em; font-weight: 700; }
.textured {
  background:
    radial-gradient(circle at 12% 30%, #e8344a 0 18%, transparent 19%),
    radial-gradient(circle at 34% 64%, #EB6434 0 14%, transparent 15%),
    radial-gradient(circle at 64% 34%, #a6a37a 0 16%, transparent 17%),
    radial-gradient(circle at 88% 70%, #F4C600 0 13%, transparent 14%),
    repeating-linear-gradient(115deg, #dcdcdc 0 3px, #bdbdbd 3px 5px, #efefef 5px 9px);
  background-size: 220% 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: tex 18s ease-in-out infinite alternate;
}
.textured.t2 { background-position: 40% 10%; animation-delay: -6s; }
.textured.t3 { background-position: 80% 60%; animation-delay: -12s; }
@keyframes tex { to { background-position: 100% 100%; } }
.hero .lede { font-size: 18px; color: #cfcfcf; max-width: 520px; line-height: 1.5; }
.hero .ctas { display: grid; gap: 10px; }
.collage { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 1 / 1.05; background: #111; }
.collage svg { width: 100%; height: 100%; display: block; }
.collage .stamp { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .collage .spin { animation: spin 40s linear infinite; transform-origin: center; transform-box: fill-box; }
  .collage .bob { animation: bob 6s ease-in-out infinite; transform-box: fill-box; }
  .collage .bob2 { animation: bob 7s ease-in-out infinite reverse; transform-box: fill-box; }
}
@keyframes bob { 50% { transform: translateY(-10px); } }
.pub-sec { padding: 46px 0 10px; }
.pub-sec > .k { display: block; margin-bottom: 10px; color: var(--yellow); }
.pub-sec h2 { font-size: clamp(32px, 8.4vw, 64px); max-width: 900px; }
.pub-sec .intro { color: var(--mut); max-width: 620px; margin: 14px 0 26px; font-size: 17px; }
.svc-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.svc { border-radius: var(--r-lg); padding: 14px; position: relative; overflow: hidden; aspect-ratio: .86; display: flex; flex-direction: column; justify-content: space-between; color: #000; isolation: isolate; }
.svc svg.art { position: absolute; inset: 14% 10% 26%; width: 80%; height: 60%; z-index: -1; }
.svc .lbl { font: 600 15px var(--display); text-transform: uppercase; line-height: 1.05; }
.svc .top { display: flex; justify-content: space-between; align-items: center; }
.steps { display: grid; gap: 12px; }
.step { border-radius: var(--r-lg); background: var(--s1); padding: 22px; box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.step .no { font: 700 64px/1 var(--display); color: var(--yellow); }
.step h3 { font-size: 22px; margin: 14px 0 8px; }
.step p { color: var(--mut); margin: 0; }
.brief { border-radius: var(--r-xl); background: var(--s1); padding: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choose .blk { border-radius: 16px; padding: 14px; min-height: 76px; font: 600 14px/1.12 var(--display); text-transform: uppercase; display: flex; align-items: flex-end; }
.choose select { width: 100%; height: 44px; margin-top: 8px; border-radius: 10px; border: 1.5px solid var(--line2); background: #000; padding: 0 34px 0 12px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.pub-foot { padding: 50px 0 calc(40px + var(--safe-b)); color: var(--dim); font-size: 14px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 60px; }
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 14px 0; margin: 10px 0 0; }
.marquee div { display: flex; gap: 40px; width: max-content; animation: mq 28s linear infinite; font: 600 22px var(--display); text-transform: uppercase; letter-spacing: .04em; color: #2c2c2c; }
.marquee b { color: var(--yellow); font-weight: 600; }
@keyframes mq { to { transform: translateX(-50%); } }

.auth { min-height: 100dvh; display: grid; padding: calc(16px + var(--safe-t)) 16px calc(24px + var(--safe-b)); max-width: 520px; margin: 0 auto; align-content: start; gap: 22px; }
.auth h1 { font-size: clamp(46px, 13vw, 76px); line-height: .92; font-weight: 700; margin-top: 18px; }
.auth .note { color: var(--dim); font-size: 14px; text-align: center; }
.sent-card { border-radius: var(--r-xl); padding: 26px; background: var(--yellow); color: #000; display: grid; gap: 10px; }
.sent-card h2 { font-size: 28px; }

/* =========================================================================
   iPad — ≥760px : icon rail, 2-up grids, split views
   ========================================================================= */
@media (min-width: 760px) {
  :root { --tabbar-h: 0px; }
  body.authed .tabbar { display: none; }
  body.authed #app { display: grid; grid-template-columns: 92px minmax(0, 1fr); }
  body.authed .side {
    display: flex; flex-direction: column; align-items: center; gap: 6px; position: sticky; top: 0; height: 100dvh;
    padding: calc(18px + var(--safe-t)) 0 18px; border-right: 1px solid var(--line); background: #000; z-index: 20;
  }
  .side .logo { flex: none; width: 48px; height: 48px; border-radius: 16px; background: var(--yellow); color: #000; display: grid; place-items: center; font: 700 22px var(--display); margin-bottom: 18px; }
  .side nav { display: grid; gap: 6px; }
  .side a.nav {
    width: 68px; height: 64px; border-radius: 20px; display: grid; place-items: center; align-content: center; gap: 4px; color: #8a8a8a;
    font: 600 9.5px var(--display); letter-spacing: .1em; text-transform: uppercase; position: relative; transition: background .2s, color .2s;
  }
  .side a.nav:hover { background: var(--s1); color: #fff; }
  .side a.nav.on { background: var(--yellow); color: #000; }
  .side a.nav .badge { top: 6px; right: 10px; }
  .side .lbl-full { display: none; }
  .side .side-foot { margin-top: auto; display: grid; gap: 10px; justify-items: center; }
  .side .side-card { display: none; }
  .topbar { padding: calc(14px + var(--safe-t)) 28px 12px; }
  .topbar .title { text-align: left; font-size: 22px; }
  .topbar #menuBtn { display: none; }
  .view { padding: 6px 28px 60px; }
  .ph h1 { font-size: 52px; }
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.people { grid-template-columns: repeat(3, 1fr); }
  .tiles { margin: 0; padding: 2px 0 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .tile { width: auto; }
  .scroller { margin: 0; padding: 0; }
  .sticky-cta { bottom: 18px; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(620px, 92vw); max-height: 88dvh; transform: translate(-50%, -50%); border-radius: 30px; animation: modalIn .32s var(--ease); padding: 22px 26px 26px; }
  .sheet.closing { animation: modalOut .2s ease forwards; }
  .sheet .grab { display: none; }
  @keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
  @keyframes modalOut { to { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
  .menu-grid { grid-template-columns: repeat(4, 1fr); }

  .split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; height: calc(100dvh - 76px - var(--safe-t)); margin: 0 -28px -60px; border-top: 1px solid var(--line); }
  .split > .pane-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 12px; }
  .split > .pane-main { min-width: 0; display: flex; flex-direction: column; }
  .split .thread { height: 100%; }
  .split .thread-head { padding-top: 12px; }
  .split .back-btn { display: none; }
  .split .chat-compose { padding-bottom: 14px; }
  body.thread-open .topbar { display: flex; }

  .hero-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; align-items: start; }
  .hero-detail > .col { display: grid; gap: 18px; min-width: 0; }
  .person-hero { aspect-ratio: .9; }

  /* public */
  .pub-nav { padding: 18px 28px; }
  .pub-wrap { padding: 0 28px; }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; padding: 30px 0 40px; gap: 40px; }
  .hero h1 { font-size: clamp(60px, 7.4vw, 124px); }
  .svc { aspect-ratio: 1.12; }
  .hero .ctas { grid-template-columns: auto auto; justify-content: start; }
  .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .brief { padding: 30px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; }
  .auth { padding-top: 60px; }
}

/* iPad portrait: chat list collapses when a thread is open */
@media (min-width: 760px) and (max-width: 979px) {
  .split { grid-template-columns: 280px minmax(0, 1fr); }
  .grid.people { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   Desktop — ≥1180px : full sidebar, yellow canvas frame, right rail
   ========================================================================= */
@media (min-width: 1180px) {
  html, body.authed { background: var(--canvas); }
  body.authed #app {
    grid-template-columns: 272px minmax(0, 1fr); margin: 14px; min-height: calc(100dvh - 28px);
    background: #000; border-radius: 34px; overflow: clip; box-shadow: 0 30px 80px rgba(80, 50, 0, .25);
  }
  body.authed .side { align-items: stretch; padding: 26px 18px 20px; height: calc(100dvh - 28px); border-right: 1px solid var(--line); }
  .side .logo-row { display: flex; align-items: center; gap: 12px; margin: 0 8px 26px; }
  .side .logo { margin: 0; }
  .side .lbl-full { display: block; }
  .side .wordmark-s { font: 700 17px var(--display); letter-spacing: .2em; }
  .side a.nav { width: 100%; height: 46px; grid-template-columns: 24px 1fr auto; place-items: center start; padding: 0 16px; gap: 14px; font-size: 13px; letter-spacing: .08em; border-radius: 16px; }
  .side a.nav .badge { position: static; box-shadow: none; }
  .side .lbl-short { display: none; }
  .side .side-card { display: block; border-radius: 22px; padding: 16px; position: relative; overflow: hidden; margin-top: 18px; }
  .side .side-foot { justify-items: stretch; }
  .side .me-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 18px; }
  .side .me-row:hover { background: var(--s1); }
  .topbar { padding: 22px 36px 12px; background: linear-gradient(#000 75%, rgba(0,0,0,0)); }
  .view { padding: 6px 36px 60px; max-width: 1240px; }
  .split { margin: 0 -36px -60px; height: calc(100dvh - 28px - 82px); grid-template-columns: 360px minmax(0, 1fr); border-radius: 0 0 34px 0; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
  .home-grid .rail { position: sticky; top: 90px; display: grid; gap: 16px; }
  .grid.people { grid-template-columns: repeat(4, 1fr); }
  .grid.projects { grid-template-columns: repeat(3, 1fr); }
  .hero-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }

  html:has(body:not(.authed)), body:not(.authed) { background: #000; }
  .pub-wrap { padding: 0 40px; }
  .pub-nav { padding: 22px 40px; }
}
@media (min-width: 760px) and (max-width: 1179px) {
  .home-grid .rail { display: none; }
  .grid.projects { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 759px) {
  .home-grid .rail { display: none; }
  .hide-phone { display: none !important; }
  .grid.people { grid-template-columns: 1fr 1fr; gap: 10px; }
  .split { display: block; }
  .split.has-thread > .pane-list { display: none; }
  .split:not(.has-thread) > .pane-main { display: none; }
  body.thread-open .topbar { display: none; }
  body.thread-open .view { padding: 0; }
  .thread { height: 100dvh; }
}
@media (min-width: 760px) { .hide-tablet-up { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* iPad landscape / small laptops: tighter chrome, 2×2 tiles next to the rail */
@media (min-width: 1180px) and (max-width: 1399px) {
  body.authed #app { grid-template-columns: 236px minmax(0, 1fr); }
  .home-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; }
  .home-grid .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid .tile { aspect-ratio: 2.1; }
  .view { padding-left: 28px; padding-right: 28px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .split { margin: 0 -28px -60px; grid-template-columns: 320px minmax(0, 1fr); }
  .grid.people { grid-template-columns: repeat(3, 1fr); }
  .grid.projects { grid-template-columns: repeat(2, 1fr); }
}

/* Public homepage: Dwarsblik stream + inspiration */
.dw { border-radius: var(--r-lg); padding: 18px; min-height: 170px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; isolation: isolate; transition: transform .25s var(--ease); }
.dw:hover { transform: translateY(-3px); }
.dw .pill { align-self: flex-start; }
.dw .dw-t { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.12; margin-top: auto; padding-right: 54px; text-transform: none; }
.dw .ghost-word { right: -6px; top: 10px; font-size: 70px; }
.dw .go { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; }
.dw.c-grey .go, .dw.c-orange .go { background: #fff; color: #000; }
.insp { flex: none; width: min(70vw, 280px); border-radius: var(--r-lg); overflow: hidden; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); display: grid; scroll-snap-align: start; }
.insp img { width: 100%; aspect-ratio: 1.4; object-fit: cover; }
.insp .insp-t { font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.2; padding: 14px 14px 4px; }
.insp .small { padding: 0 14px 14px; }
@media (min-width: 760px) { .tiles .insp { width: auto; } #inspTiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .dw-grid { grid-template-columns: repeat(3, 1fr) !important; } }

/* ---------- News reader ---------- */
.news-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.news-grid > * { min-width: 0; }
.news { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: opacity .2s; }
.news.read { opacity: .6; }
.news-img img { width: 100%; aspect-ratio: 1.8; object-fit: cover; background: var(--s2); }
.news-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-src { font: 600 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.news-t { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.2; }
.news-t:hover { text-decoration: underline; text-decoration-color: var(--yellow); }
.news-s { color: var(--mut); font-size: 14.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
details summary::-webkit-details-marker { color: var(--yellow); }

/* ---------- Prompt hub ---------- */
.prompt-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.prompt-grid > * { min-width: 0; }
.prompt-card { text-align: left; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-lg); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); min-height: 190px; transition: background .2s, transform .2s var(--ease); }
.prompt-card:hover { background: #161616; transform: translateY(-2px); }
.prompt-card .pt { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 18px; line-height: 1.1; }
.prompt-card .ps { color: var(--mut); font-size: 14px; }
.prompt-pre { white-space: pre-wrap; word-wrap: break-word; background: #050505; box-shadow: inset 0 0 0 1px var(--line2); border-radius: 16px; padding: 16px; font: 14.5px/1.55 var(--body); max-height: 42vh; overflow: auto; margin: 0; }
.prompt-pre .var { background: rgba(244, 198, 0, .16); color: var(--yellow); border-radius: 6px; padding: 0 4px; }
.prompt-pre mark { background: var(--yellow); color: #000; border-radius: 6px; padding: 0 4px; }

/* ---------- SOS ---------- */
.sos-112 { border-radius: 18px; padding: 14px 16px; background: rgba(235, 100, 52, .14); box-shadow: inset 0 0 0 1px rgba(235, 100, 52, .5); margin-bottom: 16px; font-size: 14.5px; }
.sos-112 a { color: var(--orange2); font-weight: 600; text-decoration: underline; }
.sos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sos { border-radius: var(--r-lg); padding: 18px; min-height: 140px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; text-align: left; transition: transform .15s var(--ease); }
.sos:active { transform: scale(.97); }
.sos-e { font-size: 34px; margin-bottom: auto; }
.sos-t { font: 600 22px var(--display); text-transform: uppercase; }
.alert-card.urgent { box-shadow: inset 0 0 0 2px var(--orange); }
.alert-banner { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(10px + var(--safe-t)); padding: 14px 18px; border-radius: 18px; background: var(--orange); color: #fff; font-weight: 600; display: flex; gap: 10px; align-items: center; box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: toastIn .35s var(--ease); }

@media (min-width: 760px) {
  .news-grid, .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sos-grid { grid-template-columns: repeat(4, 1fr); }
  .alert-banner { left: auto; right: 24px; max-width: 420px; }
}
@media (min-width: 1180px) { .news-grid, .prompt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
