/* ============================================================
   FitIndex — light turquoise theme
   Bright, cute, airy. Soft aqua background, bluish-turquoise
   accents, dark ink text. Graffiti logo.
   ============================================================ */

:root {
  /* Light turquoise palette (bluer, less green) */
  --bg-1: #ecfdfc;
  --bg-2: #d6f6f5;
  --bg-3: #c3f0f2;

  --accent: #0ec9d0;         /* bright bluish turquoise */
  --accent-2: #16bccc;
  --accent-deep: #0a9aa6;
  --on-accent: #03343a;      /* dark text that sits on accent */

  --ink: #0c2e31;            /* dark teal ink */
  --ink-dim: #3d7b7e;
  --ink-faint: #79aaac;

  --surface: #ffffff;
  --surface-2: #f0fbfb;
  --surface-3: #e7f8f8;

  --line: rgba(12, 130, 138, 0.16);
  --line-strong: rgba(12, 130, 138, 0.30);

  --heart: #ff4d79;
  --danger: #ff4d79;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 16px 40px -20px rgba(11, 110, 116, 0.45);
  --shadow-soft: 0 8px 24px -14px rgba(11, 110, 116, 0.40);
  --glow: 0 0 0 1px rgba(14, 201, 208, 0.28), 0 12px 34px -14px rgba(14, 201, 208, 0.45);

  --header-h: 68px;
  --maxw: 1240px;

  --font-graffiti: 'Rubik Spray Paint', 'Permanent Marker', system-ui, sans-serif;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-1);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}
/* Soft turquoise wash on a fixed layer */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 620px at 84% -8%, rgba(14, 201, 208, 0.30), transparent 60%),
    radial-gradient(900px 560px at 4% 6%, rgba(22, 188, 204, 0.22), transparent 55%),
    radial-gradient(1200px 900px at 50% 118%, rgba(120, 232, 236, 0.35), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 60%, var(--bg-3));
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--on-accent); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: rgba(12, 150, 158, 0.35); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(12, 150, 158, 0.55); background-clip: content-box; }

/* ------------------------------ Header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(240, 251, 251, 0.7));
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px;
}
.brand { flex-shrink: 0; }

/* Graffiti wordmark */
.brand-graffiti {
  position: relative;
  display: inline-block;
  font-family: var(--font-graffiti);
  font-size: 30px; line-height: 1;
  color: var(--accent);
  transform: rotate(-4deg);
  padding: 2px 4px 6px;
  letter-spacing: 1px;
  text-shadow:
    2px 2px 0 var(--on-accent),
    -1px -1px 0 rgba(3, 52, 58, 0.35);
  transition: transform .18s ease;
}
.brand-graffiti::after {
  /* paint drip */
  content: "";
  position: absolute; left: 30%; bottom: -3px;
  width: 5px; height: 10px; border-radius: 0 0 5px 5px;
  background: var(--accent);
  box-shadow: 34px 4px 0 -1px var(--accent-2), 62px -2px 0 -2px var(--accent);
}
.brand:hover .brand-graffiti { transform: rotate(-4deg) scale(1.05); }

.header-search {
  flex: 1; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 16px; height: 44px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .2s, border-color .2s;
}
.header-search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.hs-icon { width: 19px; height: 19px; color: var(--ink-dim); flex-shrink: 0; }
.header-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ink); font-size: 15px; font-family: var(--font-body);
}
.header-search input::placeholder { color: var(--ink-faint); }

.header-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 12px;
  color: var(--ink-dim); font-weight: 600; font-size: 14px;
  transition: background .16s, color .16s;
}
.header-nav a svg { width: 20px; height: 20px; }
.header-nav a:hover { color: var(--ink); background: var(--surface-3); }
.header-nav a.active { color: var(--accent-deep); }
.header-nav .nav-upload {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 20px -8px rgba(14, 201, 208, 0.7);
}
.header-nav .nav-upload:hover { background: var(--accent-2); color: var(--on-accent); }
.nav-avatar { padding: 4px !important; }
.nav-avatar img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line-strong); background: var(--surface-2);
}
.nav-avatar:hover img { border-color: var(--accent); }

/* ------------------------------ Layout ------------------------------ */
.app { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 40px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 30px 2px 16px;
}
.section-head h2 {
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
  margin: 0; display: flex; align-items: center; gap: 9px; color: var(--ink);
}
.section-head .emoji { font-size: 20px; }
.section-head a.more { color: var(--accent-deep); font-weight: 600; font-size: 14px; }

