:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: #222d28;
  background: #f5f4ee;
  --paper: #fffefa;
  --ink: #222d28;
  --muted: #5b665e;
  --line: #d9dfd6;
  --green: #285643;
  --dark: #1c392e;
  --accent: #f1ca78;
  --soft: #eaf0e9;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.85rem, 3.5vw, 2.48rem); font-weight: 790; }
h2 { font-size: 1.22rem; font-weight: 740; }
h3 { font-size: 1.01rem; font-weight: 720; }
p, figure, dl { margin: 0; }
ol, ul { margin-block: .35rem; }
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
button, select, input:not([type=checkbox]):not([type=range]), .button { min-height: 44px; }
button, .button {
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .35em;
  padding: 7px 13px;
  border: 1px solid #aab8ad;
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  font-weight: 660;
  line-height: 1.25;
  cursor: pointer;
}
button:hover, .button:hover { border-color: var(--green); background: #edf2ec; }
button[aria-pressed=true] { border-color: var(--green); background: #e5eee5; color: #174835; }
button:disabled, select:disabled { opacity: .55; cursor: default; }
.primary, button.primary { background: var(--green); color: white; border-color: var(--green); }
.primary:hover, button.primary:hover { background: #194431; color: white; }
:focus-visible { outline: 3px solid #ad631a; outline-offset: 3px; }
label { font-weight: 650; }
label > select, label > input:not([type=range]):not([type=checkbox]), label > textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
}
select, input:not([type=checkbox]):not([type=range]), textarea {
  min-width: 0;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #aab8ad;
  border-radius: 7px;
  background: #fff;
}
input[type=checkbox], input[type=range], progress { accent-color: var(--green); }
input[type=range] { min-height: 44px; }
textarea { resize: vertical; }
pre, code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
img { display: block; max-width: 100%; }
summary { min-height: 44px; cursor: pointer; padding: 8px 0; font-weight: 690; }
.shell { width: min(1328px, calc(100% - 76px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; transform: translateY(-140%); background: #fff; color: #111; padding: 10px; }
.skip-link:focus { transform: translateY(0); }

.site-header { color: #f7f8f0; background: var(--dark); }
.masthead { min-height: 70px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; text-decoration: none; font-size: 1.28rem; font-weight: 760; letter-spacing: -.025em; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; }
.brand-mark i { border: 1px solid #d5c48f; border-radius: 2px; }
.brand-mark i:first-child { background: #d5c48f; }
.brand-mark i:last-child { border-style: dashed; }
.snapshot { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 5px 24px; font-size: .84rem; color: #d4ded4; }
.device-status { grid-column: 3; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .84rem; }
.device-name { max-width: 12rem; overflow-wrap: anywhere; }
.session-exit { padding-inline: 8px; color: inherit; background: transparent; border-color: #ffffff55; white-space: nowrap; }
.session-exit:hover { color: #fff; background: #ffffff14; border-color: #ffffff80; }
.snapshot strong { color: inherit; font-weight: 750; }
.header-status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.snapshot-old { color: #ffd893; }
.pc-dot { width: 8px; height: 8px; margin-right: 2px; border: 1px solid #bac6b9; border-radius: 50%; }
.pc-dot.pc-on { background: #aada9d; border-color: #aada9d; }
.tabs { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid #ffffff24; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; flex: 0 0 auto; justify-content: center; align-items: center; min-height: 50px; padding: 7px 19px 5px; border-bottom: 3px solid transparent; text-decoration: none; font-weight: 650; color: #d7e4d9; }
.tabs a:hover { background: #ffffff14; color: #fff; }
.tabs a[aria-current=page] { color: #ffda97; border-color: var(--accent); background: #ffffff0e; }
.tabs a:focus-visible { outline-offset: -4px; }
.fixture-banner { padding: 8px 18px; text-align: center; background: #f5e4ad; color: #503a15; font-weight: 670; font-size: .91rem; }
#header-error:empty { display: none; }
#header-error { padding-top: 14px; }

.pin-card { width: min(410px, 100%); margin: clamp(16px, 8vh, 65px) auto 0; padding: clamp(18px, 5vw, 30px); gap: 22px; }
.pin-form input[type=password] { min-height: 56px; font-size: 28px; letter-spacing: .12em; }
.pin-form button { width: 100%; min-height: 56px; }
.pin-status:empty { display: none; }
.connect-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.connect-qr { width: min(288px, 100%); }
.connect-qr img { width: 100%; height: auto; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.connect-steps ol { padding-left: 1.5em; }
.connect-steps li + li { margin-top: 8px; }
.connect-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.connect-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.connect-list a { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; }

.page { padding: 29px 0 60px; }
.page:focus { outline: none; }
.view, .stack { display: grid; align-content: start; gap: 17px; min-width: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.toolbar { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.section-pad { padding: 19px 21px; }
section.panel:not(.section-pad):not(.board-panel), aside.panel:not(.section-pad) { padding: 17px 20px; }
.muted, .small, small { color: var(--muted); }
.small, small { font-size: .82rem; }
.empty { min-width: 0; border: 1px dashed #aab6ac; color: var(--muted); background: #f8faf5; border-radius: 8px; padding: 14px 15px; }
.loading { border-style: solid; }
.notice { display: block; min-width: 0; padding: 9px 13px; border: 1px solid #e1c783; border-left-width: 4px; border-radius: 7px; background: #fff4d6; color: #5d4017; overflow-wrap: anywhere; }
.notice-neutral, .notice-info { background: #eaf1eb; border-color: #b8cabe; color: #244c3b; }
.notice-success { background: #e9f4e8; border-color: #94b29b; color: #235239; }
.error, .notice-error { color: #8c2926; border: 1px solid #d29d97; border-left: 4px solid #ac4943; background: #fff0ed; border-radius: 7px; padding: 9px 12px; overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 2px 7px; border: 1px solid transparent; border-radius: 5px; font-size: .79rem; font-weight: 680; white-space: nowrap; }
.cert-0 { border-color: #2b6448; color: #1d5639; background: #eff7ef; }
.cert-1 { border: 1px dashed #9f5b14; color: #864800; background: #fff6e7; }
.cert-2 { border-color: #a7afa9; color: #4f5b55; background: #f1f3f0; }
.flag-warning { border-color: #dcad6a; color: #79480a; background: #fff1d9; }
.flag-danger { border-color: #d7a199; color: #8d2825; background: #fce9e6; }
.flag-neutral { border-color: #c2c9c2; color: #535e57; background: #f0f2ef; }
.flag-success { border-color: #adc9b5; color: #24543b; background: #eaf3eb; }
.stage-0 { background: repeating-linear-gradient(-45deg, #fff 0 4px, #eeeeea 4px 5px); color: #59635b; }
.stage-1 { background: #e1e5df; color: #37453c; }
.stage-2 { background: #d1e6f4; color: #1f465f; }
.stage-3 { background: #3976a8; color: #fff; }
.stage-4 { background: #34624e; color: #fff; }
.stage-chip { border-color: #253a2b22; }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; background: #eef1ea; }
tbody tr:last-child > * { border-bottom: 0; }
.inline-link { color: #235b42; font-weight: 680; text-underline-offset: 3px; }

.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.overview-card { text-decoration: none; padding: 12px 14px; transition: border-color .12s ease; }
.overview-card:hover { border-color: var(--green); }
.overview-card.selected { border-color: #56826a; box-shadow: inset 0 3px #41775a; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card-title h2 { font-size: 1rem; }
.kind-total { display: flex; align-items: baseline; gap: 6px; margin: 6px 0; color: #4c5d53; font-size: .83rem; }
.kind-total strong { color: var(--dark); font-size: 1.89rem; font-weight: 760; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stage-bar { display: flex; gap: 2px; height: 7px; overflow: hidden; margin: 9px 0 8px; border-radius: 8px; background: #e8ebe5; }
.stage-bar span { min-width: 3px; }
.card-facts { display: flex; flex-wrap: wrap; gap: 0 11px; color: var(--muted); font-size: .78rem; }
.card-facts strong { color: var(--ink); }
.board-header { display: flex; justify-content: space-between; align-items: center; gap: 6px 15px; flex-wrap: wrap; padding: 12px 16px 8px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.inline-field > select { width: auto; margin-top: 0; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; padding: 0 16px 10px; }
.legend-note { font-size: .78rem; color: var(--muted); padding-inline: 3px; }
.progress-scroll { padding: 0 6px 6px; }
.board-panel > div:last-child > .empty, .board-panel > div:last-child > .error { margin: 0 12px 12px; }
.progress-grid { border-collapse: separate; border-spacing: 3px; table-layout: auto; }
.progress-grid th, .progress-grid td { padding: 0; vertical-align: middle; border: 0; }
.progress-grid thead th { padding: 4px 6px; text-align: center; min-width: 47px; font-size: .79rem; font-variant-numeric: tabular-nums; border-radius: 4px; }
.progress-grid tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 154px; width: 166px; text-align: left; padding: 3px 8px; background: #eef1e9; border-radius: 4px; }
.progress-grid th small { display: inline-block; margin-left: 5px; }
.model-code { font-weight: 760; overflow-wrap: anywhere; }
.grid-cell { min-width: 47px; min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 3px; padding: 4px 6px; border: 1px solid #25402d15; border-radius: 5px; font-size: .85rem; font-weight: 750; text-decoration: none; }
a.grid-cell:hover { box-shadow: inset 0 0 0 2px #ecb256, 0 0 0 1px #806131; }
.grid-blank { justify-content: center; color: #8a968e; font-weight: 550; }
.cell-symbols { display: flex; align-items: center; gap: 3px; font-size: .76rem; }
.cell-flag { padding: 0 3px; border-radius: 3px; background: #f6d190; color: #553914; font-size: .65rem; white-space: nowrap; }
.side-estimated { opacity: .7; font-weight: 500; }
.no-preview { padding: 5px 9px; color: #53605a; border-radius: 5px; background: #edf0eb; font-size: .82rem; }
.missing-list { list-style: none; padding: 0; margin: 0; }
.missing-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 9px 2px; border-top: 1px solid var(--line); }
.missing-list small { display: block; }
.missing-list li > span { white-space: nowrap; }

.asset-filter { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(180px, 2fr) auto; align-items: end; gap: 12px; padding: 16px; }
.list-count:empty { display: none; }
.asset-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.asset-list > .empty, .asset-list > .error { grid-column: 1 / -1; }
.asset-item { display: flex; align-items: stretch; overflow: hidden; text-decoration: none; }
.asset-item:hover { border-color: var(--green); }
.asset-thumb { flex: 0 0 32%; min-width: 0; display: grid; place-items: center; background: #ebefe7; text-align: center; color: var(--muted); font-size: .77rem; }
.asset-thumb img { width: 100%; height: 100%; max-height: 112px; object-fit: contain; }
.asset-item-body { min-width: 0; padding: 9px 11px; display: grid; align-content: center; gap: 6px; }
.asset-item-body p { font-size: .82rem; overflow-wrap: anywhere; }
.asset-item-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.asset-item-title h2 { font-size: 1rem; overflow-wrap: anywhere; }
.asset-layout, .detail-columns, .viewer-layout { display: grid; align-items: start; gap: 16px; min-width: 0; }
.asset-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.detail-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asset-meta { margin-top: -7px; }
.asset-image { overflow: hidden; border-radius: 8px; background: #eef0e9; }
.asset-image img { width: 100%; max-height: 590px; object-fit: contain; }
.asset-image figcaption { padding: 6px 9px; color: var(--muted); font-size: .83rem; }
.image-details .asset-image + .asset-image { margin-top: 10px; }
[aria-label='정식 칸'] th, [aria-label='정식 칸'] td { padding-inline: 6px; font-size: .86rem; }
[aria-label='정식 칸'] th { white-space: nowrap; }
.slot-write-status:empty { display: none; }
[aria-label='정식 칸'] td:first-child { min-width: 91px; word-break: keep-all; }
.slot-basis { display: inline-block; min-width: 70px; overflow-wrap: anywhere; }
.small-action { font-size: .79rem; white-space: nowrap; padding-inline: 6px; }
.file-host { background: #eef1ea; border-color: #cad2c8; }
.hash-code { font-size: .79rem; }
.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.detail-list p { margin-top: 4px; }
.log-panel[open] summary { margin-bottom: 8px; }
.edit-dialog { width: min(510px, calc(100% - 24px)); padding: 20px; border: 1px solid #9cac9f; border-radius: 12px; background: var(--paper); color: var(--ink); }
.edit-dialog::backdrop { background: #112e25aa; }
.edit-dialog form > div:empty, .frame-actions div:empty, .measure-result:empty { display: none; }

.viewer-layout { grid-template-columns: minmax(215px, 278px) minmax(0, 1fr); }
.viewer-choice { padding-top: 13px; border-top: 1px solid var(--line); }
.viewer-choice select, .preview-controls select { width: 100%; }
.viewer-choice-settings:empty, .model-facts:empty, .model-errors:empty { display: none; }
.preview-controls { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 8px; }
.preview-controls label { font-size: .87rem; min-width: 0; }
.preview-controls select { padding-inline: 6px; }
.viewer-sidebar .preview-controls { grid-template-columns: minmax(0, 1fr); }
.embedded-viewer { display: grid; gap: 11px; min-width: 0; }
.model-stage { position: relative; min-width: 0; height: clamp(235px, 34vh, 410px); overflow: hidden; border: 1px solid #becbc1; border-radius: 9px; background: #e9eeea; }
.model-stage-full { height: clamp(345px, 46vh, 610px); }
.model-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.model-stage canvas:focus-visible { outline-offset: -4px; }
.model-stage canvas:active { cursor: grabbing; }
.model-stage canvas.measuring { cursor: crosshair; }
.model-touch-tip { display: none; position: absolute; top: 8px; left: 8px; max-width: calc(100% - 16px); padding: 4px 8px; border-radius: 5px; background: #fffef0ed; color: #344e40; pointer-events: none; }
@media (pointer: coarse) {
  .model-touch-tip { display: block; }
}
.model-empty, .model-loading { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 14px; text-align: center; }
.model-empty {
  background-color: #edf0eb;
  background-image: linear-gradient(#a6b4a925 1px, transparent 1px), linear-gradient(90deg, #a6b4a925 1px, transparent 1px);
  background-size: 26px 26px;
}
.model-placeholder { display: grid; gap: 13px; justify-items: center; padding: 20px 22px; border: 1px solid #c7d4c9; border-radius: 8px; background: #fafff8; color: #344e40; }
.placeholder-icon { width: 30px; height: 30px; border: 2px dashed #729481; border-radius: 5px; }
.model-loading { background: #edf3eceb; }
.model-progress { display: grid; gap: 4px; }
.model-progress progress { width: min(210px, 65vw); }
.frame-uncertain { display: inline-block; margin-inline-start: 9px; }
.model-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 10px; }
.dimension-card { display: grid; gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7f1; }
.dimension-card dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; }
.dimension-card dt { font-size: .79rem; color: var(--muted); }
.dimension-card dd { margin: 1px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.dimension-card dd .chip { margin-inline-start: 4px; }
.model-button-group { gap: 5px; }
.model-button-group button { padding-inline: 9px; }
.model-range { display: grid; gap: 3px; }
.model-range span { display: flex; align-items: center; justify-content: space-between; font-size: .86rem; }
.model-range output { font-variant-numeric: tabular-nums; }
.model-range input { width: 100%; margin: 0; }
.measure-result { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
.file-actions summary { padding-block: 9px; color: var(--green); font-size: .88rem; }
.frame-actions { gap: 7px; padding-bottom: 8px; }
.model-overlay-tools {
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .65fr));
  align-items: center;
  gap: 8px 14px;
}
@media (max-width: 1130px) {
  .model-overlay-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-overlay-tools > div:first-child { grid-column: 1 / -1; }
}
.original-location textarea { width: 100%; }

.pattern-view .pattern-controls { padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.pattern-controls label > select { width: auto; margin: 0; }
.pattern-view > .notice { word-break: keep-all; }
.pattern-card p { margin: 6px 0; }
.pattern-card > .chip { margin-right: 5px; }
.pattern-size-column h3 { color: var(--green); }
.order-style:hover, .order-draft:hover { border-color: var(--green); }
.order-document, .orders-layout .panel, .orders-form-layout .panel { overflow-wrap: anywhere; }

@media (max-width: 1023px) {
  .shell { width: calc(100% - 42px); }
  .asset-layout, .viewer-layout { grid-template-columns: minmax(0, 1fr); }
  .asset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer-sidebar .preview-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 630px) {
  .shell { width: calc(100% - 26px); }
  .masthead { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding-block: 6px 9px; }
  .snapshot { grid-area: 2 / 1 / 3 / -1; justify-content: flex-start; column-gap: 12px; font-size: .77rem; }
  .device-status { grid-area: 1 / 2; justify-self: end; font-size: .77rem; }
  .device-name { max-width: clamp(62px, calc(100vw - 254px), 12rem); word-break: keep-all; }
  .brand { min-height: 44px; font-size: 1.14rem; }
  .brand-mark { width: 25px; height: 25px; }
  .tabs { width: 100%; padding-inline: 9px; gap: 0; }
  .tabs a { min-height: 46px; padding-inline: 11px; font-size: .94rem; }
  .fixture-banner { font-size: .83rem; padding: 7px 10px; }
  .page { padding-top: 20px; }
  .connect-qr { margin-inline: auto; }
  .overview { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; }
  .overview-card { padding: 9px 10px; }
  .board-header { padding-inline: 9px; }
  .legend { padding-inline: 9px; }
  .progress-grid tr > :first-child { min-width: 98px; max-width: 105px; }
  .progress-grid th small { display: block; margin-left: 0; }
  .section-pad, section.panel:not(.section-pad):not(.board-panel), aside.panel:not(.section-pad) { padding: 12px; }
  .asset-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; }
  .asset-filter > label:nth-child(3) { grid-column: 1 / -1; }
  .asset-filter > button { grid-column: 1 / -1; }
  .asset-list, .detail-columns { grid-template-columns: minmax(0, 1fr); }
  .model-stage { height: 60vh; }
  .model-tools .toolbar { gap: 5px; }
  .frame-uncertain { display: block; margin-inline-start: 0; }
  .pattern-view .pattern-controls { padding: 9px; }
  .pattern-controls label > select { width: 100%; }
}

.model-alignment-note { position: sticky; top: 0; z-index: 2; }

/* A flex/grid child must shrink before its own table scroller takes over. */
.view > *, .stack > *, .toolbar > *, .board-panel > div { min-width: 0; }
select, input { max-width: 100%; }
.toolbar > label { max-width: 100%; }
.chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
[aria-label='정식 칸'] table { table-layout: fixed; }
[aria-label='정식 칸'] th:nth-child(1) { width: 16%; }
[aria-label='정식 칸'] th:nth-child(2) { width: 14%; }
[aria-label='정식 칸'] th:nth-child(3) { width: 8%; }
[aria-label='정식 칸'] th:nth-child(4) { width: 15%; }
[aria-label='정식 칸'] th:nth-child(5) { width: 35%; }
[aria-label='정식 칸'] th:nth-child(6) { width: 12%; }
[aria-label='정식 칸'] td { overflow-wrap: anywhere; }
[aria-label='정식 칸'] td:first-child, .slot-basis { min-width: 0; }
@media (max-width: 630px), (pointer: coarse) {
  :is(button, .button, .chip, .order-verdict) { min-width: 44px; min-height: 44px; }
  input[type=checkbox], .pattern-check input[type=checkbox], .order-check input[type=checkbox] { width: 44px; height: 44px; flex: none; }
}
@media (max-width: 630px) {
  .card-title { flex-wrap: wrap; }
}

/* Keep row and column context inside the board's own scroll box. */
.progress-scroll { max-height: 70vh; overflow: auto; position: relative; }
.progress-grid thead th { position: sticky; top: 0; z-index: 2; background: #eef1ea; }
.progress-grid thead th:first-child { z-index: 3; }
.board-model-toggle, .slot-mobile-unit { display: none; }
.board-model-details { display: none; }
.relation-cards a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .asset-card-table { overflow: visible; }
  .asset-card-table table, .asset-card-table tbody { display: block; width: 100%; min-width: 0; }
  .asset-card-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .asset-card-table tbody { display: grid; gap: 12px; }
  .asset-card-table tbody tr { display: grid; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .asset-card-table td { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .slot-card-table tbody tr { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .slot-card-table td:nth-child(1) { grid-area: 1 / 1; align-self: center; font-size: 1rem; }
  .slot-card-table td:nth-child(2) { grid-area: 2 / 1 / 3 / -1; font-size: 1.2rem; font-weight: 700; }
  .slot-card-table td:nth-child(3) { display: none; }
  .slot-card-table td:nth-child(4) { grid-area: 1 / 2; }
  .slot-card-table td:nth-child(5) { grid-area: 3 / 1 / 4 / -1; color: var(--muted); }
  .slot-card-table td:nth-child(5)::before { content: '근거 · '; font-size: .82rem; }
  .slot-card-table td:nth-child(6) { grid-area: 4 / 2; justify-self: end; }
  .slot-mobile-unit { display: inline; }
  .slot-card-table .chip { min-height: 0; min-width: 0; }
  .file-card-table tbody tr { gap: 8px; }
  .file-card-table td { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: baseline; gap: 8px; }
  .file-card-table td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; font-weight: 650; }
  .file-card-table td:first-child { font-size: 1rem; font-weight: 700; }
  .file-card-table .chip { min-height: 0; min-width: 0; }
  .asset-detail-cards { display: grid; gap: 12px; }
  .asset-detail-cards li { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow-wrap: anywhere; }
  .asset-detail-cards li > .toolbar { align-items: center; }
  .relation-cards .toolbar > .muted { flex-basis: 100%; font-weight: 700; }
  .relation-cards .toolbar > a { flex: 1 1 50%; }
  .asset-detail-cards .chip { min-height: 0; min-width: 0; }
  .board-model-desktop { display: none; }
  .board-model-toggle { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; min-width: 44px; min-height: 44px; padding: 6px 3px; border-color: transparent; background: transparent; text-align: left; }
  .board-model-name { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; }
  .board-model-arrow { flex: none; color: var(--green); transition: transform .15s ease; }
  .board-model-toggle[aria-expanded=true] .board-model-arrow { transform: rotate(180deg); }
  .board-model-toggle > small { white-space: nowrap; }
  .progress-grid tr > :first-child { min-width: 118px; max-width: 128px; padding: 3px 5px; }
  .progress-grid th small { display: block; margin-left: 0; font-size: .72rem; }
  .board-model-details { display: grid; gap: 10px; padding: 12px; margin: 8px 12px 12px; background: #f6f8f2; border: 1px solid var(--line); border-radius: 9px; }
  .board-size-list { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
  .board-size-entry { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); align-items: center; gap: 7px; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); text-decoration: none; }
  .board-size-entry > * { min-width: 0; overflow-wrap: anywhere; }
  a.board-size-entry:hover { border-color: var(--green); }
  :is(button, .button, select, input:not([type=checkbox]), summary) { min-width: 44px; min-height: 44px; }
  a.inline-link, .order-fields a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-block: 8px; overflow-wrap: anywhere; }
  .missing-list li { flex-wrap: wrap; }
}

.code-version { padding-block: 12px 20px; color: var(--muted); font-size: .8rem; }
