:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #263b38;
  background: #eeefeb;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  --paper: #f6f5f1;
  --ink: #244d46;
  --muted: #747f7a;
  --line: #e6e8e1;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #97b4aa; outline-offset: 4px; }
button, input, textarea { border-radius: 0; }
button { color: inherit; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app { position: relative; max-width: 500px; height: 100vh; height: var(--viewport-height, 100dvh); margin: 0 auto; display: flex; flex-direction: column; background: var(--paper); overflow: hidden; }
.environment { flex: none; padding: max(5px, env(safe-area-inset-top)) 12px 5px; text-align: center; font-size: 11px; letter-spacing: .08em; color: #746a4c; background: #f0ecde; }
.header { flex: none; display: flex; align-items: center; min-height: calc(68px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; border-bottom: 1px solid var(--line); }
.environment:not([hidden]) + .header { padding-top: 0; min-height: 68px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 44px; padding: 9px; border: 0; background: transparent; border-radius: 14px; }
.icon-button:hover { background: #eaece5; }
.icon-button svg { width: 23px; height: 23px; }
.heading { min-width: 0; flex: 1; text-align: center; }
.heading h1 { margin: 0; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.header-spacer { width: 42px; }
.view { min-height: 0; flex: 1; }
.home { display: flex; align-items: center; justify-content: center; padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); }
.entry-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; width: 178px; height: 178px; border: 1px solid #d7ded4; border-radius: 30px; background: #fffefa; color: var(--ink); box-shadow: 0 12px 30px #284e3c05; transition: transform .15s ease, border-color .15s ease; }
.entry-button:hover { border-color: #9bb2a4; transform: translateY(-2px); }
.entry-button:active { transform: scale(.98); }
.entry-button svg { width: 43px; height: 43px; stroke-width: 1.5; }
.entry-button span { font-size: 24px; font-weight: 500; letter-spacing: .12em; padding-left: .12em; }
.menu, .code { padding: 34px 24px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.section-intro { margin: 5px 0 24px; color: var(--muted); font-size: 14px; }
.choice { display: flex; align-items: center; width: 100%; padding: 23px 18px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 20px; background: #fffefa; text-align: left; }
.choice:hover { border-color: #a8bdb0; }
.choice-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: 15px; background: #edf1e9; color: #426556; border-radius: 14px; }
.choice-icon svg { width: 25px; height: 25px; }
.choice-copy { flex: 1; min-width: 0; }
.choice-copy strong { display: block; margin-bottom: 7px; font-size: 17px; font-weight: 600; }
.choice-copy > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.chevron { flex: none; margin-left: 8px; font-size: 23px; color: #9aa69e; }
.inline-status { margin: 12px 0; min-height: 19px; font-size: 13px; color: #95614c; line-height: 1.6; overflow-wrap: anywhere; }
.text-button { min-height: 44px; padding: 10px 6px; border: 0; background: transparent; color: var(--ink); font-size: 13px; text-decoration: underline; text-decoration-color: #c4cec5; text-underline-offset: 4px; }
.code-intro { margin: 12px 0 34px; }
.code-intro h2 { margin: 0 0 15px; font-size: 25px; font-weight: 500; }
.code-intro p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.9; }
.code-form label { display: block; font-size: 12px; margin-bottom: 10px; }
.code-form input { width: 100%; min-height: 64px; padding: 14px; background: #fffefa; border: 1px solid #d7ded4; border-radius: 14px; color: var(--ink); font-size: clamp(20px, 6vw, 28px); font-variant-numeric: tabular-nums; letter-spacing: .06em; text-align: center; }
.code-form input::placeholder { color: #9da69f; font-size: 17px; letter-spacing: .08em; }
.primary-button { width: 100%; min-height: 52px; padding: 14px 20px; border: 0; border-radius: 14px; background: var(--ink); color: #fffefa; font-size: 15px; }
.code-help { display: block; margin: 22px auto 0; }
.waiting { border: 1px solid var(--line); border-radius: 15px; padding: 18px; margin-top: 22px; background: #fffefa; }
.waiting h3 { font-size: 15px; font-weight: 500; margin: 20px 0 10px; }
.waiting p { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 0; }
.order-details p { margin: 4px 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.order-details .order-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.chat { display: flex; flex-direction: column; position: relative; }
.chat-order { flex: none; padding: 11px 22px; background: #eeefe7; color: #627266; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.chat-order p { margin: 0; }
.chat-status { flex: none; min-height: 30px; padding: 9px 16px 3px; color: #89918a; font-size: 11px; text-align: center; }
.chat-status.error { color: #95614c; }
.messages { flex: 1; min-height: 0; padding: 16px 18px 24px; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: auto; }
.empty-chat { padding: 13vh 5px 30px; text-align: center; color: #929c93; }
.empty-chat p { font-size: 12px; line-height: 1.8; }
.empty-dot { display: block; width: 7px; height: 7px; margin: 0 auto 18px; background: #c8d2c4; border-radius: 50%; }
.message-row { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 19px; }
.message-row.mine { align-items: flex-end; }
.message-meta { margin: 0 2px 6px; font-size: 10px; color: #899389; line-height: 1.6; }
.message-bubble { max-width: 87%; padding: 11px 14px; border: 1px solid #e5e8df; border-radius: 3px 17px 17px 17px; background: #fffefa; color: #35473e; font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.mine .message-bubble { background: #e2ebdc; border-color: #dce5d5; border-radius: 17px 3px 17px 17px; color: #29473c; }
.message-time { margin-top: 5px; color: #91998f; font-size: 10px; font-variant-numeric: tabular-nums; }
.new-messages { position: absolute; right: 19px; bottom: calc(105px + env(safe-area-inset-bottom)); padding: 9px 15px; border-radius: 20px; border: 1px solid #d0dbcd; background: #fffefa; font-size: 12px; box-shadow: 0 2px 12px #304d2f0a; }
.composer { flex: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 13px 16px calc(13px + env(safe-area-inset-bottom)); background: #fffefa; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; width: 0; min-width: 0; max-height: 132px; min-height: 45px; padding: 10px 12px; resize: none; border: 1px solid #e1e5db; border-radius: 14px; background: #f8f8f3; font-size: 16px; color: #29473c; line-height: 23px; }
.composer textarea::placeholder { color: #a0a89d; }
.send-button { min-height: 45px; padding: 10px 17px; border: 0; border-radius: 13px; color: #fffefa; background: var(--ink); font-size: 14px; }
.send-status { width: 100%; margin: 0; padding: 0 2px; color: #95614c; font-size: 11px; line-height: 1.6; }
.send-status:empty { display: none; }
.chat-recovery { flex: none; padding: 10px 18px; background: #f1ecdf; text-align: center; }
.chat-recovery p { margin: 0; color: #776649; font-size: 12px; line-height: 1.7; }
.chat-recovery .text-button { margin: 0 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.noscript { position: absolute; left: 20px; right: 20px; bottom: 20px; font-size: 14px; text-align: center; }
@media (min-width: 600px) { .app { border-left: 1px solid #e0e4d9; border-right: 1px solid #e0e4d9; } }
@media (max-width: 350px) { .menu, .code { padding-left: 18px; padding-right: 18px; } .choice { padding: 20px 12px; } .choice-icon { margin-right: 11px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
