@charset "UTF-8";

:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #213443;
  background: #f7f6f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #142b3d;
  --muted: #6d7880;
  --line: #e4e6e3;
  --accent: #116f68;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #69aaa4; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 10; padding: 12px 18px; background: #fff; color: var(--ink); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { background: var(--ink); color: #fff; padding: 31px 24px 76px; }
.header-inner { max-width: 720px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 720; letter-spacing: .045em; }
.brand-chinese { font-size: 16px; font-weight: 500; letter-spacing: .04em; }
.brand-divider { padding: 0 4px; color: #6d898e; font-weight: 400; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; width: 25px; height: 25px; }
.brand-mark i { display: block; width: 5px; border-radius: 2px; background: #89c4b7; height: 14px; }
.brand-mark i:nth-child(2) { height: 24px; }
.brand-mark i:nth-child(3) { height: 19px; }
.header-caption { margin-top: 34px; color: #adc4c7; font-size: 12px; letter-spacing: .08em; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: .02em; line-height: 1.45; margin-top: 7px; }
.header-description { margin-top: 10px; color: #bcccd4; font-size: 14px; line-height: 1.8; max-width: 580px; }
.workspace { max-width: 768px; padding: 0 24px; margin: -36px auto 0; position: relative; }
.redeem-panel { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px #142b3d07; }
.section-heading, .records-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.heading-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.step-number { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; border: 1px solid #dce4df; border-radius: 7px; color: #7b8786; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
h2 { font-size: 17px; font-weight: 650; line-height: 1.5; }
.connection { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; flex-shrink: 0; }
.connection::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #b0b8bb; }
.connection[data-state="ready"]::before { background: #418e75; }
.connection[data-state="error"] { color: #a25543; }
.connection[data-state="error"]::before { background: #b96b56; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin: 26px 0 9px; }
.code-field { display: flex; align-items: stretch; border: 1px solid #cfd8d6; border-radius: 10px; background: #fbfcfa; transition: border-color .15s, box-shadow .15s; }
.code-field:focus-within { border-color: #4d968e; box-shadow: 0 0 0 3px #2b8b7d0d; }
.code-field input { display: block; min-width: 0; width: 100%; height: 52px; padding: 0 14px; background: transparent; border: 0; border-radius: 10px; color: var(--ink); font-size: 15px; letter-spacing: .025em; outline: none; }
.code-field input:disabled { color: #82908e; }
.code-field input::placeholder { color: #647469; font-size: 14px; letter-spacing: 0; }
.visibility-button { flex-shrink: 0; margin: 4px; padding: 0 11px; background: transparent; border: 0; border-radius: 6px; font-size: 12px; color: #586c70; min-width: 48px; }
.visibility-button:hover { background: #edf2ed; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 10px; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 9px; font-size: 14px; font-weight: 600; line-height: 1.5; transition: background .15s, border-color .15s; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover:not(:disabled) { background: #0c5c57; }
.button-primary:disabled { background: #c9d8d2; color: #f6faf7; }
.button-secondary { background: #fff; border-color: #d9deda; color: #355552; }
.button-secondary:hover:not(:disabled) { background: #f1f5f1; }
.form-note { font-size: 12px; color: #647469; }
.feedback { font-size: 13px; line-height: 1.8; padding: 11px 13px; border-radius: 8px; margin-top: 16px; overflow-wrap: anywhere; }
.feedback-error { background: #faf0eb; color: #994d37; border: 1px solid #f0d9ce; }
.feedback-success { background: #edf5ef; color: #376c59; border: 1px solid #d9e9df; }
.connection-recovery .button { margin-top: 12px; font-size: 12px; }
.records-section { margin-top: 32px; }
.records-heading { padding: 0 1px; }
.record-count { color: #647469; font-size: 12px; font-variant-numeric: tabular-nums; }
.text-button { display: inline-flex; align-items: center; gap: 4px; padding: 10px 0 10px 10px; min-height: 44px; color: #55746f; border: 0; background: transparent; font-size: 12px; flex-shrink: 0; }
.text-button:hover:not(:disabled) { color: #0c645c; }
.text-button:disabled { color: #a5afaa; }
.text-button > span { font-size: 18px; line-height: 1; }
.voucher-list { display: grid; gap: 14px; margin-top: 14px; }
.empty-state { padding: 30px 22px 32px; text-align: center; border: 1px dashed #d9deda; border-radius: 14px; color: #647469; }
.empty-symbol { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 30px; border: 1px solid #cfd8d2; border-radius: 8px; color: #9aa9a0; font-size: 20px; margin-bottom: 14px; }
.empty-state h3 { font-size: 14px; font-weight: 500; color: #5c7166; }
.empty-state p { margin-top: 8px; font-size: 12px; line-height: 1.8; }
.voucher-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; outline-offset: 4px; }
.voucher-card:focus { outline: 2px solid #72a99e; }
.voucher-overview { padding: 22px 24px 19px; }
.voucher-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.voucher-title { font-size: 18px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.voucher-country { color: #65766d; font-size: 13px; margin-top: 5px; overflow-wrap: anywhere; }
.state-badge { padding: 4px 8px; border-radius: 5px; background: #edf4f0; color: #36614c; font-size: 11px; white-space: nowrap; margin-top: 2px; }
.state-badge-disabled { background: #f1efeb; color: #8a7b6b; }
.test-badge { display: inline-block; padding: 4px 8px; color: #8c6727; background: #fcf4df; border: 1px solid #efe1be; border-radius: 5px; font-size: 11px; margin-top: 13px; }
.voucher-time { margin-top: 14px; font-size: 11px; color: #647469; line-height: 1.6; }
.delivery-space { padding: 18px 24px 21px; border-top: 1px solid #eef0eb; background: #fafbf8; }
.delivery-state { color: #56685e; font-size: 12px; line-height: 1.7; }
.delivery-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 15px; }
.delivery-fields dt { color: #647469; font-size: 11px; }
.delivery-fields dd { margin: 6px 0 0; color: #5f7167; font-size: 13px; line-height: 1.6; }
.browser-notice { display: flex; align-items: flex-start; gap: 11px; margin: 30px 2px 0; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.notice-symbol { display: inline-flex; justify-content: center; align-items: center; width: 17px; height: 17px; border: 1px solid #a7b3aa; border-radius: 50%; color: #85988a; font-size: 11px; font-family: Georgia, serif; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.browser-notice h2 { font-size: 12px; color: #647469; font-weight: 500; }
.browser-notice p { font-size: 12px; line-height: 1.9; color: #647469; margin-top: 5px; }
.site-footer { color: #647469; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px 0 30px; font-size: 10px; letter-spacing: .09em; }
.site-footer span { color: #c6ccc1; }

@media (max-width: 540px) {
  .site-header { padding: 25px 20px 65px; }
  .brand { font-size: 19px; gap: 10px; }
  .brand-chinese { font-size: 14px; }
  .header-caption { margin-top: 29px; font-size: 11px; }
  h1 { font-size: 25px; }
  .header-description { font-size: 12px; line-height: 1.9; }
  .workspace { padding: 0 16px; margin-top: -30px; }
  .redeem-panel { padding: 22px 18px; border-radius: 14px; }
  h2 { font-size: 15px; }
  .heading-group { gap: 8px; }
  .connection { font-size: 10px; }
  .step-number { width: 23px; height: 23px; font-size: 10px; border-radius: 6px; }
  .field-label { margin-top: 23px; }
  .code-field input { padding-left: 12px; font-size: 16px; }
  .field-hint { font-size: 11px; }
  .form-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 20px; }
  .button-primary { justify-content: space-between; width: 100%; }
  .form-note { text-align: center; font-size: 11px; }
  .records-section { margin-top: 26px; }
  .record-count { font-size: 11px; }
  .text-button { font-size: 11px; }
  .voucher-overview { padding: 19px 18px 17px; }
  .voucher-title { font-size: 17px; }
  .delivery-space { padding: 16px 18px 18px; }
  .delivery-fields { gap: 10px; }
  .browser-notice { margin-top: 26px; }
  .browser-notice p { font-size: 11px; }
}

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