:root {
    --bg: #f4f6f5;
    --surface: #ffffff;
    --surface-soft: #eef2f0;
    --ink: #121816;
    --muted: #6c7772;
    --line: #dfe5e2;
    --teal: #087a68;
    --teal-dark: #075f53;
    --coral: #ef6a56;
    --amber: #c68722;
    --blue: #4d6d91;
    --violet: #7a629d;
    --rose: #ae5266;
    --danger: #be4538;
    --shadow: 0 12px 36px rgba(28, 43, 37, 0.1);
    --nav-height: 72px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    letter-spacing: 0;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
button, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(8, 122, 104, 0.22); outline-offset: 2px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.app-shell { min-height: 100dvh; }
.app-main { min-height: 100dvh; padding-bottom: calc(var(--nav-height) + var(--safe-bottom)); }
.view { display: none; min-height: 100dvh; }
.view.is-active { display: block; }
.page-content { width: min(100%, 760px); margin: 0 auto; padding: 0 16px 28px; }
.topbar { min-height: 72px; padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 760; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.home-topbar { padding-top: max(16px, env(safe-area-inset-top)); }
.mobile-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-brand h1 { font-size: 20px; }
.mobile-brand p { margin-top: 1px; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 8px; }
.brand-mark svg { width: 21px; height: 21px; }
.brand-mark-image { overflow: hidden; background: #fff; }
.brand-mark-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.icon-button { width: 40px; height: 40px; flex: 0 0 40px; border: 0; background: transparent; display: grid; place-items: center; border-radius: 8px; cursor: pointer; }
.icon-button:hover { background: var(--surface-soft); }
.icon-button svg { width: 20px; height: 20px; }

.energy-chip { border: 1px solid var(--line); background: var(--surface); height: 46px; padding: 5px 9px 5px 6px; border-radius: 8px; display: flex; align-items: center; gap: 7px; cursor: pointer; box-shadow: 0 4px 16px rgba(27, 39, 35, 0.05); }
.energy-chip .energy-symbol { width: 32px; height: 32px; display: grid; place-items: center; background: #fff2d7; color: var(--amber); border-radius: 7px; }
.energy-chip .energy-symbol svg { width: 17px; height: 17px; fill: currentColor; }
.energy-chip > span:nth-child(2) { text-align: left; line-height: 1; }
.energy-chip small { display: block; color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.energy-chip strong { font-size: 15px; }
.energy-chip > svg { width: 15px; height: 15px; color: var(--teal); }

.banner { position: relative; height: 230px; overflow: hidden; border-radius: 8px; background: #202925; box-shadow: var(--shadow); }
.banner-track, .banner-slide { width: 100%; height: 100%; }
.banner-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 320ms ease; }
.banner-slide.is-current { opacity: 1; pointer-events: auto; }
.banner-slide > img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 38%; }
.banner-slide:first-child > img { filter: saturate(0.86) contrast(1.03); }
.banner-shade { position: absolute; inset: 0; background: rgba(9, 15, 13, 0.36); }
.banner-copy { position: absolute; z-index: 3; left: 20px; top: 24px; color: white; }
.banner-copy > span { display: block; font-size: 11px; font-weight: 700; color: #d7f4eb; margin-bottom: 8px; }
.banner-copy h2 { margin: 0 0 18px; max-width: 230px; font-size: 26px; line-height: 1.22; font-weight: 760; }
.banner-copy button { display: flex; align-items: center; gap: 6px; border: 0; padding: 9px 12px; border-radius: 7px; color: var(--ink); background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.banner-copy button svg { width: 15px; height: 15px; }
.banner-split { position: absolute; z-index: 2; top: 0; bottom: 0; right: 30%; width: 1px; background: rgba(255, 255, 255, 0.72); }
.before-label, .after-label { position: absolute; z-index: 3; bottom: 14px; color: white; font-size: 10px; background: rgba(11, 17, 15, 0.56); padding: 4px 6px; border-radius: 4px; }
.before-label { right: calc(30% + 8px); }
.after-label { right: 8px; }
.banner-dots { position: absolute; z-index: 5; right: 14px; top: 14px; display: flex; gap: 5px; }
.banner-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.52); cursor: pointer; }
.banner-dots button.is-active { width: 18px; border-radius: 4px; background: #fff; }

.section-block { margin-top: 26px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading p, .bottom-sheet header p { margin: 0 0 3px; color: var(--teal); font-size: 9px; font-weight: 800; }
.section-heading h2, .bottom-sheet header h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.text-button { display: flex; align-items: center; border: 0; padding: 4px 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.text-button svg { width: 15px; height: 15px; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool-card { min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 0; text-align: left; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #bfcac5; box-shadow: 0 9px 24px rgba(28, 43, 37, 0.09); }
.tool-thumb { position: relative; height: 94px; overflow: hidden; background: var(--surface-soft); }
.tool-thumb > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.76) contrast(0.96); }
.tool-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(17, 25, 22, 0.12); }
.tool-icon { position: absolute; z-index: 2; left: 9px; bottom: 9px; width: 32px; height: 32px; display: grid; place-items: center; color: white; border-radius: 7px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2); }
.tool-icon svg { width: 17px; height: 17px; }
.tool-icon.tool-icon-image { overflow: hidden; background: transparent; }
.tool-icon.tool-icon-image img { width: 100%; height: 100%; object-fit: cover; }
.tone-coral { background: var(--coral); }
.tone-teal { background: var(--teal); }
.tone-amber { background: var(--amber); }
.tone-blue { background: var(--blue); }
.tone-violet { background: var(--violet); }
.tone-rose { background: var(--rose); }
.tool-badge { position: absolute; z-index: 2; top: 8px; right: 8px; max-width: calc(100% - 16px); background: rgba(255,255,255,.92); color: var(--ink); border-radius: 4px; padding: 3px 6px; font-size: 9px; font-weight: 700; }
.tool-info { display: block; padding: 11px 10px 12px; min-width: 0; }
.tool-info strong { display: block; font-size: 14px; line-height: 1.3; }
.tool-info small { display: block; height: 32px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; overflow: hidden; }
.tool-info em { margin-top: 8px; display: flex; align-items: center; gap: 3px; color: var(--amber); font-style: normal; font-size: 10px; font-weight: 700; }
.tool-info em svg { width: 12px; height: 12px; fill: currentColor; }

.recent-row { width: 100%; min-height: 70px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px; text-align: left; cursor: pointer; }
.recent-row > img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.recent-row > span:nth-of-type(1) { flex: 1; min-width: 0; }
.recent-row strong, .recent-row small { display: block; }
.recent-row strong { font-size: 13px; }
.recent-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.recent-row > svg { width: 18px; height: 18px; color: var(--muted); }
.compare-mini { display: flex; }
.compare-mini b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #dbe1de; color: var(--muted); font-size: 9px; border: 2px solid white; }
.compare-mini b + b { margin-left: -8px; background: #b8dfd5; color: var(--teal-dark); }

.bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--nav-height) + var(--safe-bottom)); padding: 7px 22px var(--safe-bottom); display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.nav-item { position: relative; border: 0; background: transparent; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #7b8581; cursor: pointer; }
.nav-item svg { width: 21px; height: 21px; }
.nav-item span { font-size: 10px; font-weight: 600; white-space: nowrap; }
.nav-item.is-active { color: var(--teal); }
.nav-item.is-active svg { stroke-width: 2.5; }
.nav-dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.desktop-rail { display: none; }

.detail-topbar { position: sticky; z-index: 20; top: 0; background: rgba(244, 246, 245, 0.94); backdrop-filter: blur(14px); }
.detail-topbar h1 { font-size: 17px; }
.tool-page { padding-bottom: 118px; }
.compare-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #d8ddda; }
.compare-stage img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.compare-after, .compare-before { position: absolute; inset: 0; overflow: hidden; }
.compare-before { width: 50%; z-index: 2; }
.compare-before img { width: calc(100vw - 32px); max-width: 728px; filter: grayscale(1) sepia(.25) contrast(.82) blur(.65px); }
.compare-line { position: absolute; z-index: 4; left: 50%; top: 0; bottom: 0; width: 2px; background: white; transform: translateX(-1px); pointer-events: none; }
.compare-line span { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%); display: grid; place-items: center; color: var(--ink); background: white; border-radius: 50%; box-shadow: 0 5px 18px rgba(0,0,0,.2); }
.compare-line svg { width: 18px; height: 18px; }
.compare-stage input { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.stage-label { position: absolute; z-index: 3; bottom: 10px; padding: 4px 7px; color: white; background: rgba(10, 16, 14, .58); border-radius: 4px; font-size: 10px; }
.label-before { left: 10px; }
.label-after { right: 10px; }

.upload-panel, .settings-panel { margin-top: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; }
.upload-zone { width: 100%; min-height: 132px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--teal); background: #e1f2ed; border-radius: 8px; margin-bottom: 9px; }
.upload-icon svg { width: 21px; height: 21px; }
.upload-zone strong { font-size: 14px; }
.upload-zone small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.upload-preview { min-height: 82px; padding: 10px; align-items: center; gap: 11px; }
.upload-preview:not([hidden]) { display: flex; }
.upload-preview > img { width: 62px; height: 62px; object-fit: cover; border-radius: 6px; }
.upload-preview > div { flex: 1; min-width: 0; }
.upload-preview strong, .upload-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview strong { font-size: 12px; }
.upload-preview small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.settings-panel { padding: 4px 14px; }
.panel-title, .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-title { padding: 13px 0 11px; border-bottom: 1px solid var(--line); }
.panel-title h2 { margin: 0; font-size: 15px; }
.panel-title span { color: var(--teal); font-size: 10px; }
.setting-row { min-height: 73px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row > div:first-child, .setting-row > span:first-child { min-width: 0; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 12px; }
.setting-row small { max-width: 150px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.segmented { display: flex; flex: 0 0 auto; padding: 3px; background: var(--surface-soft); border-radius: 7px; }
.segmented button { min-width: 47px; height: 30px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.segmented button.is-selected { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(35, 48, 43, .09); font-weight: 700; }
.switch-row { position: relative; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; }
.switch { width: 44px; height: 25px; flex: 0 0 44px; border-radius: 20px; background: #ccd3d0; transition: background 160ms ease; }
.switch::after { content: ""; display: block; width: 21px; height: 21px; margin: 2px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform 160ms ease; }
.switch-row input:checked + .switch { background: var(--teal); }
.switch-row input:checked + .switch::after { transform: translateX(19px); }
.privacy-note { margin: 13px 2px; display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; }
.privacy-note svg { width: 15px; height: 15px; color: var(--teal); }
.action-footer { position: fixed; z-index: 31; left: 0; right: 0; bottom: 0; min-height: calc(76px + var(--safe-bottom)); padding: 10px 16px calc(10px + var(--safe-bottom)); display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.action-footer > div { flex: 1; min-width: 90px; }
.action-footer small, .action-footer strong { display: block; }
.action-footer small { color: var(--muted); font-size: 9px; }
.action-footer strong { margin-top: 3px; font-size: 15px; }
.action-footer strong svg { width: 14px; height: 14px; color: var(--amber); fill: currentColor; vertical-align: -2px; }
.primary-button, .secondary-button { min-height: 44px; border-radius: 8px; padding: 0 18px; font-weight: 700; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.primary-button { border: 1px solid var(--ink); color: white; background: var(--ink); }
.primary-button:hover { background: #27312d; }
.primary-button:disabled { background: #9ca5a1; border-color: #9ca5a1; cursor: wait; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.action-footer .primary-button { flex: 0 0 min(55%, 260px); }

.records-page { padding-top: 3px; }
.record-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 8px; background: #e6ebe8; margin-bottom: 14px; }
.record-tabs button { min-width: 0; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10px; white-space: nowrap; cursor: pointer; }
.record-tabs button.is-active { background: white; color: var(--ink); font-weight: 700; box-shadow: 0 2px 7px rgba(29,43,37,.08); }
.record-tabs span { margin-left: 2px; font-size: 9px; }
.record-list { display: grid; gap: 10px; }
.record-card { width: 100%; min-height: 104px; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; cursor: pointer; }
.record-card > .record-thumb { position: relative; width: 84px; height: 84px; flex: 0 0 84px; overflow: hidden; border-radius: 6px; background: var(--surface-soft); }
.record-thumb img { width: 100%; height: 100%; object-fit: cover; }
.record-thumb.processing img { opacity: .52; filter: grayscale(.25); }
.record-progress { position: absolute; inset: 0; display: grid; place-items: center; }
.record-progress b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--teal); font-size: 9px; }
.record-body { flex: 1; min-width: 0; }
.record-title-line { display: flex; align-items: center; gap: 6px; }
.record-title-line strong { flex: 1; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 3px; border-radius: 4px; padding: 3px 5px; font-size: 9px; font-weight: 700; }
.status svg { width: 11px; height: 11px; }
.status.success { color: var(--teal-dark); background: #def0ea; }
.status.processing { color: var(--blue); background: #e4ebf2; }
.status.failed { color: var(--danger); background: #f8e4e1; }
.record-body > p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.record-meta { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.record-meta span { display: flex; align-items: center; gap: 3px; }
.record-meta svg { width: 12px; height: 12px; }
.empty-state { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 8px; color: var(--teal); background: #dfefea; }
.empty-state > span svg { width: 26px; height: 26px; }
.empty-state strong { margin-top: 14px; font-size: 15px; }
.empty-state small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.empty-state button { margin-top: 18px; }

.profile-identity { display: flex; align-items: center; gap: 12px; padding: 8px 2px 19px; }
.profile-login-entry { margin-left: auto; min-height: 36px; padding: 0 12px; font-size: 11px; }
.avatar { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--teal); font-size: 20px; font-weight: 760; border: 3px solid white; box-shadow: 0 4px 14px rgba(8, 122, 104, .22); }
.avatar-small { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; border-width: 2px; }
.profile-identity > div:nth-child(2) { flex: 1; min-width: 0; }
.profile-identity h2 { margin: 0; font-size: 20px; }
.profile-identity p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.membership-band { overflow: hidden; border-radius: 8px; background: #18211e; color: white; box-shadow: var(--shadow); }
.member-main { min-height: 76px; padding: 14px; display: flex; align-items: center; gap: 10px; }
.member-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: #f5be55; background: #303b37; }
.member-icon svg { width: 20px; height: 20px; }
.member-main > div { flex: 1; }
.member-main small, .member-main strong { display: block; }
.member-main small { color: #aeb9b4; font-size: 8px; font-weight: 700; }
.member-main strong { margin-top: 4px; font-size: 16px; }
.member-main button { border: 0; background: #f1c46d; color: #272015; min-height: 32px; padding: 0 10px; border-radius: 6px; display: flex; align-items: center; font-size: 10px; font-weight: 700; cursor: pointer; }
.member-main button svg { width: 14px; height: 14px; }
.member-benefits { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #34403b; }
.member-benefits span { padding: 11px 4px 12px; text-align: center; border-right: 1px solid #34403b; }
.member-benefits span:last-child { border-right: 0; }
.member-benefits strong, .member-benefits small { display: block; }
.member-benefits strong { color: #f0c979; font-size: 11px; }
.member-benefits small { margin-top: 4px; color: #9daba5; font-size: 8px; }
.wallet-strip { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.wallet-strip button { min-width: 0; min-height: 74px; border: 1px solid var(--line); background: white; border-radius: 8px; padding: 10px; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.wallet-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; color: var(--amber); background: #fff1d4; }
.wallet-icon.blue { color: var(--blue); background: #e5ebf1; }
.wallet-icon svg { width: 17px; height: 17px; }
.wallet-strip button > span:nth-child(2) { flex: 1; min-width: 0; }
.wallet-strip small, .wallet-strip strong { display: block; }
.wallet-strip small { color: var(--muted); font-size: 8px; }
.wallet-strip strong { margin-top: 4px; font-size: 16px; }
.wallet-strip em { font-style: normal; color: var(--teal); font-size: 10px; font-weight: 700; }
.wallet-strip button > svg { width: 15px; height: 15px; color: var(--muted); }
.menu-group { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); background: white; border-radius: 8px; }
.menu-group button { width: 100%; min-height: 52px; padding: 0 13px; border: 0; border-bottom: 1px solid var(--line); background: white; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.menu-group button:last-child { border-bottom: 0; }
.menu-group button > span { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; }
.menu-group svg { width: 17px; height: 17px; color: var(--muted); }
.menu-group button > span svg { color: var(--teal); }
.version-text { margin: 22px 0 0; text-align: center; color: #9aa39f; font-size: 9px; }

.sheet-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(11, 16, 14, .55); backdrop-filter: blur(3px); }
.bottom-sheet { position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; max-height: 84dvh; overflow: auto; padding: 0 16px calc(20px + var(--safe-bottom)); border-radius: 8px 8px 0 0; background: white; box-shadow: 0 -18px 50px rgba(0,0,0,.18); animation: sheet-in 180ms ease-out; }
.sheet-handle { width: 38px; height: 4px; margin: 8px auto 14px; border-radius: 4px; background: #d8dedb; }
.bottom-sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.current-balance { min-height: 70px; padding: 12px; display: flex; align-items: center; gap: 10px; border-radius: 8px; background: #f3f6f5; }
.current-balance > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: #fff1d4; color: var(--amber); }
.current-balance svg { width: 21px; height: 21px; fill: currentColor; }
.current-balance small, .current-balance strong { display: block; }
.current-balance small { color: var(--muted); font-size: 9px; }
.current-balance strong { margin-top: 4px; font-size: 17px; }
.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.package-grid button { position: relative; min-width: 0; min-height: 112px; border: 1px solid var(--line); background: white; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.package-grid button:hover, .package-grid button.is-recommended { border-color: var(--teal); background: #f3faf8; }
.package-grid button > b { position: absolute; left: 5px; right: 5px; top: 5px; color: var(--teal); font-size: 8px; }
.package-grid strong { font-size: 22px; }
.package-grid span { margin-top: 1px; color: var(--muted); font-size: 9px; }
.package-grid em { margin-top: 10px; color: var(--coral); font-style: normal; font-size: 11px; font-weight: 700; }
.sheet-note { margin: 14px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.plan-row { width: 100%; min-height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; }
.plan-row + .plan-row { margin-top: 9px; }
[data-membership-plans] .plan-row + .plan-row { margin-top: 9px; }
.plan-row.is-selected { border-color: var(--teal); background: #f3faf8; }
.plan-row strong, .plan-row small { display: block; }
.plan-row strong { font-size: 13px; }
.plan-row small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.plan-row em { font-style: normal; color: var(--muted); font-size: 9px; }
.plan-row em b { color: var(--coral); font-size: 17px; }
.renewal-option { width: 100%; min-height: 64px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.renewal-option:hover { border-color: var(--teal); }
.renewal-option > span:nth-child(2) { flex: 1; min-width: 0; }
.renewal-option strong, .renewal-option small { display: block; }
.renewal-option strong { font-size: 12px; }
.renewal-option small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.renewal-option em { font-style: normal; color: var(--muted); font-size: 9px; white-space: nowrap; }
.renewal-option.is-ready em { color: var(--teal); }
.renewal-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 7px; color: var(--teal); background: #e6f3ef; }
.renewal-icon svg { width: 16px; height: 16px; }
.menu-hint { margin-left: auto; color: var(--muted); font-size: 10px; }
.empty-payment-method { padding: 22px 12px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.empty-payment-method > span { width: 38px; height: 38px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 8px; color: var(--teal); background: #e6f3ef; }
.empty-payment-method strong, .empty-payment-method small { display: block; }
.empty-payment-method strong { font-size: 12px; }
.empty-payment-method small { max-width: 235px; margin: 6px auto 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.payment-method-row { min-height: 62px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 9px; }
.payment-method-row strong, .payment-method-row small { display: block; }
.payment-method-row strong { font-size: 12px; }
.payment-method-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.sheet-primary { width: 100%; margin-top: 16px; }
.simple-row { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.simple-row strong, .simple-row small { display: block; }
.simple-row strong { font-size: 12px; }
.simple-row small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.simple-row em { font-style: normal; font-size: 12px; font-weight: 700; }
.simple-row em.positive { color: var(--teal); }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 7px; background: var(--surface-soft); }
.auth-tabs button { min-height: 36px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.auth-tabs button.is-selected { color: var(--ink); background: var(--surface); box-shadow: 0 2px 7px rgba(28,43,37,.08); }
.form-stack { display: grid; gap: 12px; }
.form-stack label { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.form-stack input, .form-stack select, .form-stack textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; color: var(--ink); background: var(--surface); font-size: 12px; }
.form-stack textarea { resize: vertical; min-height: 112px; line-height: 1.5; }
.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,122,104,.1); }
.form-stack input[type="file"] { padding: 8px; font-size: 10px; }
.form-check { display: flex !important; grid-template-columns: auto 1fr; align-items: start; gap: 8px !important; color: var(--muted) !important; font-size: 10px !important; font-weight: 400 !important; line-height: 1.45; }
.form-check input { width: 15px; height: 15px; margin: 1px 0 0; }
.content-page { color: var(--ink); font-size: 12px; line-height: 1.75; }
.content-page p { margin: 0; white-space: normal; }
.empty-inline { padding: 24px 8px; color: var(--muted); text-align: center; font-size: 11px; }
.danger-button { color: var(--danger); border-color: #efc4be; }
.avatar.has-image { color: transparent; background-position: center; background-repeat: no-repeat; background-size: cover; }

.record-dialog { position: fixed; z-index: 80; inset: 50% auto auto 50%; width: min(calc(100% - 28px), 460px); max-height: calc(100dvh - 30px); overflow: auto; transform: translate(-50%, -50%); border-radius: 8px; background: white; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.record-dialog::before { content: ""; position: fixed; z-index: -1; inset: -100vh -100vw; background: rgba(11,16,14,.58); backdrop-filter: blur(3px); }
.record-dialog > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 28%; }
.dialog-close { position: absolute; z-index: 2; right: 9px; top: 9px; background: rgba(255,255,255,.9); }
.dialog-content { padding: 16px; }
.dialog-content h2 { margin: 10px 0 0; font-size: 20px; }
.dialog-content p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 10px 13px; border-radius: 7px; background: #16201c; color: white; display: flex; align-items: center; gap: 7px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: 180ms ease; font-size: 11px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 15px; height: 15px; color: #71d0b8; }
body.sheet-open { overflow: hidden; }

@keyframes sheet-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 680px) {
    .page-content { padding-left: 24px; padding-right: 24px; }
    .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .compare-before img { width: min(712px, calc(100vw - 48px)); }
    .bottom-sheet { left: 50%; right: auto; width: 480px; bottom: 18px; transform: translateX(-50%); border-radius: 8px; padding-bottom: 20px; }
    @keyframes sheet-in { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
}

@media (min-width: 960px) {
    body { background: #edf1ef; }
    .app-shell { width: min(100%, 1280px); min-height: calc(100dvh - 32px); margin: 16px auto; display: grid; grid-template-columns: 226px 1fr; border: 1px solid #dbe1de; border-radius: 8px; overflow: hidden; background: var(--bg); box-shadow: 0 20px 60px rgba(27, 41, 35, .1); }
    .desktop-rail { min-height: calc(100dvh - 32px); padding: 20px 14px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #f9faf9; }
    .rail-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; color: inherit; text-decoration: none; }
    .rail-brand strong, .rail-brand small { display: block; }
    .rail-brand strong { font-size: 15px; }
    .rail-brand small { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 700; }
    .rail-nav { display: grid; gap: 4px; }
    .rail-nav .nav-item { min-height: 46px; padding: 0 12px; border-radius: 7px; flex-direction: row; justify-content: flex-start; gap: 11px; }
    .rail-nav .nav-item:hover { background: #eef2f0; }
    .rail-nav .nav-item.is-active { color: var(--ink); background: #e3efeb; }
    .rail-nav .nav-item span { flex: 1; text-align: left; font-size: 12px; }
    .rail-nav .nav-count { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--coral); font-size: 8px; }
    .rail-account { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
    .rail-account > div:nth-child(2) { flex: 1; min-width: 0; }
    .rail-account strong, .rail-account span { display: block; }
    .rail-account strong { font-size: 11px; }
    .rail-account span { margin-top: 3px; color: var(--muted); font-size: 8px; }
    .rail-account .icon-button { width: 32px; height: 32px; flex-basis: 32px; }
    .app-main { min-width: 0; min-height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding-bottom: 0; }
    .view { min-height: 100%; }
    .bottom-nav { display: none; }
    .topbar { width: min(100%, 940px); margin: 0 auto; padding: 22px 32px 14px; }
    .page-content { width: min(100%, 940px); padding-left: 32px; padding-right: 32px; }
    .mobile-brand .brand-mark { display: none; }
    .mobile-brand h1 { font-size: 25px; }
    .banner { height: 290px; }
    .banner-copy { left: 30px; top: 38px; }
    .banner-copy h2 { font-size: 34px; }
    .tool-thumb { height: 112px; }
    .compare-stage { max-height: 470px; }
    .compare-before img { width: min(876px, calc(100vw - 322px)); }
    .action-footer { position: sticky; bottom: 0; width: min(100%, 940px); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
    .tool-page { padding-bottom: 24px; }
    .records-page .record-list { grid-template-columns: 1fr 1fr; }
    .profile-page { max-width: 720px; }
    .toast { bottom: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
