:root,
html[data-theme="orange"] {
    --color-primary: #e17714;
    --color-secondary: #7c3800;
    --color-background: #faf7f2;
    --color-surface-muted: #f9fafb;
    --color-border: #e5e7e8;
    --color-text: #463f3f;
    --color-white: #ffffff;
    --color-error: #e53935;
    --color-warning: #ffbc42;
    --color-success: #43a047;
    --color-title: #ff5c00;
    --color-title-start: #fbeccf;
    --color-title-end: #fffefd;
    --color-mobile-nav: #ffe8c7;
    --color-sidebar: #f7cc89;
    --color-link: hsl(29 84% 53%);
    --color-primary-hover: hsl(29 84% 43%);
    --color-primary-click: hsl(29 84% 38%);
    --color-outline-hover: hsl(29 84% 95%);
    --color-outline-click: hsl(29 84% 90%);
    --color-disabled: rgba(70, 63, 63, .05);
    --button-border-radius: 50px;
    --content-width: 640px;
    --shadow-card: 0 8px 30px rgba(70, 63, 63, .08);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--color-background); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--color-text);
    background: var(--color-background);
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    line-height: 1.6;
}

a { color: var(--color-link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 45%, white);
    outline-offset: 3px;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link {
    position: fixed;
    z-index: 10;
    top: 8px;
    left: 8px;
    padding: 8px 16px;
    color: var(--color-white);
    background: var(--color-secondary);
    border-radius: 8px;
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { background: var(--color-white); border-bottom: 1px solid var(--color-border); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 32px, var(--content-width));
    min-height: 72px;
    margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-secondary); text-decoration: none; }
.brand img, .brand-mark { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.brand-mark { display: grid; place-items: center; color: var(--color-white); background: var(--color-primary); font-weight: 800; }
.brand-copy { display: grid; line-height: 1.3; }
.brand-copy strong { color: var(--color-secondary); font-size: 1rem; }
.brand-copy small { color: #756d68; font-size: .75rem; }
.header-help { color: var(--color-secondary); font-size: .875rem; font-weight: 700; }

.app-shell { width: min(100% - 32px, var(--content-width)); margin: 0 auto; padding: 24px 0 48px; }
#app-root:focus { outline: none; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0 auto 22px; color: #988f88; font-size: .7rem; }
.stepper span { white-space: nowrap; }
.stepper span.is-active, .stepper span.is-done { color: var(--color-primary); font-weight: 800; }
.stepper i { flex: 1 1 auto; max-width: 20px; height: 1px; background: var(--color-border); }
.stepper i.is-done { background: var(--color-primary); }

.page-heading { padding: 24px; margin-bottom: 18px; background: linear-gradient(115deg, var(--color-title-start), var(--color-title-end)); border-radius: 22px; }
.page-heading h1 { margin: 0; color: var(--color-title); font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.25; }
.page-heading p { margin: 8px 0 0; color: #6e625a; }
.card { padding: 22px; background: var(--color-white); border: 1px solid var(--color-border); border-radius: 20px; box-shadow: var(--shadow-card); }
.card + .card { margin-top: 14px; }
.card-muted { background: var(--color-surface-muted); box-shadow: none; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.actions > * { flex: 1 1 180px; }

.button {
    min-height: 48px;
    padding: 11px 22px;
    border: 2px solid transparent;
    border-radius: var(--button-border-radius);
    font-weight: 800;
    text-align: center;
    transition: background-color .15s ease, transform .15s ease, border-color .15s ease;
}
.button:active { transform: translateY(1px); }
.button-primary { color: var(--color-white); background: var(--color-primary); }
.button-primary:hover { background: var(--color-primary-hover); }
.button-primary:active { background: var(--color-primary-click); }
.button-outline { color: var(--color-primary); background: var(--color-white); border-color: var(--color-primary); }
.button-outline:hover { background: var(--color-outline-hover); }
.button-outline:active { background: var(--color-outline-click); }
.button-danger { color: var(--color-white); background: var(--color-error); }
.button:disabled { color: #8b817b; background: var(--color-disabled); border-color: transparent; cursor: not-allowed; }

.field { display: grid; gap: 6px; }
.field label { color: var(--color-secondary); font-weight: 800; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 14px; color: var(--color-text); background: var(--color-white); border: 1px solid #cfc8c3; border-radius: 12px; }
.field input::placeholder { color: #a19891; }
.hint { color: #756d68; font-size: .9rem; }
.error-text { color: var(--color-error); font-weight: 700; }
.success-text { color: var(--color-success); font-weight: 700; }
.warning-box, .error-box, .success-box { padding: 14px 16px; border-radius: 14px; }
.warning-box { color: #76520a; background: #fff7dd; border: 1px solid #f1d486; }
.error-box { color: #8c2523; background: #fff0ef; border: 1px solid #f0b7b4; }
.success-box { color: #235e28; background: #edf7ee; border: 1px solid #b6dcb9; }

.vehicle-list { display: grid; gap: 12px; }
.vehicle-card { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 14px; padding: 14px; background: var(--color-white); border: 1px solid var(--color-border); border-radius: 16px; }
.vehicle-photo { width: 84px; height: 64px; object-fit: cover; background: var(--color-surface-muted); border-radius: 10px; }
.vehicle-card h2 { margin: 0; color: var(--color-secondary); font-size: 1.05rem; }
.vehicle-card p { margin: 3px 0 0; color: #756d68; font-size: .85rem; }
.vehicle-price { color: var(--color-primary); font-weight: 900; white-space: nowrap; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--color-border); border-radius: 14px; }
.choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-outline-hover); }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--color-primary); }
.choice strong { display: block; color: var(--color-secondary); }
.unstyled-fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }

.summary { display: grid; gap: 8px; margin: 0; }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.summary dt { color: #756d68; }
.summary dd { margin: 0; color: var(--color-text); font-weight: 800; text-align: right; }
.total { color: var(--color-primary) !important; font-size: 1.3rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(225, 119, 20, .2); border-top-color: var(--color-primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.site-footer { display: flex; justify-content: space-between; width: min(100% - 32px, var(--content-width)); margin: 0 auto; padding: 20px 0 30px; color: #8c837c; font-size: .78rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.empty-state { padding: 30px 16px; color: #756d68; text-align: center; }
.loading-state { color: #756d68; text-align: center; }

@media (max-width: 599px) {
    .site-header { background: var(--color-mobile-nav); }
    .header-inner, .app-shell { width: min(100% - 24px, var(--content-width)); }
    .app-shell { padding-top: 16px; }
    .stepper { gap: 3px; font-size: .6rem; }
    .stepper i { max-width: 10px; }
    .card, .page-heading { padding: 18px; border-radius: 16px; }
    .vehicle-card { grid-template-columns: 64px 1fr; }
    .vehicle-photo { width: 64px; height: 56px; }
    .vehicle-card .button { grid-column: 1 / -1; width: 100%; }
    .site-footer { width: min(100% - 24px, var(--content-width)); }
}
@media (min-width: 600px) and (max-width: 1023px) {
    .site-header { background: var(--color-white); }
}
@media (min-width: 1024px) {
    .app-shell { padding-top: 36px; }
}
