:root {
  --bg: #fff5f5;
  --bg-accent: #ffe4e4;
  --panel: #fffafa;
  --ink: #1a0a0a;
  --muted: #6b4f4f;
  --brand: #c8102e;
  --brand-dark: #9b0b22;
  --brand-2: #ff4d6d;
  --accent: #ffd700;
  --danger: #b00020;
  --line: #f0cece;
  --shadow: 0 16px 45px rgba(120, 10, 30, 0.14);
  --site-header-bg: #fff;
  --site-header-border: #f0cece;
  --footer-bg: #fff5f5;
  --footer-border: #f0cece;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-accent: #1a1a1a;
  --panel: #1c1c1c;
  --ink: #e8e8e8;
  --muted: #a0a0a0;
  --brand: #e8304a;
  --brand-dark: #c8102e;
  --brand-2: #ff6080;
  --accent: #ffd700;
  --danger: #ff6b6b;
  --line: #2e2e2e;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.6);
  --site-header-bg: #161616;
  --site-header-border: #2e2e2e;
  --footer-bg: #111111;
  --footer-border: #2e2e2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ============================================================
   Site Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--site-header-bg);
  border-bottom: 1px solid var(--site-header-border);
  box-shadow: 0 2px 12px rgba(120, 10, 30, 0.08);
}

.site-header-inner {
  width: min(1160px, 92vw);
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo-jkt {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.9rem;
  color: var(--brand);
  letter-spacing: 2px;
  line-height: 1;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 1px;
  border-left: 2px solid var(--brand);
  padding-left: 8px;
}

.site-logo-top,
.site-logo-bot {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 3px;
  font-size: 0.85rem;
  color: var(--ink);
}

.dark-mode-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  color: var(--ink);
}

