:root {
    color-scheme: light;
    --ink: #1b3348;
    --muted: #526b7d;
    --blue: #235b78;
    --blue-deep: #174760;
    --blue-tint: #e9f3f9;
    --page: #f1f6f9;
    --surface: #fff;
    --line: #dbe6ee;
    --green: #2b6955;
    --green-tint: #e5f4ec;
    --gold: #854f26;
    --gold-tint: #fff1e1;
    --red: #9a3941;
    --red-tint: #fbeaed;
    --shadow: 0 12px 32px #21496b0b;
    --nav-height: 64px;
    --save-height: 68px;
    --gap: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans CJK TC",
        "Microsoft JhengHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    line-height: 1.55;
    min-height: 100vh;
}
body, button, input, select, textarea { font-size: 1rem; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .53; }
a { color: var(--blue-deep); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible {
    outline: 3px solid #4581ad;
    outline-offset: 3px;
}
p, h1, h2, h3 { margin: 0; }
svg { width: 21px; height: 21px; flex: 0 0 auto; vertical-align: middle; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.no-script { margin: 16px; }

.topbar {
    padding-top: env(safe-area-inset-top, 0);
    background: #f8fbfd;
    border-bottom: 1px solid #dfeaf1;
}
.topbar-content {
    max-width: 1144px;
    min-height: 64px;
    margin: 0 auto;
    padding: 11px max(16px, env(safe-area-inset-right)) 11px max(16px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.topbar-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-title { font-size: 1rem; font-weight: 800; white-space: nowrap; letter-spacing: .055em; }
.connection {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--green);
    white-space: nowrap;
    font-size: .75rem;
    font-weight: 650;
}
.connection::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.connection.offline { color: var(--gold); }
.wordmark {
    isolation: isolate;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: 118px;
    height: 32px;
    border-radius: 8px;
    background: #548da6;
}
.wordmark img {
    position: absolute;
    width: 119%;
    height: auto;
    top: 50%;
    left: -9.5%;
    transform: translateY(-65%);
    filter: saturate(1.22) brightness(.82) contrast(1.35);
}
.wordmark::after {
    position: absolute;
    inset: 0;
    content: '';
    border: 1px solid #183f5f22;
    border-radius: inherit;
    pointer-events: none;
}

.gate-wrap { max-width: 460px; margin: clamp(30px, 9vh, 90px) auto 0; padding: 0 16px 42px; }
.gate-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--shadow);
}
.gate-card h1 { font-size: 1.65rem; letter-spacing: .025em; line-height: 1.3; }
.gate-card p { color: var(--muted); margin-top: 10px; }
.gate-card form { display: grid; gap: 15px; margin-top: 20px; }
.gate-card .button { width: 100%; }
.gate-gogo {
    display: block;
    width: 100%;
    height: 116px;
    object-fit: cover;
    object-position: center 71%;
    border-radius: 15px;
    margin-bottom: 21px;
}
.remember { display: flex; align-items: center; gap: 9px; min-height: 36px; font-size: .94rem; color: var(--muted); }
.remember input { accent-color: var(--blue); width: 19px; height: 19px; margin: 0; }

.workspace { max-width: 1144px; margin: 0 auto; padding: 14px max(12px, env(safe-area-inset-right)) calc(var(--nav-height) + env(safe-area-inset-bottom, 0) + 22px) max(12px, env(safe-area-inset-left)); }
.workspace.capture-active { padding-bottom: calc(var(--nav-height) + var(--save-height) + env(safe-area-inset-bottom, 0) + 22px); }
.work-layout { display: grid; gap: 20px; }
.work-main, .work-side { min-width: 0; }
.work-main { display: grid; gap: 12px; align-content: start; }
.work-side { display: none; }
.hero {
    overflow: hidden;
    border: 1px solid #cbdfea;
    border-radius: 21px;
    background-color: #d8ebf5;
    background-image: linear-gradient(90deg, #e7f2f9 9%, #e6f2f9f2 42%, #deedf58c 73%, #d5e9f44d),
        url(whoops-gogo.jpg);
    background-position: center, right bottom;
    background-size: cover, max(690px, 128%) auto;
}
.hero-content { padding: 14px 17px 17px; }
.trip-button {
    max-width: 100%;
    min-height: 42px;
    padding: 4px 9px 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f7fbfd;
    color: var(--blue-deep);
    border: 1px solid #bfd6e4;
    border-radius: 11px;
    font-size: .87rem;
    font-weight: 700;
}
.trip-button > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-flag { font-size: 1rem; }
.trip-button svg { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(1.85rem, 7.4vw, 2.35rem); font-weight: 850; line-height: 1.23; letter-spacing: .03em; margin-top: 9px; }
.hero p { font-size: .89rem; color: #37576b; font-weight: 560; margin-top: 3px; }
.sync-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid #f0d7b9;
    border-radius: 13px;
    background: var(--gold-tint);
    color: #784725;
    font-weight: 650;
    font-size: .88rem;
}
.sync-notice > span { display: flex; gap: 8px; align-items: center; }
.sync-notice svg { width: 17px; height: 17px; }

.sheet {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.capture-form { display: grid; gap: var(--gap); padding: 15px; }
.photo-field { display: flex; min-width: 0; gap: 8px; align-items: stretch; }
.photo-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed #98b9ce;
    border-radius: 14px;
    background: #eff7fc;
    color: var(--blue-deep);
    min-height: 61px;
    font-size: .97rem;
    font-weight: 730;
    flex: 1;
}
.photo-button:hover { background: #e4f1f9; }
.album-button {
    padding: 0 13px;
    background: #fbfdfe;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: .9rem;
    font-weight: 700;
    min-width: 78px;
    min-height: 48px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.album-button svg { width: 17px; height: 17px; }
.photo-filled {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    background: #f4f9fc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 7px;
}
.photo-thumb-button { background: none; padding: 0; border: 0; display: block; flex: 0 0 auto; }
.photo-thumb-button img { display: block; width: 70px; height: 65px; object-fit: cover; border-radius: 9px; background: #deebf4; }
.photo-actions { display: flex; align-items: center; min-width: 0; flex-wrap: wrap; gap: 2px 5px; }
.photo-actions p { width: 100%; font-size: .87rem; font-weight: 750; }
.icon-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f7fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.icon-button svg { width: 19px; height: 19px; }
.icon-button.danger { color: var(--red); }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .label-row label, .quantity-wrap > label { font-size: .91rem; font-weight: 730; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 24px; }
.label-meta { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .035em; margin-left: 2px; }
.inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 2px 6px;
    min-height: 34px;
    margin: -5px 0;
    color: var(--blue-deep);
    border: 0;
    border-radius: 8px;
    background: #ebf4fa;
    font-size: .8rem;
    font-weight: 730;
}
.inline-button svg { width: 15px; height: 15px; }
.inline-button:hover { background: #dfedf6; }
.field input:not([type=checkbox]), .field textarea, .field select, .search-input {
    width: 100%;
    min-width: 0;
    height: 47px;
    border: 1px solid #cfdee8;
    border-radius: 11px;
    background: #fbfdfe;
    color: var(--ink);
    padding: 0 11px;
    font-size: 1rem;
}
.field input::placeholder, .field textarea::placeholder, .search-input::placeholder { color: #6a7f8d; opacity: 1; }
.field textarea {
    display: block;
    min-height: 65px;
    height: auto;
    padding: 9px 11px;
    resize: vertical;
}
.field .field-hint { color: var(--blue-deep); font-size: .83rem; margin-top: 1px; }
.field select, .select-field select {
    appearance: none;
    padding-right: 25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23526b7d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.field input[aria-invalid=true], .field textarea[aria-invalid=true] { border-color: var(--red); background: #fff9fa; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compound-input { display: flex; align-items: center; border: 1px solid #cfdee8; border-radius: 11px; background: #fbfdfe; }
.compound-input:has([aria-invalid=true]) { border-color: var(--red); background: #fff9fa; }
.compound-input > span {
    padding-inline-start: 10px;
    color: var(--muted);
    font-size: .89rem;
    font-weight: 680;
    white-space: nowrap;
}
.compound-input input#original, .compound-input input#retail { border: 0; background: transparent; padding-inline-start: 6px; height: 45px; }

.quantity-line { display: flex; justify-content: space-between; gap: 10px; align-items: end; }
.quantity-wrap { display: grid; gap: 5px; min-width: 0; }
.stepper { display: flex; width: fit-content; border: 1px solid #cfdee8; border-radius: 12px; background: #fbfdfe; }
.stepper button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 43px;
    background: #f2f8fc;
    border: 0;
    border-radius: 11px;
    padding: 0;
    color: var(--blue-deep);
}
.stepper button:first-child { border-radius: 11px 0 0 11px; }
.stepper button:last-child { border-radius: 0 11px 11px 0; }
.stepper button:hover { background: #e8f3fa; }
.stepper button svg { width: 17px; height: 17px; }
.stepper input {
    width: 42px;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 750;
    color: var(--ink);
    padding: 0;
}
.line-total { text-align: right; }
.line-total span { display: block; font-size: .82rem; color: var(--muted); }
.line-total strong {
    display: block;
    color: var(--blue-deep);
    font-size: clamp(1.05rem, 5vw, 1.38rem);
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
    line-height: 1.45;
}
.product-details { border: 1px solid var(--line); border-radius: 12px; background: #f8fbfd; }
.product-details summary {
    display: flex;
    align-items: center;
    gap: 7px;
    list-style: none;
    cursor: pointer;
    min-height: 44px;
    padding: 7px 10px;
    color: var(--blue-deep);
    font-size: .9rem;
    font-weight: 710;
}
.product-details summary::-webkit-details-marker { display: none; }
.product-details summary .chevron { margin-left: auto; width: 16px; height: 16px; }
.product-details[open] summary .chevron { transform: rotate(180deg); }
.details-fields { padding: 2px 10px 11px; display: grid; gap: 10px; }
.state-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); gap: 8px; }
.select-field, .payment-control {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
    min-height: 48px;
    padding-inline: 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: #f9fcfe;
    font-weight: 680;
    font-size: .85rem;
}
.select-field > span, .payment-control > span:first-child { white-space: nowrap; }
.select-field select {
    min-height: 43px;
    min-width: 0;
    width: 100%;
    padding: 0 15px 0 0;
    background-color: transparent;
    background-position: right -1px center;
    border: 0;
    border-radius: 8px;
    color: var(--blue-deep);
    font-size: 1rem;
    font-weight: 760;
    text-align-last: right;
}
.payment-control { position: relative; justify-content: space-between; cursor: pointer; }
.payment-control input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; cursor: pointer; }
.payment-control input:focus-visible + .switch { outline: 3px solid #4581ad; outline-offset: 2px; }
.switch {
    width: 40px;
    height: 23px;
    border-radius: 20px;
    background: #768d9d;
    padding: 3px;
    flex: 0 0 auto;
    pointer-events: none;
}
.switch::after { content: ''; display: block; width: 17px; height: 17px; border-radius: 50%; background: #fff; }
.payment-control input:checked + .switch { background: #3b7b61; }
.payment-control input:checked + .switch::after { transform: translateX(17px); }
.form-error { color: var(--red); font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }

.app-dock { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; }
.save-bar { border-top: 1px solid var(--line); background: #fcfeff; }
.save-inner {
    max-width: 700px;
    min-height: var(--save-height);
    margin: 0 auto;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: 8px;
}
.button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .93rem;
    font-weight: 760;
    color: var(--ink);
    text-decoration: none;
    text-align: center;
    line-height: 1.35;
}
.button svg { width: 18px; height: 18px; }
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: var(--blue-deep); }
.button.secondary { border-color: #c5dbe9; color: var(--blue-deep); background: #edf6fb; }
.button.secondary:hover { background: #e2f0f9; }
.button.ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.button.ghost:hover { background: #f2f8fc; }
.button.danger { background: var(--red-tint); color: var(--red); border-color: #eed2d7; }
.button.compact { font-size: .86rem; min-height: 42px; padding-inline: 8px; }
.save-inner .button { min-height: 49px; white-space: nowrap; }
.bottom-nav {
    background: #f5fafe;
    border-top: 1px solid #dce7ef;
    padding: 3px max(10px, env(safe-area-inset-right)) calc(3px + env(safe-area-inset-bottom, 0)) max(10px, env(safe-area-inset-left));
}
.nav-inner {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
}
.bottom-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    min-height: 54px;
    border-radius: 11px;
    border: 0;
    padding: 4px 0;
    background: transparent;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}
.bottom-nav button[aria-current=page] { color: var(--blue-deep); background: #e1eff8; }
.bottom-nav button > svg { width: 20px; height: 20px; }
.keyboard-open .app-dock { visibility: hidden; }
.toast {
    position: fixed;
    z-index: 10;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0) + 13px);
    max-width: min(440px, calc(100vw - 26px));
    left: 50%;
    transform: translateX(-50%);
    background: #183d52;
    color: #fff;
    box-shadow: 0 8px 24px #153f5433;
    border-radius: 12px;
    padding: 10px 15px;
    font-size: .9rem;
    line-height: 1.4;
    text-align: center;
}
body:has(.capture-active) .toast { bottom: calc(var(--nav-height) + var(--save-height) + env(safe-area-inset-bottom, 0) + 13px); }
.keyboard-open .toast { top: 13px; bottom: auto !important; }
.dialog .dialog-notice { font-size: .84rem; color: var(--green); min-height: 0; }

.list-view, .settings-view { display: grid; gap: 11px; }
.list-controls { display: grid; gap: 9px; padding: 11px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; top: 13px; left: 10px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search-input { padding-left: 37px; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-button {
    color: var(--muted);
    background: #f6fafc;
    border: 1px solid #dae6ee;
    border-radius: 9px;
    padding: 5px 7px;
    font-size: .84rem;
    font-weight: 720;
    min-height: 41px;
    flex: 1 0 auto;
}
.filter-button[aria-pressed=true] { color: var(--blue-deep); background: #e2f0f9; border-color: #c4dce9; }
.list-meta { color: var(--muted); font-size: .84rem; font-weight: 620; padding: 1px 3px; }
.list-meta-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 9px; }
.list-results { display: grid; gap: 8px; }
.list-group { display: grid; gap: 7px; }
.list-group + .list-group { margin-top: 7px; }
.group-title { font-size: .89rem; font-weight: 800; padding: 0 3px; }
.item-card { display: grid; gap: 8px; padding: 10px; min-width: 0; border-radius: 14px; }
.item-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.item-thumb, .item-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 49px;
    border: 0;
    border-radius: 9px;
    padding: 0;
    overflow: hidden;
    background: #e8f2f8;
    color: #527c98;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-title, .item-phone {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-title { font-size: .97rem; font-weight: 780; }
.item-phone { color: var(--muted); font-size: .82rem; }
.item-price {
    font-size: .92rem;
    font-weight: 820;
    color: var(--blue-deep);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.item-qty { font-size: .78rem; font-weight: 620; color: var(--muted); display: block; }
.item-mid { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 7px;
    padding: 3px 7px;
    font-size: .78rem;
    line-height: 1.35;
    font-weight: 720;
    white-space: nowrap;
}
.badge.blue { background: var(--blue-tint); color: var(--blue-deep); }
.badge.green { background: var(--green-tint); color: var(--green); }
.badge.gold { background: var(--gold-tint); color: var(--gold); }
.badge.red { background: var(--red-tint); color: var(--red); }
.item-time { color: var(--muted); font-size: .76rem; white-space: nowrap; margin-left: auto; }
.item-note { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.item-actions { display: flex; align-items: stretch; gap: 6px; }
.item-actions .button { flex: 1 0 0; min-width: 0; }
.item-actions .icon-button { height: auto; min-height: 42px; flex: 0 0 43px; }
.empty { padding: 27px 16px; text-align: center; color: var(--muted); }
.empty svg { color: #497b98; width: 27px; height: 27px; margin-bottom: 8px; }
.empty h2 { font-size: 1.1rem; color: var(--ink); }
.empty p { margin-top: 2px; font-size: .9rem; }
.empty .button { margin-top: 12px; }
.customer-card {
    padding: 11px;
    border-radius: 14px;
    display: grid;
    gap: 8px;
}
.customer-card-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.customer-card strong { white-space: nowrap; }
.customer-card p { color: var(--muted); font-size: .84rem; }
.customer-links { display: flex; gap: 6px; }
.customer-links .button { flex: 1; }
.summary-sheet { padding: 16px; }
.summary-sheet h2 { font-size: 1.02rem; margin-bottom: 9px; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.metric {
    color: var(--ink);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: start;
    text-align: left;
    padding: 9px;
    border: 1px solid #dce9f1;
    border-radius: 11px;
    background: #f1f8fc;
}
.metric span { font-size: .8rem; color: var(--muted); font-weight: 650; }
.metric strong { font-size: 1.1rem; color: var(--blue-deep); font-weight: 840; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary-recent { display: grid; gap: 8px; margin-top: 13px; }
.summary-empty { color: var(--muted); font-size: .88rem; }
.settings-grid { display: grid; gap: 8px; }
.settings-link {
    justify-content: start;
    min-height: 47px;
    width: 100%;
    text-align: left;
}
.setting-note { color: var(--muted); font-size: .86rem; margin-top: 6px; overflow-wrap: anywhere; }

.dialog {
    color: var(--ink);
    padding: 0;
    width: min(100% - 18px, 530px);
    max-height: min(calc(100dvh - 28px - env(safe-area-inset-bottom, 0)), 760px);
    border: 1px solid #cfdfe9;
    border-radius: 22px;
    margin: auto auto max(9px, env(safe-area-inset-bottom));
    background: #fcfeff;
    box-shadow: 0 12px 56px #15354a35;
    overscroll-behavior: contain;
}
.dialog::backdrop { background: #162e437d; }
.dialog-content { padding: 14px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.dialog-head h2 { font-size: 1.24rem; line-height: 1.3; overflow-wrap: anywhere; }
.dialog form, .dialog-stack { display: grid; gap: 11px; }
.dialog-copy { font-size: .93rem; color: var(--muted); overflow-wrap: anywhere; }
.dialog .form-error { margin: 0; }
.dialog .dialog-image { width: 100%; max-height: 68dvh; object-fit: contain; background: #eff5f8; border-radius: 12px; display: block; }
.dialog .bill-text { white-space: pre-wrap; font-size: .9rem; height: 180px; }
.inline-form-error { color: var(--red); font-size: .82rem; }
.dialog-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; }
.dialog-actions > * { flex: 1 1 auto; }
.trip-list { display: grid; gap: 5px; max-height: 220px; overflow-y: auto; }
.trip-choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 9px;
    align-items: center;
    text-align: left;
    min-height: 47px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f4f9fc;
    padding: 7px 10px;
    font-size: .94rem;
    font-weight: 700;
}
.trip-choice[aria-current=true] { background: #e7f3fa; border-color: #b7d5e7; color: var(--blue-deep); }
.trip-choice small { font-size: .75rem; color: var(--muted); }
.trip-choice span:nth-child(2) { overflow-wrap: anywhere; }
.queue-record { display: grid; gap: 4px; padding-block: 7px; border-bottom: 1px solid var(--line); }
.queue-record p { color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; }

@media (max-width: 759px) {
    .capture-form { gap: 12px; }
    .hero-content { padding-block: 12px 14px; }
}
@media (max-width: 359px) {
    .workspace { padding-inline: 8px; }
    .capture-form { padding: 11px; }
    .topbar-content { padding-inline: 10px; }
    .topbar-title { gap: 6px; }
    .state-controls { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); }
    .select-field, .payment-control { padding-inline: 6px; }
    .item-time { margin-left: 0; }
}
@media (min-width: 760px) {
    .workspace { padding: 23px 16px calc(var(--nav-height) + 24px); }
    .workspace.capture-active { padding-bottom: calc(var(--nav-height) + var(--save-height) + 24px); }
    .work-layout { grid-template-columns: minmax(0, 2.1fr) minmax(224px, 1fr); }
    .work-side { display: grid; gap: 12px; align-content: start; }
    .hero-content { padding: 19px 22px 22px; }
    .capture-form { padding: 20px; }
    .price-grid { gap: 12px; }
    .details-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dialog { margin: auto; }
    .dialog-content { padding: 17px; }
    .topbar-content { min-height: 72px; }
    .wordmark { width: 140px; height: 38px; }
}
@media (prefers-reduced-motion: no-preference) {
    .switch::after { transition: transform .15s ease; }
}
