/* ==========================================================================
   KIBU AI — Editorial Design System (site.css)
   Theme: Warm Archival Paper × Lumina Slate Studio (Anti-AI-Slop High-Craft)
   Used across index.html, features.html, privacy.html, docs/manual.html
   ========================================================================== */

:root {
  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-serif: 'Noto Serif KR', 'MaruBuri', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Archival Paper Surfaces */
  --bg-paper: #f6f3ec;
  --bg-paper-deep: #ede8dd;
  --bg-light: #f1ede4;
  --bg-white: #fbfaf6;
  --surface-card: #ffffff;

  /* Botanical Charcoal & Slate Ink */
  --primary: #18221e;
  --secondary: #495650;
  --muted: #78857f;

  /* Editorial Forest Sage & Warm Brass */
  --accent: #2d5e49;
  --accent-hover: #214737;
  --accent-soft: #7fa994;
  --brass: #b08232;
  --brass-bright: #dfbd7c;
  --brass-tint: #f9f2e3;
  --tint: #e8f0ec;

  /* Lumina Studio Dark Slate (Workbench) */
  --studio-bg: #1b2320;
  --studio-panel: #232d29;
  --studio-well: #171e1b;
  --studio-border: rgba(169, 200, 184, 0.16);
  --studio-text: #ede9df;
  --studio-sub: #a8b4ae;

  /* Hairlines & Radii */
  --border: rgba(24, 34, 30, 0.12);
  --border-soft: rgba(24, 34, 30, 0.07);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Tactile Shadows */
  --shadow-sm: 0 1px 2px rgba(24, 34, 30, 0.05), 0 2px 6px rgba(24, 34, 30, 0.04);
  --shadow-md: 0 12px 28px -8px rgba(24, 34, 30, 0.09), 0 4px 10px -3px rgba(24, 34, 30, 0.05);
  --shadow-lg: 0 28px 60px -16px rgba(18, 26, 23, 0.22), 0 8px 20px -6px rgba(18, 26, 23, 0.10);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-main);
  color: var(--primary);
  background-color: var(--bg-paper);
  line-height: 1.68;
  letter-spacing: -0.018em;
  word-break: keep-all;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.3;
}

p {
  color: var(--secondary);
  font-size: 1.03rem;
}

img {
  image-rendering: -webkit-optimize-contrast;
}

.text-accent { color: var(--accent) !important; }
.text-brass { color: var(--brass) !important; }
.font-serif-kr { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.025em; }
.tabular { font-variant-numeric: tabular-nums; }

/* Utility compatibility overrides so Bootstrap .bg-white / .bg-light & text utilities blend into Archival Paper */
.bg-white { background-color: var(--bg-white) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--accent) !important; }
.text-primary { color: #355c78 !important; }
.text-danger { color: #a9473e !important; }

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(246, 243, 236, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  transition: background 0.25s ease;
}

.navbar-brand {
  font-weight: 800;
  color: var(--primary) !important;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.navbar-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-bg);
  border: 1px solid rgba(223, 189, 124, 0.42);
  color: var(--brass-bright);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-link {
  font-weight: 550;
  color: var(--secondary);
  margin: 0 6px;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

/* ---------- Tactile Buttons ---------- */
.btn-custom {
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.97rem;
  transition: transform 0.22s var(--ease-out-expo), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-c {
  background: var(--primary);
  color: #f8f6f0;
  border: 1px solid var(--primary);
  box-shadow: 0 4px 14px rgba(24, 34, 30, 0.16);
}

.btn-primary-c:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 8px 22px rgba(33, 71, 55, 0.24);
}

.btn-outline-c {
  background: var(--surface-card);
  color: var(--primary);
  border: 1px solid rgba(24, 34, 30, 0.20);
}

.btn-outline-c:hover {
  border-color: var(--primary);
  background: #ffffff;
  color: var(--primary);
  transform: translateY(-1.5px);
}

.btn-brass-outline {
  background: var(--brass-tint);
  color: #6e4e16;
  border: 1px solid rgba(176, 130, 50, 0.36);
}

.btn-brass-outline:hover {
  background: #f3e6cb;
  border-color: var(--brass);
  color: #533a0e;
  transform: translateY(-1.5px);
}

.btn-accent-c {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-accent-c:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1.5px);
}

/* ---------- Section Scaffolding ---------- */
.section-padding { padding: 96px 0; }
.section-header { max-width: 720px; margin-bottom: 52px; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.section-kicker::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1.5px;
  background: var(--brass);
}

.section-tag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.35rem;
  line-height: 1.28;
}

@media (max-width: 768px) {
  .section-title { font-size: 1.8rem; }
  .section-padding { padding: 68px 0; }
}

/* ---------- Editorial Hero ---------- */
.hero-editorial {
  padding: 132px 0 76px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(127, 169, 148, 0.16), transparent 70%),
    linear-gradient(180deg, #f8f6f0 0%, var(--bg-paper) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.83rem;
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-eyebrow .ver-chip {
  background: var(--studio-bg);
  color: var(--brass-bright);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.73rem;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

.hero-headline {
  font-size: clamp(2.15rem, 4.1vw, 3.45rem);
  line-height: 1.24;
  letter-spacing: -0.035em;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.hero-headline .serif-em {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-headline .serif-em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 8px;
  background: rgba(200, 155, 69, 0.22);
  z-index: -1;
  border-radius: 2px;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--secondary);
  max-width: 680px;
  line-height: 1.72;
  margin-bottom: 2rem;
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--secondary);
}

.hero-meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 550;
}

.hero-meta-strip i {
  color: var(--accent);
}

/* ==========================================================================
   LIVE STUDIO STAGE (Auto-Playing Choreographed KIBU Workbench)
   ========================================================================== */
.studio-stage-wrap {
  margin-top: 2.8rem;
}

.studio-window {
  background: var(--studio-bg);
  border: 1px solid rgba(127, 169, 148, 0.28);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--studio-text);
}

