/* Dribbble-inspired theme layer for Heping Design.
   Brand identity and content remain Heping; only the registered visual system is applied. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --soft-surface: #f3f3f4;
  --fg: #0d0c22;
  --muted: #6e6d7a;
  --border: #e7e7e9;
  --ink: #0d0c22;
  --ink-2: #f3f3f4;
  --ink-line: #e7e7e9;
  --ink-fg: #ffffff;
  --ink-muted: #6e6d7a;
  --accent: #ea4c89;
  --accent-ink: #ea4c89;
  --steel: #5761b4;
  --ok: #5761b4;
  --danger: #ea4c89;
  --warn: #5761b4;
  --font-display: "Mona Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Mona Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --container-max: 1280px;
  --container-gutter: 32px;
  --container-gutter-mobile: clamp(16px, 5.13vw, 20px);
  --content-gap-tight: 16px;
  --content-gap: 24px;
  --layout-gap: 32px;
  --layout-gap-wide: 48px;
  --section-y-tight: 48px;
  --section-y-compact: 64px;
  --section-y-editorial: 72px;
  --section-y-standard: 88px;
  --section-y: var(--section-y-standard);
  --section-y-mobile: 64px;
  --section-y-mobile-compact: 48px;
  --nav-height: 76px;
  --control-height: 44px;
  --control-radius: 8px;
  --control-radius-inner: 4px;
  --media-radius: 12px;
  --shot-card-min: 270px;
  --shot-card-min-wide: 336px;
  --gallery-gap: 36px;
  --gallery-gap-wide: 48px;
  --overlay-elevation: 0 20px 52px color-mix(in srgb, var(--fg) 22%, transparent);
  --motion-instant: 100ms;
  --motion-fast: 180ms;
  --motion-base: 280ms;
  --motion-scene: 420ms;
  --motion-ambient: 700ms;
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --ease-scene: cubic-bezier(.65, 0, .35, 1);
}

html { min-width: 0; overflow-x: clip; background: var(--bg); }
body {
  min-width: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
}
img, svg, canvas, video { max-width: 100%; }
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-gutter);
}
h1, h2, h3, h4, .brand-tx b, .brand b {
  font-family: var(--font-display);
  font-weight: 600;
}
h1, h2 { letter-spacing: -0.02em; }
small, .eyebrow, .cat, .date, .tag, .case-cat, .clients-head, .side-role,
.list-head, .block-kind, .fs-head .eyebrow { letter-spacing: 0.06em; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--steel);
  outline-offset: 3px;
  border-radius: var(--control-radius);
}

.topbar {
  background: var(--fg);
  color: var(--soft-surface);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.topbar .wrap {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .l { letter-spacing: 0.18em; text-transform: uppercase; }
.topbar .r { display: flex; gap: 22px; }
.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hdr .wrap {
  max-width: var(--container-max);
}
.hdr-in { min-width: 0; height: var(--nav-height); display: flex; align-items: center; gap: var(--layout-gap); }
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-wording {
  display: flex;
  width: 108px;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
}
.brand-wordmark { display: block; width: 108px; height: auto; }
.brand-subtitle {
  display: block;
  text-align: center;
  white-space: nowrap;
}
.brand-tx, .hdr-right { min-width: 0; }
.brand-glyph { width: 38px; height: 38px; color: var(--fg); }
.brand-glyph .motif { stroke-width: 2 !important; }
.brand-tx b {
  display: block;
  color: var(--fg);
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}
.brand-tx small, .brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav { display: flex; gap: 2px; margin-left: 6px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 9px 15px;
  color: var(--fg);
  border-radius: var(--control-radius);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover, .nav a:focus-visible { background: var(--soft-surface); color: var(--fg); }
.nav a.on, .nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.lang { display: flex; overflow: hidden; border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; }
.lang button {
  min-width: 44px;
  height: 44px;
  padding: 6px 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.lang button.on { background: var(--fg); color: var(--bg); }
.tel { display: flex; align-items: center; gap: 8px; color: var(--fg); font-size: 15px; font-weight: 600; }
.tel svg { width: 16px; height: 16px; }
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  align-items: center;
  justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }
.tel svg, .eyebrow, .why-no, .svc-no, .news .date { color: var(--signal, var(--steel)); }

.btn, .lang, .menu-btn, .field input, .field textarea, .field select,
input[type="text"], input[type="date"], textarea, select, .icon-btn, .mini-btn,
.add-btn, .chip, .tab, .lang-sw, .pv-close, .menu-side, .signout {
  border-radius: var(--control-radius);
}
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px var(--content-gap);
  border: 1px solid transparent;
  color: var(--fg);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 100ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"], .btn[aria-busy="true"] {
  opacity: .52;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.hero-tabs { border-radius: var(--control-radius); }
.hero-tab, .hero-tab:focus-visible { border-radius: var(--control-radius-inner); }
.btn-primary { background: var(--accent); color: var(--fg); }
.btn-primary:hover { background: var(--fg); color: var(--bg); }
.btn-ink { background: var(--fg); color: var(--bg); }
.btn-ink:hover { background: var(--accent); color: var(--fg); }
.btn-ghost { border-color: var(--border); }
.btn-ghost:hover { background: var(--soft-surface); border-color: var(--fg); color: var(--fg); }

.status-message {
  width: 100%;
  margin: var(--content-gap-tight) 0 0;
  padding: var(--content-gap-tight) 0;
  border-block: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}
.status-message[hidden] { display: none; }
.status-message[data-state="loading"], .status-message[data-state="info"] { color: var(--muted); }
.status-message[data-state="empty"] { color: var(--fg); }
.status-message[data-state="success"] { color: var(--fg); font-weight: 600; }
.status-message[data-state="warning"], .status-message[data-state="error"] { color: var(--steel); font-weight: 600; }
.cases .status-message { color: var(--soft-surface); border-color: var(--muted); }
.cases .status-message[data-state="error"] { color: var(--accent); }

.blueprint {
  background-color: var(--soft-surface);
  background-image: none;
  color: var(--fg);
}
.hero-r, .cover, .art-cover {
  background: var(--soft-surface);
  color: var(--fg);
  border-radius: var(--media-radius);
}
.hero-r { border: 1px solid var(--border); }
.hero .hero-r {
  background: transparent;
  border: 0;
  border-radius: 0;
}
.hero-r .cap, .hc-label { color: var(--muted); }
.hero-r .cap b { color: var(--fg); }
.hero h1 {
  text-wrap: balance;
}
.hero h1 em {
  color: var(--accent);
  display: inline-block;
  white-space: nowrap;
}
.hc-arrow, .hc-play {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
}
.hc-arrow:hover, .hc-play:hover { background: var(--fg); color: var(--bg); }
.hc-dots button { background: transparent; border-radius: 0; }
.hc-dots button::after { background: var(--border); border-radius: var(--control-radius); }
.hc-dots button.on { background: transparent; }
.hc-dots button.on::after { background: var(--fg); }
.hc-num { color: var(--border); }

.sec { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.why, .contact { background: var(--bg); border-color: var(--border); }
.why-grid, .svc-list, .news-grid { border-color: var(--border); }
.why-item.primary { border-color: var(--border); }
.svc { border-radius: var(--control-radius); text-decoration: none; }
.svc:hover { background: var(--soft-surface); }

.clients-band {
  background: var(--bg);
  color: var(--fg);
  border: 0;
}
.clients-head { color: var(--muted); }
.logo-slot { background: var(--soft-surface); border: 0; }
.logo-slot img {
  background: var(--bg);
  border: 0;
  border-radius: var(--control-radius);
}

.cases { background: var(--bg); color: var(--fg); }
.cases .eyebrow { color: var(--steel); }
.cases .sec-head h2 { color: var(--fg); }
.cases .sec-head .desc { color: var(--muted); }
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--shot-card-min)), 1fr));
  grid-auto-rows: auto;
  gap: var(--gallery-gap);
}
.case-showcase > .wrap,
.cases-main > .wrap {
  width: 100%;
  max-width: none;
  padding-inline: clamp(24px, 2.5vw, 64px);
}
.case-showcase .case-grid,
.cases-main .case-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--shot-card-min)), 1fr));
  gap: var(--gallery-gap);
}
.case, .case.feat, .case:nth-child(2), .case:nth-child(3) {
  min-width: 0;
  grid-column: auto;
  grid-row: auto;
  display: block;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  text-decoration: none;
}
.case-art {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--media-radius);
  background: var(--soft-surface);
  color: var(--muted);
  box-shadow: 0 0 0 rgba(13, 12, 34, 0);
  transform: translateY(0);
  transition: transform 130ms cubic-bezier(.2,.8,.2,1), box-shadow 130ms cubic-bezier(.2,.8,.2,1);
  will-change: transform, box-shadow;
}
.case-art img,
.case-art video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transition: none;
}
.case:hover .case-art,
.case:focus-visible .case-art,
.case:focus-within .case-art { box-shadow: 0 16px 34px rgba(13, 12, 34, .22); transform: translateY(-3px); }
.case-body {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
  background: var(--bg);
  border: 0;
}
.case-copy { min-width: 0; }
.case-cat { flex: 0 0 auto; padding-top: 1px; white-space: nowrap; color: var(--steel); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.case h3, .case.feat h3 { min-width: 0; margin: 0 0 2px; overflow: hidden; color: var(--fg); font-size: 15px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.case .case-author { display: block; margin: 0; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.case:focus-visible { outline: 0; }
.case:focus-visible .case-art { outline: 3px solid var(--steel); outline-offset: 3px; }

.section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: var(--layout-gap);
}
.section-actions .count,
.result-line { color: var(--muted); font-size: 14px; }
.collection-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--content-gap-tight);
  flex-wrap: wrap;
  margin: var(--layout-gap) 0 var(--gallery-gap);
}
.collection-tools .filter { margin: 0; }
.clear-filter {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px 0;
}
.clear-filter[hidden] { display: none; }

.proof-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--soft-surface);
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--media-radius);
  text-align: center;
  font-size: 14px;
}
.case-head-actions { display: flex; gap: 12px; margin-top: var(--content-gap); flex-wrap: wrap; }
.related-section { padding: var(--section-y-compact) 0; border-top: 1px solid var(--border); }
.related-section h2 { margin-bottom: 24px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--content-gap);
}
.related-card {
  display: block;
  padding: var(--content-gap);
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--bg);
}
.related-card:hover { background: var(--soft-surface); }
.related-card small { display: block; color: var(--muted); margin-bottom: 8px; }
.related-card b { display: block; font-size: 18px; color: var(--fg); }

.page-hero { padding: var(--section-y-editorial) 0 var(--section-y-tight); border-bottom: 1px solid var(--border); }
.page-hero h1 {
  max-width: 18ch;
  margin: 14px 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page-hero p { max-width: 62ch; color: var(--muted); font-size: 18px; }
.service-grid,
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--content-gap);
}
.service-card,
.insight-card {
  padding: var(--layout-gap) 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.service-card h2,
.insight-card h2 { margin: 10px 0 12px; font-size: 26px; }
.service-card p,
.insight-card p { color: var(--muted); }
.service-card .service-no,
.insight-card .insight-cat { color: var(--steel); font-size: 12px; letter-spacing: 0.08em; }
.service-card ul { margin: 18px 0 0; padding-left: 20px; color: var(--muted); }
.service-card .card-actions,
.insight-card .card-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.service-card .text-link,
.insight-card .text-link { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.content-status,
.insight-state,
.notice { border-radius: 0; }

.about-list,
.services-list,
.insights { padding: var(--section-y-editorial) 0 var(--section-y); }
.process,
.final-cta,
.cta { padding-top: var(--section-y-editorial); padding-bottom: var(--section-y-editorial); }
.body,
.related { padding-top: var(--section-y-compact); padding-bottom: var(--section-y-compact); }

.mobile-contact-bar { display: none; }

.news:hover { background: var(--soft-surface); }
.form, .fieldset, .code-card { border: 1px solid var(--border); border-radius: var(--control-radius); }
.field input, .field textarea, .field select,
input[type="text"], input[type="date"], textarea, select {
  background: var(--soft-surface);
  border: 1px solid var(--border);
}
.field input:focus, .field textarea:focus, .field select:focus,
input[type="text"]:focus, input[type="date"]:focus, textarea:focus, select:focus {
  background: var(--bg);
  border-color: var(--fg);
  box-shadow: none;
}
.toast { background: var(--steel); color: var(--bg); border-radius: var(--control-radius); box-shadow: none; }

/* Native queue-driven Shot Viewer: the listing remains mounted while one case owns the foreground. */
body.case-viewer-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}
.case-viewer {
  --case-viewer-media-max: 1024px;
  --case-viewer-copy-max: 752px;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 40px 0 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--fg);
}
.case-viewer:not([open]) { display: none; }
.case-viewer::backdrop {
  background: color-mix(in srgb, var(--fg) 58%, transparent);
}
.case-viewer-shell {
  position: relative;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  background: var(--bg);
  box-shadow: var(--overlay-elevation);
}
.case-viewer-bar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.case-viewer-sequence {
  display: flex;
  align-items: center;
  gap: 8px;
}
.case-viewer-sequence { min-width: 0; }
.case-viewer-step,
.case-viewer-share,
.case-viewer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--soft-surface);
  color: var(--fg);
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 180ms ease, opacity 180ms ease;
}
.case-viewer-step { gap: 8px; padding: 0 14px; }
.case-viewer-step:hover,
.case-viewer-share:hover,
.case-viewer-close:hover { background: var(--border); }
.case-viewer-step:disabled,
.case-viewer-share:disabled { opacity: .42; cursor: default; }
.case-viewer-position {
  min-width: 58px;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-align: center;
}
.case-viewer-close {
  width: 44px;
  height: 44px;
  padding: 0;
}
.case-viewer-share {
  gap: 8px;
  margin-left: auto;
  padding: 0 14px;
}
.case-viewer-share svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.case-viewer-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.case-viewer-status {
  position: absolute;
  top: 76px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--fg);
  color: var(--bg);
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.01em;
  box-shadow: none;
}
.case-viewer-status[hidden] { display: none; }
.case-viewer-feedback {
  position: absolute;
  top: 76px;
  right: 24px;
  z-index: 7;
  max-width: min(360px, calc(100% - 48px));
  padding: 11px 15px;
  border-radius: var(--control-radius);
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: none;
}
.case-viewer-feedback.is-error { background: var(--bg); color: var(--steel); border-color: var(--steel); }
.case-viewer-feedback[hidden] { display: none; }
.case-viewer-share-float {
  position: absolute;
  top: 50%;
  right: clamp(14px, 1.8vw, 28px);
  z-index: 6;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 8px 24px rgba(13, 12, 34, .12);
  transform: translateY(-50%);
  cursor: pointer;
  transition: border-color 150ms var(--ease-standard), box-shadow 150ms var(--ease-standard), opacity 150ms var(--ease-standard);
}
.case-viewer-share-float:hover,
.case-viewer-share-float:focus-visible { border-color: var(--fg); box-shadow: 0 10px 28px rgba(13, 12, 34, .18); }
.case-viewer-share-float:focus-visible { outline: 3px solid var(--steel); outline-offset: 3px; }
.case-viewer-share-float:disabled { opacity: .42; cursor: default; }
.case-viewer-share-float svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.case-viewer-share-hint {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  width: max-content;
  padding: 8px 10px;
  border-radius: var(--control-radius-inner);
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity 100ms var(--ease-standard), transform 100ms var(--ease-standard);
}
.case-viewer-share-float:hover .case-viewer-share-hint,
.case-viewer-share-float:focus-visible .case-viewer-share-hint { opacity: 1; transform: translate(0, -50%); }
.case-share-preview {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  height: min(88dvh, 980px);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 28px 80px rgba(13, 12, 34, .28);
}
.case-share-preview::backdrop { background: rgba(13, 12, 34, .58); }
.case-share-preview-shell { display: grid; grid-template-rows: 64px minmax(0, 1fr) auto; width: 100%; height: 100%; }
.case-share-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px 0 24px; border-bottom: 1px solid var(--border); }
.case-share-preview-head h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.case-share-preview-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--control-radius); background: var(--soft-surface); color: var(--fg); cursor: pointer; }
.case-share-preview-close:hover { background: var(--border); }
.case-share-preview-close:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; }
.case-share-preview-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.case-share-preview-stage { min-height: 0; overflow: auto; padding: clamp(16px, 3vw, 28px); background: var(--soft-surface); text-align: center; overscroll-behavior: contain; }
.case-share-preview-stage img { display: block; width: min(100%, 540px); height: auto; margin: 0 auto; border: 1px solid var(--border); background: var(--bg); box-shadow: 0 12px 36px rgba(13, 12, 34, .1); }
.case-share-preview-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 76px; padding: 12px 16px 12px 24px; border-top: 1px solid var(--border); background: var(--bg); }
.case-share-preview-status { margin: 0; color: var(--muted); font-size: 13px; }
.case-share-preview-status.is-error { color: var(--steel); }
.case-share-preview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.case-share-preview-actions button { min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--control-radius); background: var(--bg); color: var(--fg); font: 600 13px/1 var(--font-body); cursor: pointer; }
.case-share-preview-actions button:hover { border-color: var(--fg); }
.case-share-preview-actions button:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; }
.case-share-preview-actions .case-share-preview-copy { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.case-share-preview-actions button:disabled { opacity: .45; cursor: default; }
.case-share-preview-actions button[hidden] { display: none; }
.case-viewer-scroll {
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.case-viewer-scroll.is-loading .case-viewer-content { opacity: .46; pointer-events: none; }
.case-viewer-content {
  min-height: 100%;
  transition: opacity var(--motion-fast) var(--ease-standard);
  will-change: transform, opacity;
}
.case-viewer-post {
  width: min(var(--case-viewer-media-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 96px;
}
.case-viewer-head {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 48px;
}
.case-viewer-heading { min-width: 0; }
.case-viewer-kicker {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.case-viewer-heading h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.case-viewer-lead {
  max-width: 65ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  text-wrap: pretty;
}
.case-viewer-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.case-viewer-meta-cell {
  min-width: 0;
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid var(--border);
}
.case-viewer-meta-cell:nth-child(even) { padding-left: 12px; padding-right: 0; }
.case-viewer-meta-cell b,
.case-viewer-meta-cell span { display: block; }
.case-viewer-meta-cell b {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-viewer-meta-cell span { font-size: 14px; line-height: 1.45; }
.case-viewer-hero,
.case-viewer-story-media,
.case-viewer-gallery-item,
.case-viewer-rich figure {
  overflow: hidden;
  border-radius: var(--media-radius);
  background: var(--soft-surface);
}
.case-viewer-hero {
  display: grid;
  place-items: center;
  margin: 0 0 88px;
}
.case-viewer-hero img,
.case-viewer-hero video,
.case-viewer-story-media img,
.case-viewer-gallery-item img,
.case-viewer-rich figure img,
.case-viewer-cms-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}
.case-viewer-hero img,
.case-viewer-hero video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(82svh, 900px);
  aspect-ratio: auto;
  object-fit: contain;
}
.case-viewer-brief {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 48px;
  padding: 0 0 88px;
}
.case-viewer-brief h2,
.case-viewer-deliverables h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.case-viewer-brief-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 28px;
}
.case-viewer-brief-copy p,
.case-viewer-story-copy p,
.case-viewer-rich > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.case-viewer-stories { display: grid; gap: 72px; }
.case-viewer-story {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 56px;
  align-items: center;
}
.case-viewer-story:nth-child(even) .case-viewer-story-media { order: 2; }
.case-viewer-story.is-text-only {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  padding: 44px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.case-viewer-story-media,
.case-viewer-gallery-item { display: grid; place-items: center; }
.case-viewer-story-no {
  display: block;
  margin-bottom: 28px;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
}
.case-viewer-story-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.case-viewer-deliverables {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  margin-top: 96px;
  padding: 48px;
  border-radius: var(--control-radius);
  background: var(--soft-surface);
}
.case-viewer-deliverable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}
.case-viewer-deliverable {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.case-viewer-deliverable b { display: block; margin-bottom: 6px; font-size: 15px; }
.case-viewer-deliverable p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.case-viewer-gallery,
.case-viewer-cms-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gallery-gap);
  margin-top: 72px;
}
.case-viewer-cms-gallery img { border-radius: var(--media-radius); }
.case-viewer-rich {
  width: min(var(--case-viewer-copy-max), 100%);
  margin: 72px auto 0;
}
.case-viewer-rich > h2 { margin: 64px 0 18px; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; }
.case-viewer-rich > p { margin: 0 0 24px; }
.case-viewer-rich > figure { margin: 48px 0; }
.case-viewer-rich video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 48px 0;
  border-radius: var(--media-radius);
  background: var(--fg);
  object-fit: contain;
}
.case-viewer-rich figcaption { padding-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.case-viewer-rich blockquote {
  margin: 64px 0 16px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.case-viewer-quote-who { color: var(--muted); font-size: 13px; }
.case-viewer-continue-wrap,
.case-viewer-end {
  margin-top: 96px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.case-viewer-continue {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 20px 24px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--fg);
  color: var(--bg);
  text-align: left;
  cursor: pointer;
}
.case-viewer-continue span { font-size: 13px; letter-spacing: 0.02em; }
.case-viewer-continue strong { font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -0.01em; }
.case-viewer-continue:hover { background: var(--soft-surface); color: var(--fg); }
.case-viewer-end p { color: var(--muted); font-size: 16px; }
.case-viewer-related {
  margin-top: 104px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.case-viewer-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}
.case-viewer-related-head .case-viewer-kicker { margin-bottom: 9px; }
.case-viewer-related-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.case-viewer-related-hint {
  flex: none;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.case-viewer-related-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(210px, 22vw, 280px);
  gap: 16px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 18px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.case-viewer-related-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
}
.case-viewer-related-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: var(--media-radius);
  background: var(--soft-surface);
}
.case-viewer-related-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  transition: opacity 180ms ease;
}
.case-viewer-related-placeholder { color: var(--muted); font: 600 18px/1 var(--font-mono); letter-spacing: .08em; }
.case-viewer-related-card strong {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.case-viewer-related-card > span:last-child {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
.case-viewer-related-card i { font-style: normal; }
.case-viewer-related-card:hover .case-viewer-related-art img { opacity: .94; }
.case-viewer-error {
  display: grid;
  place-items: start;
  align-content: center;
  width: min(620px, calc(100% - 48px));
  min-height: 70vh;
  margin: 0 auto;
}
.case-viewer-error h1 { margin-bottom: 16px; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; }
.case-viewer-error p { margin-bottom: 28px; color: var(--muted); font-size: 17px; }

@media (min-width: 1600px) {
  .case-viewer-gallery, .case-viewer-cms-gallery { gap: var(--gallery-gap-wide); }
}

@media (max-width: 900px) {
  .case-viewer { place-items: stretch; padding: 0; }
  .case-viewer-scroll { scrollbar-width: none; scrollbar-gutter: auto; }
  .case-viewer-scroll::-webkit-scrollbar { display: none; }
  .case-viewer-shell {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
  }
  .case-viewer-post { width: min(var(--case-viewer-media-max), calc(100% - 32px)); padding-top: 40px; }
  .case-viewer-head { grid-template-columns: 1fr; gap: 36px; }
  .case-viewer-brief { grid-template-columns: 1fr; gap: 8px; }
  .case-viewer-story { grid-template-columns: 1fr; gap: 28px; }
  .case-viewer-story:nth-child(even) .case-viewer-story-media { order: 0; }
  .case-viewer-deliverables { grid-template-columns: 1fr; gap: 32px; padding: 36px; }
}

@media (max-width: 680px) {
  .case-viewer {
    padding: 0;
    width: 100%;
    height: 100%;
  }
  .case-viewer-shell {
    width: 100%;
    height: 100%;
    grid-template-rows: 58px minmax(0, 1fr);
    border: 0;
    border-radius: 0;
  }
  .case-viewer-bar { padding: 0 7px; }
  .case-viewer-step { width: 44px; padding: 0; }
  .case-viewer-step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .case-viewer-position { min-width: 50px; }
  .case-viewer-status { top: 68px; }
  .case-viewer-feedback { top: 66px; right: 12px; }
  .case-viewer-share-float { top: auto; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: none; }
  .case-viewer-post { width: 100%; padding: 32px 0 80px; }
  .case-viewer-head,
  .case-viewer-brief,
  .case-viewer-stories,
  .case-viewer-deliverables,
  .case-viewer-gallery,
  .case-viewer-rich,
  .case-viewer-related,
  .case-viewer-continue-wrap,
  .case-viewer-end {
    width: calc(100% - 32px);
    margin-right: auto;
    margin-left: auto;
  }
  .case-viewer-heading h1 { font-size: clamp(36px, 11vw, 52px); }
  .case-viewer-lead { font-size: 16px; }
  .case-viewer-meta { grid-template-columns: 1fr; }
  .case-viewer-meta-cell:nth-child(even) { padding-left: 0; }
  .case-viewer-hero { width: 100%; margin-bottom: 64px; border-radius: 0; }
  .case-viewer-brief { padding-bottom: 64px; }
  .case-viewer-brief-copy { grid-template-columns: 1fr; gap: 18px; }
  .case-viewer-stories { gap: 56px; }
  .case-viewer-story.is-text-only { padding: var(--layout-gap) 0; }
  .case-viewer-deliverables { margin-top: 72px; padding: 28px 22px; }
  .case-viewer-deliverable-grid,
  .case-viewer-gallery,
  .case-viewer-cms-gallery { grid-template-columns: 1fr; }
  .case-viewer-continue { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .case-viewer-continue span:first-child { grid-column: 1 / -1; }
  .case-viewer-related-head { align-items: start; }
  .case-viewer-related-hint { display: none; }
  .case-viewer-related-track { grid-auto-columns: min(78vw, 250px); }
  .case-share-preview { width: calc(100% - 20px); height: calc(100dvh - 20px); border-radius: 12px; }
  .case-share-preview-shell { grid-template-rows: 58px minmax(0, 1fr) auto; }
  .case-share-preview-head { padding-left: 16px; }
  .case-share-preview-stage { padding: 14px; }
  .case-share-preview-foot { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .case-share-preview-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-share-preview-actions button { padding-inline: 10px; }
  .case-share-preview-actions .case-share-preview-copy { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .case-viewer-share { width: 44px; padding: 0; }
  .case-viewer-share-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .case-viewer, .case-viewer *, .case-art, .case-art img, .case-art video { scroll-behavior: auto !important; transition: none !important; }
}

.ftr {
  padding: var(--section-y-compact) 0 var(--content-gap);
  background: var(--fg);
  color: var(--soft-surface);
}
.ftr-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--layout-gap);
  margin-bottom: var(--section-y-tight);
}
.ftr .brand-tx b, .ftr-grid h4, .ftr-col h4, .ftr b { color: var(--bg); }
.ftr-grid h4, .ftr-col h4 {
  margin-bottom: var(--content-gap-tight);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
}
.ftr-grid a, .ftr-grid p, .ftr-col a, .ftr-col p {
  display: block;
  margin-bottom: 8px;
  color: var(--border);
  font-size: 14px;
}
.ftr-grid a, .ftr-col a { transition: color .15s; }
.ftr-grid a:hover, .ftr-col a:hover { color: var(--bg); }
.ftr-about {
  max-width: 34ch;
  margin-top: var(--content-gap-tight);
  color: var(--border);
  font-size: 14px;
  line-height: 1.75;
}
.ftr-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--content-gap-tight);
  margin-top: 0;
  padding-top: var(--content-gap);
  border-top: 1px solid var(--ink-line);
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.ftr > .wrap + .ftr-bottom { margin-top: var(--layout-gap); }

.crumb { color: var(--muted); }
.art-head h1, .case-head h1 { max-width: 18ch; }
.meta { border-color: var(--border); }
.cover img, .story img, .rd figure img, .rd-gallery img, .art figure img,
.art .bgallery .g, .art .bgallery img {
  border: 0;
  border-radius: var(--media-radius);
}
.story, .quote, .deliver-grid, .pager { border-color: var(--border); }
.cta { background: var(--soft-surface); }

.app { background: var(--bg); }
.side { background: var(--fg); color: var(--bg); }
.side .brand-glyph, .side .brand b { color: var(--bg); }
.nav-item, .li-m, .conn, .list-head { color: var(--border); }
.nav-item:hover, .nav-item.on, .li:hover, .li.on { background: var(--soft-surface); color: var(--fg); }
.nav-item.on svg, .nav-item:hover svg { color: var(--accent); }
.editor, .ed-bar { background: var(--bg); }
.ed-bar { border-color: var(--border); backdrop-filter: none; -webkit-backdrop-filter: none; }
.fieldset, .block, .code-card { background: var(--bg); }
.block, .block.t-quote, .block.t-subhead { border-left: 1px solid var(--border); border-radius: var(--control-radius); }
.block-bar, .set-hint, .set-foot { background: var(--soft-surface); }
.add-btn { border-style: solid; border-color: var(--border); color: var(--fg); }
.add-btn:hover { background: var(--fg); color: var(--bg); }
.img-drop, .login-card input { background: var(--soft-surface); border-radius: var(--control-radius); }
.preview, .pv-ov, .set-ov { background: var(--soft-surface); }
.preview, .set-card, .login-card { box-shadow: none; border-radius: var(--control-radius); }
.art { background: var(--bg); }
.art .summary { border-left: 1px solid var(--border); }
.code-card pre { font-family: var(--font-mono); background: var(--soft-surface); color: var(--fg); }
.login-ov { background: var(--fg); background-image: none; }
.pill, .chip, .tab { border-radius: var(--control-radius); }
.pill.draft, .pill.pub { background: var(--soft-surface); color: var(--fg); }
.tab.on, .chip.on, .lang-sw button.on { background: var(--fg); color: var(--bg); }
.login-err { background: var(--soft-surface); color: var(--accent); }

@media (max-width: 1024px) {
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hdr .nav, .hdr .tel { display: none; }
  .hdr .menu-btn { display: flex; }
  .hdr.open .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 8px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }
  .hdr.open .nav a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
}

@media (min-width: 1600px) {
  .case-grid { grid-template-columns: repeat(auto-fill, minmax(var(--shot-card-min-wide), 1fr)); gap: var(--gallery-gap-wide); }
  .case-showcase .case-grid,
  .cases-main .case-grid { grid-template-columns: repeat(auto-fill, minmax(var(--shot-card-min-wide), 1fr)); gap: var(--gallery-gap-wide); }
}
@media (max-width: 680px) {
  .topbar { display: none; }
  .ftr { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .wrap { padding-inline: var(--container-gutter-mobile); }
  .hdr .wrap { width: 100%; max-width: none; padding-inline: var(--container-gutter-mobile); }
  .case-showcase > .wrap,
  .cases-main > .wrap { padding-inline: var(--container-gutter-mobile); }
  .hdr-in { width: 100%; gap: 8px; }
  .hdr-right { flex: 0 0 auto; gap: 6px; }
  .brand { min-width: 0; flex: 1 1 auto; gap: 10px; overflow: hidden; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-wording { width: 94px; min-width: 0; overflow: hidden; }
  .brand-wordmark { width: 94px; }
  .brand .brand-subtitle { display: none; }
  .brand-tx { min-width: 0; overflow: hidden; }
  .brand-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-glyph { width: 34px; height: 34px; }
  .brand-tx b { font-size: 20px; }
  .brand-tx small { display: none; }
  .hdr.open .nav { width: 100%; max-height: calc(100dvh - 76px); overflow-y: auto; padding: 8px clamp(16px, 5.13vw, 20px); }
  .hdr.open ~ .mobile-contact-bar { visibility: hidden; pointer-events: none; }
  .page-hero h1, .art-head h1, .case-head h1,
  .service-bridge h2, .final-cta h2 { max-width: 100%; overflow-wrap: anywhere; }
  .btn, .bridge-links a, .card-actions a { max-width: 100%; }
  input, textarea, select { min-width: 0; max-width: 100%; }
  .case-grid { grid-template-columns: 1fr; gap: 24px; }
  .case-art { aspect-ratio: 4 / 3; }
  .sec { padding-top: var(--section-y-mobile); padding-bottom: var(--section-y-mobile); }
  .section-actions { align-items: flex-start; flex-direction: column; }
  .related-grid,
  .service-grid,
  .insight-grid { grid-template-columns: 1fr; }
  .page-hero { padding-top: var(--section-y-mobile-compact); }
  .about-list,
  .services-list,
  .insights { padding: var(--section-y-mobile-compact) 0 var(--section-y-mobile); }
  .process,
  .final-cta,
  .cta,
  .body,
  .related { padding-top: var(--section-y-mobile); padding-bottom: var(--section-y-mobile); }
  .ftr-grid { grid-template-columns: 1fr; }
  .mobile-contact-bar {
    position: fixed;
    z-index: 110;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    min-width: 0;
    max-width: calc(100% - 24px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 6px;
    overflow: hidden;
    background: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
  }
  .mobile-contact-bar a {
    min-width: 0;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    color: var(--bg);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--control-radius-inner);
  }
  .mobile-contact-bar a:last-child { background: var(--accent); color: var(--fg); }
}
@media (max-width: 360px) {
  .hdr .brand-wording { display: none; }
  .hdr .brand-tx { display: none; }
  .mobile-contact-bar {
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100% - 16px);
  }
  .case-viewer-bar { gap: 6px; padding: 0 6px; }
  .case-viewer-position { min-width: 42px; }
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}

/* Shared motion language: one scene, one focal movement, one lifecycle. */
@keyframes hp-page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes hp-state-settle {
  from { opacity: .45; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes hp-viewer-open {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hp-viewer-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body > main {
  animation: hp-page-enter var(--motion-base) var(--ease-enter) both;
}
body > .hdr {
  animation: hp-page-enter var(--motion-fast) var(--ease-standard) both;
}
[data-motion-reveal] {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--motion-base) var(--ease-standard),
    transform 360ms var(--ease-enter);
}
html.hp-motion-ready [data-motion-reveal]:not([data-motion-visible]) {
  opacity: 0;
  transform: translateY(8px);
}
[data-motion-reveal][data-motion-visible] { opacity: 1; transform: none; }
[data-content-state="loaded"].hp-state-settled {
  animation: hp-state-settle var(--motion-base) var(--ease-enter) both;
}
.case-viewer[open]:not(.is-closing) .case-viewer-shell {
  animation: hp-viewer-open var(--motion-scene) var(--ease-enter) both;
  will-change: transform, opacity;
}
.case-viewer[open]:not(.is-closing)::backdrop {
  animation: hp-viewer-backdrop-in var(--motion-fast) var(--ease-standard) both;
}
.case-viewer.is-closing .case-viewer-shell {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--motion-fast) var(--ease-exit),
    transform 220ms var(--ease-exit);
}
.case-viewer.is-closing::backdrop {
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease-exit);
}

@media (prefers-reduced-motion: reduce) {
  body > main,
  body > .hdr,
  [data-content-state="loaded"].hp-state-settled > *,
  [data-content-state="loaded"].hp-state-settled,
  .case-viewer[open] .case-viewer-shell,
  .case-viewer[open]::backdrop {
    animation: none !important;
  }
  [data-motion-reveal],
  [data-motion-reveal][data-motion-visible],
  .case-viewer.is-closing .case-viewer-shell {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}
