:root {
  color-scheme: light;
  --ink: #172521;
  --muted: #6f7e78;
  --surface: #ffffff;
  --canvas: #f3f5f2;
  --line: #dfe6e2;
  --mint: #27f5b0;
  --mint-dark: #103f34;
  --orange: #f26b1d;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
.app-shell { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px max(36px, env(safe-area-inset-bottom)); }
.brand-block { margin: 16vh 4px 32px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 13px; letter-spacing: .14em; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 34px; letter-spacing: .08em; }
.login-card { display: grid; gap: 10px; padding: 24px; border: 1px solid #e7ece8; border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 30px rgb(28 53 45 / 6%); }
.login-card label, .transfer-dialog label { margin-top: 7px; color: #44534e; font-size: 14px; font-weight: 650; }
input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fbfcfb; color: var(--ink); text-align: center; font-size: 17px; }
input:focus { border-color: #18b982; box-shadow: 0 0 0 3px rgb(39 245 176 / 18%); }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 116px; align-items: end; gap: 10px; }
.code-row > div { display: grid; gap: 10px; }
.primary-button, .secondary-button { min-height: 48px; border: 0; border-radius: 10px; font-weight: 700; }
.primary-button { margin-top: 12px; background: var(--mint-dark); color: #fff; }
.secondary-button { border: 1px solid #bfcbc5; background: #fff; color: #365149; font-size: 14px; }
.portal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding: 0 4px; }
.portal-header h1 { font-size: 29px; }
.text-button { padding: 9px 17px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #51625c; }
.identity-card { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: stretch; margin-bottom: 34px; padding: 22px 10px; border-radius: var(--radius); background: var(--mint); color: #12332b; box-shadow: 0 12px 28px rgb(39 245 176 / 20%); }
.identity-card > div:not(.identity-divider) { text-align: center; }
.identity-card span { display: block; margin-bottom: 9px; color: rgb(18 51 43 / 65%); font-size: 13px; }
.identity-card strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.identity-divider { background: rgb(18 51 43 / 17%); }
.section-heading { margin: 0 4px 15px; }
.section-heading h2 { margin-bottom: 0; font-size: 22px; }
.state-card { padding: 62px 18px; border-radius: var(--radius); background: #fff; color: #87928e; text-align: center; }
.holding-card { padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: 0 5px 18px rgb(34 55 51 / 5%); }
.product-name { margin: 0 0 14px; font-size: clamp(12px, 4vw, 17px); line-height: 1.45; letter-spacing: -0.02em; white-space: nowrap; }
.holding-main { display: grid; grid-template-columns: 100px minmax(0, 1fr) 82px; align-items: center; gap: 15px; }
.product-thumb { width: 100px; height: 100px; border-radius: 10px; background: #e8eeea; object-fit: cover; }
.holding-copy { min-width: 0; }
.total { display: flex; align-items: baseline; gap: 4px; margin-bottom: 10px; color: var(--mint-dark); }
.total strong { font-size: 31px; line-height: 1; }
.total span { font-size: 13px; }
.holding-stats { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.holding-stats b { color: #45564f; font-weight: 700; }
.holding-actions { display: grid; gap: 9px; }
.holding-actions button { min-height: 42px; padding: 0 6px; border: 0; border-radius: 9px; font-size: 13px; font-weight: 700; }
.transfer-button { background: var(--orange); color: #fff; }
.transfer-button:disabled { background: #d4dad7; color: #89938f; }
.pickup-button { background: #edf0ee; color: #6e7a76; }
.product-detail { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e8edea; }
.product-detail h4 { margin-bottom: 12px; font-size: 18px; }
.product-description { margin-bottom: 14px; color: #53635d; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.75; }
.detail-images { display: grid; gap: 12px; }
.detail-images img { display: block; width: 100%; border-radius: 10px; background: #edf2ef; }
.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgb(13 28 23 / 52%); }
.transfer-dialog { width: min(100%, 720px); padding: 25px 22px max(28px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #fff; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-header h2 { margin-bottom: 5px; font-size: 23px; }
.dialog-header p { max-width: 280px; margin-bottom: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.close-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f0f3f1; color: #52625c; font-size: 27px; line-height: 1; }
.balance-line { display: flex; justify-content: space-between; margin: 20px 0 15px; padding: 14px 16px; border-radius: 10px; background: #edf7f2; color: #295148; }
.transfer-dialog form { display: grid; gap: 9px; }
.rule-note { margin: 6px 0 0; color: #7b8782; font-size: 13px; line-height: 1.6; }
.rule-note.accent { color: #a85725; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(32px, env(safe-area-inset-bottom)); max-width: calc(100% - 40px); transform: translateX(-50%); padding: 12px 17px; border-radius: 9px; background: rgb(20 31 27 / 92%); color: #fff; text-align: center; font-size: 14px; }

@media (max-width: 430px) {
  .app-shell { padding-right: 15px; padding-left: 15px; }
  .holding-card { padding: 15px; }
  .holding-main { grid-template-columns: 82px minmax(0, 1fr) 70px; gap: 11px; }
  .product-thumb { width: 82px; height: 82px; }
  .total strong { font-size: 27px; }
  .holding-actions button { min-height: 38px; font-size: 12px; }
}
