:root {
  color-scheme: light;
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  font-weight: 400;
  --ink: #202722;
  --muted: #757d76;
  --soft: #a0a69f;
  --line: #e2e6e1;
  --accent: #3f765d;
  --paper: #f7f8f6;
  --white: #fff;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
.view { min-height: 100vh; min-height: 100svh; }
.hidden { display: none !important; }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Password gate */
.gate { display: flex; justify-content: center; padding: 0 48px; }
.gate-shell { display: flex; flex-direction: column; width: min(100%, 1160px); min-height: 100vh; min-height: 100svh; }
.gate-topbar, .gate-footer { display: flex; align-items: center; justify-content: space-between; }
.gate-topbar { height: 84px; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .07em; text-decoration: none; }
.wordmark-period { color: var(--accent); }
.online-status, .role-label, .access-index, .gate-footer, .access-foot, .suggestion-label, .composer-note, .system-status { font-family: "DM Mono", "DM Sans", monospace; }
.online-status { display: inline-flex; align-items: center; gap: 8px; color: #6e786f; font-size: 10px; letter-spacing: .11em; }
.online-status i, .system-status i { width: 6px; height: 6px; border-radius: 50%; background: #6ca47d; box-shadow: 0 0 0 3px rgba(108,164,125,.12); }
.gate-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: center; gap: clamp(48px, 9vw, 132px); flex: 1; padding: 90px 0 100px; }
.intro { max-width: 690px; }
.role-label { margin: 0 0 26px; color: var(--muted); font-size: 10px; letter-spacing: .14em; }
.role-label span { margin: 0 4px; color: var(--accent); }
.intro h1 { margin: 0; font-size: clamp(42px, 5.7vw, 72px); line-height: 1.3; letter-spacing: -.075em; font-weight: 600; }
.intro-copy { margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.95; letter-spacing: -.025em; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 35px 0 0; list-style: none; }
.skill-list li { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: #5d675f; background: rgba(255,255,255,.48); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .04em; }
.access-panel { align-self: center; padding: 24px 0 20px 28px; border-left: 1px solid var(--line); }
.access-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 42px; }
.access-index { color: #919a92; font-size: 9px; letter-spacing: .12em; }
.access-mark { color: var(--accent); font-size: 21px; }
.access-panel h2 { margin: 0 0 9px; font-size: 20px; line-height: 1.4; letter-spacing: -.055em; font-weight: 600; }
.access-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-form { margin-top: 26px; }
.login-form input { width: 100%; height: 49px; padding: 0 14px; border: 1px solid #dce2dc; border-radius: 9px; outline: none; background: var(--white); color: var(--ink); font-size: 13px; transition: border-color .18s, box-shadow .18s; }
.login-form input::placeholder { color: #a2aaa3; }
.login-form input:focus, .composer:focus-within { border-color: #8daf99; box-shadow: 0 0 0 3px rgba(63,118,93,.08); }
.primary-button { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 48px; margin-top: 9px; padding: 0 15px; border: 0; border-radius: 9px; background: #25332b; color: var(--white); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s; }
.primary-button:hover { background: var(--accent); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.form-message { min-height: 17px; margin: 8px 0 0; color: #a3473e; font-size: 11px; }
.access-foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: #a1a79f; font-size: 8px; letter-spacing: .08em; }
.lock-icon { color: var(--accent); font-size: 12px; }
.gate-footer { height: 58px; border-top: 1px solid var(--line); color: #a1a79f; font-size: 8px; letter-spacing: .1em; }

/* Chat workspace */
.workspace { display: flex; flex-direction: column; width: min(100%, 1440px); margin: 0 auto; padding: 0 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .045em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #25332b; color: var(--white); font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.system-status { display: flex; align-items: center; gap: 8px; color: #828b83; font-size: 9px; letter-spacing: .08em; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: #777f78; font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--ink); }
.text-button span { margin-left: 3px; color: var(--accent); }
.conversation { display: flex; flex: 1; flex-direction: column; width: min(100%, 760px); margin: 0 auto; }
.welcome { display: flex; flex: 1; flex-direction: column; align-items: flex-start; justify-content: center; padding: 76px 0 52px; }
.welcome .eyebrow { margin: 0 0 17px; color: var(--accent); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .13em; }
.welcome h1 { margin: 0 0 12px; font-size: clamp(38px, 5vw, 54px); line-height: 1.15; letter-spacing: -.075em; font-weight: 600; }
.welcome-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; letter-spacing: -.025em; }
.suggestion-section { width: 100%; margin-top: 46px; }
.suggestion-label { margin: 0 0 13px; color: #8c958d; font-size: 9px; letter-spacing: .035em; }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.suggestion { display: flex; min-height: 82px; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.62); color: #505a52; font-size: 11px; line-height: 1.65; text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.suggestion span { flex: 0 0 auto; color: var(--accent); font-size: 13px; }
.suggestion:hover { transform: translateY(-2px); border-color: #bacbbf; background: var(--white); }
.messages { display: flex; flex-direction: column; gap: 18px; padding: 24px 0 30px; }
.message { max-width: 84%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.message.user { align-self: flex-end; border-color: #dce6dd; border-bottom-right-radius: 4px; background: #eaf0eb; }
.message.assistant { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--white); }
.message.error { color: #9a4d43; }
.composer-wrap { width: min(100%, 760px); margin: 0 auto; padding: 0 0 22px; }
.composer { display: flex; align-items: flex-end; gap: 11px; min-height: 59px; padding: 9px 10px 9px 16px; border: 1px solid #dce2dc; border-radius: 13px; background: var(--white); transition: border-color .18s, box-shadow .18s; }
.composer textarea { flex: 1; max-height: 180px; resize: none; padding: 7px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.55; }
.composer textarea::placeholder { color: #9da69e; }
.send-button { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: #25332b; color: var(--white); font-size: 19px; line-height: 1; cursor: pointer; transition: background .18s; }
.send-button:hover { background: var(--accent); }
.send-button:disabled { opacity: .45; cursor: wait; }
.composer-note { display: flex; justify-content: space-between; padding: 9px 3px 0; color: #9aa29b; font-size: 8px; letter-spacing: .025em; }
.typing { color: #858d86; }

@media (max-width: 820px) {
  .gate { padding: 0 28px; }
  .gate-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 42px; }
  .access-panel { padding-left: 22px; }
  .intro h1 { font-size: clamp(38px, 6vw, 56px); }
  .workspace { padding: 0 28px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestion { min-height: auto; }
}

@media (max-width: 620px) {
  .gate { padding: 0 22px; }
  .gate-topbar { height: 68px; }
  .gate-layout { grid-template-columns: 1fr; align-content: center; gap: 42px; padding: 48px 0 42px; }
  .role-label { margin-bottom: 18px; font-size: 8px; }
  .intro h1 { font-size: clamp(35px, 10vw, 48px); line-height: 1.32; }
  .intro-copy { margin-top: 16px; font-size: 12px; }
  .desktop-break { display: none; }
  .skill-list { gap: 6px; margin-top: 24px; }
  .skill-list li { padding: 7px 9px; font-size: 9px; }
  .access-panel { padding: 19px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .access-heading { margin-bottom: 23px; }
  .access-panel h2 { font-size: 17px; }
  .login-form { display: grid; grid-template-columns: 1fr 100px; gap: 8px; margin-top: 18px; }
  .login-form input { height: 45px; }
  .primary-button { height: 45px; margin-top: 0; padding: 0 12px; }
  .form-message { grid-column: 1 / -1; margin-top: 0; }
  .access-foot { margin-top: 9px; }
  .gate-footer { height: 45px; font-size: 7px; }
  .workspace { padding: 0 18px; }
  .topbar { height: 66px; }
  .brand { font-size: 10px; }
  .topbar-actions { gap: 13px; }
  .system-status { font-size: 8px; }
  .welcome { justify-content: flex-start; padding: 66px 0 35px; }
  .welcome h1 { font-size: 42px; }
  .welcome-copy { font-size: 12px; }
  .welcome-copy br { display: none; }
  .suggestion-section { margin-top: 34px; }
  .suggestions { gap: 7px; }
  .composer-wrap { padding-bottom: 15px; }
  .composer-note { font-size: 7px; }
  .message { max-width: 94%; font-size: 12px; }
}
