:root { font-family: Inter, Pretendard, system-ui, sans-serif; color: #e9f0f7; background: #08111a; scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% -20%, #153347 0, transparent 38%), #08111a; }
button, input, select { font: inherit; }
button { border: 1px solid #294052; color: #e9f0f7; background: #142431; border-radius: 9px; padding: 10px 14px; cursor: pointer; }
button:hover:not(:disabled) { border-color: #59a99c; }
button:disabled { cursor: not-allowed; opacity: .4; }
button.primary { background: #14bda8; border-color: #14bda8; color: #04120f; font-weight: 800; }
button.danger { background: #451c27; border-color: #a84158; color: #ffd6dc; }
header { position: sticky; z-index: 8; top: 0; height: 66px; padding: 0 max(24px, calc((100vw - 1420px) / 2)); display: flex; align-items: center; gap: 22px; border-bottom: 1px solid #1d2c38; background: #09141df2; backdrop-filter: blur(14px); }
header nav { display: flex; align-items: center; gap: 12px; margin-left: auto; } header a { color: #91a8ba; text-decoration: none; font-size: 13px; }.settings-short { display: none; }
.brand { display: flex; align-items: center; gap: 10px; }.brand b { width: 34px; height: 34px; display: grid; place-items: center; background: #19c8b2; color: #062019; border-radius: 9px; font-size: 20px; }
.brand div { display: grid; }.brand small { color: #6f879a; font-size: 10px; letter-spacing: .08em; }
.demo { color: #ff9ba8; border: 1px solid #713340; background: #321922; padding: 5px 9px; border-radius: 20px; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
main { min-width: 0; max-width: 1420px; margin: auto; padding: 28px 24px 70px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.hero p, .section-head p, .control-copy p, .modal p { color: #24c9b4; letter-spacing: .15em; font-size: 11px; font-weight: 800; margin: 0 0 8px; }
h1 { font-size: clamp(27px, 4vw, 44px); margin: 0 0 10px; letter-spacing: -.04em; }
.hero span, .modal > div > span { color: #849aac; }
.lock-state { color: #ff9ba8 !important; background: #321922; border-color: #713340; border-radius: 18px; padding: 7px 11px; font-size: 11px; font-weight: 800; }
.lock-state.unlocked { color: #56dfc8 !important; border-color: #287c72; background: #123a34; }
.setup { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; background: #0e1b25; border: 1px solid #223643; padding: 20px; border-radius: 14px; }
.setup h2 { margin: 0; font-size: 18px; }.setup p { color: #8197a8; margin: 5px 0 10px; font-size: 13px; }.setup-actions { display: flex; gap: 8px; }
.setup.compact { padding: 14px 18px; }.setup.compact p, .setup.compact .progress { display: none; }
.flow-heading { display: flex; align-items: center; gap: 9px; }.flow-heading > b, .inline-step { display: inline-grid; flex: 0 0 auto; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: #173744; color: #57ddc7; font-size: 12px; }.flow-heading h2 { margin: 0; }
.progress { height: 3px; background: #233441; overflow: hidden; border-radius: 4px; }.progress i { display: block; width: 0; height: 100%; background: #1bc8b2; transition: width .3s; }
.dependencies-panel { margin: 12px 0 28px; border: 1px solid #192a36; border-radius: 10px; background: #0b1720; }
.dependencies-panel summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 13px; color: #8da1b1; cursor: pointer; font-size: 12px; list-style: none; }.dependencies-panel summary::-webkit-details-marker { display: none; }.dependencies-panel summary::before { content: "›"; color: #57ddc7; font-size: 18px; transform: rotate(0); transition: transform .15s; }.dependencies-panel[open] summary::before { transform: rotate(90deg); }.dependencies-panel summary span { margin-right: auto; }.dependencies-panel summary b { color: #56dfc8; font-size: 11px; }.dependencies-panel summary b.error { color: #ff9eac; }
.dependencies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 12px 12px; }
.dependency { display: flex; align-items: center; gap: 9px; color: #8da1b1; padding: 11px 13px; background: #0b1720; border: 1px solid #192a36; border-radius: 9px; font-size: 12px; }
.dependency i { width: 8px; height: 8px; border-radius: 50%; background: #e76a78; }.dependency.ok i { background: #29c8a5; box-shadow: 0 0 10px #29c8a566; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin: 34px 0 14px; }.section-head h2 { margin: 0; font-size: 24px; }.section-head span { display: block; color: #71899a; margin-top: 6px; font-size: 12px; }
.procedure-workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, .65fr); align-items: start; gap: 16px; }
.scenario-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }.scenario-groups article { min-width: 0; background: #0c1822; border: 1px solid #1e3441; border-radius: 13px; padding: 14px; }.scenario-groups article:last-child { grid-column: 1 / -1; }.scenario-groups h3 { margin: 0 0 10px; color: #7f96a7; font-size: 12px; }
.scenario-list { display: grid; gap: 6px; }.scenario-list button { display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 8px; text-align: left; padding: 8px; background: #101f2a; }.scenario-list button b { display: grid; place-items: center; height: 27px; border-radius: 6px; background: #1c3340; color: #84a0b2; }.scenario-list button span { font-size: 11px; }.scenario-list button.selected { border-color: #1cc5b0; background: #123a35; }.scenario-list button.selected b { background: #1cc5b0; color: #05201c; }
.control-panel { position: sticky; top: 82px; min-width: 0; scroll-margin-top: 78px; padding: 22px; border: 1px solid #2a5360; border-radius: 15px; background: linear-gradient(135deg, #102630, #0d1923); display: grid; grid-template-columns: 1fr; gap: 18px; }
.control-panel:focus { outline: 2px solid #24c9b4; outline-offset: 3px; }.control-copy h2 { margin: 0 0 7px; }.control-copy span { color: #8ca1b0; font-size: 13px; }.control-copy p { display: flex; align-items: center; gap: 8px; }.control-copy p span { color: #24c9b4; font-size: 11px; }.control-panel label { display: grid; align-content: start; gap: 7px; color: #8ca1b0; font-size: 11px; }.control-panel label small { color: #5edcc9; }
.target-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.target-label #target-sync { color: #ffd27a; font-weight: 700; text-align: right; }
select, input { background: #0e1d28; color: #e9f0f7; border: 1px solid #293d4d; border-radius: 8px; padding: 10px; outline: none; }
.recipe-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }.recipe { min-height: 88px; display: grid; align-content: center; gap: 5px; text-align: left; }.recipe strong { font-size: 15px; }.recipe span { font-size: 11px; opacity: .78; font-weight: 500; }
.beds-panel { margin-top: 26px; }.beds-panel > summary { cursor: pointer; list-style: none; }.beds-panel > summary::-webkit-details-marker { display: none; }.beds-panel > summary::after { content: "펼치기"; margin-left: auto; padding: 8px 12px; border: 1px solid #294052; border-radius: 8px; color: #91a8ba; font-size: 11px; }.beds-panel[open] > summary::after { content: "접기"; }.beds-panel > summary > b { margin-left: auto; margin-right: 10px; color: #56dfc8; font-size: 11px; white-space: nowrap; }
.beds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.bed { display: flex; justify-content: space-between; gap: 15px; align-items: center; min-width: 0; background: #0d1a24; border: 1px solid #203441; border-radius: 11px; padding: 14px; }.bed > div { flex: 1 1 auto; min-width: 0; }.bed.eligible { border-color: #23594f; }.bed.blocked { opacity: .55; }.bed span { color: #5f7a8e; font-size: 9px; font-weight: 800; letter-spacing: .1em; }.bed h3 { margin: 3px 0; font-size: 18px; }.bed p { margin: 0; color: #6f8798; font-size: 10px; overflow-wrap: anywhere; }.bed b { flex: 0 1 auto; min-width: 0; max-width: 65%; padding: 6px 8px; border-radius: 6px; background: #182b38; color: #9cb3c3; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; text-align: center; }
dialog { padding: 0; color: inherit; background: transparent; border: 0; max-width: min(680px, calc(100vw - 32px)); width: 100%; } dialog::backdrop { background: #02070bd9; backdrop-filter: blur(4px); }
.modal { border: 1px solid #2b4657; background: #0d1b25; border-radius: 16px; padding: 24px; display: grid; gap: 20px; box-shadow: 0 25px 70px #0008; }.modal h2 { margin: 0 0 7px; }.modal label { display: grid; gap: 7px; color: #8ea3b2; font-size: 12px; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #172934; border: 1px solid #345061; padding: 12px 18px; border-radius: 9px; opacity: 0; pointer-events: none; transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast.error { background: #3a1a24; border-color: #804052; }
.mobile-control-jump { display: none; }
@media (min-width: 1025px) {
  .scenario-groups article:not(:last-child) .scenario-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenario-list button { min-height: 46px; }
}
@media (max-width: 1024px) {
  button, input, select { min-height: 44px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  button:active:not(:disabled) { transform: scale(.985); }
  header { padding: 0 20px; }
  header a { min-height: 44px; display: flex; align-items: center; text-align: right; }
  main { padding: 24px 20px 56px; }
  .procedure-workspace { display: block; }
  .scenario-groups { grid-template-columns: 1fr; }
  .scenario-groups article:last-child { grid-column: auto; }
  .scenario-groups article { overflow: hidden; padding: 14px 0 14px 14px; }
  .scenario-groups h3 { padding-right: 14px; }
  .scenario-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 42vw); gap: 8px; overflow-x: auto; padding: 0 14px 4px 0; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; scrollbar-width: none; }
  .scenario-list::-webkit-scrollbar { display: none; }
  .scenario-list button { min-height: 54px; scroll-snap-align: start; }
  .control-panel { position: static; margin-top: 16px; grid-template-columns: 1fr minmax(230px, .5fr); }
  .recipe-actions { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .beds { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); width: calc(100vw - 32px); max-width: 520px; text-align: center; }
  .mobile-control-jump:not([hidden]) { position: fixed; z-index: 7; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50%; width: min(640px, calc(100vw - 24px)); display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #38b9a8; border-radius: 15px; padding: 10px 16px; background: #123a35f2; box-shadow: 0 12px 35px #000a; text-decoration: none; backdrop-filter: blur(12px); transform: translateX(-50%); }
  .mobile-control-jump span { min-width: 0; overflow: hidden; color: #b9d5d0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-control-jump strong { flex: 0 0 auto; color: #5ce7d0; font-size: 14px; }
}
@media (max-width: 680px) {
  header { padding: 0 12px; gap: 10px; }
  header nav { gap: 8px; }
  .brand small, .demo, .settings-long { display: none; }
  .settings-short { display: inline; }
  .lock-state { padding-inline: 9px; }
  main { padding: 28px 16px 56px; }
  .hero, .setup, .control-panel { display: grid; grid-template-columns: 1fr; }
  .hero { align-items: stretch; gap: 16px; }
  .setup { padding: 18px; }
  .setup-actions { width: 100%; }
  .setup-actions button { flex: 1 1 auto; }
  .setup.compact { padding: 14px; }
  .dependencies { grid-template-columns: 1fr 1fr; gap: 8px; }
  .section-head { align-items: flex-start; gap: 12px; }
  .section-head button { flex: 0 0 auto; }
  .scenario-list { grid-auto-columns: minmax(170px, 76vw); }
  .control-panel { padding: 18px; }
  .recipe-actions { grid-template-columns: 1fr; }
  .beds { grid-template-columns: 1fr; }
  .bed { align-items: stretch; flex-direction: column; gap: 10px; }
  .bed b { align-self: stretch; max-width: none; text-align: left; }
  .beds-panel > summary { align-items: center; }
  .beds-panel > summary > div > span { display: none; }
  .beds-panel > summary > b { margin-left: 0; }
  .beds-panel > summary::after { margin-left: 0; }
  .modal { padding: 20px; }
  .modal-actions button { flex: 1 1 0; }
}
@media (pointer: coarse) {
  button, input, select, header a { min-height: 44px; }
}
