:root {
    --surface: #faf9f6;
    --surface-low: #f5f3f0;
    --surface-card: #ffffff;
    --surface-line: #e3e2df;
    --text: #1b1c1a;
    --muted: #484833;
    --primary: #d6de21;
    --primary-dark: #5f6300;
    --secondary: #00658d;
    --secondary-soft: #c6e7ff;
    --radius: 24px;
    --shadow: 0 22px 45px rgba(0, 101, 141, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: "Hanken Grotesk", "Noto Sans TC", sans-serif;
    line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(20px, 5vw, 64px);
    background: rgba(250, 249, 246, .84);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(227, 226, 223, .8);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.brand-logo {
    display: block;
    width: auto;
    max-width: 150px;
    max-height: 46px;
    object-fit: contain;
    height: 50px;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--secondary-soft);
    color: var(--secondary);
    font-weight: 700;
}
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.site-nav a:not(.btn):hover { color: var(--secondary); }
.nav-dropdown { position: relative; display: inline-flex; align-items: center; gap: 3px; }
.nav-dropdown-toggle { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; line-height: 1; }
.nav-submenu { position: absolute; top: calc(100% + 14px); left: -14px; z-index: 25; display: none; min-width: 180px; padding: 9px; border: 1px solid var(--surface-line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.nav-submenu::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: 14px; }
.nav-submenu a { display: block; padding: 8px 10px; border-radius: 9px; white-space: nowrap; }
.nav-submenu a:hover, .nav-submenu a:focus-visible { background: var(--surface-low); }
.nav-dropdown:hover .nav-submenu, .nav-dropdown:focus-within .nav-submenu, .nav-dropdown.open .nav-submenu { display: block; }
.locale { color: var(--primary-dark); }
.nav-toggle { display: none; }

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    background: var(--primary);
    color: #1c1d00;
    font-weight: 700;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-small { padding: 9px 16px; font-size: 13px; }
.btn-ghost { background: rgba(0, 101, 141, .08); color: var(--secondary); }

.hero, .page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: clamp(32px, 6vw, 72px);
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(64px, 10vw, 120px) clamp(20px, 5vw, 72px);
}
.page-hero { display:none; grid-template-columns: minmax(0, 760px); padding-bottom: 48px; }
.hero h1, .page-hero h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: 0;
}
.hero p, .page-hero p { max-width: 660px; color: var(--muted); font-size: 18px; }
.eyebrow {
    margin: 0 0 12px;
    color: var(--secondary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-visual {
    min-height: 430px;
    border-radius: 48px;
    background:
        radial-gradient(circle at 20% 18%, rgba(214, 222, 33, .55), transparent 26%),
        radial-gradient(circle at 80% 22%, rgba(48, 188, 254, .45), transparent 24%),
        linear-gradient(135deg, #fff, #e9f8ff 45%, #f6f8d1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.hero-visual::after {
    content: "";
    position: absolute;
    inset: 13%;
    border: 1px solid rgba(0, 101, 141, .18);
    border-radius: 36px;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.6) 0 8px, transparent 8px 28px);
}
.hero-visual.small { min-height: 280px; }
.hero-image {
    width: 100%;
    min-height: 360px;
    max-height: 520px;
    object-fit: cover;
    border-radius: 36px;
    box-shadow: var(--shadow);
}
.lab-card {
    position: absolute;
    left: 28px;
    bottom: 28px;
    z-index: 2;
    width: min(320px, calc(100% - 56px));
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.76);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}
.lab-card strong { display: block; font-size: 46px; line-height: 1; color: var(--secondary); }

.section, .content-section, .form-shell, .cta-band {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
    padding: 72px clamp(20px, 5vw, 72px);
}
.home-page > .hero,
.home-page > .section,
.home-page > .cta-band {
    max-width: none;
}
.home-page > .cta-band {
    max-width: 90%;
}
.section.compact { padding-top: 24px; }
.muted { background: var(--surface-low); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head h2, .cta-band h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; margin: 0; }
.cards { display: grid; gap: 24px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.cols-1 { grid-template-columns: 1fr; }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
    padding: 28px;
    border: 1px solid var(--surface-line);
    border-radius: var(--radius);
    background: var(--surface-card);
    transition: .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; font-size: 24px; line-height: 1.2; }
