:root {
  color-scheme: dark;
  --background: #18140f;
  --surface: #242019;
  --surface-raised: #2d2820;
  --primary: #ffcf40;
  --text: #fffaf0;
  --muted: #aaa296;
  --border: rgba(255, 255, 255, 0.11);
  --danger: #ff9d90;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); }
body { min-height: 100vh; margin: 0; background: var(--background); color: var(--text); }
button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }

.app-shell { position: relative; min-height: 100vh; overflow: hidden; }
.ambient { position: absolute; width: 280px; height: 280px; border-radius: 50%; filter: blur(8px); pointer-events: none; }
.ambient-top { top: -150px; right: -100px; background: #ffbd00; opacity: .18; }
.ambient-side { top: 520px; left: -220px; background: #ff7a00; opacity: .1; }
.page-main { position: relative; z-index: 1; width: min(100%, 460px); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 24px) 16px calc(env(safe-area-inset-bottom) + 30px); }

.brand-bar { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 750; letter-spacing: .3px; }
.brand-logo { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--primary); color: #18140f; box-shadow: 0 8px 24px rgba(255, 207, 64, .18); }
.brand-logo svg { width: 23px; height: 23px; fill: currentColor; stroke-width: 0; }
.brand-logo .brand-cut { fill: none; stroke: var(--primary); stroke-width: 1.7; }

.hero-sec { padding: 48px 0 30px; }
.eyebrow { margin: 0; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
h1 { margin: 13px 0 0; font-size: clamp(40px, 12vw, 54px); line-height: 1.08; letter-spacing: -2px; }
.hero-desc { max-width: 370px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.query-card, .result-card, .steps-card { border: 1px solid var(--border); border-radius: 20px; background: rgba(36, 32, 25, .95); box-shadow: 0 20px 50px rgba(0, 0, 0, .22); }
.query-card { padding: 18px; }
.card-head { display: flex; min-height: 40px; align-items: center; justify-content: space-between; }
.card-head label { font-size: 14px; font-weight: 750; }
.paste-btn { display: flex; min-width: 70px; min-height: 44px; margin: 0; padding: 0 12px; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; background: rgba(255, 207, 64, .1); color: var(--primary); font-size: 13px; cursor: pointer; }
.paste-btn svg { width: 18px; height: 18px; }
.paste-btn:active { opacity: .68; }
textarea { display: block; width: 100%; min-height: 128px; margin-top: 12px; padding: 14px; resize: vertical; border: 2px solid #4d473d; border-radius: 14px; outline: none; background: #1b1813; color: var(--text); font-size: 15px; line-height: 1.55; transition: border-color 180ms ease, box-shadow 180ms ease; }
textarea::placeholder { color: #777066; }
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 207, 64, .12); }
.error-msg { display: flex; margin: 12px 0 0; align-items: flex-start; gap: 7px; color: var(--danger); font-size: 13px; line-height: 1.5; }
.error-msg svg { width: 18px; height: 18px; flex: 0 0 auto; }
.primary-btn { display: flex; width: 100%; min-height: 54px; margin-top: 16px; padding: 0 20px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 14px; background: var(--primary); color: #18140f; font-size: 15px; font-weight: 800; cursor: pointer; transition: opacity 180ms ease; }
.primary-btn svg { width: 21px; height: 21px; stroke-width: 2.2; }
.primary-btn:active { opacity: .76; }
.primary-btn:disabled, .paste-btn:disabled { cursor: not-allowed; opacity: .55; }
.loading-spinner { display: none; width: 19px; height: 19px; border: 2px solid rgba(24, 20, 15, .25); border-top-color: #18140f; border-radius: 50%; animation: spin 700ms linear infinite; }
.is-loading .search-icon { display: none; }
.is-loading .loading-spinner { display: block; }

.result-card { margin-top: 16px; padding: 18px; }
.result-head { display: flex; align-items: center; gap: 12px; }
.success-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--primary); color: #18140f; }
.success-icon svg { width: 21px; height: 21px; stroke-width: 2.4; }
.result-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.result-copy span { color: var(--primary); font-size: 12px; font-weight: 750; }
.result-copy strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-box { display: flex; min-height: 90px; margin-top: 16px; padding: 12px 14px; align-items: center; border: 1px dashed rgba(255, 207, 64, .4); border-radius: 14px; background: rgba(255, 207, 64, .07); }
.ticket-value { display: flex; min-width: 105px; align-items: baseline; color: var(--primary); }
.ticket-value small { font-size: 20px; font-weight: 800; }
.ticket-value strong { font-size: 42px; line-height: 1; letter-spacing: -2px; }
.ticket-meta { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 6px; padding-left: 16px; border-left: 1px solid rgba(255, 207, 64, .22); }
.ticket-meta strong { font-size: 14px; }
.ticket-meta > span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.empty-card { padding: 25px 22px; text-align: center; }
.empty-icon { display: grid; width: 54px; height: 54px; margin: 0 auto; place-items: center; border-radius: 50%; background: var(--surface-raised); color: #8e877d; }
.empty-icon svg { width: 30px; height: 30px; }
.empty-card h2 { margin: 14px 0 0; font-size: 17px; }
.empty-card p { max-width: 310px; margin: 8px auto 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.steps-card { margin-top: 18px; padding: 20px; }
.steps-card h2 { margin: 0; font-size: 16px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.guide-item { min-width: 0; margin: 0; }
.phone-frame { position: relative; overflow: hidden; padding: 5px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 22px; background: #11100d; box-shadow: 0 12px 22px rgba(0, 0, 0, .3); }
.phone-frame::before { position: absolute; z-index: 1; top: 9px; left: 50%; width: 28%; height: 7px; border-radius: 9px; background: #11100d; content: ""; transform: translateX(-50%); }
.phone-frame img { display: block; width: 100%; aspect-ratio: 0.466; object-fit: cover; object-position: top; border-radius: 17px; }
.guide-item figcaption { display: flex; margin-top: 10px; align-items: flex-start; gap: 7px; }
.guide-item figcaption span { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.guide-item figcaption p { margin: 0; color: #d4cec4; font-size: 12px; line-height: 1.45; }
.shortcut-card { margin-top: 18px; padding: 20px; border: 1px solid rgba(255, 207, 64, .22); border-radius: 20px; background: linear-gradient(145deg, rgba(255, 207, 64, .11), rgba(36, 32, 25, .96) 55%); box-shadow: 0 20px 50px rgba(0, 0, 0, .18); }
.shortcut-copy { display: flex; align-items: flex-start; gap: 12px; }
.shortcut-badge { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--primary); color: #18140f; font-size: 22px; font-weight: 900; }
.shortcut-card h2 { margin: 1px 0 0; font-size: 16px; }
.shortcut-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.shortcut-btn { text-decoration: none; }
.shortcut-note { padding-left: 50px; font-size: 11px !important; color: #81796e !important; }
footer { padding: 20px 10px 0; color: #787168; text-align: center; font-size: 11px; line-height: 1.5; }
[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) {
  .paste-btn:hover { background: rgba(255, 207, 64, .16); }
  .primary-btn:hover { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (min-width: 700px) {
  .page-main { padding-right: 24px; padding-left: 24px; }
}
