/*
 * 프로그램연구소 — 기본 틀
 *   색·글자·버튼 / 위쪽 메뉴 / 첫 화면 / 입력창 / 떠 있는 버튼 / 바닥글
 * 디자인 기준: design-system/program-lab/MASTER.md
 */

@property --ring {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* 밤(어두운 화면) */
  --n0: #04050C;
  --n1: #070915;
  --n2: #0C1022;
  --n3: #141A34;
  --n4: #1D2448;
  --nl: rgba(150, 165, 255, .13);
  --nl2: rgba(150, 165, 255, .24);
  --on: #F3F5FF;
  --on2: #B7BEE0;
  --on3: #8D96C0;
  --hi: #9DB0FF;
  --cy: #6BE9FF;
  --run: #3DDC97;   /* 테스트 통과·완료 */
  --err: #FF6B6B;   /* 오류 */

  /* 종이(밝은 화면) */
  --p0: #FFFFFF;
  --p1: #F5F7FC;
  --p2: #ECEFF8;
  --ink: #0A0C17;
  --ink2: #3A4056;
  --ink3: #5D6479;
  --line: #E4E7F1;
  --line2: #D0D5E4;

  /* 상표 */
  --brand: #3D57F5;
  --brand-dk: #2C44D8;
  --brand-2: #6C4CF0;
  --brand-w: #EEF1FF;
  --cta: linear-gradient(110deg, #3D57F5 0%, #6C4CF0 100%);
  --grad-dark: linear-gradient(100deg, #6BE9FF 0%, #8EA2FF 42%, #C1A6FF 100%);
  --grad-light: linear-gradient(100deg, #0C7FCC 0%, #3D57F5 45%, #6C4CF0 100%);

  /* 신호 */
  --seal: #D92D20;
  --ok: #067A50;
  --ok-w: #E2F6EC;
  --warn: #8A5300;
  --warn-w: #FFF0D4;
  --bad: #C4261D;
  --bad-w: #FDEBE9;
  --kakao: #FEE500;

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 30px;

  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --display: 'Paperlogy', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --nav-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-1: 0 1px 2px rgba(10, 12, 23, .05), 0 10px 30px -16px rgba(10, 12, 23, .18);
  --shadow-2: 0 30px 70px -30px rgba(10, 12, 23, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); background: var(--n1); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.014em;
  color: var(--ink);
  background: var(--p0);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, table { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img { max-width: 100%; }
address { font-style: normal; }
em { font-style: normal; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.on-dark :focus-visible, .build :focus-visible, .ticker :focus-visible, .hero :focus-visible, .app :focus-visible, .gallery :focus-visible, .pricing :focus-visible, .final :focus-visible, .story :focus-visible { outline-color: var(--cy); }

.nb { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 300; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: var(--r-s); font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grad { background: var(--grad-dark); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── 버튼 ── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 13px 22px;
  border: 1.5px solid transparent; border-radius: 15px;
  font-size: 16px; font-weight: 700; line-height: 1.25; text-decoration: none; text-align: center; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s, background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.btn:active { transform: scale(.98); }
.btn-cta { background: var(--cta); color: #fff; box-shadow: 0 12px 30px -12px rgba(61, 87, 245, .85), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-cta:hover { box-shadow: 0 16px 40px -12px rgba(108, 76, 240, .95), inset 0 1px 0 rgba(255, 255, 255, .22); transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, .09); border-color: var(--nl2); color: var(--on); }
.btn-glass:hover { background: rgba(255, 255, 255, .13); border-color: rgba(190, 200, 255, .45); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1E2236; }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line2); }
.btn-line:hover { border-color: var(--ink); }
.btn-white { background: #fff; color: var(--ink); box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); }
.btn-white:hover { background: #EEF1FF; }
.btn-sm { min-height: 44px; padding: 9px 16px; font-size: 15px; border-radius: 13px; }
.btn-lg { min-height: 58px; padding: 16px 28px; font-size: 17px; border-radius: 17px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; color: inherit; transition: background-color .15s; flex: none; }
.icon-btn:hover { background: rgba(127, 140, 200, .16); }
.icon-btn svg { width: 22px; height: 22px; stroke-width: 2; }

.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 10px; font-weight: 700; color: var(--brand-dk); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.text-link svg { width: 16px; height: 16px; }

/* ── 상표 ── */
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 600; letter-spacing: -0.035em; color: inherit; text-decoration: none; white-space: nowrap; }
.logo img { display: block; width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 8px 18px -8px rgba(61, 87, 245, .9); }
.logo b { font-weight: 800; background: var(--grad-dark); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-btn { padding: 0; }
.logo-since { display: none; margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--nl2); font-family: var(--mono); font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: .14em; color: var(--on3); }

/* ── 위쪽 메뉴 ── */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 20px; height: var(--nav-h); padding: 0 12px 0 18px; color: var(--on); border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s, transform .35s var(--ease); }
.nav.is-solid { background: rgba(7, 9, 21, .78); backdrop-filter: blur(18px) saturate(1.5); border-bottom-color: var(--nl); }
.nav.is-hidden { transform: translateY(-100%); }
body[data-view="app"] .nav { display: none; }
.nav-links { display: none; gap: 2px; }
.nav-links a { padding: 10px 14px; border-radius: 11px; font-size: 15px; font-weight: 600; color: var(--on2); text-decoration: none; transition: color .15s, background-color .15s; }
.nav-links a:hover, .nav-links a.is-on { color: var(--on); background: rgba(255, 255, 255, .07); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-kakao { display: none !important; }
.nav-menu { color: var(--on); }

.mnav { position: fixed; z-index: 49; top: var(--nav-h); left: 0; right: 0; bottom: 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); background: rgba(7, 9, 21, .97); backdrop-filter: blur(18px); color: var(--on); overflow-y: auto; animation: fade-in .2s ease both; }
.mnav nav { display: grid; }
.mnav nav a { display: flex; align-items: center; min-height: 58px; border-bottom: 1px solid var(--nl); font-size: 19px; font-weight: 700; text-decoration: none; }
.mnav-cta { display: grid; gap: 10px; margin-top: 24px; }

/* ── 첫 화면 ── */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; min-height: 100svh; padding: calc(var(--nav-h) + 36px) 0 76px; background: var(--n1); color: var(--on); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.aurora { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.aurora.is-on { opacity: 1; }
.hero-glow { position: absolute; inset: 0; transition: opacity 1.4s ease; background: radial-gradient(60% 45% at 50% 18%, rgba(76, 99, 255, .42), transparent 70%), radial-gradient(40% 35% at 78% 30%, rgba(140, 92, 246, .30), transparent 70%), radial-gradient(35% 30% at 22% 36%, rgba(60, 200, 240, .20), transparent 70%); }
.aurora.is-on + .hero-glow { opacity: .3; }
.hero-glow { animation: glow-drift 16s ease-in-out infinite alternate; will-change: transform; }
@keyframes glow-drift { from { transform: translate3d(-2%, 0, 0) scale(1); } to { transform: translate3d(2%, 3%, 0) scale(1.08); } }
.hero-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(140, 160, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 160, 255, .07) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(80% 70% at 50% 30%, #000 30%, transparent 75%); }
.hero-noise { position: absolute; inset: 0; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.hero-wrap { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: center; }
.hero-in { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* ── 첫 화면 개발 콘솔 (요청 → 코드 → 테스트 → 공개) ── */
.hero-console { position: relative; z-index: 2; width: 100%; max-width: 640px; margin: 52px auto 0; }
.hero-console::before { content: ""; position: absolute; inset: 8% -6% -4% 6%; z-index: -1; border-radius: 40px; background: radial-gradient(closest-side, rgba(61, 87, 245, .55), transparent); filter: blur(34px); }
.cons { position: relative; border-radius: 20px; background: linear-gradient(180deg, rgba(17, 22, 48, .94), rgba(7, 10, 24, .97)); border: 1px solid rgba(150, 165, 255, .24); box-shadow: 0 60px 110px -50px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06); font-family: var(--mono); font-size: 13px; line-height: 1.75; color: #C9D2F5; text-align: left; overflow: hidden; transition: opacity .4s ease; }
.cons.is-fading { opacity: .35; }
.cons-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(150, 165, 255, .14); background: rgba(255, 255, 255, .025); }
.cons-top > i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.cons-top > i:nth-child(2) { background: #FEBC2E; }
.cons-top > i:nth-child(3) { background: #28C840; }
.cons-title { margin-left: 8px; font-size: 12px; color: var(--on3); }
.cons-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--run); }
.cons-live b { width: 7px; height: 7px; border-radius: 50%; background: var(--run); animation: live-ping 1.8s ease-out infinite; }
.cons-req { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px 10px; font-family: var(--font); }
.cons-k { flex: none; padding: 1px 8px; border-radius: 6px; border: 1px solid rgba(157, 176, 255, .38); font-size: 11.5px; font-weight: 700; color: var(--hi); }
.cons-req p { min-height: 1.6em; font-size: 15.5px; font-weight: 700; line-height: 1.55; color: #fff; }
.cons-steps { display: grid; gap: 3px; padding: 0 18px 8px; font-family: var(--font); font-size: 13.5px; color: var(--on2); }
.cons-steps li { display: flex; align-items: baseline; gap: 10px; }
.cons-steps li::before { content: "›"; color: var(--hi); font-weight: 800; }
.cons-steps em { margin-left: auto; flex: none; font-family: var(--mono); font-size: 11.5px; color: var(--on3); }
.cons-steps li.is-done em { color: var(--run); }
.cons-code { margin: 8px 12px 10px; border-radius: 12px; background: rgba(2, 4, 12, .72); border: 1px solid rgba(150, 165, 255, .12); }
.cons-file { padding: 7px 12px; border-bottom: 1px solid rgba(150, 165, 255, .1); font-size: 11.5px; color: var(--on3); }
.cons-code pre { margin: 0; min-height: calc(4 * 1.75em + 22px); padding: 10px 12px 12px; font: inherit; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.cons-code .ln { display: inline-block; width: 1.7em; color: #4A5380; user-select: none; }
.cons-code .kw { color: #C79BFF; }
.cons-code .fn { color: #6BE9FF; }
.cons-code .str { color: #FFD68A; }
.cons-term { min-height: calc(4 * 1.75em + 16px); padding: 2px 18px 16px; font-size: 12.5px; }
.cons-term .tm { color: var(--hi); }
.cons-term .ok { color: var(--run); }
.cons-term small { margin-left: 6px; font-size: 11.5px; color: var(--on3); }
.cons-term .bar span { display: block; height: 6px; margin: 8px 0; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.cons-term .bar i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--brand), var(--cy)); transform: scaleX(0); transform-origin: left; transition: transform .85s var(--ease); }
.cons-term .bar.is-go i { transform: scaleX(1); }
.cons-result { position: absolute; right: -10px; bottom: -30px; width: min(300px, 80%); padding: 14px 16px 15px; border-radius: 18px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.55; box-shadow: 0 34px 60px -22px rgba(0, 0, 0, .7); opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.cons-result.is-on { opacity: 1; transform: none; }
.cr-app { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--ink2); }
.cr-app svg { width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: var(--brand-w); color: var(--brand); stroke-width: 2.2; }
.cr-app small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink3); }
.cr-msg { margin-top: 6px; color: var(--ink2); }
.cr-msg b { font-weight: 800; color: var(--ink); }
.cr-msg b.up { color: var(--ok); }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); } 100% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 16px 6px 13px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--nl2); font-size: 14px; font-weight: 600; color: var(--on2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.pill b { color: var(--on); font-weight: 800; }
.live { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34D399; flex: none; }
.live::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #34D399; opacity: 0; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .75; } 100% { transform: scale(1.6); opacity: 0; } }

.hero-title { margin-top: 26px; font-family: var(--display); font-weight: 800; font-size: clamp(32px, 7vw, 84px); line-height: 1.13; letter-spacing: -0.048em; }
.ln { display: block; overflow: hidden; padding: 0 .04em .1em; margin-bottom: -.08em; }
.ln-in { display: inline-block; }
.hero-sub { margin-top: 22px; max-width: 37em; font-size: 17px; line-height: 1.75; color: var(--on2); }
.hero-sub b { color: var(--on); font-weight: 700; }

/* ── 입력창 ── */
.composer-slot { position: relative; width: 100%; isolation: isolate; }
.hero .composer-slot { max-width: 780px; margin-top: 34px; }
.hero .composer-slot::before { content: ""; position: absolute; left: 8%; right: 8%; top: 30%; bottom: -20%; z-index: -2; border-radius: 50%; background: radial-gradient(closest-side, rgba(99, 120, 255, .55), transparent); filter: blur(30px); }
.composer { position: relative; width: 100%; padding: 16px 14px 12px 20px; background: #fff; color: var(--ink); border-radius: 26px; text-align: left; box-shadow: 0 30px 80px -30px rgba(10, 14, 60, .8); }
.composer::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 28px; background: conic-gradient(from var(--ring), #6BE9FF, #3D57F5, #8B5CF6, #3D57F5 50%, rgba(255, 255, 255, .5) 66%, rgba(255, 255, 255, .5) 84%, #6BE9FF); animation: ring 6s linear infinite; }
.composer::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 26px; background: #fff; }
.composer:focus-within::before { background: conic-gradient(from var(--ring), #6BE9FF, #3D57F5, #8B5CF6, #6BE9FF); inset: -3px; border-radius: 29px; }
@keyframes ring { to { --ring: 360deg; } }
.composer textarea { display: block; width: 100%; min-height: 58px; max-height: 220px; padding: 4px 6px 0 0; border: 0; resize: none; background: transparent; font-size: 18px; line-height: 1.55; color: var(--ink); }
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: #626A82; opacity: 1; }
.composer-bar { display: flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 48px; }
.cbtn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 10px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink2); background: var(--p1); transition: border-color .15s, color .15s, background-color .15s; flex: none; }
.cbtn:hover { border-color: var(--brand); color: var(--brand-dk); background: #fff; }
.cbtn svg { width: 18px; height: 18px; }
.cbtn[aria-pressed="true"] { border-color: var(--seal); color: var(--seal); background: var(--bad-w); }
.cbtn[aria-pressed="true"] svg { animation: blink 1s steps(2) infinite; }
.composer-hint { flex: 1; min-width: 0; padding-left: 6px; font-size: 13px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-hint.is-error { color: var(--seal); font-weight: 700; }
.composer-mode { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 4px 0 11px; border-radius: 99px; background: var(--brand-w); color: var(--brand-dk); font-size: 14px; font-weight: 700; }
.composer-mode svg { width: 15px; height: 15px; }
.composer-mode button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: var(--brand-dk); }
.composer-mode button:hover { background: rgba(61, 87, 245, .16); }
.composer-mode button svg { width: 13px; height: 13px; stroke-width: 2.6; }
.send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-left: auto; border-radius: 50%; background: var(--cta); color: #fff; box-shadow: 0 12px 24px -10px rgba(61, 87, 245, .9); transition: transform .2s var(--ease), opacity .2s, box-shadow .2s; }
.send:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 30px -10px rgba(108, 76, 240, 1); }
.send svg { width: 22px; height: 22px; stroke-width: 2.5; }
.send[disabled] { opacity: .45; cursor: progress; transform: none; }
.composer-files { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 10px; }
.cfile { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--p1); animation: pop .3s var(--ease) both; }
.cfile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cfile button { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(10, 12, 23, .8); color: #fff; }
.cfile button svg { width: 13px; height: 13px; stroke-width: 2.6; }

.modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.mode { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px 0 13px; border-radius: 99px; background: rgba(14, 18, 40, .55); border: 1px solid var(--nl2); color: var(--on2); font-size: 15px; font-weight: 600; transition: border-color .2s, color .2s, background-color .2s, transform .2s var(--ease); }
.mode svg { width: 17px; height: 17px; color: var(--hi); }
.mode-more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; font-size: 14.5px; font-weight: 700; color: var(--hi); text-decoration: underline; text-underline-offset: 4px; }
.mode-more svg { width: 15px; height: 15px; }
.mode-more:hover { color: #fff; }
.mode:hover { color: var(--on); border-color: rgba(190, 200, 255, .55); transform: translateY(-2px); }
.mode.is-on { background: rgba(157, 176, 255, .18); border-color: var(--hi); color: #fff; }

.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 26px; font-size: 14.5px; color: var(--on2); }
.hero-facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts svg { width: 17px; height: 17px; color: var(--cy); }
.hero-facts b { color: var(--on); font-weight: 800; }

/* 예시 화면이 기울어져 흘러가는 띠 */

/* ── 섹션 공통 ── */
.sec-head { max-width: 760px; margin-bottom: 44px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--brand); }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 1px; background: currentColor; }
.sec-head h2, .final h2, .story-head h2, .voices h2 { font-family: var(--display); font-weight: 800; font-size: clamp(29px, 5.4vw, 54px); line-height: 1.2; letter-spacing: -0.042em; }
.sec-head h2 em { background: var(--grad-light); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-head > p:not(.kicker) { margin-top: 18px; font-size: 17.5px; color: var(--ink2); max-width: 40em; }
.sec-head.on-dark { color: var(--on); }
.sec-head.on-dark .kicker { color: var(--hi); }
.sec-head.on-dark h2 em { background: var(--grad-dark); -webkit-background-clip: text; background-clip: text; }
.sec-head.on-dark > p:not(.kicker) { color: var(--on2); }

/* 스크롤 등장 — 스크립트가 켜져 있을 때만 숨겼다가 보여 줍니다 (pre.js 가 3초 뒤 안전장치로 모두 보이게 함) */
.js .rv { opacity: 0; transform: translateY(26px); }
.js .rv.is-in, .js.reveal-all .rv { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
/* 첫 화면 등장 — 스크립트를 기다리지 않고 CSS 만으로 재생합니다 (화면이 바로 그려지도록) */
.intro { animation: rise .9s var(--ease-out) both; }
.intro.i0 { animation-delay: .05s; } .intro.i2 { animation-name: rise-soft; animation-delay: .1s; } .intro.i3 { animation-delay: .45s; animation-duration: 1.1s; } .intro.i5 { animation-delay: .8s; }
.intro-ln { animation: line-up 1.05s var(--ease-out) .1s both; }
.intro-ln.l2 { animation-delay: .2s; }
.intro-kids > li { animation: rise .7s var(--ease-out) both; }
.intro-kids > li:nth-child(1) { animation-delay: .6s; } .intro-kids > li:nth-child(2) { animation-delay: .65s; } .intro-kids > li:nth-child(3) { animation-delay: .7s; }
.intro-kids > li:nth-child(4) { animation-delay: .75s; } .intro-kids > li:nth-child(5) { animation-delay: .8s; } .intro-kids > li:nth-child(6) { animation-delay: .85s; }
.intro-kids > li:nth-child(n+7) { animation-delay: .9s; }
.intro-console { animation: console-in 1.3s var(--ease-out) .55s both; }
@keyframes console-in { from { opacity: 0; transform: translateY(46px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes line-up { from { opacity: .3; transform: translateY(45%); } to { opacity: 1; transform: none; } }
@keyframes rise-soft { from { opacity: .4; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* 안전장치: 등장 연출이 멈춰 있으면(탭이 숨겨진 채 열린 경우 등) 연출을 건너뛰고 바로 보여 줍니다 */

/* ── 떠 있는 버튼 (홈페이지연구소처럼 유튜브 · 카톡) ── */
.floats { position: fixed; z-index: 45; right: 14px; bottom: 24px; display: grid; justify-items: center; gap: 14px; transition: opacity .25s, transform .3s var(--ease); }
.floats.is-away { opacity: 0; transform: translateY(24px); pointer-events: none; }
body[data-view="app"] .floats, body[data-view="app"] .mbar { display: none; }
.fl { position: relative; display: grid; justify-items: center; gap: 6px; text-decoration: none; }
.fl-in { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; transition: transform .2s var(--ease), box-shadow .2s; }
.fl-yt .fl-in { background: #FF0000; color: #fff; box-shadow: 0 4px 20px rgba(255, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .2); }
.fl-yt svg { width: 30px; height: 30px; }
.fl-kk .fl-in { background: var(--kakao); color: #191600; box-shadow: 0 4px 20px rgba(250, 225, 0, .45), 0 8px 24px rgba(0, 0, 0, .2); animation: kk-pulse 2.6s ease-in-out infinite; }
.fl-kk svg { width: 30px; height: 30px; fill: #191600; stroke: none; }
.fl:hover .fl-in { transform: translateY(-4px); }
.fl-yt:hover .fl-in { box-shadow: 0 10px 36px rgba(255, 0, 0, .55); }
.fl-label { padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, .8); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.fl-yt .fl-label { position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.fl-yt:hover .fl-label, .fl-yt:focus-visible .fl-label { opacity: 1; transform: translate(0, -50%); }
@keyframes kk-pulse { 0%, 100% { box-shadow: 0 4px 20px rgba(250, 225, 0, .45), 0 8px 24px rgba(0, 0, 0, .2); } 50% { box-shadow: 0 4px 32px rgba(250, 225, 0, .8), 0 8px 28px rgba(0, 0, 0, .24); } }

.mbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(7, 9, 21, .92); backdrop-filter: blur(16px); border-top: 1px solid var(--nl); transform: translateY(110%); transition: transform .3s var(--ease); }
.mbar.is-on { transform: none; }
.mbar .btn { min-height: 52px; }
.mbar-btn { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid var(--nl2); color: var(--on); font-size: 12px; font-weight: 700; text-decoration: none; }
.mbar-btn svg { width: 20px; height: 20px; }
.mbar-btn:first-of-type { background: var(--kakao); border-color: var(--kakao); color: #191600; }
.mbar-btn:first-of-type svg { fill: #191600; stroke: none; }

/* ── 바닥글 — 홈페이지연구소와 같은 구성: 연락처·사업자 정보 → 약관 3종 → 바로 가기 (가운데 정렬) ── */
.ft { padding: 56px 0 calc(110px + env(safe-area-inset-bottom)); background: var(--n0); color: var(--on3); border-top: 1px solid var(--nl); text-align: center; }
.ft-in { display: flex; flex-direction: column; align-items: center; }
.logo-ft { color: var(--on); }
.logo-ft img { width: 28px; height: 28px; }
.ft-info { margin-top: 18px; font-size: 14px; line-height: 2; }
.ft-info a { color: inherit; text-decoration: none; }
.ft-info a:hover { color: var(--on2); text-decoration: underline; text-underline-offset: 3px; }
.ft-sep { margin: 0 .7em; opacity: .5; }
.ft-copy { font-size: 14px; line-height: 2; }
.ft-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.ft-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--nl2); background: rgba(255, 255, 255, .04); font-size: 13.5px; font-weight: 600; color: var(--on2); text-decoration: none; transition: border-color .2s, background-color .2s, color .2s; }
.ft-links a:hover { border-color: rgba(150, 165, 255, .5); background: rgba(255, 255, 255, .08); color: var(--on); }
.ft-guide { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 8px; font-size: 13px; }
.ft-guide a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on3); text-decoration: none; }
.ft-guide a:hover { color: var(--on2); text-decoration: underline; text-underline-offset: 3px; }
.ft-guide .ft-sep { margin: 0 .6em; }
.ft-break { flex-basis: 100%; height: 0; } /* 홈페이지연구소 링크는 늘 다음 줄에 — 줄이 꺾일 때 구분선이 끝에 혼자 남지 않도록 */

.noscript { margin: 0; padding: 16px 20px; background: var(--bad-w); color: var(--ink); font-size: 15px; text-align: center; }

@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ 넓은 화면 ══ */
@media (min-width: 640px) {
  .hero-sub { font-size: 18.5px; }
  .nav-kakao { display: inline-flex !important; }
}
@media (min-width: 760px) {
  body { font-size: 18px; }
  .wrap { padding: 0 40px; }
  .nav { padding: 0 24px 0 32px; }
  .composer { padding: 20px 16px 14px 24px; }
  .composer textarea { font-size: 19px; }
  .sec-head { margin-bottom: 60px; }
  .ft { padding-bottom: 56px; }
  .mbar { display: none; }
}
@media (min-width: 420px) {
  .logo-since { display: block; }
}
@media (min-width: 1080px) {
  .nav-links { display: flex; }
  .nav-menu { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 90px; }
}
@media (min-width: 1100px) {
  .hero-wrap { grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: 52px; }
  .hero-in { align-items: flex-start; text-align: left; }
  .hero-title { font-size: clamp(46px, 4.5vw, 70px); }
  .hero .composer-slot { max-width: none; }
  .modes, .hero-facts { justify-content: flex-start; }
  .hero-console { margin: 0; max-width: none; }
}
@media (max-width: 759px) {
  .floats { right: 10px; bottom: calc(90px + env(safe-area-inset-bottom)); }
  .fl-kk { display: none; } /* 휴대폰은 아래 고정 막대에 카톡 버튼이 있습니다 */
  .fl-in { width: 50px; height: 50px; }
  .fl-yt svg { width: 24px; height: 24px; }
  .modes { align-self: stretch; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 18px -20px 0; padding: 2px 20px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
  .modes::-webkit-scrollbar { display: none; }
  .modes li { flex: none; }
  .cons { font-size: 12px; }
  .cons-req p { font-size: 14.5px; }
  .cons-code pre { white-space: pre; overflow: hidden; font-size: 11.5px; } /* 좁은 화면은 줄을 끊지 않고 편집기처럼 오른쪽을 자릅니다 */
  .cons-result { right: 8px; bottom: -34px; }
}
@media (max-width: 759px) {
  .hero-facts { gap: 6px 14px; font-size: 13.5px; }
  .composer-hint { display: none; }
  .cbtn span { display: none; }
  .cbtn { padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
