/* ============================================================
   TAKEBOX — custom transport cases
   Type + tone system. Dark (ink) default, light (paper) flip.
   ============================================================ */

:root {
  /* accent (tweakable) — industrial pine green, not AI-blue */
  --accent: #1f6b54;
  --accent-fg: #ffffff;

  /* page tone = PAPER (warm) — default */
  --page-bg: #f2eee5;
  --page-bg-2: #faf7f0;
  --page-fg: #17150f;
  --page-muted: #5b554a;
  --page-faint: #908a7c;
  --page-border: rgba(23, 21, 15, 0.18);
  --page-hairline: rgba(23, 21, 15, 0.10);
  --page-surface: #faf7f0;
  --page-surface-2: #eae4d7;

  /* inverted tone = INK (warm black) */
  --inv-bg: #17150f;
  --inv-bg-2: #211e16;
  --inv-fg: #f2eee5;
  --inv-muted: #aaa494;
  --inv-faint: #797264;
  --inv-border: rgba(242, 238, 229, 0.16);
  --inv-hairline: rgba(242, 238, 229, 0.09);
  --inv-surface: rgba(242, 238, 229, 0.05);
  --inv-surface-2: rgba(242, 238, 229, 0.09);

  --radius: 8px;
  --radius-sm: 6px;
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 56px);

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Manrope", system-ui, sans-serif;
  --ff-mono: "Space Mono", ui-monospace, monospace;
  --ff-logo: "Anton", "Archivo", "Space Grotesk", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="light"] { color-scheme: light; }

