:root {
  color-scheme: light;
  --ink: #172237;
  --muted: #4c5a73;
  --blue: #264ac8;
  --line: rgba(61, 83, 131, .13);
  --glass: rgba(255, 255, 255, .65);
  --shadow: 0 14px 32px rgba(55, 74, 124, .09), inset 0 1px 0 rgba(255, 255, 255, .92);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f1f5fc;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  min-width: 300px;
  background:
    radial-gradient(ellipse 680px 490px at 77% 235px, #dce6ff 0%, transparent 83%),
    radial-gradient(ellipse 700px 470px at 90% 510px, #ece4fb 0%, transparent 84%),
    radial-gradient(ellipse 740px 450px at 9% 1150px, #dfeefc 0%, transparent 82%),
    linear-gradient(180deg, #f3f7fd, #f8faff 64%, #eef3fb);
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 3px solid #5070eb; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 96px)); margin: 0 auto; }
.glass { background: var(--glass); border: 1px solid rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(145%); -webkit-backdrop-filter: blur(22px) saturate(145%); }
.skip { position: fixed; inset: 12px auto auto 12px; z-index: 10; padding: 12px; background: white; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.header { position: sticky; top: 0; padding: 18px 0 0; z-index: 5; }
.nav { width: min(1200px, calc(100% - 96px)); min-height: 65px; margin: 0 auto; border-radius: 24px; padding: 10px 12px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: white; font-size: 23px; background: linear-gradient(150deg,#7a95ff,#3e5be0 75%); box-shadow: inset 0 1px 1px #a7baff, 0 5px 10px #3d5cdf35; }
.nav nav { display: flex; align-items: center; gap: clamp(5px, 1vw, 18px); }
.nav nav a { padding: 8px 10px; border-radius: 10px; color: #39465f; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--blue); background: #e7edff; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: 13px; font-weight: 680; font-size: .94rem; line-height: 1.2; transition: background .2s, box-shadow .2s, transform .2s; }
.button:hover { transform: translateY(-2px); }
.nav-button { min-height: 41px; background: #202b42; color: #fff; }
.nav-button span, .secondary span { font-size: 1.1rem; line-height: 1; }
.primary { color: #fff; background: linear-gradient(175deg, #4767eb, #2b49ca); box-shadow: inset 0 1px 0 #ffffff35, 0 6px 13px #4963df35; }
.primary:hover { background: #2c49c6; }
.secondary { background: rgba(255,255,255,.7); color: #253559; border-color: #fff; box-shadow: 0 3px 12px #263f7510; }
.secondary:hover { background: #fff; }

.hero { display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: clamp(28px,5vw,70px); min-height: 490px; padding: 42px 0 52px; }
.hero-content { position: relative; z-index: 1; }
h1 { font-size: clamp(3rem, 5.25vw, 4.9rem); font-weight: 780; line-height: 1.08; letter-spacing: -.025em; margin: 21px 0 22px; }
h1 em { display: inline-block; padding-inline-end: .075em; font-style: normal; color: #405bc9; background: linear-gradient(102deg,#3458ce,#635ac5); background-clip: text; -webkit-text-fill-color: transparent; }
.intro { max-width: 395px; font-size: 1.19rem; line-height: 1.53; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.hero-visual { position: relative; isolation: isolate; padding: 18px 23px 23px 15px; }
.visual-glow { position: absolute; z-index: -1; inset: -15px -10px -11px 0; border-radius: 40px; opacity: .9; background: radial-gradient(ellipse at 72% 16%, #8dabff, transparent 60%), radial-gradient(ellipse at 23% 60%, #abdafe, transparent 70%), linear-gradient(135deg,#d1e4ff,#dcd1fb); border: 1px solid #ffffff9c; box-shadow: inset 0 1px 18px #ffffff96, 0 14px 45px #7796dc28; }
.hero-window { display: block; position: relative; text-align: left; background: #171b23; padding: 0; width: 100%; border: 1px solid #ffffff7a; border-radius: 17px; overflow: hidden; box-shadow: 0 18px 38px #18285851, 0 0 0 6px #ffffff3d; transition: box-shadow .2s; }
.hero-window:hover { box-shadow: 0 19px 43px #1828586b, 0 0 0 7px #ffffff7a; }
.window-bar { position: relative; min-height: 39px; display: grid; place-items: center; color: #e9edf6; background: linear-gradient(#333a4e,#252b3a); font-size: .8rem; font-weight: 650; text-align: center; }
.traffic { position: absolute; left: 12px; display: flex; gap: 5px; }
.traffic i { width: 8px; height: 8px; border-radius: 50%; background: #ff766f; }
.traffic i:nth-child(2) { background: #f7c050; }
.traffic i:nth-child(3) { background: #65d694; }
.expand { position: absolute; right: 12px; font-size: 17px; }
.hero-window img { width: 100%; aspect-ratio: 1.68; object-fit: cover; object-position: center 95%; }
.floating { display: flex; align-items: center; position: absolute; gap: 9px; padding: 9px 12px 9px 9px; border-radius: 16px; pointer-events: none; background: #f9fbffec; box-shadow: 0 8px 26px #152e6336, inset 0 1px 0 white; }
.floating strong, .floating small { display: block; white-space: nowrap; }
.floating strong { font-size: .92rem; letter-spacing: -.02em; }
.floating small { margin-top: 2px; font-size: .78rem; color: var(--muted); }
.floating .tile { width: 37px; height: 37px; border-radius: 11px; font-size: 21px; }
.profile-float { top: 2px; right: -12px; }
.focus-float { bottom: -2px; left: -12px; }

.section { margin-bottom: 72px; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.65rem, 2.8vw, 2.5rem); line-height: 1.1; letter-spacing: -.05em; font-weight: 760; }
.section-head p { margin-top: 8px; color: var(--muted); line-height: 1.45; }
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.setup-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 22px; border-radius: 23px; min-height: 205px; transition: background .2s, transform .2s, box-shadow .2s; }
.setup-card:hover { background: #ffffffe8; transform: translateY(-4px); box-shadow: 0 18px 32px #415a9321; }
.tile { display: inline-grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; box-shadow: inset 0 1px 1px #ffffffb3; font-size: 26px; font-weight: 650; flex-shrink: 0; }
.blue { color: #294aba; background: linear-gradient(145deg,#ebf2ff,#d8e5ff); }
.lilac { color: #593cb4; background: linear-gradient(145deg,#f3edff,#e9dfff); }
.peach { color: #92532c; background: linear-gradient(145deg,#fff5e8,#fbe3d3); }
.setup-card strong { font-size: 1.12rem; letter-spacing: -.03em; margin-top: 15px; }
.card-copy { color: var(--muted); line-height: 1.4; margin: 6px 0 14px; }
.card-action { color: var(--blue); font-size: .88rem; font-weight: 720; margin-top: auto; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-top: 16px; padding: 15px 0; border-radius: 18px; }
.specs div { display: flex; flex-direction: column; gap: 3px; padding: 0 18px; border-right: 1px solid var(--line); }
.specs div:last-child { border: 0; }
.specs span { font-size: .85rem; color: var(--muted); }
.specs strong { font-size: 1rem; }

.gallery { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.gallery button { display: flex; flex-direction: column; overflow: hidden; text-align: left; padding: 5px; border-radius: 17px; transition: transform .2s, background .2s; }
.gallery button:hover { transform: translateY(-3px); background: #fff; }
.gallery img { background: #22242c; width: 100%; aspect-ratio: 1.45; object-fit: cover; object-position: 50% 38%; border-radius: 12px; }
.gallery span { font-weight: 650; font-size: .9rem; padding: 9px 7px 7px; }
.focus-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 16px; }
.panel { border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.panel h3, .modal h3 { font-size: 1.1rem; letter-spacing: -.025em; }
.procedure { padding-left: 24px; margin: 16px 0; line-height: 1.58; }
.procedure li { padding-left: 5px; margin: 10px 0; }
.procedure li::marker { color: var(--blue); font-weight: 750; }
.note { background: #e8efff; padding: 13px 15px; border-radius: 12px; color: #344772; line-height: 1.45; }
.formula { margin: 6px 0 16px; color: var(--muted); }
.calculator label, .unit-label { font-size: .9rem; font-weight: 650; color: var(--muted); }
.input-wrap { margin: 6px 0 12px; display: flex; gap: 6px; align-items: center; background: #fff; border: 1px solid #cbd5eb; border-radius: 12px; padding: 0 12px; }
.input-wrap:focus-within { outline: 2px solid #5070eb; outline-offset: 2px; }
.input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 10px 0; background: transparent; color: var(--ink); }
.input-wrap span { color: var(--muted); font-size: .9rem; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button, .shot-nav button { background: #eef2ff; border: 1px solid #dce4fc; padding: 7px 10px; border-radius: 10px; color: #314a9b; font-size: .875rem; font-weight: 650; }
.presets button[aria-pressed="true"], .presets button:hover, .shot-nav button:hover { background: #dce5ff; border-color: #aabaee; }
.result { margin-top: 17px; display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); gap: 8px; color: var(--muted); }
.result output { font-size: clamp(1.65rem, 3.5vw, 2.3rem); font-weight: 760; line-height: 1; letter-spacing: -.045em; color: #304bc7; font-variant-numeric: tabular-nums; }
.error { margin-top: 10px; color: #a02434; font-size: .88rem; }
.wood-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.unit-label { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
select { appearance: none; color: var(--ink); background: #fff; border: 1px solid #cbd5eb; border-radius: 10px; padding: 9px 31px 9px 11px; background-image: linear-gradient(45deg,transparent 50%,#596685 50%),linear-gradient(135deg,#596685 50%,transparent 50%); background-position: right 15px center, right 10px center; background-repeat: no-repeat; background-size: 5px 5px; }
.table-card { border-radius: 24px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
thead th { background: #e9effc; font-size: .9rem; font-weight: 700; color: #354567; }
tbody th { font-weight: 670; }
.table-notes { padding: 15px 18px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.table-notes p + p { margin-top: 6px; }
.table-notes a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 20px 0 30px; }
.footer p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; color: var(--muted); font-size: .9rem; }
.footer p strong { color: var(--ink); }
.footer p a { color: var(--blue); margin-left: 4px; }
.footer > div { display: flex; flex-wrap: wrap; gap: 16px; color: var(--blue); font-size: .9rem; font-weight: 650; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.modal { position: fixed; max-width: min(610px, calc(100% - 28px)); max-height: calc(100dvh - 28px); width: 100%; margin: auto; overflow: auto; border-radius: 25px; padding: clamp(22px, 4vw, 34px); color: var(--ink); background: #f6f8fff5; box-shadow: 0 25px 100px #15264f56; }
.modal[open] { animation: open .2s ease-out both; }
.modal::backdrop { background: #19274373; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
@keyframes open { from { transform: translateY(9px) scale(.985); opacity: .5; } to { transform: none; opacity: 1; } }
.modal h2 { padding-right: 35px; font-size: clamp(1.4rem, 3.3vw, 1.85rem); letter-spacing: -.04em; line-height: 1.15; }
.close { position: absolute; display: grid; place-items: center; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; background: #e9edf8; border: 1px solid #dae2f3; color: #3a4a68; font-size: 24px; line-height: 1; }
.close:hover { background: #dce5fa; }
code, kbd { font-size: .9em; overflow-wrap: anywhere; }
.download-list { display: grid; gap: 10px; margin-top: 20px; }
.download-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid #e3e9f6; padding: 14px; border-radius: 14px; }
.download-list p { color: var(--muted); margin-top: 4px; line-height: 1.4; }
.download-list a { white-space: nowrap; }
.lightbox { max-width: min(1050px, calc(100% - 28px)); }
.lightbox img { width: 100%; max-height: 65dvh; object-fit: contain; margin: 14px auto 0; background: #20232b; border-radius: 12px; }
.shot-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 13px; color: var(--muted); line-height: 1.45; }
.shot-nav { display: flex; gap: 6px; flex-shrink: 0; }

@media (max-width: 960px) {
  .wrap, .nav { width: calc(100% - 52px); }
  .hero { min-height: 415px; gap: 30px; }
  h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); }
  .gallery { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 780px) {
  html { scroll-padding-top: 135px; }
  .wrap, .nav { width: calc(100% - 32px); }
  .header { padding-top: 10px; }
  .nav { flex-wrap: wrap; border-radius: 19px; gap: 5px; padding: 8px 9px; }
  .nav nav { width: 100%; order: 3; justify-content: space-between; gap: 0; border-top: 1px solid var(--line); padding-top: 4px; }
  .nav nav a { font-size: .84rem; padding: 7px 6px; }
  .hero { grid-template-columns: 1fr; gap: 42px; padding: 48px 0 42px; }
  h1 { font-size: clamp(2.6rem, 8vw, 4rem); }
  .intro { font-size: 1.08rem; }
  .hero-visual { margin: 0 9px; padding: 18px 14px 18px; }
  .visual-glow { inset: -10px -4px -7px; border-radius: 26px; }
  .profile-float { right: -4px; }
  .focus-float { left: -4px; }
  .setup-grid, .focus-grid { grid-template-columns: 1fr; gap: 12px; }
  .setup-card { min-height: auto; padding: 18px; }
  .setup-card strong { margin-top: 12px; }
  .section { margin-bottom: 49px; }
  .specs { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .specs div:nth-child(2) { border: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .wood-head { align-items: flex-start; flex-direction: column; }
  th, td { padding: 11px 8px; }
  thead th { font-size: .8rem; }
  tbody { font-size: .9rem; }
  .table-notes { padding: 13px 11px; }
  .footer { flex-wrap: wrap; }
  .shot-footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
