:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #111827;
  --text-2: #475569;
  --text-3: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --navy: #0f1f3d;
  --brand: #3157d5;
  --brand-dark: #2344b8;
  --brand-soft: #edf2ff;
  --green: #0f9f74;
  --green-soft: #e9f8f2;
  --orange: #e98a15;
  --orange-soft: #fff7e8;
  --red: #dc4d4d;
  --red-soft: #fff1f1;
  --accent: #10a37f;
  --accent-deep: #08765c;
  --accent-soft: #eaf8f4;
  --accent-rgb: 16, 163, 127;
  --shadow-sm: 0 8px 24px rgba(15, 31, 61, .055);
  --shadow-md: 0 18px 50px rgba(15, 31, 61, .09);
  --radius: 20px;
  --radius-sm: 14px;
  font-family: Inter, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body[data-platform="claude"] {
  --accent: #c46f51;
  --accent-deep: #9d4f36;
  --accent-soft: #fff2ed;
  --accent-rgb: 196, 111, 81;
}

body[data-platform="grok"] {
  --accent: #202838;
  --accent-deep: #0b1220;
  --accent-soft: #edf0f5;
  --accent-rgb: 32, 40, 56;
}

body[data-platform="perplexity"] {
  --accent: #208996;
  --accent-deep: #146773;
  --accent-soft: #e9f7f8;
  --accent-rgb: 32, 137, 150;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(49, 87, 213, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 87, 213, .025) 1px, transparent 1px),
    radial-gradient(circle at 15% -10%, rgba(73, 112, 235, .11), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(31, 174, 156, .07), transparent 26%);
  background-size: 36px 36px, 36px 36px, auto, auto;
  mask-image: linear-gradient(to bottom, black 0, rgba(0,0,0,.72) 40%, transparent 88%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
}
.header-inner { height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #3157d5, #163a9f);
  box-shadow: 0 8px 18px rgba(49, 87, 213, .24);
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  transform: rotate(28deg);
}
.brand-mark::after { transform: rotate(-28deg); }
.brand-mark i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #68e0ca; right: 8px; top: 8px; }
.brand-mark b { position: relative; font-size: 15px; letter-spacing: -.03em; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { letter-spacing: .11em; font-size: 15px; }
.brand-copy small { margin-top: 5px; color: var(--text-2); font-size: 11px; letter-spacing: .04em; }
.header-nav { display: flex; align-items: center; gap: 26px; margin-right: auto; }
.header-nav a { position: relative; color: var(--text-2); font-size: 14px; font-weight: 650; }
.header-nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -24px; height: 2px; background: var(--brand); transition: .2s ease; }
.header-nav a:hover { color: var(--text); }
.header-nav a:hover::after { left: 0; right: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.refresh-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: .2s ease;
}
.refresh-button svg { width: 18px; }
.refresh-button:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.refresh-button.loading svg { animation: rotate 1s linear infinite; }
.buy-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px;
  border-radius: 12px;
  color: #fff;
  background: var(--navy);
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(15, 31, 61, .17);
  transition: .2s ease;
}
.buy-button svg { width: 16px; }
.buy-button:hover { transform: translateY(-1px); background: #172b50; }

.hero {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 54px;
  padding-bottom: 42px;
}
.hero-copy { max-width: 720px; }
.hero-label { display: inline-flex; align-items: center; gap: 9px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.hero-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px rgba(49,87,213,.1); }
.hero h1 { margin: 18px 0 12px; color: var(--navy); font-size: clamp(34px, 4vw, 52px); line-height: 1.15; letter-spacing: -.045em; }
.hero p { margin: 0; color: var(--text-2); font-size: 17px; }
.hero-status {
  min-width: 360px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(203,213,225,.8);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.hero-status div { position: relative; padding: 21px 18px; text-align: center; }
.hero-status div + div::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px; background: var(--line); }
.hero-status strong { display: block; color: var(--navy); font-size: 21px; letter-spacing: -.03em; }
.hero-status span { color: var(--text-3); font-size: 12px; }

.product-section { margin-bottom: 22px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading > div { display: flex; align-items: center; gap: 13px; }
.section-index { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 850; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 20px; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; color: var(--text-3); font-size: 13px; }
.selection-hint { color: var(--text-3); font-size: 12px; }
.platform-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.platform-tab {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 20px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 5px 18px rgba(15,31,61,.035);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.platform-tab::before { content: ""; position: absolute; inset: auto 0 0; height: 3px; transform: scaleX(0); background: var(--platform-color, var(--brand)); transition: transform .22s ease; }
.platform-tab:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: 0 13px 28px rgba(15,31,61,.08); }
.platform-tab.active { border-color: var(--platform-color, var(--brand)); background: linear-gradient(145deg, #fff 55%, var(--platform-soft, var(--brand-soft))); box-shadow: 0 16px 36px rgba(var(--platform-rgb, 49,87,213), .13); }
.platform-tab.active::before { transform: scaleX(1); }
.platform-tab[data-platform="chatgpt"] { --platform-color:#10a37f; --platform-soft:#eaf8f4; --platform-rgb:16,163,127; }
.platform-tab[data-platform="claude"] { --platform-color:#c46f51; --platform-soft:#fff2ed; --platform-rgb:196,111,81; }
.platform-tab[data-platform="grok"] { --platform-color:#202838; --platform-soft:#edf0f5; --platform-rgb:32,40,56; }
.platform-tab[data-platform="perplexity"] { --platform-color:#208996; --platform-soft:#e9f7f8; --platform-rgb:32,137,150; }
.platform-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #fff; font-size: 13px; font-weight: 850; letter-spacing: -.02em; }
.chatgpt-symbol { background: linear-gradient(145deg, #17b990, #087b60); }
.claude-symbol { background: linear-gradient(145deg, #d98b6f, #a85339); font-family: Georgia, serif; font-size: 20px; }
.grok-symbol { background: linear-gradient(145deg, #313b4e, #0d1421); font-size: 19px; }
.perplexity-symbol { background: linear-gradient(145deg, #35a9b7, #126975); font-size: 18px; }
.platform-meta { min-width: 0; display: flex; flex-direction: column; }
.platform-meta strong { color: var(--navy); font-size: 16px; }
.platform-meta small { margin-top: 2px; color: var(--text-3); font-size: 12px; }
.platform-stock { min-width: 42px; text-align: right; }
.platform-stock b { display: block; color: var(--navy); font-size: 18px; line-height: 1; }
.platform-stock small { color: var(--text-3); font-size: 10px; }
.active-marker { position: absolute; top: 8px; right: 10px; display: none; padding: 3px 7px; border-radius: 999px; color: var(--platform-color); background: var(--platform-soft); font-size: 9px; font-weight: 800; }
.platform-tab.active .active-marker { display: block; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .82fr); gap: 18px; align-items: start; padding-bottom: 34px; }
.main-column, .side-column { display: grid; gap: 18px; }
.side-column { position: sticky; top: 90px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.redeem-panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 25px 28px; border-bottom: 1px solid var(--line); }
.primary-heading { background: linear-gradient(90deg, var(--accent-soft), #fff 55%); }
.heading-brand { display: flex; align-items: center; gap: 14px; }
.heading-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--accent); box-shadow: 0 8px 18px rgba(var(--accent-rgb), .2); font-size: 13px; font-weight: 850; }
.section-kicker { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 20px; letter-spacing: -.025em; }
.connection-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #cdeee3; border-radius: 999px; color: var(--green); background: #f5fcf9; font-size: 11px; font-weight: 750; }
.connection-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(15,159,116,.1); }

#redeemForm { padding: 0 28px 28px; }
.form-step { padding: 27px 0; border-bottom: 1px solid var(--line); }
.step-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-heading > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 850; }
.step-heading div { display: flex; flex-direction: column; }
.step-heading strong { color: var(--navy); font-size: 15px; }
.step-heading small { margin-top: 1px; color: var(--text-3); font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { color: var(--text-2); font-size: 12px; font-weight: 750; }
.full-field { grid-column: 1 / -1; }
.dynamic-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.input-shell { min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; transition: .18s ease; }
.input-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .1); }
.input-shell > svg { flex: 0 0 auto; width: 19px; color: var(--text-3); }
.input-shell input { min-width: 0; flex: 1; height: 48px; border: 0; outline: 0; color: var(--text); background: transparent; }
input::placeholder, textarea::placeholder { color: #a8b2c1; }
.cdk-shell { min-height: 56px; padding-right: 6px; }
.cdk-shell input { height: 54px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .01em; }
.verify-button { height: 42px; flex: 0 0 auto; padding: 0 15px; border: 0; border-radius: 10px; color: var(--accent-deep); background: var(--accent-soft); font-size: 12px; font-weight: 800; cursor: pointer; transition: .18s ease; }
.verify-button:hover { filter: saturate(1.15); transform: translateY(-1px); }
.verify-button:disabled { opacity: .55; cursor: wait; transform: none; }
.plain-input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--text);
  background: #fff;
  transition: .18s ease;
}
.plain-input, .field select { height: 50px; padding: 0 14px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.field textarea { min-height: 142px; resize: vertical; padding: 14px; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.plain-input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .1); }
.field-hint { color: var(--text-3); font-size: 11px; line-height: 1.5; }
.notification-field { margin-top: 2px; }
.credential-action { display: flex; flex-direction: column; justify-content: end; }
.ghost-action, .secondary-action, .primary-action, .mini-action, .guide-link { border: 0; cursor: pointer; transition: .18s ease; }
.ghost-action { min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text-2); background: #fff; font-weight: 750; }
.ghost-action:hover { color: var(--navy); border-color: var(--accent); background: var(--accent-soft); }
.full-button { width: 100%; }
.account-preview { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 16px; border: 1px solid rgba(var(--accent-rgb), .24); border-radius: 14px; background: var(--accent-soft); }
.preview-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--accent); font-weight: 850; }
.preview-copy { min-width: 0; display: flex; flex-direction: column; }
.preview-copy small { color: var(--text-3); font-size: 10px; }
.preview-copy strong { overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.preview-copy span { overflow: hidden; color: var(--text-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.verified-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border-radius: 999px; color: var(--accent-deep); background: rgba(255,255,255,.7); font-size: 10px; font-weight: 800; }
.verified-chip svg { width: 14px; }
.form-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 25px; }
.submit-summary { display: flex; flex-direction: column; }
.submit-summary span { color: var(--text-3); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.submit-summary strong { color: var(--navy); font-size: 13px; }
.primary-action { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); font-weight: 800; box-shadow: 0 10px 22px rgba(var(--accent-rgb), .22); }
.primary-action svg { width: 17px; }
.primary-action:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(var(--accent-rgb), .28); }
.primary-action:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }

.tools-panel { overflow: hidden; scroll-margin-top: 90px; }
.tools-heading { padding-bottom: 18px; border-bottom: 0; }
.tool-tabs { display: flex; gap: 8px; padding: 0 28px 18px; border-bottom: 1px solid var(--line); }
.tool-tab { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; color: var(--text-2); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.tool-tab svg { width: 16px; }
.tool-tab:hover { background: var(--surface-muted); }
.tool-tab.active { color: var(--brand); border-color: #dbe4ff; background: var(--brand-soft); }
.tool-pane { display: none; padding: 24px 28px 28px; }
.tool-pane.active { display: block; animation: fadeIn .18s ease; }
.compact-query { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.secondary-action { min-height: 50px; padding: 0 20px; border-radius: 12px; color: #fff; background: var(--navy); font-weight: 800; }
.secondary-action:hover:not(:disabled) { background: #172b50; transform: translateY(-1px); }
.secondary-action:disabled { opacity: .5; cursor: wait; }
.result-placeholder { min-height: 116px; display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 18px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--text-3); background: var(--surface-muted); }
.placeholder-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.placeholder-symbol svg { width: 18px; }
.result-placeholder strong { display: block; color: var(--text-2); font-size: 13px; }
.result-placeholder p { margin: 2px 0 0; font-size: 11px; }
.session-query-layout { display: grid; gap: 12px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.history-head p { margin: 0; color: var(--text-3); font-size: 12px; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 750; }
.danger-link { color: var(--red); }
.history-list { display: grid; gap: 10px; }
.history-empty { padding: 35px 20px; border: 1px dashed var(--line); border-radius: 12px; color: var(--text-3); text-align: center; font-size: 12px; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.history-item h4 { margin: 0; color: var(--navy); font-size: 13px; }
.history-item p { margin: 3px 0 0; color: var(--text-3); font-size: 10px; }
.history-actions { display: flex; align-items: center; gap: 8px; }
.status-chip { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-chip.success { color: var(--green); background: var(--green-soft); }
.status-chip.failed { color: var(--red); background: var(--red-soft); }
.status-chip.pending { color: var(--orange); background: var(--orange-soft); }

.compact-heading { padding: 22px 22px 18px; }
.compact-heading h2 { font-size: 17px; }
.muted-time { color: var(--text-3); font-size: 10px; }
.stock-list { display: grid; gap: 8px; padding: 18px 22px 20px; }
.stock-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.stock-name { min-width: 0; display: flex; flex-direction: column; }
.stock-name strong { overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stock-name small { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.stock-count { flex: 0 0 auto; min-width: 34px; padding: 6px 8px; border-radius: 9px; color: var(--green); background: var(--green-soft); text-align: center; font-size: 13px; }
.stock-count.low { color: var(--orange); background: var(--orange-soft); }
.stock-count.zero { color: var(--red); background: var(--red-soft); }
.stock-skeleton { height: 58px; border-radius: 13px; background: linear-gradient(90deg, #f1f5f9 25%, #e8eef5 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.capacity-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 22px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 11px; }
.capacity-row span { display: inline-flex; align-items: center; gap: 7px; }
.capacity-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(15,159,116,.1); }
.capacity-row strong { color: var(--navy); font-size: 12px; }
.guide-steps { counter-reset: guide; display: grid; gap: 0; margin: 0; padding: 4px 22px 12px; list-style: none; }
.guide-steps li { counter-increment: guide; position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 13px 0; }
.guide-steps li::before { content: counter(guide); width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 850; }
.guide-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 42px; bottom: -1px; width: 1px; background: var(--line); }
.guide-steps strong { display: block; color: var(--navy); font-size: 12px; }
.guide-steps p { margin: 3px 0 0; color: var(--text-2); font-size: 10px; line-height: 1.55; }
.eta-chip { padding: 5px 8px; border-radius: 999px; color: var(--accent-deep); background: var(--accent-soft); font-size: 9px; font-weight: 800; }
.guide-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 22px 22px; }
.guide-link { min-height: 39px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text-2); background: #fff; font-size: 11px; font-weight: 750; }
.guide-link:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.guide-link.primary-guide { color: #fff; border-color: var(--accent); background: var(--accent); }
.purchase-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 22px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #10203e, #203a68); box-shadow: var(--shadow-md); }
.purchase-card div { display: flex; flex-direction: column; }
.purchase-card span { color: rgba(255,255,255,.62); font-size: 10px; }
.purchase-card strong { margin-top: 2px; font-size: 14px; }
.purchase-card a { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--navy); background: #fff; }
.purchase-card svg { width: 17px; }

.result-card { width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.result-card h3 { margin: 0 0 14px; color: var(--navy); font-size: 14px; }
.result-card.success-card { border-color: #cdeee3; background: #fbfefc; }
.result-card.error-card { border-color: #f2cccc; background: #fffafa; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-grid > div { min-width: 0; padding: 11px 12px; border-radius: 10px; background: var(--surface-muted); }
.result-grid small { display: block; color: var(--text-3); font-size: 9px; }
.result-grid strong { display: block; overflow-wrap: anywhere; margin-top: 3px; color: var(--navy); font-size: 11px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mini-action { min-height: 34px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text-2); background: #fff; font-size: 10px; font-weight: 750; }
.mini-action:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.mini-action.accent { color: #fff; border-color: var(--brand); background: var(--brand); }
.session-raw-note { margin: 12px 0 0; color: var(--text-2); font-size: 10px; line-height: 1.6; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 0; padding-bottom: 35px; color: var(--text-3); font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(8, 18, 36, .58); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(470px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 30px; border: 1px solid rgba(255,255,255,.5); border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgba(5,15,35,.3); animation: modalIn .2s ease; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--text-2); background: var(--surface-muted); cursor: pointer; font-size: 21px; }
.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 15px; color: var(--accent); background: var(--accent-soft); }
.modal-icon svg { width: 23px; }
.modal-card h2 { margin: 0; color: var(--navy); font-size: 21px; letter-spacing: -.025em; }
.modal-card > p { margin: 7px 0 18px; color: var(--text-2); font-size: 12px; }
.confirm-list { display: grid; gap: 0; margin: 0; padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.confirm-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 11px 0; }
.confirm-list dt { color: var(--text-3); font-size: 11px; }
.confirm-list dd { margin: 0; overflow-wrap: anywhere; color: var(--navy); font-size: 11px; font-weight: 750; text-align: right; }
.confirm-check { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0; color: var(--text-2); font-size: 11px; cursor: pointer; }
.confirm-check input { margin-top: 2px; accent-color: var(--accent); }
.modal-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.compact-primary { min-height: 48px; padding: 0 13px; font-size: 12px; }
.progress-card { text-align: center; }
.progress-visual { position: relative; width: 110px; height: 110px; display: grid; place-items: center; margin: 0 auto 15px; }
.progress-logo { position: relative; z-index: 2; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: var(--accent); box-shadow: 0 12px 30px rgba(var(--accent-rgb), .28); font-size: 13px; font-weight: 850; }
.pulse-ring { position: absolute; inset: 13px; border: 1px solid rgba(var(--accent-rgb), .36); border-radius: 50%; animation: pulse 1.8s ease-out infinite; }
.ring-two { animation-delay: .7s; }
.progress-visual.terminal .pulse-ring { animation: none; opacity: 0; }
.progress-state { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.progress-state.pending { color: var(--orange); background: var(--orange-soft); }
.progress-state.success { color: var(--green); background: var(--green-soft); }
.progress-state.failed { color: var(--red); background: var(--red-soft); }
.progress-card h2 { margin-top: 10px; }
.progress-track { height: 8px; overflow: hidden; margin-top: 19px; border-radius: 999px; background: #e9eef5; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .45s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--text-3); font-size: 10px; }
.task-id-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 18px 0; padding: 12px 13px; border-radius: 11px; background: var(--surface-muted); color: var(--text-3); font-size: 10px; }
.task-id-row code { overflow: hidden; color: var(--navy); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.info-card { width: min(680px, 100%); }
.info-card iframe { width: 100%; min-height: 500px; margin-top: 15px; border: 1px solid var(--line); border-radius: 12px; }
.info-body { color: var(--text-2); font-size: 12px; line-height: 1.75; }
.info-body h3 { color: var(--navy); }

.toast-stack { position: fixed; z-index: 150; right: 22px; top: 88px; display: grid; gap: 10px; width: min(350px, calc(100% - 30px)); }
.toast { display: grid; grid-template-columns: 35px 1fr; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); animation: toastIn .24s ease; }
.toast-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--green); background: var(--green-soft); font-weight: 850; }
.toast.error .toast-icon { color: var(--red); background: var(--red-soft); }
.toast.warning .toast-icon { color: var(--orange); background: var(--orange-soft); }
.toast strong { display: block; color: var(--navy); font-size: 12px; }
.toast p { margin: 2px 0 0; color: var(--text-2); font-size: 10px; }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(9px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } }
@keyframes pulse { 0% { transform: scale(.72); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }

@media (max-width: 1020px) {
  .hero { align-items: flex-end; }
  .hero-status { min-width: 320px; }
  .platform-nav { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .side-column { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-card { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 1180px); }
  .site-header { position: relative; }
  .header-inner { height: 68px; gap: 14px; }
  .header-nav { display: none; }
  .brand-copy small { display: none; }
  .header-actions { margin-left: auto; }
  .buy-button { padding: 0 13px; }
  .hero { min-height: 0; display: block; padding-top: 38px; padding-bottom: 30px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 14px; }
  .hero-status { min-width: 0; margin-top: 25px; }
  .hero-status div { padding: 16px 8px; }
  .hero-status strong { font-size: 17px; }
  .section-heading { align-items: center; }
  .selection-hint { display: none; }
  .platform-nav { display: flex; overflow-x: auto; margin-inline: -12px; padding: 0 12px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .platform-nav::-webkit-scrollbar { display: none; }
  .platform-tab { min-width: 250px; scroll-snap-align: start; }
  .panel-heading { padding: 21px 20px; }
  #redeemForm { padding: 0 20px 22px; }
  .dynamic-fields { grid-template-columns: 1fr; }
  .form-submit-row { align-items: stretch; flex-direction: column; }
  .primary-action { width: 100%; }
  .tool-tabs { overflow-x: auto; padding-inline: 20px; }
  .tool-tab { flex: 0 0 auto; }
  .tool-pane { padding: 20px; }
  .compact-query { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr; }
  .purchase-card { grid-column: auto; }
  .result-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .refresh-button { display: none; }
  .buy-button span { font-size: 12px; }
  .hero-label { font-size: 10px; }
  .hero h1 { font-size: 30px; }
  .hero-status span { font-size: 10px; }
  .platform-tab { min-width: 224px; min-height: 94px; padding: 16px; }
  .platform-symbol { width: 43px; height: 43px; }
  .panel-heading { align-items: flex-start; }
  .connection-chip { display: none; }
  .cdk-shell { flex-wrap: wrap; padding: 9px; }
  .cdk-shell > svg { display: none; }
  .cdk-shell input { width: 100%; height: 42px; }
  .verify-button { width: 100%; }
  .account-preview { grid-template-columns: 40px minmax(0, 1fr); }
  .verified-chip { grid-column: 1 / -1; justify-self: start; }
  .history-item { align-items: flex-start; flex-direction: column; }
  .history-actions { width: 100%; justify-content: space-between; }
  .modal-card { padding: 24px 20px; }
  .modal-actions { grid-template-columns: 1fr; }
  .confirm-list > div { grid-template-columns: 95px 1fr; }
}

/* V3 refinements */
.hero { position: relative; min-height: 300px; padding-top: 58px; padding-bottom: 48px; }
.hero-copy { position: relative; z-index: 2; max-width: 820px; }
.hero h1 { max-width: 760px; }
.service-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}
.proof-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(203, 213, 225, .85);
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 30px rgba(15,31,61,.055);
  backdrop-filter: blur(10px);
}
.proof-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #17b990, #087b60);
  box-shadow: 0 8px 18px rgba(16,163,127,.2);
  font-size: 15px;
}
.proof-item div { min-width: 0; display: flex; flex-direction: column; }
.proof-item strong { color: var(--navy); font-size: 15px; line-height: 1.2; white-space: nowrap; }
.proof-item small { margin-top: 3px; overflow: hidden; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.hero-orbit {
  position: relative;
  width: 190px;
  height: 190px;
  flex: 0 0 190px;
  display: grid;
  place-items: center;
  margin-right: 25px;
}
.orbit-core {
  position: relative;
  z-index: 3;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 25px;
  color: #fff;
  background: linear-gradient(145deg, #3157d5, #173caa);
  box-shadow: 0 22px 55px rgba(49,87,213,.28), inset 0 1px 0 rgba(255,255,255,.25);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .04em;
}
.orbit { position: absolute; inset: 17px; border: 1px solid rgba(49,87,213,.18); border-radius: 50%; }
.orbit-two { inset: 0; border-style: dashed; animation: rotate 18s linear infinite; }
.orbit-dot { position: absolute; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #10a37f; box-shadow: 0 5px 16px rgba(16,163,127,.25); }
.dot-one { top: 18px; right: 34px; }
.dot-two { bottom: 28px; left: 16px; background: #3157d5; }
.dot-three { right: 0; bottom: 68px; width: 9px; height: 9px; background: #e98a15; }

.featured-guide {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), .32);
  box-shadow: 0 18px 45px rgba(var(--accent-rgb), .11);
}
.featured-guide::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}
.guide-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 18px 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: 11px;
  background: var(--accent-soft);
}
.guide-notice span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 9px;
  font-weight: 850;
}
.guide-notice strong { color: var(--accent-deep); font-size: 10px; text-align: right; }
.featured-guide .panel-heading { border-bottom: 0; }
.featured-guide .guide-steps { padding-top: 0; }

.plan-field { max-width: 100%; }
.session-parse-status { min-height: 17px; transition: color .18s ease; }
.session-parse-status.loading { color: var(--brand); }
.session-parse-status.success { color: var(--green); }
.session-parse-status.warning { color: var(--orange); }
.session-parse-status.error { color: var(--red); }

.subscription-refresh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  background: linear-gradient(100deg, #f4f8ff, #fbfdff);
}
.refresh-copy { min-width: 0; display: flex; align-items: center; gap: 11px; }
.refresh-symbol {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--brand);
  background: #e7efff;
  font-size: 19px;
  font-weight: 800;
}
.refresh-copy div { min-width: 0; display: flex; flex-direction: column; }
.refresh-copy strong { color: var(--navy); font-size: 12px; }
.refresh-copy small { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.subscription-refresh .subscription-refresh-action {
  flex: 0 0 auto;
  display: inline-flex;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(49,87,213,.18);
}
.subscription-refresh .subscription-refresh-action:hover { background: var(--brand-dark); transform: translateY(-1px); }

.result-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.result-card-title h3 { margin-bottom: 2px; }
.result-card-title p { margin: 0; color: var(--text-3); font-size: 10px; }

.subscription-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid #bfe8d9;
  border-radius: 17px;
  background: linear-gradient(150deg, #f8fffc, #effbf7);
  box-shadow: 0 14px 34px rgba(15,159,116,.08);
}
.subscription-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px;
  border-bottom: 1px solid rgba(15,159,116,.14);
}
.subscription-card-head > div { min-width: 0; display: flex; flex-direction: column; }
.subscription-product { color: var(--green); font-size: 17px; font-weight: 850; }
.subscription-card-head strong { margin-top: 3px; overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #a6e1cc;
  border-radius: 999px;
  color: var(--green);
  background: #e7f9f2;
  font-size: 10px;
  font-weight: 850;
}
.subscription-status.bad { color: var(--red); border-color: #f0c5c5; background: var(--red-soft); }
.subscription-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 4px 20px 16px; }
.subscription-detail-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(90px, .65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(15,159,116,.14);
}
.subscription-detail-grid > div:nth-child(odd) { padding-right: 15px; }
.subscription-detail-grid > div:nth-child(even) { padding-left: 15px; border-left: 1px solid rgba(15,159,116,.1); }
.subscription-detail-grid span { color: var(--text-2); font-size: 10px; }
.subscription-detail-grid strong { min-width: 0; overflow-wrap: anywhere; color: var(--navy); font-size: 10px; text-align: right; }
.subscription-warning { margin: 0 20px 18px; padding: 10px 12px; border-radius: 10px; color: #98600b; background: #fff7df; font-size: 10px; }

.info-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-right: 42px; margin-bottom: 18px; }
.invoice-export {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.invoice-export svg { width: 15px; }
.invoice-export:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.invoice-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.invoice-brand-row > div { display: flex; flex-direction: column; }
.invoice-brand-row strong { color: var(--navy); font-size: 15px; }
.invoice-brand-row small { color: var(--text-3); font-size: 10px; }
.invoice-brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #111827;
  background: #f3f4f6;
}
.invoice-brand-icon svg { width: 27px; height: 27px; fill: #111827; stroke: #111827; stroke-width: .5; }
.invoice-frame-wrap { margin-top: 15px; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: #f8fafc; }
.info-card .invoice-frame-wrap iframe { min-height: 590px; margin-top: 0; border: 0; border-radius: 10px; background: #fff; }
.invoice-empty { text-align: center; padding: 26px 10px 12px; }
.invoice-empty .invoice-brand-icon { margin: 0 auto 14px; }
.invoice-empty p { max-width: 480px; margin-inline: auto; }

@media (max-width: 1020px) {
  .hero-orbit { display: none; }
  .hero-copy { max-width: none; }
}

@media (max-width: 760px) {
  .service-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-refresh { align-items: stretch; flex-direction: column; }
  .subscription-refresh .subscription-refresh-action { width: 100%; }
  .subscription-detail-grid { grid-template-columns: 1fr; }
  .subscription-detail-grid > div:nth-child(odd),
  .subscription-detail-grid > div:nth-child(even) { padding-left: 0; padding-right: 0; border-left: 0; }
}

@media (max-width: 480px) {
  .service-proof { gap: 8px; }
  .proof-item { padding: 11px; }
  .proof-icon { width: 34px; height: 34px; }
  .proof-item strong { font-size: 13px; }
  .proof-item small { font-size: 9px; }
  .guide-notice { align-items: flex-start; flex-direction: column; }
  .guide-notice strong { text-align: left; }
  .subscription-detail-grid > div { grid-template-columns: 90px minmax(0,1fr); }
  .info-modal-head { align-items: flex-start; flex-direction: column; padding-right: 40px; }
}

/* V4: compact query center, mobile platform switcher and invoice hardening */
.header-query-button {
  position: relative;
  padding: 0;
  border: 0;
  color: var(--text-2);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.header-query-button::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -24px;
  height: 2px;
  background: var(--brand);
  transition: .2s ease;
}
.header-query-button:hover { color: var(--text); }
.header-query-button:hover::after { left: 0; right: 0; }

.platform-mobile-hint { display: none; }

.query-launcher {
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(0, 1.55fr);
  align-items: center;
  gap: 24px;
  padding: 21px 24px;
  scroll-margin-top: 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at 4% 0%, rgba(49,87,213,.08), transparent 34%),
    var(--surface);
}
.query-launcher-copy { min-width: 0; display: flex; align-items: center; gap: 14px; }
.query-launcher-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--brand);
  background: var(--brand-soft);
}
.query-launcher-icon svg { width: 22px; }
.query-launcher-copy h2 { margin: 0; color: var(--navy); font-size: 18px; }
.query-launcher-copy p { margin: 4px 0 0; color: var(--text-3); font-size: 10px; }
.query-launcher-actions { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.query-launcher-actions > button {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-2);
  background: rgba(248,250,252,.86);
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.query-launcher-actions > button:hover {
  color: var(--brand);
  border-color: #cdd9ff;
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.query-launcher-actions > button > svg { width: 19px; color: var(--brand); }
.query-launcher-actions > button > span { min-width: 0; display: flex; flex-direction: column; }
.query-launcher-actions strong { overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.query-launcher-actions small { margin-top: 2px; overflow: hidden; color: var(--text-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.query-launcher-actions b { color: var(--brand); font-size: 9px; font-weight: 800; }

.query-modal-card {
  width: min(820px, 100%);
  padding: 0;
  overflow: hidden;
}
.query-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 25px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, #f3f6ff, #fff 62%);
}
.query-modal-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 22px rgba(49,87,213,.2);
}
.query-modal-icon svg { width: 21px; }
.query-modal-head h2 { font-size: 21px; }
.query-modal-head p { margin: 3px 0 0; color: var(--text-3); font-size: 10px; }
.query-modal-card > .tool-tabs {
  padding: 13px 28px;
  background: #fff;
}
.query-modal-content {
  max-height: min(640px, calc(100dvh - 230px));
  overflow: auto;
  overscroll-behavior: contain;
  background: #fbfcfe;
}
.query-modal-content .tool-pane { padding: 23px 28px 28px; }
.query-modal-content .result-placeholder { min-height: 180px; background: #fff; }
.query-modal-content .result-card,
.query-modal-content .subscription-card { box-shadow: 0 10px 28px rgba(15,31,61,.055); }

.guide-link.session-guide {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 18px rgba(49,87,213,.18);
}
.guide-link.session-guide:hover {
  color: #fff;
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.invoice-inline-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #f2dfb8;
  border-radius: 11px;
  color: #8b5b0b;
  background: #fff9ea;
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 1020px) {
  .query-launcher { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 760px) {
  .product-section { overflow: hidden; margin-bottom: 18px; }
  .platform-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(82vw, 310px);
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -12px;
    padding: 3px 12px 12px;
    scroll-padding-inline: 12px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  .platform-tab {
    width: auto;
    min-width: 0;
    min-height: 96px;
    padding: 16px 15px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .platform-tab:hover { transform: none; }
  .platform-tab.active { transform: translateY(-1px); }
  .platform-mobile-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 0;
    color: var(--text-3);
    font-size: 9px;
  }
  .platform-dots { display: flex; align-items: center; gap: 5px; }
  .platform-dots i {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: width .2s ease, background .2s ease;
  }
  .platform-dots i.active { width: 17px; background: var(--accent); }

  .query-launcher { min-height: 0; padding: 18px; }
  .query-launcher-actions { grid-template-columns: 1fr; }
  .query-launcher-actions > button { min-height: 62px; grid-template-columns: 30px minmax(0,1fr) auto; }

  .modal-backdrop:has(.query-modal-card) {
    place-items: end center;
    padding: 0;
  }
  .query-modal-card {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  .query-modal-card::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 8px;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #d7dee8;
    transform: translateX(-50%);
  }
  .query-modal-head { padding: 27px 20px 16px; }
  .query-modal-head p { display: none; }
  .query-modal-card > .tool-tabs { padding: 10px 20px; scroll-padding-inline: 20px; }
  .query-modal-content { max-height: calc(92dvh - 145px); }
  .query-modal-content .tool-pane { padding: 18px 20px 24px; }
  .query-modal-content .result-placeholder { min-height: 145px; }
  .query-modal-content .subscription-detail-grid { padding-inline: 15px; }
  .query-modal-content .subscription-card-head { padding-inline: 15px; }

  .info-card { width: min(100%, 680px); }
  .info-card .invoice-frame-wrap iframe { min-height: 520px; }
}

@media (max-width: 480px) {
  .platform-nav { grid-auto-columns: calc(100vw - 42px); }
  .platform-tab { grid-template-columns: 44px minmax(0,1fr) auto; min-height: 90px; }
  .platform-stock b { font-size: 16px; }
  .active-marker { top: 7px; right: 8px; }
  .query-launcher-copy p { max-width: 240px; }
  .query-modal-head { gap: 11px; }
  .query-modal-icon { width: 41px; height: 41px; }
  .query-modal-head h2 { font-size: 19px; }
  .query-modal-content .compact-query { gap: 8px; }
  .query-modal-content .secondary-action { min-height: 46px; }
  .guide-actions { grid-template-columns: 1fr 1fr; }
  .info-card .invoice-frame-wrap iframe { min-height: 470px; }
}

/* V4.1 final alignment fixes */
.query-launcher-actions > button {
  position: relative;
  grid-template-columns: 28px minmax(0, 1fr);
  padding-right: 14px;
}
.query-launcher-actions > button > b {
  position: absolute;
  top: 9px;
  right: 10px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(49,87,213,.08);
}
.query-launcher-actions strong { padding-right: 25px; }

@media (max-width: 760px) {
  .platform-nav {
    grid-template-columns: none;
    grid-template-rows: minmax(90px, auto);
  }
  .query-launcher-actions > button { grid-template-columns: 30px minmax(0,1fr); }
}

/* V5: Apple official invoice renderer */
.info-card.invoice-mode {
  width: min(900px, 100%);
  padding: 26px;
  background: #f7f9fc;
}
.info-card.invoice-mode .info-modal-head {
  position: sticky;
  z-index: 8;
  top: -26px;
  margin: -26px -26px 18px;
  padding: 22px 68px 18px 26px;
  border-bottom: 1px solid rgba(22, 45, 82, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.info-card.invoice-mode .modal-close {
  z-index: 10;
}
.invoice-modal-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(49, 87, 213, .13);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 31, 61, .045);
}
.invoice-modal-intro > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.invoice-modal-intro strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}
.invoice-modal-intro span {
  color: var(--text-3);
  font-size: 9px;
  line-height: 1.55;
}
.invoice-document-card {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid #dce4ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 31, 61, .07);
}
.invoice-document-card:first-of-type { margin-top: 0; }
.invoice-document-card .invoice-frame-wrap {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.info-card.invoice-mode .invoice-frame-wrap iframe {
  display: block;
  width: 100%;
  min-height: 590px;
  max-height: 980px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.invoice-document-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #e3e9f1;
  background: #f8fafc;
}
.invoice-document-summary > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e6ebf2;
}
.invoice-document-summary > div:last-child { border-right: 0; }
.invoice-document-summary small,
.invoice-document-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invoice-document-summary small {
  margin-bottom: 4px;
  color: var(--text-3);
  font-size: 8px;
}
.invoice-document-summary strong {
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 750;
}
.invoice-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 13px 13px;
  border-top: 1px solid #e8edf4;
  background: #fff;
}
.invoice-document-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #ccd7e7;
  border-radius: 9px;
  color: #294164;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.invoice-document-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.invoice-document-actions button.primary {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 18px rgba(49, 87, 213, .18);
}
.invoice-document-actions button.primary:hover {
  color: #fff;
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}
.invoice-document-actions svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.invoice-empty-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 14px;
  color: var(--brand);
  background: var(--brand-soft);
}
.invoice-empty-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .info-card.invoice-mode {
    width: 100%;
    max-height: 94dvh;
    padding: 18px 12px 14px;
    border-radius: 20px 20px 0 0;
  }
  .modal-backdrop:has(.info-card.invoice-mode) {
    place-items: end center;
    padding: 0;
  }
  .info-card.invoice-mode .info-modal-head {
    top: -18px;
    margin: -18px -12px 14px;
    padding: 21px 56px 14px 16px;
  }
  .info-card.invoice-mode .info-modal-head h2 { font-size: 18px; }
  .invoice-modal-intro { margin-inline: 2px; padding: 11px 12px; }
  .invoice-document-card { margin-top: 12px; border-radius: 13px; }
  .info-card.invoice-mode .invoice-frame-wrap iframe {
    min-height: 510px;
    max-height: 780px;
  }
  .invoice-document-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .invoice-document-summary > div {
    padding: 10px 11px;
    border-bottom: 1px solid #e6ebf2;
  }
  .invoice-document-summary > div:nth-child(2n) { border-right: 0; }
  .invoice-document-summary > div:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
  .invoice-document-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px;
  }
  .invoice-document-actions button {
    width: 100%;
    min-height: 40px;
  }
  .invoice-document-actions button:last-child { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .invoice-modal-intro span { display: none; }
  .info-card.invoice-mode .invoice-frame-wrap iframe { min-height: 470px; }
  .invoice-document-actions { grid-template-columns: 1fr; }
  .invoice-document-actions button:last-child { grid-column: auto; }
}


/* V5.1: subscription refresh guidance modal */
.refresh-help {
  display: grid;
  gap: 15px;
  color: var(--text-2);
}
.refresh-help-hero {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid #cddcff;
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0, rgba(49, 87, 213, .14), transparent 38%),
    linear-gradient(135deg, #f3f7ff, #fbfdff);
}
.refresh-help-hero::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -86px;
  bottom: -108px;
  border: 24px solid rgba(49, 87, 213, .055);
  border-radius: 50%;
}
.refresh-help-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #2d7eea);
  box-shadow: 0 12px 28px rgba(49, 87, 213, .24);
}
.refresh-help-icon svg,
.refresh-help-shield svg,
.refresh-help-primary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.refresh-help-icon svg { width: 27px; height: 27px; }
.refresh-help-hero > div { position: relative; z-index: 1; min-width: 0; }
.refresh-help-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border: 1px solid #c9d8ff;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(255,255,255,.8);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
}
.refresh-help-hero h3 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -.02em;
}
.refresh-help-hero p,
.refresh-help-guarantee p,
.refresh-help-steps p {
  margin: 0;
  line-height: 1.75;
}
.refresh-help-hero p { color: var(--text-3); font-size: 11px; }
.refresh-help-guide {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 31, 61, .045);
}
.refresh-help-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf1f6;
}
.refresh-help-heading span { color: var(--navy); font-size: 12px; font-weight: 850; }
.refresh-help-heading small { color: var(--green); font-size: 9px; font-weight: 750; }
.refresh-help-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.refresh-help-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px dashed #e4eaf2;
}
.refresh-help-steps li:last-child { padding-bottom: 0; border-bottom: 0; }
.refresh-help-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd9fa;
  border-radius: 10px;
  color: var(--brand);
  background: #eff4ff;
  font-size: 11px;
  font-weight: 900;
}
.refresh-help-steps strong { display: block; margin: 1px 0 5px; color: var(--navy); font-size: 12px; }
.refresh-help-steps p { color: var(--text-3); font-size: 10px; }
.refresh-help-guarantee {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #bde9d8;
  border-radius: 15px;
  background: linear-gradient(135deg, #f0fcf7, #fbfffd);
}
.refresh-help-shield {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--green);
  background: #dff7ee;
}
.refresh-help-shield svg { width: 22px; height: 22px; }
.refresh-help-guarantee strong { display: block; margin: 2px 0 4px; color: #087a59; font-size: 12px; }
.refresh-help-guarantee p { color: #4d7a6c; font-size: 10px; }
.refresh-help-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}
.refresh-help-primary,
.refresh-help-secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.refresh-help-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #2d7eea);
  box-shadow: 0 10px 24px rgba(49, 87, 213, .20);
}
.refresh-help-primary svg { width: 15px; height: 15px; }
.refresh-help-secondary {
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
}
.refresh-help-primary:hover,
.refresh-help-secondary:hover { transform: translateY(-1px); }

@media (max-width: 600px) {
  .refresh-help-hero { grid-template-columns: 44px minmax(0, 1fr); padding: 17px; }
  .refresh-help-icon { width: 44px; height: 44px; border-radius: 14px; }
  .refresh-help-icon svg { width: 23px; height: 23px; }
  .refresh-help-hero h3 { font-size: 14px; }
  .refresh-help-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .refresh-help-actions { flex-direction: column; }
  .refresh-help-primary,
  .refresh-help-secondary { width: 100%; }
}