/* dark / ink theme: swap page <-> inverted token sets */
[data-theme="dark"] {
  --page-bg: #17150f;
  --page-bg-2: #211e16;
  --page-fg: #f2eee5;
  --page-muted: #aaa494;
  --page-faint: #797264;
  --page-border: rgba(242, 238, 229, 0.16);
  --page-hairline: rgba(242, 238, 229, 0.09);
  --page-surface: rgba(242, 238, 229, 0.05);
  --page-surface-2: rgba(242, 238, 229, 0.09);

  --inv-bg: #f2eee5;
  --inv-bg-2: #faf7f0;
  --inv-fg: #17150f;
  --inv-muted: #5b554a;
  --inv-faint: #908a7c;
  --inv-border: rgba(23, 21, 15, 0.18);
  --inv-hairline: rgba(23, 21, 15, 0.10);
  --inv-surface: #faf7f0;
  --inv-surface-2: #eae4d7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--page-bg);
  color: var(--page-fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- tone scoping ---------- */
.section {
  background: var(--bg);
  color: var(--fg);
  --bg: var(--page-bg);
  --bg-2: var(--page-bg-2);
  --fg: var(--page-fg);
  --muted: var(--page-muted);
  --faint: var(--page-faint);
  --border: var(--page-border);
  --hairline: var(--page-hairline);
  --surface: var(--page-surface);
  --surface-2: var(--page-surface-2);
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.section.invert {
  --bg: var(--inv-bg);
  --bg-2: var(--inv-bg-2);
  --fg: var(--inv-fg);
  --muted: var(--inv-muted);
  --faint: var(--inv-faint);
  --border: var(--inv-border);
  --hairline: var(--inv-hairline);
  --surface: var(--inv-surface);
  --surface-2: var(--inv-surface-2);
}

/* Plástev — honeycomb on every LIGHT section (not dark, not footer;
   hero keeps its own masked .grid-bg). */
.section:not(.invert):not(.footer):not(.hero) {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='49'%3E%3Cg%20fill='none'%20stroke='%23000000'%20stroke-opacity='.07'%20stroke-width='1'%3E%3Cpath%20d='M14%200L1%207.5M14%200l13%207.5M14%2049L1%2041.5M14%2049l13-7.5'/%3E%3Cpath%20d='M13.99%209.25l13%207.5v15l-13%207.5L1%2031.75v-15z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 50px 88px;
}

/* Section reorder (visual only — DOM order kept so editor state stays intact):
   "Od nápadu k řešení" (#proces) sits directly under the hero. */
main#top { display: flex; flex-direction: column; }
main#top > .hero { order: -2; }
main#top > #proces { order: -1; }

/* Homepage stays clean — Showroom realization & production options now live on the Showroom page. */
[data-hero] #showroom,
[data-hero] #moznosti { display: none; }

/* Inquiry form simplified — "Co potřebujete vyrobit?" + "Počet kusů" removed. */
.field:has(input[name="what"]),
.field:has(input[name="qty"]) { display: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.center { justify-content: center; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.6rem, 7vw, 6rem);
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 60ch;
  text-wrap: pretty;
}
.muted { color: var(--muted); }

/* section heading block */
.sec-head { max-width: 720px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { margin-top: 18px; }
.sec-head .lead { margin-top: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: none;
}
.btn-primary:hover { background: color-mix(in oklab, var(--accent), white 12%); transform: translateY(-2px); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--fg);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }

/* ---------- top utility bar ---------- */
.utility {
  background: var(--inv-bg);
  color: rgba(242,238,229,0.82);
  border-bottom: 1px solid var(--inv-border);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.utility .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.utility a { color: var(--inv-fg); transition: color 0.2s; }
.utility a:hover { color: var(--accent); }
.utility .uleft, .utility .uright { display: flex; gap: 22px; align-items: center; }
.utility .udot { color: var(--accent); }

/* utility-bar language switcher — dropdown (CS/EN active · ostatní brzy) */
.u-langs { position: relative; display: inline-flex; }
.u-lang-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: rgba(242,238,229,0.72); background: rgba(242,238,229,0.06);
  border: 1px solid rgba(242,238,229,0.14); padding: 5px 9px; border-radius: 7px;
  cursor: pointer; transition: 0.2s var(--ease);
}
.u-lang-trigger:hover { color: var(--inv-fg); background: rgba(242,238,229,0.12); }
.u-lang-caret { width: 12px; height: 12px; transition: transform 0.2s var(--ease); }
.u-langs[data-open="true"] .u-lang-caret { transform: rotate(180deg); }
.u-lang-menu {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 80;
  min-width: 186px; padding: 6px; max-height: 320px; overflow-y: auto;
  background: #1c1b16; border: 1px solid rgba(242,238,229,0.14); border-radius: 11px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; gap: 1px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}
.u-langs[data-open="true"] .u-lang-menu, .u-langs:hover .u-lang-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.u-lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-family: var(--ff-body); font-size: 13px; font-weight: 500; text-align: left;
  color: rgba(242,238,229,0.82); background: transparent; border: 0;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: 0.15s var(--ease);
}
.u-lang-opt:not(:disabled):hover { background: rgba(242,238,229,0.09); color: var(--inv-fg); }
.u-lang-opt.active, .u-lang-opt.on { background: var(--accent); color: var(--accent-fg); }
.u-lang-code { font-family: var(--ff-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.7; }
.u-lang-opt:disabled { color: rgba(242,238,229,0.4); cursor: default; }
.u-lang-soon {
  font-family: var(--ff-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(242,238,229,0.34); border: 1px solid rgba(242,238,229,0.16); padding: 2px 5px; border-radius: 5px;
}

@media (max-width: 760px) { .utility .uleft span.hide-sm { display: none; } }

/* CMS live-preview: highlight the most recently edited element (glow + scroll) */
.tb-pv-flash { animation: tbPvFlash 1.5s var(--ease) 4 both; border-radius: 6px; }
@keyframes tbPvFlash {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent), transparent 75%); outline: 2px solid color-mix(in oklab, var(--accent), transparent 35%); outline-offset: 3px; }
  50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent), transparent 55%), 0 0 26px 10px color-mix(in oklab, var(--accent), transparent 55%); outline: 2px solid var(--accent); outline-offset: 3px; }
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--page-bg), transparent 18%);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--page-border);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand {
  font-family: var(--ff-logo);
  font-weight: 400;
  font-size: 1.95rem;
  line-height: 1;
  letter-spacing: 0.004em;
  color: var(--page-fg);
  display: flex;
  align-items: center;
  gap: 3px;
}
.brand .tld { font-family: var(--ff-mono); font-size: 0.7rem; font-weight: 700; color: var(--page-faint); letter-spacing: 0; align-self: flex-end; margin-bottom: 4px; }
.brand .mark {
  width: 44px; height: 44px; margin-right: 13px;
  display: inline-block;
  flex: none;
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--page-muted);
  transition: color 0.2s;
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav a:hover { color: var(--page-fg); }
.nav a:hover::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 14px; }
.tb-lang { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--page-surface); border: 1px solid var(--page-border); }
.tb-lang-btn {
  font-family: var(--ff-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--page-muted); background: transparent; border: 0; padding: 7px 11px; border-radius: 999px; transition: 0.2s var(--ease);
}
.tb-lang-btn:hover { color: var(--page-fg); }
.tb-lang-btn.active { background: var(--accent); color: var(--accent-fg); }
@media (max-width: 1000px) { .nav { display: none; } .header-cta .btn { display: none; } }