.placeholder-img {
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(198,231,255,.9), rgba(255,255,255,.5)),
        repeating-linear-gradient(45deg, rgba(95,99,0,.08) 0 10px, transparent 10px 22px);
}
.product-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
    border-radius: 18px;
    object-fit: cover;
}
.product-card-media { display: block; overflow: hidden; border-radius: 18px; }
.product-card-media:hover .product-card-image { transform: scale(1.02); }
.product-card-media .product-card-image { transition: transform .2s ease; }
.product-rich-text { color: var(--text); line-height: 1.75; }
.product-rich-text > :first-child { margin-top: 0; }
.product-rich-text > :last-child { margin-bottom: 0; }
.product-rich-text ul, .product-rich-text ol { padding-left: 1.4em; }
.product-rich-text a { color: var(--secondary); font-weight: 700; }
.product-card-summary {
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 15px;
}
.product-detail-image {
    display: block;
    width: min(720px, 100%);
    height: min(440px, 54vw);
    min-height: 280px;
    margin: 0 auto;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow);
}
.post-section { background: #f7f6f2; }
.post-mosaic {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(0, .82fr) minmax(0, .82fr);
    grid-template-rows: repeat(2, minmax(178px, 1fr));
    gap: 16px;
    max-width:auto;
}
.post-mosaic-card { min-width: 0; overflow: hidden; border-radius: 16px; background: #fff; }
.post-mosaic-card:first-child { grid-row: span 2; }
.post-mosaic-card:nth-child(2) { grid-column: span 2; background: #9ed9fa; }
.post-mosaic-card:nth-child(3) { background: #fff; }
.post-mosaic-card:nth-child(4) { background: #d9e609; }
.post-mosaic-link {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    min-height: 178px;
    padding: 22px;
    color: #20211f;
}
.post-mosaic-copy { position: relative; z-index: 1; max-width: 94%; }
.post-mosaic-date { margin: 0 0 7px; color: #087197; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.post-mosaic-card h3 { margin: 0; font-size: clamp(18px, 2vw, 25px); line-height: 1.15; }
.post-mosaic-card p:not(.post-mosaic-date) { margin: 9px 0 0; color: rgba(32,33,31,.72); font-size: 12px; line-height: 1.5; }
.post-mosaic-card:first-child img {
    width: 100%;
    height: 60%;
    margin-top: 18px;
    border-radius: 12px;
    object-fit: cover;
}
.post-mosaic-card:not(:first-child) img { display: none; }
.post-mosaic-mark {
    align-self: flex-end;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-top: 16px;
    border: 1px solid rgba(32,33,31,.16);
    border-radius: 50%;
    font-size: 18px;
}
.post-mosaic-card:nth-child(2) .post-mosaic-mark { background: rgba(255,255,255,.45); }
.post-mosaic-card:nth-child(4) .post-mosaic-mark { border-color: rgba(32,33,31,.25); }
.insight-river {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--surface-line);
}
.insight-row {
    display: grid;
    grid-template-columns: minmax(220px, .44fr) minmax(0, 1fr) 48px;
    gap: clamp(20px, 4vw, 48px);
    align-items: center;
    min-height: 250px;
    padding: clamp(24px, 4vw, 42px) 0;
    border-bottom: 1px solid var(--surface-line);
}
.insight-row:nth-child(even) { grid-template-columns: 48px minmax(0, 1fr) minmax(220px, .44fr); }
.insight-row-media {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 210px;
    border-radius: 0 42px 42px 0;
    background:
        linear-gradient(135deg, rgba(0,101,141,.12), rgba(214,222,33,.26)),
        repeating-linear-gradient(90deg, rgba(27,28,26,.08) 0 1px, transparent 1px 16px);
}
.insight-row:nth-child(even) .insight-row-media {
    grid-column: 3;
    border-radius: 42px 0 0 42px;
}
.insight-row-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    filter: saturate(.88) contrast(1.04);
    transition: transform .35s ease, filter .35s ease;
}
.insight-row-media span {
    display: grid;
    min-height: 210px;
    place-items: center;
    color: rgba(0,101,141,.34);
    font-size: clamp(64px, 9vw, 112px);
    font-weight: 700;
    line-height: 1;
}
.insight-row:hover .insight-row-media img {
    transform: scale(1.035);
    filter: saturate(1) contrast(1.06);
}
.insight-row-copy { min-width: 0; }
.insight-row:nth-child(even) .insight-row-copy { grid-column: 2; grid-row: 1; }
.insight-row-copy h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(26px, 3.2vw, 46px);
    line-height: 1.08;
}
.insight-row-copy h2 a:hover { color: var(--secondary); }
.insight-row-copy > p:not(.eyebrow) {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 16px;
}
.insight-row-arrow {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--surface-line);
    border-radius: 50%;
    color: var(--secondary);
    font-size: 20px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.insight-row:nth-child(even) .insight-row-arrow { grid-column: 1; grid-row: 1; }
.insight-row:hover .insight-row-arrow {
    transform: translate(3px, -3px);
    background: var(--secondary);
    color: #fff;
}
.insight-hero-media {
    overflow: hidden;
    width: calc(100% - 40px);
    max-width: 900px;
    height: clamp(280px, 48vw, 560px);
    margin: 0 auto 18px;
    border-radius: 25px;
    background: var(--surface-low);
}
.insight-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chips span {
    border-radius: 999px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--surface-line);
    color: var(--muted);
}
.product-browser {
    display: grid;
    grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 40px);
    align-items: start;
}
.product-category-sidebar { position: sticky; top: 104px; }
.product-category-sidebar .eyebrow { margin-bottom: 16px; }
.product-category-nav { display: grid; border-top: 1px solid var(--surface-line); }
.product-category-nav a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 4px;
    border-bottom: 1px solid var(--surface-line);
    color: var(--muted);
    font-weight: 700;
}
.product-category-nav a::after { content: "→"; color: transparent; transition: color .16s ease, transform .16s ease; }
.product-category-nav a:hover, .product-category-nav a.active { color: var(--secondary); }
.product-category-nav a:hover::after, .product-category-nav a.active::after { color: var(--secondary); transform: translateX(3px); }
.product-results-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: end; margin-bottom: 24px; }
.product-results-head p { grid-column: 1 / -1; margin: 0; color: var(--secondary); font-size: 12px; font-weight: 700; }
.product-results-head h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.product-results-head span { color: var(--muted); font-size: 13px; }
.product-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-empty { padding: 42px 0; border-top: 1px solid var(--surface-line); color: var(--muted); }
.product-detail-browser { align-items: stretch; }
.product-detail-content { min-width: 0; }
.product-detail-media { display: grid; min-height: 340px; place-items: center; padding: clamp(18px, 3vw, 42px); background: #f3f7f7; border-radius: 28px; }
.product-detail-media .hero-visual { width: min(720px, 100%); min-height: 320px; border-radius: 24px; }
.product-detail-intro { max-width: 760px; margin: 42px auto 0; text-align: center; }
.product-detail-intro h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); line-height: 1.08; }
.product-detail-intro > p:not(.eyebrow) { max-width: 650px; margin: 16px auto 24px; color: var(--muted); font-size: 17px; }
.product-detail-intro .product-summary { max-width: 650px; margin: 16px auto 24px; color: var(--muted); font-size: 17px; }
.product-detail-body { max-width: 760px; margin: 48px auto 0; font-size: 17px; }
.product-detail-body h2 { margin: 38px 0 12px; color: var(--secondary); font-size: 24px; }
.content-section {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 18px;
}
.content-section h2 { margin-top: 36px; color: var(--secondary); }
.cta-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 48px;
    margin-bottom: 72px;
    min-height: 250px;
    padding: 54px 28px;
    border-radius: 28px;
    background: #066f96;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    align-items: center;
    text-align: center;
}
.cta-band::before,
.cta-band::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 210px;
    height: 210px;
    border: 3px solid rgba(255,255,255,.15);
    border-radius: 50%;
}
.cta-band::before { top: -132px; right: -88px; }
.cta-band::after { bottom: -152px; left: -86px; }
.cta-copy { max-width: 700px; }
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 46px); }
.cta-band p,
.cta-band .cta-copy > div { max-width: 620px; margin: 11px auto 0; color: rgba(255,255,255,.84); font-size: 15px; }
.cta-band .btn { background: #fff; color: #056b90; box-shadow: none; }
.cta-band .btn:hover { background: #e9f7fc; box-shadow: none; }


.form-shell {
    display: grid;
    grid-template-columns: 340px minmax(0, 720px);
    gap: 28px;
    align-items: start;
}
.form-shell > .alert { grid-column: 1 / -1; margin: 0; }
form label { display: grid; gap: 7px; margin-bottom: 16px; font-weight: 700; color: var(--muted); }
input, textarea, select {
    width: 100%;
    border: 1px solid #c9c8ad;
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(0, 101, 141, .25); border-color: var(--secondary); }
.quote-panel, .admin-panel {
    padding: 24px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--surface-line);
}
.quote-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--surface-line); }
.quote-item button { border: 0; background: transparent; color: #ba1a1a; cursor: pointer; }
.contact-company-info { display: grid; gap: 8px; padding-top: 8px; }
.contact-company-info h3, .contact-company-info p { margin: 0; }
.contact-company-info p { color: var(--muted); line-height: 1.7; }
.contact-company-info a { color: inherit; }
.alert { padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; }
.alert.success { background: rgba(214, 222, 33, .3); color: var(--primary-dark); }
.alert.error { background: #ffdad6; color: #93000a; }
.form-error { color: #93000a; font-size: 13px; font-weight: 500; }
.contact-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 28px;
    border: 1px solid var(--surface-line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    box-shadow: 0 24px 70px rgba(0, 47, 65, .2);
}
.contact-dialog::backdrop { background: rgba(0, 31, 42, .55); }
.contact-dialog h2 { margin: 0 0 10px; }
.contact-dialog p { margin: 0 0 22px; line-height: 1.6; }

.site-footer {
    display: grid;
    gap: 28px;
    padding: 36px clamp(20px, 5vw, 72px);
    background: #fff;
    color: var(--text);
    border-top: 1px solid rgba(0, 101, 141, .12);
}
.footer-main { display: flex; justify-content: space-between; gap: 24px; }
.footer-company, .footer-contact { min-width: 0; }
.footer-company p, .footer-contact p, .footer-copyright { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.footer-contact { text-align: right; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid var(--surface-line); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 20px; }
.footer-links a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; transition: color .2s ease; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--secondary); }
.footer-linkedin { display: inline-flex; align-items: center; gap: 6px; }
.footer-linkedin span { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 3px; background: #0a66c2; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 4px 0 0; }
.cookie-actions { display: flex; gap: 10px; }

.admin-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: #f3f5f1;
}
.admin-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background: #30312f;
    color: #f2f1ed;
    padding: 22px;
    align-self: start;
}
.admin-brand { margin-bottom: 24px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { padding: 10px 12px; border-radius: 12px; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); }
.admin-menu-toggle { display: none; }
.admin-main { padding: 28px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.admin-top-actions { display: flex; align-items: center; gap: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--surface-line); }
.stat-card strong { display: block; font-size: 42px; color: var(--secondary); }
.admin-actions { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--surface-line); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--surface-line); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 13px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.action-btn,
.table-actions button,
.inline-form button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 101, 141, .16);
    border-radius: 999px;
    background: rgba(0, 101, 141, .07);
    color: var(--secondary);
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.table-actions button.danger { border-color: rgba(186, 26, 26, .18); background: #ffefed; color: #ba1a1a; }
.drag-handle { color: var(--secondary); font-weight: 700; cursor: grab; white-space: nowrap; }
.drag-handle::before { content: "⋮⋮"; margin-right: 7px; color: #aaa4c6; letter-spacing: -2px; }
tr.dragging { opacity: .55; }
.sort-status { align-self: center; color: #7c8091; font-size: 12px; }
.hidden-delete-form { display: none; }
.admin-form {
    max-width: 920px;
    padding: 24px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--surface-line);
}
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.file-current { color: var(--secondary); font-weight: 700; font-size: 14px; }
.media-picker-button { align-self: flex-start; }
.language-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    margin-bottom: 18px;
    border: 1px solid var(--surface-line);
    border-radius: 999px;
    background: var(--surface-low);
}
.language-tabs button,
.editor-toolbar button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}
.language-tabs button.active { background: #fff; color: var(--secondary); box-shadow: 0 8px 20px rgba(0, 101, 141, .08); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--surface-line);
    border-radius: 14px;
    color: var(--text);
    font-weight: 600;
}
.check-item input { width: auto; }
.wysiwyg {
    overflow: hidden;
    border: 1px solid #c9c8ad;
    border-radius: 16px;
    background: #fff;
}
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--surface-line); background: var(--surface-low); }
.editor-toolbar button { background: #fff; border-radius: 10px; padding: 6px 10px; }
.editor-area { min-height: 180px; padding: 14px; outline: none; font-weight: 400; color: var(--text); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
    width: min(460px, 100%);
    padding: 34px;
    border-radius: 32px;
    background: #fff;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
}

@media (max-width: 900px) {
    .nav-toggle { display: grid; place-content: center; gap: 4px; width: 44px; height: 44px; flex: none; border: 0; background: var(--secondary-soft); border-radius: 999px; padding: 0; cursor: pointer; }
    .nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--secondary); }
    .site-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        padding: 18px;
        border-radius: 20px;
        background: #fff;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav.open { display: flex; }
    .nav-dropdown { display: grid; width: 100%; grid-template-columns: 1fr auto; gap: 0; }
    .nav-dropdown > a { align-self: center; }
    .nav-dropdown-toggle { width: 36px; height: 36px; }
    .nav-submenu { position: static; grid-column: 1 / -1; min-width: 0; margin-top: 4px; padding: 5px; box-shadow: none; }
    .nav-submenu::before { display: none; }
    .nav-dropdown:hover .nav-submenu, .nav-dropdown:focus-within .nav-submenu { display: none; }
    .nav-dropdown.open .nav-submenu { display: block; }
    .hero, .page-hero, .form-shell, .product-browser { grid-template-columns: 1fr; }
    .product-category-sidebar { position: static; }
    .product-category-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--surface-line); }
    .product-category-nav a { padding: 10px 12px; border-right: 1px solid var(--surface-line); }
    .product-list-grid { grid-template-columns: 1fr; }
    .hero-visual { min-height: 300px; }
    .cards.three, .cards.cols-2, .cards.cols-3, .cards.cols-4, .stats-grid { grid-template-columns: 1fr; }
    .post-mosaic { grid-template-columns: 1fr; grid-template-rows: none; }
    .post-mosaic-card:first-child, .post-mosaic-card:nth-child(2) { grid-column: auto; grid-row: auto; }
    .post-mosaic-link { min-height: 200px; }
    .post-mosaic-card:first-child img { height: 160px; }
    .insight-row,
    .insight-row:nth-child(even) {
        grid-template-columns: 1fr 44px;
        gap: 18px;
        min-height: 0;
        padding: 28px 0;
    }
    .insight-row-media,
    .insight-row:nth-child(even) .insight-row-media {
        grid-column: 1 / -1;
        min-height: 190px;
        border-radius: 24px;
    }
    .insight-row-media img,
    .insight-row-media span { min-height: 190px; }
    .insight-row-copy,
    .insight-row:nth-child(even) .insight-row-copy {
        grid-column: 1;
        grid-row: auto;
    }
    .insight-row-arrow,
    .insight-row:nth-child(even) .insight-row-arrow {
        grid-column: 2;
        grid-row: 2;
        width: 44px;
        height: 44px;
    }
    .insight-hero-media {
        width: calc(100% - 40px);
        height: clamp(230px, 62vw, 380px);
        border-radius: 28px 28px 8px 8px;
    }
    .cta-band, .cookie-banner { flex-direction: column; align-items: flex-start; }
    .footer-main, .footer-bottom { flex-direction: column; align-items: flex-start; }
    .footer-contact { text-align: left; }
    .footer-links { justify-content: flex-start; }
    .cta-band { align-items: center; text-align: center; }
    .admin-body { display: block; padding-top: 58px; }
    .admin-menu-toggle {
        position: fixed;
        top: 10px;
        left: 12px;
        z-index: 60;
        display: inline-flex;
        border: 0;
        border-radius: 999px;
        padding: 10px 14px;
        background: var(--primary);
        color: #1c1d00;
        font-weight: 700;
    }
    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(300px, 86vw);
        transform: translateX(-102%);
        transition: transform .2s ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, .22);
    }
    .admin-menu-open .admin-sidebar { transform: translateX(0); }
    .admin-top { align-items: flex-start; flex-direction: column; }
    .check-grid { grid-template-columns: 1fr; }
}