.dark-mode-btn:hover {
  background: var(--bg-accent);
  transform: rotate(20deg) translateY(0);
  box-shadow: none;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 20px;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

.footer-heart {
  color: var(--brand);
  font-size: 1rem;
}

.bg-shape {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 48% 52% 60% 40% / 40% 42% 58% 60%;
  filter: blur(1px);
  z-index: 0;
  opacity: 0.35;
}

.bg-shape-a {
  background: #c8102e;
  top: -90px;
  left: -70px;
  animation: drift 11s ease-in-out infinite alternate;
}

.bg-shape-b {
  background: #ffd700;
  right: -80px;
  bottom: -120px;
  animation: drift 9s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from {
    transform: translateY(-8px) rotate(0deg);
  }
  to {
    transform: translateY(14px) rotate(7deg);
  }
}

.app {
  position: relative;
  z-index: 1;
  width: min(1160px, 92vw);
  margin: 28px auto 56px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.kicker {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 2px;
  font-size: 1.2rem;
  color: var(--brand);
  text-shadow: 0 1px 0 rgba(200, 16, 46, 0.18);
}

h1 {
  margin: 2px 0 6px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.status-strip {
  background: #fff0f2;
  border: 1px solid #f5b8c1;
  color: var(--brand);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  min-width: 180px;
  text-align: center;
}

.controls {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.control-group {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 700;
  font-size: 0.92rem;
}

input,
select,
button {
  border-radius: 12px;
  border: 1px solid #d5dfd6;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

button {
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.2s;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.30);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.ghost {
  background: #fff5f5;
  color: var(--brand);
  border-color: #f5b8c1;
}

.inline {
  display: flex;
  gap: 8px;
}

.inline.actions {
  flex-wrap: wrap;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 12px 14px;
}

.metric h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric p {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.playground {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.board-wrap {
  padding: 14px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* Controls strip below board */
.controls-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 4px;
  border-top: 1px solid #eee;
  width: 100%;
}

.game-board {
  width: min(92vw, 560px);
  aspect-ratio: 1;
  display: grid;
  gap: 4px;
  position: relative;
}

.tile {
  border-radius: 10px;
  border: 1px solid rgba(18, 27, 28, 0.18);
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile.cursor::after {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.35);
}

.tile.selected::after {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(200, 16, 46, 0.25);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
}

/* Preview hint card */
.hint-card {
  padding: 14px;
}

/* Leaderboard card — full width below game grid */
.lb-section {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hint-inline-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  display: block;
  margin-top: 4px;
}

/* Leaderboard scrollable container */
.lb-scroll {
  overflow-y: auto;
  max-height: 280px;
  border-radius: 8px;
  border: 1px solid #eee;
  flex: 1 1 auto;
}

.lb-scroll::-webkit-scrollbar {
  width: 6px;
}

.lb-scroll::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.lb-scroll::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 3px;
}

.lb-scroll table {
  border-collapse: collapse;
  width: 100%;
}

.lb-scroll thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-bottom: 2px solid var(--brand);
  padding: 6px 8px;
  font-size: 0.82rem;
}

.side h3 {
  margin: 4px 0;
}

.side ul {
  margin: 0;
  color: var(--muted);
  padding-left: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  padding: 8px;
  border-bottom: 1px solid #e7efea;
  text-align: left;
}

.hint-panel {
  padding: 14px;
}

.hint-panel img {
  width: min(420px, 100%);
  border-radius: 12px;
  border: 1px solid #d8e4dc;
}

/* --- Tier badge --- */
.tier-badge {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.tier-bronze { color: #cd7f32; }
.tier-silver { color: #aaa9ad; }
.tier-gold   { color: #d4a017; }
.tier-diamond { color: #4dc9e6; }

/* --- Leaderboard tabs --- */
.lb-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.lb-tab {
  flex: 1;
  font-size: 0.82rem;
  padding: 7px 6px;
  background: #fff0f2;
  color: var(--brand);
  border-radius: 10px;
  border-color: #f5b8c1;
}

.lb-tab.active {
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.lb-panel.hidden { display: none; }

.hidden {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(16px);
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up 0.6s ease forwards;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

.delay-3 {
  animation-delay: 0.24s;
}

.delay-4 {
  animation-delay: 0.3s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Win overlay */
.win-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.90);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation: fade-up 0.35s ease;
}

[data-theme="dark"] .win-overlay {
  background: rgba(20,20,20,0.92);
}

.win-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}

.win-emoji {
  font-size: 3rem;
  margin: 0;
  line-height: 1;
}

.win-title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  color: var(--brand);
  letter-spacing: 2px;
}

.win-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.win-overlay .start-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 1.1rem;
  width: auto;
  margin-top: 6px;
}

.win-flash {
  animation: win-pulse 0.6s ease 2;
}

@keyframes win-pulse {
  0% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.9);
  }
  100% {
    filter: saturate(1);
  }
}

@media (max-width: 980px) {
  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .playground {
    grid-template-columns: 1fr;
  }

  .board-wrap {
    min-height: unset;
  }
}

@media (max-width: 620px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-strip {
    min-width: 0;
  }
}

/* ============================================================
   Utility
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   Landing View
   ============================================================ */
#landingView {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.landing-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 520px;
  width: 100%;
  z-index: 1;
}

/* ---- Hero (left column) ---- */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.landing-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4rem);
  letter-spacing: 2px;
  color: var(--brand);
  text-align: center;
  line-height: 1.1;
}

.landing-title span {
  display: block;
  font-size: 0.45em;
  letter-spacing: 4px;
  color: var(--brand-dark);
  text-transform: uppercase;
}

.landing-desc {
  color: #666;
  text-align: center;
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.6;
}

.member-photo-wrap {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(200,16,46,.18);
}

.member-photo {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.member-photo-placeholder {
  width: 100%;
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px dashed var(--brand);
  border-radius: 16px;
  color: #bbb;
  font-size: 0.9rem;
}

.member-photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

.landing-form-wrap {
  background: var(--panel);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  box-shadow: 0 6px 28px rgba(200,16,46,.10);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* ---- Top row inside form card ---- */
.landing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.member-photo-wrap-sm {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--brand);
  background: #fff0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-photo-sm {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-photo-placeholder-sm {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #ccc;
}

.landing-form-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--brand);
  letter-spacing: 1px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-group input,
.field-group select {
  padding: 0.65rem 0.9rem;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  color: #222;
  transition: border-color .2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.field-group input:focus,
.field-group select:focus {
  border-color: var(--brand);
}

.member-select-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.member-select-row select {
  flex: 1;
  min-width: 0;
}

.member-select-row .icon-btn {
  padding: 0 0.9rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .2s;
  flex-shrink: 0;
}

.member-select-row .icon-btn:hover {
  background: var(--brand-dark);
}

.hint-text {
  font-size: 0.78rem;
  color: #999;
  margin-top: -0.75rem;
}

/* ---- Grid size picker ---- */
.grid-size-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gs-option {
  cursor: pointer;
}

.gs-option input[type="radio"] {
  display: none;
}

.gs-option span {
  display: inline-block;
  padding: 0.38rem 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
}

.gs-option input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.gs-option:hover span {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---- Start button ---- */
.start-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(200,16,46,.35);
  transition: opacity .2s, transform .1s;
}

.start-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.start-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sync-status {
  font-size: 0.78rem;
  color: #aaa;
  text-align: center;
}

.sync-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  color: var(--brand);
  border: 1px solid var(--brand);
  background: transparent;
  cursor: pointer;
  transition: background .15s, color .15s;
  margin-top: 0.2rem;
  align-self: flex-start;
}

.sync-btn:hover:not(:disabled) {
  background: var(--brand);
  color: #fff;
}

.sync-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================================================
   Dark mode overrides for hardcoded colours
   ============================================================ */
[data-theme="dark"] body {
  background: var(--bg);
}

[data-theme="dark"] input,
[data-theme="dark"] select {
  background: #252525;
  border-color: #3a3a3a;
  color: var(--ink);
}

[data-theme="dark"] .cs-dropdown-trigger {
  background: #252525;
  border-color: #3a3a3a;
}

[data-theme="dark"] .cs-dropdown.open .cs-dropdown-trigger {
  border-color: var(--brand);
}

[data-theme="dark"] .cs-dropdown-list {
  background: #252525;
}

[data-theme="dark"] .cs-dropdown-item:hover {
  background: #2e2e2e;
}

[data-theme="dark"] .cs-dropdown-item[aria-selected="true"] {
  background: rgba(232, 48, 74, 0.15);
}

[data-theme="dark"] button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

[data-theme="dark"] button.ghost:hover {
  background: #2a2a2a;
  box-shadow: none;
}

[data-theme="dark"] .status-strip {
  background: #1e1e1e;
  border-color: #3a3a3a;
  color: var(--brand);
}

[data-theme="dark"] .controls-strip {
  border-top-color: #2e2e2e;
}

[data-theme="dark"] .lb-scroll {
  border-color: #2e2e2e;
}

[data-theme="dark"] .lb-scroll::-webkit-scrollbar-track {
  background: #1a1a1a;
}

[data-theme="dark"] .lb-scroll table thead th {
  background: #1c1c1c;
  color: var(--ink);
}

[data-theme="dark"] .lb-scroll table td {
  border-bottom-color: #2e2e2e;
}

[data-theme="dark"] .lb-scroll table tr:hover {
  background: #232323;
}

[data-theme="dark"] .tile {
  border-color: rgba(255,255,255,0.10);
}

[data-theme="dark"] .hint-inline-img {
  border-color: #2e2e2e;
}

[data-theme="dark"] #landingView {
  background: var(--bg);
}

[data-theme="dark"] .landing-desc,
[data-theme="dark"] .hint-text {
  color: var(--muted);
}

[data-theme="dark"] .gs-option span {
  background: #222;
  border-color: #3a3a3a;
  color: var(--ink);
}

[data-theme="dark"] .member-photo-placeholder-sm {
  background: #252525;
  border-color: #3a3a3a;
}

[data-theme="dark"] .bg-shape-a {
  opacity: 0.06;
}

[data-theme="dark"] .bg-shape-b {
  opacity: 0.06;
}

/* Hint cooldown state */
#hintBtn.hint-cooldown {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================================
   Game View header tweaks
   ============================================================ */
.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.back-btn {
  background: transparent;
  border: 2px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background .2s;
}

.back-btn:hover {
  background: rgba(255,255,255,.15);
}

/* ---- Leaderboard filters ---- */
.lb-filters {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

/* ---- Custom dropdown for lb member filter ---- */
.cs-dropdown {
  position: relative;
  width: 220px;
}

.cs-dropdown-trigger {
  width: 100%;
  padding: 9px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  user-select: none;
  outline: none;
}

.cs-dropdown-trigger:hover {
  border-color: var(--brand);
}

.cs-dropdown.open .cs-dropdown-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.cs-dropdown-trigger svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.25s ease;
}

.cs-dropdown.open .cs-dropdown-trigger svg {
  transform: rotate(180deg);
}

.cs-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--panel);
  border: 2px solid var(--brand);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.cs-dropdown-list::-webkit-scrollbar { width: 5px; }
.cs-dropdown-list::-webkit-scrollbar-track { background: var(--bg); }
.cs-dropdown-list::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; }

.cs-dropdown.open .cs-dropdown-list {
  display: block;
}

.cs-dropdown-item {
  display: block;
  padding: 9px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.12s;
  border-bottom: 1px solid var(--line);
}

.cs-dropdown-item:last-child {
  border-bottom: none;
}

.cs-dropdown-item:hover {
  background: var(--bg-accent);
}

.cs-dropdown-item[aria-selected="true"] {
  background: rgba(200, 16, 46, 0.08);
  color: var(--brand);
  font-weight: 700;
}

/* ---- Landing member cs-dropdown full width ---- */
.cs-dropdown--landing {
  width: 100%;
}

/* ---- Hint text ---- */
.hint-text {
  font-size: 0.78rem;
  color: #999;
}

/* ============================================================
   Responsive — single column on mobile
   ============================================================ */
@media (max-width: 720px) {
  .landing-wrap {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    display: none;
  }

  .landing-form-wrap {
    padding: 1.6rem 1.2rem;
  }
}
