@font-face {
  font-family: Pretendard;
  src: url("/assets/pretendard.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #F3F2ED;
  --panel: #fff;
  --ink: #292E2E;
  --muted: #525956;
  --line: #DDDAD0;
  --charcoal: #303636;
  --accent: #454C4C;
  --sand: #EFE8D8;
  --radius: 26px;
  --shadow: 0 8px 24px #35352D0D;
  font-family: Pretendard, "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.65;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.2; letter-spacing: -.055em; margin: .35rem 0 .5rem; }
h2 { font-size: 1.05rem; }
p, small, time { color: var(--muted); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #786034; outline-offset: 3px; }
svg { width: 1.2rem; height: 1.2rem; flex: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; background: var(--charcoal); color: white; padding: 1.7rem 1.15rem; }
.brand { display: flex; gap: .75rem; align-items: center; color: white; font-weight: 800; letter-spacing: .065em; }
.brand small { display: block; color: #CBCBC0; font-size: .73rem; font-weight: 500; letter-spacing: 0; }
.brand-mark { display: grid; place-items: center; flex: none; width: 2.55rem; height: 2.55rem; border-radius: 12px; background: var(--paper) url("/assets/turnpoint.png") center -34px / 132px 132px no-repeat; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.environment { color: #CBCBC0; margin: 1.8rem .75rem 0; }
nav { display: grid; gap: .35rem; margin: .55rem 0 1.3rem; }
nav a { display: flex; gap: .65rem; align-items: center; min-height: 46px; color: #F0EEE6; padding: .6rem .75rem; border-radius: 11px; text-decoration: none; }
nav a:hover { background: #414746; }
nav a[aria-current] { color: var(--sand); background: #4D5552; font-weight: 750; }
.account { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; border-top: 1px solid #515755; padding-top: 1rem; font-size: .85rem; }
.account .quiet { color: #F0EEE6; border-color: #727977; background: transparent; }
.account > span { overflow-wrap: anywhere; min-width: 0; }
.account button { flex: none; }
.content { padding: clamp(1rem, 4vw, 3.1rem); max-width: 92rem; width: 100%; margin: 0 auto; }
.page-head, .section-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.page-head { margin-bottom: 1.55rem; }
.grid, .workspace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.workspace-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.55rem); box-shadow: var(--shadow); }
.panel > p, .panel .section-head + form { margin-top: .75rem; }
.hero, .login-intro {
  color: white;
  background: radial-gradient(ellipse at 100% 5%, #696D60 0, transparent 62%), linear-gradient(135deg, #343A3A, #454C4C);
}
.hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2rem); margin-bottom: 1rem; box-shadow: var(--shadow); }
.hero h2 { font-size: clamp(1.45rem, 4vw, 2.25rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.hero p, .login-intro p { color: #E5E4DA; }
.hero .eyebrow, .login-intro .eyebrow { color: var(--sand); }
.hero .button { background: var(--sand); border-color: var(--sand); color: #303636; }
.stat h2 { margin-top: .75rem; }
.stat p, .muted { font-size: .875rem; }
.tile { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; color: var(--accent); background: #EEEADF; }
.metric { display: block; font-size: 2.1rem; line-height: 1.2; margin: .45rem 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric.pending { font-size: 1.4rem; color: var(--muted); }
.button, .quiet { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 46px; padding: .55rem .95rem; border-radius: 14px; font-weight: 700; text-decoration: none; }
.button { border: 1px solid var(--accent); background: var(--accent); color: white; }
.quiet { border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.button, .quiet {
  box-shadow: 0 2px 0 #282b2630, 0 4px 9px #282b2610;
  transition: transform 190ms cubic-bezier(.22, 1.5, .36, 1), box-shadow 150ms ease, filter 150ms ease;
}
@media (hover: hover) {
  .button:hover, .quiet:hover { filter: brightness(.96); }
}
.button:active, .quiet:active {
  transform: translateY(2px) scale(.975);
  box-shadow: inset 0 2px 4px #282b2638;
  transition-duration: 75ms;
}
@media (prefers-reduced-motion: reduce) {
  .button, .quiet { transition: none; }
  .button:active, .quiet:active { transform: none; }
}
@supports (corner-shape: squircle) {
  .panel, .hero, .login-layout, .brand-mark, .button, .quiet, nav a, .tile, .floor > div {
    corner-shape: squircle;
  }
}
label { display: block; font-size: .86rem; font-weight: 750; margin-bottom: .3rem; }
input, textarea, select { border: 1px solid #9A9E93; border-radius: 10px; min-height: 44px; padding: .6rem .7rem; color: var(--ink); background: white; }
input, textarea { width: 100%; }
textarea { resize: vertical; }
textarea::placeholder { color: #62685F; }
.composer textarea + .section-head { margin-top: .75rem; }
.project-switch { max-width: 100%; }
.project-switch div { display: flex; gap: .4rem; }
.project-switch select { min-width: 0; width: 100%; }
.project-switch button { flex: none; white-space: nowrap; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-layout { display: grid; grid-template-columns: 1.05fr 1fr; width: min(100%, 58rem); border: 1px solid var(--line); border-radius: 32px; overflow: hidden; box-shadow: 0 24px 65px #34352E20; background: var(--panel); }
.login-intro, .login { padding: clamp(1.4rem, 5vw, 3.2rem); }
.login-intro { display: grid; align-content: space-between; gap: 2.5rem; }
.login-intro h2 { font-size: clamp(1.8rem, 5vw, 3.2rem); line-height: 1.2; letter-spacing: -.055em; margin: .5rem 0 .8rem; }
.login { border: 0; border-radius: 0; box-shadow: none; }
.login h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.login form { display: grid; gap: .55rem; margin-top: 1.3rem; }
.login form label { margin: .45rem 0 0; }
.login form button { margin-top: .65rem; }
.alert { color: #9a2727; }
.empty { background: #F8F6F0; border: 1px dashed #BCB9AB; border-radius: 12px; padding: 1.15rem; margin-top: 1rem; }
.empty p { font-size: .87rem; margin-top: .25rem; }
.drafts { list-style: none; padding: 0; margin-bottom: 0; }
.drafts li { border-top: 1px solid var(--line); padding: .85rem 0; }
.drafts p { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; margin: .35rem 0; }
.drafts time { font-size: .8rem; }
.badge { display: inline-block; background: #EEEADF; color: var(--accent); border-radius: 20px; padding: .22rem .65rem; font-size: .75rem; font-weight: 750; }
.floor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; border: 1px solid var(--line); background: radial-gradient(#D5D2C5 1px, transparent 1px) 0 0 / 14px 14px, #F4F2EA; border-radius: 15px; padding: .85rem; margin: .9rem 0; }
.floor > div { min-height: 10rem; border: 1px solid var(--line); border-radius: 12px; background: white; padding: .9rem; display: grid; gap: .15rem; align-content: center; }
.floor .tile { margin-bottom: .45rem; }
.content > .panel + .panel { margin-top: 1rem; }
.run-card { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.run-card > * + *, .run-form { margin-top: .65rem; }
.run-form input + label, .run-form p + button { margin-top: .65rem; }
summary { cursor: pointer; font-weight: 750; }
.result-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: .9rem; border-radius: 14px; background: var(--paper); color: var(--ink); }
.review-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .7rem 0; }
.notice { background: var(--sand); color: var(--ink); padding: .65rem .9rem; border-radius: 10px; margin-bottom: .8rem; }
.account-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .7rem; }
.account-fields select, .account-fields input { display: block; width: 100%; }
.account-editor fieldset { border: 1px solid var(--line); border-radius: 12px; }
.membership { display: flex; align-items: center; gap: .55rem; min-height: 40px; }
.membership input { width: 1.15rem; min-height: 0; height: 1.15rem; accent-color: var(--accent); }
.budget-input { max-width: 12rem; }
.plan-steps { display: grid; gap: .55rem; padding: 0; list-style: none; }
.plan-steps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem;
  padding: .75rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.plan-steps li > div { flex: 1 1 13rem; min-width: 0; overflow-wrap: anywhere; }
.plan-steps small { display: block; }
.plan-steps select { display: block; }
.skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-150%); padding: .5rem; background: white; }
.skip:focus { transform: none; }
.skip { z-index: 15; }
.shell { --sidebar-width: 15rem; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.shell.interactive { transition: grid-template-columns 240ms cubic-bezier(.22,.8,.25,1); }
.shell.sidebar-collapsed { --sidebar-width: 4.7rem; }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow: auto; z-index: 8; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sidebar .brand, .sidebar nav a { white-space: nowrap; }
.sidebar-collapsed .sidebar { padding-inline: .8rem; overflow: hidden; }
.sidebar-collapsed .brand { justify-content: center; }
.sidebar-collapsed .brand > span:last-child, .sidebar-collapsed .environment,
.sidebar-collapsed nav a > span, .sidebar-collapsed .account > span {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.sidebar-collapsed nav { margin-top: 1.8rem; }
.sidebar-collapsed nav a, .sidebar-collapsed .account { justify-content: center; }
nav a { transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
nav a:active { transform: scale(.98); }
.workspace-area { min-width: 0; }
.workspace-bar { position: sticky; top: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center;
  min-height: 64px; padding: .4rem clamp(1rem, 4vw, 3.1rem); border-bottom: 1px solid var(--line);
  background: #f3f2edf0; backdrop-filter: blur(14px); }
.bar-context { display: flex; align-items: center; gap: .7rem; font-size: .9rem; font-weight: 750; }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 13px; background: white;
  color: var(--ink); cursor: pointer; transition: background 160ms ease, transform 180ms ease; }
.sidebar .icon-button { background: transparent; border-color: #727977; color: #F0EEE6; }
.icon-button:active { transform: scale(.93); }
#menu-toggle, #drawer-close, #drawer-backdrop { display: none; }
.interactive #menu-toggle { display: inline-flex; }
.notifications { position: relative; }
.notifications > summary { list-style: none; }
.notifications > summary::-webkit-details-marker { display: none; }
#notification-count { position: absolute; top: -.22rem; right: -.26rem; border-radius: 999px; background: #8a4c31;
  color: white; font-size: .67rem; min-width: 1.2rem; height: 1.2rem; line-height: 1.2rem; text-align: center; padding-inline: .16rem; }
.notification-panel { position: absolute; inset-inline-end: 0; top: calc(100% + .6rem); width: min(21rem, calc(100vw - 2rem));
  background: white; box-shadow: 0 16px 44px #292e2e29; border: 1px solid var(--line); border-radius: 18px; padding: .9rem; }
#notification-list { margin-top: .65rem; max-height: min(55dvh, 24rem); overflow: auto; }
.notification-item { display: grid; gap: .1rem; padding: .65rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.notification-item + .notification-item { margin-top: .2rem; }
.completion-toast { position: fixed; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 7;
  display: flex; align-items: center; gap: .7rem; max-width: min(25rem, calc(100vw - 2rem));
  padding: .65rem .75rem; background: #fff; border: 1px solid #a9bea8; border-radius: 18px; box-shadow: 0 12px 32px #292e2e25; }
[hidden] { display: none !important; }
.completion-toast a { font-weight: 750; overflow-wrap: anywhere; }
.completion-toast .tile, .review-stat .tile { background: #e3eddf; color: #36533c; }
.review-stat { border-color: #afc4ad; }
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > div, .hero > a { position: relative; }
.hero .hero-art { position: absolute; inset-inline-end: 0; bottom: 0; width: min(52%, 25rem); height: auto; z-index: -1; pointer-events: none; }
.badge[class*="state-"] { display: inline-flex; align-items: center; gap: .37rem; }
.badge[class*="state-"] > span { width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; }
.state-running { color: #345879; background: #e3edf7; }
.state-review, .state-approved { color: #36533c; background: #e3eddf; }
.state-revision, .state-queued { color: #704a20; background: #f3e8d4; }
.state-failed, .state-rejected, .state-interrupted { color: #853c32; background: #f5e4df; }
@media (hover: hover) {
  .button:hover, .quiet:hover { transform: translateY(-2px); box-shadow: 0 6px 16px #292e2e24; }
  .button:active, .quiet:active { transform: translateY(2px) scale(.975); box-shadow: inset 0 2px 4px #282b2638; }
  .icon-button:hover, .notification-item:hover { background: #eee9df; }
  .sidebar .icon-button:hover { background: #515755; }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
  .completion-toast:not([hidden]) { animation: toast-enter 220ms ease-out; }
  @keyframes toast-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 1rem; }
  .environment { margin: .7rem 0 0; }
  nav { display: flex; flex-wrap: wrap; margin: .35rem 0 .65rem; }
  .account { padding-top: .55rem; }
  .shell:not(.interactive) .sidebar { position: static; height: auto; }
  .interactive .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(19rem, 86vw); height: 100dvh;
    transform: translateX(-101%); visibility: hidden;
    transition: transform 240ms cubic-bezier(.22,.8,.25,1), visibility 0s linear 240ms;
  }
  .drawer-open .sidebar { transform: none; visibility: visible; transition-delay: 0s; }
  .interactive .sidebar nav { display: grid; }
  .interactive #drawer-close { display: inline-flex; }
  .interactive #drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 7; background: #292e2e65;
    opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
  .drawer-open #drawer-backdrop { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .shell.interactive, .interactive .sidebar, .interactive #drawer-backdrop,
  .icon-button, nav a { transition: none; }
  .icon-button:active, nav a:active, .button:hover, .quiet:hover,
  .button:active, .quiet:active { transform: none; }
}
@media (max-width: 650px) {
  .grid, .floor, .workspace-grid, .login-layout { grid-template-columns: 1fr; }
  .login-intro { gap: .9rem; }
  .login-intro h2 br { display: none; }
  .login-intro > .eyebrow { display: none; }
  .floor > div { min-height: 7rem; }
}

