:root {
  color-scheme: dark;
  --bg: #060606;
  --panel: #141414;
  --panel-soft: #1d1d1d;
  --gold: #d2ae6a;
  --red: #f00632;
  --green: #29c071;
  --text: #f5f1e8;
  --muted: #a7a29a;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: var(--bg);
  height: 100%;
  margin: 0;
}

body {
  align-items: center;
  display: flex;
  font-family: Arial, Helvetica, sans-serif;
  justify-content: center;
  min-height: 100svh;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.phone-shell {
  aspect-ratio: 1080 / 1920;
  background: #020202;
  height: 100svh;
  max-height: 100svh;
  max-width: 100vw;
  overflow: hidden;
  position: relative;
  width: min(100vw, calc(100svh * 1080 / 1920));
}

.screen {
  background-color: #020202;
  display: none;
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.screen.is-active {
  display: block;
}

.hero-screen {
  background-image: var(--screen-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hotspot {
  position: absolute;
}

.hotspot {
  appearance: none;
  background: transparent;
  border: 0;
  color: transparent;
  cursor: pointer;
  padding: 0;
}

.compact-form input:focus,
.compact-form textarea:focus,
.help-panel textarea:focus,
.help-panel select:focus,
.rl-form input:focus {
  box-shadow: inset 0 0 0 2px var(--gold);
  outline: 0;
}

.home-login { height: 5.2%; left: 30%; top: 46.2%; width: 40%; }
.home-register { height: 5.2%; left: 30%; top: 53.5%; width: 40%; }
.home-google { height: 5.7%; left: 29%; top: 60.6%; width: 42%; }
.home-club { height: 5.1%; left: 30%; top: 73.1%; width: 40%; }

.app-screen {
  background:
    linear-gradient(180deg, rgba(240, 6, 50, 0.15), transparent 24%),
    radial-gradient(circle at 20% 0%, rgba(210, 174, 106, 0.16), transparent 24%),
    #080808;
  color: var(--text);
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
}

.auth-screen {
  display: none;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.auth-screen.is-active {
  display: flex;
  flex-direction: column;
}

.auth-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  min-height: 112px;
}

.brand-mark {
  display: grid;
  line-height: 0.9;
  padding-top: 4px;
}

.brand-mark span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.brand-mark strong {
  color: var(--red);
  font-size: 38px;
  letter-spacing: 0;
}

.lang-control select {
  appearance: none;
  background: rgba(10, 10, 10, 0.76);
  border: 2px solid var(--gold);
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  height: 32px;
  min-width: 70px;
  padding: 0 13px;
  text-align: center;
}

.auth-card {
  background: rgba(10, 10, 10, 0.68);
  border: 1px solid rgba(210, 174, 106, 0.42);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: auto 0;
  padding: 20px;
  width: 100%;
}

.rl-form h1,
.done-card h1 {
  color: var(--text);
  font-size: 30px;
  margin-bottom: 4px;
  text-transform: none;
}

.form-note,
.done-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.rl-form label {
  color: var(--muted);
  display: grid;
  gap: 5px;
  font-size: 13px;
  min-width: 0;
}

.rl-form input {
  background: rgba(22, 22, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  height: 48px;
  min-width: 0;
  padding: 0 13px;
  width: 100%;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-row label {
  align-items: center;
  background: rgba(22, 22, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  font-size: 13px;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
}

.choice-row input {
  accent-color: var(--gold);
}

.primary-button,
.text-button {
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
}

.primary-button {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 20px;
}

.text-button {
  background: transparent;
  border: 0;
  color: #fff;
  text-decoration: underline;
}

.app-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-header > div:not(.header-actions) {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  color: var(--gold);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.05;
}

h2 {
  font-size: 17px;
}

.icon-button {
  align-items: center;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font-size: 18px;
  height: 42px;
  justify-content: center;
  width: 42px;
  flex: 0 0 42px;
}

.header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.pill-button {
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(210, 174, 106, 0.55);
  border-radius: 999px;
  color: var(--gold);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 12px;
}

.status-band,
.panel,
.help-panel,
.metrics-grid article,
.menu-item {
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.status-band {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 14px;
}

.status-band span,
.metrics-grid span,
.list-item span,
.empty {
  color: var(--muted);
}

.status-band strong {
  font-size: 18px;
}

.metrics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.metrics-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics-grid article {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
}

.metrics-grid strong {
  font-size: 28px;
}

.panel,
.help-panel {
  margin-bottom: 12px;
  padding: 14px;
}

.panel-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-title span {
  background: rgba(210, 174, 106, 0.16);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 700;
  min-width: 30px;
  padding: 5px 9px;
  text-align: center;
}

.panel-title button {
  background: transparent;
  border: 1px solid rgba(210, 174, 106, 0.55);
  border-radius: 999px;
  color: var(--gold);
  cursor: pointer;
  padding: 7px 10px;
}

.help-panel,
.compact-form {
  display: grid;
  gap: 10px;
}

.help-panel select,
.help-panel textarea,
.compact-form input,
.compact-form textarea {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 11px 12px;
  resize: none;
  width: 100%;
}

.help-panel button,
.compact-form button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 46px;
}

.danger-button {
  background: var(--red);
}

.compact-form button {
  background: var(--gold);
  color: #16130d;
}

.list {
  display: grid;
  gap: 8px;
}

.menu-grid {
  display: grid;
  gap: 10px;
}

.menu-item {
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 15px;
  text-align: left;
  width: 100%;
}

.menu-item strong {
  color: var(--gold);
  font-size: 18px;
}

.menu-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.list-item {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 11px;
}

.list-item strong {
  font-size: 14px;
  line-height: 1.25;
}

.list-item span {
  font-size: 12px;
  line-height: 1.35;
}

.list-item.urgent {
  border-color: rgba(240, 6, 50, 0.5);
}

.empty {
  font-size: 13px;
  padding: 8px 0;
}

.toast {
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(210, 174, 106, 0.55);
  border-radius: 8px;
  bottom: max(18px, env(safe-area-inset-bottom));
  color: #fff;
  display: none;
  font: 700 14px/1.35 Arial, Helvetica, sans-serif;
  left: 50%;
  max-width: min(88vw, 420px);
  padding: 12px 14px;
  position: fixed;
  text-align: center;
  transform: translateX(-50%);
  z-index: 10;
}

.toast.is-visible {
  display: block;
}

:root[dir="rtl"] .app-header,
:root[dir="rtl"] .auth-header {
  direction: rtl;
}

:root[dir="rtl"] .menu-item,
:root[dir="rtl"] .list-item,
:root[dir="rtl"] .rl-form,
:root[dir="rtl"] .panel,
:root[dir="rtl"] .help-panel {
  text-align: right;
}

@media (max-height: 700px) {
  .auth-header {
    min-height: 74px;
  }

  .auth-card {
    gap: 9px;
    padding: 15px;
  }

  .rl-form h1,
  .done-card h1 {
    font-size: 24px;
  }

  .rl-form input,
  .primary-button,
  .text-button {
    min-height: 42px;
  }
}