/* ------------------------------ Hero / Home ------------------------------ */
.hero { text-align: center; padding: 46px 16px 26px; position: relative; }
.hero-kicker {
  display: inline-block;
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; background: var(--surface);
}
.hero h1 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1.03; margin: 0 0 14px;
  letter-spacing: -1.4px; color: var(--ink);
}
.hero h1 .wash {
  background: linear-gradient(100deg, var(--accent-deep), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { color: var(--ink-dim); font-size: 17px; margin: 0 auto 26px; max-width: 560px; }

.hero-search {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 8px 8px 22px; height: 64px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.hero-search svg { width: 24px; height: 24px; color: var(--ink-dim); flex-shrink: 0; }
.hero-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ink); font-size: 19px; font-family: var(--font-body);
}
.hero-search input::placeholder { color: var(--ink-faint); }
.hero-search button {
  height: 48px; padding: 0 26px; border: none; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 16px; font-family: var(--font-head);
  transition: transform .14s, background .16s;
}
.hero-search button:hover { background: var(--accent-2); transform: translateY(-1px); }

.hero-examples {
  display: flex; flex-wrap: wrap; gap: 9px; justify-content: center;
  margin: 20px auto 0; max-width: 660px;
}

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-dim); font-size: 13.5px; font-weight: 500;
  transition: all .16s; cursor: pointer; user-select: none;
}
.chip:hover { color: var(--ink); border-color: var(--accent); background: var(--surface-2); }
.chip.solid { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.chip.aesthetic::before { content: "✦"; color: var(--accent-deep); }
.chip.aesthetic.solid::before, .chip.aesthetic.selected::before { color: var(--on-accent); }
.chip.selected { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.chip.tiny { padding: 5px 11px; font-size: 12px; }
.chip .x { opacity: .7; font-weight: 700; }
.chip .x:hover { opacity: 1; }

/* ------------------------------ Masonry grid ------------------------------ */
.grid { columns: 5 220px; column-gap: 16px; }
.grid.compact { columns: 6 170px; }
@media (max-width: 1100px) { .grid { columns: 4 200px; } }
@media (max-width: 760px)  { .grid { columns: 2 150px; column-gap: 12px; } }

.card {
  break-inside: avoid; margin-bottom: 16px;
  position: relative; border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer; display: block;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card img.photo { width: 100%; aspect-ratio: 500 / 640; object-fit: cover; display: block; background: var(--surface-3); }
.card .card-overlay {
  position: absolute; inset: 0; color: #fff;
  background: linear-gradient(to top, rgba(4, 30, 32, 0.88) 0%, rgba(4, 30, 32, 0) 44%);
  opacity: 0; transition: opacity .18s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px;
}
.card:hover .card-overlay { opacity: 1; }
.card .card-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #fff; }
.card .card-user img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255,255,255,.6); }
.card .card-user span { font-size: 13px; font-weight: 600; }
.card .card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card .mini-tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(14, 201, 208, 0.3); color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.card .card-like {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 700; color: var(--ink);
  opacity: 0; transition: opacity .18s, transform .12s;
}
.card:hover .card-like { opacity: 1; }
.card .card-like svg { width: 15px; height: 15px; }
.card .card-like.liked { color: var(--heart); }
.card .card-like.liked svg { fill: var(--heart); stroke: var(--heart); }
.card .card-like:active { transform: scale(.9); }
.card .sos-flag {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  letter-spacing: .3px; box-shadow: var(--shadow-soft);
}

/* ------------------------------ Horizontal rail ------------------------------ */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 210px;
  gap: 15px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail .rail-card { scroll-snap-align: start; }
.rail .rail-card .card { margin-bottom: 0; }
.rail .rail-card img.photo { height: 270px; aspect-ratio: auto; object-fit: cover; }

/* ------------------------------ Search results header ------------------------------ */
.results-head { margin: 6px 2px 20px; }
.results-head h1 { font-family: var(--font-head); font-size: 26px; margin: 0 0 6px; color: var(--ink); }
.results-head h1 em { color: var(--accent-deep); font-style: normal; }
.results-head .count { color: var(--ink-dim); font-size: 14px; }
.related-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.related-row .label { color: var(--ink-faint); font-size: 13px; margin-right: 2px; }

/* Empty state */
.empty { text-align: center; padding: 70px 20px; color: var(--ink-dim); }
.empty .big { font-size: 46px; margin-bottom: 10px; }
.empty h3 { font-family: var(--font-head); color: var(--ink); margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 auto 18px; max-width: 400px; }

/* ------------------------------ Outfit detail ------------------------------ */
.detail {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 30px; align-items: start;
}
@media (max-width: 880px) { .detail { grid-template-columns: 1fr; } }
.detail .photo-wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--surface-3); position: sticky; top: 92px;
}
@media (max-width: 880px) { .detail .photo-wrap { position: static; } }
.detail .photo-wrap img { width: 100%; height: auto; display: block; }
.detail .panel { min-width: 0; }
.detail .d-user { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.detail .d-user img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-strong); }
.detail .d-user .name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink); }
.detail .d-user .handle { color: var(--ink-faint); font-size: 13px; }
.detail .caption { font-size: 16px; line-height: 1.5; margin: 0 0 20px; color: var(--ink); }
.detail .sos-question {
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 20px;
  font-size: 15.5px; line-height: 1.5; color: var(--ink);
}
.detail .sos-question .lbl { display:block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; margin-bottom: 5px; }

