/* OLOBBY 통합안 — 시각 체계 v2 패턴 층.
   Layering: tokens.css → base.css → patterns.css → page css.
   Patterns: canvas, deep frame, lens, flow line, hotspot, O-ring, segmented tabs, night stage, sticky scroll stage.
   Every product picture is a crop of an original PNG (1360×800 scene space); nothing here redraws product UI. */

:root {
  --wide: 1320px;
  --shadow-deep: 0 1px 0 rgba(23, 36, 61, .04), 0 2px 6px -2px rgba(23, 36, 61, .08), 0 48px 80px -40px rgba(23, 36, 61, .36), 0 0 0 1px rgba(23, 36, 61, .08);
  --dot: rgba(23, 36, 61, .05);
  /* one section rhythm for every final page: 56px on phones → 104px on wide screens (was up to 168px) */
  --section: clamp(56px, 4vw + 32px, 104px);
  --sec-gap: clamp(28px, 3vw, 44px);          /* heading block → first content */
}

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

/* ---------- canvas: tinted work surface with a fine dot grid ---------- */
.canvas {
  position: relative; isolation: isolate;
  border-radius: var(--r-panel);
  /* large surfaces carry the category tint at ~60% so the screenshots stay the loudest thing on the page */
  background-color: color-mix(in srgb, var(--q-soft, var(--paper-blue)) 62%, #fff);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.4px);
  background-size: 24px 24px;
  transition: background-color 480ms var(--ease);
}
.canvas--soft { background-color: var(--paper-soft); }
.canvas--white { background-color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-reduced-motion: reduce) { .canvas { transition: none; } }

/* ---------- frames ---------- */
.frame--deep { box-shadow: var(--shadow-deep); }
.frame__title { flex: 1; text-align: center; font-family: var(--font-ui); font-size: 12px; color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame__bar .mod-ico { --size: 20px; border-radius: 5px; }

/* region marker inside a .crop — coordinates in scene px, relative to the crop's own --x/--y/--w/--h */
.lens-src {
  position: absolute; z-index: 2; pointer-events: none;
  left: calc((var(--sx) - var(--x)) / var(--w) * 100%); top: calc((var(--sy) - var(--y)) / var(--h) * 100%);
  width: calc(var(--sw) / var(--w) * 100%); height: calc(var(--sh) / var(--h) * 100%);
  border: 2px solid var(--q, var(--brand)); border-radius: 6px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--q, var(--brand)) 22%, transparent);
  transition: left var(--t-mid) var(--ease), top var(--t-mid) var(--ease), width var(--t-mid) var(--ease), height var(--t-mid) var(--ease), opacity var(--t-mid);
}

