/* =========================================================
 * JOKER LSR 一頁式網站樣式（移植自設計稿 JOKER LSR 網站 UI）
 * 版面概念：精密製造商一頁式。淺冷灰底、海軍藍文字，JOKER 紅只用於行動按鈕與 Logo，
 * 深色照片區塊作為視覺重心；區塊以細線分隔，只有需要獨立的物件才用卡片。
 * 色彩以 CSS 變數定義，並支援系統深色模式（prefers-color-scheme）。
 * ======================================================= */

/* ---------- 重設主題 Tailwind base（* 的顏色/字型、p/a/h 的字級）----------
 * 主題 global.css 對 * 設定顏色與字型，會讓繼承失效；這裡在 .jk 範圍內改回繼承。
 * :where() 讓特異度維持最低，下方設計稿樣式可以正常覆蓋。 */
:where(body.jk) *{color:inherit;font-family:inherit;backface-visibility:visible}
:where(body.jk) p,:where(body.jk) li,:where(body.jk) a,:where(body.jk) button,:where(body.jk) small,:where(body.jk) span,:where(body.jk) label{font-size:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit}
:where(body.jk) h1,:where(body.jk) h2,:where(body.jk) h3,:where(body.jk) h4,:where(body.jk) h5,:where(body.jk) h6{font-size:inherit;font-weight:700;line-height:inherit}
:where(body.jk) a{display:inline}
:where(body.jk) b,:where(body.jk) strong{font-weight:700}
:where(body.jk) ul,:where(body.jk) ol{list-style:revert}

