:root {
  color-scheme: light;
  --canvas: #f6f4ef;
  --paper: #fffefa;
  --paper-warm: #f0ede5;
  --ink: #292b29;
  --ink-soft: #4d514d;
  --muted: #737872;
  --faint: #989b93;
  --line: #deded6;
  --accent: #b9674d;
  --accent-light: #f6eae2;
  --success: #537761;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 3% 3%, rgba(226, 210, 194, .19), transparent 39rem),
    var(--canvas);
  color: var(--ink);
}

button, input { font: inherit; }
button { cursor: pointer; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid #d8d8d0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}
.brand-text { display: grid; gap: 3px; }
.brand-text strong { font-size: 15px; font-weight: 650; letter-spacing: .04em; }
.brand-text small { color: var(--faint); font-size: 9px; font-weight: 650; letter-spacing: .13em; }
.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.topbar-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 44px 0 38px;
}
.eyebrow, .section-index, .guide-topline, .page-footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .075em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}
.eyebrow-line { width: 26px; height: 1px; background: currentColor; }
.hero h1 {
  margin: 17px 0 12px;
  font-size: clamp(42px, 4.8vw, 60px);
  font-weight: 670;
  letter-spacing: -.075em;
  line-height: 1.08;
  text-wrap: balance;
}
.hero h1 span { display: block; color: var(--accent); }
.hero p {
  max-width: 47ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  text-wrap: pretty;
}
.hero-plans {
  flex: 0 0 178px;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .07em;
}
.hero-plans span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #d8d8d0;
}
.hero-plans span::after { content: "↗"; color: var(--accent); font-family: sans-serif; font-size: 15px; font-weight: 400; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, .78fr);
  gap: 18px;
  align-items: stretch;
}
.redeem-panel, .guide-panel { border: 1px solid var(--line); border-radius: 16px; }
.redeem-panel {
  min-width: 0;
  padding: 38px 42px 34px;
  background: var(--paper);
  box-shadow: 0 20px 48px rgba(84, 70, 48, .055);
}
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.section-index { color: var(--accent); font-size: 10px; font-weight: 700; }
.panel-heading h2 {
  margin: 9px 0 0;
  font-size: 28px;
  font-weight: 630;
  letter-spacing: -.045em;
  line-height: 1.2;
}
.panel-annotation { padding-bottom: 3px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.eligibility-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 27px;
  padding: 16px 17px;
  border: 1px solid #e6d2c5;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: #fbf3ed;
}
.eligibility-icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 700 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.eligibility-note strong { display: block; color: #7c3f2e; font-size: 13px; font-weight: 690; line-height: 1.55; }
.eligibility-note p { margin: 4px 0 0; color: #66564e; font-size: 11px; line-height: 1.7; }
form { margin-top: 27px; }
.field-block + .field-block { margin-top: 27px; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.field-heading label { display: inline-flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 620; }
.field-number { color: var(--accent); font: 700 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.field-aside { color: var(--faint); font-size: 11px; white-space: nowrap; }
input {
  display: block;
  width: 100%;
  height: 55px;
  min-width: 0;
  padding: 0 17px;
  outline: none;
  border: 1px solid #d6d6ce;
  border-radius: 9px;
  background: #fcfbf8;
  color: var(--ink);
  font-size: 14px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
input::placeholder { color: #9b9e99; }
input:hover { border-color: #bfc2b9; }
input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(185, 103, 77, .12);
}
.secret-input-row { position: relative; }
.secret-input-row input {
  padding-right: 86px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.visibility-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  min-width: 63px;
  border: 0;
  border-radius: 6px;
  background: #ecebe5;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.visibility-toggle:hover { background: #dfddd4; }
.visibility-toggle:active { transform: translateY(1px); }
.field-help { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.session-tutorial {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid #e2ddd5;
  border-radius: 9px;
  background: #f9f7f2;
}
.session-tutorial summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 620;
  list-style: none;
  cursor: pointer;
}
.session-tutorial summary::-webkit-details-marker { display: none; }
.session-tutorial summary:hover { color: var(--accent); background: #f5f1e9; }
.session-tutorial summary:focus-visible { outline: 3px solid rgba(185, 103, 77, .45); outline-offset: -3px; }
.tutorial-summary-icon {
  display: grid;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid #c9beb2;
  border-radius: 50%;
  color: var(--accent);
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tutorial-chevron { margin-left: auto; color: var(--accent); font-size: 19px; line-height: 1; transition: transform .2s ease; }
.session-tutorial[open] .tutorial-chevron { transform: rotate(180deg); }
.tutorial-content { padding: 0 15px 17px; border-top: 1px solid #e9e4db; }
.tutorial-intro { margin: 14px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tutorial-intro strong { color: var(--ink-soft); font-weight: 630; }
.tutorial-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tutorial-steps li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.tutorial-step-number { flex: 0 0 20px; color: var(--accent); font: 700 10px/1.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tutorial-steps strong { color: var(--ink); font-weight: 630; }
.tutorial-steps a { color: var(--accent); text-decoration-color: rgba(185, 103, 77, .45); text-underline-offset: 2px; }
.tutorial-steps a:hover { text-decoration-color: currentColor; }
.tutorial-steps kbd, .tutorial-steps code {
  padding: 1px 4px;
  border: 1px solid #e0dbd1;
  border-radius: 3px;
  background: #fffefa;
  color: var(--ink);
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cookie-map { margin: 17px 0 0; overflow: hidden; border: 1px solid #dcdedb; border-radius: 6px; background: #fff; color: #444b4b; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cookie-map-tabs { display: flex; gap: 20px; padding: 10px 12px 0; border-bottom: 1px solid #e3e6e4; white-space: nowrap; }
.cookie-map-tabs span { padding-bottom: 8px; }
.cookie-map-tabs .is-active { border-bottom: 2px solid var(--accent); color: var(--ink); font-weight: 700; }
.cookie-map-body { display: grid; grid-template-columns: 39% minmax(0, 1fr); min-height: 96px; }
.cookie-map-tree { display: grid; align-content: start; gap: 6px; padding: 12px 7px; border-right: 1px solid #e3e6e4; white-space: nowrap; }
.cookie-map-tree strong { overflow: hidden; color: var(--accent); font-weight: 650; text-overflow: ellipsis; }
.cookie-map-table { min-width: 0; padding: 7px 8px; }
.cookie-map-head, .cookie-map-row { display: grid; grid-template-columns: minmax(68px, 39%) minmax(0, 1fr); gap: 6px; align-items: center; padding: 6px 4px; }
.cookie-map-head { border-bottom: 1px solid #e3e6e4; color: #818786; }
.cookie-map-row { border: 1px solid #e2c5b9; border-radius: 3px; background: #fff5ef; }
.cookie-map-row strong { color: var(--accent); font-weight: 700; }
.cookie-map-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tutorial-warning { margin: 14px 0 0; padding: 11px 12px; border-left: 2px solid var(--accent); background: #f4eee5; color: #625a50; font-size: 11px; line-height: 1.7; }
.notice { min-height: 19px; margin-top: 16px; color: var(--accent); font-size: 12px; line-height: 1.5; }
.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 57px;
  margin-top: 20px;
  padding: 7px 8px 7px 20px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 630;
  text-align: left;
  transition: background .2s ease, transform .18s ease, box-shadow .2s ease;
}
.submit-button:hover:not(:disabled) { background: #414741; box-shadow: 0 9px 22px rgba(52, 55, 49, .13); }
.submit-button:active:not(:disabled) { transform: translateY(1px); }
.submit-button:disabled { opacity: .55; cursor: not-allowed; }
.button-arrow {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 6px;
  background: #f9f7f1;
  color: var(--accent);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}
.result-section { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.result-heading { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; font-weight: 650; }
.result-caption { color: var(--faint); font-size: 11px; font-weight: 450; }
.result {
  min-height: 61px;
  margin: 12px 0 0;
  padding: 17px 18px;
  overflow: auto;
  border: 1px solid #e6e5df;
  border-radius: 8px;
  background: #f8f7f3;
  color: var(--ink-soft);
  font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guide-panel { display: flex; flex-direction: column; min-width: 0; padding: 37px 35px 31px; background: var(--paper-warm); }
.guide-topline { display: flex; justify-content: space-between; gap: 10px; color: var(--accent); font-size: 10px; font-weight: 700; }
.guide-topline span:last-child { color: var(--faint); }
.guide-panel h2 {
  margin: 47px 0 16px;
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 610;
  letter-spacing: -.07em;
  line-height: 1.16;
  text-wrap: balance;
}
.guide-lead { max-width: 34ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; text-wrap: pretty; }
.plan-list { margin-top: 37px; border-top: 1px solid #d7d3ca; }
.plan-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0; border-bottom: 1px solid #d7d3ca; }
.plan-name { font-size: 13px; font-weight: 610; }
.plan-code { display: inline-flex; align-items: center; gap: 16px; color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.plan-code b { color: var(--accent); font: 16px sans-serif; }
.guide-footnote { display: flex; align-items: flex-start; gap: 13px; margin-top: auto; padding-top: 38px; }
.footnote-symbol { color: var(--accent); font-size: 20px; line-height: 1; }
.guide-footnote p { max-width: 37ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; margin: 32px 0 28px; color: var(--faint); font-size: 9px; font-weight: 600; }

button:focus-visible { outline: 3px solid rgba(185, 103, 77, .45); outline-offset: 3px; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .guide-panel { gap: 0; }
  .guide-panel h2 { margin-top: 28px; }
  .guide-footnote { margin-top: 0; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 32px, 500px); }
  .topbar { min-height: 74px; }
  .brand-mark { width: 38px; height: 38px; }
  .topbar-status { font-size: 10px; }
  .topbar-status i { width: 7px; height: 7px; }
  .hero { display: block; padding: 46px 0 32px; }
  .hero h1 { margin-top: 18px; font-size: clamp(40px, 10vw, 54px); }
  .hero p { font-size: 13px; }
  .hero-plans { display: flex; gap: 18px; margin: 25px 0 0; font-size: 10px; }
  .hero-plans span { flex: 1; white-space: nowrap; }
  .hero-plans span::after { display: none; }
  .redeem-panel { padding: 28px 22px 25px; }
  .guide-panel { padding: 29px 23px; }
  .panel-heading h2 { font-size: 25px; }
  .panel-annotation { display: none; }
  .field-aside { font-size: 10px; }
  .cookie-map-body { grid-template-columns: 1fr; }
  .cookie-map-tree { border-right: 0; border-bottom: 1px solid #e3e6e4; }
  .page-footer { margin-top: 25px; font-size: 8px; }
}

@media (max-width: 380px) {
  .hero-plans { gap: 9px; }
  .field-heading { align-items: flex-start; }
  .field-aside { max-width: 80px; text-align: right; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
