:root {
  --crimson: #c42b30;
  --crimson-dark: #9e1f24;
  --crimson-light: #e63940;
  --crimson-soft: #fff2f2;
  --ink: #16171d;
  --ink-2: #353742;
  --muted: #646978;
  --surface: #ffffff;
  --surface-2: #f6f7fa;
  --surface-3: #eceef4;
  --shadow-xs: 0 2px 10px rgba(22, 23, 29, 0.045);
  --shadow-sm: 0 8px 24px rgba(22, 23, 29, 0.06);
  --shadow-md: 0 18px 44px rgba(22, 23, 29, 0.085);
  --shadow-lg: 0 28px 68px rgba(22, 23, 29, 0.12);
  --shadow-red: 0 12px 28px rgba(196, 43, 48, 0.28);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body { margin: 0; font-family: var(--font-sans); background: #fbfcfd; color: var(--ink); line-height: 1.58; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2.5px solid var(--crimson); outline-offset: 3px; }
.is-hidden { display: none !important; }
.container { width: min(1240px, calc(100% - 2.2rem)); margin-inline: auto; }
.admin-maint-bar { background: #16171d; color: #fff; font-size: 0.84rem; padding: 0.55rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.8rem; border-bottom: 2px solid var(--crimson); }
.admin-maint-bar a { color: #ff8e92; font-weight: 800; text-decoration: underline; }

.bg-ambient-glow {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 130vw);
  height: 580px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(196, 43, 48, 0.09) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.72rem 1.35rem;
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-sm { padding: 0.54rem 1.05rem; font-size: 0.86rem; }
.btn-lg { padding: 0.88rem 1.55rem; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--crimson-light) 0%, var(--crimson) 60%, var(--crimson-dark) 100%); color: #fff; box-shadow: var(--shadow-red); }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(196, 43, 48, 0.36); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 8px 20px rgba(22, 23, 29, 0.16); }
.btn-dark:hover { background: #282a34; }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--surface-3); }

.badge-soft { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 800; background: var(--crimson-soft); color: var(--crimson); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(16px); box-shadow: 0 4px 24px rgba(22, 23, 29, 0.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 0.72rem; }
.brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo-img { width: auto; object-fit: contain; display: block; }
.header-logo-img { height: 42px; }
.footer-logo-img { height: 54px; }

.main-nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-link { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 0.92rem; padding: 0.5rem 0.95rem; border-radius: var(--radius-pill); transition: color 150ms ease, background-color 150ms ease; }
.nav-link:hover { color: var(--crimson); background: var(--crimson-soft); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--surface-2);
  padding: 9px 8px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--ink);
  border-radius: 3px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.2rem 1rem;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 23, 29, 0.08);
}
.mobile-nav-drawer.is-open { display: flex; }
.mobile-nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 0.72rem 0.6rem;
  border-bottom: 1px solid rgba(22, 23, 29, 0.06);
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { color: var(--crimson); }

.gallery-thumb-link { text-decoration: none; }
.gallery-title-link { color: inherit; text-decoration: none; }
.gallery-title-link:hover { color: var(--crimson); }
.footer-custom-note { margin: 0 0 1rem; font-size: 0.88rem; color: var(--muted); }

.gallery-page-main { padding: 2.2rem 0 4rem; min-height: 70vh; }
.gallery-page-head { margin-bottom: 2rem; }
.back-link { display: inline-block; color: var(--crimson); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.gallery-cat-switch { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.cat-switch-chip { text-decoration: none; padding: 0.45rem 0.95rem; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink-2); font-size: 0.85rem; font-weight: 700; }
.cat-switch-chip.is-active, .cat-switch-chip:hover { background: var(--crimson); color: #fff; }
.gallery-grid-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.gallery-card-grid { margin: 0; }
.gallery-pagination-bar { margin-top: 2.2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.page-numbers { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.page-num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 0.88rem; }
.page-num.is-active, .page-num:hover { background: var(--crimson); color: #fff; }
.empty-gallery-box { background: #fff; border-radius: var(--radius-md); padding: 2.5rem; text-align: center; box-shadow: var(--shadow-xs); }

.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); animation: pulseDot 1.8s infinite; }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.hero-arena { padding: 1.8rem 0 3.5rem; }
.hero-intro { text-align: center; max-width: 820px; margin: 0 auto 0.25rem; }
.hero-kicker { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 0.55rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; color: var(--crimson); text-transform: uppercase; }
.pill-tri { font-size: 0.68rem; }
.hero-title { margin: 0 0 0.55rem; font-size: clamp(1.85rem, 3.6vw, 2.95rem); line-height: 1.16; font-weight: 900; letter-spacing: -0.028em; color: var(--ink); }
.hero-subtitle { margin: 0; font-size: clamp(0.94rem, 1.3vw, 1.06rem); color: var(--muted); }

.carousel-stage-wrap { position: relative; display: flex; align-items: center; justify-content: center; margin: 0.5rem auto 0.2rem; min-height: 520px; }
.carousel-viewport { position: relative; width: 100%; height: 525px; perspective: 1500px; overflow: visible; cursor: grab; user-select: none; touch-action: pan-y; }
.carousel-viewport:active { cursor: grabbing; }

.stage-floor-glow {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: min(820px, 92vw);
  height: 165px;
  transform: translateX(-50%) rotateX(76deg);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(196, 43, 48, 0.15) 0%, rgba(22, 23, 29, 0.04) 50%, transparent 74%);
  pointer-events: none;
}

.carousel-ring { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }

.carousel-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  height: 410px;
  margin-left: -180px;
  margin-top: -210px;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  will-change: transform, opacity;
}

.item-product-wrap { position: relative; z-index: 2; width: 335px; height: 315px; display: flex; align-items: center; justify-content: center; }
.item-cutout-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 22px 26px rgba(22, 23, 29, 0.17)); pointer-events: none; user-select: none; }
.carousel-item.is-active .item-product-wrap { animation: floatProduct 3.6s ease-in-out infinite; }
.carousel-item.is-active .item-cutout-img { filter: drop-shadow(0 30px 36px rgba(196, 43, 48, 0.22)) drop-shadow(0 14px 20px rgba(22, 23, 29, 0.16)); }
@keyframes floatProduct {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.item-shadow-disk { width: 220px; height: 20px; margin-top: -4px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(22, 23, 29, 0.16) 0%, transparent 72%); transition: background 240ms ease, transform 240ms ease; }
.carousel-item.is-active .item-shadow-disk { background: radial-gradient(ellipse at center, rgba(196, 43, 48, 0.28) 0%, transparent 72%); transform: scale(1.12); }

.item-caption { margin-top: 0.7rem; padding: 0.42rem 1.15rem; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.94); font-size: 0.92rem; font-weight: 800; color: var(--ink); box-shadow: var(--shadow-sm); white-space: nowrap; transition: background-color 200ms ease, color 200ms ease; }
.carousel-item.is-active .item-caption { background: var(--ink); color: #fff; }

.stage-nav { position: absolute; top: 46%; transform: translateY(-50%); z-index: 25; width: 52px; height: 52px; border-radius: 50%; border: none; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md); transition: transform 150ms ease-out, background-color 150ms ease, color 150ms ease; }
.stage-nav:hover { background: var(--crimson); color: #fff; transform: translateY(-50%) scale(1.06); }
.stage-nav:active { transform: translateY(-50%) scale(0.95); }
.stage-prev { left: 0; }
.stage-next { right: 0; }

.service-drawer-anchor { position: relative; max-width: 980px; margin: 0.2rem auto 0; }
.drawer-pointer { width: 20px; height: 20px; margin: 0 auto -10px; background: #fff; transform: rotate(45deg); box-shadow: -4px -4px 12px rgba(22, 23, 29, 0.03); position: relative; z-index: 2; }

.service-drawer {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border-top: 3px solid var(--crimson);
  transform-origin: top center;
}

.service-drawer.is-popping {
  animation: zoomFromService 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes zoomFromService {
  0% { opacity: 0; transform: translateY(-42px) scale(0.68); }
  65% { opacity: 1; transform: translateY(4px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.65rem 2rem 0.9rem; }
.drawer-badge-text { display: inline-block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--crimson); margin-bottom: 0.28rem; }
.drawer-title { margin: 0 0 0.25rem; font-size: clamp(1.35rem, 2.3vw, 1.9rem); font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.drawer-tagline { margin: 0; color: var(--muted); font-weight: 600; font-size: 0.96rem; }

.btn-collapse { display: inline-flex; align-items: center; gap: 0.35rem; border: none; background: var(--surface-2); color: var(--ink-2); border-radius: var(--radius-pill); padding: 0.45rem 0.95rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.btn-collapse:hover { background: var(--surface-3); }
.service-drawer:not(.is-open) .drawer-body { display: none; }
.service-drawer:not(.is-open) .collapse-chevron { transform: rotate(-90deg); }

.drawer-body { padding: 0.4rem 2rem 2rem; }
.drawer-rich-content { font-size: 0.97rem; color: var(--ink-2); line-height: 1.68; }
.drawer-rich-content p { margin: 0 0 0.9rem; }
.drawer-rich-content h3, .drawer-rich-content h4 { margin: 1.1rem 0 0.55rem; font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.drawer-rich-content ul, .drawer-rich-content ol { margin: 0 0 1rem; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.drawer-rich-content li::marker { color: var(--crimson); }
.drawer-rich-content table { width: 100%; border-collapse: collapse; margin: 0.65rem 0 1.2rem; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.drawer-rich-content td, .drawer-rich-content th { padding: 0.72rem 1rem; text-align: left; font-size: 0.92rem; }
.drawer-rich-content tr + tr td { border-top: 1px solid rgba(22, 23, 29, 0.06); }
.drawer-rich-content td strong { color: var(--crimson); }

.drawer-actions-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.35rem; padding-top: 1.15rem; border-top: 1px solid rgba(22, 23, 29, 0.06); }

.gallery-section { padding: 3.8rem 0; background: linear-gradient(180deg, #15161c 0%, #1c1e26 100%); color: #fff; }
.gallery-section .section-kicker { color: #ff666b; }
.gallery-section .section-title { color: #fff; }
.gallery-section .section-desc { color: #b5bbc8; }
.gallery-section .circle-btn { background: rgba(255, 255, 255, 0.1); color: #fff; }
.gallery-section .circle-btn:hover { background: var(--crimson); color: #fff; }
.gallery-section .gallery-scroller { scrollbar-color: rgba(230, 57, 64, 0.65) rgba(255, 255, 255, 0.08); }
.gallery-section .gallery-thumb-btn { background: #23252f; box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35); }
.gallery-section .gallery-meta h3 { color: #fff; }
.gallery-section .gallery-meta p { color: #b5bbc8; }
.gallery-section .gallery-title-link:hover { color: #ff666b; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.35rem; }
.section-kicker { display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.07em; color: var(--crimson); margin-bottom: 0.35rem; }
.section-title { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 900; letter-spacing: -0.02em; }
.section-desc { margin: 0; max-width: 640px; color: var(--muted); font-size: 0.96rem; }

.gallery-nav-btns { display: flex; gap: 0.55rem; }
.circle-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, transform 150ms ease; }
.circle-btn:hover { background: var(--crimson); color: #fff; transform: scale(1.06); }

.gallery-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.gal-filter-btn { border: none; background: var(--surface-2); color: var(--ink-2); padding: 0.46rem 1rem; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.gal-filter-btn:hover { color: var(--crimson); }
.gal-filter-btn.is-active { background: var(--crimson); color: #fff; }

.gallery-scroller { display: flex; gap: 1.35rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 0.8rem; scrollbar-width: thin; scrollbar-color: rgba(196, 43, 48, 0.35) transparent; cursor: grab; }
.gallery-scroller:active { cursor: grabbing; }
.gallery-card { flex: 0 0 clamp(275px, 31%, 380px); margin: 0; scroll-snap-align: start; }

.gallery-thumb-btn { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: none; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); cursor: pointer; box-shadow: var(--shadow-sm); }
.gallery-thumb-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1); }
.gallery-thumb-btn:hover img { transform: scale(1.05); }
.gallery-cat { position: absolute; left: 0.85rem; bottom: 0.85rem; background: rgba(22, 23, 29, 0.82); color: #fff; backdrop-filter: blur(8px); font-size: 0.74rem; font-weight: 700; padding: 0.28rem 0.75rem; border-radius: var(--radius-pill); }
.gallery-meta { padding: 0.9rem 0.2rem 0; }
.gallery-meta h3 { margin: 0 0 0.25rem; font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.gallery-meta p { margin: 0; font-size: 0.87rem; color: var(--muted); }

.tools-station { padding: 3rem 0; background: var(--surface-2); }
.tools-collapse-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem; }
.tools-collapsible { margin-top: 1.65rem; }
.tools-collapsible.is-collapsed { display: none; }
.station-tabs-wrap { margin-bottom: 1.25rem; }

.station-tabs { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; background: #fff; padding: 0.35rem; border-radius: var(--radius-pill); box-shadow: var(--shadow-xs); }
.station-tab { border: none; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 0.88rem; padding: 0.56rem 1.1rem; border-radius: var(--radius-pill); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.station-tab.is-active { background: var(--ink); color: #fff; }
.station-panel { display: none; }
.station-panel.is-active { display: block; animation: fadePanel 260ms ease-out; }
@keyframes fadePanel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.luban-card { background: #fff; border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.luban-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.4rem; }
.luban-input-group label, .preset-label { display: block; font-size: 0.82rem; font-weight: 800; color: var(--ink-2); margin-bottom: 0.4rem; }
.input-stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.input-stepper input { width: 110px; border: none; background: transparent; text-align: center; font-family: var(--font-mono); font-size: 1.15rem; font-weight: 800; color: var(--crimson); padding: 0.52rem 0.25rem; }
.step-btn { border: none; background: var(--surface-3); color: var(--ink); font-weight: 800; padding: 0.58rem 0.9rem; cursor: pointer; }
.step-btn:hover { background: var(--ink); color: #fff; }
.unit-hint { display: inline-block; margin-left: 0.7rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.preset-chip { border: none; background: var(--surface-2); color: var(--ink); border-radius: var(--radius-pill); padding: 0.44rem 0.85rem; font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.preset-chip:hover, .preset-chip.is-active { background: var(--crimson); color: #fff; }

.luban-ruler-stage { position: relative; background: var(--surface-2); border-radius: var(--radius-md); padding: 2.35rem 1.1rem 1.1rem; margin-bottom: 1.3rem; overflow: hidden; }
.ruler-needle { position: absolute; top: 0; bottom: 36px; left: 50%; width: 2.5px; background: var(--crimson); z-index: 10; pointer-events: none; }
.needle-badge { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); background: var(--crimson); color: #fff; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 800; padding: 0.22rem 0.72rem; border-radius: var(--radius-pill); white-space: nowrap; }
.ruler-track-wrap { cursor: ew-resize; user-select: none; touch-action: pan-y; display: grid; gap: 0.75rem; }
.ruler-row { display: grid; grid-template-columns: 155px 1fr; align-items: center; gap: 0.75rem; }
.ruler-label { font-size: 0.84rem; font-weight: 800; color: var(--ink); line-height: 1.25; }
.ruler-label small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--muted); }
.ruler-canvas { position: relative; height: 56px; border-radius: 10px; overflow: hidden; background: #e9ecf3; }
.ruler-strip { position: absolute; top: 0; bottom: 0; left: 0; display: flex; will-change: transform; }
.ruler-seg { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid rgba(255, 255, 255, 0.28); font-size: 0.72rem; font-weight: 800; padding-inline: 4px; text-align: center; overflow: hidden; white-space: nowrap; flex-shrink: 0; }
.ruler-seg.is-good { background: linear-gradient(180deg, #d83137 0%, #b52025 100%); color: #fff; }
.ruler-seg.is-bad { background: linear-gradient(180deg, #2c2e38 0%, #16171d 100%); color: #d6d9e2; }
.ruler-seg small { font-size: 0.62rem; font-weight: 500; opacity: 0.85; }
.drag-hint { margin: 0.85rem 0 0; text-align: center; font-size: 0.82rem; color: var(--muted); }

.luban-verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.verdict-card { background: var(--surface-2); border-radius: var(--radius-md); padding: 1.05rem 1.2rem; }
.verdict-card.is-good { background: #fff7f7; }
.verdict-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.verdict-system { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.verdict-status { font-size: 0.72rem; font-weight: 800; padding: 0.18rem 0.6rem; border-radius: var(--radius-pill); }
.verdict-status.is-good { background: var(--crimson); color: #fff; }
.verdict-status.is-bad { background: var(--ink); color: #fff; }
.verdict-name { margin: 0 0 0.25rem; font-size: 1.05rem; font-weight: 900; color: var(--ink); }
.verdict-desc { margin: 0; font-size: 0.84rem; color: var(--muted); }

.calc-card { display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 1.75rem; background: #fff; border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.calc-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-top: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-size: 0.84rem; font-weight: 700; color: var(--ink-2); }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: none; border-radius: var(--radius-sm); padding: 0.72rem 0.9rem; background: var(--surface-2); color: var(--ink); }
.calc-result-box { background: var(--surface-2); border-radius: var(--radius-md); padding: 1.35rem; display: grid; gap: 0.9rem; }
.calc-stat { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.88rem; padding-bottom: 0.65rem; border-bottom: 1px solid rgba(22, 23, 29, 0.07); }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.calc-total strong { font-size: 1.55rem; color: var(--crimson); font-weight: 900; }

.software-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.35rem; }
.software-card { background: #fff; border-radius: var(--radius-md); padding: 1.5rem; display: flex; flex-direction: column; box-shadow: var(--shadow-xs); transition: transform 180ms ease, box-shadow 180ms ease; }
.software-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sw-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.sw-version { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.sw-name { margin: 0 0 0.25rem; font-size: 1.12rem; font-weight: 900; }
.sw-meta { display: flex; gap: 0.45rem; font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 0.7rem; }
.sw-desc { margin: 0 0 0.9rem; font-size: 0.9rem; color: var(--ink-2); }
.sw-features { margin: 0 0 1.2rem; padding: 0; list-style: none; display: grid; gap: 0.38rem; font-size: 0.85rem; color: var(--ink-2); }
.sw-features li::before { content: '▸ '; color: var(--crimson); font-weight: 900; }
.sw-footer { margin-top: auto; padding-top: 0.95rem; border-top: 1px solid rgba(22, 23, 29, 0.06); display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.sw-stats { display: flex; gap: 0.45rem; font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }

.why-section { padding: 3.8rem 0; background: linear-gradient(180deg, #15161c 0%, #1c1e26 100%); color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.why-card { background: rgba(255, 255, 255, 0.055); border-radius: var(--radius-md); padding: 1.8rem; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24); }
.why-num { display: inline-block; font-family: var(--font-mono); font-weight: 800; font-size: 0.82rem; color: #fff; background: var(--crimson); padding: 0.26rem 0.7rem; border-radius: var(--radius-pill); margin-bottom: 0.9rem; }
.why-card h3 { margin: 0 0 0.5rem; font-size: 1.08rem; font-weight: 800; color: #fff; }
.why-card p { margin: 0; color: #b8becb; font-size: 0.92rem; }

.site-footer { position: relative; background: #fff; padding: 2.6rem 0 1.4rem; overflow: hidden; box-shadow: 0 -8px 30px rgba(22, 23, 29, 0.04); }
.footer-corner-accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 145px;
  height: 145px;
  pointer-events: none;
  background:
    linear-gradient(225deg, #c42b30 0%, #c42b30 34%, transparent 34.5%),
    linear-gradient(212deg, rgba(230, 57, 64, 0.72) 0%, rgba(230, 57, 64, 0.72) 44%, transparent 44.5%),
    linear-gradient(238deg, rgba(196, 43, 48, 0.22) 0%, rgba(196, 43, 48, 0.22) 52%, transparent 52.5%);
}
.footer-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: stretch; gap: 2.2rem; padding-bottom: 1.8rem; }
.footer-left-col { display: flex; flex-direction: column; justify-content: center; }
.footer-logo-wrap { margin-bottom: 1.05rem; }
.footer-logo-img { height: 48px; }
.brand-info-list { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: 0.48rem; }
.brand-info-list li { display: flex; align-items: baseline; gap: 0.42rem; font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }
.info-tri { color: var(--crimson); font-size: 0.8rem; flex-shrink: 0; }
.info-tag { color: var(--crimson); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em; flex-shrink: 0; min-width: 44px; }
.info-val { color: var(--ink); text-decoration: none; }
.info-company { font-weight: 800; }
a.info-val:hover { color: var(--crimson); }
.info-phone { font-weight: 900; font-size: 0.98rem; letter-spacing: 0.02em; }
.footer-hours { background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.7rem 0.95rem; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 1.1rem; line-height: 1.5; }
.hours-label { font-weight: 800; color: var(--crimson); margin-right: 0.35rem; }
.hours-value { font-weight: 600; color: var(--ink); }
.footer-actions-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.footer-map-col { display: flex; }
.map-frame-wrap { width: 100%; min-height: 270px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--surface-2); }
.map-frame-wrap iframe { width: 100%; height: 100%; min-height: 270px; border: 0; display: block; }
.footer-bottom { position: relative; z-index: 1; display: flex; justify-content: center; text-align: center; padding-top: 1.1rem; border-top: 1px solid rgba(22, 23, 29, 0.07); font-size: 0.8rem; color: var(--muted); }

.lightbox-dialog { width: min(940px, calc(100% - 1.5rem)); border: none; border-radius: var(--radius-lg); padding: 0; background: #14151a; color: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.lightbox-dialog::backdrop { background: rgba(14, 15, 20, 0.78); backdrop-filter: blur(6px); }
.lightbox-close { position: absolute; top: 0.9rem; right: 0.9rem; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 800; cursor: pointer; }
.lightbox-close:hover { background: var(--crimson); }
.lightbox-nav { position: absolute; top: 42%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lightbox-nav:hover { background: var(--crimson); }
.lightbox-prev { left: 0.9rem; }
.lightbox-next { right: 0.9rem; }
.lightbox-figure { margin: 0; }
.lightbox-figure img { width: 100%; max-height: 70vh; object-fit: contain; background: #0d0e12; }
.lightbox-figure figcaption { padding: 1.15rem 1.5rem 1.35rem; }
.lightbox-cat { display: inline-block; font-size: 0.74rem; font-weight: 800; color: #ff7c80; text-transform: uppercase; margin-bottom: 0.25rem; }
.lightbox-figure h3 { margin: 0 0 0.25rem; font-size: 1.12rem; }
.lightbox-figure p { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }

.quote-dialog { width: min(520px, calc(100% - 1.5rem)); border: none; border-radius: var(--radius-lg); padding: 0; box-shadow: var(--shadow-lg); background: #fff; }
.quote-dialog::backdrop { background: rgba(22, 23, 29, 0.56); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.35rem 1.5rem 0.9rem; }
.dialog-kicker { font-size: 0.72rem; font-weight: 800; color: var(--crimson); letter-spacing: 0.05em; }
.dialog-head h3 { margin: 0.2rem 0 0; font-size: 1.24rem; font-weight: 900; }
.dialog-close { border: none; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-weight: 800; }
.dialog-body { padding: 0.6rem 1.5rem 1.3rem; display: grid; gap: 0.85rem; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 0.65rem; padding: 1rem 1.5rem; background: var(--surface-2); }
.form-feedback { font-size: 0.86rem; font-weight: 700; border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; display: none; }
.form-feedback.is-error { display: block; background: #fff1f1; color: var(--crimson-dark); }
.form-feedback.is-success { display: block; background: #eafaf1; color: #0b6b3c; }

.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; display: grid; gap: 0.5rem; pointer-events: none; }
.toast-item { background: var(--ink); color: #fff; padding: 0.78rem 1.15rem; border-radius: var(--radius-md); border-left: 4px solid var(--crimson); box-shadow: var(--shadow-lg); font-size: 0.86rem; font-weight: 700; animation: toastIn 260ms ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .calc-card, .luban-verdicts, .why-grid, .software-grid, .footer-layout { grid-template-columns: 1fr; }
  .footer-layout { gap: 1.5rem; }
}

@media (max-width: 640px) {
  .header-logo-img { height: 34px; }
  .footer-logo-img { height: 44px; }
  .carousel-stage-wrap { min-height: 390px; }
  .carousel-viewport { height: 395px; }
  .carousel-item { width: 270px; height: 325px; margin-left: -135px; margin-top: -165px; }
  .item-product-wrap { width: 250px; height: 240px; }
  .stage-nav { width: 40px; height: 40px; }
  .drawer-header, .drawer-body { padding-inline: 1.2rem; }
  .drawer-actions-bar .btn { width: 100%; }
  .calc-dims { grid-template-columns: 1fr; }
  .ruler-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .gallery-card { flex-basis: 82%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
