/* ==========================================================================
   mserver.css —— 對外官網樣式表（手刻，不經 Vite / Tailwind build，不引任何外部 CDN）

   ★ 設計變數與 mpanel 的 public/css/mpanel.css 完全同一組 shadcn token，
     兩個系統看起來才會是同一家公司的東西。改 token 請兩邊一起改。
   ★ SSOT：同一種東西全站共用同一個 class，各頁禁止再刻一套。
   ★ 元件視覺對齊 ui.shadcn.com 預設 zinc：細邊框、--radius 0.5rem、近黑 primary、
     focus-visible ring 2px。色盤本身不改。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 設計變數（shadcn 命名，與 mpanel 對齊）
   -------------------------------------------------------------------------- */
:root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;

    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;

    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;

    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;

    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;

    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;

    --destructive: 0 72.2% 50.6%;
    --destructive-foreground: 0 0% 98%;

    --warning: 38 92% 45%;
    --warning-foreground: 48 96% 9%;

    --success: 142 71% 34%;
    --success-foreground: 0 0% 98%;

    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;

    --radius: 0.5rem;

    --gap-xs: 0.25rem;
    --gap-sm: 0.5rem;
    --gap: 0.75rem;
    --gap-md: 1rem;
    --gap-lg: 1.5rem;
    --gap-xl: 2rem;

    --container: 72rem;

    --shadow-sm: 0 1px 2px 0 hsl(240 10% 3.9% / 0.05);
    --shadow: 0 1px 3px 0 hsl(240 10% 3.9% / 0.08), 0 1px 2px -1px hsl(240 10% 3.9% / 0.08);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        --background: 240 10% 3.9%;
        --foreground: 0 0% 98%;

        --card: 240 10% 5.5%;
        --card-foreground: 0 0% 98%;

        --popover: 240 10% 5.5%;
        --popover-foreground: 0 0% 98%;

        --primary: 0 0% 98%;
        --primary-foreground: 240 5.9% 10%;

        --secondary: 240 3.7% 15.9%;
        --secondary-foreground: 0 0% 98%;

        --muted: 240 3.7% 15.9%;
        --muted-foreground: 240 5% 64.9%;

        --accent: 240 3.7% 15.9%;
        --accent-foreground: 0 0% 98%;

        --destructive: 0 72% 51%;
        --destructive-foreground: 0 0% 98%;

        --warning: 38 92% 50%;
        --warning-foreground: 48 96% 9%;

        --success: 142 69% 42%;
        --success-foreground: 144 61% 8%;

        --border: 240 3.7% 18%;
        --input: 240 3.7% 18%;
        --ring: 240 4.9% 83.9%;

        --shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.35);
        --shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.4), 0 1px 2px -1px hsl(0 0% 0% / 0.35);
    }
}

html[data-theme="dark"] {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;

    --card: 240 10% 5.5%;
    --card-foreground: 0 0% 98%;

    --popover: 240 10% 5.5%;
    --popover-foreground: 0 0% 98%;

    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;

    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;

    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;

    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;

    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 98%;

    --warning: 38 92% 50%;
    --warning-foreground: 48 96% 9%;

    --success: 142 69% 42%;
    --success-foreground: 144 61% 8%;

    --border: 240 3.7% 18%;
    --input: 240 3.7% 18%;
    --ring: 240 4.9% 83.9%;

    --shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.35);
    --shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.4), 0 1px 2px -1px hsl(0 0% 0% / 0.35);
}

html[data-theme="light"] {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;

    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;

    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;

    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;

    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;

    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;

    --destructive: 0 72.2% 50.6%;
    --destructive-foreground: 0 0% 98%;

    --warning: 38 92% 45%;
    --warning-foreground: 48 96% 9%;

    --success: 142 71% 34%;
    --success-foreground: 0 0% 98%;

    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;

    --shadow-sm: 0 1px 2px 0 hsl(240 10% 3.9% / 0.05);
    --shadow: 0 1px 3px 0 hsl(240 10% 3.9% / 0.08), 0 1px 2px -1px hsl(240 10% 3.9% / 0.08);
}