/* ---------- lens: same original pixels, cropped tighter and lifted ---------- */
.lens {
  position: absolute; z-index: 4; width: var(--lw, 300px);
  border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 2px var(--q, var(--brand)), 0 24px 48px -18px rgba(23, 36, 61, .42);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.lens .crop { border-radius: 0; }
.lens__cap { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 640; color: var(--ink); line-height: 1.35; background: #fff; }
.lens__cap .qdot { width: 10px; height: 10px; }
.lens.is-swapping { opacity: 0; transform: translateY(6px); }

/* ---------- flow line (SVG) ---------- */
.flow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow__base { fill: none; stroke: color-mix(in srgb, var(--q, var(--brand)) 30%, transparent); stroke-width: 2; }
.flow__line { fill: none; stroke: var(--q, var(--brand)); stroke-width: 2.25; stroke-linecap: round; stroke-dasharray: 1.5 9; animation: flow-march 1s linear infinite; animation-play-state: paused; }
.is-live .flow__line, .flow.is-live .flow__line { animation-play-state: running; }
@keyframes flow-march { to { stroke-dashoffset: -21; } }
@media (prefers-reduced-motion: reduce) { .flow__line { animation: none; } }

/* ---------- hotspots ---------- */
.hotspots { position: relative; }
.hotspot {
  position: absolute; z-index: 3; transform: translate(-50%, -50%);
  left: calc((var(--hx) - var(--x)) / var(--w) * 100%); top: calc((var(--hy) - var(--y)) / var(--h) * 100%);
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--q-ink, var(--action)); color: #fff;
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 3px #fff, 0 6px 14px -4px rgba(23, 36, 61, .45);
}
.hotspot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--q, var(--brand)); opacity: 0; }
.is-live .hotspot::after { animation: hs-pulse 2.4s var(--ease) 2; }
.hotspot[aria-expanded="true"], .hotspot:hover { background: var(--ink); }
@keyframes hs-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@media (prefers-reduced-motion: reduce) { .is-live .hotspot::after { animation: none; } }
.hotspot__tip {
  position: absolute; z-index: 5; width: max-content; max-width: 260px;
  left: calc((var(--hx) - var(--x)) / var(--w) * 100%); top: calc((var(--hy) - var(--y)) / var(--h) * 100%);
  transform: translate(-50%, 22px); padding: 10px 12px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease), visibility 0s var(--t-fast);
}
.hotspot__tip strong { display: block; font-weight: 680; }
.hotspot__tip.is-left { transform: translate(calc(-100% + 18px), 22px); }
.hotspot__tip.is-right { transform: translate(-18px, 22px); }
.hotspot__tip.is-up { transform: translate(-50%, calc(-100% - 22px)); }
.hotspot__tip.is-up.is-left { transform: translate(calc(-100% + 18px), calc(-100% - 22px)); }
.hotspot__tip.is-up.is-right { transform: translate(-18px, calc(-100% - 22px)); }
.hotspot__tip.is-open { opacity: 1; visibility: visible; transition: opacity var(--t-fast) var(--ease); }
/* matching text list next to the picture */
.points { display: grid; gap: 4px; counter-reset: pt; }
.points__item { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 12px; margin-inline: -12px; border-radius: 12px; cursor: default; transition: background-color var(--t-fast); }
.points__item.is-on { background: var(--q-soft, var(--paper-blue)); }
.points__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--q-ink, var(--action)); color: #fff; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; margin-top: 1px; }
.points__item strong { display: block; color: var(--ink); font-weight: 680; line-height: 1.45; }
.points__item p { margin-top: 2px; font-size: .9375rem; line-height: 1.6; }
@media (max-width: 640px) { .hotspot__tip { display: none; } .hotspot { width: 24px; height: 24px; font-size: 12px; } }

/* ---------- O-ring (SVG built in JS or inline) ---------- */
.ring { display: block; }
.ring path { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: butt; transition: stroke var(--t-mid) var(--ease), opacity var(--t-mid); }
.ring path.is-on { stroke: var(--q); }
.ring path.q-plan { --q: var(--q-plan); } .ring path.q-do { --q: var(--q-do); } .ring path.q-share { --q: var(--q-share); } .ring path.q-org { --q: var(--q-org); }

