/* =====================================================================
 * ZEDOTECH 共用樣式（首頁與作品詳細頁共用）
 * 首頁獨有的樣式（Hero、作品卡片、YouTube）寫在 index.html 的 <style>。
 * ===================================================================== */

/* ============ Tokens ============ */
:root {
  color-scheme: light;
  --yellow: #ffcb2f;
  --on-yellow: #1e1e22;
  --canvas: #fffdf6;
  --canvas-alt: #fff6d8;
  --panel: #ffffff;
  --panel-raised: #fff3c4;
  --line: #e9e0c3;
  --ink: #232327;
  --muted: #55555e;
  --accent-text: #8a6400;
  --cta-bg: #232327;
  --cta-ink: #ffcb2f;
  --focus: #232327;
  --hero-ink: #1e1e22;
  --hero-muted: #3d3a30;
  --hero-eyebrow: #1e1e22;
  --hero-line: #1e1e2238;
  --contact-bg: #ffcb2f;
  --contact-ink: #1e1e22;
  --contact-muted: #3d3a30;
  --contact-cta-bg: #1e1e22;
  --contact-cta-ink: #ffcb2f;
  --header-bg: #fffdf6e6;
  --shadow: 0 24px 60px #5c4a0f29;
  --mark-color: #232327;
  --mark-base: #e6ac00;
  --hover-line: #232327;
  --hero-bg:
    radial-gradient(circle at 88% 18%, #fff4c7, transparent 40%),
    linear-gradient(#00000009 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, #00000009 1px, transparent 1px) 0 0 / 48px 48px,
    #ffcb2f;

  /* 固定深色（兩主題相同） */
  --night: #141417;
  --night-line: #3a3a42;
  --night-ink: #f5f5f7;
  --code-ink: #e9e9ee;
  --code-muted: #8c8c96;
  --code-success: #7fe0a8;
  --night-grid:
    linear-gradient(#ffffff0a 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px) 0 0 / 48px 48px;

  --font: -apple-system, "Segoe UI", Arial, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", SFMono-Regular, Consolas, monospace;

  --gutter: clamp(20px, 6vw, 96px);
  --section-y: 96px;
  --header-h: 80px;
  --r-card: 4px 40px 4px 4px;
  --r-small: 4px 28px 4px 4px;
  --r-panel: 6px 44px 6px 6px;
  --r-cta: 4px 4px 22px 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #1d1d21;
    --canvas-alt: #232328;
    --panel: #29292f;
    --panel-raised: #313138;
    --line: #3e3e46;
    --ink: #f5f5f7;
    --muted: #b8b8c2;
    --accent-text: #ffcb2f;
    --cta-bg: #ffcb2f;
    --cta-ink: #1e1e22;
    --focus: #ffcb2f;
    --hero-ink: #f5f5f7;
    --hero-muted: #b8b8c2;
    --hero-eyebrow: #ffcb2f;
    --hero-line: #3e3e46;
    --contact-bg: #29292f;
    --contact-ink: #f5f5f7;
    --contact-muted: #b8b8c2;
    --contact-cta-bg: #ffcb2f;
    --contact-cta-ink: #1e1e22;
    --header-bg: #1d1d21e6;
    --shadow: 0 24px 60px #00000059;
    --mark-color: #ffcb2f;
    --mark-base: #f4f4f6;
    --hover-line: #ffcb2f;
    --hero-bg:
      radial-gradient(circle at 85% 20%, #ffcb2f1f, transparent 42%),
      linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 48px 48px,
      linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 48px 48px,
      #1d1d21;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #1d1d21;
  --canvas-alt: #232328;
  --panel: #29292f;
  --panel-raised: #313138;
  --line: #3e3e46;
  --ink: #f5f5f7;
  --muted: #b8b8c2;
  --accent-text: #ffcb2f;
  --cta-bg: #ffcb2f;
  --cta-ink: #1e1e22;
  --focus: #ffcb2f;
  --hero-ink: #f5f5f7;
  --hero-muted: #b8b8c2;
  --hero-eyebrow: #ffcb2f;
  --hero-line: #3e3e46;
  --contact-bg: #29292f;
  --contact-ink: #f5f5f7;
  --contact-muted: #b8b8c2;
  --contact-cta-bg: #ffcb2f;
  --contact-cta-ink: #1e1e22;
  --header-bg: #1d1d21e6;
  --shadow: 0 24px 60px #00000059;
  --mark-color: #ffcb2f;
  --mark-base: #f4f4f6;
  --hover-line: #ffcb2f;
  --hero-bg:
    radial-gradient(circle at 85% 20%, #ffcb2f1f, transparent 42%),
    linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 48px 48px,
    #1d1d21;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 18px/1.75 var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.night :focus-visible { outline-color: var(--yellow); }
main:focus { outline: none; }

section[id], main[id] { scroll-margin-top: var(--header-h); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 800;
  text-decoration: none;
  border-radius: var(--r-cta);
}
.skip-link:focus { top: 12px; }

.wrap {
  width: min(1240px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }

/* ============ Type ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 14px/1.4 var(--font);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  flex: none;
  background: currentColor;
  border-radius: 1px 1px 6px 1px;
}
.h2 {
  font-size: clamp(28px, 1.6vw + 16px, 36px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.lead { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font: 800 16px/1.4 var(--font);
  letter-spacing: .04em;
  padding: 14px 26px;
  border: 0;
  border-radius: var(--r-cta);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn .arrow { font-weight: 700; }

/* 次要按鈕：透明底 + 1px 框線 */
.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 13px 25px;
}
.btn-line:hover { border-color: var(--hover-line); box-shadow: none; }

/* ============ Logo ============ */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.logo svg { width: 40px; height: 40px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-word { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.logo-sub {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--muted);
  white-space: nowrap;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.site-nav { margin-left: auto; min-width: 0; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px 4px 14px 4px;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--canvas-alt); }
.site-nav a[aria-current] { color: var(--ink); }

.theme-toggle {
  display: inline-flex;
  flex: none;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
}
.theme-toggle .seg {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.theme-toggle[data-current="light"] .seg[data-seg="light"],
.theme-toggle[data-current="dark"] .seg[data-seg="dark"] {
  background: var(--cta-bg);
  color: var(--cta-ink);
}

/* ============ 手機外框（首頁封面與詳細頁共用） ============ */
.phone {
  flex: none;
  padding: 5px;
  background: #0b0b0d;
  border: 1px solid var(--night-line);
  border-radius: 22px;
  box-shadow: 0 18px 40px #00000066;
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: 17px;
  background: #23232a;
}

/* ============ 編號小卡（服務、主要功能） ============ */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin-top: 36px;
}
.service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 22px 24px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-small);
}
.service .num {
  grid-row: span 2;
  font: 700 14px/1.9 var(--mono);
  color: var(--accent-text);
}
.service h3 { font-size: 18px; font-weight: 700; line-height: 1.6; }
.service p { font-size: 15px; line-height: 1.8; color: var(--muted); }

/* ============ Night ============ */
.night {
  background: var(--night);
  color: var(--night-ink);
}
.night .btn { background: var(--yellow); color: var(--on-yellow); }
.night .btn:hover { box-shadow: 0 18px 40px #00000066; }

/* ============ Contact ============ */
.contact {
  background: var(--contact-bg);
  color: var(--contact-ink);
  padding-bottom: calc(var(--section-y) + var(--footer-r));
  --footer-r: clamp(44px, 6vw, 72px);
}
.contact .eyebrow { color: var(--contact-ink); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px 56px;
  align-items: end;
}
.contact .h2 { margin-top: 12px; font-size: clamp(28px, 2.4vw + 12px, 42px); line-height: 1.3; }
.contact-grid p { margin-top: 14px; color: var(--contact-muted); max-width: 34em; }
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.contact .btn {
  background: var(--contact-cta-bg);
  color: var(--contact-cta-ink);
  font-size: 18px;
  padding: 16px 30px;
}
.contact .btn:hover { box-shadow: 0 18px 40px #1e1e2233; }
.contact-email {
  font: 700 17px/1.5 var(--mono);
  color: var(--contact-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.contact :focus-visible { outline-color: var(--contact-ink); }

/* ============ Footer ============ */
.site-footer {
  position: relative;
  margin-top: calc(-1 * clamp(44px, 6vw, 72px));
  padding-block: 48px 40px;
  border-radius: clamp(44px, 6vw, 72px) 0 0 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}
.site-footer .logo { color: var(--night-ink); }
.site-footer .logo-sub { color: var(--code-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 700; }
.footer-links a { color: var(--code-ink); text-decoration: none; }
.footer-links a:hover { color: var(--yellow); }
.footer-copy {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--night-line);
  font: 400 12px/1.6 var(--mono);
  color: var(--code-muted);
  letter-spacing: .06em;
}

/* =====================================================================
 * 作品詳細頁（work/*.html）
 * ===================================================================== */
.detail-hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding-block: 32px 168px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 4px 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--hero-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.back-link:hover { border-bottom-color: currentColor; }
.detail-hero .eyebrow { display: flex; color: var(--hero-eyebrow); }
.detail-hero h1 {
  margin-top: 12px;
  font-size: clamp(32px, 2.4vw + 18px, 50px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.detail-summary {
  margin-top: 14px;
  max-width: 40em;
  color: var(--hero-muted);
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 36px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hero-line);
}
.detail-meta > div { min-width: 0; }
.detail-meta dt {
  font: 700 12px/1.5 var(--mono);
  letter-spacing: .1em;
  color: var(--hero-muted);
}
.detail-meta dd {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.detail-meta .meta-price dd {
  font: 800 clamp(24px, 1.4vw + 16px, 30px)/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.detail-hero .btn-line { color: var(--hero-ink); border-color: var(--hero-line); }
.detail-hero .btn-line:hover { border-color: var(--hover-line); }

/* 主視覺：浮起面板，往上壓住頁首區 */
.detail-shot {
  position: relative;
  margin-top: -128px;
}
.browser {
  max-width: 1000px;
  margin-inline: auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--night-line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--night);
  color: var(--code-muted);
  font: 400 12px/1.4 var(--mono);
}
.browser-bar .dot {
  width: 10px; height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--night-line);
}
.browser-bar .dot:first-child { background: var(--yellow); }
.browser-bar .url {
  min-width: 0;
  margin-left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser img { width: 100%; height: auto; }

.phone-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 4%, 48px);
  height: clamp(220px, 40vw, 540px);
  padding-top: clamp(28px, 4vw, 48px);
  overflow: hidden;
  background: radial-gradient(circle at 80% 12%, #ffcb2f24, transparent 42%), var(--night-grid), var(--night);
  border: 1px solid var(--night-line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow);
}
.phone-stage .phone { width: clamp(110px, 22%, 270px); }
.phone-stage .phone.is-low { margin-top: clamp(20px, 4vw, 56px); }

/* 內容區塊 */
.detail-block { padding-top: clamp(64px, 7vw, 96px); }
.detail-block.is-last { padding-bottom: var(--section-y); }
.detail-block .h2 { margin-top: 10px; }
.problem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 20px 56px;
  align-items: start;
}
.problem-text { display: grid; gap: 14px; color: var(--muted); }
.problem-text strong { color: var(--ink); }

/* 圖庫 */
.gallery {
  display: grid;
  gap: 28px 24px;
  margin-top: 36px;
}
.gallery-desktop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-phone { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery figure { min-width: 0; }
.shot-link {
  display: block;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-small);
  transition: border-color .2s ease, transform .2s ease;
  cursor: zoom-in;
}
.shot-link:hover { border-color: var(--hover-line); transform: translateY(-3px); }
.shot-link img { width: 100%; height: auto; }
.gallery-phone .shot-link {
  padding: 5px;
  background: #0b0b0d;
  border-color: var(--night-line);
  border-radius: 22px;
}
.gallery-phone .shot-link:hover { border-color: var(--yellow); }
.gallery-phone .shot-link img { border-radius: 17px; }
.gallery figcaption {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}
.gallery figcaption b { color: var(--ink); font-weight: 700; }

/* 技術與交付 */
.spec-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.spec-list > div {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  gap: 6px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.spec-list dt {
  font: 700 13px/1.9 var(--mono);
  letter-spacing: .08em;
  color: var(--accent-text);
}
.spec-list dd { font-size: 16px; line-height: 1.85; }

/* 底部聯絡區 */
.detail-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 18px;
}
.detail-price .label { font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.detail-price .amount {
  font: 800 clamp(26px, 1.6vw + 16px, 34px)/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.contact-grid .detail-price { margin-top: 18px; color: var(--contact-ink); }
.contact-grid .detail-note { margin-top: 6px; font-size: 15px; }
.detail-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hero-line);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 4px 0;
  text-decoration: none;
  color: var(--contact-ink);
}
.pager-link .small {
  font: 700 12px/1.5 var(--mono);
  letter-spacing: .1em;
  color: var(--contact-muted);
}
.pager-link .big {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.pager-link:hover .big { border-bottom-color: currentColor; }
.pager-next { text-align: right; align-items: flex-end; margin-left: auto; }

/* Lightbox（原生 <dialog>） */
.lightbox {
  width: min(1200px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--night-line);
  border-radius: var(--r-panel);
  background: var(--night);
  color: var(--night-ink);
  overflow: hidden;
}
.lightbox::backdrop { background: #0b0b0dcc; }
.lightbox-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 34px);
}
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid var(--night-line);
}
.lightbox-bar p {
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--code-ink);
}
.lightbox-close {
  flex: none;
  padding: 6px 16px;
  background: var(--yellow);
  color: var(--on-yellow);
  border: 0;
  border-radius: 999px;
  font: 800 14px/1.4 var(--font);
  cursor: pointer;
}
.lightbox :focus-visible { outline-color: var(--yellow); }
.lightbox-body {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}
.lightbox-body img {
  max-width: 100%;
  max-height: calc(100vh - 66px - var(--bar-h, 54px));
  width: auto;
  height: auto;
  border-radius: 4px;
}
.lightbox.is-phone { width: min(480px, calc(100vw - 32px)); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .problem { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --section-y: 64px; --header-h: 116px; }
  .header-inner {
    flex-wrap: wrap;
    gap: 0 16px;
    min-height: 0;
    padding-top: 12px;
  }
  .theme-toggle { margin-left: auto; }
  .site-nav {
    order: 3;
    flex: 1 0 100%;
    margin: 6px calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: 2px; }
  .site-nav li:first-child a { padding-left: 0; }
  .site-nav a { padding: 8px 12px; }
  .logo svg { width: 34px; height: 34px; }
  .logo-word { font-size: 20px; }

  .detail-hero { padding-block: 22px 112px; }
  .detail-shot { margin-top: -84px; }
  .gallery-desktop { grid-template-columns: 1fr; }
  .gallery-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .spec-list > div { grid-template-columns: 1fr; gap: 2px; }
  .phone-stage { height: 64vw; }
  .phone-stage .phone { width: 30%; }
  .phone { padding: 3px; border-radius: 14px; }
  .phone img { border-radius: 11px; }
}

@media (max-width: 420px) {
  .logo-sub { letter-spacing: .1em; }
  .theme-toggle .seg { padding: 5px 10px; }
  .detail-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .btn:hover, .shot-link:hover { transform: none; }
}