/* --------------------------------------------------------------------------
   2. 基礎
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
        "PingFang TC", "Microsoft JhengHei", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0 0 var(--gap-sm);
    line-height: 1.3;
    font-weight: 650;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 var(--gap-md); }

a {
    color: inherit;
    text-decoration: none;
}

a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap-md);
}

.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.stack > * + * { margin-top: var(--gap-md); }

.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mb-md { margin-bottom: var(--gap-md); }

/* --------------------------------------------------------------------------
   3. 版頭 / 版尾（對齊 shadcn site header：h-14、text-sm、nav gap）
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: hsl(var(--background) / 0.95);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid hsl(var(--border));
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    min-height: 3.5rem;
    padding-block: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand:hover { text-decoration: none; }

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.75rem;
    font-weight: 700;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.5rem;
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 500;
}

.site-nav a { color: hsl(var(--muted-foreground)); }
.site-nav a:hover { color: hsl(var(--foreground)); text-decoration: none; }
.site-nav a[aria-current="page"] { color: hsl(var(--foreground)); font-weight: 600; }

.site-nav a:focus-visible,
.brand:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
    border-radius: calc(var(--radius) - 2px);
}

.site-footer {
    margin-top: auto;
    padding: var(--gap-lg) 0;
    border-top: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-md);
    justify-content: space-between;
    align-items: flex-start;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm) 1.5rem;
}

.site-footer__links a {
    color: hsl(var(--muted-foreground));
}

.site-footer__links a:hover {
    color: hsl(var(--foreground));
    text-decoration: none;
}

main {
    flex: 1 0 auto;
    min-height: 60vh;
}

.flash {
    padding-top: var(--gap-md);
}

/* --------------------------------------------------------------------------
   4. 區塊
   -------------------------------------------------------------------------- */
.section {
    padding: var(--gap-xl) 0;
}

.section--hero {
    padding: calc(var(--gap-xl) * 2) 0 var(--gap-xl);
}

.section__head {
    max-width: 42rem;
    margin-bottom: var(--gap-lg);
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--gap-md);
    letter-spacing: -0.03em;
}

.hero__lead {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 40rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    margin-top: var(--gap-lg);
}

.hero__points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--gap-md);
    list-style: none;
    margin: var(--gap-xl) 0 0;
    padding: 0;
}

.hero__points a:hover { text-decoration: none; }

.hero__points strong {
    display: block;
    margin-bottom: var(--gap-xs);
}

/* --------------------------------------------------------------------------
   5. 卡片 / 格線
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    gap: var(--gap-md);
}

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.card {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--gap-lg);
    box-shadow: var(--shadow-sm);
}

.card--flush { padding: 0; }

.card p:last-child { margin-bottom: 0; }

.card__title {
    font-size: 1.0625rem;
    font-weight: 650;
    margin-bottom: var(--gap-xs);
    letter-spacing: -0.01em;
}

a.card {
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.card:hover {
    text-decoration: none;
    border-color: hsl(var(--ring) / 0.35);
    box-shadow: var(--shadow);
}

/* 方案卡 */
.plan {
    display: flex;
    flex-direction: column;
    position: relative;
}

.plan--featured {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 1px hsl(var(--ring) / 0.35), var(--shadow-sm);
}

.plan__badge {
    position: absolute;
    top: calc(var(--gap-md) * -0.7);
    left: var(--gap-lg);
}

.plan__price {
    display: flex;
    align-items: baseline;
    gap: var(--gap-xs);
    margin: var(--gap) 0 var(--gap-md);
}

