:root {
  --ink: #252639; --muted: #575970; --paper: #f6f5fa; --white: #fff;
  --line: #dcdbe8; --nav: #26263a; --nav-muted: #d0cbdf; --accent: #524b95;
  --soft: #eeebfa; --board: #e9e6f4; --bright: #dcd4ff; --focus: #6557ad;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink); background: var(--paper); line-height: 1.6; font-synthesis: none;
}
:root[data-brand="majung"] {
  --ink: #203831; --muted: #4e655d; --paper: #f4f8f5; --line: #d4e2dc;
  --nav: #173a33; --nav-muted: #c3ddd4; --accent: #28614f; --soft: #e6f2eb;
  --board: #e0eee7; --bright: #c3eed2; --focus: #286b56;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-underline-offset: .22em; }
button, .button { display: inline-flex; align-items: center; gap: .7em; justify-content: center; min-height: 44px; padding: .55em .9em; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font-weight: 650; font-size: .88rem; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--soft); }
button:disabled { opacity: .62; cursor: default; }
.primary { background: var(--nav); color: white; border-color: var(--nav); padding-inline: 1.18em; }
.primary:hover { background: var(--accent); border-color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sidebar :focus-visible { outline-color: var(--bright); }
.skip { position: fixed; top: 7px; left: 8px; z-index: 20; padding: .58em .85em; background: var(--nav); color: white; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 221px; display: flex; flex-direction: column;
  padding: 33px 19px 25px; background: var(--nav); color: var(--white); z-index: 5; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-size: 1.65rem; line-height: 1.14; font-weight: 760; letter-spacing: -.06em; padding: 4px 9px; }
.brand small { display: block; margin-top: 6px; font: 650 .61rem/1.3 ui-monospace, monospace; color: var(--nav-muted); letter-spacing: .15em; }
.mark { display: flex; flex: none; align-items: end; gap: 3px; width: 34px; height: 34px; padding: 6px; border: 1px solid var(--bright); border-radius: 8px; }
.mark i { flex: 1; height: 48%; background: var(--bright); border-radius: 1px; }
.mark i:nth-child(2) { height: 72%; }
.mark i:nth-child(3) { height: 100%; }
[data-brand="majung"] .mark { align-items: center; border-radius: 50%; transform: rotate(-26deg); }
[data-brand="majung"] .mark i { height: 85%; }
[data-brand="majung"] .mark i:nth-child(2) { height: 51%; }
[data-brand="majung"] .mark i:nth-child(3) { height: 25%; }
.sidebar nav { margin-top: 40px; display: grid; gap: 5px; }
.sidebar nav a { text-decoration: none; display: flex; align-items: center; gap: 11px; border-radius: 6px; padding: 9px 10px; min-height: 46px; color: var(--nav-muted); font-size: .87rem; }
.sidebar nav a:hover { background: #ffffff15; color: white; }
.sidebar nav a[aria-current="page"] { background: var(--bright); color: var(--nav); font-weight: 740; }
.nav-icon { width: 26px; flex: none; text-align: center; font-family: ui-monospace, monospace; font-size: 1.06rem; }
.studio-credit { margin-top: auto; padding: 27px 10px 1px; font: 650 .68rem ui-monospace, monospace; letter-spacing: .12em; }
.studio-credit span { font-weight: 400; color: var(--nav-muted); }
.menu-toggle { display: none; }
.shell { margin-left: 221px; }
.topbar { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); padding: 11px clamp(25px, 5vw, 70px); font-size: .82rem; }
.crumb { color: var(--muted); margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.access { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; background: white; padding: 7px 11px; color: var(--muted); text-decoration: none; font-size: .73rem; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
main { min-height: calc(100vh - 132px); padding: clamp(32px, 5vw, 72px) clamp(25px, 5vw, 70px) 52px; }
main:focus, #result-heading:focus { outline: none; }
.view { max-width: 1220px; margin: 0 auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; }
h1 { letter-spacing: -.06em; line-height: 1.22; font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: 1.14rem; line-height: 1.45; letter-spacing: -.025em; }
h3 { font-size: 1.02rem; line-height: 1.4; letter-spacing: -.025em; }
.hero { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, .92fr); align-items: center; gap: clamp(22px, 4vw, 67px); margin-bottom: 49px; }
.hero h1 { font-size: clamp(2.3rem, 4.15vw, 4.02rem); }
h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); margin-top: 17px; max-width: 40em; word-break: keep-all; overflow-wrap: anywhere; }
.hero .lead { margin-bottom: 24px; line-height: 1.8; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.text-link { color: var(--accent); font-size: .87rem; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 650; text-decoration: none; }
.text-link:hover, .access:hover { text-decoration: underline; }
.board { padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--board); min-width: 0; }
.board-header { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .73rem; font-weight: 620; padding-bottom: 14px; }
.board-sheet { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 17px; box-shadow: 0 12px 28px -24px var(--nav); }
.board-name { font-size: .87rem; }
[data-brand="seum"] .board-name { font-family: ui-monospace, monospace; }
pre { max-width: 100%; overflow: auto; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .84rem/1.65 ui-monospace, monospace; }
.board-code { padding: 14px 11px; border-radius: 4px; margin: 10px 0 13px; background: var(--nav); color: var(--bright); font-size: .79rem; }
.board-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 10px 0 2px; }
.board-stats div { min-width: 0; background: var(--soft); border-radius: 4px; padding: 7px 8px; }
.board-stats dt { font-size: .67rem; color: var(--muted); }
.board-stats dd { margin: 2px 0 0; font-weight: 720; font-size: .95rem; }
.chart { display: grid; gap: 8px; margin-top: 16px; }
.chart-row { display: grid; grid-template-columns: minmax(4em, auto) 1fr 2.4em; gap: 9px; align-items: center; font-size: .73rem; }
.chart-row meter { width: 100%; height: 12px; }
meter::-webkit-meter-bar { border: 0; background: var(--soft); }
meter::-webkit-meter-optimum-value { background: var(--accent); }
meter::-moz-meter-bar { background: var(--accent); }
.section-title { margin-bottom: 15px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { position: relative; display: block; min-width: 0; min-height: 157px; border-radius: 7px; padding: 19px; text-decoration: none; border: 1px solid var(--line); background: white; }
.tool-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px -18px var(--nav); }
.card-icon { display: inline-grid; place-items: center; font: 600 1.15rem ui-monospace, monospace; background: var(--soft); color: var(--accent); border-radius: 6px; width: 44px; height: 40px; margin-bottom: 13px; letter-spacing: -.09em; }
.card-arrow { position: absolute; top: 17px; right: 19px; color: var(--accent); }
.tool-card p, .scope-line, .guidance p { color: var(--muted); font-size: .84rem; word-break: keep-all; overflow-wrap: anywhere; }
.tool-card p { margin-top: 6px; }
.scope-line { margin-top: 25px; padding-top: 15px; border-top: 1px solid var(--line); }
.view-heading { margin-bottom: 27px; }
.view-heading .lead { margin-top: 8px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(175px, .37fr); gap: 22px; align-items: start; }
.workspace-main { min-width: 0; display: grid; gap: 18px; }
.panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 8px; padding: clamp(15px, 2.4vw, 25px); }
.panel-header, .records-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
label { display: block; font-size: .84rem; font-weight: 640; margin: 0 0 5px; }
input, select, textarea { width: 100%; min-height: 44px; min-width: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; font-size: .90rem; }
textarea { resize: vertical; }
.mono, #endpoint { font-family: ui-monospace, monospace; }
#tool-form > .actions { margin-top: 20px; }
[role="status"] { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.guidance { padding: 18px; border-radius: 7px; border: 1px solid var(--line); background: var(--soft); }
.guidance p { margin-top: 8px; }
.guidance p + p { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
#records { margin-top: 18px; }
.records-header { padding-bottom: 8px; margin-bottom: 10px; }
.record { min-inline-size: 0; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.record legend { padding-inline: 5px; font-size: .8rem; color: var(--muted); }
.record .remove { margin-top: 10px; }
.result-metrics { margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 123px), 1fr)); gap: 8px; }
.result-metrics > div { padding: 9px; background: var(--soft); border-radius: 5px; }
.result-metrics dt { font-size: .78rem; color: var(--muted); }
.result-metrics dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.check-list { padding-inline-start: 22px; }
.check-list li, .result-note { margin: 6px 0; }
.diff-output, #raw-output { margin-top: 8px; padding: 12px; background: var(--soft); border-radius: 5px; }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--accent); }
.connection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 30px; }
.connection-panel h2 { margin-bottom: 11px; }
.connection-panel ol { padding-left: 1.3em; margin-bottom: 4px; color: var(--muted); }
.connection-panel li + li { margin-top: 6px; }
.copy-field { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-field button { white-space: nowrap; }
#endpoint { font-size: .79rem; }
.tool-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tool-list li { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-list a { font-weight: 650; }
.tool-list p, .tool-list code { color: var(--muted); font-size: .83rem; }
.tool-list code { overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 18px clamp(25px, 5vw, 70px); color: var(--muted); font-size: .78rem; }
footer strong { letter-spacing: .1em; }
.noscript { padding: 12px; }
@media (max-width: 1080px) {
  .sidebar { width: 184px; padding-inline: 13px; }
  .shell { margin-left: 184px; }
  .hero { gap: 23px; }
}
@media (max-width: 850px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .guidance { grid-row: 1; padding: 13px 15px; }
  .connection-grid { grid-template-columns: 1fr; }
  .tool-card { padding-inline: 13px; }
}
@media (max-width: 720px) {
  .sidebar { width: auto; position: relative; padding: 11px 17px; overflow: visible; }
  .sidebar-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .brand { padding: 3px 0; font-size: 1.35rem; }
  .brand small { margin-top: 4px; }
  .mark { width: 30px; height: 30px; }
  .menu-toggle { display: inline-flex; background: transparent; color: white; border-color: #ffffff45; }
  .menu-toggle:hover { background: #ffffff15; }
  .sidebar nav { display: none; margin-top: 12px; }
  .sidebar nav.menu-open { display: grid; }
  .studio-credit { display: none; }
  .shell { margin: 0; }
  .topbar { min-height: 51px; padding: 8px 17px; }
  main { min-height: calc(100vh - 174px); padding: 25px 17px 36px; }
  .hero { margin-bottom: 26px; }
  .hero h1 { font-size: clamp(2.15rem, 7vw, 3.1rem); }
  footer { padding-inline: 17px; }
}
@media (max-width: 530px) {
  .hero, .tool-grid { grid-template-columns: 1fr; }
  .hero .lead { margin-bottom: 15px; }
  .tool-grid { gap: 10px; }
  .tool-card { min-height: 0; padding: 13px 34px 13px 63px; }
  .card-icon { position: absolute; left: 13px; top: 13px; width: 37px; height: 36px; }
  .card-arrow { right: 13px; top: 13px; }
  .board { padding: 13px; }
  .board-sheet { padding: 13px; }
  .tool-list li { align-items: flex-start; flex-direction: column; gap: 3px; }
}
@media (max-width: 360px) {
  .access { font-size: .65rem; }
  .crumb { margin-left: 5px; padding-left: 5px; }
  .field-grid, .copy-field { display: grid; grid-template-columns: 1fr; }
}
