:root {
  --ink: #07111d;
  --ink-soft: #101d2b;
  --cream: #f7f1e7;
  --paper: #111d2a;
  --lime: #c9f26b;
  --lime-dark: #a5ca52;
  --coral: #ff8b80;
  --lavender: #c6baff;
  --blue: #8fd0ff;
  --copper: #d99058;
  --copper-bright: #f0ad75;
  --text: #f7f1e7;
  --text-soft: #c8d1dc;
  --muted: #aab6c5;
  --surface: #0b1623;
  --surface-raised: #111e2c;
  --surface-soft: #172534;
  --line: rgba(247, 241, 231, 0.14);
  --line-accent: rgba(217, 144, 88, 0.38);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(105deg, rgba(5, 13, 23, 0.97) 0%, rgba(7, 17, 29, 0.91) 46%, rgba(7, 17, 29, 0.76) 72%, rgba(5, 13, 23, 0.94) 100%),
    url("scenic-chess-terrace.webp") center top / cover fixed no-repeat,
    var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  width: 280px;
  height: 280px;
  position: fixed;
  right: -86px;
  bottom: -86px;
  z-index: -1;
  opacity: 0.08;
  background: conic-gradient(from 90deg, var(--copper) 25%, transparent 0 50%, var(--copper) 0 75%, transparent 0);
  background-size: 70px 70px;
  transform: rotate(8deg);
  border-radius: 28px;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { cursor: pointer; }

[hidden] { display: none !important; }

body.app-booting { overflow: hidden; }

body.app-booting .site-header,
body.app-booting main,
body.app-booting footer { visibility: hidden; }

.boot-view {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(105deg, rgba(5, 13, 23, 0.98), rgba(7, 17, 29, 0.92)),
    url("scenic-chess-terrace.webp") center / cover no-repeat,
    var(--ink);
}

.boot-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--text);
  text-align: center;
}

.boot-card strong { font-size: clamp(20px, 3vw, 28px); }
.boot-card > span:last-child { color: var(--text-soft); font-size: 14px; }