.burger {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--page-border);
  border-radius: 11px;
  background: var(--page-surface);
  flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.burger span { width: 18px; height: 2px; background: var(--page-fg); transition: 0.25s var(--ease); }
@media (max-width: 1000px) { .burger { display: flex; } }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: color-mix(in oklab, var(--page-bg), black 6%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 3.4rem);
  letter-spacing: -0.03em;
  color: var(--page-fg);
  padding: 6px 0;
  border-bottom: 1px solid var(--page-hairline);
  display: flex; align-items: baseline; justify-content: space-between;
  transform: translateY(12px);
  opacity: 0;
}
body.menu-open .mobile-menu a { animation: menuIn 0.5s var(--ease) forwards; }
.mobile-menu a .idx { font-family: var(--ff-mono); font-size: 0.9rem; color: var(--page-faint); }
@keyframes menuIn { to { transform: translateY(0); opacity: 1; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero .grid-bg {
  position: absolute; inset: 0;
  /* Plástev — honeycomb (echoes the hexagonal flight-case laminate) */
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='49'%3E%3Cg%20fill='none'%20stroke='%23000000'%20stroke-opacity='.07'%20stroke-width='1'%3E%3Cpath%20d='M14%200L1%207.5M14%200l13%207.5M14%2049L1%2041.5M14%2049l13-7.5'/%3E%3Cpath%20d='M13.99%209.25l13%207.5v15l-13%207.5L1%2031.75v-15z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 50px 88px;
  mask-image: radial-gradient(circle at 70% 35%, black, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 70% 35%, black, transparent 78%);
  pointer-events: none;
}
.hero .glow {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 72% 30%,
      color-mix(in oklab, var(--accent), transparent 74%) 0%,
      transparent 36%),
    radial-gradient(circle at 12% 88%,
      color-mix(in oklab, var(--accent), transparent 88%) 0%,
      transparent 42%);
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(64px, 10vw, 132px);
}
.hero-copy { max-width: 640px; }
.hero h1 { margin-top: 26px; }
.hero .lead { margin-top: 30px; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 52px;
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}
.hero-stats .stat { padding: 22px 26px 0 0; margin-right: 26px; border-right: 1px solid var(--hairline); }
.hero-stats .stat:last-child { border-right: 0; }
.hero-stats .num { font-family: var(--ff-display); font-weight: 900; font-size: 1.9rem; letter-spacing: -0.03em; }
.hero-stats .lbl { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }

.hero-figure { position: relative; }
.frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.8);
}
.frame .ph { aspect-ratio: 1.12 / 1; border-radius: 10px; overflow: hidden; }
.frame .ph img { width: 100%; height: 100%; object-fit: cover; }