.plan__amount {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.plan__cycle { color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }

.plan__price--unavailable .plan__amount {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
}

.plan__specs {
    list-style: none;
    margin: 0 0 var(--gap-md);
    padding: 0;
    font-size: 0.9375rem;
}

.plan__specs li {
    display: flex;
    justify-content: space-between;
    gap: var(--gap);
    padding: 0.3rem 0;
    border-bottom: 1px dashed hsl(var(--border));
}

.plan__specs li:last-child { border-bottom: 0; }
.plan__specs dt, .plan__specs .k { color: hsl(var(--muted-foreground)); }

.plan__features {
    list-style: none;
    margin: 0 0 var(--gap-md);
    padding: 0;
    font-size: 0.9375rem;
}

.plan__features li {
    position: relative;
    padding-left: 1.25rem;
    padding-block: 0.15rem;
}

.plan__features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: hsl(var(--success));
    font-weight: 700;
}

.plan__foot { margin-top: auto; }

/* --------------------------------------------------------------------------
   6. 按鈕（實心近黑／深色近白、outline、focus-visible ring 2px）
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xs);
    height: 2.25rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover { background: hsl(var(--primary) / 0.9); text-decoration: none; }
.btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn--outline {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    border-color: hsl(var(--input));
}

.btn--outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

.btn--ghost {
    background: transparent;
    color: hsl(var(--muted-foreground));
    box-shadow: none;
}

.btn--ghost:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn--block { width: 100%; }
.btn--lg {
    height: 2.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   7. 標籤 / 提示
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-xs);
    padding: 0.125rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.25rem;
}

.badge--primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.badge--success { background: hsl(var(--success)); color: hsl(var(--success-foreground)); border-color: transparent; }
.badge--warning { background: hsl(var(--warning)); color: hsl(var(--warning-foreground)); border-color: transparent; }
.badge--danger  { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); border-color: transparent; }

.alert {
    display: flex;
    gap: var(--gap);
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.alert--danger {
    border-color: hsl(var(--destructive) / 0.45);
    background: hsl(var(--destructive) / 0.08);
}

.alert--warning {
    border-color: hsl(var(--warning) / 0.45);
    background: hsl(var(--warning) / 0.1);
}

.alert--success {
    border-color: hsl(var(--success) / 0.45);
    background: hsl(var(--success) / 0.08);
}

/* --------------------------------------------------------------------------
   8. 表單
   -------------------------------------------------------------------------- */
.field { margin-bottom: var(--gap-md); }

.field__label {
    display: block;
    margin-bottom: var(--gap-xs);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
}

.field__hint {
    margin-top: var(--gap-xs);
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}

.field__error {
    margin-top: var(--gap-xs);
    font-size: 0.8125rem;
    color: hsl(var(--destructive));
}

.input,
.textarea {
    width: 100%;
    height: 2.25rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: hsl(var(--muted-foreground));
}

.input:focus,
.textarea:focus,
.input:focus-visible,
.textarea:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
    border-color: hsl(var(--ring));
}

.textarea {
    height: auto;
    min-height: 5rem;
    padding: 0.5rem 0.75rem;
    resize: vertical;
    line-height: 1.5;
}

.required { color: hsl(var(--destructive)); }

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-sm);
    font-size: 0.875rem;
    line-height: 1.4;
}

.checkbox input {
    appearance: none;
    width: 1rem;
    height: 1rem;
    margin: 0.15rem 0 0;
    flex: 0 0 auto;
    border: 1px solid hsl(var(--input));
    border-radius: 0.25rem;
    background: hsl(var(--background));
    box-shadow: var(--shadow-sm);
}

.checkbox input:checked {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.2 6.6 11 12 5'/></svg>");
    background-size: 100% 100%;
}

@media (prefers-color-scheme: dark) {
    .checkbox input:checked {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.2 6.6 11 12 5'/></svg>");
    }

    html:not([data-theme]) .checkbox input:checked {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.2 6.6 11 12 5'/></svg>");
    }
}

html[data-theme="dark"] .checkbox input:checked {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.2 6.6 11 12 5'/></svg>");
}

html[data-theme="light"] .checkbox input:checked {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.2 6.6 11 12 5'/></svg>");
}

