/* C 夜墨 layout + shared chrome, production DOM/copy retained. */
/* 深淺 logo：淺底用淺色 lockup，深底用 dark 版 */
.lg-light{display:none!important}
:root[data-theme="light"] .lg-dark{display:none!important}
:root[data-theme="light"] .lg-light{display:block!important}

/* 主題分段滑塊：外框沿用 .seg（與語系控制同高、同框、同圓角、同色）。
   左太陽＝淺色，右月亮＝深色；滑塊預設在右（夜墨）。 */
.theme-switch{position:relative;align-items:stretch;-webkit-tap-highlight-color:transparent;touch-action:pan-y;user-select:none}
.theme-switch .theme-thumb{position:absolute;top:2px;bottom:2px;left:2px;width:calc((100% - 4px - 2px) / 2);
  border-radius:var(--rseg);background:var(--seg);pointer-events:none;z-index:0;
  transform:translateX(calc(100% + 2px));transition:transform .22s ease}
:root[data-theme="light"] .theme-switch .theme-thumb{transform:translateX(0)}
.theme-switch > button{appearance:none;-webkit-appearance:none;position:relative;z-index:1;margin:0;padding:3px 0;border:0;background:transparent;
  display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:26px;flex:1 0 44px;font:inherit;font-weight:500;color:var(--ink2);
  cursor:pointer;border-radius:var(--rseg);line-height:20px}
.theme-switch > button[aria-checked="true"]{color:var(--onseg)}
.theme-switch svg{width:18px;height:18px;display:block;overflow:visible;pointer-events:none}
.theme-switch > button:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
@media (prefers-reduced-motion: reduce){
  .theme-switch .theme-thumb{transition:none}
}

/* 頁首 chrome：墨線與紙／墨底，不用丹色。語言按鈕寬度固定，切語言不推擠導覽。 */
.chrome-button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;
  border:1px solid var(--line);border-radius:var(--rseg);background:var(--surface);color:var(--ink2);font:inherit;cursor:pointer}
