:root {
  --ink: #142033;
  --muted: #718096;
  --muted-2: #98a4b5;
  --line: #dde4ea;
  --line-soft: #e9eef2;
  --bg: #f4f7f8;
  --panel: #fff;
  --nav: #101a2b;
  --nav-soft: #1b2940;
  --green: #0f9f82;
  --green-dark: #087a64;
  --green-pale: #e5f6f2;
  --blue: #4779d4;
  --blue-pale: #eaf0fc;
  --gold: #d88d32;
  --gold-pale: #fcf1e0;
  --danger: #bd4c55;
  --radius: 12px;
  --shadow: 0 8px 22px rgba(18, 32, 52, .06);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(71, 121, 212, .45); outline-offset: 2px; }
[hidden] { display: none !important; }

.svg-sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.visually-hidden { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap; }
.copy-helper { position: fixed; inset: 0 auto auto 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.skip-link { position: fixed; inset: 10px auto auto 10px; z-index: 999; padding: 10px 16px; background: white; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 216px; padding: 20px 14px 16px; color: #d7dfeb; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 20px; }
.brand > span:last-child { display: grid; }
.brand strong { color: #fff; font-size: 1.15rem; letter-spacing: -.02em; }
.brand small { color: #8090a8; font-size: .67rem; letter-spacing: .08em; }
.brand-logo { display: block; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.brand-logo.small { flex-basis: 28px; width: 28px; height: 28px; border-radius: 7px; }
.side-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; width: 100%; min-height: 40px; gap: 11px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #91a0b5; text-align: left; font-size: .81rem; transition: .16s ease; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: var(--nav-soft); box-shadow: inset 3px 0 var(--green); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot p { margin: 8px 10px 0; color: #687991; font-size: .68rem; }

main { min-height: 100vh; margin-left: 216px; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 clamp(18px, 3vw, 40px); border-bottom: 1px solid rgba(216,224,231,.82); background: rgba(244,247,248,.91); backdrop-filter: blur(14px); }
.topbar-trail { display: flex; gap: 8px; color: var(--muted); font-size: .79rem; }
.topbar-trail span:first-child { color: var(--ink); font-weight: 650; }
.dot { color: #c1c8d0; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.online { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .73rem; }
.online i, .live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(15,159,130,.12); }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.rate-settings-button { display: inline-flex; align-items: center; min-height: 36px; gap: 7px; padding: 0 10px; border: 1px solid #cbd8df; border-radius: 9px; color: #526176; background: #fff; font-size: .68rem; font-weight: 700; box-shadow: 0 2px 6px rgba(18,32,52,.03); }
.rate-settings-button:hover { color: var(--green-dark); border-color: #8dc5b8; background: var(--green-pale); }
.rate-settings-button svg { width: 15px; height: 15px; }
.rate-settings-button strong { color: var(--green-dark); font-size: .78rem; }
.account-button { display: inline-flex; align-items: center; min-height: 36px; gap: 6px; padding: 0 10px; border: 1px solid #cbd8df; border-radius: 9px; color: #526176; background: #fff; font-size: .68rem; font-weight: 700; }
.account-button:hover { color: var(--green-dark); border-color: #8dc5b8; background: var(--green-pale); }
.account-button svg { width: 15px; height: 15px; }
.account-button.signed-in { color: #fff; border-color: var(--green-dark); background: var(--green-dark); }
.mobile-brand, .mobile-nav { display: none; }
.page-wrap { max-width: 1440px; margin: 0 auto; padding: 18px clamp(18px, 3vw, 40px) 36px; }
.page-view { animation: fade-in .18s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

.china-clock strong, .mini-clock strong, .world-time, .price-output > strong, .stats-list dd, .tool-result strong, .conversion-box strong, table td { font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0 0 4px; color: var(--green); font-size: .6rem; font-weight: 750; letter-spacing: .12em; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(1.3rem, 1.8vw, 1.55rem); line-height: 1.22; letter-spacing: -.03em; word-break: keep-all; overflow-wrap: break-word; }
h2 { margin-bottom: 0; font-size: .94rem; line-height: 1.3; letter-spacing: -.01em; }
.hero-copy, .page-heading p { margin-bottom: 0; color: var(--muted); font-size: .76rem; }
.china-clock { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 10px; min-width: 160px; text-align: right; }
.china-clock span { grid-column: 1 / -1; color: var(--muted); font-size: .68rem; }
.china-clock strong { font-size: 1.35rem; letter-spacing: -.03em; }
.china-clock small { color: var(--muted-2); font-size: .66rem; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.quick-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 72px; gap: 12px; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; box-shadow: 0 3px 12px rgba(18,32,52,.025); text-align: left; transition: .18s ease; }
.quick-card:hover { transform: translateY(-1px); border-color: #cad5de; box-shadow: var(--shadow); }
.quick-card.accent { color: #fff; border-color: transparent; background: linear-gradient(135deg, #0d9d80, #0b856e); }
.quick-card.accent small { color: rgba(255,255,255,.72); }
.quick-card.accent .quick-icon { color: #fff; background: rgba(255,255,255,.15); }
.quick-card strong { display: block; margin-bottom: 2px; font-size: .86rem; }
.quick-card small { display: block; color: var(--muted); font-size: .68rem; }
.quick-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--green); background: var(--green-pale); }
.quick-icon.blue { color: var(--blue); background: var(--blue-pale); }
.quick-icon.gold { color: var(--gold); background: var(--gold-pale); }
.quick-icon svg { width: 17px; height: 17px; }
.quick-arrow { width: 15px; height: 15px; color: currentColor; opacity: .55; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr .78fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.panel { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel); box-shadow: 0 4px 16px rgba(18,32,52,.025); }
.dashboard-grid .panel { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head.wrap { flex-wrap: wrap; }
.panel-head .eyebrow { margin-bottom: 4px; }
.text-button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 4px; border: 0; background: transparent; color: var(--green-dark); font-size: .72rem; font-weight: 650; }
.text-button svg { width: 13px; height: 13px; }
.text-button.danger { color: var(--danger); }
.clock-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.mini-clock { padding: 2px 12px; border-left: 1px solid var(--line-soft); }
.mini-clock:first-child { padding-left: 0; border-left: 0; }
.mini-clock:last-child { padding-right: 0; }
.mini-clock-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .68rem; }
.mini-clock strong { display: block; margin: 6px 0 3px; font-size: 1.25rem; letter-spacing: -.04em; }
.clock-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; color: var(--muted-2); font-size: .64rem; line-height: 1.3; }
.clock-sub span { white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 99px; color: var(--green-dark); background: var(--green-pale); font-size: .6rem; font-weight: 700; }
.status-badge.closed { color: #8c6670; background: #f4ebed; }
.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.holiday-panel { display: flex; flex-direction: column; justify-content: space-between; color: #fff; border: 0; background: linear-gradient(145deg, #1d2d46, #101a2b); }
.holiday-panel .panel-head { margin-bottom: 10px; }
.holiday-panel .eyebrow { color: #78d4c0; }
.holiday-feature { display: flex; flex-direction: column; justify-content: center; flex: 1; padding: 2px 0 8px; }
.holiday-feature strong { display: block; margin-bottom: 4px; font-size: 1.15rem; letter-spacing: -.02em; }
.holiday-feature p { margin-bottom: 10px; color: #9faec3; font-size: .76rem; }
.holiday-feature time { display: inline-flex; align-items: center; align-self: flex-start; gap: 5px; padding: 5px 10px; border-radius: 99px; color: #b9f0e5; background: rgba(32,195,162,.14); border: 1px solid rgba(32,195,162,.22); font-size: .68rem; font-weight: 600; }
.skeleton-text { color: #91a1b9; font-size: .76rem; }
.compact-list { display: grid; gap: 2px; }
.compact-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: .74rem; }
.compact-row:last-child { border-bottom: 0; }
.compact-row small { color: var(--muted); }
.compact-row strong:last-child { color: var(--green-dark); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 90px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .72rem; text-align: center; background: #fafbfc; }
.empty-state svg { width: 20px; height: 20px; color: var(--muted-2); opacity: .75; }
.stats-list { margin: 12px 0 0; }
.stats-list div { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.stats-list div:last-child { border: 0; }
.stats-list dt { color: var(--muted); font-size: .72rem; }
.stats-list dd { margin: 0; font-size: 1rem; font-weight: 750; }

.page-heading { margin-bottom: 14px; }
.page-heading h1 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); }
.split-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.clock-filter-tabs { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 8px; background: #eef2f5; }
.filter-btn { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; color: var(--muted); font-size: .68rem; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.filter-btn:hover { color: var(--ink); }
.filter-btn.active { color: var(--green-dark); background: #fff; box-shadow: 0 1px 4px rgba(18,32,52,.08); font-weight: 700; }
.work-grid { display: grid; gap: 16px; align-items: start; }
.hs-layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); }
.form-panel { padding: clamp(16px, 2.5vw, 26px); }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-title:not(:first-child) { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.section-title > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: var(--green-dark); background: var(--green-pale); font-size: .68rem; font-weight: 800; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: .68rem; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 5px; min-width: 0; }
.field > label, fieldset > legend { color: #3c485a; font-size: .71rem; font-weight: 650; }
.field > label span { color: var(--muted-2); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #d4dde5; border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: .9rem; transition: border .15s, box-shadow .15s; }
textarea { min-height: 90px; padding-top: 9px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a9b2be; }
input:focus, select:focus, textarea:focus { border-color: #68a999; box-shadow: 0 0 0 3px rgba(15,159,130,.11); }
input:user-invalid { border-color: #d37a82; }
.input-prefix, .input-suffix { position: relative; display: flex; align-items: center; }
.input-prefix > span, .input-suffix > span { position: absolute; z-index: 1; color: var(--muted); font-size: .72rem; pointer-events: none; }
.input-prefix > span { left: 11px; }
.input-prefix input { padding-left: 28px; }
.input-suffix > span { right: 11px; }
.input-suffix input { padding-right: 70px; }
.input-suffix.compact input { padding-right: 30px; }
.hint { margin: 5px 0 0; color: var(--muted); font-size: .66rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; gap: 6px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-size: .75rem; font-weight: 700; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { color: var(--green-dark); border-color: #b7d9d1; background: var(--green-pale); }
.button.ghost { color: var(--muted); border-color: var(--line); background: #fff; }
.button.light { color: var(--nav); background: #fff; }
.button.outline-light { color: #fff; border-color: rgba(255,255,255,.28); background: transparent; }
.button svg { width: 14px; height: 14px; }
.button.wide { width: 100%; margin-top: 18px; }

.simple-quote-panel { overflow: hidden; padding: clamp(16px, 2.5vw, 26px); }
.simple-quote-fields { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(200px, .65fr); gap: 14px; }
.quote-input input { min-height: 46px; border-radius: 9px; font-size: 1.1rem; font-weight: 700; }
.quote-input .input-prefix > span, .quote-input .input-suffix > span { font-size: .78rem; font-weight: 650; }
.rate-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rate-presets > span { margin-right: 2px; color: var(--muted); font-size: .67rem; }
.rate-presets button { min-width: 46px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: .7rem; font-weight: 700; }
.rate-presets button:hover, .rate-presets button.active { color: var(--green-dark); border-color: #8dc5b8; background: var(--green-pale); }
.rate-presets button:focus-visible { outline: 3px solid rgba(15,159,130,.2); outline-offset: 2px; }
.simple-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.price-output { display: grid; min-width: 0; padding: 16px 18px; border-radius: 11px; }
.price-output-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.price-output-top > span { font-size: .7rem; font-weight: 700; }
.profit-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 5px; font-size: .64rem; font-weight: 700; color: #0f7660; background: rgba(15,159,130,.15); }
.usd-output .profit-badge { color: #8be8d4; background: rgba(32,195,162,.2); }
.price-output > strong { overflow: hidden; margin: 4px 0 12px; font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.1; letter-spacing: -.045em; text-overflow: ellipsis; }
.price-output button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; gap: 6px; padding: 0 14px; border: 0; border-radius: 8px; font-size: .72rem; font-weight: 750; }
.price-output button svg { width: 14px; height: 14px; }
.cny-output { color: #145c4d; background: #e8f5f1; }
.cny-output button { color: #fff; background: var(--green-dark); }
.usd-output { color: #fff; background: linear-gradient(145deg, #223750, #101a2b); }
.usd-output .price-output-top > span { color: #9fb1c8; }
.usd-output button { color: var(--nav); background: #fff; }
.quote-error { margin-top: 10px; padding: 9px 12px; border-radius: 8px; color: #9d3039; background: #faecee; font-size: .71rem; }
.quote-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--muted); font-size: .67rem; }

.memo-status-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -2px 0 12px; color: var(--muted); font-size: .68rem; }
.memo-save-state { display: inline-flex; align-items: center; gap: 6px; }
.memo-save-state i { width: 6px; height: 6px; border-radius: 50%; background: #9aa7b8; box-shadow: 0 0 0 3px rgba(152,164,181,.12); }
.memo-save-state.synced i { background: var(--green); box-shadow: 0 0 0 3px rgba(15,159,130,.12); }
.memo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.memo-card { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 180px; gap: 10px; overflow: hidden; padding: 18px; border: 1px solid rgba(20,32,51,.07); border-radius: 12px; background: #e9f6f2; box-shadow: 0 4px 14px rgba(18,32,52,.035); text-align: left; transition: transform .16s ease, box-shadow .16s ease; }
.memo-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #4fae98; }
.memo-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(18,32,52,.08); }
.memo-card h2 { overflow: hidden; font-size: .95rem; white-space: nowrap; text-overflow: ellipsis; }
.memo-card p { display: -webkit-box; overflow: hidden; margin: 0; color: #526176; font-size: .76rem; line-height: 1.6; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.memo-card footer { display: flex; align-items: center; justify-content: space-between; color: #7b899b; font-size: .63rem; }
.memo-card footer svg { width: 14px; height: 14px; }
.memo-card[data-color="amber"] { background: #fff4d9; }
.memo-card[data-color="amber"]::before { background: #e8a93e; }
.memo-card[data-color="blue"] { background: #eaf2ff; }
.memo-card[data-color="blue"]::before { background: #6f9ee7; }
.memo-card[data-color="rose"] { background: #fcebed; }
.memo-card[data-color="rose"]::before { background: #d9828e; }
.memo-card[data-color="slate"] { background: #edf1f5; }
.memo-card[data-color="slate"]::before { background: #8291a5; }
.memo-empty { display: grid; min-height: 190px; place-items: center; align-content: center; gap: 6px; padding: 22px; text-align: center; }
.memo-empty > span { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 2px; border-radius: 12px; color: var(--green); background: var(--green-pale); }
.memo-empty > span svg { width: 22px; height: 22px; }
.memo-empty p { margin-bottom: 10px; color: var(--muted); font-size: .76rem; }
.memo-content-field { margin-top: 14px; }
.memo-content-field textarea { min-height: 150px; }
.memo-colors { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; padding: 0; border: 0; }
.memo-colors legend { width: 100%; margin-bottom: 1px; color: #3c485a; font-size: .71rem; font-weight: 650; }
.memo-colors label { position: relative; }
.memo-colors input { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; }
.memo-colors span { display: grid; min-width: 52px; min-height: 36px; place-items: center; border: 2px solid transparent; border-radius: 8px; color: #455468; font-size: .68rem; font-weight: 700; cursor: pointer; }
.memo-colors span.mint { background: #e9f6f2; }
.memo-colors span.amber { background: #fff4d9; }
.memo-colors span.blue { background: #eaf2ff; }
.memo-colors span.rose { background: #fcebed; }
.memo-colors span.slate { background: #edf1f5; }
.memo-colors input:checked + span { border-color: var(--green); box-shadow: inset 0 0 0 2px #fff; }
.memo-colors input:focus-visible + span { outline: 3px solid rgba(71,121,212,.45); outline-offset: 2px; }
.memo-view-content { min-height: 140px; max-height: 52vh; overflow-y: auto; padding: 15px; border-radius: 10px; color: #344256; background: #f6f8f9; font-size: .82rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.memo-view-card > time { display: block; margin-top: 10px; color: var(--muted-2); font-size: .65rem; }
.danger-button { color: var(--danger) !important; }

.auth-card .dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: .74rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 18px; padding: 3px; border-radius: 9px; background: #edf1f4; }
.auth-tabs button { min-height: 36px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: .74rem; font-weight: 700; }
.auth-tabs button[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 2px 6px rgba(18,32,52,.07); }
.auth-form { display: grid; gap: 14px; }
.password-field { position: relative; }
.password-field input { padding-right: 56px; }
.password-field button { position: absolute; inset: 4px 4px 4px auto; min-width: 46px; border: 0; border-radius: 6px; color: var(--green-dark); background: var(--green-pale); font-size: .66rem; font-weight: 700; }
.auth-error { margin-top: 12px; padding: 9px 12px; border-radius: 8px; color: #9d3039; background: #faecee; font-size: .71rem; }
.local-use-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; color: var(--muted); font-size: .67rem; }
.local-use-note svg { width: 14px; color: var(--green); }
.account-sync-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: var(--green-pale); }
.account-sync-box > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #fff; }
.account-sync-box i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(15,159,130,.13); }
.account-sync-box p { margin: 2px 0 0; color: var(--green-dark); font-size: .68rem; }
.table-panel { margin-top: 18px; padding: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: .73rem; }
table tbody tr:not(.empty-row) { transition: background .15s ease; }
table tbody tr:not(.empty-row):hover { background: #f8fafc; }
th { color: var(--muted); background: #f7f9fa; font-size: .66rem; letter-spacing: .03em; }
th:first-child { border-radius: 8px 0 0 8px; }
th:last-child { border-radius: 0 8px 8px 0; }
td code { padding: 3px 6px; border-radius: 5px; color: #375070; background: #edf2f6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.row-delete, .row-open, .row-load { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; transition: .15s; }
.row-delete:hover { color: var(--danger); background: #faecee; }
.row-open:hover { color: var(--green-dark); background: var(--green-pale); }
.row-load { color: var(--green-dark); }
.row-load:hover { color: #fff; background: var(--green); }
.row-delete svg, .row-open svg, .row-load svg { width: 14px; height: 14px; }
.row-actions { display: flex; gap: 2px; }
.empty-row td { height: 75px; color: var(--muted-2); text-align: center; }

.notice { display: flex; gap: 10px; margin-bottom: 18px; padding: 12px 15px; border: 1px solid; border-radius: 10px; font-size: .72rem; }
.notice strong { flex: 0 0 auto; }
.notice.amber { color: #705525; border-color: #ead8b2; background: #fdf8ed; }
.notice.blue { margin-top: 18px; color: #355b80; border-color: #cbddec; background: #f0f6fb; }
.verification-panel { padding: 22px; }
.verification-panel > p:not(.eyebrow) { margin: 8px 0 18px; color: var(--muted); font-size: .74rem; }
.official-links { display: grid; gap: 8px; }
.official-links a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; text-decoration: none; transition: .15s; }
.official-links a:hover { border-color: #c2d1dc; background: #f8fafb; }
.official-links a > span:nth-child(2) { display: grid; }
.official-links strong { font-size: .74rem; }
.official-links small { margin-top: 2px; color: var(--muted); font-size: .63rem; }
.official-links svg { width: 13px; color: var(--muted-2); }
.official-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-size: .58rem; font-weight: 850; }
.official-mark.cn { color: #a94646; background: #f9e9e9; }
.official-mark.wco { color: #316b9f; background: #e8f1f8; }
.official-mark.us { color: #494e91; background: #ececf8; }
.official-mark.eu { color: #9a761f; background: #fcf3d8; }
#hs-brief-panel { margin-top: 18px; padding: 20px; }
.brief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.brief-item { padding: 11px; border-radius: 8px; background: #f6f8f9; }
.brief-item span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .65rem; }
.brief-item strong { display: block; font-size: .76rem; font-weight: 600; }
.search-small { position: relative; display: flex; align-items: center; }
.search-small svg { position: absolute; left: 10px; width: 14px; color: var(--muted); }
.search-small input { width: 220px; min-height: 36px; padding-left: 32px; font-size: .75rem; }

.world-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.world-card { position: relative; overflow: hidden; min-height: 145px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 14px rgba(18,32,52,.025); transition: transform .15s ease; }
.world-card:hover { transform: translateY(-1px); }
.world-card::after { content: ""; position: absolute; inset: auto -20px -30px auto; width: 80px; height: 80px; border: 14px solid rgba(15,159,130,.045); border-radius: 50%; }
.world-card-head { display: flex; align-items: start; justify-content: space-between; }
.world-card .flag { font-size: 1.25rem; }
.world-card h2 { margin-top: 10px; font-size: .84rem; }
.world-time { display: block; margin: 4px 0 2px; font-size: 1.45rem; letter-spacing: -.04em; }
.world-date { color: var(--muted); font-size: .66rem; }
.world-offset { display: block; margin-top: 10px; color: var(--muted-2); font-size: .62rem; }
.holiday-calendar { padding: 22px; }
.inline-form { display: flex; gap: 8px; }
.inline-form select { min-width: 140px; min-height: 38px; font-size: .75rem; }
.data-status { padding: 20px 0; color: var(--muted); font-size: .75rem; text-align: center; }
.holiday-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.holiday-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; }
.holiday-date { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 8px; color: var(--green-dark); background: var(--green-pale); line-height: 1.05; }
.holiday-date strong { font-size: .92rem; }
.holiday-date small { font-size: .56rem; text-transform: uppercase; }
.holiday-row > span:last-child { display: grid; }
.holiday-row strong { font-size: .7rem; }
.holiday-row small { margin-top: 2px; color: var(--muted); font-size: .61rem; }
.holiday-row.past { opacity: .48; }
.source-note { margin: 16px 0 0; color: var(--muted-2); font-size: .64rem; text-align: center; }

.tracking-hero { padding: clamp(22px, 4vw, 42px); border-radius: 16px; color: #fff; background: radial-gradient(circle at 85% 10%, rgba(32,195,162,.18), transparent 28%), linear-gradient(135deg, #172a42, #0d1727); }
.tracking-hero form { max-width: 800px; margin: auto; }
.tracking-hero label[for="tracking-number"] { display: block; margin-bottom: 10px; color: #c4cedc; font-size: .73rem; }
.tracking-input { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 5px 5px 5px 14px; border-radius: 10px; background: white; }
.tracking-input > svg { color: var(--green); }
.tracking-input input { min-width: 0; border: 0; box-shadow: none; font-size: .96rem; }
.tracking-input button { display: flex; align-items: center; min-height: 40px; gap: 6px; padding: 0 16px; border: 0; border-radius: 8px; color: #fff; background: var(--green); font-size: .75rem; font-weight: 700; }
.tracking-input button svg { width: 15px; }
.carrier-choice { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.carrier-choice label { position: relative; }
.carrier-choice input { position: absolute; opacity: 0; }
.carrier-choice span { display: grid; min-height: 30px; place-items: center; padding: 0 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 99px; color: #91a1b6; font-size: .66rem; cursor: pointer; }
.carrier-choice input:checked + span { color: #c5fff2; border-color: rgba(62,201,170,.5); background: rgba(32,195,162,.12); }
.carrier-choice input:focus-visible + span { outline: 3px solid rgba(255,255,255,.4); }
.tracking-hint { margin: 12px 0 0; color: #6f8199; font-size: .64rem; }
.carrier-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.carrier-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--line-soft); border-radius: 11px; background: #fff; text-decoration: none; color: inherit; transition: all .16s ease; cursor: pointer; }
.carrier-card:hover { border-color: #8dc5b8; transform: translateY(-2px); box-shadow: var(--shadow); }
.carrier-card > div { display: grid; }
.carrier-card strong { font-size: .75rem; }
.carrier-card small { margin-top: 2px; color: var(--muted); font-size: .61rem; }
.carrier-card-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--muted); background: #f4f7f8; transition: .15s ease; }
.carrier-card:hover .carrier-card-arrow { color: #fff; background: var(--green); transform: translateX(2px); }
.carrier-card-arrow svg { width: 13px; height: 13px; }
.carrier-logo { display: grid; place-items: center; width: 44px; height: 36px; border-radius: 7px; font-size: .68rem; font-weight: 900; letter-spacing: -.05em; }
.carrier-logo.dhl { color: #d40511; background: #ffef00; font-style: italic; }
.carrier-logo.fedex { color: #4d148c; background: #f2edf8; font-size: .74rem; }
.carrier-logo.fedex span { color: #ff6200; }
.carrier-logo.ups { color: #ffb500; background: #351c15; border-radius: 6px 6px 10px 10px; }
.carrier-logo.track17 { color: white; background: #3985d8; font-size: .92rem; }

.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.tool-card { padding: 20px; }
.tool-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.tool-card-head p { margin: 2px 0 0; color: var(--muted); font-size: .66rem; }
.tool-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.tool-result div { padding: 10px 12px; border-radius: 8px; background: #f5f7f8; }
.tool-result span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .62rem; }
.tool-result strong { font-size: .84rem; }
.tool-result .highlight { color: var(--green-dark); background: var(--green-pale); }
.container-est { background: #edf8f5; border: 1px solid #ccece3; }
.container-est span { color: var(--green-dark); font-weight: 600; }
.container-est strong { color: #087a64; }
.conversion-box { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-top: 14px; }
.conversion-box > span { padding-bottom: 12px; color: var(--muted-2); }
.conversion-box > div:last-child { display: grid; align-content: center; min-height: 66px; padding: 10px 14px; border-radius: 8px; background: var(--green-pale); }
.conversion-box small { color: var(--green-dark); font-size: .62rem; }
.conversion-box strong { margin-top: 2px; font-size: 1.05rem; }
.template-card { grid-column: 1 / -1; }
.template-card textarea { min-height: 120px; }

dialog { width: min(580px, calc(100% - 24px)); padding: 0; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
dialog::backdrop { background: rgba(10,18,31,.62); backdrop-filter: blur(3px); }
.dialog-card { padding: 22px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.dialog-close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: #f1f4f6; font-size: 1.15rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.toast { position: fixed; z-index: 100; inset: auto 20px 20px auto; max-width: min(340px, calc(100vw - 32px)); padding: 10px 15px; border-radius: 8px; color: #fff; background: #1b2a3e; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: .74rem; opacity: 0; transform: translateY(14px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid .quick-card:last-child { grid-column: 1 / -1; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid .span-2 { grid-column: 1 / -1; }
  .holiday-panel, .stat-panel { grid-column: span 1; }
  .hs-layout { grid-template-columns: 1fr; }
  .world-grid { grid-template-columns: repeat(3, 1fr); }
  .holiday-list { grid-template-columns: repeat(2, 1fr); }
  .carrier-cards { grid-template-columns: repeat(2, 1fr); }
  .memo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .sidebar { width: 84px; padding-inline: 12px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > span:last-child, .nav-item span, .sidebar-foot p { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  main { margin-left: 84px; }
  .page-wrap { padding-top: 24px; }
  .world-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: 1fr; }
  .template-card { grid-column: auto; }
}

@media (max-width: 620px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  main { margin-left: 0; }
  .topbar { min-height: 50px; padding: 0 12px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; }
  .topbar-trail, .online { display: none; }
  .page-wrap { padding: 14px 12px 30px; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; display: grid; grid-template-columns: repeat(7, 1fr); min-height: 58px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .mobile-nav button { position: relative; display: grid; min-width: 0; min-height: 52px; place-items: center; align-content: center; gap: 2px; border: 0; color: var(--muted); background: transparent; font-size: .56rem; transition: color .15s ease; }
  .mobile-nav button svg { width: 17px; height: 17px; }
  .mobile-nav button.active { color: var(--green-dark); font-weight: 700; }
  .mobile-nav button.active::after { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2.5px; border-radius: 0 0 3px 3px; background: var(--green); }
  .hero-row { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .china-clock { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 10px; border: 1px solid var(--line-soft); border-radius: 99px; background: #fff; box-shadow: 0 2px 6px rgba(18,32,52,.03); }
  .china-clock span { color: var(--muted); font-size: .66rem; }
  .china-clock strong { font-size: .98rem; color: var(--green-dark); }
  .china-clock small { display: none; }
  .quick-grid, .dashboard-grid, .field-grid.two, .field-grid.three, .brief-grid, .holiday-list, .carrier-cards, .tool-result { grid-template-columns: 1fr; }
  .quick-grid .quick-card:last-child, .span-2, .holiday-panel, .stat-panel { grid-column: auto; }
  .quick-card { min-height: 64px; padding: 12px 14px; }
  .clock-strip { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .mini-clock:nth-child(3) { padding-left: 0; border-left: 0; }
  .page-heading, .split-heading { display: grid; align-items: start; gap: 10px; }
  .clock-filter-tabs { width: 100%; display: flex; }
  .filter-btn { flex: 1; text-align: center; padding: 5px 0; }
  .simple-quote-fields { grid-template-columns: 1fr; }
  .rate-presets { display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: nowrap; width: 100%; }
  .rate-presets > span { flex: 0 0 auto; margin-right: 1px; font-size: .66rem; }
  .rate-presets button { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 0 2px; font-size: .71rem; text-align: center; }
  .table-panel { padding: 14px 12px; }
  .table-panel .panel-head { align-items: flex-start; }
  .table-wrap { overflow: visible; }
  .table-wrap table { display: block; white-space: normal; }
  .table-wrap thead { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; white-space: nowrap; }
  .table-wrap tbody { display: grid; gap: 9px; }
  .table-wrap tbody tr:not(.empty-row) { display: grid; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
  .table-wrap tbody td { display: grid; grid-template-columns: minmax(80px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 8px; min-width: 0; padding: 6px 2px; border: 0; text-align: right; overflow-wrap: anywhere; }
  .table-wrap tbody td::before { content: attr(data-label); color: var(--muted); font-size: .64rem; font-weight: 600; text-align: left; }
  .table-wrap .row-delete, .table-wrap .row-actions { justify-self: end; }
  .table-wrap .empty-row { display: block; }
  .table-wrap .empty-row td { display: block; height: auto; min-height: 70px; padding: 22px 10px; text-align: center; }
  .table-wrap .empty-row td::before { content: none; }
  .simple-quote-panel { padding: 16px 14px; }
  .simple-results { gap: 8px; margin-top: 18px; padding-top: 16px; }
  .price-output { padding: 14px 12px; }
  .price-output > strong { margin-bottom: 10px; font-size: clamp(1.4rem, 7vw, 1.85rem); }
  .price-output button { min-height: 40px; padding-inline: 8px; }
  .quote-footer { align-items: stretch; flex-direction: column; }
  .world-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .world-card { min-height: 130px; padding: 13px; }
  .world-time { font-size: 1.25rem; }
  .holiday-calendar { padding: 16px 12px; }
  .inline-form { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .inline-form .button { grid-column: 1 / -1; }
  .tracking-hero { padding: 20px 14px; }
  .tracking-input { grid-template-columns: auto 1fr; }
  .tracking-input button { grid-column: 1 / -1; justify-content: center; }
  .carrier-cards { grid-template-columns: 1fr; }
  .notice { display: grid; }
  .compact-fields { display: grid; grid-template-columns: repeat(6, 1fr) !important; gap: 10px 6px; }
  .compact-fields > div:nth-child(1),
  .compact-fields > div:nth-child(2),
  .compact-fields > div:nth-child(3) { grid-column: span 2; }
  .compact-fields > div:nth-child(4),
  .compact-fields > div:nth-child(5) { grid-column: span 3; }
  .compact-fields > div:nth-child(6) { grid-column: span 6; }
  .dialog-card { padding: 18px 14px; }
  .icon-button, .rate-settings-button, .account-button, .dialog-close, .text-button { min-width: 40px; min-height: 40px; }
  .rate-settings-button { gap: 5px; padding-inline: 9px; }
  .topbar-actions { gap: 5px; }
  .account-button { padding-inline: 9px; }
  .memo-grid { grid-template-columns: 1fr; }
  .memo-card { min-height: 160px; }
  .memo-status-row { margin-top: -2px; }
  .toast { inset: auto 12px 74px; }
}

@media (max-width: 420px) {
  .rate-label { display: none; }
  .rate-settings-button { gap: 5px; padding: 0 8px; }
  .account-button { padding: 0 8px; }
}

@media (max-width: 380px) {
  .world-grid { grid-template-columns: 1fr; }
  .hero-row { display: grid; }
  .china-clock { grid-template-columns: auto auto; justify-content: start; text-align: left; }
  .search-small input { width: 100%; }
}

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

@media print {
  .sidebar, .topbar, .mobile-nav, .button, .text-button { display: none !important; }
  main { margin: 0; }
  .page-wrap { padding: 0; }
  .panel, .result-card { box-shadow: none; break-inside: avoid; }
}