.tag-group { margin-bottom: 18px; }
.tag-group h4 {
  font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 9px; font-weight: 700;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

.action-bar { display: flex; gap: 10px; margin: 8px 0 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 13px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px;
  transition: all .16s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: var(--accent); background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { background: var(--accent-2); }
.btn.liked { color: var(--heart); border-color: var(--heart); }
.btn.liked svg { fill: var(--heart); stroke: var(--heart); }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Comments */
.comments h4 { font-family: var(--font-head); font-size: 16px; margin: 6px 0 14px; color: var(--ink); }
.comment { display: flex; gap: 11px; margin-bottom: 15px; }
.comment img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1.5px solid var(--line); }
.comment .c-body { min-width: 0; }
.comment .c-top { display: flex; align-items: baseline; gap: 8px; }
.comment .c-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.comment .c-time { color: var(--ink-faint); font-size: 12px; }
.comment .c-text { font-size: 14.5px; line-height: 1.45; color: var(--ink); margin-top: 2px; }
.comment-form { display: flex; gap: 10px; margin-top: 18px; align-items: flex-start; }
.comment-form img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-form .cf-input { flex: 1; display: flex; gap: 8px; }
.comment-form textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 13px; padding: 11px 14px; color: var(--ink);
  font-family: var(--font-body); font-size: 14.5px; outline: none;
}
.comment-form textarea:focus { border-color: var(--accent); }

/* ------------------------------ Upload wizard ------------------------------ */
.wizard { max-width: 620px; margin: 0 auto; }
.wizard-head { text-align: center; margin-bottom: 26px; }
.wizard-head h1 { font-family: var(--font-head); font-weight: 700; font-size: 30px; margin: 0 0 8px; letter-spacing: -.6px; color: var(--ink); }
.wizard-head p { color: var(--ink-dim); margin: 0; }
.steps { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 26px; }
.step-dot { display: flex; align-items: center; gap: 8px; }
.step-dot .num {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink-dim);
  transition: all .2s;
}
.step-dot.active .num { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.step-dot.done .num { background: var(--accent-deep); color: #fff; border-color: transparent; }
.step-dot .lbl { font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.step-dot.active .lbl { color: var(--ink); }
.step-bar { width: 34px; height: 2px; background: var(--line-strong); border-radius: 2px; }
@media (max-width: 560px){ .step-dot .lbl { display: none; } }

.wizard-card {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow);
}
.wizard-card h3 { font-family: var(--font-head); font-size: 19px; margin: 0 0 4px; color: var(--ink); }
.wizard-card .hint { color: var(--ink-dim); font-size: 14px; margin: 0 0 20px; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--ink-dim);
  transition: all .18s; cursor: pointer; background: var(--surface-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--surface-3); color: var(--ink); }
.dropzone svg { width: 46px; height: 46px; color: var(--accent-deep); margin-bottom: 12px; }
.dropzone strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.dropzone .sub { font-size: 13px; }
.preview-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); }
.preview-wrap img { width: 100%; max-height: 460px; object-fit: contain; background: var(--surface-3); }
.preview-wrap .change {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .3px; margin-bottom: 8px; color: var(--ink); }
.field label .opt { color: var(--ink-faint); font-weight: 500; letter-spacing: 0; }
.field input[type=text], .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 12px 14px; color: var(--ink);
  font-family: var(--font-body); font-size: 15px; outline: none;
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }

.item-builder { display: flex; gap: 10px; flex-wrap: wrap; }
.item-builder select, .item-builder input {
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 11px 13px; color: var(--ink);
  font-family: var(--font-body); font-size: 14.5px; outline: none;
}
.item-builder select { min-width: 120px; }
.item-builder input { flex: 1; min-width: 130px; }
.item-builder select:focus, .item-builder input:focus { border-color: var(--accent); }
.item-builder .btn { padding: 11px 16px; }
.added-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); display: inline-block; }

.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* ------------------------------ Profile ------------------------------ */
.profile-head { display: flex; align-items: center; gap: 24px; padding: 10px 4px 24px; flex-wrap: wrap; }
.profile-head .pf-avatar {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); box-shadow: var(--glow); background: var(--surface-2);
}
.profile-head .pf-info { min-width: 0; flex: 1; }
.profile-head .pf-name { font-family: var(--font-head); font-weight: 700; font-size: 28px; margin: 0 0 2px; letter-spacing: -.5px; color: var(--ink); }
.profile-head .pf-handle { color: var(--accent-deep); font-weight: 600; margin-bottom: 10px; }
.profile-head .pf-bio { color: var(--ink-dim); font-size: 15px; line-height: 1.5; max-width: 520px; margin: 0 0 12px; }
.profile-head .pf-stats { display: flex; gap: 22px; }
.profile-head .pf-stats b { font-family: var(--font-head); font-size: 19px; display: block; color: var(--ink); }
.profile-head .pf-stats span { color: var(--ink-faint); font-size: 12.5px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 22px; }
.tabs button {
  background: none; border: none; color: var(--ink-dim);
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 12px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .16s, border-color .16s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--accent-deep); border-color: var(--accent); }