/* Admin refresh */
.admin-body {
    --admin-ink: #202334;
    --admin-muted: #8c90a1;
    --admin-line: #ececf4;
    --admin-lilac: #f2edff;
    --admin-violet: #7048e8;
    --admin-blue: #e6f5ff;
    --admin-peach: #fff0ea;
    grid-template-columns: 248px minmax(0, 1fr);
    background: #fbfbfd;
    color: var(--admin-ink);
    font-family: "Hanken Grotesk", "Noto Sans TC", sans-serif;
}
.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 16px 18px;
    background: #fff;
    color: var(--admin-ink);
    border-right: 1px solid var(--admin-line);
    box-shadow: none;
}
.admin-brand { padding: 0 12px; margin: 0 0 28px; color: #3f247c; font-size: 19px; }
.admin-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--admin-lilac); color: var(--admin-violet); font-size: 12px; }
.admin-brand .brand-logo { max-height: 50px; max-width: 138px; }
.admin-nav { display: grid; gap: 3px; }
.admin-nav-label { margin: 18px 12px 7px; color: #afb2c0; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.admin-nav-label:first-child { margin-top: 0; }
.admin-sidebar a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #5f6373; font-size: 13px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.admin-sidebar nav a:hover { background: #f7f5ff; color: var(--admin-violet); }
.admin-sidebar nav a.active { background: var(--admin-lilac); color: #5636c9; }
.nav-icon { width: 18px; color: #b2b4c2; font-size: 9px; font-weight: 700; letter-spacing: -.02em; }
.admin-sidebar nav a.active .nav-icon { color: var(--admin-violet); }
.admin-sidebar-bottom { display: grid; gap: 3px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--admin-line); }
.admin-sidebar-bottom a:last-child { color: #bd5364; }
.admin-main { max-width: 1580px; width: 100%; margin: 0 auto; padding: 0 38px 42px; }
.admin-top { min-height: 76px; margin: 0 -38px 28px; padding: 0 38px; border-bottom: 1px solid var(--admin-line); background: rgba(255,255,255,.92); }
.admin-search { width: min(380px, 42vw); }
.admin-search input { height: 34px; padding: 8px 14px; border: 1px solid #ededf3; border-radius: 7px; background: #fafafd; color: var(--admin-ink); font-size: 12px; }
.admin-search input:focus { outline: 2px solid rgba(112,72,232,.14); border-color: #c9bbfb; }
.admin-search input::placeholder { color: #afb2c0; }
.admin-top-actions { gap: 12px; color: var(--admin-ink); }
.admin-view-site { padding: 7px 10px; border: 1px solid #e7e4f4; border-radius: 7px; color: #6444cc; font-size: 12px; font-weight: 700; }
.admin-view-site:hover { border-color: #cabbfa; background: #f8f5ff; }
.admin-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f4c9a9; color: #653621; font-size: 12px; font-weight: 800; }
.admin-user { display: grid; gap: 0; line-height: 1.15; }
.admin-user strong { font-size: 12px; }
.admin-user span { color: var(--admin-muted); font-size: 10px; }
.admin-page-heading { margin-bottom: 24px; }
.admin-page-heading p, .dashboard-kicker, .panel-title p { margin: 0 0 4px; color: #9c8ace; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.admin-page-heading h1 { margin: 0; color: var(--admin-ink); font-size: 26px; line-height: 1.2; letter-spacing: 0; }
.admin-body .alert { margin-bottom: 20px; border-radius: 8px; font-size: 13px; }
.dashboard-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; padding: 25px 26px; border: 1px solid #eeeafc; border-radius: 10px; background: linear-gradient(105deg, #fbfaff, #f7f4ff); }
.dashboard-welcome h2 { margin: 0; color: var(--admin-ink); font-size: 21px; letter-spacing: 0; }
.dashboard-welcome p:not(.dashboard-kicker) { max-width: 680px; margin: 7px 0 0; color: var(--admin-muted); font-size: 13px; }
.admin-body .btn { border-radius: 7px; padding: 10px 14px; background: var(--admin-violet); color: #fff; box-shadow: 0 8px 18px rgba(112,72,232,.16); font-size: 12px; }
.admin-body .btn:hover { box-shadow: 0 10px 22px rgba(112,72,232,.23); }
.admin-body .btn-ghost { background: #f4f1ff; color: #6041ca; box-shadow: none; }
.stats-grid { gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; overflow: hidden; min-height: 130px; padding: 20px; border: 0; border-radius: 10px; box-shadow: none; }
.stat-card::after { content: ""; position: absolute; right: -14px; bottom: -20px; width: 90px; height: 90px; border: 14px solid rgba(255,255,255,.45); border-radius: 50%; }
.stat-card span { display: block; color: #65697c; font-size: 12px; font-weight: 700; }
.stat-card strong { margin: 2px 0; color: var(--admin-ink); font-size: 32px; letter-spacing: 0; }
.stat-card small { position: relative; z-index: 1; color: #808497; font-size: 11px; }
.stat-lilac { background: var(--admin-lilac); }
.stat-blue { background: var(--admin-blue); }
.stat-peach { background: var(--admin-peach); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .7fr); gap: 18px; }
.admin-panel { padding: 20px; border: 1px solid var(--admin-line); border-radius: 10px; background: #fff; box-shadow: none; }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f5; }
.panel-title h2 { margin: 0; color: var(--admin-ink); font-size: 16px; letter-spacing: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
.quick-actions a { display: grid; grid-template-columns: 29px 1fr; column-gap: 10px; align-items: center; padding: 12px; border: 1px solid #f0eff7; border-radius: 8px; transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.quick-actions a:hover { border-color: #d8ccff; background: #fbfaff; transform: translateY(-1px); }
.quick-actions span { grid-row: span 2; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #f0ebff; color: var(--admin-violet); font-size: 18px; font-weight: 700; }
.quick-actions strong { color: #454858; font-size: 12px; }
.quick-actions small { color: #9a9dad; font-size: 10px; }
.status-dot { padding: 5px 8px; border-radius: 999px; background: #e9f9ef; color: #328652; font-size: 10px; font-weight: 700; }
.status-list { display: grid; gap: 0; padding-top: 8px; }
.status-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f3f2f7; color: #787c8c; font-size: 12px; }
.status-list div:last-child { border-bottom: 0; }
.status-list strong { color: #3f874e; font-size: 11px; }
.dashboard-note { margin-top: 18px; padding: 13px 17px; color: #85899a; font-size: 12px; }
.dashboard-note p { margin: 0; }
.admin-actions { display: flex; justify-content: flex-end; margin: -52px 0 22px; }
.table-wrap { border: 1px solid var(--admin-line); border-radius: 10px; box-shadow: none; }
.admin-table { min-width: 700px; }
.admin-table th, .admin-table td { padding: 13px 16px; border-bottom-color: #f0f0f5; color: #55596a; font-size: 12px; }
.admin-table th { background: #fafafd; color: #9699a8; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.admin-table tbody tr:hover { background: #fcfbff; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-body .action-btn, .admin-body .table-actions button, .admin-body .inline-form button { border-color: #e4ddfa; border-radius: 6px; background: #f8f6ff; color: #6444cc; padding: 6px 9px; font-size: 11px; }
.admin-body .table-actions button.danger { border-color: #fde0e3; background: #fff6f6; color: #c25d68; }
.admin-form { max-width: 980px; padding: 24px; border: 1px solid var(--admin-line); border-radius: 10px; box-shadow: none; }
.admin-body form label { margin-bottom: 17px; color: #606476; font-size: 12px; font-weight: 700; }
.admin-body input, .admin-body textarea, .admin-body select { border-color: #e5e5ee; border-radius: 7px; padding: 10px 12px; color: var(--admin-ink); font-size: 13px; }
.admin-body input:focus, .admin-body textarea:focus, .admin-body select:focus { outline: 2px solid rgba(112,72,232,.12); border-color: #bba8f4; }
.admin-body .language-tabs { border-radius: 8px; background: #f7f6fb; }
.admin-body .language-tabs button.active { border-radius: 6px; color: #6444cc; box-shadow: 0 3px 9px rgba(74,50,157,.08); }
.admin-form [data-lang-panel][hidden] { display: none !important; }
.admin-body .wysiwyg { border-color: #e5e5ee; border-radius: 7px; }
.admin-body .editor-toolbar { background: #fafafd; }
.admin-body .check-item { border-color: #ebeaf1; border-radius: 7px; }
.admin-body .file-current { color: #6444cc; }
.media-toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.media-filter, .media-upload { display: flex; align-items: center; gap: 8px; }
.media-filter input { width: 220px; }
.media-filter select { width: 116px; }
.media-upload input[type="file"] { width: 250px; padding: 7px; font-size: 11px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.media-card { overflow: hidden; min-width: 0; border: 1px solid var(--admin-line); border-radius: 10px; background: #fff; text-align: left; }
.media-preview { display: grid; place-items: center; height: 148px; overflow: hidden; background: #f8f8fb; color: #7757d8; }
.media-preview img { width: 100%; height: 100%; object-fit: cover; }
.media-preview > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #eee8ff; font-size: 12px; font-weight: 800; }
.media-card-body { display: grid; gap: 4px; padding: 12px; }
.media-card-body strong { overflow: hidden; color: #4c5061; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.media-card-body small { color: #999cab; font-size: 10px; }
.media-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.media-card-actions form { margin: 0; }
.media-card-actions .action-btn, .media-card-actions button { border: 1px solid #e4ddfa; border-radius: 6px; background: #f8f6ff; color: #6444cc; padding: 6px 8px; font-size: 10px; font-weight: 700; cursor: pointer; }
.media-card-actions button.danger { border-color: #fde0e3; background: #fff6f6; color: #c25d68; }
.media-empty { display: grid; gap: 5px; min-height: 200px; place-content: center; border: 1px dashed #ddd9ec; border-radius: 10px; color: #989baa; text-align: center; }
.media-empty strong { color: #5d6172; font-size: 14px; }
.media-empty span { font-size: 12px; }
.media-picker-body { min-width: 720px; background: #f9f9fc; }
.media-picker { padding: 24px; }
.media-picker header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.media-picker header p { margin: 0 0 4px; color: #9c8ace; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.media-picker header h1 { margin: 0; color: #2d3040; font-size: 22px; letter-spacing: 0; }
.media-picker header button { border: 0; border-radius: 7px; padding: 8px 12px; background: #eceaf4; color: #656979; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.picker-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
.picker-item { display: block; width: 100%; padding: 0; font: inherit; cursor: pointer; transition: border-color .16s ease, transform .16s ease; }
.picker-item:hover { border-color: #baabf3; transform: translateY(-2px); }
.picker-item .media-preview { height: 118px; }

@media (max-width: 720px) {
    .media-toolbar, .media-filter, .media-upload { align-items: stretch; flex-direction: column; }
    .media-filter input, .media-filter select, .media-upload input[type="file"] { width: 100%; }
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .media-preview { height: 110px; }
}

@media (max-width: 900px) {
    .admin-body { padding-top: 58px; }
    .admin-main { padding: 0 18px 28px; }
    .admin-top { min-height: 58px; margin: -58px -18px 24px; padding: 0 18px 0 62px; flex-direction: row; }
    .admin-search { width: 100%; }
    .admin-user, .admin-view-site { display: none; }
    .admin-menu-toggle { display: grid; place-content: center; gap: 4px; width: 38px; height: 38px; padding: 0; background: var(--admin-violet); }
    .admin-menu-toggle span { display: block; width: 16px; height: 2px; border-radius: 2px; background: #fff; }
    .admin-sidebar { z-index: 70; width: min(284px, 84vw); padding-top: 26px; }
    .admin-menu-backdrop { position: fixed; inset: 0; z-index: 65; display: none; background: rgba(25,25,40,.22); }
    .admin-menu-open .admin-menu-backdrop { display: block; }
    .admin-page-heading h1 { font-size: 23px; }
    .dashboard-welcome { align-items: flex-start; flex-direction: column; padding: 20px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .admin-actions { justify-content: flex-start; margin: 0 0 16px; }
}

/* Keep the admin shell stable across browser zoom levels. */
.admin-body { display: block; min-height: 100vh; padding: 0; }
.admin-menu-backdrop { display: none; }
.admin-menu-toggle { display: none; }
.admin-top { flex-direction: row; align-items: center; }
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 248px;
    min-height: 100vh;
    transform: none;
    transition: none;
}
.admin-main {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0 0 0 248px;
}

@media (max-width: 720px) {
    .admin-body { padding-top: 58px; }
    .admin-main { margin-left: 0; padding: 0 18px 28px; }
    .admin-top { min-height: 58px; margin: -58px -18px 24px; padding: 0 18px 0 62px; }
    .admin-menu-toggle { display: grid; }
    .admin-sidebar {
        z-index: 70;
        width: min(284px, 84vw);
        transform: translateX(-102%);
        transition: transform .2s ease;
    }
    .admin-menu-open .admin-sidebar { transform: translateX(0); }
    .admin-menu-backdrop { position: fixed; inset: 0; z-index: 65; display: none; background: rgba(25,25,40,.22); }
    .admin-menu-open .admin-menu-backdrop { display: block; }
    .admin-user, .admin-view-site { display: none; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
}
