:root {
  --bg: #f4efe6;
  --surface: rgba(255, 252, 247, 0.9);
  --surface-strong: #fffaf1;
  --text: #1f1d1a;
  --muted: #70675d;
  --primary: #b54d1a;
  --primary-dark: #8e3810;
  --line: rgba(31, 29, 26, 0.12);
  --danger: #9d2020;
  --shadow: 0 20px 50px rgba(92, 55, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top right, rgba(181, 77, 26, 0.16), transparent 30%),
    linear-gradient(180deg, #f8f0e3 0%, #f4efe6 35%, #ebe1d1 100%);
}

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

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  width: 100%;
  margin-top: 0;
  padding: 14px 0 12px;
  background: linear-gradient(180deg, rgba(255, 244, 228, 0.96) 0%, rgba(247, 230, 205, 0.94) 100%);
  border-bottom: 1px solid rgba(129, 84, 44, 0.12);
  box-shadow: 0 14px 28px rgba(92, 55, 29, 0.08);
}

.header-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 10px 18px 12px;
  padding-inline: 18px;
  border-radius: 28px;
  background: rgba(255, 250, 241, 0.78);
  border: 1px solid rgba(129, 84, 44, 0.1);
  box-shadow: 0 16px 32px rgba(92, 55, 29, 0.08);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-header .brand,
.site-header nav a,
.site-header .muted,
.site-header .sandwich-menu summary::before {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(129, 84, 44, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.74);
}

.language-switcher a {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
}

.language-switcher a.active,
.language-switcher a:hover {
  background: rgba(181, 77, 26, 0.12);
}

.sandwich-menu {
  position: relative;
}

.sandwich-menu summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

.sandwich-menu summary::-webkit-details-marker {
  display: none;
}

.sandwich-menu summary::before {
  content: "\2261";
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
}

.sandwich-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 250, 241, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 20;
}

.sandwich-panel a {
  padding: 10px 12px;
  border-radius: 14px;
}

.sandwich-panel a:hover {
  background: rgba(181, 77, 26, 0.08);
}

.ticker-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 10px 0 26px;
}

.ticker-label {
  padding: 12px 16px;
  border-radius: 999px;
  background: #1f1d1a;
  color: #fff8f0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 700;
}

.ticker-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 248, 240, 0.7);
  box-shadow: var(--shadow);
}

.ticker-viewport::before,
.ticker-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 1;
  pointer-events: none;
}

.ticker-viewport::before {
  left: 0;
  background: linear-gradient(90deg, #f4efe6 0%, rgba(244, 239, 230, 0) 100%);
}

.ticker-viewport::after {
  right: 0;
  background: linear-gradient(270deg, #f4efe6 0%, rgba(244, 239, 230, 0) 100%);
}

.ticker-track {
  display: flex;
  gap: 14px;
  width: max-content;
  padding: 14px;
  animation: ticker-slide 42s linear infinite;
}

.ticker-card {
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.96) 0%, rgba(248, 237, 219, 0.96) 100%);
  border: 1px solid rgba(31, 29, 26, 0.08);
}

.ticker-card.placeholder {
  opacity: 0.72;
}

.ticker-rank {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

main.shell {
  padding: 12px 0 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 1.5rem;
  font-weight: 700;
}

.brand-wrap {
  display: grid;
  gap: 6px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  flex: 0 0 52px;
}

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

.hero,
.token-layout,
.stats,
.meta-grid,
.grid {
  display: grid;
  gap: 20px;
}

.hero,
.token-layout {
  grid-template-columns: 1.5fr 1fr;
  align-items: start;
}

.hero {
  margin: 30px 0 36px;
}

.hero-brand-panel {
  position: relative;
  overflow: hidden;
}

.hero-logo {
  width: min(100%, 240px);
  display: block;
  margin: 0 auto 18px;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(83, 18, 170, 0.16));
}

.home-section {
  margin: 0 0 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.82) 0%, rgba(248, 238, 224, 0.68) 100%);
  box-shadow: var(--shadow);
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(181, 77, 26, 0.1);
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 2.2vw, 2.6rem);
}

.section-header p {
  margin: 0;
  max-width: 58ch;
}

.hero h1,
h1,
h2,
h3 {
  line-height: 1.06;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  margin: 8px 0 14px;
  max-width: 11ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--primary-dark);
  margin: 0;
}

.hero-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button,
button {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff8f0;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.88rem;
}

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

.panel,
.card,
.purchase-card,
.auth-card,
.wallet-panel,
table,
.notice,
.embed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel,
.card,
.purchase-card,
.auth-card,
.wallet-panel,
.notice,
.embed-card {
  border-radius: 28px;
  padding: 24px;
}

.home-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(249, 241, 228, 0.94) 100%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 77, 26, 0.14) 0%, rgba(181, 77, 26, 0) 70%);
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 56px rgba(92, 55, 29, 0.16);
  border-color: rgba(181, 77, 26, 0.22);
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 18px 0 30px;
}

.panel strong {
  display: block;
  font-size: 2rem;
}

.badge-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(181, 77, 26, 0.12);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(31, 29, 26, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #cf6d26 0%, #b54d1a 100%);
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.auth-card {
  width: min(720px, 100%);
  margin: 40px auto;
}

.auth-card.wide {
  width: min(920px, 100%);
}

.stack {
  display: grid;
  gap: 14px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font: inherit;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

fieldset {
  margin: 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 24px;
}

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

.inline-form {
  display: inline-block;
  margin: 0 8px 8px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 24px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 0 0 28px;
}

.tool-card h2 {
  margin: 8px 0 10px;
}

.inline-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--primary-dark);
  font-weight: 700;
}

.token-copy h1 {
  font-size: clamp(2rem, 3vw, 3.5rem);
  margin: 10px 0 14px;
}

.purchase-card {
  position: sticky;
  top: 16px;
}

.notice {
  margin-bottom: 20px;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

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

.metric-negative {
  color: #c22f2f;
}

.metric-positive {
  color: #1a7f37;
}

.empty {
  color: var(--muted);
}

.embed-body {
  background: transparent;
  padding: 12px;
}

.embed-card {
  min-height: calc(100vh - 24px);
}

.site-footer {
  width: 100%;
  margin-top: 10px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(249, 236, 214, 0.97) 0%, rgba(241, 222, 194, 0.96) 100%);
  border-top: 1px solid rgba(129, 84, 44, 0.12);
  box-shadow: 0 -10px 24px rgba(92, 55, 29, 0.05);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 22px;
  color: #5d4837;
  font-size: 0.92rem;
}

@keyframes ticker-slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 840px) {
  .header-shell,
  .hero,
  .token-layout,
  .ticker-shell,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ticker-label {
    justify-self: start;
  }

  .header-actions,
  .footer-shell {
    display: grid;
    justify-content: start;
  }

  .ticker-card {
    min-width: 190px;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  td {
    padding-top: 8px;
  }
}