:root{
  --bg:#F2F5F9; --surface:#FFFFFF; --surface2:#E8EEF5; --ink:#0F1B2D; --muted:#51627A; --line:#D2DAE5;
  --brand:#C8191F; --brand-ink:#FFFFFF; --navy:#1B3B6F; --photo:#0D1117;
  --tbc-bg:#FFEFC2; --tbc-ink:#6A4700; --focus:#1B5FD6;
  --f-display:'Barlow Semi Condensed','Noto Sans TC',system-ui,sans-serif;
  --f-body:'IBM Plex Sans','Noto Sans TC',system-ui,sans-serif;
  --f-mono:'IBM Plex Mono','Noto Sans TC',ui-monospace,monospace;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0B111A; --surface:#131B27; --surface2:#1A2434; --ink:#E7EDF6; --muted:#97A7BC; --line:#28354A;
    --brand:#E5484D; --brand-ink:#FFFFFF; --navy:#9DB9EE; --photo:#06090D;
    --tbc-bg:#4A3A10; --tbc-ink:#FFD98A; --focus:#7FB0FF; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0B111A; --surface:#131B27; --surface2:#1A2434; --ink:#E7EDF6; --muted:#97A7BC; --line:#28354A;
  --brand:#E5484D; --brand-ink:#FFFFFF; --navy:#9DB9EE; --photo:#06090D;
  --tbc-bg:#4A3A10; --tbc-ink:#FFD98A; --focus:#7FB0FF; color-scheme:dark;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:128px}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
button{font-family:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:4px}
h1,h2,h3,h4{font-family:var(--f-display);margin:0;text-wrap:balance;letter-spacing:-.005em}
p{margin:0}
.wrap{max-width:1180px;margin-inline:auto;padding-inline:clamp(16px,4vw,32px)}
.mono{font-family:var(--f-mono);font-size:.78rem;letter-spacing:.06em;text-transform:uppercase}
mark.tbc{background:var(--tbc-bg);color:var(--tbc-ink);font-family:var(--f-mono);font-size:.72em;letter-spacing:.02em;padding:.08em .5em;border-radius:3px;vertical-align:.08em;margin-inline-start:.3em;font-weight:500}

/* header */
header.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.bar{display:flex;align-items:center;gap:20px;min-height:64px}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;flex-shrink:0}
.brand img{height:36px;width:auto}
.brand b{font-family:var(--f-display);font-weight:700;font-size:1.18rem;letter-spacing:.02em}
nav.sections{display:flex;gap:2px;margin-inline:auto}
nav.sections a{text-decoration:none;font-size:.9rem;font-weight:500;padding:8px 12px;border-radius:6px;color:var(--muted);white-space:nowrap}
nav.sections a:hover{color:var(--ink);background:var(--surface2)}
nav.sections a[aria-current="true"]{color:var(--ink);box-shadow:inset 0 -2px 0 var(--brand)}
.tools{display:flex;align-items:center;gap:12px;flex-shrink:0}
.lang{display:flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface)}
.lang button{font:inherit;font-size:.8rem;font-weight:600;border:0;background:transparent;color:var(--muted);padding:7px 10px;cursor:pointer;min-width:38px}
.lang button + button{border-inline-start:1px solid var(--line)}
.lang button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.lang button:disabled{opacity:.45;cursor:not-allowed}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font:inherit;font-weight:600;font-size:.95rem;text-decoration:none;border-radius:8px;padding:12px 20px;min-height:44px;border:1px solid transparent;cursor:pointer;line-height:1.2;text-align:center}
.btn.primary{background:var(--brand);color:var(--brand-ink)}
.btn.primary:hover{filter:brightness(1.08)}
.btn.ghost{background:transparent;color:var(--ink);border-color:var(--ink)}
.btn.ghost:hover{background:var(--ink);color:var(--bg)}
.btn.small{padding:9px 14px;font-size:.85rem;min-height:40px}
@media (max-width:1420px){ .tools .btn{display:none} }
@media (max-width:1260px){ nav.sections a{padding:8px 9px;font-size:.86rem} }
@media (max-width:980px){
  .bar{flex-wrap:wrap;gap:6px 12px;padding-block:8px}
  .tools{margin-inline-start:auto}
  nav.sections{order:3;width:100%;margin:0;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  html{scroll-padding-top:150px}
}

/* hero */
.hero{padding-block:clamp(36px,6vw,80px) clamp(36px,5vw,64px)}
.hero-grid{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:clamp(24px,4vw,56px);align-items:center}
.hero .eyebrow{color:var(--brand);display:flex;align-items:center;gap:10px;margin-bottom:18px}
.hero .eyebrow::before{content:"";width:28px;height:2px;background:var(--brand)}
.hero h1{font-size:clamp(2.3rem,5.2vw,4.1rem);line-height:1.02;font-weight:600;margin-bottom:22px}
html[lang="zh-Hant"] .hero h1{font-size:clamp(2rem,4.4vw,3.3rem);line-height:1.18;font-weight:700}
.hero .lead{font-size:1.1rem;color:var(--muted);max-width:60ch}
.hero .tagline{font-family:var(--f-display);font-size:1.35rem;font-weight:600;margin-block:22px 26px}
.ctas{display:flex;gap:12px;flex-wrap:wrap}
.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:34px 0 0;padding:0;border-top:1px solid var(--line)}
.facts li{list-style:none;padding:14px 16px 14px 0;border-bottom:1px solid var(--line);font-size:.9rem;color:var(--muted);line-height:1.4}
.facts strong{display:block;font-family:var(--f-display);font-size:1.5rem;font-weight:600;color:var(--ink);line-height:1.15}
.hero-media{position:relative;border-radius:16px;overflow:hidden;background:var(--photo);aspect-ratio:4/3}
.hero-media img{width:100%;height:100%;object-fit:cover}
.hero-media .cap{position:absolute;left:14px;bottom:14px;right:14px;display:flex;justify-content:space-between;gap:10px;color:#C9D3E0;font-family:var(--f-mono);font-size:.7rem;letter-spacing:.05em;text-transform:uppercase}
@media (max-width:860px){ .hero-grid{grid-template-columns:1fr} .hero-media{order:-1} }

/* sections */
section.band{padding-block:clamp(48px,7vw,96px);border-top:1px solid var(--line)}
section.band.alt{background:var(--surface)}
.sec-head{max-width:760px;margin-bottom:clamp(26px,4vw,48px)}
.eyebrow-s{color:var(--brand);margin-bottom:12px}
.sec-head h2{font-size:clamp(1.8rem,3.4vw,2.7rem);line-height:1.1;font-weight:600;margin-bottom:16px}
html[lang="zh-Hant"] .sec-head h2{font-weight:700;line-height:1.25;font-size:clamp(1.6rem,3vw,2.3rem)}
.sec-head p{color:var(--muted);font-size:1.05rem;max-width:68ch}

/* materials */
.mat-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.65fr);gap:clamp(24px,4vw,56px);align-items:start}
.feat-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 36px;margin:0;padding:0}
.feat-list li{list-style:none;padding:18px 0;border-top:1px solid var(--line)}
.feat-list h3{font-size:1.12rem;font-weight:600;margin-bottom:6px}
html[lang="zh-Hant"] .feat-list h3{font-weight:700;font-size:1.02rem}
.feat-list p{color:var(--muted);font-size:.95rem}
.photo-stack{display:grid;gap:14px;position:sticky;top:150px}
.photo{border-radius:12px;overflow:hidden;background:var(--photo);aspect-ratio:4/3}
.photo img{width:100%;height:100%;object-fit:cover}
@media (max-width:900px){ .mat-grid{grid-template-columns:1fr} .photo-stack{position:static;grid-template-columns:repeat(2,minmax(0,1fr))} .feat-list{grid-template-columns:1fr} }
.sub{margin-top:clamp(40px,5vw,72px)}
.sub h3{font-size:1.5rem;font-weight:600;margin-bottom:6px}
html[lang="zh-Hant"] .sub h3{font-weight:700;font-size:1.3rem}
.sub .note{color:var(--muted);font-size:.9rem;margin-bottom:16px}
.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
table.cmp{border-collapse:collapse;width:100%;min-width:640px;font-size:.93rem}
table.cmp th,table.cmp td{padding:12px 16px;text-align:left;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}
table.cmp thead th{font-family:var(--f-mono);font-size:.74rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:500;background:var(--surface2)}
table.cmp tbody tr:last-child td,table.cmp tbody tr:last-child th{border-bottom:0}
table.cmp tbody th{font-weight:500;color:var(--muted)}
table.cmp .lsr{background:color-mix(in srgb,var(--brand) 7%,var(--surface));font-weight:600;box-shadow:inset 3px 0 0 var(--brand)}
table.cmp thead .lsr{background:var(--brand);color:var(--brand-ink)}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(20px,3vw,40px)}
@media (max-width:860px){ .two{grid-template-columns:1fr} }
.process{counter-reset:s;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0 0;padding:0}
.process li{list-style:none;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;font-size:.93rem}
.process li::before{counter-increment:s;content:counter(s);font-family:var(--f-mono);font-size:.78rem;color:var(--brand);display:block;margin-bottom:8px}
@media (max-width:900px){ .process{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:480px){ .process{grid-template-columns:1fr} }
.infoblock{border-top:1px solid var(--line);padding-top:14px}
.infoblock h4{font-size:1.05rem;margin-bottom:6px}
.infoblock p{color:var(--muted);font-size:.95rem}
.faq{margin-top:14px;border-top:1px solid var(--line)}
.faq details{border-bottom:1px solid var(--line)}
.faq summary{cursor:pointer;list-style:none;padding:18px 40px 18px 0;font-family:var(--f-display);font-weight:600;font-size:1.15rem;position:relative}
html[lang="zh-Hant"] .faq summary{font-weight:700;font-size:1.02rem}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";position:absolute;right:6px;top:50%;transform:translateY(-50%);font-size:1.5rem;font-weight:400;color:var(--brand)}
.faq details[open] summary::after{content:"\2212"}
.faq details p{padding:0 0 20px;color:var(--muted);max-width:75ch}

/* cards */
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
@media (max-width:980px){ .grid3{grid-template-columns:repeat(2,minmax(0,1fr))} .grid4{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:640px){ .grid3,.grid2,.grid4{grid-template-columns:1fr} }
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;min-width:0}
section.band.alt .card{background:var(--bg)}
.card .img{aspect-ratio:4/3;background:var(--photo);position:relative;overflow:hidden}
.card .img img{width:100%;height:100%;object-fit:cover}
.card .body{padding:18px 18px 20px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h3,.card h4{font-size:1.2rem;font-weight:600;line-height:1.2}
html[lang="zh-Hant"] .card h3,html[lang="zh-Hant"] .card h4{font-weight:700;font-size:1.06rem}
.card p{color:var(--muted);font-size:.94rem}
.card .actions{margin-top:auto;padding-top:12px;display:flex;gap:8px;flex-wrap:wrap}
.thumbs{display:flex;gap:6px;padding:8px 10px;background:var(--surface);border-top:1px solid var(--line);overflow-x:auto}
.thumbs button{flex:0 0 auto;width:54px;height:40px;padding:0;border:2px solid transparent;border-radius:6px;overflow:hidden;cursor:pointer;background:var(--photo);opacity:.7}
.thumbs button img{width:100%;height:100%;object-fit:cover}
.thumbs button[aria-pressed="true"]{border-color:var(--brand);opacity:1}
.thumbs button:hover{opacity:1}
.ph{width:100%;height:100%;display:grid;place-items:center;text-align:center;padding:12px;background:repeating-linear-gradient(135deg,var(--surface2) 0 10px,color-mix(in srgb,var(--surface2) 80%,var(--line)) 10px 11px);color:var(--muted)}
.ph span{font-family:var(--f-mono);font-size:.72rem;letter-spacing:.06em;text-transform:uppercase}

.cat-head{display:flex;gap:clamp(16px,3vw,40px);align-items:baseline;justify-content:space-between;flex-wrap:wrap;border-bottom:2px solid var(--ink);padding-bottom:12px;margin-bottom:20px}
.cat-head h3{font-size:1.7rem;font-weight:600}
html[lang="zh-Hant"] .cat-head h3{font-weight:700;font-size:1.45rem}
.cat-head p{color:var(--muted);max-width:62ch;font-size:.95rem}

/* quality */
.certs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.cert-card.vert{grid-template-columns:1fr;gap:14px}
@media (max-width:1100px){ .certs{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:700px){ .certs{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:420px){ .certs{grid-template-columns:1fr} }
.cert-card{background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:clamp(16px,2.5vw,24px);display:grid;grid-template-columns:minmax(0,150px) minmax(0,1fr);gap:20px;align-items:start}
@media (max-width:560px){ .cert-card{grid-template-columns:1fr} .cert-card .thumb{max-width:200px} }
.cert-card .thumb{display:block;padding:0;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:#fff;cursor:zoom-in;position:relative}
.cert-card .thumb img{width:100%}
.cert-card .thumb span{position:absolute;left:0;right:0;bottom:0;background:rgba(15,27,45,.82);color:#fff;font-family:var(--f-mono);font-size:.62rem;letter-spacing:.05em;text-transform:uppercase;padding:5px 6px;text-align:center}
.cert-card h3{font-size:1.1rem;margin-bottom:10px}
.cert-card dl{margin:0;display:grid;gap:10px}
.cert-card dt{font-family:var(--f-mono);font-size:.68rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.cert-card dd{margin:2px 0 0;font-size:.92rem;font-weight:500}
.cert-card dd.big{font-family:var(--f-display);font-size:1.4rem;font-weight:600;line-height:1.15}
.q-list{margin:clamp(28px,4vw,44px) 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px}
@media (max-width:860px){ .q-list{grid-template-columns:1fr} }
.q-list li{list-style:none;padding:16px 0;border-top:1px solid var(--line)}
.q-list h3{font-size:1.05rem;font-weight:600;margin-bottom:4px}
html[lang="zh-Hant"] .q-list h3{font-weight:700;font-size:1rem}
.q-list p{color:var(--muted);font-size:.95rem}
dialog#lb{border:0;padding:0;background:transparent;max-width:min(92vw,760px);max-height:94vh;overflow:visible}
dialog#lb::backdrop{background:rgba(5,10,18,.74)}
dialog#lb img{max-height:88vh;width:auto;max-width:100%;border-radius:8px;background:#fff;margin-inline:auto}
dialog#lb button{position:absolute;right:-6px;top:-14px;width:40px;height:40px;border-radius:50%;border:0;background:var(--brand);color:var(--brand-ink);font-size:1.4rem;line-height:1;cursor:pointer}

dialog#pn{border:0;padding:0;background:var(--surface);color:var(--ink);width:min(94vw,860px);max-height:90vh;border-radius:16px;overflow:hidden}
dialog#pn::backdrop{background:rgba(5,10,18,.74)}
dialog#pn .pn-in{max-height:90vh;overflow-y:auto;padding:clamp(20px,4vw,40px)}
dialog#pn .pn-x{position:sticky;float:right;top:0;width:40px;height:40px;border-radius:50%;border:0;background:var(--brand);color:var(--brand-ink);font-size:1.4rem;line-height:1;cursor:pointer;margin:0 0 8px 12px}
dialog#pn h3{font-size:1.7rem;font-weight:600;margin-bottom:10px;line-height:1.15}
html[lang="zh-Hant"] dialog#pn h3{font-weight:700;font-size:1.45rem}
dialog#pn .pn-img{border-radius:12px;overflow:hidden;background:var(--photo);aspect-ratio:4/3;margin:16px 0 20px}
dialog#pn .pn-img img{width:100%;height:100%;object-fit:cover}
dialog#pn h4{font-size:1.1rem;margin:20px 0 8px}
dialog#pn p{color:var(--muted);max-width:68ch;margin-bottom:10px}
dialog#pn ul{margin:0 0 6px;padding-left:1.2em;color:var(--muted)}
dialog#pn li{margin-bottom:4px}
.dec{display:inline-block;background:var(--tbc-bg);color:var(--tbc-ink);font-family:var(--f-mono);font-size:.66rem;letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:999px;margin-bottom:8px}
.decnote{margin-top:14px;font-size:.88rem;color:var(--tbc-ink);background:var(--tbc-bg);border-radius:8px;padding:10px 14px;max-width:none}
.cert-card .thumb.none{cursor:default;display:grid;place-items:center;aspect-ratio:1/1.41}
.cert-card .thumb.none .ph span{font-size:.62rem}
.social{display:flex;align-items:center;gap:10px}
.social a{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;border:1px solid var(--line);color:var(--ink);text-decoration:none}
.social a:hover{background:var(--ink);color:var(--bg)}
.social svg{width:20px;height:20px;fill:currentColor}

/* news */
.news-card .img img{object-position:top}
.news-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap;color:var(--muted)}
.news-meta .tag{background:var(--surface2);color:var(--ink);padding:3px 9px;border-radius:999px;font-family:var(--f-mono);font-size:.68rem;letter-spacing:.05em;text-transform:uppercase}
.more{margin-top:24px}

/* contact */
.c-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(24px,4vw,56px);align-items:start}
@media (max-width:900px){ .c-grid{grid-template-columns:1fr} }
form.inq{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:clamp(18px,3vw,30px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
form.inq .full{grid-column:1/-1}
@media (max-width:560px){ form.inq{grid-template-columns:1fr} }
label.f{display:grid;gap:6px;font-size:.84rem;font-weight:600}
label.f input,label.f select,label.f textarea{font:inherit;font-weight:400;font-size:.95rem;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:11px 12px;min-height:44px;width:100%;min-width:0}
label.f textarea{min-height:110px;resize:vertical}
label.f input:focus,label.f select:focus,label.f textarea:focus{outline:3px solid var(--focus);outline-offset:1px;border-color:transparent}
.drop{border:1.5px dashed var(--line);border-radius:10px;padding:16px;color:var(--muted);font-size:.9rem;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.drop input{font-size:.85rem;max-width:100%}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.88rem;color:var(--muted)}
.check input{margin-top:4px;width:18px;height:18px;flex-shrink:0}
.status{font-size:.9rem;color:var(--ink);background:var(--surface2);border-radius:8px;padding:10px 14px}
.company{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:clamp(18px,3vw,28px);display:grid;gap:14px}
.company h3{font-size:1.25rem}
.company p{color:var(--muted);font-size:.95rem}
footer.foot{border-top:1px solid var(--line);padding-block:30px;background:var(--surface)}
footer.foot .wrap{display:flex;gap:16px 30px;justify-content:space-between;flex-wrap:wrap;align-items:center;font-size:.88rem;color:var(--muted)}
footer.foot a{color:var(--ink)}
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto} }

/* =========================================================
 * WordPress 補充
 * ======================================================= */
body.jk{margin:0}
body.jk #page{overflow:visible}
/* 主題 _header.scss 對 header 設定 fixed 與捲動隱藏（sleep），這裡改回設計稿的 sticky 頁首 */
body.jk header.top{position:sticky;top:0;left:auto;width:auto;height:auto;transform:none!important;opacity:1!important;z-index:50;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface) 94%,transparent)}
body.admin-bar.jk header.top{top:32px}
@media (max-width:782px){ body.admin-bar.jk header.top{top:46px} }
.brand img{width:auto}
/* 語系切換：設計稿為按鈕，這裡是連結 */
.lang a{display:block;font-size:.8rem;font-weight:600;color:var(--muted);padding:7px 10px;min-width:38px;text-align:center;text-decoration:none;line-height:1.6}
.lang a + a{border-inline-start:1px solid var(--line)}
.lang a[aria-current="true"]{background:var(--ink);color:var(--bg)}
.lang a:hover:not([aria-current="true"]){color:var(--ink);background:var(--surface2)}
.btn{display:inline-flex}
.hero-media .ph,.photo .ph,.card .img .ph{height:100%}
dialog[open]{display:block}
/* 全站彈跳視窗置中：reset 把 dialog 的 margin 歸零，原生置中失效，這裡補回 */
dialog{position:fixed;inset:0;margin:auto}
dialog#pn .pn-body h4{font-size:1.1rem;margin:20px 0 8px}
dialog#pn .pn-body p{color:var(--muted);max-width:68ch;margin-bottom:10px}
dialog#pn .pn-body ul{margin:0 0 6px;padding-left:1.2em;color:var(--muted)}

/* 產品 / 消息內頁（內容與首頁彈出視窗相同） */
.single-band{padding-block:clamp(36px,6vw,72px) clamp(48px,7vw,96px)}
.single-band .back{display:inline-block;font-size:.9rem;color:var(--muted);text-decoration:none;margin-bottom:18px}
.single-band .back:hover{color:var(--ink)}
.single-card{max-width:860px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:clamp(20px,4vw,40px)}
.single-card h1{font-size:clamp(1.7rem,3vw,2.2rem);font-weight:600;line-height:1.15;margin-bottom:10px}
html[lang="zh-Hant"] .single-card h1,html[lang="zh-TW"] .single-card h1{font-weight:700}
.single-card .pn-img{border-radius:12px;overflow:hidden;background:var(--photo);aspect-ratio:4/3;margin:16px 0 20px}
.single-card .pn-img img{width:100%;height:100%;object-fit:cover}
.single-card h4{font-size:1.1rem;margin:20px 0 8px}
.single-card p{color:var(--muted);max-width:68ch;margin-bottom:10px}
.single-card ul{margin:0 0 6px;padding-left:1.2em;color:var(--muted)}
.single-card li{margin-bottom:4px}

/* 中文、日文：Polylang 輸出 lang="zh-TW" / "ja"，套用設計稿 zh-Hant、ja 的字重與字級 */
html:is([lang="zh-TW"],[lang="ja"]) .hero h1{font-size:clamp(2rem,4.4vw,3.3rem);line-height:1.18;font-weight:700}
html:is([lang="zh-TW"],[lang="ja"]) .sec-head h2{font-weight:700;line-height:1.25;font-size:clamp(1.6rem,3vw,2.3rem)}
html:is([lang="zh-TW"],[lang="ja"]) .feat-list h3{font-weight:700;font-size:1.02rem}
html:is([lang="zh-TW"],[lang="ja"]) .sub h3{font-weight:700;font-size:1.3rem}
html:is([lang="zh-TW"],[lang="ja"]) .faq summary{font-weight:700;font-size:1.02rem}
html:is([lang="zh-TW"],[lang="ja"]) .card h3,html:is([lang="zh-TW"],[lang="ja"]) .card h4{font-weight:700;font-size:1.06rem}
html:is([lang="zh-TW"],[lang="ja"]) .cat-head h3{font-weight:700;font-size:1.45rem}
html:is([lang="zh-TW"],[lang="ja"]) .q-list h3{font-weight:700;font-size:1rem}
html:is([lang="zh-TW"],[lang="ja"]) dialog#pn h3{font-weight:700;font-size:1.45rem}

/* ---------- Contact Form 7（套用設計稿 form.inq 樣式）---------- */
.inq-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:clamp(18px,3vw,30px)}
.inq-card form.wpcf7-form{margin:0}
.inq{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.inq .full{grid-column:1/-1}
@media (max-width:560px){ .inq{grid-template-columns:1fr} }
.inq .wpcf7-form-control-wrap{display:block}
label.f select{appearance:auto}
.inq .drop .wpcf7-form-control-wrap{flex:1;min-width:0}
.inq .check .wpcf7-list-item{margin:0}
.inq .check label{display:flex;gap:10px;align-items:flex-start;font-size:.88rem;color:var(--muted);cursor:pointer}
.inq .check input{margin-top:4px;width:18px;height:18px;flex-shrink:0}
.inq .wpcf7-submit{display:inline-flex}
.inq .wpcf7-submit:disabled{opacity:.55;cursor:not-allowed}
.inq .wpcf7-spinner{margin:0 0 0 4px}
.inq .note{color:var(--muted);font-size:.82rem}
.inq .wpcf7-not-valid-tip{color:var(--brand);font-size:.8rem;font-weight:500;margin-top:4px}
.inq-card .wpcf7 form .wpcf7-response-output{margin:16px 0 0;border:0;border-radius:8px;padding:10px 14px;font-size:.9rem;background:var(--surface2);color:var(--ink)}
.inq-card .wpcf7 form.invalid .wpcf7-response-output,.inq-card .wpcf7 form.unaccepted .wpcf7-response-output,.inq-card .wpcf7 form.failed .wpcf7-response-output{background:var(--tbc-bg);color:var(--tbc-ink)}

/* 跳到內容連結：平常隱藏，鍵盤 focus 時才出現 */
.skip-link{position:absolute;left:-9999px;top:8px;z-index:100;background:var(--surface);color:var(--ink);padding:8px 14px;border-radius:8px}
.skip-link:focus{left:8px}

/* ---------- 捲軸：改用主題色（JOKER 紅），跟著淺色 / 深色模式切換 ----------
 * 覆蓋主題 global.css 的預設捲軸（灰底＋secondary1）；joker.css 較晚載入，同樣的選擇器會覆蓋。
 * Chrome / Safari / Edge 用 ::-webkit-scrollbar；Firefox 用 scrollbar-color。 */
html{scrollbar-color:var(--brand) var(--surface2)}
::-webkit-scrollbar{width:10px;height:6px}
::-webkit-scrollbar-track{background:var(--surface2)}
::-webkit-scrollbar-thumb{background:var(--brand);border-radius:999px;border:2px solid var(--surface2)}
::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--brand) 85%,#000)}

/* V2 設計稿：證書標題縮小（5 欄）、長字自動斷行、必填星號 */
.cert-card h3{font-size:1rem}
body,h1,h2,h3,h4{hyphens:auto;overflow-wrap:break-word}
.req{color:var(--brand);font-weight:700}
html[lang="ja"]{--f-body:'IBM Plex Sans','Noto Sans JP','Noto Sans TC',system-ui,sans-serif;--f-display:'Barlow Semi Condensed','Noto Sans JP',system-ui,sans-serif;--f-mono:'IBM Plex Mono','Noto Sans JP',ui-monospace,monospace}