/* ---------- segmented tabs ---------- */
.seg { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border-radius: 12px; background: var(--paper-soft); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg [role="tab"] { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 8px; font-size: .9375rem; font-weight: 620; color: var(--body); white-space: nowrap; transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.seg [role="tab"]:hover { color: var(--ink); }
.seg [role="tab"][aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(23, 36, 61, .12), 0 0 0 1px rgba(23, 36, 61, .06); }
.seg [role="tab"] .mod-ico { --size: 22px; border-radius: 6px; }
.seg--night { background: rgba(255, 255, 255, .06); border-color: var(--night-line); }
.seg--night [role="tab"] { color: #AFC0DD; }
.seg--night [role="tab"]:hover { color: #fff; }
.seg--night [role="tab"][aria-selected="true"] { background: #fff; color: var(--night); }

/* ---------- night stage ---------- */
.night { background: var(--night); color: #C7D2E8; }
.night .t-lead { color: #C7D2E8; }

/* ---------- ticks ---------- */
.ticks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 26px; font-size: .9375rem; line-height: 1.55; color: var(--body); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--q-ink, var(--action)); border-bottom: 2px solid var(--q-ink, var(--action)); transform: rotate(-45deg); }

/* module tag: original icon + product name in the UI typeface */
.modtag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: .9375rem; font-weight: 500; color: var(--ink); }
.modtag .mod-ico { --size: 28px; border-radius: 7px; }

/* ---------- sticky scroll stage (stage.js) ----------
   .sstage > ol.sstage__steps > li.sstage__step[data-win][data-focus][data-lens]
           > .sstage__aside > .sstage__sticky > head + canvas(frame(view(scenes)) + lens) */
.sstage { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); }
.sstage .sstage__steps { margin: 0; padding: 0 0 var(--tail, 0px); list-style: none; } /* --tail: patterns.js, keeps the stage in place while the last step is read */
.sstage { --sp: 9vh; }
.sstage__step { position: relative; min-height: 62vh; padding: var(--sp) 0 var(--sp) 30px; display: flex; flex-direction: column; justify-content: center; }
.sstage__step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.sstage__step::after { content: ""; position: absolute; left: 0; top: var(--sp); width: 2px; height: 0; background: var(--q); transition: height 480ms var(--ease); }
.sstage__step.is-active::after { height: calc(100% - var(--sp) * 2); }
.sstage__step:first-child::before { top: var(--sp); }
.sstage__step:last-child::before { bottom: var(--sp); }
.sstage__mark { display: flex; align-items: baseline; gap: 14px; }
.sstage__big { font-family: var(--font-ui); font-size: clamp(2.75rem, 1.6rem + 3vw, 4.75rem); font-weight: 600; line-height: 1; letter-spacing: -.02em; color: #7F8BA3; font-variant-numeric: tabular-nums; transition: color var(--t-mid) var(--ease); }
.sstage__step.is-active .sstage__big { color: var(--q-ink); }
.sstage__step .modtag { margin-top: 18px; }
.sstage__step .t-h3 { margin-top: 12px; font-size: clamp(1.375rem, 1.2rem + .5vw, 1.625rem); }
.sstage__step > p { margin-top: 12px; }
.sstage__step .ticks { margin-top: 16px; }
.sstage__step .link { align-self: flex-start; margin-top: 18px; }
.sstage__shot { display: none; }

.sstage__sticky { position: sticky; top: calc(var(--header-h) + var(--subnav-h, 0px) + 16px); }
.sstage__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sstage__ring { width: 52px; height: 52px; flex: none; }
.sstage__now { display: grid; line-height: 1.2; }
.sstage__main { font-family: var(--font-ui); font-size: 1.5rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.sstage__sub { font-family: var(--font-ui); font-size: .9375rem; font-weight: 500; color: var(--q-ink, var(--action)); }
.sstage__count { margin-left: auto; font-family: var(--font-ui); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sstage__canvas { padding: clamp(18px, 2.4vw, 32px); padding-bottom: clamp(56px, 6vw, 88px); }
/* the whole stage (head + frame + caption + the lens that hangs below it) has to fit under the header on a laptop-height screen:
   everything around the view adds up to about 300px, so the view gets what is left */
.sstage__view { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 10.4; max-height: calc(100vh - var(--header-h) - var(--subnav-h, 0px) - 288px); min-height: 236px; background: #fff; }
.sstage__scene { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1360 / 800; transform-origin: 0 0; opacity: 0; visibility: hidden; transition: opacity 360ms var(--ease), transform 0s, visibility 0s 360ms; }
.sstage__scene.is-active { opacity: 1; visibility: visible; transition: opacity 360ms var(--ease), transform 520ms var(--ease), visibility 0s; }
.sstage__scene img { width: 100%; height: auto; }
/* hide an empty or backdrop area below the useful part of a scene (same as cropping it away) */
.sstage__scene--cut::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--cut) / 800 * 100%); bottom: 0; background: #fff; }
.sstage__focus { position: absolute; left: calc(var(--fx) / 1360 * 100%); top: calc(var(--fy) / 800 * 100%); width: calc(var(--fw) / 1360 * 100%); height: calc(var(--fh) / 800 * 100%);
  border: calc(2px / var(--z, 1)) solid var(--q); border-radius: calc(6px / var(--z, 1)); box-shadow: 0 0 0 calc(5px / var(--z, 1)) color-mix(in srgb, var(--q) 20%, transparent); }
.sstage__canvas { --lw: clamp(240px, 25vw, 360px); --lk: 1; } /* on the canvas so the caption can leave room for the lens */
/* the lens hangs over the canvas edge, but never closer than 12px to the window edge (the gutter is all the room there is) */
.sstage__lens { --hang: max(-28px, 12px - var(--gutter)); width: calc(var(--lw) * var(--lk, 1)); right: var(--hang); bottom: clamp(-22px, -1.6vw, -12px); }
/* lens on the side away from the focus box: data-lens-side="left" on the step (patterns.js copies it to the aside) */
.sstage__aside[data-lens-side="left"] .sstage__lens { right: auto; left: var(--hang); }
.sstage__aside[data-lens-side="left"] .sstage__caption { left: auto; right: clamp(18px, 2.4vw, 32px); flex-direction: row-reverse; text-align: right; }
.sstage__caption { position: absolute; z-index: 3; left: clamp(18px, 2.4vw, 32px); bottom: 16px; display: flex; align-items: center; gap: 10px; max-width: calc(100% - var(--lw, 300px) - 48px); font-size: .9375rem; font-weight: 640; color: var(--ink); line-height: 1.35; }
.sstage__caption .mod-ico { --size: 30px; border-radius: 8px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .sstage__scene, .sstage__scene.is-active { transition: none; } .sstage__step::after { transition: none; } }

@media (max-width: 1023px) {
  .sstage { grid-template-columns: 1fr; }
  .sstage__aside { display: none; }
  .sstage__step { min-height: 0; padding: 0 0 48px 24px; }
  .sstage__step::after { top: 0; height: 56px; }
  .sstage__step.is-active::after { height: 56px; }
  .sstage__step:first-child::before { top: 0; }
  .sstage__step:last-child::before { bottom: 48px; }
  .sstage__big { color: var(--q-ink); font-size: 2.5rem; }
  .sstage__shot { display: block; margin: 20px 0 0; }
}

/* ---------- deployment diagrams (home #deploy, deploy.html) ---------- */
.mode__diagram { width: 100%; max-width: 520px; height: auto; margin-bottom: 20px; overflow: visible; }
.mode__cloud { fill: var(--q-plan-soft); stroke: var(--q-plan); stroke-width: 2; }
.mode__fence { fill: color-mix(in srgb, var(--q-org-soft) 70%, #fff); stroke: #E5C632; stroke-width: 2; stroke-dasharray: 6 6; }
.mode__srv { fill: #fff; stroke: var(--q-plan); stroke-width: 2; }
.mode__wire { fill: none; stroke: var(--ink); stroke-width: 2; }
.mode__wire--client { stroke: var(--q-share); stroke-width: 2.5; }
.mode__wire--dash { stroke: var(--line-strong); stroke-dasharray: 3 5; }
/* while the diagram is on screen the wires carry a slow stream: the team reaches OLOBBY, the client comes in from outside */
.mode__diagram.is-live .mode__wire { stroke-dasharray: 1 8; stroke-linecap: round; stroke-width: 3; animation: mode-flow 1.2s linear infinite; }
.mode__diagram.is-live .mode__wire--client { animation-direction: reverse; }
.mode__diagram.is-live .mode__wire--dash { stroke-width: 2; animation-duration: 2.4s; }
@keyframes mode-flow { to { stroke-dashoffset: -9; } }
@media (prefers-reduced-motion: reduce) { .mode__diagram.is-live .mode__wire { animation: none; stroke-dasharray: none; stroke-width: 2; } .mode__diagram.is-live .mode__wire--dash { stroke-dasharray: 3 5; } }
.mode__chip { fill: #fff; stroke: var(--line-strong); }
.mode__chip--client { fill: var(--q-share-soft); stroke: var(--q-share); }
.mode__gate { fill: #fff; stroke: var(--q-share); stroke-width: 2; }
.mode__lock { fill: none; stroke: var(--q-share-ink); stroke-width: 1.8; stroke-linejoin: round; }
.mode__t { font-family: var(--font-ui); font-size: 15px; font-weight: 600; fill: var(--ink); }
.mode__s { font-family: var(--font-sans); font-size: 14px; font-weight: 650; fill: var(--ink); }
.mode__xs { font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; fill: var(--body); }
@media (max-width: 640px) { .mode__t { font-size: 18px; } .mode__s { font-size: 17px; } .mode__xs { font-size: 15px; } }

/* ---------- progressive enhancements (plan/trends-research.md §5) ----------
   Cross-document View Transitions: Chrome/Edge 126+, Safari 18.2+; other browsers just navigate.
   Smooth <details>: ::details-content + interpolate-size (Chromium); others open instantly. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 320ms var(--ease), content-visibility 320ms allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}
.site-header { view-transition-name: site-header; }
.mu__frame { view-transition-name: mu-frame; }
.pv__map { view-transition-name: pv-map; }

/* live-service capture label (frame bar, lens caption, hub caption) */
.frame__live { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.lens__cap .frame__live { margin-left: auto; }

/* ═════════ connections without wires ═════════
   Three shapes share one idea: things that belong together line up or light up; nothing crosses.
   .pairmap  tools in use today → the module that takes each one over (home §3b, compare hero)
   .lb       connection board: pick a module, its neighbours light up, the list says how (use-cases #map)
   .rail     one module and everything it works with, down a single line (product pages)            */

/* ---------- pair map ---------- */
.pairmap { --link: clamp(36px, 6vw, 84px); padding: clamp(18px, 2.6vw, 32px); }
.pairmap__grid { position: relative; display: grid; padding-bottom: 8px; }
.pairmap__grid::before { /* the one workspace: a single panel behind every right-hand cell */
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; left: calc((100% - var(--link)) * 5 / 12 + var(--link));
  border-radius: 20px; background: #fff; box-shadow: 0 0 0 1.5px var(--action), 0 30px 60px -40px rgba(23, 36, 61, .5); }
.pairmap__head, .pairmap__row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) var(--link) minmax(0, 7fr); }
.pairmap__rows { display: grid; margin: 0; padding: 0; list-style: none; }
.pairmap__head { align-items: center; min-height: 54px; font-size: var(--fs-small); font-weight: 700; color: var(--body); }
.pairmap__head b { color: var(--ink); }
.pairmap__from { padding-left: 4px; }
.pairmap__to { grid-column: 3; display: flex; align-items: center; gap: 10px; padding-inline: 20px; color: var(--ink); }
.pairmap__to img { height: 17px; width: auto; }
.pairmap__to small { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--body); }
.pairmap__tool { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-block: 5px; padding: 8px 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line-strong); font-size: .9375rem; font-weight: 620; line-height: 1.3; color: var(--ink); transition: box-shadow var(--t-fast) var(--ease); }
.pairmap__tool .ico { color: #66738C; }
.pairmap__tool small { margin-left: auto; padding-left: 8px; font-size: 12.5px; font-weight: 560; color: var(--muted); white-space: nowrap; }
.pairmap__link { position: relative; align-self: center; height: 2px; margin-left: 6px; border-radius: 2px; background: linear-gradient(90deg, var(--line-strong), color-mix(in srgb, var(--action) 70%, var(--line-strong))); transform: scaleX(0); transform-origin: 0 50%; transition: transform 520ms var(--ease) calc(var(--i, 0) * 70ms); }
.pairmap__link::after { content: ""; position: absolute; right: -5px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--action); }
.pairmap__link i { position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--action); opacity: 0; }
.pairmap.is-joined .pairmap__link, .no-js .pairmap__link { transform: none; }
.pairmap.is-joined .pairmap__link i { animation: pair-run 900ms var(--ease) calc(var(--i, 0) * 70ms + 460ms) 1 both; }
.pairmap__row:hover .pairmap__link i { animation: pair-run-again 700ms var(--ease) 1 both; }
@keyframes pair-run { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes pair-run-again { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.pairmap .pairmap__mods { grid-column: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px 8px; margin: 0; padding: 6px 12px; list-style: none; border-top: 1px solid var(--line); }
.pairmap__mod { color: inherit; display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; padding: 5px 14px 5px 6px; border-radius: 11px; background: color-mix(in srgb, var(--q-soft) 62%, #fff); transition: box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.pairmap__mod .mod-ico { --size: 32px; border-radius: 8px; background: #fff; }
.pairmap__mod b { display: block; font-family: var(--font-ui); font-size: .9375rem; font-weight: 500; line-height: 1.25; color: var(--ink); }
.pairmap__mod small { display: block; font-size: 12.5px; line-height: 1.3; color: var(--body); }
.pairmap__row:hover .pairmap__tool { box-shadow: 0 0 0 2px var(--action); }
.pairmap__row:hover .pairmap__mod { background: var(--q-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--q) 70%, var(--q-ink)); }
@media (prefers-reduced-motion: reduce) { .pairmap__link { transform: none; transition: none; } .pairmap__link i { display: none; } }
@media (max-width: 700px) {
  .pairmap { --link: 16px; padding: 14px; }
  .pairmap__grid::before { left: calc((100% - var(--link)) * 5 / 11 + var(--link)); border-radius: 16px; }
  .pairmap__head, .pairmap__row { grid-template-columns: minmax(0, 5fr) var(--link) minmax(0, 6fr); }
  .pairmap__to { padding-inline: 10px; gap: 6px; } .pairmap__to img { height: 13px; } .pairmap__to small { display: none; }
  .pairmap__tool { gap: 8px; min-height: 48px; padding: 8px 10px; font-size: .875rem; }
  .pairmap__tool small, .pairmap__mod small { display: none; }
  .pairmap__tool .ico { width: 18px; height: 18px; }
  .pairmap__link { margin-left: 3px; } .pairmap__link::after { width: 7px; height: 7px; margin-top: -3.5px; right: -4px; }
  .pairmap .pairmap__mods { grid-template-columns: minmax(0, 1fr); padding: 5px 7px; gap: 5px; }
  .pairmap__mod { min-height: 38px; padding: 4px 8px 4px 4px; gap: 8px; } .pairmap__mod .mod-ico { --size: 28px; } .pairmap__mod b { font-size: .8125rem; }
}

/* ---------- connection board ---------- */
.lbsec .lb { margin-top: var(--sec-gap); }
.lb { --lb-edge: color-mix(in srgb, var(--q) 70%, var(--q-ink)); border-radius: var(--r-panel); background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -44px rgba(23, 36, 61, .4); overflow: hidden; }
.lb__board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: clamp(18px, 2.4vw, 28px); background: var(--paper-soft); }
.lb__col { display: grid; align-content: start; gap: 8px; padding-inline: clamp(8px, 1.3vw, 18px); }
.lb__col + .lb__col { border-left: 1px solid var(--line); }
.lb__col:first-child { padding-left: 0; } .lb__col:last-child { padding-right: 0; }
.lb__cat { display: flex; align-items: center; gap: 8px; min-height: 26px; margin-bottom: 4px; font-size: var(--fs-micro); font-weight: 700; line-height: 1.3; color: var(--q-ink); }
.lb__n { margin-left: auto; display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--lb-edge); font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--q-ink); }
.lb__n:empty { visibility: hidden; }
.lb__tile { --q-edge: color-mix(in srgb, var(--q) 70%, var(--q-ink)); position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 28px 6px 7px; border: 0; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-align: left; color: var(--ink);
  transition: background-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), color var(--t-mid) var(--ease); }
.lb__tile .mod-ico { --size: 32px; border-radius: 8px; transition: filter var(--t-mid), opacity var(--t-mid); }
.lb__name { font-size: .875rem; font-weight: 500; line-height: 1.25; }
.lb__dot { position: absolute; right: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--q-edge); transform: scale(0); transition: transform var(--t-mid) var(--ease); }
.lb__tile:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.lb__tile.is-linked { background: color-mix(in srgb, var(--q-soft) 62%, #fff); box-shadow: inset 0 0 0 1.5px var(--q-edge); transition-delay: calc(var(--k, 0) * 34ms); }
.lb__tile.is-linked .lb__dot { transform: scale(1); transition-delay: calc(var(--k, 0) * 34ms + 80ms); }
.lb__tile.is-off { color: var(--muted); }
.lb__tile.is-off .mod-ico { filter: grayscale(1); opacity: .55; }
.lb__tile[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 10px 20px -12px rgba(23, 36, 61, .7); }
.lb__tile[aria-pressed="true"] .mod-ico { background: #fff; }
.lb__tile[aria-pressed="true"] .lb__name { font-weight: 600; }
.lb.is-idle .lb__tile.is-linked { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.lb.is-idle .lb__tile.is-linked .lb__dot { transform: scale(0); }
.lb.is-idle .lb__tile.is-off { color: var(--ink); } .lb.is-idle .lb__tile.is-off .mod-ico { filter: none; opacity: 1; }
.lb__detail { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); min-height: 296px; border-top: 1px solid var(--line); }
.lb__sel { padding: clamp(20px, 2.4vw, 28px); background: color-mix(in srgb, var(--q-soft) 62%, #fff); transition: background-color var(--t-mid) var(--ease); }
.lb__sel-head { display: flex; align-items: center; gap: 14px; }
.lb__sel-head .mod-ico { background: #fff; }
.lb__sel-cat { font-size: var(--fs-micro); font-weight: 700; color: var(--q-ink); }
.lb__sel-name { font-size: 1.375rem; font-weight: 600; letter-spacing: 0; line-height: 1.25; color: var(--ink); }
.lb__sel-desc { margin-top: 14px; font-size: .9375rem; line-height: 1.6; color: var(--ink); }
.lb__sel-more { display: inline-block; margin-top: 16px; }
.lb__out { padding: clamp(18px, 2.2vw, 26px) clamp(20px, 2.4vw, 28px) clamp(14px, 1.8vw, 20px); }
.lb__count { font-size: var(--fs-small); font-weight: 650; color: var(--ink); }
.lb__count b { margin-right: 2px; font-size: 1.375rem; font-weight: 600; }
.lb__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 10px 0 0; padding: 0; list-style: none; }
.lb__links li { border-top: 1px solid var(--line); animation: lb-in 380ms var(--ease) calc(var(--k, 0) * 34ms) both; }
.lb__link { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 11px 8px; border: 0; border-radius: 10px; background: none; text-align: left; transition: background-color var(--t-fast); }
.lb__link:hover { background: var(--paper-soft); }
.lb__link .mod-ico { --size: 32px; border-radius: 8px; margin-top: 2px; }
.lb__link-text { font-size: .875rem; line-height: 1.55; color: var(--body); }
.lb__link-text b { display: block; font-size: .9375rem; font-weight: 500; line-height: 1.4; color: var(--ink); }
.lb__note { margin-top: 14px; font-size: var(--fs-micro); color: var(--body); max-width: 60em; }
@keyframes lb-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .lb__links li { animation: none; } .lb__tile, .lb__dot { transition: none !important; } }
@media (max-width: 900px) {
  .lb__board { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .lb__col:nth-child(odd) { padding-left: 0; border-left: 0; } .lb__col:nth-child(even) { padding-right: 0; }
  .lb__detail { grid-template-columns: 1fr; min-height: 0; }
  .lb__links { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lb__board { padding: 14px; } .lb__col { padding-inline: 7px; gap: 6px; }
  .lb__tile { gap: 8px; min-height: 44px; padding: 5px 20px 5px 5px; } .lb__tile .mod-ico { --size: 28px; } .lb__name { font-size: .8125rem; } .lb__dot { right: 8px; width: 7px; height: 7px; margin-top: -3.5px; }
  .lb__cat { font-size: 12px; }
}

/* ---------- page sub-nav: sticky chapter list under the header, with a reading-progress line ----------
   <nav class="pagenav" data-pagenav><div class="container pagenav__in"><ul><li><a href="#id">…</a></li></ul><span class="pagenav__note">…</span></div></nav>
   patterns.js marks the chapter on screen (aria-current) and sets --p (0–1) for the line. */
:root:has(.pagenav) { --subnav-h: 53px; }
html:has(.pagenav) { scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + 16px); }
.pagenav { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); border-block: 1px solid var(--line); }
.pagenav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--action); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.pagenav__in { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.pagenav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; flex: 1; }
.pagenav ul::-webkit-scrollbar { display: none; }
.pagenav a { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; font-size: .9375rem; font-weight: 620; color: var(--body); white-space: nowrap; transition: color var(--t-fast), background-color var(--t-fast); }
.pagenav a:hover { color: var(--ink); background: var(--paper-soft); }
.pagenav a[aria-current="true"] { color: var(--action); background: var(--action-soft); }
.pagenav__note { flex: none; font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .pagenav .pagenav__note { display: none; } }

/* the way onward from a section: one quiet row of links to the pages that go deeper */
.onward { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; }

/* a module tag that leads to its page */
a.modtag { color: inherit; }
a.modtag:hover { text-decoration: underline; text-underline-offset: 4px; }
a.pairmap__mod:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- menu pick: a highlight that steps down the rows of a menu inside a crop ----------
   <span class="menu-pick" style="--mx:306;--my:98;--mw:129;--mh:28"></span> inside a .crop (numbers in the crop's own px).
   Runs while an ancestor with [data-live] is on screen; four rows, 8s a round. */
.menu-pick { position: absolute; left: calc(var(--mx) / var(--w) * 100%); top: calc(var(--my) / var(--h) * 100%); width: calc(var(--mw) / var(--w) * 100%); height: calc(var(--mh) / var(--h) * 100%);
  border-radius: 5px; background: color-mix(in srgb, var(--action) 13%, transparent); box-shadow: inset 0 0 0 1.5px var(--action); opacity: 0; pointer-events: none; }
.is-live .menu-pick { animation: menu-pick 8s var(--ease) infinite; }
@keyframes menu-pick {
  0%, 4% { opacity: 0; transform: translateY(0); }
  8%, 24% { opacity: 1; transform: translateY(0); }
  30%, 46% { opacity: 1; transform: translateY(100%); }
  52%, 68% { opacity: 1; transform: translateY(200%); }
  74%, 90% { opacity: 1; transform: translateY(300%); }
  96%, 100% { opacity: 0; transform: translateY(300%); }
}
@media (prefers-reduced-motion: reduce) { .is-live .menu-pick { animation: none; } }

/* ---------- finished state: how a piece of work ends (green: the product's own "Completed" colour) ----------
   <div class="donecard"><span class="donecard__tick"><svg class="ico">…#i-check</svg></span><div><p class="donecard__t"><b>서명 완료</b><span class="t-ui">Completed</span></p><p>…</p></div></div>
   <span class="donechip"><svg class="ico">…#i-check</svg>서명 완료</span> */
:root { --done: #1F9D6B; --done-ink: #137A52; --done-soft: #E6F6EF; }
.donecard { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 14px; padding: 18px 22px; border-radius: 14px; background: #F1FAF6; box-shadow: inset 0 0 0 1px #CDEBDD; }
.donecard__tick { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--done); color: #fff; }
.donecard__tick .ico { width: 22px; height: 22px; stroke-width: 3; }
.donecard__t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.donecard__t b { font-size: 1.125rem; font-weight: 760; color: var(--ink); }
.donecard__t .t-ui { font-size: 13px; color: var(--done-ink); }
.donecard p:not(.donecard__t) { margin: 4px 0 0; font-size: .9375rem; line-height: 1.6; color: var(--body); }
.donecard ul { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; font-size: .9375rem; color: var(--body); }
.donecard li { display: flex; align-items: baseline; gap: 8px; }
.donecard li b { font-family: var(--font-ui); font-weight: 600; color: var(--ink); }
.donechip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--done-soft); color: var(--done-ink); font-weight: 700; white-space: nowrap; }
.donechip .ico { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--done); color: #fff; stroke-width: 3.2; }

.hotspots .hotspot__tip.is-open { left: var(--tip-left); top: var(--tip-top); transform: none; max-width: min(240px, calc(100% - 14px)); overflow-wrap: anywhere; }
.lens__cap { overflow-wrap: anywhere; }
@media (min-width: 1024px) {
  .sstage__aside .sstage__canvas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(135px, 42%); gap: 12px; padding: 13px; align-items: start; }
  .sstage__canvas > .frame { grid-column: 1 / -1; }
  .sstage__aside .sstage__caption { position: static; max-width: none; align-self: center; margin: 0; font-size: .825rem; line-height: 1.45; overflow-wrap: anywhere; }
  .sstage__aside[data-lens-side] .sstage__caption { flex-direction: row; text-align: start; }
  .sstage__aside .sstage__lens { position: relative; inset: auto; width: 100%; max-width: none; padding: 0; margin: 0; justify-self: end; box-shadow: 0 0 0 1px var(--line-strong); border-radius: 6px; }
  .sstage__aside .sstage__lens .crop { max-width: 100%; margin-inline: auto; }
  .sstage__aside .lens__cap { padding: 6px 8px; font-size: .75rem; }
}