/* Board tiles */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.board-tile {
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform .16s, border-color .16s;
}
.board-tile:hover { transform: translateY(-3px); border-color: var(--accent); }
.board-cover { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; height: 170px; background: var(--surface-3); }
.board-cover img { width: 100%; height: 100%; object-fit: cover; }
.board-cover .m0 { grid-row: 1 / 3; }
.board-cover.empty { display: grid; place-items: center; color: var(--ink-faint); font-size: 34px; }
.board-meta { padding: 12px 14px; }
.board-meta .b-name { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; color: var(--ink); }
.board-meta .b-count { color: var(--ink-faint); font-size: 12.5px; }
.board-new {
  border: 2px dashed var(--line-strong); display: grid; place-items: center;
  min-height: 214px; border-radius: var(--radius); color: var(--ink-dim);
  cursor: pointer; transition: all .16s; text-align: center; gap: 4px;
}
.board-new:hover { border-color: var(--accent); color: var(--ink); background: var(--surface-2); }
.board-new .plus { font-size: 32px; line-height: 1; }

/* ------------------------------ Style SOS ------------------------------ */
.sos-hero {
  background: linear-gradient(120deg, rgba(14, 201, 208, 0.16), rgba(120, 232, 236, 0.28));
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: 28px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.sos-hero .txt { flex: 1; min-width: 240px; }
.sos-hero h1 { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin: 0 0 8px; color: var(--ink); }
.sos-hero p { color: var(--ink-dim); margin: 0; font-size: 15px; max-width: 480px; }

/* ------------------------------ Trending ------------------------------ */
.rank-list { display: grid; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; transition: all .16s; cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.rank-item:hover { border-color: var(--accent); transform: translateX(3px); }
.rank-item .rank-n { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--accent-deep); width: 30px; }
.rank-item .rank-term { font-weight: 600; font-size: 15.5px; flex: 1; color: var(--ink); }
.rank-item .rank-meta { color: var(--ink-faint); font-size: 13px; }
.trend-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 820px){ .trend-cols { grid-template-columns: 1fr; } }

/* ------------------------------ Toast + modal ------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #eafffb;
  border: 1px solid var(--accent); border-radius: 14px;
  padding: 13px 20px; font-weight: 600; font-size: 14.5px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 200; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(6, 44, 46, 0.45); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; animation: fade .18s forwards;
}
@keyframes fade { to { opacity: 1; } }
.modal {
  background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: 24px; width: 100%; max-width: 440px; box-shadow: var(--shadow);
  max-height: 84vh; overflow-y: auto;
}
.modal h3 { font-family: var(--font-head); font-size: 19px; margin: 0 0 4px; color: var(--ink); }
.modal p.sub { color: var(--ink-dim); font-size: 14px; margin: 0 0 18px; }
.modal-close { float: right; background: none; border: none; color: var(--ink-dim); font-size: 22px; line-height: 1; }
.board-pick-list { display: grid; gap: 8px; margin-bottom: 16px; }
.board-pick {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: all .14s;
}
.board-pick:hover { border-color: var(--accent); }
.board-pick .bp-cover { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.board-pick .bp-name { font-weight: 600; font-size: 14.5px; flex: 1; color: var(--ink); }
.board-pick .bp-count { color: var(--ink-faint); font-size: 12px; }

/* ------------------------------ Mobile nav ------------------------------ */
.mobile-nav { display: none; }
@media (max-width: 760px) {
  .header-nav { display: none; }
  .header-search { max-width: none; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center;
  }
  .mobile-nav a { color: var(--ink-dim); padding: 8px; display: grid; place-items: center; }
  .mobile-nav a svg { width: 25px; height: 25px; }
  .mobile-nav a.active { color: var(--accent-deep); }
  .mobile-nav .mn-upload { background: var(--accent); color: var(--on-accent); border-radius: 14px; padding: 10px 16px; }
  .mobile-nav .mn-avatar img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-strong); }
  .mobile-nav .mn-avatar.active img { border-color: var(--accent); }
  .toast { bottom: 84px; }
}

/* Utility */
.center-narrow { max-width: 480px; margin: 0 auto; }
.spacer { height: 20px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--ink-faint); }
.hidden { display: none !important; }
