:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #162e28;
  background: #f3f6f4;
  --ink: #162e28;
  --muted: #50625b;
  --brand: #155b45;
  --deep: #10392f;
  --border: #dee7e1;
  --surface: #fff;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid #e9aa51; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.skip-link { position: fixed; top: 6px; left: 12px; z-index: 10; padding: 10px 14px; transform: translateY(-150%); background: white; }
.skip-link:focus { transform: none; }
.shell { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 29px 19px 22px; display: flex; flex-direction: column; color: #eff9f3; background: var(--deep); }
.brand { display: flex; gap: 11px; align-items: center; margin: 0 9px 41px; text-decoration: none; font-size: 1.25rem; font-weight: 750; letter-spacing: -.045em; }
.brand-icon { display: grid; width: 39px; height: 39px; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--deep); background: #a1e7be; font-size: 1.55rem; }
.brand small { display: block; margin-top: 2px; color: #b4cfc3; font-size: .77rem; font-weight: 500; letter-spacing: .015em; }
.nav-caption, .sidebar-caption { margin: 0 12px 11px; color: #b4cfc3; font-size: .69rem; font-weight: 750; letter-spacing: .15em; }
.nav-button { display: flex; gap: 11px; align-items: center; width: 100%; min-height: 44px; padding: 9px 12px; border: 0; border-radius: 8px; text-align: left; color: #c9ded4; background: transparent; font-size: .94rem; }
.nav-button + .nav-button { margin-top: 5px; }
.nav-button[aria-current="page"], .nav-button:hover { background: #255347; color: #fff; }
.nav-icon { display: inline-block; min-width: 20px; color: #a9e5c1; font-size: 1.1rem; text-align: center; }
.sidebar-footer { display: grid; gap: 6px; margin: auto 9px 0; padding: 17px 3px 0; border-top: 1px solid #3b6257; font-size: .8rem; color: #c8ded4; }
.sidebar-footer .sidebar-caption { margin: 0; }
.main-shell { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 67px; padding: 9px clamp(21px, 3.8vw, 58px); border-bottom: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .88rem; }
.session-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mode-label { padding: 6px 10px; border-radius: 6px; font-size: .76rem; font-weight: 700; background: #edf5f0; color: #2e5c4b; }
main { width: 100%; max-width: 1380px; margin: 0 auto; padding: 35px clamp(21px, 3.8vw, 58px) 30px; outline-offset: -3px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading h1 { font-size: clamp(1.95rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -.055em; }
.page-heading p { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 26px; padding: 30px 33px; border-radius: var(--radius); color: #fff; background: #18463b; }
.hero::after { z-index: -1; content: ""; position: absolute; inset: 0 0 0 53%; opacity: .6; background: radial-gradient(ellipse at 100% 0, #477964, transparent 67%), repeating-linear-gradient(135deg, transparent 0 22px, #3f6a5e 23px, transparent 24px 43px); }
.hero-label { color: #b2e9c7; font-size: .75rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.hero h2 { margin-top: 8px; font-size: clamp(1.6rem, 4vw, 2.35rem); line-height: 1.1; letter-spacing: -.047em; }
.hero p { margin-top: 10px; max-width: 52ch; color: #d6e8df; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 8px; color: #fff; background: var(--brand); font-size: .875rem; font-weight: 700; line-height: 1.3; text-align: center; }
.button:hover:enabled { filter: brightness(1.12); }
.button.secondary { border-color: #cadcd1; color: #244f40; background: #fff; }
.button.quiet { min-height: 32px; padding: 5px 9px; border-color: transparent; color: #345e4e; background: transparent; }
.button.mint { color: #10392f; background: #a6e9bf; }
.button.light-outline { border-color: #79a898; color: #fff; background: #225044; }
.button.small { min-height: 35px; padding: 6px 10px; font-size: .82rem; }
.hero-mark { display: grid; width: 142px; height: 112px; place-items: center; padding: 12px; border: 1px solid #6f9e8b; border-radius: 15px; color: #d7f1e3; background: #24574a; text-align: center; }
.hero-mark strong { font-size: 2.25rem; line-height: 1; letter-spacing: -.06em; }
.hero-mark span { font-size: .78rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 20px 0; }
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: center; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.stat-icon, .reward-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 9px; color: #1c654d; background: #e7f4ed; font-size: 1.3rem; }
.stat:nth-child(2) .stat-icon { color: #795019; background: #f8efdc; }
.stat:nth-child(3) .stat-icon { color: #465c84; background: #edf0f8; }
.stat:nth-child(4) .stat-icon { color: #6b5382; background: #f2edf6; }
.stat strong { display: block; font-size: 1.65rem; line-height: 1; letter-spacing: -.04em; }
.stat span:last-child { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; }
.panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 19px 21px; }
.panel-head h2 { font-size: 1.12rem; letter-spacing: -.025em; }
.panel-head p { margin-top: 4px; color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
th { color: #475c53; background: #f5f8f6; font-size: .76rem; font-weight: 700; }
th, td { padding: 12px 18px; border-top: 1px solid #e7eee9; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 21px; }
td:first-child { font-weight: 650; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 30px; padding: 4px 9px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ready { color: #216247; background: #e4f5eb; }
.badge.requested { color: #805312; background: #fcf1da; }
.badge.collected { color: #3d587f; background: #eaf0fa; }
.empty { margin: 0; padding: 25px 21px; color: var(--muted); }
.reward-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.reward-grid + .panel { margin-top: 20px; }
.reward-card { display: grid; gap: 12px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.reward-card h2 { font-size: 1.08rem; }
.reward-card p { color: var(--muted); font-size: .88rem; }
.reward-card .button { justify-self: start; }
.search { width: min(100%, 275px); }
.field { display: grid; gap: 6px; color: var(--ink); font-size: .88rem; font-weight: 650; }
input, select { min-width: 0; width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #bdcfc4; border-radius: 7px; color: var(--ink); background: #fff; font-size: 1rem; }
input[readonly] { background: #f2f7f4; }
.notice { padding: 11px 14px; margin-bottom: 16px; border: 1px solid #b8d8c6; border-radius: 8px; background: #eaf7ee; line-height: 1.45; }
.notice.error { border-color: #e8bdad; color: #7d311d; background: #fff2ed; }
.loading { padding: 25px 0; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: auto; padding: 14px clamp(21px, 3.8vw, 58px); border-top: 1px solid var(--border); color: #596d62; font-size: .76rem; }
dialog { width: min(94vw, 490px); max-height: 85vh; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #11291fc0; }
.dialog-inner { position: relative; padding: 26px; }
.dialog-inner h2 { margin: 0 35px 14px 0; letter-spacing: -.035em; }
.close-button { position: absolute; right: 13px; top: 12px; width: 35px; height: 35px; border: 0; border-radius: 8px; color: var(--ink); background: #eef5f0; font-size: 1.45rem; line-height: 1; }
.dialog-stack { display: grid; gap: 13px; }
.dialog-stack p { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.dialog-stack .button { justify-self: start; }
.details { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; margin: 0; padding: 14px; border-radius: 8px; background: #f1f6f2; font-size: .88rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; font-weight: 650; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 186px minmax(0, 1fr); }
  .sidebar { padding-right: 12px; padding-left: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: relative; height: auto; padding: 13px 16px; }
  .brand { margin: 0 0 12px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-caption, .sidebar-footer { display: none; }
  .nav-button { width: auto; gap: 6px; min-height: 39px; padding: 6px 8px; font-size: .85rem; }
  .nav-button + .nav-button { margin-top: 0; }
  .topbar { min-height: 52px; }
  main { padding-top: 23px; }
  .hero { padding: 22px; }
  .hero-mark { display: none; }
  .page-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 390px) {
  .session-actions .mode-label { display: none; }
  .reward-grid { grid-template-columns: 1fr; }
  .stat { gap: 7px; padding: 10px; }
  .stat-icon { width: 30px; height: 30px; }
}
@media print {
  body:has(dialog[open]) .shell, dialog .close-button, dialog .button { display: none; }
  dialog[open] { position: static; width: 100%; max-height: none; border: 0; }
  dialog::backdrop { background: white; }
}