.checkbox input:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* 蜜罐欄位：對人類完全不可見，但不用 display:none（部分機器人會忽略） */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-grid {
    display: grid;
    gap: 0 var(--gap-md);
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* --------------------------------------------------------------------------
   9. 資料呈現
   -------------------------------------------------------------------------- */
.kv {
    display: grid;
    grid-template-columns: minmax(6rem, auto) 1fr;
    gap: var(--gap-sm) var(--gap-md);
    font-size: 0.875rem;
}

.kv dt { color: hsl(var(--muted-foreground)); }
.kv dd { margin: 0; }

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--gap-sm);
    font-size: 0.875rem;
}

.steps li {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-sm);
}

.steps__dot {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    border-radius: 999px;
    border: 1px solid hsl(var(--border));
    display: inline-grid;
    place-items: center;
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--background));
}

.steps li[data-state="done"] .steps__dot {
    background: hsl(var(--success));
    color: hsl(var(--success-foreground));
    border-color: transparent;
}

.steps li[data-state="active"] .steps__dot {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: transparent;
}

.tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    margin-bottom: var(--gap-lg);
    background: hsl(var(--muted));
    border-radius: var(--radius);
}

.tab {
    padding: 0.375rem 0.75rem;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: hsl(var(--muted-foreground));
    background: transparent;
}

.tab:hover {
    text-decoration: none;
    color: hsl(var(--foreground));
}

.tab:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.tab[aria-current="page"] {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.empty {
    padding: var(--gap-xl);
    text-align: center;
    color: hsl(var(--muted-foreground));
    border: 1px dashed hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
}

.howto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--gap-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.howto__n {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: var(--gap-sm);
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.8125rem;
    font-weight: 700;
}

.howto h3 { margin-bottom: var(--gap-xs); }
.howto p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }

.legal {
    max-width: 48rem;
    margin-inline: auto;
}

.legal.card {
    padding: var(--gap-xl);
}

.legal .section__head {
    max-width: none;
    margin-bottom: var(--gap-lg);
}

.legal h2 {
    margin-top: var(--gap-lg);
    padding-top: var(--gap-md);
    border-top: 1px solid hsl(var(--border));
    font-size: 1.125rem;
}

.legal h2:first-of-type {
    margin-top: 0;
}

.legal ul {
    margin: 0 0 var(--gap-md);
    padding-left: 1.25rem;
}

.legal li + li { margin-top: 0.35rem; }

.legal a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkbox a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 40rem) {
    .site-header__inner {
        min-height: 3.5rem;
        padding-block: var(--gap-sm);
    }

    .site-nav {
        flex-basis: 100%;
        margin-left: 0;
        gap: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .legal.card {
        padding: var(--gap-lg);
    }
}

/* --------------------------------------------------------------------------
   10. 主題切換與會員中心（追加，不改既有區塊）
   -------------------------------------------------------------------------- */
.site-header__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.site-header__actions form {
    display: inline;
    margin: 0;
}

.auth-card {
    max-width: 28rem;
    margin-inline: auto;
}

.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--gap-lg);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid hsl(var(--border));
    vertical-align: top;
}

.data-table th {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

@media (max-width: 40rem) {
    .site-header__actions {
        margin-left: auto;
    }
}

/* --------------------------------------------------------------------------
   11. 會員訂單與管理後台入口（追加，不改既有 token）
   -------------------------------------------------------------------------- */
.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.data-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.account-panel__lead {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap);
}

.account-panel__lead > p {
    margin-bottom: 0;
}

.enter-panel-form {
    display: inline;
    margin: 0;
}

.enter-panel-form--inline {
    display: inline;
}

.enter-panel-form__link {
    display: inline;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.enter-panel-form__link:hover {
    background: none;
    color: hsl(var(--foreground));
}

/* --------------------------------------------------------------------------
   12. 會員訂單分頁（追加，不改既有 token）
   -------------------------------------------------------------------------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    align-items: center;
    margin-top: var(--gap-md);
}

.pager__disabled {
    color: hsl(var(--muted-foreground));
}
