/* OKKIIO — main.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
*, input, select, textarea, button { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
html {
  color-scheme: light dark;
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}
:root {
  --page-bg: #fdfcfb;
  --surface: #fefdfc;
  --surface-soft: #fcfaf8;
  --surface-hover: #fbf9f6;
  --text-main: #111;
  --text-soft: #666;
  --text-muted: #999;
  --accent: #72A0C1;
  --accent-strong: #111;
  --accent-soft: #A8C4D8;
  --accent-deep: #111;
  --accent-tint: #fff;
  --border-soft: rgba(0,0,0,0.08);
}
body {
  background: var(--page-bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-y: scroll;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #111;
    --surface: #171717;
    --surface-soft: #1d1d1d;
    --surface-hover: #232323;
    --text-main: #f0f0f0;
    --text-soft: #bbb;
    --text-muted: #aaa;
    --accent: #93c5fd;
    --accent-strong: #2a2a2a;
    --accent-soft: #A8C4D8;
    --accent-deep: #1a1a1a;
    --accent-tint: #f3f3f3;
    --border-soft: rgba(255,255,255,0.08);
  }
  body { background: var(--page-bg); color: var(--text-main); }
  html::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.22);
    border-color: transparent;
    background-clip: padding-box;
  }
}

/* ── NAV ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; background: var(--bg, var(--surface));
  position: sticky; top: 0; z-index: 20;
  border-bottom: 0.5px solid var(--border-soft);
}
@media (prefers-color-scheme: dark) {
  nav { background: var(--page-bg); border-bottom-color: var(--border-soft); }
}
.logo {
  font-size: 17px; font-weight: 700; letter-spacing: 0.22em;
  color: inherit; cursor: pointer; text-transform: uppercase;
}
.nav-r { display: flex; gap: 28px; align-items: center; }
.nav-r .nl { white-space: nowrap; }
.site-note {
  max-width: 980px;
  margin: 12px auto 0;
  padding: 0 24px;
  font-size: 12px;
  color: #888;
  line-height: 1.7;
  text-align: center;
}
.site-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-note a:hover { color: var(--text-main); }
.nl { font-size: 13px; font-weight: 700; color: var(--text-muted); cursor: pointer; text-decoration: none; }
.nl:hover { color: var(--text-main); }
.nl.act { font-weight: 400; color: var(--text-main); }
@media (prefers-color-scheme: dark) {
  .nl { color: var(--text-muted); } .nl:hover, .nl.act { color: var(--text-main); }
}

.announcement {
  background: #111; color: #fff; text-align: center;
  padding: 9px 16px; font-size: 13px;
}
@media (prefers-color-scheme: dark) { .announcement { background: #1a1a1a; color: #f0f0f0; } }

/* ── TABS ── */
.tab-view { display: none; }
.tab-view.active { display: block; }

/* ── PAGE HEAD ── */
.page-head { text-align: center; padding: 40px 40px 10px; }
.page-title { font-size: 17px; font-weight: 400; letter-spacing: 0.02em; }

.home-hero {
  max-width: 1125px;
  margin: 0 auto;
  padding: 36px 28px 18px;
}
.home-hero-meta,
.home-feature-card,
.home-step-card {
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}
.home-hero-copy {
  padding: 0;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.home-kicker,
.home-section-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.home-hero-copy h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.98;
  font-weight: 500;
  max-width: none;
  white-space: nowrap;
  margin-bottom: 16px;
}
.home-hero-copy p,
.home-feature-copy p,
.home-step-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}
.home-hero-copy p {
  max-width: 40rem;
}
.home-hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  justify-content: center;
}
.home-btn {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: color 0.14s, opacity 0.14s;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  letter-spacing: 0.02em;
}
.home-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-btn-primary { color: var(--text-main); }
.home-btn-secondary {
  color: var(--text-soft);
}
.home-hero-meta {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.home-meta-card {
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.55);
}
.home-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.home-meta-value {
  font-size: 29px;
  line-height: 1;
  margin-bottom: 8px;
}
.home-meta-copy {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}
.home-section {
  max-width: 1125px;
  margin: 0 auto;
  padding: 10px 28px 26px;
}
.home-intro-copy {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-soft);
    padding-top: 8px;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
  }
.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.home-section-head h2 {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.home-inline-link {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.home-inline-link:hover { color: var(--accent-strong); }
.home-grid {
  border-top: 0.5px solid var(--border-soft);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.home-go-group-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-height: 132px;
  transition: background 0.12s;
}
.home-go-group-link:hover { background: var(--surface-hover); }
.home-go-group-thumb {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.home-go-group-image {
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
}
.home-go-group-thumb .item-fallback-card {
  width: 104px;
  height: 104px;
}
.home-go-group-name {
  display: block;
  font-size: 18px;
  line-height: 1.35;
  color: var(--text-main);
}
.home-go-group-meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.home-feature-card {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 18px;
}
.home-feature-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent);
}
.home-feature-items {
  display: grid;
  gap: 10px;
}
.home-feature-pill {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.58);
  border: 0.5px solid rgba(0,0,0,0.06);
  cursor: pointer;
}
.home-feature-pill span {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}
.home-feature-pill small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #888;
}
.home-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-step-card { padding: 22px 20px; }
.home-step-num {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #72A0C1;
  margin-bottom: 14px;
}
.home-step-card h3 {
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 10px;
}

