:root {
  color-scheme: light;
  --canvas: #f3f5f9;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --ink: #182339;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --success: #047857;
  --success-soft: #ecfdf5;
  --warning: #92400e;
  --warning-soft: #fffbeb;
  --shadow: 0 2px 5px rgb(15 23 42 / 2%), 0 8px 28px rgb(15 23 42 / 3%);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
a { color: var(--primary); text-underline-offset: 4px; }
a:hover { color: var(--primary-hover); }
button:focus-visible, a:focus-visible, summary:focus-visible, pre:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: absolute; left: 16px; top: -80px; padding: 10px 16px; background: var(--surface); border-radius: 8px; z-index: 30; }
.skip-link:focus { top: 12px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; min-height: 72px; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.brand h1 { margin: 0; font: inherit; letter-spacing: inherit; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; background: linear-gradient(145deg, #ff9849, #e96716); color: #fff; border-radius: 10px; flex: none; font-size: 20px; font-weight: 750; letter-spacing: -.06em; }
.brand-copy { min-width: 0; line-height: 1.35; }
.brand-owner { display: block; font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .05em; margin-bottom: 1px; }
.brand-site-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: #334155; text-decoration: none; font-size: 13px; font-weight: 550; flex: none; transition: color .18s, background .18s, border-color .18s; }
.brand-site-link svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.brand-site-link:hover { color: var(--primary-hover); background: var(--primary-soft); border-color: var(--line-strong); }
.brand-site-link:hover svg { color: var(--primary-hover); }
.brand-site-link:active { background: var(--surface-soft); }
.tiny-dot { display: inline-block; width: 6px; height: 6px; background: var(--line-strong); border-radius: 50%; flex: none; }
.has-credentials .tiny-dot { background: var(--success); }
.workspace { max-width: 1140px; margin: 0 auto; padding: 32px 28px 28px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 24px 26px; margin-bottom: 24px; box-shadow: var(--shadow); }
.account-card { padding: 0; border: 0; box-shadow: none; background: transparent; }
.account-heading { padding: 0 2px; margin: 26px 0 16px; }
.account-heading .section-icon { display: none; }
.account-heading h2 { font-size: 19px; }
.credential-card .subtle-badge { display: none; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-title > div { min-width: 0; }
.section-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.section-icon svg { width: 21px; height: 21px; }
.neutral-icon { color: #475569; background: #f1f5f9; }
h2 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; letter-spacing: -.02em; }
.section-description, .sharing-note { font-size: 12px; color: var(--muted); margin: 2px 0 0; line-height: 1.65; }
.subtle-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; padding: 4px 8px; border-radius: 5px; background: var(--surface-soft); }
.subtle-badge .tiny-dot { background: #94a3b8; width: 4px; height: 4px; }
.field-group { margin-top: 22px; }
.field-label-row, .field-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.field-label-row { margin-bottom: 9px; }
label { font-size: 13px; color: #334155; font-weight: 500; }
.plain-field { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-soft); overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.plain-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(37 99 235 / 10%); }
.plain-field textarea { display: block; height: 96px; min-height: 80px; width: 100%; resize: vertical; border: 0; outline: 0; background: transparent; padding: 14px 16px; color: #334155; font-family: var(--font-mono); font-size: 13px; line-height: 1.8; }
.plain-field textarea::placeholder { color: var(--muted); }
.compact { margin-top: 9px; }
.compact textarea { height: 86px; min-height: 72px; }
.field-help { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 8px 0 0; }
.field-footer #credential-state { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 8px; white-space: nowrap; }
.field-footer .has-credentials { color: var(--success) !important; }
.field-error { color: var(--danger); font-size: 13px; margin: 8px 0 0; overflow-wrap: anywhere; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.advanced-section { margin-top: 16px; border-top: 1px solid var(--line); }
.advanced-section > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; min-height: 46px; color: #334155; font-size: 13px; }
.optional-label { font-size: 12px; color: var(--muted); margin-left: 10px; }
.details-chevron { width: 17px; height: 17px; color: var(--muted); flex: none; transition: transform .18s; }
details[open] > summary .details-chevron { transform: rotate(180deg); }
.advanced-content { padding: 8px 0 4px; }
.tool-key-field input { display: block; width: 100%; max-width: 480px; min-height: 44px; margin-top: 8px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-soft); color: var(--ink); }
.credential-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.credential-actions .button-primary { padding-inline: 22px; }
.credential-actions .button-arrow { margin-left: 9px; width: 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; border: 1px solid transparent; border-radius: 8px; padding: 10px 16px; line-height: 1.5; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .18s, border-color .18s, box-shadow .18s, color .18s; }
.button svg { width: 17px; height: 17px; flex: none; }
.button-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 4px rgb(37 99 235 / 10%); }
.button-primary:hover:enabled { background: var(--primary-hover); border-color: var(--primary-hover); }
.button-primary:active:enabled { box-shadow: inset 0 2px 3px rgb(0 0 0 / 12%); }
.button-secondary { border-color: var(--line-strong); color: #334155; background: var(--surface); }
.button-secondary:hover:enabled { background: var(--surface-soft); border-color: #94a3b8; }
.button-danger { color: var(--danger); background: var(--surface); border-color: #fecaca; }
.button-danger:hover:enabled { background: var(--danger-soft); border-color: #f87171; }
.button-quiet { background: transparent; color: var(--muted); padding-inline: 8px; }
.button-quiet:hover:enabled { color: var(--ink); background: var(--surface-soft); }
.button:disabled { opacity: .45; box-shadow: none; }
.button-spinner { display: inline-block; width: 14px; height: 14px; border: 1.7px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.share-actions { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; }
.share-actions .share-button { padding: 10px 12px; font-size: 12px; }
.share-button svg { width: 15px; height: 15px; }
.empty-state { min-height: 192px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 12px 24px; }
.empty-state-icon { display: grid; place-items: center; width: 58px; height: 58px; background: var(--surface-soft); border: 1px solid var(--line); color: #94a3b8; border-radius: 16px; margin-bottom: 14px; }
.empty-state-icon svg { width: 40px; height: 40px; stroke-width: 1.5; }
.empty-state-icon svg circle { fill: var(--surface); }
.empty-state h3 { margin: 0 0 5px; font-size: 14px; color: #475569; font-weight: 500; }
.empty-state p { margin: 0; font-size: 12px; color: var(--muted); }
.account-card > .result-area > .empty-state { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.membership-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; }
.membership-tier-card { --tier-fill: #334155; --tier-accent: #e2e8f0; --tier-text: #fff; --tier-muted: #e2e8f0; position: relative; isolation: isolate; overflow: hidden; background: var(--tier-fill); color: var(--tier-text); border: 1px solid transparent; border-radius: 16px; padding: 20px 24px; min-width: 0; min-height: 146px; box-shadow: 0 4px 16px rgb(24 35 57 / 6%); transition: border-color .2s, box-shadow .2s; }
.membership-tier-card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.membership-tier-card::after { content: ""; position: absolute; inset: 0; width: auto; height: auto; border-radius: inherit; border: 0; z-index: -1; pointer-events: none; transition: opacity .2s; }
.tier-go { --tier-fill: #eef1f5; --tier-text: #334155; --tier-muted: #52637a; --tier-accent: #64748b; border-color: #dce2ea; box-shadow: none; }
.tier-go::before { background: none; }
.tier-go::after { background: radial-gradient(circle at 101% 7%, transparent 0 76px, #d5dde7 77px 78px, transparent 79px); }
.tier-plus { --tier-fill: #1742a4; --tier-accent: #d3e5ff; --tier-muted: #d3e5ff; background: linear-gradient(120deg, #1742a4, #1d56bd); border-color: #2b60c2; }
.tier-plus::before { background: linear-gradient(130deg, transparent 65%, rgb(255 255 255 / 6%) 65% 82%, transparent 82%); }
.tier-plus::after { background: linear-gradient(130deg, transparent 59%, rgb(255 255 255 / 18%) 59.2% 59.4%, transparent 59.6%); }
.tier-pro_lite { --tier-fill: #c9d3e2; --tier-text: #25334b; --tier-muted: #465875; --tier-accent: #4b5e7b; background: linear-gradient(120deg, #c9d3e2 0%, #e9eef6 26%, #f4f7fc 42%, #c7d1df 66%, #e8edf5 100%); border-color: #b7c3d4; box-shadow: inset 0 1px 0 #fff, 0 5px 18px rgb(52 69 96 / 9%); }
.tier-pro_lite::before { background: repeating-linear-gradient(0deg, rgb(51 65 85 / 3%) 0 1px, transparent 1px 4px); }
.tier-pro_lite::after { background: linear-gradient(120deg, transparent 58%, rgb(75 94 123 / 17%) 58.2% 58.4%, transparent 58.6%); }
.tier-pro { --tier-fill: #eed09a; --tier-text: #5c3a13; --tier-muted: #654018; --tier-accent: #82541e; background: linear-gradient(115deg, #e5c181 0%, #f4ddb0 28%, #fff1cd 47%, #e9cb91 68%, #f7e4b9 100%); border-color: #c7a363; box-shadow: inset 0 1px 0 #fff5db, 0 6px 20px rgb(126 84 31 / 12%); }
.tier-pro::before { background: repeating-linear-gradient(0deg, rgb(112 72 21 / 3%) 0 1px, transparent 1px 4px); }
.tier-pro::after { background: linear-gradient(125deg, transparent 61%, rgb(130 84 30 / 20%) 61.2% 61.4%, transparent 61.6%); }
.tier-pro_500 { --tier-fill: #171b26; --tier-text: #f9dfa8; --tier-muted: #e5c58c; --tier-accent: #edcb82; background: linear-gradient(120deg, #171b26 0%, #242431 55%, #2c2631 100%); border-color: #a58a51; box-shadow: inset 0 0 0 1px rgb(237 203 130 / 17%), 0 7px 24px rgb(75 56 18 / 15%); }
.tier-pro_500::before { background: linear-gradient(132deg, transparent 53%, rgb(237 203 130 / 8%) 54% 66%, transparent 67%); }
.tier-pro_500::after { inset: 7px; border: 1px solid rgb(237 203 130 / 16%); border-radius: 10px; background: linear-gradient(135deg, transparent 71%, rgb(237 203 130 / 20%) 71.2% 71.4%, transparent 71.6%); }
.tier-effects { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: -1; }
.tier-sheen { position: absolute; inset: -60% auto -60% -50%; width: 40%; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent, rgb(255 255 255 / 36%), transparent); transform: translateX(-150%) rotate(16deg); animation: tier-sheen-pass 1.15s ease-out .08s 1 both; }
.tier-pro .tier-sheen { animation-duration: 1.3s; background: linear-gradient(105deg, transparent, rgb(255 255 255 / 52%), transparent); }
.tier-pro_500 .tier-sheen { animation-duration: 1.5s; background: linear-gradient(105deg, transparent, rgb(237 203 130 / 13%), transparent); }
@keyframes tier-sheen-pass { 0% { transform: translateX(-150%) rotate(16deg); opacity: 0; } 15% { opacity: 1; } 82% { opacity: 1; } 100% { transform: translateX(420%) rotate(16deg); opacity: 0; } }
@media (hover: hover) and (pointer: fine) {
  .tier-plus:hover { border-color: #a1c4ff; box-shadow: 0 6px 20px rgb(29 86 189 / 18%); }
  .tier-pro_lite:hover { border-color: #8a9ab4; box-shadow: inset 0 1px 0 #fff, 0 7px 22px rgb(52 69 96 / 14%); }
  .tier-pro:hover { border-color: #b1863d; box-shadow: inset 0 1px 0 #fff5db, 0 7px 24px rgb(126 84 31 / 20%); }
  .tier-pro_500:hover { border-color: #ebcf90; box-shadow: inset 0 0 0 1px rgb(237 203 130 / 26%), 0 7px 26px rgb(149 113 35 / 22%); }
}
.tier-card-heading, .status-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; }
.tier-card-heading { color: var(--tier-muted); padding-right: 74px; }
.tier-name { font-size: clamp(30px, 3vw, 38px); letter-spacing: -.035em; line-height: 1.2; margin: 12px 0 0; font-weight: 650; overflow-wrap: anywhere; max-width: calc(100% - 80px); }
.tier-emblem { position: absolute; right: 24px; top: 26px; display: grid; place-items: center; width: 49px; height: 49px; color: var(--tier-accent); }
.tier-emblem svg { width: 44px; height: 44px; stroke-width: 1.4; }
.tier-markers { display: flex; align-items: end; gap: 4px; position: absolute; right: 26px; bottom: 23px; height: 17px; color: var(--tier-accent); }
.tier-markers i { display: block; width: 5px; height: 7px; border-radius: 2px; background: currentColor; }
.tier-markers i:nth-child(2) { height: 9px; }
.tier-markers i:nth-child(3) { height: 11px; }
.tier-markers i:nth-child(4) { height: 14px; }
.tier-markers i:nth-child(5) { height: 17px; }
.membership-status { --status-color: #475569; --status-soft: #f1f5f9; --status-border: var(--line); display: flex; flex-direction: column; align-items: stretch; justify-content: start; gap: 6px; padding: 18px 22px; border: 1px solid var(--status-border); border-radius: 16px; background: var(--surface); margin: 0; min-width: 0; min-height: 146px; box-shadow: var(--shadow); }
.membership-status.success { --status-color: var(--success); --status-soft: var(--success-soft); --status-border: #a7f3d0; }
.membership-status.warning { --status-color: var(--warning); --status-soft: var(--warning-soft); --status-border: #fcd34d; }
.membership-status.danger { --status-color: var(--danger); --status-soft: var(--danger-soft); --status-border: #fecaca; }
.status-card-heading { color: var(--muted); }
.membership-status-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--status-color); background: var(--status-soft); border-radius: 9px; flex: none; }
.membership-status-icon svg { width: 19px; height: 19px; }
.membership-status-content { min-width: 0; padding: 0; }
.membership-status h3 { font-size: 21px; line-height: 1.4; letter-spacing: -.02em; margin: 0; color: var(--status-color); font-weight: 650; text-wrap: balance; }
.membership-status p { margin: 6px 0 0; color: #475569; font-size: 12px; line-height: 1.65; }
.grace-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.grace-item { min-width: 0; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.grace-item dt { color: var(--muted); font-size: 13px; }
.grace-item dd { margin: 10px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.grace-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
#grace-days-value { font-size: 22px; color: #475569; }
.grace-panel[data-tone="warning"] #grace-days-value { color: var(--warning); }
.grace-panel[data-tone="danger"] #grace-days-value { color: var(--danger); }
.account-details { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-top: 14px; box-shadow: var(--shadow); }
.account-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 17px 22px; color: var(--ink); font-size: 15px; font-weight: 600; }
.account-details > summary svg { width: 18px; height: 18px; }
.account-details[open] > summary svg { transform: rotate(180deg); }
.account-details > .data-list { margin: 0; padding: 0 22px 16px; }
.account-details[open] > summary { border-bottom: 1px solid var(--line); }
.detail-groups { display: grid; grid-template-columns: 1.12fr 1fr 1fr; gap: 22px; padding: 22px; }
.detail-group { min-width: 0; }
.detail-group:not(.is-first-visible) { border-left: 1px solid var(--line); padding-left: 22px; }
.detail-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #475569; font-size: 13px; font-weight: 600; }
.detail-group h4::before { content: ""; display: block; height: 12px; width: 3px; background: #94a3b8; border-radius: 2px; }
.detail-group .data-list { display: block; margin: 0; }
.detail-group .data-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.detail-group .data-row:last-child, .detail-group .data-row.is-last-visible { border-bottom: 0; padding-bottom: 0; }
.detail-group .data-row dt { font-size: 12px; }
.detail-group .data-row dd { color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.6; }
#account-detail-identity .data-row:nth-child(-n+2) dd { font-size: 16px; font-weight: 550; }
#account-detail-identity .data-row:not(:nth-child(-n+2)) dd { font-size: 12px; font-weight: 400; }
.account-tools { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-top: 14px; }
.account-tools .cancel-context { margin: 0; padding: 0; border: 0; }
.account-tools .actions-bar { padding-top: 12px; }
.query-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 26px; }
.account-overview { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-overview > div:last-child { min-width: 0; }
.account-avatar { width: 42px; height: 42px; display: grid; place-items: center; background: #eef2ff; color: #4f46e5; font-size: 18px; font-weight: 600; border-radius: 50%; flex: none; }
.account-name { font-size: 17px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.account-detail { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.status-badge { color: #475569; background: #f1f5f9; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.status-badge.success { color: var(--success); background: var(--success-soft); border-color: #a7f3d0; }
.status-badge.warning { color: var(--warning); background: var(--warning-soft); border-color: #fde68a; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.stat-card { padding: 20px; min-width: 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-card.featured { background: var(--surface); border-color: var(--line); }
.stat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.stat-heading svg { width: 19px; height: 19px; color: #64748b; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { color: var(--ink); font-size: 29px; font-weight: 600; line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
.featured .stat-value { color: var(--ink); }
.stat-value.small { font-size: 17px; padding-block: 8px; letter-spacing: -.01em; }
.stat-caption { color: var(--muted); font-size: 12px; margin-top: 5px; }
.data-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin: 16px 0 0; }
.data-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; min-width: 0; }
.data-row dt { color: var(--muted); font-size: 12px; }
.data-row dd { margin: 0; color: #334155; font-size: 13px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.data-row dd small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.result-message { padding: 10px 12px; border-radius: 7px; font-size: 12px; color: #475569; background: var(--surface-soft); margin: 16px 0 0; line-height: 1.8; overflow-wrap: anywhere; }
.pending-query-notice { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }
.result-check-time { color: var(--muted); font-size: 11px; text-align: right; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.subscription-history { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.subscription-extra > summary { min-height: 44px; padding-block: 12px; color: var(--primary); font-size: 13px; }
.subscription-history h3 { margin: 0; font-size: 14px; font-weight: 600; }
.subscription-note { color: var(--muted); font-size: 12px; margin: 5px 0 12px; }
.subscription-row { border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px; margin-top: 10px; background: var(--surface-soft); }
.subscription-row-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.subscription-row-heading > strong { font-size: 14px; margin-right: auto; }
.subscription-current { color: var(--primary); background: var(--primary-soft); border: 1px solid #dbeafe; border-radius: 5px; padding: 3px 7px; font-size: 11px; }
.subscription-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 6px 0 0; }
.subscription-data .data-row { border-bottom: 0; padding: 6px 0; grid-template-columns: 72px minmax(0, 1fr); }
.subscription-data .data-row dd { font-size: 12px; }
.history-search-field { margin-top: 18px; }
.history-search-field label { display: block; margin-bottom: 7px; }
.history-search-field input { display: block; width: 100%; max-width: 480px; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-soft); color: var(--ink); }
.history-storage-note { color: var(--warning); background: var(--warning-soft); border-radius: 7px; font-size: 12px; padding: 10px 12px; margin: 12px 0 0; }
.history-list { margin-top: 10px; }
.history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.history-row { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--surface-soft); }
.history-empty { grid-column: 1 / -1; }
.history-row-copy { min-width: 0; overflow-wrap: anywhere; }
.history-row-copy strong { font-size: 13px; font-weight: 550; }
.history-row-copy p { font-size: 12px; color: #475569; margin: 3px 0; }
.history-row-copy small { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.history-row-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.history-row-actions .button { font-size: 12px; }
.history-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 10px; margin: 0; }
.history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.history-pagination > span { font-size: 12px; color: var(--muted); }
.history-pagination > div { display: flex; gap: 8px; }
.history-pagination .button { font-size: 12px; }
.cancel-context { display: flex; gap: 8px; align-items: start; border-top: 1px solid var(--line); padding-top: 17px; margin-top: 4px; }
.context-icon { display: grid; place-items: center; width: 16px; height: 16px; background: #e2e8f0; border-radius: 50%; color: #475569; font-size: 10px; text-align: center; flex: none; margin-top: 3px; }
.cancel-context strong { display: none; }
.cancel-context p { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.8; overflow-wrap: anywhere; }
.actions-bar { display: flex; align-items: center; gap: 10px; padding-top: 15px; }
.text-button { border: 0; background: none; color: var(--primary); padding: 8px 0; min-height: 44px; font-size: 12px; text-underline-offset: 3px; }
.text-button:hover { text-decoration: underline; }
.operation-error { margin-top: 16px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.operation-result { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.outcome-banner { display: flex; align-items: start; gap: 10px; padding: 13px 15px; border: 1px solid #a7f3d0; border-radius: 8px; background: var(--success-soft); }
.outcome-banner.warning { border-color: #fde68a; background: var(--warning-soft); }
.outcome-banner.neutral { border-color: var(--line); background: var(--surface-soft); }
.outcome-symbol { display: grid; place-items: center; width: 22px; height: 22px; background: #d1fae5; color: var(--success); border-radius: 50%; flex: none; font-size: 12px; }
.warning .outcome-symbol { background: #fef3c7; color: var(--warning); }
.neutral .outcome-symbol { background: #e2e8f0; color: #475569; }
.outcome-banner h3 { font-size: 14px; color: var(--success); font-weight: 600; margin: 0 0 4px; }
.outcome-banner.warning h3 { color: var(--warning); }
.outcome-banner.neutral h3 { color: #334155; }
.outcome-banner p { color: #065f46; font-size: 13px; margin: 0; line-height: 1.8; overflow-wrap: anywhere; }
.outcome-banner.warning p { color: var(--warning); }
.outcome-banner.neutral p { color: var(--muted); }
.requery-button { margin-top: 4px; }
.cancel-outcome > div { min-width: 0; }
.cancel-health { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.card-intro { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 13px 0 16px; }
#session-output { border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-soft); color: #334155; padding: 13px 15px; margin: 0; max-height: 190px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; }
.output-actions { display: flex; gap: 9px; margin-top: 16px; }
.output-actions .button-primary { margin-left: auto; }
.brand-promo { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; min-width: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.brand-promo-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-promo-identity > div { min-width: 0; }
.brand-promo .brand-mark { width: 36px; height: 36px; font-size: 18px; border-radius: 9px; }
.brand-promo-owner { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .05em; line-height: 1.4; }
.brand-promo h2 { font-size: 14px; font-weight: 550; margin-top: 2px; }
.brand-promo-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; min-width: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--ink); font-size: 13px; font-weight: 550; text-decoration: none; flex: none; }
.brand-promo-link svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.brand-promo-link:hover { color: var(--primary-hover); border-color: var(--line-strong); background: var(--primary-soft); }
.brand-promo-link:hover svg { color: var(--primary-hover); }
.brand-promo-link:active { background: var(--surface); }
.page-footer { color: var(--muted); font-size: 11px; display: flex; align-items: start; justify-content: space-between; gap: 24px; margin: 20px 2px 0; line-height: 1.8; }
.page-footer p { margin: 0; }

.confirmation-dialog, .share-preview-dialog, .history-dialog, .image-settings-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 28px; color: var(--ink); background: var(--surface); max-height: calc(100dvh - 40px); overflow-y: auto; box-shadow: 0 24px 80px rgb(15 23 42 / 18%); }
.confirmation-dialog { width: min(480px, calc(100% - 32px)); }
.confirmation-dialog::backdrop, .share-preview-dialog::backdrop, .history-dialog::backdrop, .image-settings-dialog::backdrop { background: rgb(15 23 42 / 40%); backdrop-filter: blur(3px); }
.image-settings-dialog { width: min(680px, calc(100% - 32px)); padding: 24px; scroll-padding-block: 16px; }
.image-settings-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.image-settings-heading h2 { font-size: 20px; }
.image-settings-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.image-settings-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); flex: none; }
.image-settings-icon svg { width: 21px; height: 21px; }
.image-field-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.image-field-group { min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.image-field-group legend { margin-left: 4px; padding: 0 6px; font-size: 12px; font-weight: 600; color: #475569; }
.image-field-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 4px; }
.image-field-option { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px; margin: 0; border-radius: 7px; color: var(--ink); font-size: 12px; font-weight: 400; line-height: 1.5; cursor: pointer; transition: background .18s; }
.image-field-option:hover { background: var(--primary-soft); }
.image-field-option:focus-within { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--primary-soft); }
.image-field-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.image-field-option span { min-width: 0; overflow-wrap: anywhere; }
.image-settings-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.image-settings-feedback { margin: 10px 0 0; padding: 8px 10px; border-radius: 7px; color: var(--warning); background: var(--warning-soft); font-size: 12px; line-height: 1.7; }
.image-settings-actions { margin-top: 18px; justify-content: flex-end; }
.image-settings-actions .button { flex: none; min-width: 104px; }
.dialog-close-form { position: absolute; right: 12px; top: 12px; margin: 0; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; background: transparent; color: var(--muted); border: 0; border-radius: 8px; }
.icon-button:hover { background: var(--surface-soft); color: var(--ink); }
.icon-button svg { width: 19px; height: 19px; }
.dialog-symbol { width: 46px; height: 46px; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); border-radius: 12px; margin-bottom: 20px; }
.dialog-symbol svg { width: 24px; height: 24px; }
.confirmation-dialog h2 { font-size: 22px; line-height: 1.45; }
.confirmation-dialog > p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.dialog-account { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 5px 13px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; padding: 17px; margin: 20px 0 16px; }
.dialog-account > span { font-size: 12px; color: var(--muted); }
.dialog-account strong { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.dialog-account small { grid-column: 2; font-size: 11px; color: var(--muted); margin-bottom: 9px; overflow-wrap: anywhere; }
.dialog-account small:last-child { margin-bottom: 0; }
.confirmation-dialog .dialog-note { font-size: 12px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 22px; }
.dialog-actions .button { flex: 1; }
.dialog-actions .button-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.dialog-actions .button-danger:hover:enabled { background: #991b1b; border-color: #991b1b; }
.share-preview-dialog { width: min(620px, calc(100% - 32px)); }
.history-dialog { width: min(740px, calc(100% - 32px)); }
.history-dialog h2 { font-size: 20px; }
.history-dialog .data-list { margin-top: 18px; }
.history-dialog .dialog-actions { position: sticky; bottom: -28px; background: var(--surface); padding: 16px 0 0; }
.share-preview-dialog h2 { font-size: 20px; }
.share-preview-dialog .field-help { font-size: 12px; margin-top: 10px; }
.share-preview-canvas { display: block; width: 100%; height: auto; max-height: 55vh; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; margin-top: 17px; background: var(--surface); }
.share-preview-text { display: block; width: 100%; min-height: 220px; max-height: 50vh; resize: vertical; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-soft); color: #334155; font-family: inherit; font-size: 13px; line-height: 1.85; margin-top: 17px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); background: #172235; color: #fff; border-radius: 9px; padding: 12px 18px; font-size: 13px; text-align: center; box-shadow: 0 5px 20px rgb(15 23 42 / 12%); z-index: 20; }
.input-invalid { border-color: var(--danger) !important; }

/* Hidden cards leave no unused grid columns; mobile layout rules still win. */
.membership-overview:where([data-visible-count="1"]), .stat-grid:where([data-visible-count="1"]), .grace-panel:where([data-visible-count="1"]), .detail-groups:where([data-visible-count="1"]) { grid-template-columns: minmax(0, 1fr); }
.stat-grid:where([data-visible-count="2"]), .grace-panel:where([data-visible-count="2"]), .detail-groups:where([data-visible-count="2"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 700px) {
  .topbar-inner { min-height: 64px; padding-inline: 20px; gap: 12px; }
  .brand { gap: 9px; font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 8px; font-size: 18px; }
  .brand-site-link { padding-inline: 11px; font-size: 12px; gap: 8px; }
  .workspace { padding: 26px 20px 24px; }
  .card { padding: 22px 20px; border-radius: 14px; margin-bottom: 18px; }
  .card-heading { gap: 12px; flex-wrap: wrap; }
  .section-title { gap: 10px; }
  .section-icon { width: 36px; height: 36px; border-radius: 9px; }
  h2 { font-size: 16px; }
  .subtle-badge { display: none; }
  .plain-field textarea { font-size: 16px; height: 134px; padding: 12px; line-height: 1.65; }
  .compact textarea { height: 104px; }
  .tool-key-field input, .share-preview-text { font-size: 16px; }
  .field-footer { align-items: start; flex-wrap: wrap; gap: 0 12px; }
  .field-footer #credential-state { margin-top: 4px; }
  .optional-label { font-size: 11px; margin-left: 5px; }
  .share-actions { width: 100%; margin-top: 4px; gap: 8px; }
  .share-actions .share-button { flex: 1; min-width: 0; padding-inline: 8px; font-size: 12px; }
  .empty-state { min-height: 184px; padding: 24px 0; }
  .empty-state p { max-width: 28em; }
  .account-card { padding: 0; border-radius: 0; }
  .membership-overview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .membership-tier-card { padding: 21px 22px; min-height: 146px; border-radius: 15px; }
  .tier-name { font-size: 35px; }
  .tier-emblem { right: 22px; }
  .tier-markers { right: 25px; }
  .membership-status { padding: 18px 20px; gap: 6px; min-height: 146px; border-radius: 15px; }
  .membership-status h3 { font-size: 20px; }
  .membership-status-content { padding-top: 0; }
  .membership-status p { font-size: 12px; margin-top: 6px; }
  .grace-panel { grid-template-columns: minmax(0, 1fr); }
  .grace-item { padding: 16px 18px; }
  .grace-item dd { font-size: 14px; margin-top: 5px; }
  .account-details > summary { min-height: 56px; padding: 15px 18px; }
  .detail-groups { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 18px; }
  .detail-group:not(.is-first-visible) { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .detail-group .data-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .detail-group .data-row { padding: 10px 0; }
  #account-detail-identity .data-list { display: block; }
  .query-summary { align-items: start; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
  .account-name { font-size: 15px; }
  .account-avatar { width: 38px; height: 38px; font-size: 16px; }
  .status-badge { margin-left: 50px; font-size: 11px; }
  .stat-grid { gap: 10px; margin-top: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid:where([data-visible-count="1"]) { grid-template-columns: minmax(0, 1fr); }
  .stat-grid .featured { grid-column: 1 / -1; }
  .stat-card { padding: 15px 12px; }
  .stat-value { font-size: 26px; }
  .stat-value.small { font-size: 14px; padding-block: 8px; }
  .stat-caption { font-size: 11px; }
  .data-list { grid-template-columns: minmax(0, 1fr); }
  .data-row { grid-template-columns: 92px minmax(0, 1fr); padding-block: 11px; }
  .subscription-data { grid-template-columns: minmax(0, 1fr); }
  .subscription-row-heading .status-badge { margin-left: 0; }
  .subscription-row { padding: 13px; }
  .history-search-field input { font-size: 16px; max-width: none; }
  .history-list { grid-template-columns: minmax(0, 1fr); }
  .history-row { align-items: start; flex-wrap: wrap; gap: 9px; }
  .history-row-actions { width: 100%; }
  .history-row-actions .button-secondary { margin-right: auto; }
  .history-pagination { align-items: start; flex-wrap: wrap; }
  .history-pagination > div { margin-left: auto; }
  .actions-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .button { padding: 10px 11px; font-size: 12px; }
  .button svg { width: 16px; height: 16px; }
  .credential-actions .button-primary { padding-inline: 14px; }
  .credential-actions .button-arrow { display: none; }
  .output-actions { flex-wrap: wrap; gap: 8px; }
  .output-actions .button { flex: 1; }
  .output-actions .button-primary { margin-left: 0; flex-basis: 100%; }
  .page-footer { display: block; margin-top: 18px; font-size: 10px; }
  .brand-promo { padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
  .brand-promo-identity { gap: 10px; }
  .brand-promo-link { margin-left: auto; }
  .confirmation-dialog, .share-preview-dialog, .history-dialog { padding: 24px; }
  .image-settings-dialog { padding: 20px; }
  .image-field-groups { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .history-dialog .dialog-actions { bottom: -24px; }
  .confirmation-dialog h2 { font-size: 20px; }
  .dialog-account { grid-template-columns: 64px minmax(0, 1fr); padding: 14px; }
  .dialog-actions { gap: 8px; }
}
@media (max-width: 360px) {
  .topbar-inner { padding-inline: 12px; }
  .brand { font-size: 13px; gap: 7px; }
  .brand-mark { width: 27px; height: 27px; }
  .workspace { padding-inline: 12px; }
  .card { padding-inline: 16px; }
  .section-description, .sharing-note { font-size: 11px; }
  .optional-label { display: block; margin-left: 0; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-value.small { padding-block: 0; }
  .detail-group .data-list { grid-template-columns: minmax(0, 1fr); }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .button { flex-basis: 100%; }
  .image-settings-dialog { padding: 18px; width: calc(100% - 24px); }
  .image-settings-heading { align-items: start; gap: 10px; }
  .image-settings-heading h2 { font-size: 18px; }
  .image-settings-heading p { font-size: 11px; }
  .image-settings-icon { width: 34px; height: 34px; border-radius: 9px; }
  .image-field-group { padding: 6px; }
  .image-field-option { gap: 6px; padding-inline: 6px; }
  .image-settings-actions .button { flex: 1; min-width: 0; flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