/* Window Top Bar + Scene Switcher */
.studio-topbar {
  background: #151c19;
  border-bottom: 1px solid var(--studio-border);
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--studio-sub);
  font-weight: 600;
}

.studio-dots {
  display: inline-flex;
  gap: 6px;
}

.studio-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.studio-dots span:nth-child(1) { background: #c96b63; }
.studio-dots span:nth-child(2) { background: #d6aa54; }
.studio-dots span:nth-child(3) { background: #6da888; }

.studio-scene-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-tab-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--studio-sub);
  border-radius: 9px;
  padding: 6px 13px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
}

.studio-tab-btn:hover {
  color: var(--studio-text);
  background: rgba(255, 255, 255, 0.08);
}

.studio-tab-btn.is-active {
  color: #f7f2e4;
  background: #27342f;
  border-color: rgba(223, 189, 124, 0.55);
}

.studio-tab-btn .tab-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--brass-bright);
  margin-right: 5px;
}

.studio-tab-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--brass-bright);
  transition: none;
}

.studio-tab-btn.is-active .studio-tab-progress {
  width: var(--progress, 0%);
}

.studio-playback-pill {
  font-size: 0.75rem;
  color: #9ac2ae;
  background: rgba(127, 169, 148, 0.12);
  border: 1px solid rgba(127, 169, 148, 0.26);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.studio-playback-pill .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fd4b2;
  animation: studioPulse 1.8s infinite ease-in-out;
}

.studio-playback-pill.is-paused .live-dot {
  background: var(--brass-bright);
  animation: none;
}

