:root {
  --bg: #000000;
  --panel: rgba(0, 0, 0, 0.78);
  --panel-strong: rgba(7, 7, 7, 0.96);
  --line: rgba(255, 245, 225, 0.42);
  --soft-line: rgba(255, 245, 225, 0.16);
  --text: #fff1d8;
  --muted: #9db5d6;
  --gold: #c99515;
  --blue: #1710b4;
  --deep-red: #310000;
  --danger: #c84329;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: #000;
  font-family: "Courier New", Courier, monospace;
}

#letter-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

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

.brand-block h1,
h2,
h3,
p {
  margin-top: 0;
}

.brand-block h1 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-line {
  margin: 6px 0 0;
  color: var(--text);
  opacity: 0.74;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.eyebrow,
.stat-label,
th {
  color: var(--muted);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stage {
  position: relative;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(360px, 1fr);
  gap: 28px;
  align-items: start;
}

.auth-layout-single {
  grid-template-columns: minmax(340px, 430px);
}

.account-layout {
  display: grid;
  gap: 18px;
}

.home-layout {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.auth-main {
  display: grid;
  gap: 14px;
}

.hero-copy h2 {
  font-size: clamp(1.9rem, 3.1vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 0;
  text-transform: uppercase;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.form-panel,
.compact-panel,
.table-panel,
.board-panel {
  padding: 18px;
}

.form-panel {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
}

input {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.94);
  color: var(--text);
  font: inherit;
  border-radius: 0;
}

input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  text-decoration: none;
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.96);
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-btn {
  background: var(--deep-red);
  color: var(--danger);
}

.ghost-btn {
  background: rgba(9, 9, 9, 0.92);
  color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.google-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.inline-button {
  max-width: 240px;
}

.push-form {
  margin-top: 16px;
}

.push-btn {
  width: 100%;
}

.action-panel h2 {
  margin-bottom: 0;
}

.stats-panel table {
  margin-top: 8px;
}

.flash {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.94);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flash-success {
  color: #d2a52d;
}

.flash-error {
  color: #ff7f66;
}

.flash-info {
  color: var(--muted);
}

.panel-copy,
.panel-foot,
.panel-links a,
.meta-line,
td,
a,
.mono {
  font-size: 0.95rem;
}

.panel-copy,
.panel-foot,
.dim {
  color: var(--muted);
}

.panel-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.divider {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--soft-line);
}

.divider span {
  position: relative;
  padding: 0 10px;
  background: var(--panel);
}

a {
  color: var(--text);
}

.inline-form {
  margin-top: 10px;
}

.stats-grid {
  display: grid;
  gap: 12px;
}

.stat-value {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--soft-line);
  vertical-align: top;
}

th {
  font-weight: 400;
}

button {
  font: inherit;
}

@media (max-width: 920px) {
  .auth-layout,
  .auth-layout-single {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 20px);
    padding-top: 16px;
  }

  .topbar,
  .nav-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