/* hero product carousel */
.hero-carousel { position: relative; }
.hero-carousel img { transition: opacity 0.25s var(--ease); }
.hc-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.28);
  cursor: pointer; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  transition: background 0.2s, border-color 0.2s; z-index: 3;
}
.hc-nav:hover { background: var(--accent); border-color: var(--accent); }
.hc-nav svg { width: 20px; height: 20px; }
.hc-prev { left: 14px; }
.hc-prev svg { transform: rotate(180deg); }
.hc-next { right: 14px; }
.hc-zoom {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.28);
  cursor: pointer; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  transition: background 0.2s, border-color 0.2s; z-index: 3;
}
.hc-zoom:hover { background: var(--accent); border-color: var(--accent); }
.hc-zoom svg { width: 18px; height: 18px; }
.hc-name, .hc-counter {
  position: absolute; bottom: 14px; z-index: 3;
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.08em;
  color: #fff; background: rgba(10,10,12,0.6); padding: 5px 10px; border-radius: 999px;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.hc-name { left: 14px; text-transform: uppercase; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-counter { right: 14px; }
/* corner ticks */
.ticks::before, .ticks::after,
.ticks > .tick-bl, .ticks > .tick-br {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); pointer-events: none;
}
.ticks::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ticks::after { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.ticks > .tick-bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.ticks > .tick-br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.spec-tag {
  position: absolute;
  bottom: 30px; left: -22px;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 20px 40px -18px color-mix(in oklab, var(--accent), transparent 30%);
}

/* hero variant: centered */
[data-hero="centered"] .hero-grid { grid-template-columns: 1fr; text-align: center; }
[data-hero="centered"] .hero-copy { max-width: 900px; margin-inline: auto; }
[data-hero="centered"] .eyebrow { justify-content: center; }
[data-hero="centered"] .hero-actions { justify-content: center; }
[data-hero="centered"] .hero-stats { justify-content: center; display: inline-flex; margin-inline: auto; }
[data-hero="centered"] .hero-figure { margin-top: 8px; }
[data-hero="centered"] .frame .ph { aspect-ratio: 2.4 / 1; }
[data-hero="centered"] .spec-tag { left: 24px; }

/* hero variant: full-bleed overlay */
[data-hero="bleed"] .hero-figure { display: none; }
[data-hero="bleed"] .hero-bleed-img { display: block; }
.hero-bleed-img { display: none; position: absolute; inset: 0; }
.hero-bleed-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62); }
[data-hero="bleed"] .hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in oklab, var(--bg), transparent 35%) 55%, transparent 100%);
}
[data-hero="bleed"] .hero-grid { grid-template-columns: 1fr; min-height: 78vh; }
[data-hero="bleed"] .hero-copy { max-width: 700px; }

@media (max-width: 900px) {
  .hero-grid { display: flex; flex-direction: column; }
  /* flatten hero-copy so the carousel can sit ABOVE the stats on mobile */
  .hero-copy { display: contents; }
  .hero-copy > .eyebrow { order: 1; }
  .hero-copy > .display { order: 2; }
  .hero-copy > .lead { order: 3; }
  .hero-copy > .hero-actions { order: 4; }
  .hero-figure { order: 5; display: block; margin-top: 26px; max-width: 460px; }
  .hero-copy > .hero-stats { order: 6; margin-top: 38px; }
  .spec-tag { left: 18px; }
}

