/* Shared Fitrus AI styling for the interactive PRO and Watch manuals. */
:root[data-theme="light"] {
  --bg: #f7f8ff;
  --panel: #fff;
  --fg: #101727;
  --muted: #637084;
  --line: #e2e8f0;
  --accent: #00876e;
  --soft: #eefaf5;
  --display: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --body: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --mono: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --barh: 70px;
}

body { min-width: 320px; word-break: keep-all; }

.top {
  min-height: 81px;
  width: 100%;
  margin: 0;
  padding: 18px clamp(24px, 3vw, 64px);
  justify-content: space-between;
  background: #f7f8ff;
  border: 0;
}

.manual-home { display: inline-flex; align-items: center; }
.manual-home img { display: block; width: 136px; height: auto; }
.manual-back {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  color: #606d80;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.manual-back:hover { color: var(--accent); }
.tabs {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #eef2f6;
}
.tabs a, .tabs button {
  min-width: 64px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #637084;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.tabs a:hover, .tabs button:hover { color: #007660; }
.tabs a[aria-pressed="true"], .tabs button[aria-pressed="true"] {
  background: #fff;
  color: #102034;
  box-shadow: 0 2px 8px rgba(16, 32, 52, .09);
}

.search { flex: none; width: min(260px, 48%); max-width: none; margin-left: auto; }
.search input { height: 38px; border-color: #dfe5ee; border-radius: 12px; background: #fbfcff; }
.search input:focus { border-color: #0ba78b; }
.results { border-radius: 14px; box-shadow: 0 12px 32px rgba(16, 23, 39, .13); }

.layout {
  width: 100%;
  margin: 0;
  grid-template-columns: minmax(0, 57%) minmax(440px, 43%);
  align-items: start;
  gap: 0;
}

#stage {
  top: var(--hh);
  height: calc(100dvh - var(--hh));
  min-height: 560px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: radial-gradient(ellipse 67% 67% at 52% 45%, #fff 0%, #f2fbf8 56%, #e5f6f0 100%);
  box-shadow: none;
}

.manual-stage-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 80px 28px;
  text-align: center;
}
.manual-stage-fallback img { display: block; width: min(82%, 610px); max-height: 48vh; object-fit: contain; filter: drop-shadow(0 32px 24px rgba(34, 48, 57, .22)); }
.manual-stage-fallback p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
#stage:has(canvas) .manual-stage-fallback { display: none; }

.cap { left: 24px; top: 23px; }
.manual-stage-tools { position: absolute; z-index: 4; top: 22px; right: 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.manual-view-controls, .manual-zoom-controls { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 8px 22px rgba(16,23,39,.07); }
.manual-view-controls button, .manual-zoom-controls button { height: 34px; border: 0; border-radius: 10px; background: transparent; color: #34485c; font-size: 12px; font-weight: 700; }
.manual-view-controls button { min-width: 48px; padding: 0 9px; }
.manual-zoom-controls button { width: 35px; font-size: 21px; line-height: 1; }
.manual-view-controls button:hover, .manual-zoom-controls button:hover { background: #e5f8f1; color: #007660; }
#stage:not(:has(canvas)) .manual-stage-tools, #stage:not(:has(canvas)) .reset, #stage:not(:has(canvas)) .hint { display: none; }
.cap span {
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .93);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(16, 23, 39, .07);
}
.hint { left: 24px; bottom: 23px; font-size: 13px; }
.reset {
  right: 22px;
  bottom: 19px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(16, 23, 39, .07);
}
.badge { padding: 6px 10px; background: #00876e; box-shadow: 0 5px 15px rgba(0, 135, 110, .18); }
.badge.try-hit { pointer-events: auto; border: 0; cursor: pointer; }
.badge.try-hit:hover { background: #006f5d; }

.doc {
  overflow: clip;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.bar { padding: 15px 28px; background: rgba(255, 255, 255, .96); }
.bar .now { font-size: 14px; font-weight: 700; }
.bar button { min-height: 38px; padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.bar .manual-try-toggle { border-color: #bce9d9; background: #eefaf5; color: #007660; white-space: nowrap; }
.bar .manual-try-toggle[aria-pressed="true"] { background: #102034; border-color: #102034; color: #fff; }
.manual-try-panel { position: relative; z-index: 9; padding: 24px clamp(24px, 2.6vw, 44px); background: #f2fbf7; border-bottom: 1px solid #d9eee5; scroll-margin-top: calc(var(--hh) + var(--stageH) + var(--barh) + 16px); }
.manual-try-kicker { color: #00876e; font-size: 11px; font-weight: 800; letter-spacing: .09em; }
.manual-try-panel h2 { margin: 7px 0 8px; font-size: 23px; }
.manual-try-connection { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 2px 0 14px; border: 1px solid #c6e4d9; border-radius: 999px; background: #e5f4ee; }
.manual-try-connection button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: #426154; font-size: 12px; font-weight: 700; }
.manual-try-connection button[aria-pressed="true"] { background: #102034; color: #fff; box-shadow: 0 2px 6px rgba(16,32,52,.12); }
.manual-try-panel p { margin: 0 0 14px; color: #34485c; font-size: 14px; line-height: 1.6; }
.manual-try-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
.manual-try-actions button { min-height: 40px; padding: 8px 13px; border: 1px solid #c6e4d9; border-radius: 999px; background: #fff; color: #102034; font-size: 12px; font-weight: 700; }
.manual-try-actions button:first-child { background: #3eddc0; border-color: #3eddc0; }
.manual-try-actions button:disabled { opacity: .45; cursor: not-allowed; }
.manual-try-actions button:hover:not(:disabled) { border-color: #00876e; }
.manual-try-panel small { display: block; color: #637084; font-size: 11px; line-height: 1.6; }
.tocpop { border-radius: 16px; }
.inner { padding: 30px clamp(24px, 2.6vw, 44px) 38vh; }
section { margin-bottom: 52px; }
section:not(#start) { padding-top: 22px; border-top: 1px solid #e9edf4; }
.num { color: #00876e; font-weight: 700; }
h1 { font-size: clamp(32px, 2.5vw, 42px); font-weight: 800; letter-spacing: -.055em; line-height: 1.16; }
h2 { font-size: 25px; font-weight: 800; letter-spacing: -.04em; }
.lead { font-size: 15px; line-height: 1.7; }
.model { color: #00876e; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.lbl { color: #637084; }
.chips button { padding: 9px 15px; background: #f0f3f8; border-color: transparent; font-weight: 700; }
.toc { padding: 10px; border-radius: 16px; }
.toc a, .tocpop a { min-height: 37px; align-items: center; }
.notice { border-radius: 12px; background: #f5f8fb; }
#start [data-scene="intro"] { padding: 16px 18px; margin: -16px -18px 18px; }

[data-scene] { border-radius: 14px; scroll-margin-top: calc(var(--hh) + var(--stageH) + 90px); }
.steps { gap: 9px; }
.steps > li { padding: 15px 16px 15px 51px; }
.steps > li::before { top: 15px; left: 13px; border-color: #cbd6df; }
.steps > li b { font-size: 15px; }
.steps > li > span { color: #637084; }
[data-scene].active {
  background: #eefaf5;
  box-shadow: inset 0 0 0 1.5px #0ba78b, 0 12px 28px rgba(0, 135, 110, .08);
}
[data-scene].active::before { box-shadow: 0 0 0 4px rgba(0, 135, 110, .13); }
.pre, .state, details { border-radius: 14px; }
.pre { padding: 14px 16px; background: #fbfcff; }
.bad { border-radius: 14px; }
.state { padding: 15px 17px; }
details summary { min-height: 50px; align-items: center; }
.primary { border-radius: 999px; background: #3eddc0; color: #102034; }

@media (max-width: 1050px) {
  .layout { grid-template-columns: minmax(0, 50%) minmax(0, 50%); width: 100%; gap: 0; }
  #stage { min-height: 480px; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .manual-stage-tools { top: 65px; }
  .bar { flex-wrap: wrap; }
  .bar .now { flex: 1; }
  .bar #tocBtn { order: 1; }
  .bar .search { order: 2; width: 100%; }
  .bar .manual-try-toggle { order: 0; }
  .inner { padding-inline: 24px; }
  .toc { grid-template-columns: 1fr; }
  [data-scene] { scroll-margin-top: calc(var(--hh) + 130px); }
}

@media (max-width: 760px) {
  [data-scene] { scroll-margin-top: calc(var(--hh) + var(--stageH) + 130px); }
  .top { min-height: 68px; padding: 12px 20px; gap: 12px; flex-wrap: nowrap; }
  .search { order: 0; flex-basis: auto; }
  .layout { width: 100%; margin: 0; }
  #stage {
    top: var(--hh);
    height: 38vh;
    min-height: 270px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .doc { border: 0; border-radius: 0; box-shadow: none; }
  .bar { padding: 10px 20px; }
  .bar .now { flex: none; }
  .manual-try-panel { padding: 20px; }
  .inner { padding: 24px 20px 36vh; }
  .cap { top: 12px; left: 12px; }
  .manual-stage-tools { top: 11px; right: 10px; gap: 4px; }
  .manual-view-controls, .manual-zoom-controls { padding: 2px; border-radius: 10px; }
  .manual-view-controls { display: grid; grid-template-columns: repeat(2, 1fr); }
  .manual-view-controls button { min-width: 39px; height: 25px; padding: 0 3px; font-size: 10px; }
  .manual-zoom-controls button { width: 28px; height: 26px; font-size: 17px; }
  .cap span { padding: 6px 10px; font-size: 11px; }
  .reset { right: 12px; bottom: 10px; padding: 7px 11px; font-size: 11px; }
  .manual-stage-fallback { gap: 5px; padding: 44px 18px; }
  .manual-stage-fallback img { width: min(78%, 380px); max-height: 24vh; }
  .manual-stage-fallback p { font-size: 10px; }
  h1 { font-size: 28px; }
  h2 { font-size: 23px; }
}

@media (max-width: 480px) {
  .top { gap: 10px; flex-wrap: wrap; }
  .manual-home img { width: 118px; }
  .manual-back { min-height: 36px; font-size: 12px; }
  .tabs { order: 3; flex-basis: 100%; justify-content: center; margin: 0; }
  .inner { padding: 20px 16px 35vh; }
  .bar { padding: 8px 12px; flex-wrap: wrap; }
  .bar .now { order: 0; flex: 1; }
  .bar .fold { order: 1; }
  .bar #tocBtn { order: 2; }
  .bar .manual-try-toggle { order: 3; width: 100%; }
  .bar .search { order: 4; width: 100%; margin: 0; }
  h1 { font-size: 25px; }
  h2 { font-size: 21px; }
  #start [data-scene="intro"] { padding: 18px; margin: 0 0 22px; }
}