.boot-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--copper-bright);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  font-size: 34px;
  animation: boot-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes boot-pulse {
  from { transform: translateY(0); opacity: 0.78; }
  to { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-mark { animation: none; }
}

:focus-visible {
  outline: 3px solid var(--copper-bright);
  outline-offset: 3px;
}

::selection { color: var(--ink); background: var(--copper-bright); }

a { color: var(--copper-bright); }

input::placeholder,
textarea::placeholder { color: #8390a1; opacity: 1; }

input:disabled,
select:disabled,
textarea:disabled,
button:disabled { cursor: not-allowed; opacity: 0.58; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 74px;
  padding: 0 max(20px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(7, 17, 29, 0.82);
  border-bottom: 1px solid var(--line-accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(1.15);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.7px;
  text-decoration: none;
}

.brand > span:last-child > span { color: var(--copper-bright); }

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: linear-gradient(145deg, #22324a, var(--ink));
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16, 24, 38, 0.22), inset 0 1px rgba(255, 255, 255, 0.14);
  font-size: 25px;
}

.app-nav {
  max-width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.app-nav::-webkit-scrollbar { display: none; }

.mobile-nav-toggle {
  min-height: 40px;
  padding: 0 12px;
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  font-weight: 900;
}

.nav-button,
.text-button,
.icon-button {
  padding: 9px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-button:hover,
.text-button:hover { background: rgba(16, 24, 38, 0.07); }

.landing {
  width: min(calc(100% - 40px), 1240px);
  min-height: calc(100vh - 146px);
  margin: 0 auto;
  padding: 70px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.66fr);
  align-items: center;
  gap: clamp(44px, 8vw, 110px);
}

.eyebrow {
  margin: 0 0 12px;
  color: #6651d7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.landing h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 7.2vw, 100px);
  font-weight: 500;
  letter-spacing: -5px;
  line-height: 0.86;
  text-shadow: 0 2px 24px rgba(255, 253, 249, 0.62);
}

.landing h1 em {
  color: #6d54e5;
  font-weight: 500;
}

.hero-copy {
  max-width: 650px;
  margin: 36px 0;
  color: #303d50;
  font-size: 19px;
}

.flow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flow-strip span {
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: 0 9px 24px rgba(11, 22, 39, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.flow-strip strong {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--ink);
  border-radius: 50%;
  font-size: 10px;
}

.marketing-benefits {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-benefit {
  min-width: 0;
  padding: 15px;
  display: grid;
  gap: 5px;
  background: rgba(11, 22, 35, 0.78);
  border: 1px solid var(--line-accent);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.marketing-benefit strong { color: var(--text); font-size: 14px; }
.marketing-benefit span { color: var(--text-soft); font-size: 13px; line-height: 1.45; }

.early-pricing {
  margin-top: 12px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-soft);
  background: rgba(7, 17, 29, 0.84);
  border: 1px solid rgba(201, 242, 107, 0.22);
  border-radius: 14px;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.early-pricing strong { color: var(--lime); }

.install-app-panel {
  margin-top: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(217, 144, 88, 0.2), rgba(72, 111, 148, 0.24));
  border: 1px solid var(--line-accent);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.install-app-copy { display: grid; gap: 3px; }
.install-app-copy strong { color: var(--copper-bright); font-size: 14px; }
.install-app-copy span { color: var(--text-soft); font-size: 12px; }
.install-app-panel .secondary-button { min-height: 42px; }
.install-app-panel [data-install-message] {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
}

.install-app-settings-card { background: rgba(217, 144, 88, 0.12); }
.install-app-settings-card [data-install-message]:empty { display: none; }

.auth-card,
.app-panel {
  position: relative;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(7, 17, 32, 0.2);
  backdrop-filter: blur(18px) saturate(1.08);
}

.auth-card::before,
.app-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: inherit;
}

.auth-card { padding: 16px; }

.auth-tabs {
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ece6dc;
  border-radius: 13px;
}

.auth-tab {
  min-height: 44px;
  color: #596477;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}

.auth-tab.active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(16, 24, 38, 0.09);
}

.auth-form {
  padding: 26px 14px 10px;
  display: grid;
  gap: 15px;
}

.auth-form h2 { margin: 0; font-size: 28px; }
.auth-form > p { margin: -7px 0 4px; color: var(--muted); font-size: 13px; }
.auth-form .signup-reassurance {
  margin: -5px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  text-align: center;
}
.forgot-password-button { justify-self: start; margin-top: -6px; }

label {
  display: grid;
  gap: 7px;
  color: #394559;
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(16, 24, 38, 0.18);
  border-radius: 10px;
}

input,
select { min-height: 48px; padding: 0 13px; }
textarea { padding: 13px; resize: vertical; }

.check-field {
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 9px;
  font-weight: 600;
  line-height: 1.35;
}

.check-field input { width: 18px; min-height: 18px; margin: 0; }

.primary-button,
.secondary-button,
.danger-button,
.upload-button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  color: var(--cream);
  background: var(--ink);
  border: 1px solid var(--ink);
}

.primary-button:hover,
.secondary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16, 24, 38, 0.13); }

.secondary-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.danger-button {
  color: #992f37;
  background: rgba(255, 123, 112, 0.14);
  border: 1px solid rgba(153, 47, 55, 0.24);
}

.prototype-note {
  margin: 8px 14px 6px;
  padding-top: 12px;
  color: #778092;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.form-message { min-height: 19px; margin: 0 !important; color: #6b51dc !important; font-size: 12px !important; font-weight: 800; }
.field-help { color: var(--muted); font-size: 10px; font-weight: 600; }

.app-shell {
  width: min(calc(100% - 40px), 1240px);
  min-height: calc(100vh - 146px);
  margin: 0 auto;
  padding: 38px 0 60px;
}

.app-panel { padding: clamp(24px, 4vw, 54px); }

.verification-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
}

.verification-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.verification-card {
  min-width: 0;
  padding: 25px;
  display: grid;
  align-content: start;
  gap: 16px;
  background: #f4f0e9;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.verification-card h3 { margin: 0 0 5px; font-size: 22px; }
.verification-card p { margin: 0; color: var(--muted); font-size: 13px; }
.verification-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--ink);
  border-radius: 50%;
  font-weight: 900;
}

.verification-status {
  margin-top: 10px;
  padding: 6px 9px;
  display: inline-flex;
  color: #8b3139;
  background: rgba(255, 123, 112, 0.14);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.verification-status.verified { color: #365b1c; background: rgba(145, 184, 60, 0.2); }
.prototype-action { color: #6b51dc; border: 1px dashed rgba(107, 81, 220, 0.35); }
.verification-privacy {
  margin-top: 18px;
  padding: 18px;
  background: #edf0ff;
  border-left: 4px solid #6d54e5;
  border-radius: 10px;
}
.verification-privacy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.verification-summary { padding: 10px; background: #fff; border-radius: 9px; font-size: 12px; font-weight: 800; }

.section-heading,
.game-heading,
.chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.game-heading h2,
.connection-banner h2,
.chat-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -2.5px;
  line-height: 0.98;
}

.step-pill,
.online-pill,
.game-status {
  padding: 8px 12px;
  flex: 0 0 auto;
  background: #eef0e3;
  border-radius: 999px;
  color: #4e5c34;
  font-size: 11px;
  font-weight: 900;
}

.online-pill i {
  width: 8px;
  height: 8px;
  margin-right: 6px;
  display: inline-block;
  background: #54a33f;
  border-radius: 50%;
}

.profile-form {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 38px;
}

.profile-photo-editor { display: grid; justify-items: center; gap: 12px; text-align: center; }

.profile-photo {
  width: 210px;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #7962e7, #bf76b6);
  border: 8px solid #fff;
  border-radius: 44% 56% 52% 48% / 48% 46% 54% 52%;
  box-shadow: 0 18px 36px rgba(83, 58, 162, 0.2);
  font-family: Georgia, serif;
  font-size: 52px;
}

.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.upload-button { min-height: 42px; color: var(--ink); background: var(--lime); cursor: pointer; }
.profile-photo-editor small { max-width: 210px; color: var(--muted); font-size: 10px; }
.profile-photo-grid {
  width: 100%;
  margin-top: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-photo-thumb {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: #ece8e0;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(16, 24, 38, 0.11);
}

.profile-photo-thumb.primary { outline: 3px solid var(--lime-dark); }
.profile-photo-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-photo-thumb span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  padding: 3px;
  color: #fff;
  background: rgba(16, 24, 38, 0.74);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.profile-photo-remove {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(153, 47, 55, 0.9);
  border: 0;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.profile-fields { display: grid; gap: 17px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.identity-fieldset {
  min-width: 0;
  margin: 3px 0;
  padding: 22px;
  background: #f5f1ff;
  border: 1px solid rgba(109, 84, 229, 0.2);
  border-radius: 14px;
}

.identity-fieldset legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.identity-fieldset > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.identity-visibility { margin-top: 17px; }
.optional-label { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.preference-grid {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preference-grid .check-field {
  min-height: 48px;
  padding: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.preference-grid .check-field:has(input:checked) {
  background: linear-gradient(135deg, rgba(183, 168, 255, 0.2), rgba(201, 242, 107, 0.17));
  border-color: rgba(109, 84, 229, 0.45);
  box-shadow: 0 8px 20px rgba(109, 84, 229, 0.09);
}

.form-actions { display: flex; align-items: center; gap: 18px; }

.discover-intro { max-width: 730px; color: var(--muted); }

.discover-preference-bar {
  margin-top: 18px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.location-preference-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  align-items: end;
  gap: 14px;
}

.location-preference-fieldset {
  background: linear-gradient(135deg, rgba(130, 200, 255, 0.12), rgba(201, 242, 107, 0.1));
}

.location-search-row {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.location-search-results {
  margin: -4px 0 16px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
}

.location-result-button {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.location-result-button:hover { border-color: rgba(109, 84, 229, 0.4); background: #f7f4ff; }
.location-attribution { display: block; margin-top: 8px; color: var(--muted); }

.location-preference-actions { display: flex; align-items: center; gap: 12px; }
.location-status { margin: 12px 0 0; }

.discover-preference-bar > div { display: grid; gap: 2px; }
.discover-preference-bar strong { color: var(--ink); }
.discover-preference-bar > div > span:not(.plan-label) { color: var(--muted); font-size: 11px; }
.discover-preference-bar .text-button { flex: 0 0 auto; }

.match-quota-card {
  margin-top: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f5f8ed;
  border: 1px solid rgba(86, 112, 36, 0.25);
  border-radius: 16px;
}

.match-quota-card > div { display: grid; gap: 3px; }
.match-quota-card strong { color: var(--ink); font-size: 16px; }
.match-quota-card > div > span:last-child { color: var(--muted); font-size: 11px; }
.match-quota-card .secondary-button { flex: 0 0 auto; }
.match-quota-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.single-game-purchase-card {
  margin: 18px 0 24px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #f5f8ed, #f4f0ff);
  border: 1px solid rgba(109, 84, 229, 0.24);
  border-radius: 18px;
}

.single-game-purchase-card[hidden] { display: none; }
.single-game-purchase-card h3 { margin: 4px 0 8px; }
.single-game-purchase-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.single-game-purchase-action { min-width: 190px; display: grid; gap: 10px; text-align: center; }
.single-game-purchase-action strong { color: var(--ink); font-size: 20px; }

.discover-filters {
  margin-top: 24px;
  padding: 18px;
  background: linear-gradient(135deg, #f6f2ff, #f3f8eb);
  border: 1px solid rgba(109, 84, 229, 0.2);
  border-radius: 16px;
}

.discover-filter-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.discover-filter-heading > div { display: grid; gap: 3px; }
.discover-filter-heading > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.discover-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.discover-filter-grid label { color: var(--ink); font-size: 11px; font-weight: 900; }
.discover-filter-grid select { margin-top: 6px; background: #fff; }
.discover-filter-grid select:disabled { cursor: not-allowed; opacity: 0.62; }

.opponent-empty {
  min-height: 260px;
  padding: 40px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.opponent-empty strong { color: var(--lime); font-family: Georgia, serif; font-size: 27px; }
.opponent-empty span { color: #b8c1cf; }

.opponent-carousel {
  margin: 35px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(270px, 1.18fr);
  overflow: hidden;
  background: var(--ink);
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 26px 56px rgba(16, 24, 38, 0.2);
}

.opponent-visual {
  min-height: 360px;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--opponent-color), #182033);
}

.opponent-visual::after {
  content: "?";
  color: rgba(255, 255, 255, 0.88);
  font-family: Georgia, serif;
  font-size: 130px;
}

.opponent-visual span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 7px 10px;
  background: rgba(16, 24, 38, 0.72);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.opponent-details { padding: clamp(27px, 5vw, 54px); }
.opponent-details h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 40px; font-weight: 500; }
.opponent-details > p { color: #aab5c8; }
.compatibility-list { margin: 28px 0 0; padding: 0; display: grid; gap: 11px; list-style: none; }
.compatibility-list li { padding: 12px 0; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.compatibility-list span { color: #aab5c8; }
.compatibility-list strong { color: var(--lime); text-align: right; }

.discover-actions { display: grid; grid-template-columns: 130px 1fr 130px; gap: 10px; }

.plus-player-badge {
  margin-left: auto;
  padding: 4px 7px;
  color: #22300e;
  background: var(--lime);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.game-heading { margin-bottom: 24px; }
.game-status { background: var(--lime); color: var(--ink); }
.game-layout { display: grid; grid-template-columns: minmax(320px, 720px) minmax(220px, 1fr); align-items: start; gap: 30px; }
.board-column {
  width: 100%;
  max-width: 720px;
  padding: 10px;
  background: linear-gradient(145deg, #26354a, #0c1420);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(16, 24, 38, 0.24);
}

.player-strip {
  min-height: 52px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #eef0e8;
  font-size: 12px;
  font-weight: 900;
}

.opponent-strip { border-radius: 11px 11px 0 0; }
.board-column > .player-strip:last-child { border-radius: 0 0 11px 11px; }
.player-strip span { color: var(--muted); font-weight: 700; }

.chessboard {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  background: #f2f0d6;
  border: 6px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.square {
  position: relative;
  min-width: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #f2f0d6;
  border: 0;
  font-size: clamp(25px, 6vw, 58px);
  line-height: 1;
}

.square.dark { background: #7b9a59; }
.square.selected { box-shadow: inset 0 0 0 5px #765af1; }
.square.legal::after { content: ""; width: 24%; aspect-ratio: 1; position: absolute; background: rgba(16, 24, 38, 0.38); border-radius: 50%; }
.square.capture::after { width: 76%; background: transparent; border: 5px solid rgba(255, 75, 75, 0.66); }
.square.last-move { background-image: linear-gradient(rgba(201, 242, 107, 0.42), rgba(201, 242, 107, 0.42)); }
.square:hover { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.16); }
.piece { position: relative; z-index: 1; filter: drop-shadow(0 3px 1px rgba(0,0,0,0.18)); }
.piece-artwork {
  width: 100%;
  height: 100%;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.game-sidebar { display: grid; gap: 18px; }
.match-rule { padding: 19px; display: grid; gap: 5px; background: #ede9ff; border-radius: 13px; }
.match-rule span { color: var(--muted); font-size: 12px; }
.move-history { min-height: 260px; max-height: 500px; padding: 19px; overflow: auto; background: #f2eee7; border-radius: 13px; }
.move-history h3 { margin: 0 0 12px; }
.move-history ol { margin: 0; padding-left: 27px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 22px; color: #566174; font-family: ui-monospace, monospace; font-size: 12px; }

.connection-banner {
  padding: 26px;
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 20px;
  color: #fff;
  background: var(--ink);
  border-radius: 17px;
}

.connection-banner > span { font-size: 52px; }
.connection-banner .eyebrow { color: var(--lime); }
.connection-banner p:last-child { margin-bottom: 0; color: #bdc6d5; }
.connection-layout { margin-top: 25px; display: grid; grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr); gap: 24px; }

.revealed-profile,
.chat-panel { padding: 28px; background: #f4f0e9; border-radius: 17px; }
.revealed-photo { width: 100%; aspect-ratio: 4/3; overflow: hidden; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--opponent-color), #272c49); border-radius: 14px; font-family: Georgia, serif; font-size: 62px; }
.revealed-photo img { width: 100%; height: 100%; object-fit: cover; }
.revealed-profile h3 { margin: 22px 0 4px; font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.revealed-meta { color: #6b51dc; font-weight: 800; }
.profile-facts { margin: 20px 0; display: grid; gap: 10px; }
.profile-facts div { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; font-weight: 800; text-align: right; }

.icon-button { border: 1px solid var(--line); }
.chat-consent { min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; }
.chat-consent strong { font-size: 20px; }
.chat-consent p { max-width: 420px; color: var(--muted); }
.chat-messages { height: 380px; margin-top: 22px; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; background: #fff; border-radius: 13px; }
.message { max-width: 78%; padding: 10px 13px; align-self: flex-start; background: #e9e5ff; border-radius: 14px 14px 14px 3px; font-size: 13px; }
.message.mine { align-self: flex-end; background: var(--lime); border-radius: 14px 14px 3px 14px; }
.message small { margin-top: 3px; display: block; color: #687185; font-size: 9px; }
.chat-form { margin-top: 11px; display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.danger-text { margin-top: 10px; color: #992f37; }
.new-match-button { margin-top: 24px; }
.connection-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.connection-actions .new-match-button { margin-top: 0; }

.settings-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.settings-card {
  padding: 27px;
  background: #f4f0e9;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.settings-card h3 { margin: 0 0 8px; font-size: 22px; }
.settings-card p { color: var(--muted); }
.settings-links { display: grid; gap: 9px; }
.settings-links a,
.footer-links a { color: #5e48ce; font-weight: 800; text-underline-offset: 3px; }
.danger-zone { background: rgba(255, 123, 112, 0.08); border-color: rgba(153, 47, 55, 0.2); }
.danger-zone .danger-button { margin-top: 14px; }

.safety-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px;
  padding: 0;
  color: #172033;
  background: rgba(255, 252, 246, .98);
  box-shadow: 0 30px 90px rgba(5, 12, 24, .46);
}
.safety-dialog::backdrop { background: rgba(4, 10, 20, .72); backdrop-filter: blur(5px); }
.safety-dialog form { display: grid; gap: 18px; padding: 24px; }
.safety-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.safety-dialog-heading h2 { margin: 3px 0 0; }
.safety-dialog label { display: grid; gap: 8px; font-weight: 800; }
.safety-dialog select,
.safety-dialog textarea { width: 100%; }
.safety-dialog textarea { resize: vertical; min-height: 120px; }
.safety-dialog .field-help { margin: -4px 0 0; color: #556176; font-size: 13px; line-height: 1.55; }
.safety-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; }

.billing-intro {
  max-width: 850px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.billing-notice {
  min-height: 46px;
  margin-bottom: 22px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  color: #4d3daa;
  background: #eeeaff;
  border: 1px solid rgba(117, 87, 239, 0.22);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.billing-notice.success {
  color: #355018;
  background: rgba(201, 242, 107, 0.38);
  border-color: rgba(80, 114, 30, 0.22);
}

.billing-notice.error {
  color: #8b2c35;
  background: rgba(255, 123, 112, 0.12);
  border-color: rgba(139, 44, 53, 0.2);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  min-width: 0;
  padding: 27px;
  display: flex;
  flex-direction: column;
  background: #f4f0e9;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.plan-card.plus-plan {
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(201, 242, 107, 0.28), transparent 42%),
    var(--ink);
  border-color: var(--ink);
  box-shadow: 0 18px 45px rgba(16, 24, 38, 0.18);
}

.plan-ribbon {
  position: absolute;
  top: 17px;
  right: 17px;
  padding: 6px 9px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-label {
  margin: 0 0 8px;
  color: #765af1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plus-plan .plan-label { color: var(--lime); }
.plan-card h3 { margin: 0; font-family: Georgia, serif; font-size: 35px; font-weight: 500; }
.plan-price { margin: 14px 0 0; font-size: 30px; font-weight: 900; letter-spacing: -0.04em; }
.plan-price span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.plus-plan .plan-price span { color: #acb7c8; }
.plan-savings { min-height: 42px; margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.plus-plan .plan-savings { color: #bdc6d5; }

.plan-card ul {
  margin: 23px 0 28px;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.plan-card li { position: relative; padding-left: 22px; color: #566174; font-size: 13px; }
.plus-plan li { color: #e0e6ef; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; color: #6b51dc; font-weight: 900; }
.plus-plan li::before { color: var(--lime); }
.plan-card button { width: 100%; margin-top: auto; }

.billing-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.billing-faq {
  margin-top: 30px;
  display: grid;
  gap: 10px;
}

.billing-faq details {
  padding: 15px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.billing-faq summary { cursor: pointer; font-weight: 850; }
.billing-faq p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.membership-settings-card { background: rgba(183, 168, 255, 0.12); }

footer {
  min-height: 72px;
  padding: 18px max(20px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #697386;
  background: rgba(247, 241, 231, 0.72);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  font-size: 11px;
}

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; padding: 50px 0; }
  .landing-copy { text-align: center; }
  .hero-copy { margin-inline: auto; }
  .flow-strip { justify-content: center; }
  .early-pricing { justify-content: center; }
  .auth-card { width: min(100%, 520px); margin: auto; }
  .profile-form,
  .game-layout,
  .connection-layout,
  .plan-grid,
  .settings-grid,
  .verification-grid { grid-template-columns: 1fr; }
  .profile-photo-editor { grid-template-columns: auto 1fr; align-items: center; justify-items: start; text-align: left; }
  .profile-photo { width: 150px; grid-row: 1 / 3; }
  .game-sidebar { grid-template-columns: 1fr 1fr; }
  .game-sidebar .danger-button { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  body { background-position: 37% top; background-attachment: scroll; }
  .site-header { min-height: 66px; padding-inline: 14px; }
  .site-header { align-items: center; gap: 9px; }
  .brand { font-size: 16px; }
  .brand > span:last-child { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .mobile-nav-toggle { display: inline-flex; }
  .app-nav {
    width: min(250px, calc(100vw - 28px));
    max-height: calc(100vh - 82px);
    padding: 9px;
    position: absolute;
    top: 58px;
    right: 14px;
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    background: rgba(255, 252, 247, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(16, 24, 38, 0.2);
  }
  .app-nav.open { display: flex; }
  .nav-button { width: 100%; padding: 12px; font-size: 12px; text-align: left; }
  .landing,
  .app-shell { width: calc(100% - 24px); }
  .landing { padding: 34px 0; gap: 32px; }
  .landing h1 { font-size: clamp(47px, 15vw, 72px); letter-spacing: -3px; }
  .hero-copy { font-size: 16px; }
  .flow-strip span { flex: 1 1 100%; justify-content: center; }
  .marketing-benefits { grid-template-columns: 1fr; text-align: left; }
  .early-pricing { align-items: stretch; flex-direction: column; text-align: left; }
  .install-app-panel { grid-template-columns: 1fr; text-align: left; }
  .install-app-panel .secondary-button { width: 100%; }
  .install-app-panel [data-install-message] { grid-column: auto; }
  .app-panel { padding: 22px 16px; border-radius: 16px; }
  .section-heading,
  .game-heading,
  .chat-heading { flex-direction: column; }
  .section-heading h2,
  .game-heading h2,
  .connection-banner h2,
  .chat-heading h2 { font-size: 37px; }
  .profile-photo-editor { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-photo { width: 180px; grid-row: auto; }
  .field-grid { grid-template-columns: 1fr; }
  .identity-fieldset { padding: 18px 14px; }
  .preference-grid { grid-template-columns: 1fr; }
  .location-preference-grid { grid-template-columns: 1fr; }
  .location-search-row { grid-template-columns: 1fr; }
  .location-preference-actions { align-items: stretch; flex-direction: column; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .discover-preference-bar { align-items: flex-start; }
  .match-quota-card { align-items: stretch; flex-direction: column; }
  .match-quota-card .secondary-button { width: 100%; }
  .match-quota-actions,
  .single-game-purchase-card { align-items: stretch; flex-direction: column; }
  .match-quota-actions .primary-button,
  .single-game-purchase-card .primary-button { width: 100%; }
  .discover-filter-heading { align-items: flex-start; flex-direction: column; }
  .discover-filter-grid { grid-template-columns: 1fr; }
  .opponent-carousel { grid-template-columns: 1fr; }
  .opponent-visual { min-height: 230px; }
  .opponent-details { padding: 24px; }
  .discover-actions { grid-template-columns: 1fr 1fr; }
  .discover-actions .primary-button { grid-column: 1 / -1; grid-row: 1; }
  .square { font-size: clamp(23px, 10.8vw, 44px); }
  .chessboard { border-width: 4px; }
  .game-sidebar { grid-template-columns: 1fr; }
  .game-sidebar .danger-button { grid-column: auto; }
  .connection-banner { grid-template-columns: 1fr; }
  .connection-banner > span { display: none; }
  .revealed-profile,
  .chat-panel { padding: 19px; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form .primary-button { width: 100%; }
  .connection-actions { align-items: stretch; flex-direction: column; }
  .connection-actions .primary-button,
  .connection-actions .secondary-button { width: 100%; }
  .plan-card { padding: 22px; }
  .billing-actions { align-items: stretch; flex-direction: column; }
  .billing-actions .secondary-button,
  .billing-actions .text-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Dark copper theme: keep every app state readable over the scenic backdrop. */
* { scrollbar-color: #46576a var(--ink); }

.site-header {
  background: rgba(7, 17, 29, 0.84);
  border-bottom-color: var(--line-accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.brand,
.nav-button,
.text-button,
.icon-button { color: var(--text); }

.brand > span:last-child > span,
.eyebrow,
.landing h1 em,
.revealed-meta,
.plan-label,
.settings-links a,
.footer-links a { color: var(--copper-bright); }

.brand-mark {
  background: linear-gradient(145deg, #26384b, var(--ink));
  border: 1px solid var(--line-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 1px rgba(255, 255, 255, 0.12);
}

.mobile-nav-toggle {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-accent);
}

.nav-button:hover,
.text-button:hover,
.icon-button:hover { background: rgba(247, 241, 231, 0.1); }

.landing h1 { text-shadow: 0 2px 28px rgba(0, 0, 0, 0.68); }
.hero-copy { color: var(--text-soft); }

.flow-strip span {
  background: rgba(11, 22, 35, 0.8);
  border-color: var(--line-accent);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.24);
}

.flow-strip strong,
.verification-number {
  color: var(--ink);
  background: var(--copper-bright);
}

.auth-card,
.app-panel {
  background: rgba(12, 24, 37, 0.93);
  border-color: var(--line-accent);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.auth-card::before,
.app-panel::before { border-color: rgba(247, 241, 231, 0.08); }

.auth-tabs {
  background: var(--ink);
  border: 1px solid var(--line);
}

.auth-tab { color: var(--muted); }
.auth-tab.active {
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

label { color: var(--text-soft); }

input,
select,
textarea {
  color: var(--text);
  background: var(--surface);
  border-color: rgba(247, 241, 231, 0.2);
  accent-color: var(--copper-bright);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--copper-bright);
  box-shadow: 0 0 0 3px rgba(240, 173, 117, 0.15);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--surface) inset;
}

.primary-button {
  color: var(--ink);
  background: var(--copper-bright);
  border-color: var(--copper-bright);
}

.secondary-button {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--line);
}

.primary-button:hover,
.secondary-button:hover { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34); }

.danger-button {
  color: #ffb0a8;
  background: rgba(255, 123, 112, 0.12);
  border-color: rgba(255, 139, 128, 0.34);
}

.danger-text { color: #ffb0a8; }
.upload-button { color: var(--ink); background: var(--copper-bright); }
.prototype-note { color: var(--muted); }
.form-message { color: var(--copper-bright) !important; }

.verification-card,
.revealed-profile,
.chat-panel,
.settings-card,
.plan-card {
  color: var(--text);
  background: var(--surface-raised);
  border-color: var(--line);
}

.verification-status {
  color: #ffb4ad;
  background: rgba(255, 123, 112, 0.16);
}

.verification-status.verified {
  color: #d9f6a2;
  background: rgba(153, 195, 72, 0.2);
}

.prototype-action {
  color: var(--copper-bright);
  border-color: var(--line-accent);
}

.verification-privacy {
  background: rgba(66, 94, 128, 0.25);
  border-left-color: var(--copper-bright);
}

.verification-summary { color: var(--text); background: var(--surface); }

.step-pill,
.online-pill {
  color: #dbefb5;
  background: rgba(124, 158, 62, 0.18);
  border: 1px solid rgba(201, 242, 107, 0.22);
}

.profile-photo {
  background: linear-gradient(145deg, #b46f45, #5a3c4d);
  border-color: var(--surface-soft);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.profile-photo-thumb {
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.32);
}

.identity-fieldset {
  background: rgba(56, 43, 80, 0.28);
  border-color: var(--line-accent);
}

.identity-fieldset legend,
.discover-preference-bar strong,
.match-quota-card strong,
.discover-filter-grid label { color: var(--text); }

.preference-grid .check-field,
.discover-preference-bar,
.location-result-button {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.preference-grid .check-field:has(input:checked) {
  background: linear-gradient(135deg, rgba(217, 144, 88, 0.22), rgba(201, 242, 107, 0.1));
  border-color: var(--copper-bright);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.location-preference-fieldset {
  background: linear-gradient(135deg, rgba(72, 111, 148, 0.2), rgba(217, 144, 88, 0.12));
}

.location-search-results {
  color: var(--muted);
  background: rgba(7, 17, 29, 0.88);
  border-color: var(--line);
}

.location-result-button:hover {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--copper-bright);
}

.match-quota-card {
  background: rgba(83, 111, 45, 0.2);
  border-color: rgba(201, 242, 107, 0.28);
}

.single-game-purchase-card {
  background: linear-gradient(135deg, rgba(83, 111, 45, 0.24), rgba(49, 39, 73, 0.54));
  border-color: var(--line-accent);
}

.single-game-purchase-card h3,
.single-game-purchase-action strong { color: var(--text); }

.discover-filters {
  background: linear-gradient(135deg, rgba(49, 39, 73, 0.5), rgba(43, 66, 45, 0.32));
  border-color: var(--line-accent);
}

.discover-filter-grid select { background: var(--surface); }

.opponent-carousel {
  background: var(--ink);
  border: 1px solid var(--line-accent);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.44);
}

.opponent-details > p,
.compatibility-list span { color: var(--text-soft); }

.board-column {
  background: linear-gradient(145deg, #25384b, #060d16);
  border: 1px solid var(--line-accent);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.46);
}

.square.selected { box-shadow: inset 0 0 0 5px var(--copper-bright); }

.player-strip {
  color: var(--text);
  background: var(--surface-soft);
}

.match-rule,
.move-history {
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.move-history ol { color: var(--text-soft); }

.connection-banner {
  background: var(--ink);
  border: 1px solid var(--line-accent);
}

.connection-banner p:last-child { color: var(--text-soft); }
.profile-facts div { border-color: var(--line); }

.chat-messages {
  background: var(--surface);
  border: 1px solid var(--line);
}

.message {
  color: var(--text);
  background: #25334a;
}

.message.mine { color: var(--ink); background: var(--copper-bright); }
.message small { color: inherit; opacity: 0.72; }

.danger-zone {
  background: rgba(125, 39, 45, 0.18);
  border-color: rgba(255, 139, 128, 0.25);
}

.safety-dialog {
  color: var(--text);
  background: rgba(11, 22, 35, 0.98);
  border-color: var(--line-accent);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.66);
}

.safety-dialog .field-help { color: var(--muted); }

.billing-notice {
  color: #edc5a5;
  background: rgba(217, 144, 88, 0.14);
  border-color: var(--line-accent);
}

.billing-notice.success {
  color: #d9f6a2;
  background: rgba(133, 174, 57, 0.18);
  border-color: rgba(201, 242, 107, 0.28);
}

.billing-notice.error {
  color: #ffb0a8;
  background: rgba(255, 123, 112, 0.12);
  border-color: rgba(255, 139, 128, 0.3);
}

.plan-card.plus-plan {
  background:
    radial-gradient(circle at 100% 0, rgba(217, 144, 88, 0.24), transparent 42%),
    var(--ink);
  border-color: var(--line-accent);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
}

.plan-ribbon { color: var(--ink); background: var(--copper-bright); }
.plus-plan .plan-label { color: var(--copper-bright); }
.plan-card li { color: var(--text-soft); }
.plan-card li::before { color: var(--copper-bright); }
.plus-plan li::before { color: var(--lime); }

.billing-faq details {
  background: var(--surface-raised);
  border-color: var(--line);
}

.membership-settings-card { background: rgba(217, 144, 88, 0.1); }

footer {
  color: var(--muted);
  background: rgba(7, 17, 29, 0.82);
  border-top-color: var(--line-accent);
}

@media (max-width: 650px) {
  .app-nav {
    background: rgba(11, 22, 35, 0.98);
    border-color: var(--line-accent);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}