.campaign-wrap { padding: 0 28px 20px; }
.campaign-banner {
  max-width: 980px; margin: 0 auto 16px;
  border: 0.5px solid rgba(0,0,0,0.07);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  padding: 20px 22px;
}
.campaign-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #1e40af; background: #dbeafe;
}
.campaign-expiry { font-size: 11px; color: #888; letter-spacing: 0.04em; }
.campaign-title { font-size: 20px; line-height: 1.2; margin-bottom: 6px; }
.campaign-copy { font-size: 13px; color: #666; line-height: 1.6; max-width: 760px; }
.campaign-grid { margin-top: 0; }
.campaign-order-list {
  display: grid;
  gap: 8px;
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
}
.campaign-order-empty,
.campaign-preview-empty,
.campaign-preview-muted {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
}
.campaign-order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  background: var(--surface-soft);
}
.campaign-order-row.drag-target {
  border-color: #72A0C1;
  box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.18);
}
.variation-editor-card.drag-target {
  border-color: #72A0C1 !important;
  box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.18);
}
.campaign-order-handle {
  font-size: 14px;
  color: #999;
  cursor: grab;
  user-select: none;
}
.campaign-order-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.campaign-order-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.campaign-order-meta,
.campaign-preview-line {
  font-size: 12px;
  color: #777;
  line-height: 1.6;
}
.campaign-order-remove {
  flex-shrink: 0;
}
.campaign-preview-box {
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}
.campaign-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.campaign-preview-card {
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 14px 15px;
  background: var(--surface);
}
.campaign-preview-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 10px;
}
@media (prefers-color-scheme: dark) {
  .campaign-banner { border-color: rgba(255,255,255,0.08); background: linear-gradient(180deg, #171717, #1d1d1d); }
  .campaign-badge { background: #1e3a8a; color: #dbeafe; }
  .campaign-expiry, .campaign-copy { color: #bbb; }
  .campaign-order-list,
  .campaign-preview-box,
  #campaign-items-picker,
  #campaign-gifts-picker { border-color: rgba(255,255,255,0.08); background: #181818; }
  .campaign-order-row,
  .campaign-preview-card { border-color: rgba(255,255,255,0.08); background: #1d1d1d; }
  .campaign-order-row.drag-target { border-color: #72A0C1; box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.22); }
  .variation-editor-card.drag-target { border-color: #72A0C1 !important; box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.22); }
  .campaign-order-meta,
  .campaign-preview-line,
  .campaign-order-empty,
  .campaign-preview-empty,
  .campaign-preview-muted,
  .campaign-preview-kicker { color: #bbb; }
}
@media (max-width: 820px) {
  .campaign-preview-grid { grid-template-columns: 1fr; }
}

/* ── FILTER ── */
.filter-bar {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 40px 20px; position: relative; z-index: 15;
}
.ftoggle {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: #888; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; user-select: none;
}
.ftoggle:hover { color: #111; }
@media (prefers-color-scheme: dark) { .ftoggle:hover { color: #f0f0f0; } }
.ftoggle svg { transition: transform 0.18s; }
.ftoggle.open svg.chev { transform: rotate(180deg); }

.fpanel {
  display: none; position: absolute;
  top: calc(100% - 4px); left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 0.5px solid rgba(0,0,0,0.1);
  border-radius: 10px; padding: 20px 22px; min-width: 280px; z-index: 20;
}
@media (prefers-color-scheme: dark) {
  .fpanel { background: #1a1a1a; border-color: rgba(255,255,255,0.1); }
}
.fpanel.open { display: block; }
.fgroup { margin-bottom: 16px; }
.fgroup-lbl { font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.fopts { display: flex; flex-wrap: wrap; line-height: 2.2; }
.fo { font-size: 13px; color: #888; cursor: pointer; margin-right: 16px; user-select: none; }
.fo:hover { color: #111; }
.fo.on { color: #111; text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) {
  .fo { color: #666; } .fo:hover, .fo.on { color: #f0f0f0; }
}
.ffoot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 0.5px solid rgba(0,0,0,0.07);
}
@media (prefers-color-scheme: dark) { .ffoot { border-top-color: rgba(255,255,255,0.07); } }
.fclr { font-size: 12px; color: #bbb; cursor: pointer; user-select: none; }
.fclr:hover { color: #111; }
.fdone { font-size: 12px; color: #888; cursor: pointer; user-select: none; }
.fdone:hover { color: #111; }
@media (prefers-color-scheme: dark) {
  .fclr:hover, .fdone:hover { color: #f0f0f0; }
}

.active-filters {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  padding: 0 40px 8px;
}
.go-group-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 40px 18px;
}
.go-group-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.04em;
}
.go-group-chip:hover {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.go-group-section {
  padding: 0 40px 24px;
}
.go-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 14px;
  margin-bottom: 18px;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
}
.go-group-head h3 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}
.go-group-head span {
  font-size: 12px;
  color: #999;
}
.go-group-grid {
  border-top: 0;
}
.af { font-size: 12px; color: #888; cursor: pointer; user-select: none; }
.af:hover { text-decoration: line-through; color: #bbb; }

/* ── PRODUCT GRID ── */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .product-grid { grid-template-columns: 1fr; } }

.cell {
  padding: 48px 32px 42px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; position: relative;
  background: var(--surface); transition: background 0.12s;
}
.cell:hover:not(.sold) { background: var(--surface-hover); }
@media (prefers-color-scheme: dark) {
  .cell { background: #111; }
  .cell:hover:not(.sold) { background: #1a1a1a; }
}
.cell.sold { cursor: default; pointer-events: none; }
.cell.sold .cell-img, .cell.sold .cell-emoji, .cell.sold .item-fallback { opacity: 0.22; }
.cell.sold .cell-members, .cell.sold .cell-name,
.cell.sold .cell-sub, .cell.sold .cell-price { color: #bbb; }

.cell-status {
  position: absolute; top: 14px; right: 16px;
  font-size: 11px; color: #aaa;
}
.cell-img { width: 124px; height: 124px; margin-bottom: 22px; object-fit: contain; display: block; }
.cell-emoji { width: 124px; height: 124px; margin-bottom: 22px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: var(--surface-soft); font-size: 30px; color: #bbb; }
.item-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  background: transparent;
  color: #9b9b9b;
}
.item-fallback-card {
  width: 124px;
  height: 124px;
  margin-bottom: 22px;
  border-radius: 18px;
}
.item-fallback-mini {
  width: 60px;
  height: 60px;
  border-radius: 8px;
}
.item-fallback-tiny {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}
.item-fallback-go {
  color: #8da4b8;
}
.item-fallback-mark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}
.item-fallback-mini .item-fallback-mark {
  font-size: 16px;
}
.item-fallback-tiny .item-fallback-mark {
  font-size: 12px;
}
.item-fallback-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b0b0b0;
}
.item-fallback-mini .item-fallback-sub,
.item-fallback-tiny .item-fallback-sub {
  display: none;
}
.cell-members { font-size: 13px; color: #999; margin-bottom: 8px; }
.cell-name { font-size: 17px; font-weight: 400; color: #111; line-height: 1.48; margin-bottom: 8px; }
.cell-sub { font-size: 13px; color: #999; margin-bottom: 8px; }
.cell-price { font-size: 15px; color: #111; }
@media (prefers-color-scheme: dark) {
  .cell-name, .cell-price { color: #f0f0f0; }
  .item-fallback {
    background: transparent;
    color: #8f8f8f;
  }
  .item-fallback-go {
    color: #88a6bf;
  }
  .item-fallback-sub {
    color: #9a9a9a;
  }
  .go-group-chip {
    color: #bbb;
  }
  .go-group-chip:hover {
    color: #f0f0f0;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .go-group-head {
    border-bottom-color: rgba(255,255,255,0.08);
  }
  .go-group-head span {
    color: #aaa;
  }
}
@media (prefers-color-scheme: dark) {
  .home-hero-meta,
  .home-feature-card,
  .home-step-card {
    border-color: rgba(255,255,255,0.08);
    background: linear-gradient(180deg, #171717, #1d1d1d);
  }
  .home-meta-card,
  .home-feature-pill {
      background: rgba(204,208,207,0.05);
      border-color: var(--border-soft);
    }
  .home-go-group-link:hover { background: #1a1a1a; }
  .home-hero-copy p,
  .home-feature-copy p,
  .home-step-card p,
  .home-meta-copy,
  .home-feature-pill small,
  .home-kicker,
  .home-section-kicker,
  .home-meta-label {
    color: #bbb;
  }
  .home-btn-primary {
      color: #f0f0f0;
  }
  .home-btn-secondary {
      color: #bbb;
  }
}
@media (max-width: 900px) {
  .home-hero,
  .home-feature-card,
  .home-step-grid {
    grid-template-columns: 1fr;
  }
  .home-hero-copy {
    padding: 30px 24px 28px;
  }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.empty-st { padding: 80px; text-align: center; color: #aaa; font-size: 13px; grid-column: 1/-1; }
.loading { padding: 80px; text-align: center; color: #ccc; font-size: 13px; grid-column: 1/-1; }

/* ── TRACKER BAR ── */
.tracker-bar {
  padding: 20px 40px;
  border-top: 0.5px solid rgba(0,0,0,0.07);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
@media (prefers-color-scheme: dark) { .tracker-bar { border-top-color: rgba(255,255,255,0.07); } }
.tracker-bar p { font-size: 13px; color: #888; }
.tbar-link { font-size: 13px; color: #888; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.tbar-link:hover { color: #111; }
@media (prefers-color-scheme: dark) { .tbar-link:hover { color: #f0f0f0; } }

/* ── FOOTER ── */
footer {
  border-top: 0.5px solid rgba(0,0,0,0.07);
  padding: 24px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
@media (prefers-color-scheme: dark) { footer { border-top-color: rgba(255,255,255,0.07); } }
.flogo { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; color: #ccc; text-transform: uppercase; }
.footer-center { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.footer-ig { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #888; text-decoration: none; }
.footer-ig svg { width: 12px; height: 12px; flex-shrink: 0; }
.footer-ig:hover { color: #111; }
@media (prefers-color-scheme: dark) { .footer-ig:hover { color: #f0f0f0; } }
.fcopy { font-size: 11px; color: #ccc; }

/* ── MODALS ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.18);
  align-items: center; justify-content: center;
  z-index: 50; padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 0.5px solid rgba(0,0,0,0.1);
  border-radius: 14px; padding: 30px 26px;
  width: 100%; max-width: 340px; position: relative;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}
@media (prefers-color-scheme: dark) {
  .modal { background: #1a1a1a; border-color: rgba(255,255,255,0.1); }
}
.modal h2 { font-size: 15px; font-weight: 500; color: #111; margin-bottom: 4px; }
.modal p { font-size: 13px; color: #888; margin-bottom: 18px; line-height: 1.7; }
@media (prefers-color-scheme: dark) { .modal h2 { color: #f0f0f0; } }
.modal-close {
  position: sticky;
  top: 0;
  align-self: flex-end;
  margin: -8px -2px 10px auto;
  padding: 2px 4px;
  font-size: 18px;
  color: #bbb;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  background: var(--surface);
}
.modal-close:hover { color: #111; }
@media (prefers-color-scheme: dark) { .modal-close:hover { color: #f0f0f0; } }

.mf { margin-bottom: 11px; }
.mf label { display: block; font-size: 10px; color: #aaa; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.09em; }
.igw { display: flex; align-items: center; border: 0.5px solid rgba(0,0,0,0.12); border-radius: 8px; background: var(--surface); overflow: hidden; }
.igw:focus-within { border-color: rgba(0,0,0,0.3); }
@media (prefers-color-scheme: dark) {
  .igw { background: #111; border-color: rgba(255,255,255,0.12); }
  .igw:focus-within { border-color: rgba(255,255,255,0.3); }
}
.ig-at { padding: 0 5px 0 10px; font-size: 13px; color: #aaa; flex-shrink: 0; }
.igw input { border: none; outline: none; padding: 9px 10px 9px 0; font-size: 13px; color: #111; background: transparent; width: 100%; }
@media (prefers-color-scheme: dark) { .igw input { color: #f0f0f0; } }
.pin {
  width: 100%; padding: 9px 11px; border-radius: 8px;
  border: 0.5px solid rgba(0,0,0,0.12); font-size: 13px;
  color: #111; background: var(--surface); outline: none;
}
.pin:focus { border-color: rgba(0,0,0,0.3); }
@media (prefers-color-scheme: dark) {
  .pin { background: #111; color: #f0f0f0; border-color: rgba(255,255,255,0.12); }
  .pin:focus { border-color: rgba(255,255,255,0.3); }
}
.merr { font-size: 12px; color: #e24b4a; margin-bottom: 8px; display: none; }
.mok { font-size: 12px; color: #065f46; margin-bottom: 8px; display: none; }
.msubmit {
    display: block; text-align: center; padding: 10px;
    border-radius: 20px; background: #111; color: #fff;
    font-size: 13px; cursor: pointer; margin-top: 5px; user-select: none;
  }
.msubmit:hover { opacity: 0.85; }
@media (prefers-color-scheme: dark) {
  .msubmit {
      background: #2a2a2a;
      color: #f3f3f3;
      border: 0.5px solid rgba(255,255,255,0.12);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    }
  .msubmit:hover { background: #333; opacity: 1; }
  }
.msw { font-size: 12px; color: #aaa; text-align: center; margin-top: 10px; }
.msw span { color: var(--accent); cursor: pointer; text-decoration: underline; }
.mhint { font-size: 11px; color: #bbb; text-align: center; margin-top: 8px; line-height: 1.8; }
.mhint a { color: var(--accent); text-decoration: none; }

/* ── TRACKER PAGE ── */
.tracker-wrap { padding: 32px 42px; max-width: 980px; margin: 0 auto; }
.tracker-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.tracker-header h2 { font-size: 19px; font-weight: 400; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--surface-soft); border-radius: 11px; padding: 15px 14px; text-align: center; }
@media (prefers-color-scheme: dark) { .stat-card { background: #1a1a1a; } }
.stat-card-link { cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease; }
.stat-card-link:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
@media (prefers-color-scheme: dark) { .stat-card-link:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.22); } }
.stat-label { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.stat-val { font-size: 18px; font-weight: 600; }

.notice {
  border-radius: 9px; padding: 11px 14px; margin-bottom: 10px;
  font-size: 13px; line-height: 1.6; border: 0.5px solid;
}
.notice.warn { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.notice.info { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.notice.pur { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
.notice b { font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .notice.warn { background: #2a2315; border-color: #8c6821; color: #f3d78d; }
  .notice.info { background: #182337; border-color: #345c93; color: #bfdbfe; }
  .notice.pur { background: #241a36; border-color: #6b4eb0; color: #ddd6fe; }
}

.addr-box { border: 0.5px solid rgba(0,0,0,0.08); border-radius: 11px; padding: 16px 18px; margin-bottom: 14px; }
.addr-box h4 { font-size: 13px; font-weight: 500; margin-bottom: 9px; }
.addr-box textarea { width: 100%; padding: 8px 11px; border-radius: 7px; border: 0.5px solid rgba(0,0,0,0.1); font-size: 13px; color: #111; background: var(--surface); outline: none; resize: vertical; min-height: 76px; line-height: 1.6; }
@media (prefers-color-scheme: dark) { .addr-box textarea { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } }
.addr-saved { font-size: 13px; line-height: 1.6; background: var(--surface-soft); padding: 9px 12px; border-radius: 7px; flex: 1; white-space: pre-wrap; }
.addr-row { display: flex; gap: 8px; align-items: flex-start; }
.addr-actions { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .addr-box { border-color: rgba(255,255,255,0.08); } .addr-saved { background: #1a1a1a; } }

.btn-text { font-size: 12px; color: #888; cursor: pointer; user-select: none; text-decoration: underline; text-underline-offset: 2px; background: none; border: none; padding: 0; }
.btn-text:hover { color: #111; }
.btn-solid { font-size: 12px; color: #fff; background: #111; cursor: pointer; user-select: none; border: none; padding: 7px 16px; border-radius: 16px; }
.btn-solid:hover { opacity: 0.85; }
@media (prefers-color-scheme: dark) {
  .btn-solid {
      background: #2a2a2a;
      color: #f3f3f3;
      border: 0.5px solid rgba(255,255,255,0.12);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    }
  .btn-solid:hover { background: #333; opacity: 1; }
    .btn-text:hover { color: #f0f0f0; }
  }

.go-group { margin-bottom: 24px; }
.go-group-header { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; padding-bottom: 10px; border-bottom: 0.5px solid var(--border-soft); }
.go-group-name { font-size: 15px; font-weight: 500; }
.go-group-count { font-size: 12px; color: #aaa; }
.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 13px; }

.oc { background: var(--surface); border: 0.5px solid rgba(0,0,0,0.08); border-radius: 13px; padding: 16px; }
@media (prefers-color-scheme: dark) { .oc { background: #1a1a1a; border-color: rgba(255,255,255,0.08); } }
.oc.actionable { border-left: 2px solid var(--accent); }
.oc.arriving { border-left: 2px solid var(--accent-soft); }
.oc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 11px; gap: 8px; }
.oc-name { font-size: 14px; font-weight: 500; line-height: 1.48; }
.oc-member { font-size: 11px; color: var(--accent-strong); background: rgba(155,168,171,0.22); padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .oc-member { background: rgba(155,168,171,0.18); color: var(--text-main); } }
.oc-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.oc-label { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; }
.oc-val { font-size: 13px; font-weight: 500; }
.oc-divider { border: none; border-top: 0.5px solid rgba(0,0,0,0.07); margin: 10px 0; }
@media (prefers-color-scheme: dark) { .oc-divider { border-top-color: rgba(255,255,255,0.07); } }
.oc-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 10px; padding: 3px 9px; border-radius: 999px; font-weight: 500; white-space: nowrap; border: 0.5px solid rgba(0,0,0,0.05); }
.b-ordered { background: #dce8fb; color: #345c93; }
.b-shipped-addy { background: #dff1f7; color: #2f6f87; }
.b-otw { background: #f9efc8; color: #8c6821; }
.b-on-hand { background: #ebe1fb; color: #6b4eb0; }
.b-ready-pack { background: #f8e7bf; color: #936326; }
.b-packing { background: #f6dcc8; color: #9a5828; }
.b-ems-needed { background: #ece2fb; color: #6948b1; }
.b-on-hold { background: #e8eef3; color: #5a6b7a; }
.b-sent-out { background: #dff2e6; color: #2f6c49; }
.b-received { background: #daf1df; color: #2c6b46; }
.b-custom { background: #f1ece3; color: #7a5d2d; }
.b-paid { background: #ddf2e3; color: #2f6b47; }
.b-unpaid { background: #f8e0e2; color: #a4464f; }

.pay-chk { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.chk { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid #a8c4d8; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chk.done { background: #72A0C1; border-color: #72A0C1; }
.chk.done::after { content: ''; display: block; width: 8px; height: 5px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.oc-note { font-size: 11px; color: #aaa; margin-top: 6px; font-style: italic; line-height: 1.5; }

.pkg-group { margin-bottom: 14px; }
.pkg-header { background: var(--surface-soft); border-radius: 11px 11px 0 0; padding: 11px 15px; border: 0.5px solid rgba(0,0,0,0.07); border-bottom: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .pkg-header { background: #222; border-color: rgba(255,255,255,0.07); } }
.pkg-label { font-size: 13px; font-weight: 500; }
.pkg-items-grid { border: 0.5px solid rgba(0,0,0,0.07); padding: 11px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pkg-ems-sec { padding: 12px 15px; border: 0.5px solid rgba(0,0,0,0.07); border-top: none; }
.pkg-ems-txt { font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.pkg-pref-sec { padding: 12px 15px; border: 0.5px solid rgba(0,0,0,0.07); border-top: none; border-radius: 0 0 11px 11px; }
.ship-sel { padding: 7px 11px; border-radius: 8px; border: 0.5px solid rgba(0,0,0,0.1); font-size: 13px; color: #111; background: var(--surface); cursor: pointer; min-width: 170px; outline: none; }
@media (prefers-color-scheme: dark) { .ship-sel { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } }
.tracker-packages { margin-bottom: 26px; }
.pkg-card { margin-bottom: 16px; border: 0.5px solid rgba(0,0,0,0.07); border-radius: 13px; overflow: hidden; }
.pkg-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; background: var(--surface-soft); cursor: pointer; }
.pkg-card-meta { font-size: 12px; color: #888; margin-top: 4px; }
.pkg-card-body { display: none; }
.pkg-card-body.open { display: block; }
.pkg-caret { display: inline-flex; align-items: center; justify-content: center; color: #888; transition: transform 0.2s; }
.ob-chev { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; color: #bbb; transition: transform 0.18s; flex-shrink: 0; }
.pkg-caret.open { transform: rotate(180deg); }
.collapse-box { padding-top: 12px; }
.collapse-head { display: flex; align-items: center; justify-content: flex-start; gap: 6px; cursor: pointer; width: fit-content; }
.collapse-head h4 { margin-bottom: 0; }
.go-group-wrap.drag-target {
  border-color: #72A0C1 !important;
  box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.18);
}
.listing-card.drag-target {
  border-color: #72A0C1 !important;
  box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.18);
}
@media (prefers-color-scheme: dark) {
  .go-group-wrap.drag-target {
    border-color: #72A0C1 !important;
    box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.22);
  }
  .listing-card.drag-target {
    border-color: #72A0C1 !important;
    box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.22);
  }
}
.collapse-body { display: none; margin-top: 12px; }
.collapse-body.open { display: block; }
.pkg-pref-alone { border-radius: 0 0 9px 9px; }
@media (prefers-color-scheme: dark) {
  .pkg-card { border-color: rgba(255,255,255,0.08); }
  .pkg-card-head { background: #222; }
  .pkg-items-grid, .pkg-ems-sec, .pkg-pref-sec { border-color: rgba(255,255,255,0.07); background: #111; }
}

/* ── ADMIN ── */
.admin-wrap { padding: 28px 34px; max-width: 1125px; margin: 0 auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.admin-header h2 { font-size: 17px; font-weight: 500; }
.admin-tabs { display: flex; gap: 20px; border-bottom: 0.5px solid rgba(0,0,0,0.08); margin-bottom: 22px; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; scrollbar-width: none; justify-content: center; -ms-overflow-style: none; }
@media (prefers-color-scheme: dark) { .admin-tabs { border-bottom-color: rgba(255,255,255,0.08); } }
.admin-tabs::-webkit-scrollbar { display: none; width: 0; height: 0; }
.admin-tab { font-size: 13px; color: #aaa; cursor: pointer; padding-bottom: 10px; border-bottom: 1.5px solid transparent; margin-bottom: -1px; user-select: none; white-space: nowrap; flex: 0 0 auto; }
.admin-tab:hover { color: #111; }
.admin-tab.on { color: #111; border-bottom-color: #111; }
@media (prefers-color-scheme: dark) { .admin-tab:hover, .admin-tab.on { color: #f0f0f0; } .admin-tab.on { border-bottom-color: #f0f0f0; } }
.admin-sec { display: none; }
.admin-sec.active { display: block; }

.stat-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; margin-bottom: 20px; }

.order-block { border: 0.5px solid rgba(0,0,0,0.08); border-radius: 11px; margin-bottom: 11px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .order-block { border-color: rgba(255,255,255,0.08); } }
.admin-sync-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 11px;
  background: var(--surface-soft);
}
.admin-sync-banner.active { display: flex !important; }
.admin-sync-banner-copy { font-size: 12px; color: #777; line-height: 1.5; }
.admin-sync-banner-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.admin-sync-banner-item { font-size: 11px; color: #666; line-height: 1.45; }
.admin-sync-banner-actions { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) {
  .admin-sync-banner { border-color: rgba(255,255,255,0.08); background: #1a1a1a; }
  .admin-sync-banner-copy { color: #b9b9b9; }
  .admin-sync-banner-item { color: #b9b9b9; }
}
.order-block-hdr { padding: 14px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; user-select: none; }
.order-block-hdr:hover { background: var(--surface-hover); }
@media (prefers-color-scheme: dark) { .order-block-hdr:hover { background: #1a1a1a; } }
.ob-name { font-size: 15px; font-weight: 500; }
.ob-meta { font-size: 13px; color: #aaa; }
.ob-chev.open { transform: rotate(180deg); }
.ob-items { display: none; border-top: 0.5px solid rgba(0,0,0,0.07); }
.ob-items.open { display: block; }
@media (prefers-color-scheme: dark) { .ob-items { border-top-color: rgba(255,255,255,0.07); } }
.ob-item-row { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 0.5px solid rgba(0,0,0,0.05); flex-wrap: wrap; }
.ob-item-row:last-child { border-bottom: none; }
.ob-item-row:hover { background: var(--surface-hover); }
@media (prefers-color-scheme: dark) { .ob-item-row:hover { background: #1a1a1a; } .ob-item-row { border-bottom-color: rgba(255,255,255,0.05); } }
.ob-item-name { font-size: 14px; font-weight: 500; flex: 1; min-width: 140px; }
.ob-item-meta { font-size: 12px; color: #aaa; }
.ob-item-actions { display: inline-flex; align-items: center; gap: 8px; }
.ob-item-toggle.is-disabled { opacity: 0.45; pointer-events: none; }
.ob-item-chev { display: inline-flex; align-items: center; justify-content: center; color: #bbb; transition: transform 0.18s; flex-shrink: 0; cursor: pointer; }
.ob-item-chev.open { transform: rotate(180deg); }
.ob-item-chev.is-disabled { opacity: 0.45; pointer-events: none; }
.joiner-pill { font-size: 11px; color: var(--accent-strong); background: rgba(155,168,171,0.22); padding: 2px 8px; border-radius: 7px; white-space: nowrap; }
.cascade-tag { font-size: 10px; color: #065f46; background: #d1fae5; padding: 2px 7px; border-radius: 7px; white-space: nowrap; }
.esl { font-size: 12px; padding: 5px 8px; border-radius: 7px; border: 0.5px solid rgba(0,0,0,0.1); background: var(--surface); color: #111; cursor: pointer; outline: none; }
@media (prefers-color-scheme: dark) { .esl { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } }

.search-select-host { position: relative; min-width: 260px; }
.search-select-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 0.5px solid rgba(0,0,0,0.1);
  background: var(--surface);
  color: inherit;
  font-size: 13px;
  outline: none;
}
.search-select-input:focus { border-color: rgba(0,0,0,0.28); }
.search-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 10px;
  border: 0.5px solid rgba(0,0,0,0.08);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  z-index: 40;
  padding: 6px;
}
.search-select-host.open .search-select-menu { display: block; }
.search-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.search-select-option:hover,
.search-select-option.is-selected {
  background: var(--surface-soft);
}
.search-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-select-option-group {
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}
.search-select-empty {
  padding: 10px;
  font-size: 12px;
  color: #888;
}
@media (prefers-color-scheme: dark) {
  .search-select-input {
    background: #1a1a1a;
    color: #f0f0f0;
    border-color: rgba(255,255,255,0.1);
  }
  .search-select-input:focus { border-color: rgba(255,255,255,0.24); }
  .search-select-menu {
    background: #1a1a1a;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 14px 28px rgba(0,0,0,0.34);
  }
  .search-select-option-group,
  .search-select-empty { color: #aaa; }
}

.joiners-panel { background: var(--surface-soft); border-top: 0.5px solid rgba(0,0,0,0.05); padding: 12px 18px; }
@media (prefers-color-scheme: dark) { .joiners-panel { background: #1a1a1a; border-top-color: rgba(255,255,255,0.05); } }
.jp-title { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; font-weight: 500; }
.jp-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 0.5px solid rgba(0,0,0,0.05); flex-wrap: wrap; }
.jp-line:last-child { border-bottom: none; }
.jp-group { padding: 10px 0 12px; border-bottom: 0.5px solid rgba(0,0,0,0.05); }
.jp-group:last-child { border-bottom: none; padding-bottom: 4px; }
.jp-group.drag-target { border-color: #72A0C1; box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.18); }
.jp-line-top { padding: 0 0 8px; border-bottom: none; }
.jp-ig { font-size: 13px; font-weight: 500; min-width: 110px; }
.jp-variants { display: flex; flex-direction: column; gap: 6px; }
.item-status-joiner-drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 18px; color: #999; cursor: grab; user-select: none; letter-spacing: -2px; flex-shrink: 0; }
.item-status-joiner-drag-handle:active { cursor: grabbing; }
.jp-variant-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-left: 2px; }
.jp-variant-name { font-size: 12px; color: inherit; }
.jp-variant-qty { font-size: 11px; color: #aaa; }
.jp-variant-select {
  min-width: 112px;
  max-width: 180px;
  font-size: 12px;
  padding: 4px 24px 4px 8px;
  border-radius: 999px;
  border: 0.5px solid rgba(0,0,0,0.08);
  background-color: var(--surface-soft);
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% - 1px), calc(100% - 8px) calc(50% - 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  outline: none;
}
.ao-variation-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; }
.ao-variation-row .ao-variation-qty-wrap { display: none; align-items: center; gap: 4px; justify-content: flex-end; position: relative; z-index: 2; }
.ao-variation-row.is-selected .ao-variation-qty-wrap { display: inline-flex; }
.ao-variation-qty-prefix { font-size: 11px; color: #999; line-height: 1; }
.ao-variation-qty {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding: 1px 2px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  border-radius: 999px;
  border: 0.5px solid rgba(0,0,0,0.12);
  background: var(--surface);
  color: inherit;
  outline: none;
}
@media (prefers-color-scheme: dark) {
  .ao-variation-qty {
    background: #1a1a1a;
    border-color: rgba(255,255,255,0.12);
    color: #f0f0f0;
  }
}
@media (prefers-color-scheme: dark) {
  .jp-group { border-bottom-color: rgba(255,255,255,0.05); }
  .jp-group.drag-target { border-color: #72A0C1; box-shadow: inset 0 0 0 1px rgba(114, 160, 193, 0.22); }
  .item-status-joiner-drag-handle { color: #777; }
}

.jcard { background: var(--surface); border: 0.5px solid rgba(0,0,0,0.08); border-radius: 14px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .jcard { background: #1a1a1a; border-color: rgba(255,255,255,0.08); } }
.jcard-top { padding: 15px 17px; border-bottom: 0.5px solid rgba(0,0,0,0.07); display: flex; align-items: center; gap: 12px; }
@media (prefers-color-scheme: dark) { .jcard-top { border-bottom-color: rgba(255,255,255,0.07); } }
.jcard-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(155,168,171,0.22); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent-strong); flex-shrink: 0; }
.jcard-ig { font-size: 14px; font-weight: 500; }
.jcard-sub { font-size: 12px; color: #aaa; margin-top: 2px; }
.jcard-order-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 17px; border-bottom: 0.5px solid rgba(0,0,0,0.05); }
.jcard-order-row:last-child { border-bottom: none; }
@media (prefers-color-scheme: dark) { .jcard-order-row { border-bottom-color: rgba(255,255,255,0.05); } }
.jcard-left { flex: 1; min-width: 0; }
.jcard-item { font-size: 14px; font-weight: 500; margin-bottom: 3px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.jcard-meta { font-size: 12px; color: #aaa; margin-bottom: 4px; line-height: 1.5; }
.jcard-note { font-size: 12px; color: #aaa; font-style: italic; line-height: 1.45; margin-top: 3px; }
.jcard-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.jcard-price { font-size: 14px; font-weight: 500; }
.override-sel { font-size: 11px; padding: 3px 6px; border-radius: 6px; border: 0.5px solid rgba(0,0,0,0.1); background: #fff; color: #111; cursor: pointer; outline: none; }
.status-badge-sel { font-size: 10px; padding: 4px 24px 4px 8px; border-radius: 999px; border: none; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 12px) calc(50% - 1px), calc(100% - 8px) calc(50% - 1px); background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; min-width: 124px; text-align: left; }
@media (prefers-color-scheme: dark) { .override-sel { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } .status-badge-sel { color: inherit; } }
@media (prefers-color-scheme: dark) {
  .badge,
  .status-badge-sel {
    border: 0.5px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }
  .b-ordered { background: #25344d; color: #d7e6ff; }
  .b-shipped-addy { background: #1f3e47; color: #d7f3fa; }
  .b-otw { background: #4a3a15; color: #faefc2; }
  .b-on-hand { background: #38285a; color: #ece0ff; }
  .b-ready-pack { background: #4d3818; color: #f8e6bf; }
  .b-packing { background: #53311f; color: #f6ddc9; }
  .b-ems-needed { background: #332455; color: #ece2ff; }
  .b-on-hold { background: #2f3841; color: #e2e9ef; }
  .b-sent-out { background: #1f4730; color: #dbf5e5; }
  .b-received { background: #23492f; color: #daf2e2; }
  .b-custom { background: #4b3820; color: #f2dec0; }
  .b-paid { background: #234730; color: #dcf5e3; }
  .b-unpaid { background: #54262a; color: #ffd8dc; }
}
.jcard-footer { padding: 11px 17px; background: var(--surface-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #aaa; }
@media (prefers-color-scheme: dark) { .jcard-footer { background: #222; } }

.fr { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.fsearch { padding: 9px 12px; border-radius: 9px; border: 0.5px solid rgba(0,0,0,0.1); font-size: 13px; color: #111; background: var(--surface); width: 240px; outline: none; }
@media (prefers-color-scheme: dark) { .fsearch { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } }
.fsearch:focus { border-color: rgba(0,0,0,0.3); }
.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
.joiner-focus-card { margin-bottom: 16px; }
.joiner-focus-tools { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 17px 0; }
.joiner-focus-address { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.joiner-focus-address-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; color: #aaa; min-height: 34px; flex: 1 1 320px; }
.joiner-address-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.joiner-address-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.joiner-address-editor { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.joiner-address-editor .fi { min-height: 74px; }
.joiner-address-editor-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.joiner-summary-note-preview { width: 100%; max-width: 640px; padding: 9px 12px; border-radius: 7px; background: var(--surface-soft); color: inherit; white-space: pre-wrap; line-height: 1.6; }
.joiner-focus-region-inline { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.joiner-focus-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.joiner-groups-wrap { display: flex; flex-direction: column; gap: 18px; }
.joiner-group-sec { width: 100%; }
.joiner-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 0.5px solid rgba(0,0,0,0.07); }
@media (prefers-color-scheme: dark) { .joiner-group-head { border-bottom-color: rgba(255,255,255,0.07); } }
.joiner-group-name { font-size: 18px; font-weight: 500; }
.joiner-group-meta { font-size: 12px; color: #aaa; }
.joiner-focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.joiner-order-card { min-height: 100%; }
.joiner-order-check { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: #888; margin-bottom: 8px; cursor: pointer; user-select: none; }
.joiner-order-check input { width: 14px; height: 14px; margin: 0; }
.joiner-order-check-top { margin-bottom: 10px; }
.joiner-card-variants { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.jcard-note-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.jcard-note-edit .fi { min-height: 58px; }
.joiner-card-variant-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 0;
}
.joiner-card-variant-name { font-size: 13px; color: inherit; min-width: 0; line-height: 1.35; }
.joiner-card-variant-qty { font-size: 12px; color: #888; text-align: right; white-space: nowrap; }
.joiner-card-variant-controls { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.joiner-card-qty-input {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  padding: 0 0 1px;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.16);
  background: transparent;
  color: inherit;
  outline: none;
}
.joiner-card-variant-remove { font-size: 11px; color: #e24b4a; cursor: pointer; white-space: nowrap; line-height: 1; opacity: 0.85; }
@media (prefers-color-scheme: dark) {
  .joiner-card-qty-input {
    background: transparent;
    border-bottom-color: rgba(255,255,255,0.16);
    color: #f0f0f0;
  }
  .jp-variant-select {
    background-color: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: #f0f0f0;
  }
}
.joiner-card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.item-link-rows { display: grid; gap: 10px; margin-top: 10px; }
.item-link-row { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(260px,1.2fr) auto; gap: 10px; align-items: start; }
.item-link-row-variations { min-width: 0; }
.item-link-row-var-list { display: grid; gap: 6px; }
.item-link-row-var-option { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.item-link-row-var-main { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; font-size: 12px; line-height: 1.4; }
.item-link-row-var-qty-wrap { display: inline-flex; align-items: center; gap: 4px; }
.item-link-row-var-qty-prefix { font-size: 11px; color: #999; line-height: 1; }
.item-link-row-var-qty {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding: 1px 2px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  border-radius: 999px;
  border: 0.5px solid rgba(0,0,0,0.12);
  background: var(--surface);
  color: inherit;
  outline: none;
}
.item-link-row-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 3px; }
.item-link-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 900px) {
  .item-link-row { grid-template-columns: 1fr; }
  .item-link-row-actions { padding-bottom: 0; }
}
@media (prefers-color-scheme: dark) {
  .item-link-row-var-qty {
    background: #1a1a1a;
    border-color: rgba(255,255,255,0.12);
    color: #f0f0f0;
  }
}

.add-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 14px; }
.add-form-full { grid-column: 1 / -1; }
.fl { font-size: 10px; color: #aaa; margin-bottom: 4px; display: block; letter-spacing: 0.08em; text-transform: uppercase; }
.fi { width: 100%; padding: 8px 10px; border-radius: 7px; border: 0.5px solid rgba(0,0,0,0.1); font-size: 13px; color: #111; background: var(--surface); outline: none; }
.fi:focus { border-color: rgba(0,0,0,0.3); }
.fsl { width: 100%; padding: 8px 10px; border-radius: 7px; border: 0.5px solid rgba(0,0,0,0.1); font-size: 13px; color: #111; background: var(--surface); cursor: pointer; outline: none; }
@media (prefers-color-scheme: dark) { .fi, .fsl { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } .fi:focus { border-color: rgba(255,255,255,0.3); } }

.upload-zone { grid-column: 1 / -1; border: 0.5px dashed rgba(0,0,0,0.15); border-radius: 10px; padding: 22px 20px; text-align: center; cursor: pointer; background: var(--surface-soft); }
.upload-zone:hover { border-color: rgba(0,0,0,0.3); }
.upload-zone:focus { outline: 2px solid rgba(114,160,193,0.3); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .upload-zone { border-color: rgba(255,255,255,0.15); background: #1a1a1a; } .upload-zone:hover { border-color: rgba(255,255,255,0.3); } }
.upload-zone p { font-size: 13px; color: #777; margin-bottom: 4px; }
.upload-zone span { font-size: 11px; color: #999; line-height: 1.55; display: inline-block; }
.upload-preview { width: 70px; height: 70px; object-fit: contain; border-radius: 6px; margin-bottom: 8px; display: none; }
.add-var-draft-empty {
  font-size: 12px;
  color: #aaa;
  border: 0.5px dashed rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface);
}
.add-var-draft-card {
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
}
@media (prefers-color-scheme: dark) {
  .add-var-draft-empty {
    color: #aaa;
    border-color: rgba(255,255,255,0.12);
    background: #171717;
  }
  .add-var-draft-card {
    border-color: rgba(255,255,255,0.08);
    background: #171717;
  }
}

.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 0; }
.listing-card { border: 0.5px solid rgba(0,0,0,0.08); border-radius: 10px; overflow: visible; background: var(--surface); }
.var-panel-full { border: 0.5px solid rgba(0,0,0,0.08); border-radius: 10px; padding: 20px; margin: 12px 0 20px; background: var(--surface-soft); }
@media (prefers-color-scheme: dark) { .var-panel-full { background: #1a1a1a; } }
@media (prefers-color-scheme: dark) {
  .listing-card { background: #171717; border-color: rgba(255,255,255,0.08); }
  .go-group-wrap { background: #171717 !important; border-color: rgba(255,255,255,0.08) !important; }
}
.listing-img { aspect-ratio: 1; background: var(--surface-soft); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; font-size: 32px; }
@media (prefers-color-scheme: dark) { .listing-img { background: #1a1a1a; } }
.listing-img img { width: 100%; height: 100%; object-fit: contain; }
.listing-upload-hint { position: absolute; inset: 0; background: rgba(0,0,0,0.04); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; opacity: 0; transition: opacity 0.15s; font-size: 11px; color: #555; }
.listing-card:hover .listing-upload-hint { opacity: 1; }
.listing-info { padding: 10px 12px; }
.listing-name { font-size: 12px; font-weight: 500; margin-bottom: 3px; }
.listing-meta { font-size: 11px; color: #aaa; margin-bottom: 7px; }
.listing-row { display: flex; align-items: center; justify-content: space-between; }
.listing-price { font-size: 12px; font-weight: 500; }
.listing-status-sel { font-size: 11px; color: #aaa; background: none; border: none; cursor: pointer; padding: 0; outline: none; }
.listing-status-sel:hover { color: #111; }
@media (prefers-color-scheme: dark) { .listing-status-sel:hover { color: #f0f0f0; } }

.settings-sec { border: 0.5px solid rgba(0,0,0,0.08); border-radius: 11px; padding: 18px 20px; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .settings-sec { border-color: rgba(255,255,255,0.08); } }
.settings-sec h3 { font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.settings-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.settings-row > div { flex: 1; min-width: min(100%, 280px); }
.settings-label { font-size: 12px; color: #888; width: 190px; flex-shrink: 0; padding-top: 8px; }
.settings-input { flex: 1; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 180px; padding: 10px 12px; border-radius: 8px; border: 0.5px solid rgba(0,0,0,0.1); font-size: 13px; color: #111; background: var(--surface); outline: none; }
.settings-input:focus { border-color: rgba(0,0,0,0.3); }
@media (prefers-color-scheme: dark) { .settings-input { background: #1a1a1a; color: #f0f0f0; border-color: rgba(255,255,255,0.1); } }
.settings-hint { font-size: 11px; color: #bbb; margin-top: 4px; }
.settings-sec textarea.settings-input { min-height: 96px; }
.settings-collapse { border-top: 0.5px solid rgba(0,0,0,0.06); padding-top: 2px; }
.settings-collapse-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 0;
  user-select: none;
}
.settings-collapse-summary::-webkit-details-marker { display: none; }
.settings-collapse-body { padding-top: 14px; }
.settings-collapse[open] .settings-collapse-summary span:last-child { opacity: 0.7; }
.campaign-picker-title { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #888; margin-bottom: 8px; }
.campaign-picker-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 0.5px solid rgba(0,0,0,0.08); border-radius: 8px; background: var(--surface-soft); cursor: pointer; }
.campaign-picker-copy { display: grid; gap: 3px; }
.campaign-picker-name { font-size: 13px; color: #111; }
.campaign-picker-meta { font-size: 11px; color: #888; }
@media (prefers-color-scheme: dark) {
  #campaign-items-picker,
  #campaign-gifts-picker { background: #141414 !important; border-color: rgba(255,255,255,0.08) !important; }
  .campaign-picker-row { border-color: rgba(255,255,255,0.08); background: #1a1a1a; }
  .campaign-picker-name { color: #f0f0f0; }
  .campaign-picker-meta, .campaign-picker-title { color: #aaa; }
}
.info-editor-card { transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.info-editor-card.drag-target { border-color: var(--accent); background: var(--surface-soft); box-shadow: 0 0 0 2px rgba(74,92,106,0.14); }
.info-drag-handle { letter-spacing: -2px; }

.notif-item { padding: 11px 14px; border-bottom: 0.5px solid rgba(0,0,0,0.06); font-size: 13px; display: flex; align-items: flex-start; gap: 10px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--surface-soft); }
@media (prefers-color-scheme: dark) { .notif-item.unread { background: #1a1a1a; } .notif-item { border-bottom-color: rgba(255,255,255,0.06); } }
.activity-sections { display: grid; gap: 12px; padding: 12px 0 2px; }
.activity-section {
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}
.activity-section-head {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}
.activity-section-head .pkg-caret { margin-left: 2px; }
.activity-section-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.activity-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  flex: 1 1 auto;
}
.activity-section-meta {
  font-size: 11px;
  color: #8a8a8a;
  flex: 0 0 auto;
}
.activity-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #888;
  flex: 0 0 auto;
}
.activity-section-body {
  border-top: 0.5px solid rgba(0,0,0,0.06);
}
.activity-section-joiner {
  border-left: 3px solid #7f8ea3;
}
.activity-section-admin {
  border-left: 3px solid #7a5c8f;
}
.activity-section-joiner .activity-section-kicker { color: #6b7d95; }
.activity-section-admin .activity-section-kicker { color: #7b5a93; }
@media (prefers-color-scheme: dark) {
  .activity-section {
    border-color: rgba(255,255,255,0.08);
    background: #141414;
  }
  .activity-section-body {
    border-top-color: rgba(255,255,255,0.06);
  }
  .activity-section-title { color: #c8c8c8; }
  .activity-section-meta,
  .activity-section-toggle { color: #9a9a9a; }
  .activity-section-joiner {
    border-left-color: #6f839d;
    background: linear-gradient(90deg, rgba(111,131,157,0.08), rgba(20,20,20,0) 28%);
  }
  .activity-section-admin {
    border-left-color: #8765a0;
    background: linear-gradient(90deg, rgba(135,101,160,0.1), rgba(20,20,20,0) 28%);
  }
  .activity-section-joiner .activity-section-kicker { color: #9fb2c7; }
  .activity-section-admin .activity-section-kicker { color: #c5a7dc; }
}
.notif-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.notif-time { font-size: 11px; color: #aaa; margin-top: 2px; }

.combine-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid rgba(0,0,0,0.06); flex-wrap: wrap; }
.combine-row:last-child { border-bottom: none; }
@media (prefers-color-scheme: dark) { .combine-row { border-bottom-color: rgba(255,255,255,0.06); } }

@media (prefers-color-scheme: dark) {
  .admin-wrap [style*="background:#f7f7f7"],
  .tracker-wrap [style*="background:#f7f7f7"],
  .checkout-wrap [style*="background:#f7f7f7"],
  .modal [style*="background:#f7f7f7"] {
    background: #1a1a1a !important;
    border-color: rgba(255,255,255,0.06) !important;
  }
  .admin-wrap [style*="background:#f0f0f0"],
  .tracker-wrap [style*="background:#f0f0f0"],
  .checkout-wrap [style*="background:#f0f0f0"],
  .modal [style*="background:#f0f0f0"] {
    background: #242424 !important;
    color: #f0f0f0 !important;
    border-color: rgba(255,255,255,0.12) !important;
  }
  .admin-wrap [style*="background:#d1fae5"],
  .tracker-wrap [style*="background:#d1fae5"],
  .checkout-wrap [style*="background:#d1fae5"],
  .modal [style*="background:#d1fae5"] {
    background: #173128 !important;
    color: #d1fae5 !important;
    border-color: #2d5e4a !important;
  }
  .admin-wrap [style*="background:#dbeafe"],
  .tracker-wrap [style*="background:#dbeafe"],
  .checkout-wrap [style*="background:#dbeafe"],
  .modal [style*="background:#dbeafe"] {
    background: #182337 !important;
    color: #bfdbfe !important;
    border-color: #345c93 !important;
  }
  .admin-wrap [style*="background:#ede9fe"],
  .tracker-wrap [style*="background:#ede9fe"],
  .checkout-wrap [style*="background:#ede9fe"],
  .modal [style*="background:#ede9fe"] {
    background: #241a36 !important;
    color: #ddd6fe !important;
    border-color: #6b4eb0 !important;
  }
  .admin-wrap [style*="background:#fef3c7"],
  .tracker-wrap [style*="background:#fef3c7"],
  .checkout-wrap [style*="background:#fef3c7"],
  .modal [style*="background:#fef3c7"] {
    background: #2a2315 !important;
    color: #f3d78d !important;
    border-color: #8c6821 !important;
  }
  .admin-wrap [style*="background:#fbf9f6"],
  .tracker-wrap [style*="background:#fbf9f6"],
  .checkout-wrap [style*="background:#fbf9f6"],
  .modal [style*="background:#fbf9f6"] {
    background: #202020 !important;
    color: #aaa !important;
  }
  .admin-wrap [style*="border:0.5px solid rgba(0,0,0,0.12)"],
  .tracker-wrap [style*="border:0.5px solid rgba(0,0,0,0.12)"],
  .checkout-wrap [style*="border:0.5px solid rgba(0,0,0,0.12)"],
  .modal [style*="border:0.5px solid rgba(0,0,0,0.12)"] {
    border-color: rgba(255,255,255,0.18) !important;
    color: #f0f0f0 !important;
  }
  .admin-wrap [style*="color:#aaa"],
  .tracker-wrap [style*="color:#aaa"],
  .checkout-wrap [style*="color:#aaa"],
  .modal [style*="color:#aaa"] { color: #aaa !important; }
  .admin-wrap [style*="color:#666"],
  .tracker-wrap [style*="color:#666"],
  .checkout-wrap [style*="color:#666"],
  .modal [style*="color:#666"] { color: #bbb !important; }
  .admin-wrap [style*="color:#72A0C1"],
  .tracker-wrap [style*="color:#72A0C1"],
  .checkout-wrap [style*="color:#72A0C1"],
  .modal [style*="color:#72A0C1"] { color: #93c5fd !important; }
  .admin-wrap [style*="color:#1e40af"],
  .tracker-wrap [style*="color:#1e40af"],
  .checkout-wrap [style*="color:#1e40af"],
  .modal [style*="color:#1e40af"] { color: #93c5fd !important; }
  .admin-wrap [style*="color:#065f46"],
  .tracker-wrap [style*="color:#065f46"],
  .checkout-wrap [style*="color:#065f46"],
  .modal [style*="color:#065f46"] { color: #a7f3d0 !important; }
  .admin-wrap [style*="color:#92400e"],
  .tracker-wrap [style*="color:#92400e"],
  .checkout-wrap [style*="color:#92400e"],
  .modal [style*="color:#92400e"] { color: #fbbf24 !important; }
  .admin-wrap [style*="color:#e24b4a"],
  .tracker-wrap [style*="color:#e24b4a"],
  .checkout-wrap [style*="color:#e24b4a"],
  .modal [style*="color:#e24b4a"] { color: #f87171 !important; }
  .admin-wrap [style*="background:#111"][style*="color:#fff"],
  .tracker-wrap [style*="background:#111"][style*="color:#fff"],
  .checkout-wrap [style*="background:#111"][style*="color:#fff"],
  .modal [style*="background:#111"][style*="color:#fff"] {
    background: #2a2a2a !important;
    color: #f3f3f3 !important;
    border: 0.5px solid rgba(255,255,255,0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }
  .admin-wrap [style*="background:#f0f0f0"][style*="color:#111"],
  .tracker-wrap [style*="background:#f0f0f0"][style*="color:#111"],
  .checkout-wrap [style*="background:#f0f0f0"][style*="color:#111"],
  .modal [style*="background:#f0f0f0"][style*="color:#111"] {
    background: #202020 !important;
    color: #d8d8d8 !important;
    border: 0.5px solid rgba(255,255,255,0.1) !important;
  }
  .admin-wrap a[style*="color:#72A0C1"],
  .tracker-wrap a[style*="color:#72A0C1"],
  .checkout-wrap a[style*="color:#72A0C1"],
  .modal a[style*="color:#72A0C1"] { color: #93c5fd !important; }
  .admin-wrap a[style*="color:#1e40af"],
  .tracker-wrap a[style*="color:#1e40af"],
  .checkout-wrap a[style*="color:#1e40af"],
  .modal a[style*="color:#1e40af"] { color: #93c5fd !important; }
  .admin-wrap a[style*="color:#065f46"],
  .tracker-wrap a[style*="color:#065f46"],
  .checkout-wrap a[style*="color:#065f46"],
  .modal a[style*="color:#065f46"] { color: #a7f3d0 !important; }
  #checkout-orders-list > div {
    border-color: rgba(255,255,255,0.08) !important;
    background: #111 !important;
  }
  #checkout-orders-list [style*="background:#f7f7f7"] {
    background: #1a1a1a !important;
    border-color: rgba(255,255,255,0.06) !important;
  }
  #checkout-orders-list [style*="background:#f0f0f0"] {
    background: #222 !important;
    color: #f0f0f0 !important;
  }
  #checkout-orders-list [style*="background:#d1fae5"] {
    background: #173128 !important;
    color: #d1fae5 !important;
  }
  #checkout-orders-list [style*="color:#aaa"] {
    color: #aaa !important;
  }
  #checkout-orders-list [style*="color:#92400e"] {
    color: #fbbf24 !important;
  }
  #checkout-orders-list [style*="color:#991b1b"] {
    color: #f87171 !important;
  }
  #checkout-orders-list [style*="color:#065f46"] {
    color: #86efac !important;
  }
  #checkout-orders-list [style*="color:#e24b4a"] {
    color: #f87171 !important;
  }
  #checkout-orders-list a[style*="color:#72A0C1"] {
    color: #93c5fd !important;
  }
  #checkout-orders-list a[style*="color:#065f46"] {
    color: #a7f3d0 !important;
  }
}

@media (max-width: 820px) {
  .admin-wrap { padding: 22px 20px; }
  .admin-header { align-items: flex-start; }
  .stat-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-label { width: 100%; padding-top: 0; }
  .settings-row { gap: 8px; }
  .settings-row > div { min-width: 100%; }
  .fr { align-items: stretch; }
  .fsearch { width: 100%; max-width: 100%; }
  .esl { width: 100%; }
  .jgrid { grid-template-columns: 1fr; }
  .jcard-top, .jcard-order-row, .jcard-footer { padding-left: 14px; padding-right: 14px; }
  .jcard-order-row { flex-wrap: wrap; }
  .jcard-right { width: 100%; align-items: flex-start; }
  .joiner-focus-tools { padding-left: 14px; padding-right: 14px; }
  .joiner-focus-address { align-items: stretch; }
  .joiner-address-editor { max-width: none; }
  .listing-grid { grid-template-columns: 1fr; }
  .order-block-hdr, .ob-item-row, .joiners-panel { padding-left: 14px; padding-right: 14px; }
  .notif-item { padding: 12px 14px; flex-wrap: wrap; }
  .activity-sections { gap: 10px; }
  .activity-section-head {
    flex-wrap: wrap;
    align-items: center;
  }
  .activity-section-title {
    order: 2;
    width: calc(100% - 52px);
  }
  .activity-section-kicker { order: 1; }
  .activity-section-meta { order: 3; margin-left: auto; }
  .activity-section-toggle { order: 4; margin-left: auto; }
}

@media (max-width: 900px) {
  nav {
    padding: 14px 18px 12px;
    display: block;
  }
  .logo {
    width: 100%;
    display: block;
    text-align: center;
    margin: 0 auto 12px;
  }
  .nav-r {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 0 auto;
    padding-bottom: 0;
  }
  .nav-r .nl {
    width: auto;
    white-space: nowrap;
    text-align: center;
    line-height: 1;
  }
  .home-section { padding-left: 20px; padding-right: 20px; }
  .home-intro-copy { font-size: 12px; line-height: 1.75; }
  .home-section-head { align-items: flex-start; flex-direction: column; }
  .home-go-group-link { min-height: 112px; padding: 20px 18px; }
  .home-go-group-image,
  .home-go-group-thumb .item-fallback-card {
    width: 92px;
    height: 92px;
  }
  .home-go-group-name { font-size: 16px; }
  .tracker-wrap, .admin-wrap { padding: 20px; }
  .add-form-grid { grid-template-columns: 1fr; }
  .admin-tabs { gap: 18px; margin-bottom: 18px; justify-content: flex-start; }
  .stat-summary { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-section { padding-left: 16px; padding-right: 16px; }
  .home-intro-copy {
    text-align: left;
    max-width: none;
    font-size: 11px;
    line-height: 1.7;
    padding-top: 0;
  }
  .home-section-head { gap: 8px; }
  .home-section-head h2 {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
  }
  .home-inline-link {
    font-size: 12px;
  }
  .home-go-group-link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 16px 4px;
    text-align: left;
  }
  .home-go-group-thumb { width: 76px; flex: 0 0 76px; }
  .home-go-group-image,
  .home-go-group-thumb .item-fallback-card {
    width: 76px;
    height: 76px;
  }
  .home-go-group-name { font-size: 15px; }
  .home-go-group-meta { font-size: 11px; }
  .logo { font-size: 16px; letter-spacing: 0.18em; margin-bottom: 10px; }
  .nl { font-size: 12px; }
  .nav-r {
    gap: 12px;
  }
  .site-note {
    margin-top: 10px;
    padding: 0 18px;
    font-size: 12px;
  }
  .modal-overlay {
    align-items: flex-start;
    padding: 10px;
  }
  .modal {
    max-width: none !important;
    max-height: calc(100dvh - 20px);
    padding: 18px 14px 18px;
    border-radius: 12px;
  }
  .modal-close {
    margin: -4px -2px 10px auto;
  }
}

@media (max-width: 700px) {
  .tracker-wrap {
    padding: 18px 16px 28px;
  }
  .site-note {
    padding: 0 16px;
    font-size: 11px;
  }
  .tracker-header {
    margin-bottom: 16px;
  }
  .tracker-header h2 {
    font-size: 17px;
  }
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }
  .stat-card {
    padding: 12px 10px;
  }
  .stat-label {
    font-size: 10px;
    line-height: 1.3;
  }
  .stat-val {
    font-size: 15px;
  }
  .notice {
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.65;
  }
  .notice a {
    overflow-wrap: anywhere;
  }
  .addr-box {
    padding: 14px;
  }
  .addr-row {
    flex-direction: column;
    gap: 10px;
  }
  .addr-actions {
    gap: 10px;
  }
  .filter-bar {
    justify-content: flex-start;
    padding: 8px 0 14px;
  }
  .active-filters {
    justify-content: flex-start;
    gap: 8px;
    padding: 0 0 8px;
  }
  .fpanel {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    min-width: 0;
    width: 100%;
    margin-top: 10px;
    padding: 16px;
  }
  .go-group {
    margin-bottom: 18px;
  }
  .go-group-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .go-group-name {
    font-size: 14px;
  }
  .order-cards,
  .pkg-items-grid {
    grid-template-columns: 1fr;
  }
  .oc {
    padding: 14px;
  }
  .pkg-card-head {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
  }
  .pkg-card-head > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
  .pkg-items-grid {
    padding: 10px;
    gap: 8px;
  }
  .pkg-pref-sec,
  .pkg-ems-sec {
    padding: 12px 14px;
  }
  .ship-sel {
    width: 100%;
    min-width: 0;
  }
  .collapse-head {
    width: 100%;
    justify-content: space-between;
  }
}