.language-trigger{width:104px;height:32px;font-size:13px;white-space:nowrap}
.chrome-button svg{width:20px;height:20px;flex-shrink:0;pointer-events:none}
.language-short{white-space:nowrap}
.header-panel[hidden]{display:none}
.header-panel{position:absolute;z-index:20;padding:8px;border:1px solid var(--line);border-radius:var(--rm);
  background:var(--surface);color:var(--ink);box-shadow:0 12px 32px #0003;font-size:14px;}
.language-panel{width:248px;max-height:min(320px,calc(100dvh - 84px));overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.language-row{appearance:none;display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:44px;
  padding:8px 12px;border:0;border-radius:var(--rs);background:transparent;color:var(--ink2);font:inherit;text-align:left;cursor:pointer;white-space:nowrap}
.language-row[aria-checked="true"]{background:var(--surface2);color:var(--ink)}
.language-row:hover,.menu-panel nav a:hover{background:var(--surface2)}
.language-row svg{width:18px;height:18px;flex-shrink:0;color:currentColor}
.language-row[aria-checked="false"] svg{visibility:hidden}
.menu-panel{overflow-y:auto;overscroll-behavior:contain}
.menu-theme-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 12px 16px;border-bottom:1px solid var(--line2);color:var(--ink2)}
.menu-panel nav{display:flex;flex-direction:column;padding-top:8px}
.menu-panel nav a{display:flex;align-items:center;min-height:44px;padding:10px 12px;color:var(--ink2);text-decoration:none;border-radius:var(--rs);overflow-wrap:anywhere}
.chrome-button:focus-visible,.language-row:focus-visible,[data-nav] a:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
:focus-visible { outline:2px solid var(--acc);outline-offset:2px;box-shadow:none; }
.site-head { height:68px; box-sizing:border-box; }
.head-row { max-width:none; margin:0; height:100%; padding:0 72px; gap:0; }
.site-head .brand { flex-shrink:0; }
.site-head .lockup { height:26px; width:auto; }
.head-nav { margin-left:56px; gap:30px; white-space:nowrap; }
.head-nav a { display:inline-flex; align-items:center; min-height:44px; }
.header-right { margin-left:auto; display:flex; align-items:center; gap:20px; padding-left:24px; flex-shrink:0; }
.desktop-theme { display:flex; }
.menu-trigger { display:none; }
.theme-switch.seg { height:32px; padding:2px; gap:2px; margin:0; border-radius:var(--rseg); }
.theme-switch.seg > button { min-height:26px; height:26px; min-width:44px; flex:1 0 44px; padding:0; border-radius:var(--rseg); line-height:20px; transition:none; }
.theme-switch.seg > button:hover { background:transparent; }
.theme-switch.seg > button[aria-checked="true"] { background:transparent; color:var(--onseg); }
.header-panel { margin:0; }
.menu-panel .theme-switch { height:46px; padding:0; }
.menu-panel .theme-switch .theme-thumb { top:0; bottom:0; left:0; width:calc((100% - 2px) / 2); }
.menu-panel .theme-switch > button { height:44px; min-height:44px; }
.menu-panel nav a { white-space:normal; }
body > main.home-page { max-width:1584px; padding:0 72px; }
.hero { display:grid; grid-template-columns:minmax(0,480px) minmax(0,1fr); align-items:center; gap:48px; padding:16px 0 14px; }
@media (min-width:641px) and (min-height:1000px) {
  .hero { padding:40px 0 24px; gap:56px; }
}
.hero-copy { min-width:0; }
.hero-wordmark { margin:0 0 26px -6px; }
.hero-wordmark .lockup { height:clamp(48px, 8vh, 78px); width:auto; max-width:100%; }
.hero .brand-sub { display:block; margin:0 0 10px; }
.hero h1 { font:700 clamp(26px, 3.2vw + 1.2vh, 40px)/1.45 var(--sans); letter-spacing:.04em; text-wrap:initial; margin:0 0 14px; }
.hero .lead { font-size:16px; line-height:1.9; }
.hero-free { margin-top:18px; font-size:13px!important; }
.hero-art { margin:0; min-width:0; width:fit-content; max-width:100%; justify-self:start; }
.mount { padding:10px; border:1px solid var(--line); border-radius:4px; background:var(--mount); width:fit-content; max-width:100%; }
.hero-comparison { --hero-position:50%; --hero-art-max:max(160px, calc(100vh - 396px)); position:relative; aspect-ratio:3/2; touch-action:pan-y pinch-zoom; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; width:min(100%, calc(var(--hero-art-max) * 3 / 2)); max-height:var(--hero-art-max); }
.hero-comparison.is-active { cursor:col-resize; }
.hero-comparison img { display:block; width:100%; height:100%; object-fit:contain; -webkit-user-drag:none; -webkit-touch-callout:none; user-select:none; }
.hero-before { position:absolute; inset:0; clip-path:inset(0 calc(100% - var(--hero-position)) 0 0); }
.hero-comparison::after { content:""; position:absolute; top:0; bottom:0; left:var(--hero-position); width:2px; transform:translateX(-50%); background:var(--frame); pointer-events:none; }
.hero-handle { position:absolute; top:0; bottom:0; left:clamp(22px,var(--hero-position),calc(100% - 22px)); width:44px; transform:translateX(-50%); z-index:1; display:flex; align-items:center; justify-content:center; outline:none; }
.hero-handle[hidden] { display:none; }
.hero-grip { display:flex; align-items:center; justify-content:center; gap:5px; width:32px; height:44px; border:2px solid var(--frame); border-radius:var(--rm); background:var(--surface); color:var(--ink); }
.hero-grip::before,.hero-grip::after { content:""; width:2px; height:16px; background:currentColor; }
.hero-handle:focus .hero-grip { outline:2px solid var(--acc); outline-offset:3px; }
.hero-handle:focus:not(:focus-visible) .hero-grip { outline:none; }
@media (forced-colors: active) {
  .hero-comparison::after,.hero-grip::before,.hero-grip::after { forced-color-adjust:none; background:CanvasText; }
  .hero-handle:focus .hero-grip { outline-color:Highlight; }
}
.hero-art figcaption { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; font-size:13px; color:var(--ink3); margin-top:8px; }
.hero-art figcaption > span { white-space:nowrap; }
.hero-credit { grid-column:1 / -1; justify-self:start; min-width:0; max-width:100%; overflow-wrap:anywhere; font-size:11px; line-height:1.5; color:var(--ink3); }
.hero-credit:focus-visible { outline:none; box-shadow:var(--focus); }
.seal { display:inline-block; width:9px; height:9px; margin-left:8px; background:var(--dan); }
.home-page #panel-pick { margin:0 0 36px; }
.home-page .drop { padding:clamp(24px, 4.2vh, 56px) 56px clamp(20px, 3.4vh, 40px); border-radius:12px; }
.home-page .drop::before { inset:clamp(16px, 2.8vh, 40px) 36px clamp(16px, 2.6vh, 36px); }
.upload-icon { display:block; width:44px; height:44px; margin-bottom:6px; color:var(--ink2); pointer-events:none; }
.upload-icon svg { display:block; width:100%; height:100%; }
.drop-title { font-weight:700; }
.drop .btn { min-height:50px; padding:10px 30px; font-size:16px; margin:12px 0 8px; }
.home-page .steps { margin-top:14px; }
.home-page .panel.card { max-width:880px; margin-left:auto; margin-right:auto; }
.home-page #panel-result { width:auto; max-width:1018px; }
.home-page .home-sec { padding:32px 0; border-top:1px solid var(--line); }
.home-page .mincho,.home-page .sec-title { font-family:var(--sans); font-weight:700; }
.home-page .verify { margin:24px 0; }
/* Intermediate widths keep full navigation while reducing the hero column. */
@media (min-width:641px) and (max-width:1100px) {
  .head-row { padding-inline:24px; }
  .head-nav { margin-left:24px; gap:14px; min-width:0; font-size:13px; white-space:normal; }
  .head-nav a { min-width:0; line-height:1.4; }
  .header-right { padding-left:16px; }
  body > main.home-page { padding-inline:32px; }
  .hero { grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:28px; }
  .hero h1 { font-size:clamp(23px,3.25vw,34px); }
  .hero-wordmark .lockup { height:auto; width:100%; max-width:340px; }
  .hero .lead { font-size:15px; }
}
@media (max-width:640px) {
  .site-head { height:58px; }
  .head-row { padding:0 18px; }
  .site-head .lockup { height:22px; width:auto; }
  .head-nav,.desktop-theme { display:none; }
  .header-right { gap:6px; padding:0; }
  .language-trigger,.menu-trigger { display:inline-flex; width:44px; height:44px; padding:0; border-color:transparent; background:transparent; }
  .language-short { display:none; }
  .header-panel { left:18px!important; width:calc(100% - 36px); max-height:calc(100dvh - 84px); }
  .language-panel { max-height:min(320px,calc(100dvh - 84px)); }
  body > main.home-page { padding:0 18px; }
  .hero { display:flex; flex-direction:column; align-items:stretch; gap:26px; padding:36px 0 28px; }
  .hero-wordmark { margin:0 0 22px; }
  .hero-wordmark .lockup { width:280px; height:auto; }
  .hero h1 { font-size:clamp(23px,6.6vw,26px); line-height:1.55; }
  .hero .lead { font-size:14px; }
  .hero .brand-sub { display:block; }
  .hero-free { margin-top:16px; }
  .hero-art { width:auto; justify-self:stretch; }
  .mount { padding:5px; width:auto; }
  .hero-comparison { width:100%; max-height:none; }
  .hero-art figcaption { font-size:12px; }
  .hero-credit { display:inline-flex; align-items:center; min-height:44px; }
  .home-page .drop { padding:48px 26px 42px; }
  .home-page .drop::before { inset:20px 16px; }
  .home-page .steps { grid-template-columns:1fr; }
}
/* Short desktop viewports: tighten hero and drop padding so #drop + 選擇圖片 fit in the first screen. */
@media (min-width:641px) and (max-height:980px) {
  .hero-wordmark { margin:0 0 8px -4px; }
  .hero-wordmark .lockup { height:44px; }
  .hero .brand-sub { margin-bottom:4px; }
  .hero .eyebrow { margin:0 0 8px; }
  .hero h1 { font-size:30px; line-height:1.35; margin-bottom:8px; }
  .hero .lead { font-size:15px; line-height:1.65; }
  .hero-free { margin-top:8px; }
  .home-page .drop { padding:28px 48px 22px; }
  .home-page .drop::before { inset:14px 28px; }
  .home-page .drop .btn { margin:8px 0 6px; }
}
@media (min-width:641px) and (max-height:720px) {
  .hero { padding:10px 0 8px; }
  .hero-wordmark .lockup { height:36px; }
  .hero h1 { font-size:26px; line-height:1.32; }
  .hero .lead { font-size:14px; line-height:1.55; }
  .home-page .drop { padding:22px 40px 18px; }
  .home-page .drop::before { inset:10px 22px; }
}

/* Sumiscale 擴充功能「即將開放」列。放在 .status-row 與 #home-steps 之間。
   三個自製小按鈕（Chrome／Firefox／Edge），看起來接近商店常見的深色小徽章，
   但不是官方「已可安裝」徽章，也不是連結或真正的 button。商店開放後，
   可把 .ext-teaser-chips 整組換成官方徽章並補上商店連結（本次不實作）。 */
.ext-teaser{margin:0;padding:20px 0 22px;border-bottom:1px solid var(--line)}
.status-row{margin-bottom:0}
.ext-teaser + .home-sec{border-top:0;padding-top:32px}
.ext-teaser-inner{display:flex;flex-direction:column;align-items:center;gap:14px}
.ext-teaser-text{margin:0;font-size:14px;line-height:1.6;font-weight:400;letter-spacing:.02em;color:var(--ink2);text-align:center;max-width:36em}
.ext-teaser-chips{display:flex;align-items:stretch;justify-content:center;gap:12px;flex-wrap:wrap;margin:0;padding:0;list-style:none}
.ext-chip{
  display:flex;align-items:center;justify-content:center;gap:10px;
  box-sizing:border-box;
  min-height:52px;min-width:140px;
  padding:8px 16px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:8px;
  background:#161A1C;
  color:#F2EEE6;
  cursor:default;
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
}
[data-theme="light"] .ext-chip{
  background:#20272A;
  border-color:rgba(255,255,255,.1);
}
.ext-chip img{display:block;width:28px;height:28px;flex:0 0 28px}
.ext-chip-copy{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;line-height:1.2;text-align:center}
.ext-chip-name{font-size:13px;font-weight:600;letter-spacing:.02em;color:#F2EEE6}
.ext-chip-soon{font-size:11px;font-weight:400;letter-spacing:.06em;color:rgba(242,238,230,.72)}
@media (max-width:640px){
  .ext-teaser{padding:16px 0 18px}
  .ext-teaser-inner{gap:12px}
  .ext-teaser-text{font-size:13px}
  .ext-teaser-chips{gap:8px;flex-wrap:nowrap;width:100%}
  .ext-chip{min-height:46px;min-width:0;flex:1 1 0;padding:6px 8px;gap:8px}
  .ext-chip img{width:24px;height:24px;flex-basis:24px}
  .ext-chip-name{font-size:12px}
  .ext-chip-soon{font-size:10px;letter-spacing:.04em}
  .ext-teaser + .home-sec{padding-top:28px}
}
@media (prefers-reduced-motion:reduce){
  .ext-teaser,.ext-chip{transition:none}
}
