:root {
  --cream: #fffbf5; --bg: #f6efe4; --sand: #e7dacb; --sand-2: #e4d6c2; --peach: #f4cdb4; --brand: #d6d3cd;
  --terra: #a64b2a; --terra-dark: #8a3c1f; --sage: #8b9a7a; --sage-soft: #e3e8dc; --brown: #6f5c50; --ink: #3a2a22;
  --muted: #7d6e63; --line: #eadfce; --card: #ffffff; --danger: #a33a3a; --warn: #a4562a;
  --radius: 18px; --radius-sm: 12px; --shadow: 0 1px 2px rgba(58,42,34,.04), 0 8px 24px rgba(58,42,34,.06);
  --serif: 'Fraunces', Georgia, serif; --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--terra); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 21px; margin: 30px 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.muted { color: var(--muted); } small { font-size: 13px; }
.warn { color: var(--warn); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--terra); margin: 0 0 6px; }

/* ---------- header and navigation ---------- */
header.top { display: flex; align-items: center; gap: 18px; padding: 12px 22px; background: rgba(255,251,245,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand i { width: 10px; height: 10px; border-radius: 50%; background: var(--terra); display: inline-block; }
nav.desk { display: flex; gap: 4px; flex: 1; margin-left: 10px; }
nav.desk a { padding: 8px 16px; border-radius: 99px; color: var(--brown); text-decoration: none; font-weight: 500; transition: background .15s; }
nav.desk a:hover { background: var(--sand); }
nav.desk a.on { background: var(--ink); color: var(--cream); }
.who { position: relative; margin-left: auto; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--peach); color: var(--terra-dark); font: 700 16px var(--serif); cursor: pointer; display: grid; place-items: center; }
.menu { position: absolute; right: 0; top: 48px; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px; display: none; }
.menu.open { display: block; animation: pop .15s ease; }
.menu small { display: block; padding: 8px 10px; color: var(--muted); word-break: break-all; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 11px 10px; border: 0; background: none; font: inherit; color: var(--ink); border-radius: 8px; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }
nav.tabbar { display: none; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 22px 90px; }
.content { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- page heads, hero, tiles ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 0; }
.hero { background: var(--ink); color: var(--cream); border-radius: 24px; padding: 26px 26px 24px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -50px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--terra); opacity: .5; }
.hero::before { content: ''; position: absolute; right: 70px; bottom: -70px; width: 140px; height: 140px; border-radius: 50%; background: var(--sage); opacity: .45; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 34px; margin: 0 0 6px; } .hero p { margin: 0; color: #e7dacb; max-width: 440px; }
.hero .btn { margin-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.tile { border-radius: var(--radius); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font: 600 36px/1.1 var(--serif); } .tile span { font-size: 13px; color: var(--brown); }
.tile.t1 { background: var(--peach); } .tile.t2 { background: var(--sage-soft); } .tile.t3 { background: var(--sand); } .tile.t4 { background: #f1e9c9; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 14px; display: block; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
a.card.link { transition: transform .15s, box-shadow .15s; }
a.card.link:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(58,42,34,.05), 0 14px 30px rgba(58,42,34,.1); }
a.card.link:active { transform: scale(.99); }
.card.err { border-color: var(--danger); color: var(--danger); }
.card.gift { background: var(--sage-soft); border-color: #cdd6c2; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid .card { margin: 0; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stats { display: flex; gap: 18px; margin: 14px 0 12px; flex-wrap: wrap; } .stat { display: flex; flex-direction: column; } .stat b { font: 600 24px/1.1 var(--serif); } .stat span { font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 99px; background: var(--sand); overflow: hidden; margin: 4px 0 10px; } .bar i { display: block; height: 100%; background: var(--sage); border-radius: 99px; }

/* ---------- buttons, badges ---------- */
.btn { border: 1px solid var(--sand-2); background: var(--card); color: var(--ink); border-radius: 99px; padding: 11px 20px; min-height: 44px; font: 600 15px var(--sans); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, transform .1s; }
.btn:hover { background: var(--bg); } .btn:active { transform: scale(.97); } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--terra); color: #fff; border-color: var(--terra); } .btn.primary:hover { background: var(--terra-dark); }
.hero .btn { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn.danger { color: var(--danger); } .btn.tiny { padding: 6px 14px; min-height: 34px; font-size: 13.5px; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 99px; background: var(--sand); color: var(--brown); white-space: nowrap; }
.badge.open, .badge.approved, .badge.complete { background: var(--sage-soft); color: #4a5a3c; }
.badge.applied, .badge.waitlisted, .badge.draft { background: #f6ebc9; color: #7a5f15; }
.badge.fits-in, .badge.finals-in, .badge.running, .badge.files-sent { background: #e5e2f0; color: #4a4585; }
.badge.incomplete, .badge.declined { background: #f5dad3; color: #8a2f2f; }
.badge.size { background: var(--peach); color: var(--terra-dark); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin: 6px 0 18px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: var(--card); border: 1px solid var(--line); padding: 10px 18px; min-height: 42px; font: 600 15px var(--sans); cursor: pointer; color: var(--brown); border-radius: 99px; white-space: nowrap; }
.tab.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; } .field .lbl { font-size: 13.5px; font-weight: 600; color: var(--brown); }
input, select, textarea { font: 16px var(--sans); padding: 12px 14px; min-height: 46px; border: 1.5px solid var(--sand-2); border-radius: var(--radius-sm); background: var(--cream); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(166,75,42,.12); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--terra); padding: 0; }
input.cap { width: 76px; }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.row-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .row-form input, .row-form select { flex: 1; min-width: 160px; width: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 10px; }
form > .btn.primary[type=submit] { display: flex; width: 100%; margin-top: 10px; }
.row-form > .btn.primary[type=submit] { width: auto; margin-top: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 860px; } th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: var(--cream); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; }
td select { min-width: 130px; } .note { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 220px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chip { background: var(--sand); color: var(--brown); border-radius: 99px; padding: 5px 13px; font-size: 14px; font-weight: 600; }
.chip.full { background: #f6ebc9; color: #7a5f15; } .chip.over { background: #f5dad3; color: #8a2f2f; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.size-row { display: flex; align-items: center; gap: 10px; } .size-row span:nth-child(2) { width: 80px; }
.coupon { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; } code { background: var(--bg); padding: 4px 10px; border-radius: 8px; font-size: 14px; }
.file-row, .sug { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); } .file-row:last-child, .sug:last-child { border-bottom: 0; }
.qa span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .qa p { margin: 2px 0 12px; white-space: pre-wrap; }
.photos { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; } .photos img { width: 110px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.steps { display: flex; gap: 8px; margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; } .steps::-webkit-scrollbar { display: none; }
.step { display: flex; align-items: center; gap: 8px; padding: 7px 16px 7px 8px; border-radius: 99px; background: var(--sand); color: var(--muted); font-size: 14px; white-space: nowrap; }
.step span { width: 24px; height: 24px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-size: 12px; font-weight: 700; } .step.done { background: var(--sage-soft); color: #4a5a3c; }
.size-pill { background: var(--peach); color: var(--terra-dark); border-radius: var(--radius); padding: 10px 20px; display: flex; flex-direction: column; align-items: center; } .size-pill b { font: 600 24px var(--serif); }
.md h2, .md h3, .md h4 { margin: 20px 0 6px; font-family: var(--serif); } .md p { margin: 0 0 12px; } .md ul, .md ol { margin: 0 0 14px; padding-left: 22px; } .md li { margin-bottom: 4px; }

/* ---------- sign in ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 85% -10%, rgba(244,205,180,.7), transparent 60%), radial-gradient(700px 500px at -10% 110%, rgba(139,154,122,.35), transparent 60%), var(--bg); }
.login .card { width: 100%; max-width: 420px; padding: 30px 26px; border-radius: 26px; animation: rise .4s ease both; }
.login h1 { font-size: 32px; } .login .logo { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font: 600 15px var(--sans); color: var(--terra); letter-spacing: .12em; text-transform: uppercase; } .login .logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--terra); }

/* ---------- public application form ---------- */
.login.apply { place-items: start center; padding: 24px 14px 60px; } .login .card.wide { max-width: 640px; }
.apply h2 { font-size: 19px; margin: 24px 0 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pick { cursor: pointer; } .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.pick span { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--sand-2); background: var(--cream); font-weight: 700; transition: all .15s; }
.pick:active span { transform: scale(.96); }
.pick input:checked + span { background: var(--terra); border-color: var(--terra); color: #fff; }
.pick input:focus-visible + span { box-shadow: 0 0 0 4px rgba(166,75,42,.2); }
.pick.rec span { border-color: var(--sage); border-style: dashed; }
.suggest { color: var(--terra-dark); font-size: 14px; font-weight: 500; margin: -4px 0 8px; min-height: 1px; }
.app-card .chips { margin: 8px 0; } .app-card .actions { margin-top: 12px; } .app-card select { max-width: 260px; }
.linkbox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .linkbox code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 10px 12px; }
/* ---------- chat ---------- */
.rooms .tab { text-decoration: none; display: inline-flex; align-items: center; }
.chatbox { min-height: 40vh; }
.feed { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; }
.msg { display: flex; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); }
.msg:hover { background: rgba(255,255,255,.6); }
.mav { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: var(--sand); color: var(--brown); display: grid; place-items: center; font: 600 16px var(--serif); }
.msg.team .mav { background: var(--terra); color: #fff; }
.mmain { min-width: 0; flex: 1; }
.mhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--peach); color: var(--terra-dark); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; letter-spacing: .04em; }
.mdel { margin-left: auto; background: none; border: 0; color: var(--muted); font: 12px var(--sans); cursor: pointer; padding: 4px 6px; opacity: .6; } .mdel:hover { opacity: 1; color: var(--danger); }
.mbody p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mimg-wrap { display: inline-block; margin-top: 6px; } .mimg { display: block; max-width: min(100%, 360px); max-height: 380px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--sand); min-height: 60px; min-width: 80px; }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 12px; border-top: 1px solid var(--line); z-index: 10; }
.crow { display: flex; gap: 8px; align-items: flex-end; }
.crow textarea { flex: 1; min-height: 46px; max-height: 140px; border-radius: 23px; padding: 12px 16px; resize: none; line-height: 1.35; }
.iconbtn { padding: 0; width: 46px; min-width: 46px; font-size: 20px; }
.send { padding: 0 20px; }
.attach { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--sage-soft); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.empty { text-align: center; padding: 40px 10px; }
form.composer > .btn.primary[type=submit] { display: inline-flex; width: auto; margin-top: 0; }
#toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px; opacity: 0; pointer-events: none; transition: .2s; max-width: 92vw; z-index: 60; font-size: 15px; }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.err { background: var(--danger); }

/* ---------- mobile first adjustments ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; } .hero h1 { font-size: 29px; }
  header.top { padding: 10px 16px; } .brand { font-size: 19px; }
  nav.desk { display: none; }
  nav.tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,251,245,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b)); }
  nav.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; min-height: 52px; justify-content: center; }
  nav.tabbar a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  nav.tabbar a.on { color: var(--terra); background: rgba(244,205,180,.45); }
  main { padding: 18px 14px calc(var(--nav-h) + 40px + var(--safe-b)); }
  #toast { bottom: calc(var(--nav-h) + 14px + var(--safe-b)); }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; } .tile b { font-size: 32px; }
  .hero { padding: 22px 20px; border-radius: 22px; }
  .card { padding: 16px; border-radius: 16px; }
  .grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .row-form > * { flex: 1 1 100%; } .row-form > .btn { width: 100%; }
  .page-head .btn, .page-head > button { width: 100%; }
  .page-head { gap: 10px; }
  .actions .btn, .coupon .btn { flex: 1; }
  /* tables become stacked cards */
  .table-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  table, tbody { display: block; min-width: 0; width: 100%; } thead { display: none; }
  tr { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 12px; }
  td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); text-align: right; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; flex: 0 0 82px; }
  td[data-label=""]::before, td:not([data-label])::before { display: none; }
  td > * { max-width: 100%; } td select { min-width: 0; width: 100%; flex: 1; } .note { max-width: none; }
  .file-row, .sug { flex-wrap: wrap; }
  .composer { bottom: calc(var(--nav-h) + var(--safe-b)); margin: 0 -14px; padding: 10px 14px 10px; background: rgba(246,239,228,.96); }
  .msg { padding: 8px 4px; } .mdel { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ===== Community (Circle-style spaces) ===== */
.eyebrow { margin: 4px 0 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.bigtitle { font-family: var(--serif, 'Fraunces', serif); font-size: clamp(34px, 9vw, 46px); line-height: 1.05; margin: 2px 0 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; }
.pill.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pill .dot { font-style: normal; background: #d9433a; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; }
.topicbar { padding: 12px 0 4px; overflow-x: auto; flex-wrap: nowrap; }
.topicbar .pill { white-space: nowrap; }
.sechead { font-size: 15px; font-weight: 700; color: var(--muted); margin: 22px 0 8px; font-family: var(--sans); }
.srow { display: flex; align-items: center; gap: 14px; padding: 8px 4px; min-height: 56px; text-decoration: none; color: var(--ink); border-radius: 14px; }
.srow:hover { background: var(--sand); }
.srow .sicon { width: 44px; height: 44px; border-radius: 12px; background: var(--sand); display: grid; place-items: center; font-size: 22px; flex: none; }
.srow .sname { flex: 1; font-weight: 600; font-size: 17px; }
.srow.unread .sname { font-weight: 800; }
.badge-red { background: #d9433a; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; min-width: 22px; text-align: center; }
.newspace { margin-top: 26px; }
.newspace summary { cursor: pointer; font-weight: 700; }

body.inspace { background: var(--cream); }
body.inspace main, body.inspace .content { padding: 0; }
.spacebar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--cream); border-bottom: 1px solid var(--line); }
.spacebar .stitle { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; min-width: 0; }
.spacebar .stitle span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacebar .who { position: relative; }
.circle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; font: inherit; font-size: 22px; text-decoration: none; cursor: pointer; flex: none; }
.circle.ghost { border-color: transparent; background: none; }
.bar-menu { top: 52px; }
.spacebody { max-width: 720px; margin: 0 auto; padding: 14px 16px 150px; }
.feed .msg { display: flex; gap: 12px; padding: 12px 0; }
.av { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.av.tiny { width: 22px; height: 22px; font-size: 9px; border: 2px solid var(--cream); }
.mmain { min-width: 0; flex: 1; }
.mhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--peach); color: var(--terra-dark); font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-left: 6px; }
.tag.soft { background: var(--sage-soft); color: var(--brown); }
.mdel { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.mtext { margin: 2px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mention { background: var(--peach); color: var(--terra-dark); border-radius: 6px; padding: 0 4px; font-weight: 600; }
.imgslot .mimg { max-width: min(100%, 360px); border-radius: 14px; display: block; margin: 6px 0; }
.rxrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: relative; }
.rx { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 14px; cursor: pointer; min-height: 30px; }
.rx.mine { background: var(--peach); border-color: var(--terra); }
.rx.add { color: var(--muted); }
.picker { position: absolute; left: 0; bottom: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; gap: 2px; box-shadow: var(--shadow); z-index: 5; }
.picker button { border: 0; background: none; font-size: 22px; padding: 4px 6px; cursor: pointer; }
.replies { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--terra); font-weight: 600; font-size: 14px; text-decoration: none; }
.replies .stack { display: inline-flex; }
.replies .stack .av + .av { margin-left: -8px; }
.unreadpill { position: sticky; top: 76px; z-index: 20; display: block; margin: 0 auto; background: var(--terra); color: #fff; border: 0; border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.threadparent { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.composer2 { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--cream) 30%); }
.crow2 { display: flex; gap: 10px; align-items: flex-end; max-width: 720px; margin: 0 auto; }
.pillinput { flex: 1; display: flex; align-items: flex-end; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 4px 6px 4px 16px; box-shadow: var(--shadow); }
.pillinput textarea { flex: 1; border: 0; outline: 0; resize: none; background: none; font: inherit; color: var(--ink); padding: 10px 0; max-height: 130px; }
.clip { border: 0; background: none; font-size: 18px; width: 40px; height: 44px; cursor: pointer; }
.sendbtn { width: 38px; height: 38px; margin: 3px 0; border-radius: 50%; border: 0; background: var(--terra); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; flex: none; }
.sendbtn:disabled { opacity: .5; }
.composer2 .attach { max-width: 720px; margin: 0 auto 6px; display: flex; gap: 8px; align-items: center; }
.composer2.locked .lockmsg { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 12px 16px; color: var(--muted); font-size: 14px; }
.posts { display: grid; gap: 14px; margin-top: 12px; }
.post { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; text-decoration: none; color: var(--ink); }
.post h3 { margin: 0 0 10px; font-size: 20px; }
.byline { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.preview { color: var(--brown); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0; }
.pfoot { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.postfull h1 { font-size: 28px; margin: 4px 0 12px; }
.fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; background: var(--terra); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.newpost { display: grid; gap: 14px; padding-bottom: 60px; }
@media (max-width: 720px) {
  nav.tabbar { left: 14px; right: 14px; bottom: calc(12px + var(--safe-b)); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
  main { padding-bottom: 110px; }
}

/* ===== Tester call photos ===== */
.gallery { display: flex; gap: 10px; overflow-x: auto; margin: 14px 0; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery a { flex: 0 0 auto; scroll-snap-align: start; }
.gallery img { height: 240px; width: auto; max-width: 78vw; object-fit: cover; border-radius: 16px; display: block; border: 1px solid var(--line); }
.photo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 0; }
.photo-admin .ph { display: flex; flex-direction: column; gap: 6px; }
.photo-admin img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }

/* ===== Tester call photos ===== */
.gallery { display: flex; gap: 10px; overflow-x: auto; margin: 14px 0; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery a { flex: 0 0 auto; scroll-snap-align: start; }
.gallery img { height: 240px; width: auto; max-width: 78vw; object-fit: cover; border-radius: 16px; display: block; border: 1px solid var(--line); }
.photo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 0; }
.photo-admin .ph { display: flex; flex-direction: column; gap: 6px; }
.photo-admin img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }

.assign { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 260px; }
.assign select { min-height: 36px; max-width: 170px; }

/* ===== Patterns to test (product cards) ===== */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pcard2 { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pcover { aspect-ratio: 4 / 5; background: var(--sand); display: grid; place-items: center; font-size: 56px; overflow: hidden; }
.pcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pinfo { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pinfo h3 { margin: 0; font-size: 19px; }
.pdesc { margin: 0; color: var(--brown); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; }
.pinfo .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 720px) { .pgrid { grid-template-columns: 1fr 1fr; gap: 12px; } .pcover { font-size: 40px; } .pinfo { padding: 10px; } .pinfo h3 { font-size: 16px; } }

.openpage { max-width: 1000px; margin: 0 auto; padding: 28px 18px 60px; }
.openpage h1 { font-family: var(--serif); font-size: clamp(30px, 8vw, 44px); margin: 10px 0 6px; }
.openpage .pgrid { margin: 22px 0; }

/* ===== Groups (Facebook Groups style) ===== */
.grow { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.grow:hover { border-color: var(--terra); }
.grow .gicon { width: 48px; height: 48px; border-radius: 14px; background: var(--sand); display: grid; place-items: center; font-size: 24px; flex: none; }
.grow .gtext { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grow .gtext b { font-size: 17px; }
.grow .gtext small { font-size: 13px; }
.sechead { text-transform: none; }
.gbanner { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--peach), var(--sand)); border-radius: 20px; padding: 22px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.gbanner h1 { margin: 0; font-size: 26px; }
.gbanner small { color: var(--brown); }
.gbanner > div { flex: 1; min-width: 0; }
.gicon.big { width: 64px; height: 64px; border-radius: 18px; background: var(--card); display: grid; place-items: center; font-size: 32px; flex: none; }
.wcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.wcard.locked { color: var(--muted); font-size: 14px; text-align: center; }
.wtrigger { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px 8px 8px; font: inherit; color: var(--muted); cursor: pointer; text-align: left; }
.wtrigger span:nth-child(2) { flex: 1; }
.wform { display: grid; gap: 10px; }
.wform textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; background: var(--bg); color: var(--ink); resize: vertical; }
.wrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow1 { flex: 1; }
.gfeed { display: grid; gap: 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.phead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.phead > div:nth-child(2) { flex: 1; min-width: 0; }
.ptitle { margin: 4px 0 6px; font-size: 20px; }
.pbody { margin: 6px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pimg { max-width: 100%; max-height: 460px; border-radius: 12px; display: block; margin: 6px 0; }
.pcounts { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 2px; min-height: 28px; }
.pacts { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0 8px; }
.act { flex: 1; background: none; border: 0; padding: 10px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 8px; }
.act:hover { background: var(--bg); }
.act.on { color: var(--terra); }
.comments { display: grid; gap: 8px; }
.comment { display: flex; gap: 8px; align-items: flex-start; }
.cmain { min-width: 0; flex: 1; }
.cbubble { background: var(--bg); border-radius: 16px; padding: 8px 12px; display: inline-block; max-width: 100%; }
.cbubble p { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.cform { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.cinput { flex: 1; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 14px; }
.cinput input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); padding: 10px 0; min-width: 0; }
.clip.on { background: var(--peach); border-radius: 50%; }
.viewall, .linkbtn { background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: left; }
.linkbtn.right { margin-left: auto; }
.av.sm { width: 32px; height: 32px; font-size: 12px; }
.empty { text-align: center; padding: 30px 0; }

/* ===== Several people per tester ===== */
.person { padding: 10px 0; border-top: 1px solid var(--line); gap: 10px; }
.addperson { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.addperson h4 { margin: 0 0 8px; }
.extra-person { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 14px; }
.extra-person h3 { margin: 0; font-size: 18px; }
.applyrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.applyrow .check { flex: 1; min-width: 140px; }
.applyrow select { max-width: 160px; }

/* ===== Archive, notes, filters ===== */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.filters input[type=search] { flex: 1; min-width: 220px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; background: var(--card); color: var(--ink); }
.filters select { min-height: 44px; }
.archived-box { margin-top: 28px; }
.archived-box summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }
.overlay { position: fixed; inset: 0; background: rgba(58,42,34,.45); z-index: 200; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; }
.note-row { display: flex; gap: 10px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }

/* ===== Tester pool cards ===== */
.tlist { display: grid; gap: 12px; margin-top: 14px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.thead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tname { font-size: 17px; }
.tsub { font-size: 13.5px; overflow-wrap: anywhere; }
.tbtns { display: flex; gap: 8px; }
.tmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.tpill { background: var(--sand); color: var(--brown); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.tpill.good { background: var(--sage-soft); }
.tpill.flag { background: var(--peach); color: var(--terra-dark); }
.tpeople { font-size: 14.5px; color: var(--brown); display: grid; gap: 2px; }
.tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13.5px; text-decoration: none; color: var(--ink); }
.tchip:hover { border-color: var(--terra); }
.tassign { border-top: 1px solid var(--line); padding-top: 8px; }
.tassign summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--terra); }
.tassign .assign { margin-top: 10px; min-width: 0; }

/* profile photos */
.avatar img, .av img, .avpreview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av:has(img) { background: var(--peach); overflow: hidden; }
.avatar { overflow: hidden; padding: 0; }
.avrow { display: flex; align-items: flex-end; gap: 16px; margin: 12px 0; }
.avrow .field { flex: 1; min-width: 0; }
.avpreview { width: 72px; height: 72px; border-radius: 50%; background: var(--peach); color: var(--terra-dark); display: grid; place-items: center; font: 700 28px var(--serif); overflow: hidden; flex: none; }

/* feedback reply threads */
.fwrap { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.fthread { display: grid; gap: 8px; }
.fcomment { background: var(--cream); border-radius: 14px; padding: 10px 14px; }
.fcomment.team { background: var(--peach); }
.fcomment p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.freply { display: grid; gap: 8px; justify-items: end; }
.freply textarea { width: 100%; }

/* status filter pills */
.fchip { border: 0; background: var(--sand); color: var(--brown); font: inherit; font-size: 14px; font-weight: 600; border-radius: 99px; padding: 7px 15px; cursor: pointer; transition: background .15s; }
.fchip:hover { background: #e3d9cd; }
.fchip.on { background: #a64b2a; color: #f6efe4; }
.poolbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 12px 0; }
.poolbar span { flex: 1; min-width: 220px; }

/* tester pool page */
.tiles button.tile { border: 0; font: inherit; cursor: pointer; text-align: left; }
.filtercard { display: grid; gap: 12px; }
.fbar { gap: 6px; }
.tcard { background: #fff; border-radius: 16px; padding: 16px 18px; display: grid; gap: 12px; border-left: 5px solid var(--sand); }
.tcard.state-available { border-left-color: #8b9a7a; } .tcard.state-active { border-left-color: #a64b2a; } .tcard.state-dni { border-left-color: #8a2f2f; background: #fbf3f1; }
.thead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tstate { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 5px 12px; white-space: nowrap; background: var(--sand); color: var(--brown); }
.tstate.available { background: #e3ead9; color: #3f5230; } .tstate.active { background: #f4cdb4; color: #7a3317; } .tstate.dni { background: #f5dad3; color: #8a2f2f; }
.tinfo { display: grid; gap: 6px; }
.tinfo-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tinfo-label { min-width: 110px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a7a6d; }
.tchips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tactions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.tactions .tassign { flex: 1 1 100%; order: 3; } .tactions .tassign summary { display: inline-block; list-style: none; cursor: pointer; }
.tactions .tassign[open] summary { margin-bottom: 10px; }
.addcard summary { cursor: pointer; font-weight: 600; }
@media (max-width: 640px) { .tinfo-label { min-width: 100%; } }

.filtercard .filters { margin: 0; }
.filtercard .filters select { width: auto; flex: 1 1 170px; min-width: 0; }
.filtercard .filters input[type=search] { flex: 1 1 100%; }

.pplhead { margin: 14px 0 8px; font-size: 15px; }
.pcard { background: var(--bg, #f6efe4); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; border-left: 4px solid #8b9a7a; }

.filtercard input[type=search] { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; background: var(--card); color: var(--ink); box-sizing: border-box; }

.ghead td { background: #f6efe4; border-top: 2px solid #d6d3cd; padding-top: 12px; padding-bottom: 12px; }
.kidrow td:first-child { padding-left: 28px; border-left: 4px solid #8b9a7a; }
.kidcell b { font-size: 15px; }

/* testers on a test: one card per tester */
.tclist { display: grid; gap: 14px; margin: 12px 0; }
.tcard2 { background: #fff; border: 1px solid var(--line, #e4dccf); border-radius: 18px; overflow: hidden; }
.tc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: #f6efe4; border-bottom: 1px solid var(--line, #e4dccf); }
.tc-name { font-family: var(--serif); font-size: 19px; }
.tc-kids { display: grid; }
.kid { padding: 14px 18px; display: grid; gap: 10px; border-top: 1px solid var(--line, #e4dccf); }
.kid:first-child { border-top: 0; }
.kid-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.kid-name { font-size: 16px; } .kid-sub { font-size: 13px; }
.kid-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.kid-field { display: grid; gap: 4px; align-content: start; }
.kid-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a7a6d; }
.kid-field select { width: 100%; }

/* stronger division on tester cards: dark header, white panels, clear borders */
.tcard2 { border: 1.5px solid #c9bba6; box-shadow: 0 2px 8px rgba(58, 42, 34, .08); }
.tc-head { background: var(--ink); border-bottom: 0; color: #fff; padding: 16px 20px; }
.tc-head .tc-name { color: #fff; }
.tc-head .muted { color: #d9cdbd; }
.tc-head .chip { background: var(--terra); color: #fff; border-color: var(--terra); }
.tc-head .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.tc-head .btn:hover { background: rgba(255, 255, 255, .15); }
.tc-kids { background: #fff; }
.kid { border-top: 2px solid #efe6d8; border-left: 5px solid var(--terra); }
.kid:nth-child(even) { background: #fbf7f0; border-left-color: var(--sage); }
.kid-field select { background: #fff; border: 1.5px solid #c9bba6; }

/* unread dot on the Groups tab */
.navdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d9433a; border: 2px solid var(--cream, #fffbf5); margin-left: 6px; vertical-align: middle; }
.navdot[hidden] { display: none; }
.tabic { position: relative; display: inline-flex; }
.tabic .navdot { position: absolute; top: -2px; right: -6px; margin: 0; }
nav.desk a.on .navdot { border-color: var(--ink); }

/* who liked a post */
.likecount { background: none; border: 0; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; }
.likecount:hover { background: var(--sand); }
.likers .liker { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }

/* tester profile photos in admin lists */
.tphoto { width: 40px; height: 40px; border-radius: 50%; background: var(--peach); color: var(--terra-dark); display: inline-grid; place-items: center; font: 700 16px var(--serif); overflow: hidden; flex: none; }
.tphoto.big { width: 52px; height: 52px; font-size: 20px; }
.tphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-who { display: flex; align-items: center; gap: 12px; }
.tc-head .tphoto { border: 2px solid rgba(255, 255, 255, .6); }
.tid { display: flex; align-items: center; gap: 12px; }
/* ===== Add to home screen ===== */
.installbar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--peach); border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; font-size: 14.5px; }
.installbar span { flex: 1; min-width: 180px; font-weight: 600; color: var(--terra-dark); }
@media (max-width: 720px) { .installbar { display: flex; } }
.installsteps { padding-left: 22px; margin: 14px 0; display: grid; gap: 10px; }
.installsteps p { margin: 2px 0 0; font-size: 14px; }
