/* RCMI — racing livery: Indonesian red & white on deep navy, a yellow number-board highlight,
   slanted condensed type like a race poster, and diagonal livery stripes instead of decoration. */
:root {
  --red: #D6102B;
  --red-deep: #A80C21;
  --navy: #12141C;
  --navy-2: #1D2130;
  --yellow: #FFC72C;
  --white: #FFFFFF;
  --paper: #F3F3F0;
  --surface: #FFFFFF;
  --ink: #12141C;
  --muted: #5B5F6B;
  --line: #DCDCD6;
  --primer: #E7E7E2;
  --good: #1E7B4F;
  --danger: #C2141F;
  --radius-s: 4px;
  --radius-m: 8px;
  --font: "Barlow", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --stripes: linear-gradient(115deg, var(--red) 0 46%, var(--white) 46% 54%, var(--red) 54% 70%, transparent 70%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: -0.005em; }
h2 { font-size: 2rem; font-weight: 800; font-style: italic; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--red); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Buttons: slanted like livery panels ---------- */
.btn {
  font-family: var(--display); font-weight: 700; font-style: italic; font-size: 1.05rem; letter-spacing: .01em;
  border: 0; border-radius: var(--radius-s);
  padding: .55em 1.2em; cursor: pointer; min-height: 44px;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-amber { background: var(--yellow); color: var(--navy); }
.btn-amber:hover { background: #FFD45C; }
.btn-mat { background: var(--red); color: #fff; }
.btn-mat:hover { background: var(--red-deep); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 2px currentColor; }
.btn-lg { font-size: 1.25rem; padding: .55em 1.5em; }
.btn-sm { min-height: 36px; padding: .35em .85em; font-size: .95rem; }
.btn-link { background: none; border: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; padding: 4px; }

/* ---------- Top bar with red/white pinstripe ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px 18px; color: #fff;
  background: linear-gradient(to top, var(--red) 0 4px, var(--white) 4px 6px, var(--navy) 6px);
}
.wordmark { display: block; margin-right: auto; line-height: 0; }
.wordmark .logo { height: 42px; width: auto; }
.topnav { display: flex; gap: 20px; }
.topnav a { color: #fff; text-decoration: none; opacity: .85; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.1rem; }
.topnav a:hover { opacity: 1; color: var(--yellow); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border-radius: var(--radius-s); overflow: hidden; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.lang button { font: inherit; font-weight: 700; font-size: .8rem; background: none; color: #fff; border: 0; padding: 6px 10px; cursor: pointer; min-height: 36px; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--navy); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; background: var(--primer); border: 2px solid #fff; }

.banner { background: var(--yellow); color: var(--ink); padding: 12px 24px; font-weight: 600; }

/* ---------- Hero: navy with sweeping livery stripes ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: #fff;
  padding: clamp(48px, 8vw, 104px) 24px clamp(40px, 6vw, 80px);
  display: grid; gap: 48px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% -20% 46%;
  background: linear-gradient(115deg, transparent 0 22%, var(--red) 22% 46%, var(--white) 46% 50%, var(--red) 50% 58%, transparent 58% 63%, var(--yellow) 63% 64.5%, transparent 64.5%);
  opacity: .95; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-inner { max-width: 720px; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.15rem; max-width: 50ch; opacity: .88; margin-bottom: 1.4em; }

.scale-tool {
  margin: 0; background: var(--white); color: var(--ink);
  border-radius: var(--radius-m); padding: 20px 22px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6);
  border-top: 6px solid var(--red);
}
.scale-label { display: block; font-weight: 600; margin-bottom: 8px; }
.scale-input { display: flex; align-items: center; gap: 12px; }
.scale-input input { flex: 1; accent-color: var(--red); min-height: 32px; }
.scale-input output { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; min-width: 5ch; text-align: right; }
.ruler { position: relative; margin: 16px 0 10px; height: 64px; background: var(--primer); border-radius: 3px; color: var(--ink); overflow: hidden; }
.ruler-bar {
  position: absolute; left: 0; top: 10px; height: 20px; width: 70%;
  background: linear-gradient(115deg, var(--red) 0 80%, var(--white) 80% 86%, var(--red) 86%);
  border-radius: 0 3px 3px 0;
  transition: width .15s ease-out;
}
.ruler-ticks {
  position: absolute; inset: auto 0 22px 0; height: 12px;
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10%),
    repeating-linear-gradient(90deg, rgba(18,20,28,.45) 0 1px, transparent 1px 2%);
  background-size: 100% 12px, 100% 6px; background-repeat: no-repeat; background-position: 0 0, 0 6px;
}
.ruler-nums { position: absolute; inset: auto 4px 4px 2px; display: flex; justify-content: space-between; font-size: .7rem; font-weight: 600; }
.scale-tool figcaption strong { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.8rem; color: var(--red); line-height: 1.1; }
.scale-tool figcaption span { font-size: .9rem; color: var(--muted); }

/* Photo strip under the hero (fills from the event gallery) */
.pitlane { background: var(--navy); padding: 0 0 28px; overflow: hidden; }
.pitlane-track { display: flex; gap: 10px; overflow-x: auto; padding: 0 24px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pitlane-track::-webkit-scrollbar { display: none; }
.pitlane-track button {
  flex: 0 0 auto; width: clamp(200px, 26vw, 320px); aspect-ratio: 4 / 3; border: 0; padding: 0; cursor: pointer;
  border-radius: var(--radius-s); overflow: hidden; scroll-snap-align: start; background: var(--navy-2);
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
}
.pitlane-track img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Landing sections ---------- */
.about, .join { padding: clamp(48px, 7vw, 88px) 24px; max-width: 1120px; margin: 0 auto; }
#landing h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(2rem, 4vw, 2.8rem); text-transform: uppercase; }
#landing h2::before { content: ""; width: 36px; height: 18px; flex: none; background: linear-gradient(115deg, transparent 0 20%, var(--red) 20% 55%, var(--navy) 55% 68%, var(--red) 68% 85%, transparent 85%); }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
.about-grid > div { border-left: 5px solid var(--red); padding: 4px 0 4px 18px; }
.about-grid h3 { font-style: italic; font-size: 1.5rem; }
.about-grid p { color: var(--muted); max-width: 40ch; }
.join { border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 32px; display: grid; gap: 14px; max-width: 640px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 16px; font-size: 1.05rem; }
.steps li::before {
  content: counter(s); width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 3px solid var(--navy);
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.6rem;
}

.foot {
  display: flex; gap: 12px; align-items: baseline; padding: 30px 24px 24px; color: rgba(255,255,255,.75); font-size: .9rem;
  background: linear-gradient(to bottom, var(--red) 0 4px, var(--white) 4px 6px, var(--navy) 6px);
}
.foot .logo { height: 40px; width: auto; }

/* ---------- Gate panels ---------- */
#gate { padding: 48px 24px; }
.panel { max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: var(--radius-m); padding: 32px; box-shadow: 0 0 0 1px var(--line); border-top: 6px solid var(--red); }
.panel h1 { font-size: 2.4rem; }
.pending-mark { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--primer); border-top-color: var(--red); margin-bottom: 20px; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input, .form textarea, .form select {
  font: inherit; font-weight: 400; font-size: 1rem; padding: 10px 12px; min-height: 44px;
  border-radius: var(--radius-s); border: 1.5px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(214,16,43,.18); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-s); }

/* ---------- Members area ---------- */
#app { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 20px 0 24px; overflow-x: auto; }
.tabs a {
  padding: 10px 16px; text-decoration: none; color: var(--muted);
  font-family: var(--display); font-weight: 700; font-style: italic; font-size: 1.2rem;
  border-bottom: 4px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.view-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.view-head h2 { margin: 0; }
.seg { display: inline-flex; background: var(--primer); border-radius: var(--radius-s); padding: 3px; flex-wrap: wrap; }
.seg button { font: inherit; font-weight: 600; font-size: .9rem; border: 0; background: none; padding: 7px 12px; border-radius: 3px; cursor: pointer; color: var(--ink); min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.item { background: var(--surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line); cursor: pointer; text-align: left; font: inherit; border: 0; padding: 0; color: inherit; display: flex; flex-direction: column; }
.item:hover { box-shadow: 0 0 0 2px var(--red); }
.item .ph { aspect-ratio: 4 / 3; background: var(--primer); width: 100%; object-fit: cover; }
.item .ph-empty { display: grid; place-items: center; color: var(--muted); font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.4rem; }
.item .meta { padding: 12px 14px 14px; }
.item .meta h3 { margin: 0 0 4px; font-size: 1.15rem; }
.item .meta p { margin: 0; font-size: .88rem; color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; background: var(--primer); margin-bottom: 6px; }
.tag-sell { background: var(--red); color: #fff; }
.tag-trade { background: var(--yellow); color: var(--navy); }
.tag-wanted { background: var(--navy); color: #fff; }
.tag-sold { background: var(--primer); color: var(--muted); }
.price { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.1rem; color: var(--ink) !important; }
.empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius-m); }

.events { display: grid; gap: 14px; margin-bottom: 28px; }
.event { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; background: var(--surface); border-radius: var(--radius-m); padding: 16px; box-shadow: 0 0 0 1px var(--line); }
.event-date { text-align: center; background: var(--red); color: #fff; padding: 10px 4px; line-height: 1; clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%); }
.event-date b { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.2rem; }
.event-date span { font-size: .8rem; font-weight: 600; }
.event h3 { margin: 0 0 4px; font-style: italic; }
.event p { margin: 0; color: var(--muted); font-size: .92rem; }
.event .who { font-size: .82rem; margin-top: 6px; }
.past summary { cursor: pointer; font-weight: 700; padding: 8px 0; }

.rows { display: grid; gap: 8px; margin-bottom: 32px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); padding: 12px 14px; border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line); }
.row img { width: 36px; height: 36px; border-radius: 50%; background: var(--primer); }
.row .grow { flex: 1; min-width: 180px; }
.row small { color: var(--muted); display: block; }
.row .actions { display: flex; gap: 8px; }

/* ---------- Member card: matches the printed RCMI card ---------- */
#view-card { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; align-items: start; }
.mcard {
  position: relative; aspect-ratio: 0.632; width: 100%; max-width: 360px; border-radius: 16px; overflow: hidden;
  color: #3A3A3A; text-align: center;
  background:
    radial-gradient(120% 60% at 15% 10%, rgba(214, 236, 244, .95), transparent 60%),
    radial-gradient(90% 50% at 90% 30%, rgba(236, 228, 246, .9), transparent 65%),
    radial-gradient(110% 60% at 30% 75%, rgba(222, 238, 246, .85), transparent 65%),
    linear-gradient(160deg, #EAF2F6 0%, #F1ECF6 40%, #F6F6F8 70%, #E8EFF6 100%);
  padding: 9% 9% 7%; display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 18px 38px -16px rgba(18, 20, 28, .45), inset 0 0 0 1px rgba(255,255,255,.7);
}
.mcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%);
}
.mcard > * { position: relative; z-index: 1; margin: 0; }
.mcard-kicker { font-family: "Noto Serif", Georgia, serif; font-weight: 700; text-transform: uppercase; font-size: clamp(.95rem, 4.6vw, 1.35rem); letter-spacing: .01em; }
.mcard-logo { width: 88%; height: auto; margin-top: 4%; }
.mcard-photo { width: 46%; aspect-ratio: 1; height: auto; margin-top: 5%; object-fit: cover; background: #fff; border: 5px solid #fff; border-radius: 6px; box-shadow: 0 6px 16px -8px rgba(18, 20, 28, .45); }
.mcard-initials { display: grid; place-items: center; font-family: "Noto Serif", Georgia, serif; font-weight: 700; font-size: clamp(2rem, 11vw, 3.4rem); color: #3A3A3A; background: linear-gradient(160deg, #F4F6F8, #E3E8EE); }
.mcard-name { font-family: "Noto Serif", Georgia, serif; font-weight: 700; text-transform: uppercase; font-size: clamp(1.1rem, 5.6vw, 1.6rem); line-height: 1.15; margin-top: 7%; }
.mcard-no { font-family: "Noto Serif", Georgia, serif; font-weight: 700; font-size: clamp(1.2rem, 6vw, 1.7rem); line-height: 1.1; }
.mcard-sub { font-size: .78rem; color: #6B6E78; margin-top: auto; padding-top: 6%; }
.panel-flat { background: var(--surface); border-radius: var(--radius-m); padding: 24px; box-shadow: 0 0 0 1px var(--line); }

/* ---------- Modal & toast ---------- */
dialog { border: 0; border-radius: var(--radius-m); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink); background: var(--surface); border-top: 6px solid var(--red); }
dialog::backdrop { background: rgba(18, 20, 28, .65); }
#modal-body { padding: 24px; }
.detail-photos { display: grid; gap: 8px; margin: -24px -24px 18px; }
.detail-photos img { width: 100%; max-height: 360px; object-fit: cover; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--radius-s); font-weight: 600; border-left: 5px solid var(--red);
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hero stats ---------- */
/* Member count badge and the main button sit side by side at the same height and type size. */
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.hero-cta > * { min-height: 56px; margin: 0; }
.hero .stats {
  display: inline-flex; align-items: center; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.25rem;
  background: var(--yellow); color: var(--navy); padding: .55em 1.5em; border-radius: var(--radius-s);
}
.hero-cta .btn-lg { display: inline-flex; align-items: center; }
@media (max-width: 600px) { .hero-cta > * { flex: 1 1 100%; justify-content: center; } .hero-cta .stats, .hero-cta .btn-lg { font-size: 1.1rem; padding: .5em 1em; white-space: nowrap; } }

/* ---------- Gallery ---------- */
.gallery { padding: clamp(48px, 7vw, 88px) 24px; max-width: 1180px; margin: 0 auto; }
.market { padding: clamp(48px, 7vw, 88px) 24px; max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--line); }
.market .view-head { margin-top: 18px; }
.market-hint { margin: 0; }
.g-group { margin-top: 40px; }
.g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; border-left: 5px solid var(--red); padding-left: 14px; }
.g-head h3 { margin: 0; font-style: italic; font-size: 1.45rem; }
.g-head small { color: var(--muted); font-weight: 600; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.g-tile {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; overflow: hidden;
  border-radius: var(--radius-s); background: var(--primer);
}
.g-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.g-tile:hover img { transform: scale(1.05); }
.g-tile.broken::after { content: "1:64"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; color: var(--muted); }
.g-tile.broken img { display: none; }
.g-play {
  position: absolute; left: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--red); display: grid; place-items: center;
}
.g-play::before { content: ""; margin-left: 3px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.g-more { margin-top: 12px; }

#lightbox { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--navy); color: #fff; padding: 0; }
.lb-stage { display: grid; place-items: center; background: #000; min-height: 50vh; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.lb-stage iframe { width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 110px); border: 0; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.lb-bar #lb-count { margin-right: auto; font-weight: 600; font-size: .9rem; opacity: .8; }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
#btn-area, #btn-home { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }

/* ---------- Fees ---------- */
.fees { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 8px; max-width: 900px; }
.fee { background: var(--surface); border-radius: var(--radius-m); padding: 22px 24px; box-shadow: 0 0 0 1px var(--line); border-top: 6px solid var(--navy); }
.fee:first-child { border-top-color: var(--red); }
.fee p { color: var(--muted); margin-bottom: .9em; }
.fee .fee-amt { color: var(--ink); font-family: var(--display); font-style: italic; font-size: 2.2rem; font-weight: 800; margin: .1em 0 .05em; line-height: 1.1; }
.benefits { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.benefits li::marker { color: var(--red); }

/* ---------- Members directory ---------- */
.search { font: inherit; padding: 10px 12px; min-height: 44px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: #fff; width: min(320px, 100%); }
.search:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(214,16,43,.18); }
#view-members .view-head p { margin: 0; max-width: 52ch; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.r-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-align: left;
  font: inherit; color: inherit; border: 0; cursor: pointer; padding: 12px; border-radius: var(--radius-m);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.r-item:hover { box-shadow: 0 0 0 2px var(--red); }
.r-no {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--navy); border: 3px solid var(--navy);
  display: grid; place-items: center; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.45rem;
  overflow: hidden;
}
.r-no img { width: 100%; height: 100%; object-fit: cover; }
.r-applicant .r-no { border-style: dashed; border-color: var(--muted); color: var(--muted); font-size: 1.1rem; }
.r-item strong { display: block; line-height: 1.25; font-size: 1.02rem; }
.r-item small { color: var(--muted); }
.r-on { color: var(--good); font-weight: 700; }

.profile { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; align-items: start; }
.profile-back { display: inline-block; margin-bottom: 20px; }
.profile h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.profile dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 18px 0; }
.profile dt { color: var(--muted); font-weight: 600; }
.profile dd { margin: 0; }
.profile .bio { font-size: 1.05rem; max-width: 60ch; }
.admin-box { background: #FFF6D9; border-left: 5px solid var(--yellow); border-radius: var(--radius-s); padding: 14px 18px; margin: 18px 0; }
.admin-box small { color: #8A6400; font-weight: 700; display: block; margin-bottom: 6px; }
.profile h2 { margin-top: 28px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

@media (max-width: 860px) {
  .fees { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gallery, .market { padding-left: 16px; padding-right: 16px; }
  .g-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
}

/* ---------- Dues ---------- */
.chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 3px; white-space: nowrap; }
.chip-paid, .chip-reg { background: #DCF2E6; color: var(--good); }
.chip-waived { background: var(--primer); color: var(--ink); }
.chip-pending { background: #FFF0C2; color: #7A5900; }
.chip-due { background: #EEEEEA; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip-overdue, .chip-rejected { background: #FBDADD; color: var(--danger); }
.dues-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; align-items: start; }
.dues-now, .dues-how { background: var(--surface); border-radius: var(--radius-m); padding: 22px 24px; box-shadow: 0 0 0 1px var(--line); }
.dues-now { position: relative; overflow: hidden; background: var(--navy); color: #fff; box-shadow: none; }
.dues-now::after { content: ""; position: absolute; inset: 0 -40% 0 62%; background: linear-gradient(115deg, transparent 0 25%, var(--red) 25% 55%, var(--white) 55% 60%, var(--red) 60% 70%, transparent 70%); }
.dues-now > * { position: relative; z-index: 1; }
.dues-now .muted { color: rgba(255,255,255,.75); margin: 0; }
.dues-now h2 { margin: 4px 0 10px; color: #fff; font-size: 2.1rem; }
.dues-now .fee-amt { font-family: var(--display); font-style: italic; font-size: 2.4rem; font-weight: 800; margin: 10px 0 0; }
.dues-how { border-top: 6px solid var(--red); }
.dues-how .acct { font-size: 1.1rem; }
.dues-form { margin-bottom: 28px; }
.dues-sum { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; background: var(--surface); border-radius: var(--radius-m); padding: 16px 20px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 14px; }
.dues-sum p { margin: 0; }
.dues-sum .fee-amt { font-family: var(--display); font-style: italic; font-size: 1.9rem; font-weight: 800; text-align: right; }
.r-no.small { width: 44px; height: 44px; font-size: 1.1rem; flex: none; border-width: 2px; }
.inline-label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.inline-label .search { width: auto; }
.dues-settings { margin-top: 24px; }
.dues-settings summary { cursor: pointer; padding: 4px 0; }
.dues-settings form { margin-top: 14px; }
@media (max-width: 760px) { .dues-top { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero::before { inset: auto -40% -6% 20%; height: 46%; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  #view-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .topbar { padding: 10px 16px 16px; }
  .topnav { display: none; }
  .wordmark .logo { height: 28px; }
  .hero, .about, .join, #gate { padding-left: 16px; padding-right: 16px; }
  .pitlane-track { padding: 0 16px; }
  #app { padding: 0 16px 48px; }
  .tabs { flex-wrap: wrap; overflow: visible; gap: 0 2px; }
  .tabs a { padding: 8px 10px; font-size: 1.1rem; }
  .event { grid-template-columns: 64px 1fr; }
  .event .event-act { grid-column: 1 / -1; }
  .form .row2 { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  #btn-signin { padding: .35em .7em; font-size: .9rem; min-height: 38px; }
  .topbar { gap: 10px; flex-wrap: nowrap; }
  .top-actions { gap: 8px; }
  .lang button { padding: 5px 8px; }
  .user-chip img { display: none; }
  #btn-area, #btn-home { padding: .35em .7em; font-size: .9rem; min-height: 38px; display: inline-flex; align-items: center; text-decoration: none; }
}

/* ---------- QRIS ---------- */
.qris { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; margin: 14px 0 18px; }
.qris img { width: 180px; height: auto; background: #fff; border-radius: var(--radius-s); padding: 8px; box-shadow: 0 0 0 1px var(--line); }
.qris p { margin-bottom: .7em; }
.qris .btn { display: inline-block; text-decoration: none; margin-bottom: .7em; }
.qris-then { font-size: .9rem; }
.qris-preview img { width: 120px; height: auto; object-fit: contain; background: #fff; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; min-height: 0; }
@media (max-width: 520px) {
  .qris { grid-template-columns: 1fr; }
  .qris img { width: min(260px, 100%); margin: 0 auto; }
}

/* ---------- Email invites ---------- */
.invite-note { background: #DCF2E6; color: var(--good); font-weight: 600; padding: 10px 14px; border-left: 5px solid var(--good); border-radius: var(--radius-s); }
.invite-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(138,100,0,.2); }
.invite-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; min-height: 38px; border: 1.5px solid var(--line); border-radius: var(--radius-s); }
.invite-form small { display: block; margin-top: 4px; }

/* ---------- Account type choice ---------- */
.acct { border: 0; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.acct legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.acct-opt { display: grid !important; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-m); cursor: pointer; background: #fff; }
.acct-opt:has(input:checked) { border-color: var(--red); background: #FFF5F6; }
.acct-opt input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--red); }
.acct-opt strong { display: block; font-family: var(--display); font-style: italic; font-size: 1.15rem; }
.acct-opt small { display: block; color: var(--muted); font-weight: 400; font-size: .86rem; line-height: 1.4; }
.type-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 3px; background: var(--navy); color: #fff; margin-left: 6px; vertical-align: middle; }
.type-tag.general { background: var(--yellow); color: var(--navy); }

/* ---------- Finance (Laba Rugi) ---------- */
.fin-head h2 { margin: 0; }
.fin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fin-actions .search { width: auto; }
.fin-import { display: inline-flex; align-items: center; cursor: pointer; }
.fin-note { margin-top: -8px; font-size: .9rem; }
.fin-empty { text-align: left; max-width: 640px; }
.fin-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fin-tile { background: var(--surface); border-radius: var(--radius-m); padding: 14px 16px; box-shadow: 0 0 0 1px var(--line); border-top: 5px solid var(--navy); }
.fin-tile span { display: block; color: var(--muted); font-size: .85rem; font-weight: 600; }
.fin-tile b { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.6rem; line-height: 1.15; }
.fin-tile.pos { border-top-color: var(--good); } .fin-tile.pos b { color: var(--good); }
.fin-tile.neg { border-top-color: var(--danger); } .fin-tile.neg b { color: var(--danger); }
.fin-tile.dark { background: var(--navy); color: #fff; border-top-color: var(--red); } .fin-tile.dark span { color: rgba(255,255,255,.7); }
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.fin-side { display: grid; gap: 16px; }
.fin-pl h3, .fin-card h3, .fin-monthly h3 { margin-bottom: 2px; font-style: italic; }
.fin-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.fin-table td, .fin-table th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fin-table th { font-size: .8rem; color: var(--muted); font-weight: 700; }
.fin-table .num { text-align: right; white-space: nowrap; }
.fin-table tr.sec td { padding-top: 16px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.15rem; border-bottom: 2px solid var(--navy); }
.fin-table tr.grp td { font-weight: 700; padding-top: 10px; }
.fin-table tr.sub td:first-child { padding-left: 16px; color: var(--muted); }
.fin-table tr.total td { font-weight: 700; border-top: 2px solid var(--navy); }
.fin-table tr.net td { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.25rem; border-top: 3px double var(--navy); border-bottom: 0; }
.fin-table td small { display: block; color: var(--muted); }
.fin-table .neg { color: var(--danger); }
.fin-card .net td.num { color: inherit; }
.small { font-size: .85rem; }
.fin-warn { background: #FFF6D9; border-left: 5px solid var(--yellow); border-radius: var(--radius-s); padding: 14px 16px; }
.fin-warn h3 { font-size: 1.1rem; font-style: italic; margin-bottom: 6px; }
.fin-warn p { margin: 0 0 .5em; font-size: .92rem; }
.fin-monthly { margin-bottom: 20px; overflow-x: auto; }
.fin-ledger { overflow-x: auto; }
.fin-ledger summary { cursor: pointer; }
.fin-ledger table { margin-top: 12px; }
@media (max-width: 860px) {
  .fin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-grid { grid-template-columns: 1fr; }
  .fin-tile b { font-size: 1.3rem; }
}
@media print {
  .topbar, .tabs, .foot, .fin-actions, .fin-note, .fin-ledger, #app > :not(#view-finance), .toast { display: none !important; }
  body { background: #fff; }
  #app { padding: 0; max-width: none; }
  .panel-flat, .fin-tile { box-shadow: none; border: 1px solid #ccc; }
  .fin-grid { grid-template-columns: 1fr 1fr; }
}

.mem-sync-bar { justify-content: flex-start; background: #FFF6D9; border-left: 5px solid var(--yellow); padding: 10px 14px; border-radius: var(--radius-s); }

/* ---------- Contact & inbox ---------- */
.contact { padding: clamp(48px, 7vw, 88px) 24px; max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.contact-form, .contact-signin, .contact-done { background: var(--surface); border-radius: var(--radius-m); padding: 22px 24px; box-shadow: 0 0 0 1px var(--line); border-top: 6px solid var(--red); margin-top: 18px; }
.contact-signin p { margin-bottom: 14px; }
.contact-done { color: var(--good); font-weight: 700; border-top-color: var(--good); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#tab-admin[data-count]:not([data-count=""])::after { content: attr(data-count); display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-family: var(--font); font-style: normal; font-size: .75rem; font-weight: 700; vertical-align: 2px; }
.inbox-count { font-size: 1rem; color: var(--red); font-family: var(--font); font-style: normal; }
.inbox { margin-bottom: 36px; }
.msg { background: var(--surface); border-radius: var(--radius-m); padding: 14px 16px; box-shadow: 0 0 0 1px var(--line); }
.msg-new { box-shadow: 0 0 0 2px var(--red); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.msg-head .tag { margin: 0; }
.msg-head small { margin-left: auto; }
.msg-body { white-space: pre-wrap; margin: 8px 0; }
.msg .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg .actions a { text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 600px) { .contact { padding-left: 16px; padding-right: 16px; } }

/* ---------- Joining fee (new member pending) & admin lists ---------- */
.join-pay { text-align: left; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.join-pay h2 { font-size: 1.3rem; margin-bottom: 8px; }
.join-pay .qris { margin: 14px 0; }
.join-pay .form { margin-top: 14px; }
.joinpay-ok { color: var(--good); font-weight: 700; margin: 12px 0 0; }
.proof-btn { margin-top: 6px; align-self: flex-start; }
.proof-img { display: block; max-width: 100%; max-height: 70vh; margin: 8px auto; border-radius: var(--radius-m); }

/* View-only gallery media */
img[src*="drive.google.com"] { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.lb-video { position: relative; width: 100%; }
.lb-video iframe { display: block; }
.lb-shield { position: absolute; top: 0; right: 0; width: 72px; height: 64px; background: transparent; z-index: 2; }
.row .actions a.btn { text-decoration: none; }
@media (max-width: 400px) { #btn-signin { font-size: .8rem; padding-left: 10px; padding-right: 10px; } }

/* ---------- Admin notification bell ---------- */
.bell-wrap { position: relative; }
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; }
.bell:hover, .bell[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--navy); }
.bell-count[hidden] { display: none; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border-radius: var(--radius-m); box-shadow: 0 12px 40px rgba(0,0,0,.3); z-index: 50; overflow: hidden; border-top: 4px solid var(--red); }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bell-head .btn-link { color: var(--red); font-size: .85rem; }
.bell-list { max-height: 60vh; overflow-y: auto; }
.bell-item { display: block; padding: 10px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: .9rem; line-height: 1.35; }
.bell-item:hover { background: rgba(0,0,0,.04); }
.bell-item.unread { background: rgba(214,16,43,.06); box-shadow: inset 3px 0 0 var(--red); }
.bell-item small { display: block; color: var(--muted); margin-top: 3px; font-size: .78rem; }
.bell-empty { padding: 16px; margin: 0; }
.bell-foot { display: block; padding: 11px 16px; text-align: center; font-weight: 700; color: var(--red); text-decoration: none; }
@media (max-width: 600px) { .bell { width: 36px; height: 36px; } .bell-panel { position: fixed; right: 16px; top: 64px; } }
@media (max-width: 480px) {
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .top-actions { gap: 6px; flex-shrink: 0; }
  .wordmark { min-width: 0; flex-shrink: 1; }
  .wordmark .logo { height: 24px; }
  .lang button { padding: 4px 6px; font-size: .78rem; }
  #btn-area, #btn-home, #btn-signin { font-size: .78rem; padding: .3em .55em; min-height: 34px; }
  .user-chip .btn-link { font-size: .8rem; white-space: nowrap; }
  .bell { width: 34px; height: 34px; }
}

/* General users under the member list (admins) */
.general-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.general-section > p { margin: -4px 0 14px; }
.r-general { cursor: default; text-align: left; }
.r-general small { display: block; overflow-wrap: anywhere; }
.r-wa { display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 700; color: var(--red); }

.type-tag.blocked { background: var(--ink); color: #fff; }

/* Sign-in chooser */
.choose-label { font-weight: 700; margin: 16px 0 8px; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.choose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choose-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--radius-m); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.choose-opt:hover, .choose-opt:focus-visible { border-color: var(--red); background: rgba(214,16,43,.04); outline: none; }
.choose-opt.create { border-style: dashed; }
.choose-opt strong { display: block; font-size: 1rem; margin-bottom: 3px; }
.choose-opt small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.choose-ic { font-size: 1.4rem; line-height: 1; }
.choose-note { margin: 16px 0 0; font-size: .85rem; }
@media (max-width: 560px) { .choose-grid { grid-template-columns: 1fr; } }
.intent-note { background: #FFF4D6; color: #6B4E00; border-left-color: var(--yellow); }

.deact-box { margin: 18px 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius-m); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.deact-box p { margin: 0; flex-basis: 100%; }
.r-deact { margin-top: 6px; margin-left: 10px; background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.r-deact:hover { color: var(--red); }

/* ---------- Collection feed (Instagram-style) ---------- */
.feed-sec { padding: clamp(48px, 7vw, 88px) 24px; border-top: 1px solid var(--line); }
.feed-sec > h2, .feed-sec > p, .feed-actions { max-width: 520px; margin-left: auto; margin-right: auto; }
.feed-actions { margin-top: 12px; margin-bottom: 20px; }
.feed-actions .btn { text-decoration: none; display: inline-block; }
.feed { max-width: 520px; margin: 0 auto; display: grid; gap: 22px; }
.post { background: var(--surface); border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.post-head strong { display: block; font-size: .95rem; }
.post-head small { display: block; color: var(--muted); font-size: .78rem; }
.post-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--red); }
.post-av img { width: 100%; height: 100%; object-fit: cover; }
.post-media { position: relative; background: #0d0f15; aspect-ratio: 1 / 1; user-select: none; }
.post-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.post-track::-webkit-scrollbar { display: none; }
.post-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; -webkit-user-drag: none; }
.post-empty { height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.25); font-size: 3rem; font-weight: 800; font-style: italic; }
.post-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.post-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.post-dots i.on { background: #fff; }
.post-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 3px 8px; border-radius: 99px; }
.post-heart { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6rem; color: #fff; opacity: 0; transform: scale(.4); pointer-events: none; text-shadow: 0 4px 20px rgba(0,0,0,.35); }
.post-heart.pop { animation: heartpop .8s ease forwards; }
@keyframes heartpop { 15% { opacity: .95; transform: scale(1.15); } 30% { transform: scale(.95); } 70% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
.post-actions { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; }
.like { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink); display: grid; }
.like svg path { fill: none; stroke: currentColor; stroke-width: 1.8; }
.like.on { color: var(--red); }
.like.on svg path { fill: currentColor; }
.like:active { transform: scale(.88); }
.like-count { font-weight: 700; font-size: .9rem; }
.post-cap { padding: 4px 14px 0; margin: 0; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.post-maker { color: var(--muted); }
.post-time { display: block; padding: 6px 14px 14px; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.feed-more-wrap { text-align: center; margin-top: 22px; }
@media (max-width: 600px) { .feed-sec { padding-left: 0; padding-right: 0; } .feed-sec > h2, .feed-sec > p, .feed-actions { padding: 0 16px; } .post { border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } }
/* Phones: the main-page sections become a swipeable row under the top bar. */
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topnav:not([hidden]) { display: flex; order: 3; width: 100%; overflow-x: auto; gap: 18px; padding: 2px 0 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { font-size: .95rem; white-space: nowrap; flex: none; }
}
#feedpage .feed-sec { border-top: 0; padding-top: clamp(28px, 5vw, 56px); min-height: 70vh; }
#feedpage h1 { max-width: 520px; margin: 0 auto 8px; }
.topnav a.on { opacity: 1; color: var(--yellow); }
@media (max-width: 600px) { #feedpage h1 { padding: 0 16px; } }

/* ---------- Instagram-style collection page ---------- */
.ig-head { max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ig-head h1 { margin: 0 !important; }
.ig-plus { background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; border-radius: 10px; display: grid; }
.ig-plus:hover { color: var(--red); background: rgba(214,16,43,.06); }
.feed-sec > p.ig-lead { margin-top: 6px; }
.ig-people { max-width: 520px; margin: 14px auto 18px; display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.ig-people::-webkit-scrollbar { display: none; }
.ig-person { flex: none; width: 66px; text-align: center; color: var(--ink); text-decoration: none; }
.ig-person small { display: block; margin-top: 4px; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-ring { width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700;
  box-shadow: 0 0 0 2px var(--bg, #F2F2EE), 0 0 0 4px var(--line); }
.ig-ring img { width: 100%; height: 100%; object-fit: cover; }
.ig-ring.all { background: var(--red); font-size: 1.3rem; }
.ig-person.on .ig-ring, .ig-person:hover .ig-ring { box-shadow: 0 0 0 2px var(--bg, #F2F2EE), 0 0 0 4px var(--red); }
.ig-person.on small { font-weight: 700; }
.ig-ring.big { width: 86px; height: 86px; font-size: 1.6rem; margin: 0; flex: none; }
.post-head[data-owner] { cursor: pointer; }
#feed-profile { max-width: 935px; margin: 0 auto; }
.ig-profile { display: flex; align-items: center; gap: 22px; padding: 6px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ig-profile h2 { margin: 0 0 2px; font-size: 1.5rem; }
.ig-profile p { margin: 0; }
.ig-stats { display: flex; gap: 18px; margin-top: 8px !important; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ig-tile { position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0; background: #0d0f15; cursor: pointer; overflow: hidden; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.ig-tile > span:not(.ig-hover) { color: rgba(255,255,255,.3); font-weight: 800; font-style: italic; font-size: 1.4rem; }
.ig-multi { position: absolute; top: 6px; right: 8px; color: #fff; font-style: normal; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ig-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; font-weight: 700; opacity: 0; transition: opacity .15s; }
.ig-tile:hover .ig-hover { opacity: 1; }
.post-modal { margin: -8px; }
.post-modal .post { box-shadow: none; }
.ig-fab { display: none; }
@media (max-width: 600px) {
  .ig-head { padding: 0 16px; }
  .ig-people { padding-left: 16px; padding-right: 16px; }
  #feed-profile { padding: 0; }
  .ig-profile { padding: 6px 16px 18px; gap: 16px; }
  .ig-grid { gap: 2px; }
  .ig-fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; border: 0;
    background: var(--red); color: #fff; font-size: 2rem; line-height: 1; box-shadow: 0 8px 24px rgba(214,16,43,.45); z-index: 40; cursor: pointer; }
  #feedpage[hidden] .ig-fab { display: none; }
}

/* Feed & market pages */
#feedpage h1, #marketpage h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
#marketpage .market { border-top: 0; padding-top: clamp(28px, 5vw, 56px); min-height: 70vh; }
/* Share */
.post-actions .share { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink); display: grid; }
.post-actions .share:hover { color: var(--red); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; }
.share-btn svg { width: 18px; height: 18px; }
.share-what { margin: -4px 0 14px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.share-opt { display: grid; place-items: center; min-height: 52px; border-radius: var(--radius-m); color: #fff; text-decoration: none; border: 0; cursor: pointer; font: inherit; }
.share-opt.wa { background: #25D366; } .share-opt.tg { background: #229ED9; } .share-opt.fb { background: #1877F2; } .share-opt.x { background: #000; }
.share-opt.copy { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); }
.share-url { width: 100%; margin-top: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); font: inherit; font-size: .85rem; color: var(--muted); background: transparent; }

/* Market safety notice */
.market-notice { margin: 16px 0 22px; padding: 14px 18px 12px; border-radius: var(--radius-m); background: #FFF4D6; border-left: 6px solid var(--yellow); color: #4A3800; max-width: 760px; }
.market-notice strong { display: block; margin-bottom: 6px; color: var(--ink); }
.market-notice ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .95rem; }
.market-notice a { color: var(--red); font-weight: 700; }
.listing-risk { font-size: .85rem; background: #FFF4D6; color: #4A3800; padding: 8px 12px; border-radius: var(--radius-s); }

/* Post: Instagram-style layout (collage) */
.post-mode { margin: 4px 0 2px; }
.lay-choices { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.lay-opt { position: relative; width: 52px; height: 52px; padding: 0; border-radius: 8px; border: 2px solid var(--line); background: #fff; cursor: pointer; overflow: hidden; }
.lay-opt i { position: absolute; box-sizing: border-box; border: 2px solid #fff; background: #C9CBD3; }
.lay-opt[aria-pressed="true"] { border-color: var(--red); }
.lay-opt[aria-pressed="true"] i { background: var(--red); opacity: .75; }
.lay-stage { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1 / 1; background: #f1f1ee; border-radius: var(--radius-s); overflow: hidden; }
.lay-stage canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.lay-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; margin: 0; background: #f1f1ee; }
.lay-tools { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.lay-check { display: inline-flex !important; align-items: center; gap: 6px; flex-direction: row !important; font-weight: 600; }
.lay-check input { width: auto; }

.post-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #111; font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); z-index: 2; }
.post-nav[hidden] { display: none; }
.post-nav.prev { left: 10px; } .post-nav.next { right: 10px; }
@media (hover: none) { .post-nav { display: none; } }
.lay-more { margin-top: 14px; }
.migrate { margin: 24px 0; padding: 16px 18px; border-left: 5px solid var(--red); }
.migrate p { margin: 6px 0 12px; }
.topnav a[hidden] { display: none !important; }
/* Top bar stays visible while scrolling */
.topbar { position: sticky; top: 0; z-index: 60; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
section[id], [id="contact"], [id="join"] { scroll-margin-top: 96px; }
@media (max-width: 600px) { section[id] { scroll-margin-top: 120px; } }
#view-collection .view-head a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Moderation */
.post-head { position: relative; }
.post-mod { margin-left: auto; background: none; border: 0; font-size: 1.4rem; line-height: 1; padding: 4px 8px; cursor: pointer; color: var(--ink); border-radius: 8px; }
.post-mod:hover { background: rgba(0,0,0,.06); }
.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin: 10px 0; border: 1px dashed var(--red); border-radius: var(--radius-s); }
.mod-bar small { flex-basis: 100%; color: var(--red); font-weight: 700; }
.mod-note { background: #FDECEE; color: #7A0A18; padding: 10px 12px; border-radius: var(--radius-s); border-left: 4px solid var(--red); }
.tag-hidden { background: var(--ink) !important; color: #fff !important; }
.bell-note { display: block; font-style: normal; color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* Posts keep the photo's shape: no cropping */
.post-media { aspect-ratio: 1 / 1; transition: aspect-ratio .2s; }
.post-track img { object-fit: contain; background: #0d0f15; }

/* Market rules */
.market-rules { margin: 0 0 22px; padding: 12px 18px; border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); max-width: 760px; }
.market-rules summary { cursor: pointer; list-style: none; }
.market-rules summary::-webkit-details-marker { display: none; }
.market-rules summary::before { content: "▸ "; color: var(--red); }
.market-rules[open] summary::before { content: "▾ "; }
.market-rules ol { margin: 12px 0 4px; padding-left: 22px; display: grid; gap: 12px; }
.market-rules li b { display: block; text-transform: uppercase; letter-spacing: .02em; }
.market-rules li p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.market-rules a { color: var(--red); font-weight: 700; }
.rules-ok { align-items: flex-start !important; font-weight: 500 !important; }
.rules-ok input { margin-top: 3px; }
.rules-ok a { color: var(--red); }
/* Videos: use the whole screen height so portrait (phone) videos aren't tiny; Drive's player fits the video inside. */
.lb-video { height: calc(100vh - 110px); height: calc(100dvh - 110px); }
.lb-video iframe { width: 100%; height: 100%; aspect-ratio: auto; max-height: none; }
@media (max-width: 700px) {
  #lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  #lightbox .lb-stage { height: calc(100dvh - 60px); min-height: 0; }
  #lightbox .lb-stage img { max-height: calc(100dvh - 60px); }
  .lb-video { height: calc(100dvh - 60px); }
  .lb-bar { padding: 8px 10px; flex-wrap: nowrap; }
  .lb-bar .btn { padding: .35em .7em; }
}

/* ---------- Comments & replies ---------- */
.cmt-btn { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink); display: grid; }
.cmt-btn:hover { color: var(--red); }
.post-cmts { padding: 4px 14px 0; font-size: .92rem; }
.post-cmts:empty { display: none; }
.cmt-all, .cmt-add { display: block; background: none; border: 0; padding: 2px 0; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.cmt-all:hover, .cmt-add:hover { color: var(--ink); }
.cmt-mini { margin: 2px 0; overflow-wrap: anywhere; }
.cmt-at { color: #1a5fb4; font-weight: 600; }
.cmt-title { font-size: 1.05rem; margin: 18px 0 8px; }
.cmt-list { display: grid; gap: 12px; max-height: 50vh; overflow-y: auto; padding-right: 4px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt-reply { margin-left: 42px; }
.cmt-av { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: .72rem; font-weight: 700; }
.cmt-reply .cmt-av { width: 26px; height: 26px; font-size: .62rem; }
.cmt-av img { width: 100%; height: 100%; object-fit: cover; }
.cmt-body p { margin: 0; font-size: .93rem; overflow-wrap: anywhere; }
.cmt-body small { color: var(--muted); font-size: .76rem; }
.cmt-act { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.cmt-act:hover { color: var(--red); }
.cmt-replying { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 6px 10px; background: rgba(0,0,0,.05); border-radius: 8px; font-size: .85rem; color: var(--muted); }
.cmt-replying[hidden] { display: none; }
.cmt-replying button { background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--muted); }
.cmt-form { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.cmt-form input[name=text] { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: 8px 0; outline: none; }
.cmt-post { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-weight: 800; }
.cmt-post:disabled { opacity: .5; }
.cmt-signin { margin-top: 12px; }
.cmt-inline { border-top: 1px solid var(--line); margin-top: 14px; }
.cmt-sheet .cmt-title { margin-top: 4px; }
.cmt-of { margin: 0 0 4px; }

/* Search */
.ig-head h1 { margin-right: auto !important; }
.ig-search { max-width: 520px; margin: 12px auto 4px; }
.ig-search input, .mk-search input { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: inherit; }
.ig-search input:focus, .mk-search input:focus { outline: 2px solid var(--red); outline-offset: 0; }
#feed-results { max-width: 935px; margin: 10px auto 0; }
.ig-found { margin: 0 0 10px; }
.ig-hover { font-size: .85rem; padding: 8px; text-align: center; }
.mk-search { position: relative; flex: 1 1 220px; max-width: 340px; }
.mk-search span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; }
.mk-search input { padding-left: 40px; }
@media (max-width: 600px) { .ig-search, #feed-results { padding: 0 16px; } #feed-results { padding: 0; } .ig-found { padding: 0 16px; } .mk-search { max-width: none; flex-basis: 100%; order: 3; } }
.hashtag { color: #1a5fb4; font-weight: 600; text-decoration: none; }
.hashtag:hover { text-decoration: underline; }
.l-actions { padding: 4px 0 0; }
.l-likes { color: var(--red); font-weight: 700; font-size: .85rem; margin: 2px 0 0; }
.sold-note { background: #E6F4EA; color: #14532D; padding: 10px 12px; border-radius: var(--radius-s); border-left: 4px solid var(--good); }
.cmt-closed { margin-top: 12px; }

/* ---------- War buy ---------- */
.war-opts { padding: 10px 12px; border-radius: var(--radius-s); background: #FFF4D6; }
.war-opts .lay-check { align-items: flex-start !important; }
.war-fields { margin-top: 8px; }
.tag-war { background: var(--yellow) !important; color: var(--ink) !important; }
.war-box { margin: 14px 0; padding: 14px 16px; border-radius: var(--radius-m); background: var(--navy); color: #fff; }
.war-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.war-head strong { color: var(--yellow); letter-spacing: .04em; }
.war-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.15); margin: 10px 0; overflow: hidden; }
.war-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); transition: width .3s; }
.war-start { color: rgba(255,255,255,.7) !important; margin: 0 0 8px; font-size: .85rem; }
.war-action { margin: 10px 0 14px; }
.war-action .muted { color: rgba(255,255,255,.75); }
.war-buy { width: 100%; font-size: 1.15rem; padding: .8em; }
.war-buy:disabled { background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); border: 0; }
.war-got { font-weight: 800; color: var(--yellow); margin: 0 0 8px; }
.war-box h4 { margin: 0 0 8px; font-size: .95rem; }
.war-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.war-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.06); }
.war-list li.me { background: rgba(255,199,44,.18); }
.war-n { font-weight: 800; color: var(--yellow); min-width: 28px; }
.war-name { flex: 1; font-weight: 600; }
.war-list small { color: rgba(255,255,255,.6); }
.war-list .cmt-act { color: rgba(255,255,255,.7); }
.war-box .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.war-opts input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.war-explain { margin: 0 0 8px; }

/* Address */
fieldset.addr { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px 4px; margin: 6px 0 10px; display: grid; gap: 10px; }
fieldset.addr legend { font-weight: 800; padding: 0 6px; }
fieldset.addr legend small { font-weight: 500; color: var(--muted); }
.addr-banner { display: block; margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-m); background: #FFF4D6; border-left: 5px solid var(--yellow); color: #4A3800; font-weight: 700; text-decoration: none; }
.addr-banner[hidden] { display: none; }
.addr-admin { margin: 8px 0 0; font-size: .9rem; }

.my-addr { margin: 16px 0; }
.my-addr h3 { margin: 0 0 8px; }
.my-addr address { font-style: normal; line-height: 1.55; }
.my-addr .small { font-size: .82rem; margin: 8px 0 10px; }
.my-addr .btn { text-decoration: none; display: inline-block; }
@media (min-width: 901px) { #view-card .my-addr { grid-column: 1; margin: 0; } #view-card #form-profile { grid-column: 2; grid-row: 1 / span 2; } }
@media (min-width: 901px) { #view-card { grid-template-rows: auto 1fr; } #view-card .my-addr { align-self: start; margin-top: 4px; } }
.addr-same { font-weight: 600 !important; }
input[readonly] { background: rgba(0,0,0,.04); color: var(--muted); }

/* Profile: read-only until Edit */
.prof-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prof-head h2 { margin: 0; }
#form-profile.locked input, #form-profile.locked select, #form-profile.locked textarea { background: transparent; border-color: transparent; color: var(--ink); padding-left: 0; opacity: 1; -webkit-text-fill-color: var(--ink); }
#form-profile.locked select { appearance: none; background-image: none; }
#form-profile.locked .addr-same, #form-profile.locked input::placeholder, #form-profile.locked textarea::placeholder { visibility: hidden; }
#form-profile.locked fieldset.addr { border-style: dashed; }
input.autofilled { box-shadow: 0 0 0 3px rgba(31, 138, 76, .35); transition: box-shadow .3s; }

/* Live war stock on cards */
.l-stock { position: relative; margin: 6px 0 2px; padding: 6px 8px 10px; border-radius: 8px; background: #FFF4D6; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.l-stock span { font-weight: 800; color: var(--red); }
.l-stock small { color: var(--muted); font-size: .78rem; }
.l-stock i { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 4px; border-radius: 99px; background: rgba(0,0,0,.1); overflow: hidden; }
.l-stock i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: linear-gradient(90deg, var(--yellow), var(--red)); }
.l-stock.out { background: rgba(0,0,0,.06); }
.l-stock.out span { color: var(--ink); }
.l-start { flex-basis: 100%; }

/* Activity tab */
.act-filter { margin: 10px 0 16px; }
.act-list { display: grid; gap: 8px; max-width: 760px; }
.act-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: inherit; text-decoration: none; line-height: 1.35; }
.act-item:hover { box-shadow: 0 0 0 1px var(--red); }
.act-item.unread { box-shadow: inset 4px 0 0 var(--red), 0 0 0 1px var(--line); }
.act-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.05); font-size: 1rem; }
.act-like { color: var(--red); }
.act-claim { background: #FFF4D6; }
.act-body small { display: block; color: var(--muted); margin-top: 3px; font-size: .8rem; }
.post-del { font-size: 1.05rem; }
#view-admin.mod-view .admin-only { display: none !important; }

/* Seller reputation */
.rep-badge { display: inline-flex; align-items: baseline; gap: 3px; font: inherit; font-size: .82rem; font-weight: 700; color: #8A5A00; background: #FFF4D6; border: 0; border-radius: 999px; padding: 1px 8px; cursor: pointer; white-space: nowrap; }
span.rep-badge { cursor: default; }
.rep-badge small { font-weight: 600; color: var(--muted); }
.ig-rep { margin: 6px 0 0 !important; font-size: .9rem; }
.rep-sum { display: grid; gap: 4px; margin: 6px 0 14px; }
.rep-sum strong { font-size: 2rem; margin-right: 8px; }
.rep-stars { color: #E0A100; letter-spacing: 1px; }
.rep-list { display: grid; gap: 10px; max-height: 55vh; overflow: auto; }
.rep-item { padding: 10px 12px; border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line); }
.rep-item header { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.rep-item p { margin: 4px 0 0; }
.rep-item-t { font-size: .85rem; }
.rep-reply { background: rgba(0,0,0,.04); padding: 6px 10px; border-radius: var(--radius-s); font-size: .9rem; }
.rep-reply-form { display: flex; gap: 6px; margin-top: 6px; }
.rep-reply-form input { flex: 1; min-width: 0; }
.rate-btn { margin: 6px 0; }
.rate-stars { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { font-size: 2.2rem; line-height: 1; color: #D6D6D6; cursor: pointer; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: #E0A100; }
.rate-stars input:focus-visible + label { outline: 2px solid var(--red); border-radius: 4px; }
.buyer-list { display: grid; gap: 4px; }
.buyer-opt { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.buyer-opt input { width: auto; }

/* Direct messages */
.dm-btn { text-decoration: none; }
.dm-btn[hidden] { display: none; }
.dm-sec { max-width: 1000px; margin: 0 auto; padding: 24px 16px 40px; }
.dm-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--line); background: var(--surface); min-height: 60vh; overflow: hidden; }
.dm-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 72vh; }
.dm-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.dm-row:hover, .dm-row.on { background: rgba(0,0,0,.04); }
.dm-row.unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.dm-row-t { flex: 1; min-width: 0; display: grid; }
.dm-row-t small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row.unread .dm-row-t small { color: var(--ink); font-weight: 600; }
.dm-time { color: var(--muted); font-size: .75rem; }
.dm-chat { display: flex; flex-direction: column; min-height: 60vh; max-height: 72vh; }
.dm-pick { margin: auto; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dm-head .dm-who { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.dm-head .dm-who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-back { display: none; text-decoration: none; color: inherit; place-items: center; width: 36px; height: 36px; margin-left: -6px; border-radius: 50%; }
.dm-msgs { flex: 1; overflow-y: auto; padding: 12px; background: #F4F2EE; display: flex; flex-direction: column; gap: 6px; }
.dm-msg { max-width: 78%; align-self: flex-start; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.08); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.dm-msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-radius: 16px 16px 4px 16px; }
.dm-msg p { margin: 0; overflow-wrap: anywhere; }
.dm-msgs .empty { border: 0; background: none; margin: auto; }
.dm-msg img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin-bottom: 4px; }
.dm-msg small { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.dm-msg.me .cmt-act { color: inherit; }
.dm-form { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--surface); }
.dm-form textarea { flex: 1; min-width: 0; resize: none; height: 42px; max-height: 120px; margin: 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 21px; background: #F4F2EE; font: inherit; font-size: 16px; line-height: 20px; color: var(--ink); outline: none; }
.dm-form textarea:focus { border-color: var(--navy); background: #fff; box-shadow: none; }
.dm-photo { cursor: pointer; display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; color: var(--navy); }
.dm-photo:hover { background: rgba(0,0,0,.05); }
.dm-photo.on { background: #FFF4D6; color: var(--red); }
.dm-send { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: var(--red); color: #fff; cursor: pointer; padding: 0; }
.dm-send svg { margin-left: -2px; }
.dm-send:disabled { opacity: .6; }
.dm-send.busy svg { animation: dm-pulse 1s ease-in-out infinite; }
@keyframes dm-pulse { 50% { opacity: .3; } }
.dm-blocked { padding: 12px; margin: 0; }
.dm-audit { max-height: 60vh; }
.dm-menu { flex-direction: column; align-items: stretch; }
.ig-dm { margin-top: 8px; }
@media (max-width: 720px) {
  .dm-layout { grid-template-columns: 1fr; }
  #dmpage.in-chat .dm-list { display: none; }
  #dmpage:not(.in-chat) .dm-chat { display: none; }
  .dm-list { border-right: 0; max-height: none; }
  .dm-chat { max-height: calc(100vh - 170px); min-height: calc(100vh - 170px); }
  .dm-back { display: grid; }
  /* An open chat fills the screen between the top bar and the keyboard */
  body.dm-open #dmpage.in-chat .dm-chat { position: fixed; z-index: 55; left: 0; right: 0; top: var(--tb, 64px); height: calc(var(--vvh, 100dvh) - var(--tb, 64px)); min-height: 0; max-height: none; background: var(--surface); }
  body.dm-open:has(#dmpage.in-chat:not([hidden])) { overflow: hidden; }
  body.dm-open:has(#dmpage.in-chat:not([hidden])) .foot { display: none; }
}

/* DM icon on post headers */
.post-dm { margin-left: auto; background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--ink); cursor: pointer; display: grid; }
.post-dm:hover { color: var(--red); background: rgba(0,0,0,.05); }
.post-dm + .post-mod { margin-left: 0; }
/* Small phones: keep the top bar on one line */
@media (max-width: 480px) {
  .bell, .dm-btn { width: 32px; height: 32px; }
  #btn-signout { font-size: 0; width: 30px; height: 32px; display: grid; place-items: center; }
  #btn-signout::before { content: ""; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat; }
  .top-actions { gap: 5px; }
}

/* Edit post: current photos with a remove button */
.ep-label { display: block; font-weight: 600; margin-bottom: 6px; }
.ep-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-ph { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.ep-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-ph button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ep-add input[type=file] { margin-top: 4px; }

.email-pref { margin-top: 16px; display: grid; gap: 6px; }
.email-pref .lay-check { display: flex; gap: 8px; align-items: center; }

/* "Install the RCMI app" banner (phones) */
.app-banner { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.app-banner[hidden] { display: none; }
.app-banner img { border-radius: 10px; flex: none; }
.app-banner div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.app-banner small { opacity: .8; font-size: .78rem; }
.app-banner-x { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; padding: 4px 6px; cursor: pointer; opacity: .8; }
.push-pref { margin-top: 10px; }
.app-install { justify-self: start; margin-top: 6px; }

/* Seller status on the member card */
.mcard-seller { margin-top: 10px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 14px; border-radius: 999px; font-size: .78rem; line-height: 1.2; background: rgba(18,20,28,.06); color: #3A3D47; }
.mcard-seller:empty { display: none; }
.mcard-seller b { font-weight: 700; letter-spacing: .02em; }
.mcard-seller span { font-size: .72rem; opacity: .85; }
.mcard-seller.lv-trusted { background: #E6F4EA; color: #1E7B3A; }
.mcard-seller.lv-top { background: linear-gradient(135deg, #FFE9A8, #F6C343); color: #6B4A00; }

/* ================= Home page: shop style ================= */
/* News strip */
.annc { background: var(--red); color: #fff; overflow: hidden; white-space: nowrap; font-weight: 600; font-size: .88rem; }
.annc-track { display: inline-flex; gap: 48px; padding: 8px 0; animation: annc 40s linear infinite; }
.annc-track span { flex: none; }
@keyframes annc { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Big image slider */
.hs { position: relative; background: var(--navy); color: #fff; }
.hs-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.hs-track::-webkit-scrollbar { display: none; }
.hs-slide {
  flex: 0 0 100%; scroll-snap-align: start; position: relative;
  min-height: clamp(440px, 64vh, 640px); display: flex; align-items: flex-end;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 80px) clamp(56px, 7vw, 88px);
  background: linear-gradient(90deg, rgba(18,20,28,.94) 0%, rgba(18,20,28,.72) 42%, rgba(18,20,28,.15) 100%), var(--bg, none) var(--pos, center) / cover no-repeat, var(--navy);
}
.hs-slide::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(to bottom, var(--red) 0 4px, var(--white) 4px 6px); }
.hs-text { max-width: 640px; }
.hs-kicker { display: inline-block; margin: 0 0 12px; padding: 4px 10px; background: var(--yellow); color: var(--navy); font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.hs h1, .hs h2 { color: #fff; font-size: clamp(2.2rem, 6vw, 4rem); line-height: .95; text-transform: uppercase; margin: 0 0 14px; }
#landing .hs h2::before { display: none; }
.hs .lead { font-size: clamp(1rem, 2vw, 1.15rem); max-width: 50ch; opacity: .9; margin: 0 0 22px; }
.hs-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hs .stats { margin: 16px 0 0; opacity: .8; font-size: .9rem; }
.hs-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; backdrop-filter: blur(4px); display: grid; place-items: center; padding: 0 0 4px; }
.hs-nav:hover { background: rgba(255,255,255,.32); }
.hs-nav.prev { left: 12px; } .hs-nav.next { right: 12px; }
.hs-dots { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 8px; }
.hs-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: width .2s; }
.hs-dots button[aria-current="true"] { width: 28px; border-radius: 5px; background: var(--yellow); }
@media (max-width: 720px) { .hs-nav { display: none; } .hs-slide { background: linear-gradient(0deg, rgba(18,20,28,.95) 0%, rgba(18,20,28,.7) 50%, rgba(18,20,28,.2) 100%), var(--bg, none) var(--pos, center) / cover no-repeat, var(--navy); } }

/* Why RCMI strip */
.usp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--line); }
.usp li { display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-weight: 600; font-size: .92rem; }
.usp li + li { border-left: 1px solid var(--line); }
.usp b { font-family: var(--display); font-style: italic; font-weight: 800; color: var(--red); font-size: 1.3rem; }
@media (max-width: 720px) { .usp { grid-template-columns: 1fr 1fr; } .usp li:nth-child(3) { border-left: 0; } .usp li:nth-child(n+3) { border-top: 1px solid var(--line); } .usp li { padding: 12px 14px; font-size: .82rem; } }

/* Sections, categories, product grids */
.shop-sec { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) 20px 0; }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
#landing .shop-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0; }
.view-all { font-weight: 700; color: var(--red); text-decoration: none; white-space: nowrap; }
.view-all:hover { text-decoration: underline; }
.cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cat { display: grid; justify-items: center; gap: 8px; padding: 18px 8px; background: var(--surface); border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; text-align: center; transition: transform .15s, box-shadow .15s; }
.cat:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--red), 0 10px 20px -12px rgba(0,0,0,.35); }
.cat-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: var(--paper); }
.cat b { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1rem; line-height: 1.1; }
@media (max-width: 720px) { .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .cat { padding: 12px 4px; } .cat-ic { width: 44px; height: 44px; font-size: 1.3rem; } .cat b { font-size: .85rem; } }

.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pcard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 14px 28px -14px rgba(0,0,0,.4); }
.pc-img { position: relative; aspect-ratio: 1; background: var(--primer); overflow: hidden; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pcard:hover .pc-img img { transform: scale(1.04); }
.pc-empty { display: grid; place-items: center; height: 100%; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2rem; color: #A9ABB2; }
.pc-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--navy); color: #fff; }
.pc-badge.war { background: var(--yellow); color: var(--navy); }
.pc-badge.t-wanted { background: #2456A6; } .pc-badge.t-trade { background: #6B3FA0; }
.pc-badge.n { left: auto; right: 8px; background: rgba(0,0,0,.6); }
.pc-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.pc-title { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.pc-price { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; color: var(--red); line-height: 1; }
.pc-price:empty { display: none; }
.pc-meta { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Promo banners */
.promos { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promo { position: relative; overflow: hidden; display: grid; gap: 6px; align-content: start; padding: 28px; border-radius: var(--radius-m); color: #fff; text-decoration: none; min-height: 190px; }
.promo::after { content: ""; position: absolute; right: -40px; top: -20px; bottom: -20px; width: 46%; background: linear-gradient(115deg, transparent 0 20%, rgba(255,255,255,.14) 20% 46%, rgba(255,255,255,.35) 46% 50%, rgba(255,255,255,.14) 50% 58%, transparent 58%); pointer-events: none; }
.promo-navy { background: var(--navy); } .promo-red { background: var(--red); }
.promo small { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .8; font-size: .75rem; }
.promo b { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1; }
.promo span { opacity: .9; max-width: 34ch; }
.promo em { font-style: normal; font-weight: 700; margin-top: 8px; justify-self: start; padding: 8px 14px; border-radius: 4px; background: var(--yellow); color: var(--navy); }
@media (max-width: 720px) { .promos { grid-template-columns: 1fr; } .promo { min-height: 0; padding: 22px; } }
#landing .pitlane { margin-top: clamp(28px, 5vw, 48px); padding-top: 28px; }

/* Footer with columns */
.foot { display: block; padding: 36px 20px 20px; }
.foot-cols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand p { margin: 10px 0 0; max-width: 32ch; }
.foot nav { display: grid; gap: 8px; align-content: start; }
.foot h4 { margin: 0 0 4px; color: #fff; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.foot nav a, .foot-install { color: rgba(255,255,255,.75); text-decoration: none; text-align: left; padding: 0; font: inherit; }
.foot nav a:hover, .foot-install:hover { color: #fff; text-decoration: underline; }
.foot-copy { max-width: 1200px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; opacity: .7; }
@media (max-width: 720px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.hs-cta a.btn { text-decoration: none; }

/* Instagram */
.ig-follow { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) 20px 0; }
.ig-card { display: flex; align-items: center; gap: 18px; padding: 22px 26px; border-radius: var(--radius-m); color: #fff; text-decoration: none;
  background: linear-gradient(110deg, #833AB4 0%, #C13584 35%, #E1306C 60%, #F77737 85%, #FCAF45 100%); box-shadow: 0 14px 30px -18px rgba(0,0,0,.5); }
.ig-ic { flex: none; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.ig-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ig-txt small { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .72rem; opacity: .85; }
.ig-txt b { font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(1.3rem, 3.4vw, 2rem); line-height: 1.05; overflow-wrap: anywhere; }
.ig-txt span { opacity: .92; font-size: .92rem; }
.ig-card em { flex: none; font-style: normal; font-weight: 800; padding: 10px 20px; border-radius: 999px; background: #fff; color: #C13584; }
@media (max-width: 600px) { .ig-card { flex-wrap: wrap; padding: 18px; gap: 12px; } .ig-ic { width: 48px; height: 48px; } .ig-card em { width: 100%; text-align: center; } }
.contact-ig a, .foot-ig { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.contact-ig a { color: var(--ink); font-weight: 600; }
.contact-ig a:hover b { text-decoration: underline; }
.foot-ig { margin-top: 14px; color: #fff; font-weight: 600; }
.foot-ig:hover { text-decoration: underline; }
.ig-follow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tt-card { background: linear-gradient(110deg, #010101 0%, #111 55%, #25F4EE 140%); box-shadow: 0 14px 30px -18px rgba(0,0,0,.6), inset 3px 0 0 #FE2C55; }
.tt-card em { color: #010101; }
@media (max-width: 900px) { .ig-follow { grid-template-columns: 1fr; } }
.contact-ig.socials { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-brand { display: grid; align-content: start; }
.foot-ig + .foot-ig { margin-top: 8px; }
.foot-brand .logo, .foot-ig { justify-self: start; }
.ig-txt b { font-size: clamp(1.15rem, 1.9vw, 1.55rem); overflow-wrap: normal; word-break: normal; }

/* ================= Photo contest ================= */
.ct-sec { max-width: 1100px; margin: 0 auto; padding: 28px 20px 56px; }
.ct-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ct-top h1, .ct-head h1 { text-transform: uppercase; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.ct-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--primer); color: var(--ink); }
.ct-badge.ph-open { background: #E6F4EA; color: #1E7B3A; } .ct-badge.ph-voting { background: var(--yellow); color: var(--navy); }
.ct-badge.ph-judging { background: #E7EEFB; color: #2456A6; } .ct-badge.ph-closed { background: var(--navy); color: #fff; } .ct-badge.ph-draft { background: #eee; color: #777; }
.ct-list { display: grid; gap: 12px; }
.ct-item { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.ct-item:hover { box-shadow: 0 0 0 2px var(--red); }
.ct-item-cover { flex: none; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--navy); display: grid; place-items: center; font-size: 2rem; }
.ct-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.ct-item-body { display: grid; gap: 3px; min-width: 0; }
.ct-item-body b { font-size: 1.15rem; }
.ct-soon { position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius-m); background: var(--navy); color: #fff; margin-bottom: 16px; }
.ct-soon::after { content: ""; position: absolute; right: -60px; top: -30px; bottom: -30px; width: 45%; background: linear-gradient(115deg, transparent 0 22%, var(--red) 22% 46%, #fff 46% 50%, var(--red) 50% 58%, transparent 58%); opacity: .9; pointer-events: none; }
.ct-soon > * { position: relative; z-index: 1; max-width: 560px; }
.ct-soon h2 { color: #fff; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 6px; }
.ct-soon dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 16px 0; }
.ct-soon dt { font-weight: 700; } .ct-soon dd { margin: 0; color: var(--yellow); font-weight: 700; }
.ct-back { margin-bottom: 12px; }
.ct-head { display: grid; gap: 8px; justify-items: start; margin-bottom: 18px; }
.ct-theme { margin: 0; font-size: 1.05rem; } .ct-desc { margin: 0; color: var(--muted); max-width: 70ch; }
.ct-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ct-steps li { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: .85rem; }
.ct-steps li b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primer); font-size: .8rem; }
.ct-steps li.done b { background: var(--good); color: #fff; } .ct-steps li.on { box-shadow: 0 0 0 2px var(--red); } .ct-steps li.on b { background: var(--red); color: #fff; }
.ct-steps li span { font-weight: 700; } .ct-steps small { color: var(--muted); }
@media (max-width: 640px) { .ct-steps { grid-template-columns: 1fr 1fr; } }
.ct-info { display: grid; gap: 8px; margin-bottom: 18px; }
.ct-info details { background: var(--surface); border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--line); padding: 10px 14px; }
.ct-info summary { font-weight: 700; cursor: pointer; } .ct-info p { margin: 8px 0 2px; }
.ct-box { display: grid; gap: 10px; } .ct-box h3 { margin: 0; }
.ct-gallery-head h2 small, .ct-admin h3 small { font-size: .7em; color: var(--muted); font-style: normal; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 46%), 1fr)); gap: 14px; }
.ct-grid.one { grid-template-columns: minmax(0, 320px); }
.ct-grid.two { grid-template-columns: repeat(2, minmax(0, 260px)); }
.ct-mine-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ct-card { margin: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.ct-card.voted { box-shadow: 0 0 0 3px var(--yellow); }
.ct-ph { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--primer); cursor: zoom-in; overflow: hidden; }
.ct-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-card figcaption { display: grid; gap: 4px; padding: 10px 12px 12px; }
.ct-card figcaption span, .ct-card figcaption small { color: var(--muted); font-size: .82rem; }
.ct-vote { margin-top: 4px; border: 0; border-radius: 999px; padding: 8px 12px; font-weight: 700; cursor: pointer; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.ct-vote.on { background: var(--yellow); box-shadow: none; }
.ct-mine { font-style: normal; font-weight: 700; color: var(--red); font-size: .85rem; }
.ct-rank { position: absolute; top: 8px; left: 8px; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; display: grid; place-items: center; background: rgba(0,0,0,.7); color: #fff; font-weight: 800; font-size: 1rem; }
.ct-winners { margin-bottom: 24px; }
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; align-items: end; }
.pod { margin: 0; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.pod.r1 { box-shadow: 0 0 0 3px #F6C343, 0 18px 36px -20px rgba(0,0,0,.5); }
.pod.r1 .ct-ph { aspect-ratio: 4 / 3.4; }
.pod .ct-rank { font-size: 1.6rem; background: none; }
.pod figcaption { display: grid; gap: 2px; padding: 12px 14px; }
.pod figcaption b { font-family: var(--display); font-style: italic; font-size: 1.3rem; text-transform: uppercase; }
.pod figcaption span { color: var(--muted); }
.ct-sub { margin-top: 8px; }
.ct-jury, .ct-admin { margin-top: 24px; display: grid; gap: 10px; }
.ct-jury h2, .ct-admin h2 { margin: 0; }
.ct-progress b { font-size: 1.3rem; color: var(--red); }
.jury-list { display: grid; gap: 12px; }
.jury-row { display: grid; grid-template-columns: 160px 1fr; gap: 14px; padding: 12px; border-radius: var(--radius-m); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.jury-row.done { box-shadow: 0 0 0 2px var(--good); }
.jury-row.disq { opacity: .75; box-shadow: 0 0 0 2px var(--red); }
.jury-row .ct-ph { border-radius: 6px; }
.jury-f { display: grid; gap: 6px; align-content: start; }
.jury-c { display: grid; grid-template-columns: 120px 1fr 28px; align-items: center; gap: 8px; font-size: .88rem; }
.jury-c input { accent-color: var(--red); }
.jury-c output { font-weight: 800; text-align: right; }
.jury-f > input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.jury-save { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-total { font-weight: 800; color: var(--good); }
@media (max-width: 600px) { .jury-row { grid-template-columns: 1fr; } .jury-c { grid-template-columns: 100px 1fr 24px; } }
.ct-admin-actions { justify-content: flex-start; flex-wrap: wrap; }
.ct-judges { margin: 0; padding-left: 18px; }
.ct-admin-list .row img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; cursor: zoom-in; }
.ct-nophoto { width: 48px; height: 48px; border-radius: 6px; display: grid; place-items: center; background: var(--primer); color: var(--muted); }
.ct-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ct-table th, .ct-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ct-table small { color: var(--muted); }
.ct-pick { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: grid; gap: 6px; }
.ct-nwin { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.ct-preview { padding-left: 20px; }
.ct-big { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; background: #000; }
.type-tag.jury { background: #EDE7F6; color: #5E35B1; }
/* Home card */
.ct-home { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius-m); color: #fff; text-decoration: none; background: linear-gradient(110deg, var(--navy) 0 60%, var(--red) 60% 61.5%, var(--navy-2) 61.5%); box-shadow: 0 14px 30px -18px rgba(0,0,0,.6); }
.ct-home-ic { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 2rem; background: rgba(255,255,255,.12); }
.ct-home-ic img { width: 100%; height: 100%; object-fit: cover; }
.ct-home-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ct-home-t small { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .72rem; color: var(--yellow); }
.ct-home-t b { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1; }
.ct-home-t span { opacity: .9; font-size: .92rem; }
.ct-home em { flex: none; font-style: normal; font-weight: 800; padding: 10px 18px; border-radius: 6px; background: var(--yellow); color: var(--navy); }
@media (max-width: 600px) { .ct-home { flex-wrap: wrap; } .ct-home em { width: 100%; text-align: center; } .ct-home { background: var(--navy); } }
.ct-spots { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ct-spots b { font-size: 1.3rem; color: var(--red); }
.ct-spots > span { height: 8px; border-radius: 4px; background: var(--primer); overflow: hidden; }
.ct-spots i { display: block; height: 100%; background: var(--red); }
.ct-spots small { color: var(--muted); }
.pod .ct-rank { font-size: 2.2rem; top: 6px; left: 6px; }
@media (max-width: 600px) { .jury-row .ct-ph { aspect-ratio: 16 / 10; } .pod .ct-ph, .pod.r1 .ct-ph { aspect-ratio: 4 / 3; } }
.ct-regno { margin: 0; } .ct-regno b { font-family: var(--display); font-style: italic; font-size: 1.4rem; letter-spacing: .08em; color: var(--red); }
/* News strip stays under the top bar while scrolling */
.annc { position: sticky; top: var(--tb, 64px); z-index: 59; box-shadow: 0 4px 10px -6px rgba(0,0,0,.35); }
.role-sel { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.role-sel select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); font: inherit; background: var(--surface); }
.type-tag.founder { background: linear-gradient(135deg, #FFE9A8, #F6C343); color: #6B4A00; }
.ct-posters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.ct-posters button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -18px rgba(0,0,0,.5); }
.ct-posters img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 640px) { .ct-posters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Prize table (coming-soon card) */
.ct-prizes { margin: 14px 0 6px; text-align: left; }
.ct-prizes h3 { margin: 0 0 8px; font-size: 1.05rem; }
.ct-prizes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ct-prizes li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 8px; background: #fff; color: #12141C; box-shadow: 0 0 0 1px var(--line); }
.ct-prizes li b { font-size: 1.4rem; text-align: center; font-family: var(--display); font-style: italic; color: var(--red); }
.ct-prizes li span { display: grid; gap: 1px; }
.ct-prizes li strong { font-size: 1.05rem; }
.ct-prizes li small { color: #5B5F6B; font-size: .8rem; }
.ct-prizes li.pz1 { box-shadow: 0 0 0 2px #F6C343; }
.ct-home-pz { display: block; margin-top: 4px; color: var(--yellow); font-weight: 700; }
.ct-guide { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; margin: 8px 0 4px; width: min(100%, 420px); border-radius: var(--radius-m); overflow: hidden; }
.ct-guide img { display: block; width: 100%; }
.ct-home-ic.poster { width: 84px; height: 105px; border-radius: 8px; }
/* "Why RCMI" boxes: same look as the Explore tiles */
.usp { max-width: 1200px; margin: 0 auto; padding: clamp(24px, 4vw, 36px) 20px 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: none; border: 0; }
.usp li, .usp li + li { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 18px 10px; border: 0; border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-align: center; font-weight: 400; font-size: 1rem; }
.usp .cat-ic { color: var(--red); }
.usp .usp-scale { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.15rem; }
.usp li b { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1rem; line-height: 1.15; color: var(--ink); }
@media (max-width: 720px) { .usp { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .usp li, .usp li + li { padding: 12px 6px; border-top: 0; } .usp .cat-ic { width: 44px; height: 44px; } .usp li b { font-size: .85rem; } }
/* News */
.news-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.news-tools .search { min-width: 0; flex: 1 1 180px; }
.news-brand { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin: 0; }
.pc-badge.ns-preorder { background: var(--yellow); color: var(--navy); }
.pc-badge.ns-released { background: var(--good); color: #fff; }
.pc-badge.ns-announced { background: #2456A6; color: #fff; }
.ns-tag { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.ns-tag.ns-preorder { background: var(--yellow); color: var(--navy); } .ns-tag.ns-released { background: var(--good); color: #fff; } .ns-tag.ns-announced { background: #2456A6; color: #fff; }
.news-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 8px 0 12px; }
.news-facts dt { font-weight: 700; color: var(--muted); } .news-facts dd { margin: 0; }
.news-body { white-space: normal; }
.news-when { font-weight: 700; color: var(--ink); }
/* Jury criteria: name + description, score on the right, slider below */
.jury-c { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; font-size: .9rem; }
.jury-cn { display: grid; gap: 1px; }
.jury-cn b { font-weight: 700; } .jury-cn em { font-style: normal; color: var(--red); }
.jury-cn small { color: var(--muted); font-size: .8rem; }
.jury-c output { font-weight: 800; font-size: 1.3rem; text-align: right; grid-column: 2; grid-row: 1; }
.jury-c input { grid-column: 1 / -1; width: 100%; accent-color: var(--red); }
@media (max-width: 600px) { .jury-c { grid-template-columns: 1fr auto; } }
.gcard-name { padding: 0; text-align: left; color: inherit; text-decoration: none; } .gcard-name:hover strong { text-decoration: underline; }
.gcard-modal { display: grid; justify-items: center; margin-bottom: 12px; } .gcard-modal .mcard { max-width: 320px; }
/* Contest sponsors */
.ct-sponsors { display: grid; justify-items: center; gap: 8px; text-align: center; margin: 0 0 18px; padding: 16px; border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ct-sponsors > small:not(.muted) { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-size: .72rem; }
.ct-sponsor-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; width: 100%; max-width: 420px; }
@media (min-width: 640px) { .ct-sponsor-logos { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 680px; } }
.ct-sponsor-logos.ct-jury-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 380px; }
.ct-sponsor-logos figure { margin: 0; display: grid; grid-template-rows: 60px auto; justify-items: center; align-items: center; align-content: start; gap: 6px; }
.ct-sponsor-logos figcaption { align-self: start; }
.ct-sponsor-logos img { height: 52px; width: auto; max-width: 100%; object-fit: contain; border-radius: 6px; display: block; }
.ct-sponsor-logos figcaption { font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.2; }
.ct-home-sp { display: grid; gap: 8px; margin-top: 10px; min-width: 0; }
.ct-home-sp small { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; opacity: .8; }
.ct-home-sp-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
@media (min-width: 601px) { .ct-home-sp-logos { grid-template-columns: repeat(5, minmax(0, 64px)); } }
.ct-home-t .ct-home-sp, .ct-home-t .ct-home-sp span { opacity: 1; font-size: inherit; }
.ct-home-sp-logos span { height: 40px; display: flex; align-items: center; justify-content: center; min-width: 0; }
.ct-home-sp-logos img { max-height: 30px; max-width: 100%; width: auto; object-fit: contain; border-radius: 4px; display: block; }
.ct-home-sp-logos img.round { height: 40px; width: 40px; max-height: none; border-radius: 50%; }
.ct-home-sp-logos img.square { height: 40px; width: 40px; max-height: none; border-radius: 6px; }
.ct-sponsor-logos img.round { height: 60px; width: 60px; max-width: 100%; object-fit: cover; border-radius: 50%; }
.ct-sponsors small.ct-jury-h { margin-top: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-size: .72rem; }
fieldset.role-sel { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px 6px; margin: 0; display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
fieldset.role-sel legend { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 0 4px; text-transform: uppercase; letter-spacing: .06em; }
fieldset.role-sel label { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; cursor: pointer; }
/* Sponsor logos link to their Instagram; follow-the-sponsors list in the registration box. */
.ct-sponsor-logos a.ct-sp { color: inherit; text-decoration: none; display: block; border-radius: 8px; }
.ct-sponsor-logos a.ct-sp:hover figcaption, .ct-sponsor-logos a.ct-sp:focus-visible figcaption { color: var(--red); }
.ct-sponsor-logos figcaption small { display: block; font-weight: 600; font-size: .68rem; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.ct-follow { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-m); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ct-follow b { display: block; font-size: .9rem; margin-bottom: 6px; }
.ct-follow div { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-follow a { padding: 4px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-weight: 700; font-size: .85rem; color: var(--red); text-decoration: none; }

/* Jury & admin panel */
.ct-topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pn-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.pn-stats div { background: var(--surface); border-radius: var(--radius-m); box-shadow: 0 0 0 1px var(--line); padding: 12px 14px; display: grid; }
.pn-stats b { font-family: var(--display); font-style: italic; font-size: 2rem; line-height: 1; }
.pn-stats span { color: var(--muted); font-size: .82rem; }
.pn-stats .ok b { color: var(--good); } .pn-stats .warn b { color: var(--red); }
@media (max-width: 640px) { .pn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pn-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pn-head h2 { margin: 0; }
.pn-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.pn-filter button { border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; background: var(--paper); box-shadow: 0 0 0 1px var(--line); cursor: pointer; color: inherit; }
.pn-filter button.on { background: var(--navy); color: #fff; box-shadow: none; }
.pn-note { margin: 8px 0 0; }
.pn-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
.pn-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pn-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pn-table td small { display: block; color: var(--muted); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-ph { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.pn-ph img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.pn-ph.disq img { opacity: .4; outline: 2px solid var(--red); }
.pn-none { color: var(--muted); }
.pn-tag { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pn-tag.ok { background: rgba(31,138,76,.12); color: var(--good); } .pn-tag.warn { background: rgba(214,16,43,.08); color: var(--red); } .pn-tag.bad { background: var(--red); color: #fff; }
.jury-row.changed { box-shadow: 0 0 0 2px #F6C343; }
.pn-table td small.when { max-width: none; white-space: nowrap; }
/* Phones: each participant becomes a small card (no sideways scrolling). */
@media (max-width: 640px) {
  .pn-list { min-width: 0; }
  .pn-table, .pn-table tbody { display: block; width: 100%; }
  .pn-table thead { display: none; }
  .pn-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .pn-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .pn-table td[colspan] { grid-column: 1 / -1; }
  .pn-table td.c-no { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
  .pn-table td.c-name { grid-column: 1 / -1; margin-top: -6px; font-weight: 700; }
  .pn-table td.c-ph small { max-width: 100%; }
  .pn-table .pn-ph, .pn-table .pn-ph img { width: 100%; }
  .pn-table .pn-ph img { height: auto; aspect-ratio: 4 / 3; }
  .pn-table td.c-ph > .pn-none { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: 6px; }
  .pn-table td.c-st { align-self: center; }
  .pn-table td.c-up { align-self: center; text-align: right; }
}