@keyframes studioPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Studio Body Panels — Stacked in a single CSS Grid cell to guarantee 0px layout shift (CLS = 0) across all scenes */
.studio-viewport {
  padding: 24px;
  background:
    radial-gradient(circle at 85% 12%, rgba(127, 169, 148, 0.08), transparent 45%),
    var(--studio-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.studio-scenes-stack {
  display: grid;
  grid-template-areas: "stage";
  align-items: start;
  position: relative;
}

/* Semi-transparent Video-Style Center Play/Pause Overlay Button */
.studio-center-transport {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 14;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(18, 25, 22, 0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(223, 189, 124, 0.36);
  color: #f6f2e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s var(--ease-out-expo), background-color 0.2s ease, border-color 0.2s ease;
}

.studio-viewport.is-controls-visible .studio-center-transport {
  opacity: 0.68;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.studio-viewport.is-paused .studio-center-transport {
  opacity: 0.80;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(18, 25, 22, 0.62);
  border-color: rgba(223, 189, 124, 0.56);
}

.studio-center-transport:hover,
.studio-center-transport:focus-visible {
  opacity: 0.98 !important;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1.07) !important;
  background: rgba(24, 34, 30, 0.78) !important;
  border-color: rgba(223, 189, 124, 0.82) !important;
  outline: none;
}

.studio-center-transport.is-pulsing {
  transform: translate(-50%, -50%) scale(1.13) !important;
}

.studio-center-transport .icon-play {
  display: none;
  margin-left: 2px;
}

.studio-center-transport .icon-pause {
  display: block;
}

.studio-viewport.is-paused .studio-center-transport .icon-play {
  display: block;
}

.studio-viewport.is-paused .studio-center-transport .icon-pause {
  display: none;
}

@media (hover: none) {
  /* 터치 기기에서는 본문 가독성을 해치지 않도록 중앙 오버레이 대신 상단 상태 버튼을 사용 */
  .studio-center-transport {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .studio-scenes-stack {
    display: block;
  }
  .studio-scene {
    display: none;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .studio-scene.is-active {
    display: block;
  }
}

.studio-scene {
  grid-area: stage;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.34s var(--ease-out-expo), transform 0.34s var(--ease-out-expo), visibility 0s linear 0.34s;
}

.studio-scene.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.34s var(--ease-out-expo), transform 0.34s var(--ease-out-expo), visibility 0s linear 0s;
}

/* ---------- SCENE 1: Mixed Files Auto-Routing Choreography ---------- */
.routing-stage-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.75fr 1.2fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .routing-stage-grid {
    grid-template-columns: 1fr;
  }
}

.studio-col-box {
  background: var(--studio-panel);
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.studio-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--studio-sub);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.incoming-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incoming-file-item {
  background: var(--studio-well);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  transition: transform 0.45s var(--ease-out-expo), border-color 0.35s ease, background-color 0.35s ease;
}

.incoming-file-item.is-routing {
  border-color: var(--brass-bright);
  background: rgba(223, 189, 124, 0.10);
  transform: translateX(6px);
}

.file-ext-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}

.ext-pdf { background: rgba(224, 108, 95, 0.18); color: #f29b91; border: 1px solid rgba(224, 108, 95, 0.35); }
.ext-ppt { background: rgba(223, 155, 92, 0.18); color: #f3be8a; border: 1px solid rgba(223, 155, 92, 0.35); }
.ext-hwp { background: rgba(108, 173, 224, 0.18); color: #9fd0f5; border: 1px solid rgba(108, 173, 224, 0.35); }
.ext-zip { background: rgba(223, 189, 124, 0.18); color: #ecd29b; border: 1px solid rgba(223, 189, 124, 0.38); }

.incoming-file-meta {
  min-width: 0;
  flex: 1;
}

.incoming-file-name {
  font-weight: 600;
  color: var(--studio-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-file-name mark {
  background: rgba(223, 189, 124, 0.24);
  color: #fce5b4;
  padding: 0 3px;
  border-radius: 3px;
}

.incoming-file-sub {
  font-size: 0.72rem;
  color: var(--studio-sub);
}

/* Center Routing Conduit */
.routing-engine-col {
  background: rgba(23, 30, 27, 0.75);
  border: 1px dashed rgba(127, 169, 148, 0.32);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.engine-core-ring {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: linear-gradient(145deg, #273731, #1c2622);
  border: 1px solid rgba(223, 189, 124, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass-bright);
  font-size: 1.45rem;
  box-shadow: 0 0 28px rgba(127, 169, 148, 0.18);
  margin-bottom: 12px;
  position: relative;
}

.engine-stream-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0;
}

.stream-pill {
  font-size: 0.73rem;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--studio-sub);
  position: relative;
  overflow: hidden;
}

.stream-pill.is-lit {
  color: #e9f5ee;
  border-color: rgba(127, 169, 148, 0.55);
  background: rgba(127, 169, 148, 0.15);
}

.stream-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(223, 189, 124, 0.28), transparent);
  animation: streamSweep 2.1s infinite ease-in-out;
}

@keyframes streamSweep {
  0% { left: -60%; }
  100% { left: 120%; }
}

/* Right Student Drawers */
.student-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.student-drawer-card {
  background: var(--studio-well);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 10px 12px;
  transition: border-color 0.35s ease, background-color 0.35s ease;
}

.student-drawer-card.is-complete {
  border-color: rgba(127, 169, 148, 0.48);
  background: rgba(39, 56, 49, 0.55);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.drawer-stu-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--studio-text);
}

.drawer-stu-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--studio-sub);
  margin-right: 6px;
}

.drawer-count-badge {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  background: #25352f;
  border: 1px solid #4e6f60;
  color: #a9d2be;
  transition: transform 0.25s var(--ease-out-expo), background-color 0.25s ease;
}

.drawer-count-badge.bump {
  transform: scale(1.08);
  background: #334d42;
  border-color: var(--brass-bright);
  color: #f7e4b8;
}

.drawer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drawer-chip {
  font-size: 0.72rem;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #d7dfd9;
  opacity: 0.28;
  transform: translateY(3px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out-expo), border-color 0.35s ease;
}

.drawer-chip.is-arrived {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(154, 194, 174, 0.42);
  background: rgba(127, 169, 148, 0.14);
}

.drawer-chip.chip-ppt.is-arrived {
  border-color: rgba(223, 189, 124, 0.48);
  background: rgba(223, 189, 124, 0.13);
  color: #f6e2b8;
}

/* ---------- SCENE 2: Side-by-Side Scan Handwriting Verification ---------- */
.scan-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 992px) {
  .scan-compare-grid { grid-template-columns: 1fr; }
}

.paper-scan-sheet {
  background: #f4f1e8;
  color: #2b302d;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.05);
}

.scan-zoom-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #3a7bd5;
  background: rgba(58, 123, 213, 0.08);
  border-radius: 7px;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.scan-zoom-tag {
  font-size: 0.69rem;
  font-weight: 700;
  color: #2358a6;
  background: #dbeafe;
  padding: 1px 7px;
  border-radius: 4px;
}

.handwriting-line {
  font-family: var(--font-serif);
  font-size: 0.89rem;
  line-height: 1.75;
  color: #353b38;
  border-bottom: 1px dashed rgba(53, 59, 56, 0.18);
  padding: 6px 0;
}

.handwriting-blank {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.035);
  font-size: 0.8rem;
  color: #6f7773;
}

.transcript-pane {
  background: var(--studio-panel);
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.transcript-text-box {
  background: var(--studio-well);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.86rem;
  line-height: 1.72;
  color: var(--studio-text);
}

.ocr-fix-token {
  background: rgba(223, 189, 124, 0.22);
  border-bottom: 1.5px solid var(--brass-bright);
  color: #fbe7bc;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.blank-guard-banner {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(127, 169, 148, 0.12);
  border: 1px solid rgba(127, 169, 148, 0.32);
  font-size: 0.78rem;
  color: #bce0cd;
}

/* ---------- SCENE 3: 5 Writing Lenses & Single-Sentence Revision ---------- */
.draft-workbench-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.preset-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-pill-btn {
  background: var(--studio-well);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--studio-sub);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.preset-pill-btn:hover {
  color: var(--studio-text);
  border-color: rgba(255, 255, 255, 0.25);
}

.preset-pill-btn.is-selected {
  background: rgba(223, 189, 124, 0.16);
  border-color: var(--brass-bright);
  color: #faebc8;
}

.neis-byte-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #a9d2be;
  background: #23332d;
  border: 1px solid #48695b;
  padding: 4px 11px;
  border-radius: 8px;
}

.draft-manuscript-box {
  background: var(--studio-panel);
  border: 1px solid var(--studio-border);
  border-radius: 13px;
  padding: 18px 20px;
  font-size: 0.93rem;
  line-height: 1.84;
  color: #ede9df;
  display: grid;
  grid-template-areas: "draft";
  align-items: start;
}

.draft-variant-layer {
  grid-area: draft;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.draft-variant-layer.is-selected {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.24s ease, visibility 0s linear 0s;
}

.draft-manuscript-box .hl-brass {
  background: rgba(223, 189, 124, 0.19);
  color: #fcedc8;
  padding: 1px 4px;
  border-radius: 4px;
}

.draft-manuscript-box .hl-sage {
  background: rgba(127, 169, 148, 0.20);
  color: #d6efe2;
  padding: 1px 4px;
  border-radius: 4px;
}

.quick-instruction-bar {
  margin-top: 12px;
  background: #202a26;
  border: 1px solid rgba(127, 169, 148, 0.30);
  border-radius: 10px;
  padding: 9px 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.quick-instruction-label {
  font-weight: 700;
  color: #9ac2ae;
}

.studio-status-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--studio-sub);
}

/* ==========================================================================
   EDITORIAL SECTIONS (index.html)
   ========================================================================== */

/* Hybrid Convergence Diagram Card */
.convergence-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.source-lane {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 13px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.source-lane:last-child { margin-bottom: 0; }

.lane-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--studio-bg);
  color: var(--brass-bright);
  flex-shrink: 0;
  margin-top: 2px;
}