/* ---------- benefits strip ---------- */
.benefits { border-bottom: 1px solid var(--border); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.benefit {
  padding: clamp(28px, 3vw, 44px) clamp(24px, 2.4vw, 38px);
  border-right: 1px solid var(--hairline);
  position: relative;
  background: var(--surface);
  transition: background 0.25s var(--ease);
}
.benefit:last-child { border-right: 0; }
.benefit:hover { background: var(--surface-2); }
.benefit .icon { width: 30px; height: 30px; color: var(--accent); stroke-width: 1.7; }
.benefit .idx { font-family: var(--ff-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.1em; position: absolute; top: clamp(28px,3vw,44px); right: clamp(24px,2.4vw,38px); }
.benefit h3 { font-size: 1.2rem; margin-top: 34px; }
.benefit p { color: var(--muted); font-size: 0.92rem; margin: 12px 0 0; }
@media (max-width: 900px) { .benefits-grid { grid-template-columns: 1fr 1fr; } .benefit:nth-child(2n) { border-right: 0; } .benefit { border-bottom: 1px solid var(--hairline); } }
@media (max-width: 560px) { .benefits-grid { grid-template-columns: 1fr; } .benefit { border-right: 0; } }

/* ---------- generic section padding ---------- */
.pad { padding-block: clamp(72px, 9vw, 128px); }

/* --- merged dark block: process steps + benefit cards read as one section --- */
#proces { padding-bottom: clamp(40px, 5vw, 60px); }
#case-na-miru.benefits { border-bottom: 0; padding-bottom: clamp(64px, 8vw, 104px); }
#case-na-miru.benefits .benefit { background: var(--surface-2); transition: background 0.25s var(--ease); }
/* benefit cards — hover effect (matches the process steps above) */
#case-na-miru.benefits .benefit::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease); pointer-events: none;
}
#case-na-miru.benefits .benefit:hover::before { transform: scaleX(1); }
#case-na-miru.benefits .benefit:hover { background: rgba(242, 238, 229, 0.075); }
#case-na-miru.benefits .benefit .icon { transition: transform 0.3s var(--ease); }
#case-na-miru.benefits .benefit:hover .icon { transform: scale(1.16) translateY(-2px); }
#case-na-miru.benefits .benefit h3 { transition: color 0.25s var(--ease); }
#case-na-miru.benefits .benefit:hover h3 { color: var(--accent); }
#case-na-miru.benefits .benefit p { transition: color 0.25s var(--ease); }
#case-na-miru.benefits .benefit:hover p { color: var(--inv-fg); }

/* ---------- showroom ---------- */
.showroom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.card {
  position: relative;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, #edeef2 0%, #9da0a9 38%, #c9cbd2 56%, #83858f 100%) border-box;
  border: 3px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* aluminium ball corners */
.card::before {
  content: "";
  position: absolute; inset: 3px; z-index: 4; pointer-events: none; border-radius: 7px;
  background:
    radial-gradient(circle 6px at 0% 0%, #eef0f3, #8f9099 72%, transparent 76%),
    radial-gradient(circle 6px at 100% 0%, #eef0f3, #8f9099 72%, transparent 76%),
    radial-gradient(circle 6px at 0% 100%, #eef0f3, #8f9099 72%, transparent 76%),
    radial-gradient(circle 6px at 100% 100%, #eef0f3, #8f9099 72%, transparent 76%);
  background-repeat: no-repeat;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -40px rgba(0,0,0,0.6), 0 0 0 1px color-mix(in oklab, var(--accent), transparent 35%); }
.card .media { aspect-ratio: 4/3; overflow: hidden; position: relative; background: var(--surface-2); border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, #c9cbd1, #8d9099 50%, #c9cbd1) 1; }
/* riveted aluminium rail between photo and text */
.card .media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 4px; z-index: 2; pointer-events: none;
  background: radial-gradient(circle 1.5px at 1.5px 50%, rgba(230,232,236,0.85) 0 1.5px, transparent 2px);
  background-size: 16px 4px; background-repeat: repeat-x;
}
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .media img { transform: scale(1.06); }
.card .media .num { position: absolute; top: 12px; left: 14px; font-family: var(--ff-mono); font-size: 11px; color: #fff; background: rgba(0,0,0,0.5); padding: 4px 8px; border-radius: 6px; letter-spacing: 0.08em; backdrop-filter: blur(4px); }
.card .body { padding: 22px; display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.card .body h3 { font-size: 1.12rem; }
.card .body p { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0; }
.card .body .go { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; color: var(--accent); transition: 0.25s var(--ease); }
.card:hover .body .go { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.card .body .go svg { width: 16px; height: 16px; }
@media (max-width: 1000px) { .showroom-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .showroom-grid { grid-template-columns: 1fr; } }
.card .media .num { display: none; }

/* showroom page: filter + product cards */
.sr-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.chip {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; cursor: pointer; transition: 0.2s var(--ease);
}
.chip:hover { color: var(--fg); border-color: color-mix(in oklab, var(--accent), transparent 40%); }
.chip.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.sr-grid { margin-top: 30px; }
.sr-grid .card { text-decoration: none; color: inherit; display: block; }
.sr-cat { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 8px; }
.sr-grid .card .body h3 { font-size: 1.12rem; }

/* catalog cards — light (paper) body + readable dark text + scrollable photo thumbnails */
.sr-grid .card {
  background:
    linear-gradient(#faf7f0, #faf7f0) padding-box,
    linear-gradient(135deg, #edeef2 0%, #9da0a9 38%, #c9cbd2 56%, #83858f 100%) border-box;
}
.sr-grid .card .media { display: block; background: #e9eaed; }
.sr-grid .card .body { background: #faf7f0; }
.sr-grid .card .body h3 { color: #17150f; }
.sr-grid .card .body p { color: #5b554a; }
.sr-grid .card .body .go { border-color: rgba(23,21,15,0.18); }
.sr-thumbs {
  display: flex; gap: 7px; padding: 10px 12px; background: #efe9de;
  overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.sr-thumbs::-webkit-scrollbar { height: 6px; }
.sr-thumbs::-webkit-scrollbar-thumb { background: rgba(23,21,15,0.22); border-radius: 999px; }
.sr-thumb {
  flex: 0 0 58px; aspect-ratio: 4 / 3; border: 1px solid rgba(23,21,15,0.16); border-radius: 6px;
  overflow: hidden; padding: 0; background: #e9eaed; cursor: pointer; opacity: 0.6;
  transition: 0.2s var(--ease); scroll-snap-align: start;
}
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-thumb:hover { opacity: 0.9; }
.sr-thumb.on { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent), transparent 55%); }

/* product detail page */
.pdp-back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.pdp-back:hover { color: var(--accent); }
.pdp-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: 32px; }
.pdp-gallery { position: sticky; top: 96px; }
.pdp-main { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 4/3; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.pdp-thumb { aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface); cursor: pointer; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-thumb.on { border-color: var(--accent); }
.pdp-thumb-slot { cursor: default; }
.pdp-spec-h { font-family: var(--ff-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 38px 0 6px; }
.pspecs { list-style: none; margin: 0; padding: 0; }
.pspecs li { display: flex; justify-content: space-between; gap: 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.pspecs li span { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.pspecs li b { font-weight: 600; text-align: right; }
@media (max-width: 880px) { .pdp-grid { grid-template-columns: 1fr; } .pdp-gallery { position: static; } }

/* ---------- options (spec sheet) ---------- */
.options-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(36px, 5vw, 80px); align-items: stretch; }
.options-figure { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); min-height: 360px; }
.options-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.options-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 0; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.option {
  padding: 26px 24px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  transition: background 0.2s var(--ease);
}
.option:hover { background: var(--surface-2); }
.option .top { display: flex; align-items: center; gap: 12px; }
.option .icon { width: 22px; height: 22px; color: var(--accent); stroke-width: 1.8; }
.option .pn { font-family: var(--ff-mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0.08em; margin-left: auto; }
.option h3 { font-size: 1.02rem; margin-top: 16px; }
.option p { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
@media (max-width: 900px) { .options-grid { grid-template-columns: 1fr; } .options-figure img { min-height: 320px; } }
@media (max-width: 460px) { .options-list { grid-template-columns: 1fr; } }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 56px; position: relative; }
.step { padding: 0 22px; position: relative; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 24px; left: calc(50% + 30px); right: calc(-50% + 30px); height: 1px;
  background: var(--hairline);
  transition: background 0.3s var(--ease);
}
.step:hover:not(:last-child)::after { background: color-mix(in oklab, var(--accent), transparent 35%); }
.step .dot {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid; place-items: center;
  font-family: var(--ff-mono); font-weight: 700; font-size: 1rem; color: var(--accent);
  position: relative; z-index: 2;
  transition: 0.3s var(--ease);
}
.step.on .dot, .step:hover .dot {
  background: var(--accent); color: var(--accent-fg); border-color: var(--accent);
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 34px -12px color-mix(in oklab, var(--accent), transparent 35%);
}
.step h3 { font-size: 1.08rem; margin-top: 26px; transition: color 0.25s var(--ease); }
.step:hover h3 { color: var(--accent); }
.step p { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; transition: color 0.25s var(--ease); }
.step:hover p { color: var(--fg); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; gap: 36px 0; } .step::after { display: none; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- inquiry + contact ---------- */
.inquiry-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--bg-2);
}
.inquiry-form { padding: clamp(30px, 4vw, 56px); }
.inquiry-form h2 { margin-top: 16px; }
.inquiry-form .lead { margin-top: 16px; font-size: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.field label .req { color: var(--accent); }
.field input, .field textarea {
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface-2); }
.field.error input, .field.error textarea { border-color: #ef4444; }
.field .err { font-family: var(--ff-mono); font-size: 10.5px; color: #ef4444; letter-spacing: 0.04em; min-height: 0; display: none; }
.field.error .err { display: block; }
.form-foot { display: flex; align-items: center; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.form-note { font-family: var(--ff-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }

.form-success {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 300px;
  padding: clamp(30px,4vw,56px);
}
.form-success.show { display: flex; animation: fadeUp 0.5s var(--ease); }
.form-success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.form-success .check svg { width: 32px; height: 32px; }
.form-success h3 { font-size: 1.8rem; margin-top: 26px; }
.form-success p { color: var(--muted); margin-top: 14px; max-width: 44ch; }
.inquiry-form.sent .form-body { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.contact-aside {
  background: var(--inv-bg);
  color: var(--inv-fg);
  padding: clamp(30px, 4vw, 48px);
  display: flex;
  flex-direction: column;
}
.contact-aside h3 { font-size: 1.6rem; }
.contact-aside .lead { color: var(--inv-muted); margin-top: 14px; font-size: 0.98rem; }
.contact-list { margin-top: 32px; display: flex; flex-direction: column; gap: 2px; }
.contact-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--inv-hairline); }
.contact-row svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.contact-row .ctxt { font-size: 0.95rem; }
.contact-row .clbl { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--inv-faint); display: block; margin-bottom: 2px; }
.contact-card {
  margin-top: auto;
  padding-top: 28px;
}
.contact-card .box {
  border: 1px solid color-mix(in oklab, var(--accent), transparent 55%);
  background: color-mix(in oklab, var(--accent), transparent 88%);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-card .box svg { width: 28px; height: 28px; color: var(--accent); }
.contact-card .box h4 { font-size: 1.1rem; margin-top: 16px; }
.contact-card .box p { color: var(--inv-muted); font-size: 0.88rem; margin: 8px 0 0; }
@media (max-width: 860px) { .inquiry-panel { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); }
.footer .wrap { padding-block: 56px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { font-size: 2.7rem; }
.footer .brand .mark { width: 64px; height: 64px; margin-right: 16px; }
.footer .brand .tld { font-size: 0.9rem; margin-bottom: 6px; }
.footer .tagline { color: var(--muted); max-width: 36ch; margin-top: 16px; font-size: 0.92rem; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; font-weight: 700; }
.footer-col a { display: block; color: var(--muted); font-size: 0.9rem; padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--ff-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--gutter);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  max-width: 1080px; width: 100%;
  background: #111114;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
  display: grid; grid-template-columns: 1.4fr 0.95fr;
  max-height: 88vh;
}
.lightbox.show .lightbox-inner { transform: scale(1); }
/* product viewer mode (hero zoom): image-only, no spec panel */
.lightbox.is-product .lightbox-inner { grid-template-columns: 1fr; }
.lightbox.is-product .lightbox-meta { display: none; }

.lb-gallery { display: flex; flex-direction: column; background: #0a0a0c; min-width: 0; }
.lb-main { position: relative; flex: 1; min-height: 0; background: #0a0a0c; }
.lb-main img { width: 100%; height: 100%; max-height: 64vh; object-fit: cover; display: block; }
.lb-counter {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; color: #fff;
  background: rgba(0,0,0,0.55); padding: 5px 10px; border-radius: 7px; backdrop-filter: blur(6px);
}
.lb-caption {
  position: absolute; left: 16px; bottom: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px);
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.04em; color: #fff;
  background: rgba(0,0,0,0.6); padding: 9px 13px; border-radius: 9px; backdrop-filter: blur(6px);
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.5);
  color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}
.lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.lb-nav svg { width: 20px; height: 20px; }
.lb-prev { left: 14px; }
.lb-prev svg { transform: rotate(180deg); }
.lb-next { right: 14px; }
.lb-thumbs {
  display: flex; gap: 8px; padding: 12px; overflow-x: auto; background: #111114;
  border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.lb-thumbs button {
  flex: 0 0 auto; width: 72px; height: 54px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; padding: 0; background: none; opacity: 0.5; transition: 0.2s var(--ease); cursor: pointer;
}
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button:hover { opacity: 0.85; }
.lb-thumbs button.active { opacity: 1; border-color: var(--accent); }

.lightbox-meta { padding: 36px; color: #fff; display: flex; flex-direction: column; overflow-y: auto; }
.lightbox-meta .num { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.lightbox-meta h3 { font-size: 1.8rem; margin-top: 12px; }
.lb-desc { color: #9a9aa6; margin-top: 16px; font-size: 0.95rem; line-height: 1.65; }
.lb-specs { list-style: none; margin: 26px 0 0; padding: 0; }
.lb-specs li {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  font-size: 0.9rem; color: #fff; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: right;
}
.lb-specs li span { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #6a6a74; text-align: left; }
.lb-cta { margin-top: 26px; align-self: flex-start; }
.lightbox-close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 11px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.45); color: #fff; display: grid; place-items: center; z-index: 3; }
.lightbox-close svg { width: 20px; height: 20px; }
@media (max-width: 760px) {
  .lightbox-inner { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .lb-main img { max-height: 42vh; }
  .lightbox-meta { padding: 26px; }
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- inline edit mode ---------- */
#editBar {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
}
.edit-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ff-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 18px; border-radius: 12px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg);
  box-shadow: 0 14px 36px -14px color-mix(in oklab, var(--accent), transparent 25%);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.edit-btn:hover { transform: translateY(-2px); }
.edit-btn .ei { font-size: 15px; line-height: 1; }
.edit-btn.active { background: #16a34a; border-color: #16a34a; color: #fff; }
.edit-reset {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid rgba(128,128,128,0.4); background: rgba(20,20,22,0.9); color: #fff; backdrop-filter: blur(8px);
}
.edit-reset:hover { border-color: #ef4444; color: #ef4444; }

/* mode switch */
.edit-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(20,20,22,0.92); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(8px); }
.edit-modes .em {
  font-family: var(--ff-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: #cfcfd6; background: transparent; border: 0; padding: 9px 12px; border-radius: 9px; transition: 0.18s;
}
.edit-modes .em:hover { color: #fff; }
.edit-modes .em.active { background: var(--accent); color: var(--accent-fg); }

/* move mode */
body.moving [data-mid] { cursor: grab; }
body.moving [data-mid]:hover { box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent), transparent 45%); border-radius: 4px; }
body.moving [contenteditable] { -webkit-user-modify: read-only; }
.mov-active { cursor: grabbing !important; box-shadow: 0 0 0 2px var(--accent) !important; position: relative; z-index: 70; }

body.editing [data-eid] { cursor: text; border-radius: 4px; transition: box-shadow 0.15s, background 0.15s; }
body.editing [data-eid]:hover { box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent), transparent 40%); }
body.editing [data-eid]:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); background: color-mix(in oklab, var(--accent), transparent 90%); }
body.editing .card { cursor: text; }
body.editing .card:hover { transform: none; }

/* editable images */
body.editing .img-editable { cursor: move; }
body.editing .img-editable:hover { box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent), transparent 35%); }
.img-selected { box-shadow: 0 0 0 3px var(--accent) !important; }

/* image control bar */
#imgBar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(140%);
  z-index: 95; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(17,17,20,0.96); border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7); backdrop-filter: blur(10px);
  font-family: var(--ff-mono); transition: transform 0.28s var(--ease);
  max-width: calc(100vw - 28px); flex-wrap: wrap; justify-content: center;
}
#imgBar.show { transform: translateX(-50%) translateY(0); }
#imgBar .ib-label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #6a6a74; padding: 0 4px; }
#imgBar .ib-group { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 10px; background: rgba(255,255,255,0.05); }
#imgBar .ib-tag { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #9a9aa6; }
.ib-btn {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px; padding: 9px 12px; min-width: 36px; transition: background 0.18s, border-color 0.18s;
}
.ib-btn:hover { background: rgba(255,255,255,0.16); }
.ib-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.ib-primary:hover { background: color-mix(in oklab, var(--accent), white 12%); }
.ib-done { background: #16a34a; border-color: #16a34a; }
.ib-done:hover { background: #15913f; }

@media print { #editBar, #imgBar { display: none !important; } }
