:root {
  color-scheme: light;
  font-family:
    "Noto Serif SC", "Microsoft YaHei", "Noto Sans Devanagari", "Siddhanta", serif;
  --page-bg: #efe3ca;
  --paper: #fff7e8;
  --surface: rgba(255, 248, 232, 0.96);
  --surface-strong: #f7ead0;
  --ink: #3f2a14;
  --muted: #765e3d;
  --brand: #5c390d;
  --accent: #a8792a;
  --border: #d8be83;
  --shadow: rgba(87, 56, 18, 0.18);
  --ok: #2f6f4e;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(145deg, var(--fw-soft), transparent 34%),
    radial-gradient(circle at 18% 12%, var(--fw-accent-soft), transparent 28%),
    var(--page-bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  color: var(--brand);
  background: var(--paper);
  font-size: 30px;
}

.brand-link strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.brand-link small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.head-actions {
  display: flex;
  gap: 8px;
}

.head-actions a,
.secondary-action,
.primary-action,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.primary-action,
.submit-button {
  border-color: var(--brand);
  color: var(--fw-on-action);
  background: var(--brand);
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  min-height: 340px;
}

.hero-copy,
.chant-card,
.panel,
.summary-grid article {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 60px var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 58px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.08;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.16;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-actions,
.section-head,
.board-head {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.chant-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  background: var(--brand);
  color: var(--fw-on-action);
}

.chant-card .dvn {
  font-size: 82px;
  line-height: 1;
}

.chant-card strong {
  margin-top: 8px;
  font-size: 30px;
}

.chant-card p {
  margin: 18px 0 0;
  color: color-mix(in srgb, var(--fw-on-action) 78%, transparent);
  line-height: 1.7;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.summary-grid article {
  padding: 20px;
  box-shadow: none;
}

.summary-number {
  display: block;
  color: var(--brand);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.summary-grid h2 {
  margin: 10px 0 8px;
  font-size: 21px;
}

.summary-grid p,
.section-head p,
.rule-list,
.leader-meta,
.form-message {
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: clamp(18px, 3vw, 28px);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head p:last-child {
  width: 100%;
  margin-bottom: 0;
  line-height: 1.7;
}

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

.application-form label {
  display: grid;
  gap: 8px;
}

.application-form .full,
.submit-button,
.form-message {
  grid-column: 1 / -1;
}

.application-form span {
  color: var(--muted);
}

.application-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: var(--fw-card);
}

.application-form input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 34%, transparent);
  outline-offset: 2px;
}

.submit-button {
  min-height: 50px;
  cursor: pointer;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-message {
  min-height: 24px;
  margin: 0;
}

.form-message.success {
  color: var(--ok);
}

.form-message.error {
  color: var(--fw-danger);
}

.rule-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  line-height: 1.8;
}

.leaderboard-panel {
  margin-top: 18px;
}

.board-head {
  justify-content: space-between;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leader-row {
  display: grid;
  grid-template-columns: 56px 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-strong) 64%, var(--fw-card));
}

.leader-rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  color: var(--brand);
  background: var(--paper);
  font-size: 20px;
  font-weight: 700;
}

.leader-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--brand);
  background: var(--paper);
  font-size: 22px;
  font-weight: 700;
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-main strong {
  display: block;
  font-size: 20px;
}

.leader-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.leader-score {
  min-width: 116px;
  text-align: right;
}

.leader-score strong {
  display: block;
  color: var(--brand);
  font-size: 26px;
  line-height: 1;
}

.leader-score small {
  color: var(--muted);
}

.medal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.medal {
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--brand);
  background: var(--paper);
  font-size: 13px;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 780px) {
  .site-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .head-actions a {
    min-height: 38px;
    padding: 0 8px;
  }

  main {
    width: min(100% - 20px, 560px);
    padding-top: 12px;
  }

  .hero-band,
  .content-grid,
  .summary-grid,
  .application-form {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: 0;
  }

  .hero-copy {
    padding: 24px 18px;
  }

  .chant-card {
    min-height: 180px;
  }

  .chant-card .dvn {
    font-size: 58px;
  }

  .primary-action,
  .secondary-action,
  .submit-button {
    width: 100%;
  }

  .leader-row {
    grid-template-columns: 46px 42px minmax(0, 1fr);
  }

  .leader-rank,
  .leader-avatar {
    width: 40px;
    height: 40px;
  }

  .leader-score {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    text-align: left;
  }
}