.lane-body h4 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.lane-body p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.converge-result-banner {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--studio-bg);
  color: var(--studio-text);
  border: 1px solid rgba(223, 189, 124, 0.38);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* 7 Principles Manuscript Comparison */
.manuscript-compare-wrap {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .manuscript-compare-wrap { grid-template-columns: 1fr; }
}

.manuscript-card {
  border-radius: var(--r-lg);
  padding: 28px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.manuscript-card.is-flat {
  background: var(--bg-light);
}

.manuscript-card.is-kibu {
  background: var(--surface-card);
  border-color: rgba(45, 94, 73, 0.35);
  box-shadow: var(--shadow-md);
}

.manuscript-quote {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  line-height: 1.85;
  padding: 16px 18px;
  border-radius: 11px;
  background: var(--bg-paper);
  border-left: 3px solid var(--muted);
  color: var(--secondary);
  margin: 12px 0 16px;
}

.manuscript-card.is-kibu .manuscript-quote {
  background: #f5f8f6;
  border-left-color: var(--accent);
  color: var(--primary);
}

.principle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.principle-tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--accent-hover);
}

/* Editorial Numbered Ledger Grid (Replaces AI-slop icon grid) */
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 992px) {
  .ledger-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ledger-grid { grid-template-columns: 1fr; }
}

