@charset "UTF-8";
:root {
  color-scheme: light;
  --bg: #f6f7fb; --ink: #202840; --muted: #7f879b;
  --line: #e9ecf3; --accent: #6254da; --soft: #f2f0ff;
  font-family: Inter, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button, a, select, input[type=range] { touch-action: manipulation; }
button { cursor: pointer; transition: background .15s, transform .15s; }
button:disabled { cursor: default; opacity: .4; }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #b3a9ff; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.site-header { height: 80px; border-bottom: 1px solid var(--line); background: #ffffffd9; display: flex; align-items: center; gap: 55px; padding: 0 max(32px, calc((100vw - 1320px)/2)); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; letter-spacing: -.5px; white-space: nowrap; }
.brand strong { font-weight: 750; }
.brand-mark { display: flex; width: 33px; height: 33px; background: var(--accent); border-radius: 9px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.brand-mark i { height: 3px; border-radius: 2px; background: white; width: 10px; }
.brand-mark i:nth-child(2) { width: 16px; }
.brand-mark i:nth-child(3) { width: 22px; }
.course-label { font-size: 12px; color: var(--muted); }
.course-label b { font-weight: 500; color: #555e75; }
.divider { margin: 0 13px; color: #ced2dd; }
.lesson-tag { margin-left: auto; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; color: #8b92a4; white-space: nowrap; }
.lesson-tag span { margin-left: 12px; background: #eeecfa; color: var(--accent); padding: 6px 8px; border-radius: 5px; letter-spacing: 0; }
main { max-width: 1320px; margin: 0 auto; padding: 42px 0 24px; }
.page-intro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 31px; }
.eyebrow { font-size: 10px; font-weight: 750; color: var(--accent); letter-spacing: 2px; margin-bottom: 11px; }
h1 { font-size: 38px; line-height: 1.25; letter-spacing: -1.9px; font-weight: 800; }
.title-dot { color: var(--accent); margin-left: 3px; }
.intro-copy { margin-top: 12px; color: #858c9d; font-size: 13px; }
.formula { display: grid; grid-template-columns: auto auto; gap: 6px 21px; align-items: center; padding: 14px 23px; border-left: 1px solid #dfe3ec; }
.formula > span { font-size: 11px; color: #697187; }
.formula strong { grid-row: span 2; font-size: 31px; font-weight: 600; color: #565577; letter-spacing: -1px; }
.formula sup { font-size: 18px; }
.formula small { font-size: 10px; color: #969daf; }
.workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; }
.card { background: white; border: 1px solid #e6e9f1; border-radius: 15px; box-shadow: 0 3px 5px #20284002; }
.settings { padding: 25px 24px; grid-column: 1; grid-row: 1; }
.section-heading { display: flex; align-items: center; gap: 10px; }
.section-index { font-size: 10px; font-weight: 700; color: #a19bbf; letter-spacing: 1px; }
.section-heading h2 { font-size: 14px; letter-spacing: -.4px; font-weight: 750; }
.section-copy { font-size: 11px; color: var(--muted); margin: 10px 0 27px; }
.field-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 650; margin-bottom: 10px; color: #555e72; }
.field-label > span { color: #a0a5b5; font-size: 10px; font-weight: 400; }
.number-field { display: flex; align-items: center; border: 1px solid #e0e4ef; border-radius: 8px; height: 45px; background: #fbfcfe; padding: 4px; }
.number-field button { width: 34px; height: 32px; border: 0; border-radius: 5px; background: white; color: #7c8296; box-shadow: 0 1px 3px #2028400c; font-size: 21px; line-height: 1; }
.number-field button:hover { background: var(--soft); color: var(--accent); }
.number-field input { width: 0; flex: 1; border: 0; background: transparent; text-align: center; appearance: textfield; -moz-appearance: textfield; font-size: 17px; font-weight: 650; color: var(--ink); }
.number-field input::-webkit-inner-spin-button, .number-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.disk-count-hint { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #8b91a4; margin: 10px 0 25px; }
.tiny-dot { width: 4px; height: 4px; background: #a79edb; border-radius: 50%; margin-right: 3px; }
.disk-count-hint strong { color: var(--accent); font-weight: 650; }
.route-fields { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); align-items: end; gap: 3px; margin-bottom: 22px; }
.route-arrow { height: 38px; display: grid; place-items: center; color: #a7adbc; }
.route-fields select { width: 100%; height: 38px; border: 1px solid #e0e4ef; border-radius: 7px; background: #fbfcfe; color: #535d74; font-size: 11px; padding: 0 6px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 8px; background: var(--accent); color: white; height: 44px; width: 100%; font-weight: 650; font-size: 12px; box-shadow: 0 3px 6px #6254da20; }
.primary-button:hover:not(:disabled) { background: #5143c8; }
.primary-button > span { font-size: 10px; }
.form-note { font-size: 9px; color: #9fa5b5; text-align: center; margin: 11px -10px 0; }
.form-message { color: #b34248; font-size: 11px; line-height: 1.7; margin-top: 10px; }
.rules { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.rules h3 { font-size: 11px; font-weight: 650; display: flex; gap: 7px; align-items: center; }
.rules h3 > span { color: #9299ae; font-size: 14px; }
.rules ol { list-style: none; counter-reset: rules; padding: 0; margin: 13px 0 0; }
.rules li { counter-increment: rules; font-size: 10px; color: #8a92a4; line-height: 1.7; display: flex; gap: 9px; margin-top: 8px; letter-spacing: -.2px; }
.rules li::before { content: counter(rules); display: inline-grid; place-items: center; flex: 0 0 16px; height: 16px; border-radius: 50%; background: #f1f3f8; color: #818a9f; font-size: 9px; margin-top: 1px; }
.recursion-note { position: relative; background: #f7f6fd; border: 1px solid #eeebfa; border-radius: 9px; margin-top: 24px; padding: 15px; }
.note-label { font-size: 9px; color: #8c7cc1; font-weight: 650; }
.recursion-note p { font-size: 11px; line-height: 1.85; color: #70678c; margin-top: 6px; }
.note-decoration { position: absolute; right: 14px; top: 14px; color: #bdb3df; font-size: 19px; }
.simulation { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; overflow: hidden; }
.simulation-heading { display: flex; justify-content: space-between; align-items: center; padding: 24px 27px 0; }
.status { display: flex; gap: 6px; align-items: center; font-size: 10px; color: #8b8fa3; border-radius: 20px; padding: 6px 10px; background: #f5f6f9; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: #a2a8b8; }
.status[data-state=playing] { background: #eeebff; color: #7765d0; }
.status[data-state=playing] i { background: #8a75ed; }
.status[data-state=complete] { background: #eaf7f1; color: #3b9677; }
.status[data-state=complete] i { background: #42a982; }
.status[data-state=paused] { background: #fff6e7; color: #b38b41; }
.status[data-state=paused] i { background: #d9ab54; }
.simulation-meta { padding: 14px 27px 0; display: flex; justify-content: space-between; font-size: 10px; color: #9198aa; }
.simulation-meta > span:first-child { color: #737d92; }
.legend { display: flex; align-items: center; gap: 6px; }
.legend i { width: 6px; height: 6px; border-radius: 2px; background: #bab3e4; }
.stage-wrap { flex: 1; background: radial-gradient(ellipse at 50% 65%, #f6f7fc80, transparent 70%); margin-top: 19px; display: flex; flex-direction: column; justify-content: flex-end; }
.stage-caption { text-align: center; padding: 5px 15px 0; }
.stage-caption > span { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: #8e80c4; }
.stage-caption p { font-size: 12px; color: #9298aa; margin-top: 10px; min-height: 18px; }
.stage-wrap svg { display: block; width: 100%; min-height: 200px; max-height: 360px; flex: 1; overflow: visible; }
.rod-letter { font-size: 13px; font-weight: 700; fill: #68738c; }
.rod-role { font-size: 10px; fill: #a1a8b9; }
.disk-label { font-size: 11px; font-weight: 700; fill: white; dominant-baseline: central; text-anchor: middle; }
.playback { padding: 22px 27px 25px; border-top: 1px solid var(--line); }
.progress-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-heading strong { font-size: 20px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.progress-heading div > span { font-size: 10px; color: #9ba2b2; margin-left: 3px; }
.progress-heading > span { font-size: 11px; color: #8a91a5; font-variant-numeric: tabular-nums; }
.progress-slider { --progress: 0%; display: block; width: 100%; height: 6px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--progress), #eceef6 var(--progress), #eceef6 100%); cursor: pointer; margin: 0; }
.progress-slider::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; background: var(--accent); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #c6bff0; }
.progress-slider::-moz-range-thumb { width: 8px; height: 8px; background: var(--accent); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #c6bff0; }
.progress-slider:disabled { cursor: default; }
.playback-toolbar { display: flex; justify-content: space-between; align-items: center; margin-top: 23px; gap: 10px; }
.transport { display: flex; align-items: center; gap: 10px; }
.icon-button { height: 33px; width: 31px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #8f96aa; font-size: 21px; display: grid; place-items: center; }
.icon-button:hover:not(:disabled) { background: #f4f3fb; color: var(--accent); }
.step-button { font-size: 9px; letter-spacing: -2px; }
.play-button { height: 34px; min-width: 97px; border: 0; border-radius: 7px; background: var(--soft); color: var(--accent); font-size: 11px; font-weight: 650; display: flex; gap: 9px; align-items: center; justify-content: center; }
.play-button:hover:not(:disabled) { background: #e8e3ff; }
.play-button span:first-child { font-size: 9px; }
.speed-control { display: flex; align-items: center; gap: 9px; font-size: 10px; color: #8b94a6; }
.speed-control label { margin-right: 5px; white-space: nowrap; }
.speed-control input { width: 86px; height: 4px; accent-color: #8a7ccf; cursor: pointer; }
.speed-control output { color: var(--accent); font-size: 10px; font-weight: 700; background: #f5f3ff; border-radius: 4px; padding: 5px 6px; min-width: 39px; text-align: center; }
.speed-slow, .speed-fast { font-size: 12px; color: #b0b6c5; }
.state-panel { grid-row: 2; grid-column: 2; padding: 22px 27px 0; }
.state-header { display: flex; align-items: center; justify-content: space-between; }
.state-header > span { font-size: 9px; color: #a2a8b7; }
.rod-states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 19px 0; }
.rod-state { border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px; min-height: 77px; background: #fcfcfe; }
.rod-state-heading { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #959cae; }
.rod-state-heading strong { color: #68738b; font-size: 10px; }
.rod-state-heading small { margin-left: auto; font-size: 9px; color: #aaa4c4; }
.disk-chips { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 11px; min-height: 21px; }
.disk-chip { display: grid; place-items: center; border-radius: 4px; width: 23px; height: 21px; font-size: 10px; font-weight: 650; color: white; }
.empty-rod { font-size: 10px; color: #b1b7c6; }
.state-footer { display: flex; align-items: center; gap: 7px; min-height: 39px; border-top: 1px solid var(--line); font-size: 10px; color: #8e97a9; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: #aba0d9; flex-shrink: 0; }
.state-footer > span:last-child { margin-left: auto; font-size: 9px; letter-spacing: .5px; color: #a9a5bc; white-space: nowrap; }
.output-panel { grid-row: 2; grid-column: 1; padding: 22px 24px; }
.file-icon { font-size: 17px; line-height: 1; display: grid; place-items: center; color: #9a93b7; border: 1px solid #c3bdd8; border-radius: 3px; width: 14px; height: 17px; }
.output-badge { margin-left: auto; font-size: 9px; color: #a2a8b7; background: #f3f4f8; padding: 4px 7px; border-radius: 4px; }
.output-badge.saved { color: #54947a; background: #edf7f1; }
.output-panel p { font-size: 11px; color: #969dad; line-height: 1.8; margin-top: 17px; }
.download-links { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; gap: 12px; }
.download-link { display: flex; gap: 9px; align-items: center; border: 1px solid #e4e1f2; border-radius: 7px; padding: 9px 13px; background: #faf9ff; color: #7d70b4; font-size: 12px; }
.download-link span { font-size: 11px; }
.json-link { font-size: 9px; color: #8c82ac; }
.download-links a[aria-disabled=true] { opacity: .45; pointer-events: none; }
.download-link:hover { background: #f0ecff; }
footer { display: flex; justify-content: space-between; color: #a9afbd; font-size: 10px; margin-top: 27px; padding: 0 2px; }
footer span:last-child { font-size: 9px; letter-spacing: 1.2px; }
footer i { font-style: normal; margin: 0 7px; color: #b9b0d3; }
@media (max-width: 1390px) {
  main { margin: 0 34px; } .site-header { padding: 0 34px; gap: 38px; }
}
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 270px minmax(0, 1fr); gap: 17px; }
  .settings { padding: 22px 20px; } .playback { padding: 21px; }
  .simulation-heading { padding: 22px 21px 0; } .simulation-meta { padding-left: 21px; padding-right: 21px; }
  .speed-control { gap: 5px; } .speed-control input { width: 65px; } .transport { gap: 6px; }
  .speed-slow, .speed-fast, .course-label { display: none; }
  .state-panel { padding: 20px 21px 0; } .output-panel { padding: 22px 20px; }
  .rod-state { padding: 10px; } .rod-states { gap: 7px; }
}
@media (max-width: 850px) {
  main { margin: 0 22px; padding-top: 30px; } .site-header { height: 67px; padding: 0 23px; }
  .workspace { grid-template-columns: 1fr; }
  .settings { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; }
  .settings > .section-heading, .settings > .section-copy { grid-column: 1 / -1; }
  .section-copy { margin-bottom: 18px; } .rules { margin-top: 0; padding-top: 0; border-top: 0; grid-column: 2; grid-row: 3; }
  .recursion-note { display: none; } .simulation { grid-column: 1; grid-row: 2; } .state-panel { grid-column: 1; grid-row: 3; }
  .output-panel { grid-column: 1; grid-row: 4; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .output-panel > .section-heading { grid-column: 1; } .output-panel p { grid-column: 1; margin-top: 12px; }
  .output-panel p br { display: none; } .download-links { grid-column: 2; grid-row: 1 / 3; margin-top: 0; justify-content: flex-end; }
  .output-badge { margin-left: 8px; } .stage-wrap svg { max-height: none; } .stage-caption { margin-top: 8px; }
  .page-intro { margin-bottom: 25px; } h1 { font-size: 33px; } .formula { padding-right: 0; } .legend { font-size: 9px; }
}
@media (max-width: 520px) {
  main { margin: 0 14px; padding-top: 27px; } .site-header { padding: 0 17px; }
  .brand { font-size: 16px; } .lesson-tag { font-size: 8px; letter-spacing: .8px; } .lesson-tag span { display: none; }
  .eyebrow { font-size: 8px; letter-spacing: 1.5px; } h1 { font-size: 30px; }
  .intro-copy { font-size: 11px; line-height: 1.8; max-width: 220px; margin-top: 9px; } .formula { display: none; }
  .settings { display: block; padding: 20px; } .rules { display: none; } .section-copy { margin-bottom: 20px; }
  #setup-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  #setup-form > .field-label, #setup-form > .number-field { grid-column: 1; } .disk-count-hint { grid-column: 1; margin-bottom: 18px; }
  .route-fields { grid-column: 2; grid-row: 1 / 4; display: flex; flex-direction: column; align-items: stretch; gap: 7px; margin-bottom: 18px; }
  .route-fields > div { display: flex; align-items: center; gap: 6px; } .route-fields .field-label { min-width: 51px; white-space: nowrap; margin: 0; font-size: 10px; }
  .route-fields select { min-width: 0; height: 34px; font-size: 10px; } .route-arrow { display: none; }
  .primary-button, .form-note, .form-message { grid-column: 1 / -1; } .form-note { font-size: 9px; }
  .simulation-heading { padding: 20px 17px 0; } .simulation-meta { padding: 13px 17px 0; }
  .section-heading h2 { font-size: 13px; } .stage-caption p { font-size: 10px; }
  .stage-wrap { margin-top: 14px; } .stage-wrap svg { min-height: 170px; } .playback { padding: 18px 17px; }
  .playback-toolbar { flex-wrap: wrap; row-gap: 18px; } .transport { gap: 10px; }
  .speed-control { margin-left: auto; } .speed-control label { font-size: 9px; margin-right: 1px; }
  .speed-control input { width: 56px; } .speed-control output { min-width: 31px; padding: 5px 3px; }
  .play-button { min-width: 76px; } .icon-button { width: 27px; } .state-panel { padding: 20px 16px 0; }
  .state-header > span { font-size: 8px; } .rod-state { padding: 10px 8px; }
  .rod-state-heading { font-size: 8px; gap: 3px; } .rod-state-heading small { display: none; }
  .disk-chips { gap: 3px; } .disk-chip { width: 20px; height: 19px; font-size: 9px; }
  .state-footer { font-size: 9px; } .output-panel { padding: 20px; } .download-links { gap: 10px; }
  .download-link { padding: 8px 10px; } .output-panel p { font-size: 10px; }
  footer { font-size: 9px; line-height: 1.7; } footer span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.vialab-logo { width: 125px; height: 66px; object-fit: contain; display: block; }
.file-field { padding: 20px 12px; border: 1px dashed #aba2dc; border-radius: 10px; background: #f8f7ff; text-align: center; }
.upload-symbol { display: block; font-size: 28px; color: var(--accent); margin-bottom: 8px; }
.file-field strong { display: block; font-size: 13px; }
.file-field p { font-size: 10px; line-height: 1.7; color: #7b8297; margin: 8px 0 15px; }
.file-field input { width: 100%; min-width: 0; font-size: 11px; color: #545d72; }
.file-field input::file-selector-button { border: 1px solid #d8d3ef; border-radius: 5px; padding: 7px; color: #5d4bc1; background: white; cursor: pointer; }
.file-help { font-size: 11px; line-height: 1.8; color: #747e91; margin: 14px 0; }
.fixed-route { display: flex; align-items: center; justify-content: space-between; background: #f7f8fc; padding: 12px; border-radius: 7px; color: #626d83; font-size: 11px; margin-bottom: 18px; }
.validation-result { padding: 15px; border-radius: 9px; margin-top: 16px; }
.validation-result strong { font-size: 21px; }
.validation-result p { font-size: 11px; line-height: 1.8; margin-top: 7px; }
.validation-result[data-result=success] { background: #edf8f2; color: #236a50; border: 1px solid #b9e2ce; }
.validation-result[data-result=failure] { background: #fff0f1; color: #a22e40; border: 1px solid #f1bfca; }
.failure-button { margin-top: 12px; padding: 10px; width: 100%; border-radius: 7px; border: 1px solid #e2a9b3; color: #aa3046; background: #fff7f8; font-size: 12px; }
.format-help { margin-top: 17px; font-size: 11px; color: #747e91; line-height: 1.8; }
.format-help summary { cursor: pointer; color: #6254ad; }
.format-help pre { white-space: pre-wrap; font-size: 11px; padding: 12px; border-radius: 8px; background: #f5f6fa; color: #515d73; }
.status[data-state=failure] { background: #fff0f1; color: #b43148; }
.status[data-state=failure] i { background: #c44050; }
.rejected-disk > rect:first-child { fill: #dc4a60; stroke: #9e2438; stroke-width: 2; stroke-dasharray: 5 3; opacity: .85; }
#output-description { overflow-wrap: anywhere; }
@media (max-width: 520px) { #setup-form { display: block; } .vialab-logo { height: 55px; width: 105px; } }