.ledger-cell {
  padding: 28px 26px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.ledger-cell:hover {
  background-color: #faf8f2;
}

.ledger-idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass);
  display: block;
  margin-bottom: 12px;
}

.ledger-cell h3 {
  font-size: 1.14rem;
  margin-bottom: 9px;
}

.ledger-cell p {
  font-size: 0.94rem;
  margin-bottom: 0;
  color: var(--secondary);
}

/* Minimal Spec Strip beneath Desktop Preview */
.spec-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

@media (max-width: 992px) {
  .spec-strip-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .spec-strip-grid { grid-template-columns: 1fr; gap: 10px; }
}

.spec-strip-item {
  padding: 16px 18px;
  border-radius: 13px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
}

.spec-strip-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 3px;
}

.spec-strip-item span {
  font-size: 0.85rem;
  color: var(--secondary);
}

/* ---------- Shared Components (features.html, privacy.html, manual.html) ---------- */
.mockup-frame {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--studio-bg);
  transition: transform 0.4s var(--ease-out-expo);
}

.mockup-frame:hover { transform: translateY(-3px); }

.mockup-header {
  height: 38px;
  background: #171f1c;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mockup-header .dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.mockup-header .dot:nth-child(1) { background: #c96b63; }
.mockup-header .dot:nth-child(2) { background: #d6aa54; }
.mockup-header .dot:nth-child(3) { background: #6da888; }
.mockup-frame img { display: block; width: 100%; height: auto; }
.mockup-frame img[data-ph]:not([src]) { min-height: 260px; }

.trust-bar {
  background: var(--bg-paper-deep);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
}

.trust-bar .trust-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 40px;
  padding: 22px 0;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
}

.trust-item i { color: var(--accent); font-size: 1.05rem; }

.tile {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform 0.22s var(--ease-out-expo), box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.tile h3 { font-size: 1.15rem; margin-bottom: 8px; }
.tile p { font-size: 0.95rem; color: var(--secondary); margin-bottom: 0; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-card { border-radius: var(--r-lg); padding: 30px; border: 1px solid var(--border); }
.compare-card h3 { font-size: 1.18rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.compare-card ul { list-style: none; padding: 0; margin: 0; }
.compare-card li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--secondary); font-size: 0.96rem; }
.compare-before { background: var(--bg-light); }
.compare-before h3 { color: var(--secondary); }
.compare-before li i { color: #9aa5a0; }
.compare-after { background: var(--surface-card); border-color: rgba(45, 94, 73, 0.35); box-shadow: var(--shadow-sm); }
.compare-after h3 { color: var(--accent); }
.compare-after li i { color: var(--accent); }
@media (max-width: 768px) { .compare-grid { grid-template-columns: 1fr; } }

.page-header {
  padding: 138px 0 64px;
  background: linear-gradient(180deg, #f8f6f0 0%, var(--bg-paper) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-title { font-size: 2.65rem; margin-bottom: 0.9rem; }
@media (max-width: 768px) { .page-title { font-size: 1.95rem; } .page-header { padding: 116px 0 48px; } }

.feature-section { padding: 84px 0; border-bottom: 1px solid var(--border-soft); }
.feature-section:nth-child(even) { background-color: var(--bg-white); }
.feature-tag {
  display: inline-block;
  padding: 5px 13px;
  background: var(--tint);
  color: var(--accent-hover);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.95rem;
}
.feature-section .mockup-frame img { max-height: 560px; object-fit: contain; }

.alert-info-custom {
  background: var(--tint);
  border: 1px solid rgba(45, 94, 73, 0.25);
  color: var(--primary);
  border-radius: 12px;
  padding: 1.05rem 1.2rem;
  margin: 1.3rem 0;
}

/* ---------- Download Studio Section ---------- */
.download-bg {
  background: var(--studio-bg);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(223, 189, 124, 0.25);
}

.download-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(223, 189, 124, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 12% 90%, rgba(127, 169, 148, 0.14) 0%, transparent 50%);
  pointer-events: none;
}

.download-card {
  background: var(--studio-panel);
  border: 1px solid rgba(223, 189, 124, 0.26);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.btn-download-exe {
  background: var(--brass-bright);
  color: #18201c;
  border: 1px solid var(--brass-bright);
  border-radius: var(--r-pill);
  font-weight: 700;
  transition: all 0.22s var(--ease-out-expo);
}

.btn-download-exe:hover {
  background: #ebd099;
  border-color: #ebd099;
  color: #111714;
  transform: translateY(-2px);
}

.btn-zip-c {
  background: rgba(127, 169, 148, 0.16);
  color: #cbe5d6;
  border: 1px solid rgba(127, 169, 148, 0.44);
  border-radius: var(--r-pill);
  font-weight: 600;
  transition: all 0.22s var(--ease-out-expo);
}

.btn-zip-c:hover {
  background: rgba(127, 169, 148, 0.28);
  border-color: #9ac2ae;
  color: #ffffff;
  transform: translateY(-2px);
}

@media (max-width: 575.98px) {
  .download-cta-btn {
    white-space: normal !important;
    font-size: 0.95rem !important;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
  }
}

.download-notes {
  color: rgba(237, 233, 223, 0.72);
  font-size: 0.88rem;
  line-height: 1.68;
  max-width: 640px;
  margin: 0 auto;
}

.download-notes li { margin-bottom: 0.5rem; }
.download-notes li:last-child { margin-bottom: 0; }
.download-notes i { color: var(--accent-soft); margin-right: 0.45rem; }
.download-notes a { color: var(--brass-bright); text-decoration: underline; text-underline-offset: 2px; }

.download-card .version-pill {
  color: #ede9df;
  font-family: var(--font-mono);
}

.download-guide-box {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  background: var(--studio-well);
  border: 1px solid rgba(223, 189, 124, 0.34);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  color: rgba(237, 233, 223, 0.85);
  font-size: 0.88rem;
  line-height: 1.65;
}

.download-guide-title {
  color: var(--brass-bright);
  font-weight: 700;
  font-size: 0.96rem;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.download-step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0.75rem 0;
}

@media (max-width: 640px) {
  .download-step-grid { grid-template-columns: 1fr; }
}

.download-step-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 11px;
  padding: 0.78rem 0.92rem;
}

.download-step-badge {
  display: inline-block;
  background: rgba(223, 189, 124, 0.18);
  color: var(--brass-bright);
  font-weight: 700;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.download-step-card strong { color: #ffffff; }

.download-guide-tip {
  background: rgba(127, 169, 148, 0.12);
  border: 1px solid rgba(127, 169, 148, 0.32);
  border-radius: 10px;
  padding: 0.68rem 0.9rem;
  color: #d7ece0;
  font-size: 0.84rem;
  margin-top: 0.55rem;
}

.download-guide-tip strong { color: #a8d8bf; }

/* ---------- Footer ---------- */
.site-footer {
  background: #141a18;
  color: rgba(237, 233, 223, 0.56);
  padding: 2.8rem 0 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer a {
  color: rgba(237, 233, 223, 0.78);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--brass-bright);
}

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