:root {
  --ink: #171717;
  --dark: #20201e;
  --muted: #6f6f69;
  --paper: #f3f3ef;
  --panel: #ffffff;
  --soft: #e9e9e4;
  --line: #d7d7d1;
  --line-dark: #bebeb7;
  --yellow: #f0cb00;
  --yellow-soft: #fff1a1;
  --green: #2e6f4e;
  --red: #a8493f;
  --blue: #315e83;
  --sidebar: 224px;
  --topbar: 67px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif; letter-spacing: -.015em; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.preview-bar { min-height: 30px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 5px 18px; color: #c7c7c0; background: #151514; font-size: 10px; }
.preview-bar span { padding: 3px 6px; color: #171717; background: var(--yellow); font-weight: 900; }
.preview-bar p { margin: 0; }

.app-shell { min-height: calc(100vh - 30px); display: grid; grid-template: var(--topbar) 1fr / var(--sidebar) minmax(0, 1fr); }
.topbar { position: sticky; z-index: 30; top: 0; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid #42423f; color: #fff; background: var(--dark); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand i { width: 7px; height: 23px; background: var(--yellow); }
.brand strong { font-size: 18px; letter-spacing: -.04em; }
.brand span { margin-left: 5px; padding-left: 15px; border-left: 1px solid #51514d; color: #aaa9a3; font-size: 10px; font-weight: 700; }
.topbar-actions, .account-button { display: flex; align-items: center; }
.topbar-actions { gap: 14px; }
.icon-button, .account-button { border: 0; color: #d3d3cd; background: transparent; cursor: pointer; }
.icon-button { position: relative; padding: 8px; font-size: 10px; }
.notice-dot { position: absolute; top: 3px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.divider { width: 1px; height: 23px; background: #50504c; }
.account-button { display: grid; grid-template: auto auto / auto 33px; column-gap: 11px; text-align: right; }
.account-button b { font-size: 10px; }
.account-button span { grid-row: 2; color: #8f8f89; font-size: 8px; }
.account-button i { grid-column: 2; grid-row: 1 / 3; width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid #62625d; border-radius: 50%; color: #1b1b1a; background: var(--yellow); font-size: 9px; font-style: normal; font-weight: 900; }

.sidebar { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar) - 30px); display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; border-right: 1px solid var(--line); background: #efefeb; }
.sidebar nav { padding: 24px 13px; }
.nav-label { margin: 22px 10px 7px; color: #999993; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.nav-label:first-child { margin-top: 0; }
.sidebar nav a { min-height: 39px; display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 0 10px; border: 1px solid transparent; color: #5d5d58; font-size: 11px; font-weight: 650; transition: background .15s, color .15s; }
.sidebar nav a span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #d1d1ca; color: #777772; background: #f7f7f4; font-size: 8px; font-weight: 900; }
.sidebar nav a:hover { color: #1f1f1d; background: #e5e5df; }
.sidebar nav a.active { border-color: #282826; color: #fff; background: #282826; }
.sidebar nav a.active span { border-color: var(--yellow); color: #171717; background: var(--yellow); }
.sidebar-foot { padding: 20px 23px 24px; border-top: 1px solid var(--line); }
.sidebar-foot p { margin: 0 0 5px; color: #969690; font-size: 8px; font-weight: 800; }
.sidebar-foot a { display: block; font-size: 10px; font-weight: 700; }
.sidebar-foot small { display: block; margin-top: 20px; color: #aaa9a3; font-size: 8px; font-weight: 900; letter-spacing: .08em; }

.workspace { min-width: 0; padding: 38px clamp(24px, 3vw, 50px) 60px; outline: 0; }
.page { display: none; max-width: 1440px; margin: 0 auto; }
.page.active { display: block; animation: page-in .2s ease-out; }
@keyframes page-in { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-heading .eyebrow { margin: 0 0 9px; color: #777772; font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.page-heading .eyebrow::before { content: ""; display: inline-block; width: 18px; height: 3px; margin: 0 8px 3px 0; background: var(--yellow); }
.page-heading h1 { margin: 0; font-size: clamp(28px, 3vw, 39px); line-height: 1.1; letter-spacing: -.055em; }
.page-heading > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.primary-button, .light-button { min-height: 39px; padding: 0 16px; border-radius: 2px; font-size: 10px; font-weight: 850; cursor: pointer; }
.primary-button { border: 1px solid var(--ink); color: #fff; background: var(--ink); }
.primary-button:hover { background: #373735; }
.light-button { border: 1px solid var(--line-dark); background: #fff; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.summary-grid article { min-height: 112px; padding: 19px 21px; background: #fff; }
.summary-grid article:nth-child(2) { box-shadow: inset 0 3px var(--yellow); }
.summary-grid p { margin: 0; color: #777772; font-size: 9px; font-weight: 800; }
.summary-grid strong { display: block; margin: 11px 0 4px; font-size: 27px; line-height: 1; }
.summary-grid small { color: #999993; font-size: 8px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; margin-top: 18px; }
.panel { border: 1px solid var(--line); background: var(--panel); }
.panel-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-head.compact { min-height: 72px; }
.panel-kicker { margin: 0 0 3px; color: #9a9a94; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.panel-head h2 { margin: 0; font-size: 15px; letter-spacing: -.035em; }
.filter-row { display: flex; border: 1px solid var(--line); }
.filter-row button { min-width: 52px; height: 28px; padding: 0 9px; border: 0; border-right: 1px solid var(--line); color: #777772; background: #f8f8f5; font-size: 8px; cursor: pointer; }
.filter-row button:last-child { border-right: 0; }
.filter-row button.active { color: #171717; background: var(--yellow-soft); font-weight: 900; }
.table-scroll { overflow-x: auto; }
.work-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.work-table th { height: 35px; padding: 0 12px; border-bottom: 1px solid var(--line); color: #898983; background: #f3f3ef; text-align: left; font-size: 8px; font-weight: 800; white-space: nowrap; }
.work-table th:nth-child(1) { width: 73px; }
.work-table th:nth-last-child(1) { width: 83px; }
.work-table td { height: 58px; padding: 8px 12px; border-bottom: 1px solid #e6e6e1; color: #5e5e59; font-size: 9px; vertical-align: middle; }
.work-table tbody tr { cursor: pointer; }
.work-table tbody tr:hover { background: #faf9ef; }
.work-table td strong { display: block; overflow: hidden; color: #282826; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.work-table td small { display: block; margin-top: 4px; overflow: hidden; color: #999993; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.type-mark { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line-dark); color: #4d4d49; background: #f1f1ed; font-size: 8px; font-weight: 900; }
.type-mark.radio { border-color: #92acc1; color: var(--blue); background: #eaf2f7; }
.type-mark.electric { border-color: #d3b812; color: #6e6000; background: var(--yellow-soft); }
.type-mark.quarantine { border-color: #94b6a3; color: var(--green); background: #edf5f0; }
.status-pill { display: inline-flex; min-width: 58px; justify-content: center; padding: 5px 7px; border: 1px solid var(--line-dark); color: #61615c; background: #f3f3ef; font-size: 7px; font-style: normal; font-weight: 900; }
.status-pill.review { border-color: #96afc3; color: #2b5d82; background: #edf4f8; }
.status-pill.supplement { border-color: #d1b611; color: #675900; background: #fff2a7; }
.status-pill.done { border-color: #9ab9a7; color: #2b6547; background: #edf5ef; }
.panel-foot { min-height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; color: #8d8d87; background: #f7f7f4; font-size: 8px; }
.panel-foot a { padding-bottom: 2px; border-bottom: 2px solid var(--yellow); color: #31312f; font-weight: 900; }

.check-list { list-style: none; margin: 0; padding: 0 17px; }
.check-list li { min-height: 78px; display: grid; grid-template-columns: 28px 1fr 25px; gap: 10px; align-items: center; border-bottom: 1px solid #e3e3de; }
.check-list li > span { color: #a2a29c; font-size: 8px; font-weight: 900; }
.check-list b { display: block; font-size: 10px; }
.check-list p { margin: 5px 0 0; color: #92928c; font-size: 8px; }
.check-list em { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; color: #555550; background: #f3f3ef; font-size: 8px; font-style: normal; font-weight: 900; }
.guide-box { margin: 18px; padding: 21px; border: 1px solid #d2b614; background: #fff4b4; }
.guide-box span { color: #726300; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.guide-box b { display: block; margin: 10px 0 9px; font-size: 16px; line-height: 1.35; letter-spacing: -.045em; }
.guide-box p { margin: 0; color: #6e6540; font-size: 8px; line-height: 1.65; }

.list-page-panel { min-height: 500px; }
.toolbar { min-height: 62px; display: flex; align-items: end; gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.toolbar label { display: grid; gap: 5px; color: #777772; font-size: 8px; font-weight: 800; }
.toolbar input { width: min(380px, 55vw); height: 33px; padding: 0 10px; border: 1px solid var(--line-dark); outline: 0; }
.toolbar input:focus { border-color: #2d2d2a; }
.toolbar button { height: 33px; padding: 0 14px; border: 1px solid #2c2c2a; color: #fff; background: #2c2c2a; font-size: 9px; font-weight: 800; cursor: pointer; }
.toolbar span { flex: 1; }
.toolbar .light-button { color: #3f3f3c; background: #fff; }

.master-layout { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(560px, 1.5fr); gap: 18px; }
.master-list-panel { min-height: 690px; }
.master-search { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 14px; border-bottom: 1px solid var(--line); }
.master-search input { min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line-dark); outline: 0; }
.master-search button { border: 1px solid #2c2c2a; color: #fff; background: #2c2c2a; font-size: 9px; font-weight: 800; }
.master-list-head { height: 35px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: #8b8b85; background: #f2f2ee; font-size: 8px; }
.master-list-head b { color: #555550; }
.master-item { width: 100%; min-height: 91px; display: grid; grid-template-columns: 39px 1fr auto; gap: 11px; align-items: center; padding: 13px 14px; border: 0; border-bottom: 1px solid #e2e2dd; background: #fff; text-align: left; cursor: pointer; }
.master-item:hover { background: #faf9ef; }
.master-item.active { box-shadow: inset 4px 0 var(--yellow); background: #fbfbf7; }
.master-item > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); color: #555550; background: #f1f1ed; font-size: 8px; font-weight: 900; }
.master-item b { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.master-item p { margin: 5px 0 0; color: #8a8a84; font-size: 8px; }
.master-item small { color: #9a9a94; font-size: 7px; }
.master-detail-panel { min-height: 690px; }
.detail-title { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.detail-title p { margin: 0 0 4px; color: #8d8d87; font-size: 8px; }
.detail-title h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.detail-title button { height: 31px; padding: 0 12px; border: 1px solid var(--line-dark); background: #fff; font-size: 8px; font-weight: 800; }
.detail-tabs { display: flex; padding: 0 15px; border-bottom: 1px solid var(--line); background: #f6f6f2; }
.detail-tabs button { height: 38px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; color: #7c7c76; background: transparent; font-size: 8px; cursor: pointer; }
.detail-tabs button.active { border-bottom-color: var(--yellow); color: #1d1d1b; font-weight: 900; }
.detail-body { padding: 18px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.field-grid div { min-height: 55px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.field-grid div.wide { grid-column: 1 / -1; }
.field-grid span { display: block; margin-bottom: 6px; color: #8b8b85; font-size: 7px; font-weight: 800; }
.field-grid b { display: block; overflow: hidden; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.subsection { margin-top: 18px; }
.subsection-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.subsection-head h3 { margin: 0; font-size: 10px; }
.subsection-head button { width: 25px; height: 25px; border: 1px solid var(--line-dark); background: #fff; font-size: 12px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 8px; }
.mini-table th, .mini-table td { height: 33px; padding: 0 10px; border: 1px solid var(--line); text-align: left; }
.mini-table th { color: #777772; background: #f1f1ed; }
.attachment-row { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); }
.attachment-row > span { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); background: #f1f1ed; font-size: 7px; font-weight: 900; }
.attachment-row p { flex: 1; margin: 0; font-size: 9px; font-weight: 700; }
.attachment-row small { color: #92928c; font-size: 7px; }

.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--line); }
.module-card { min-height: 180px; padding: 25px; background: #fff; }
.module-card span { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line-dark); color: #4e4e4a; background: #f1f1ed; font-size: 8px; font-weight: 900; }
.module-card:nth-child(2) span { border-color: #d2b714; background: var(--yellow-soft); }
.module-card h2 { margin: 24px 0 9px; font-size: 16px; }
.module-card p { min-height: 41px; margin: 0 0 15px; color: #777772; font-size: 9px; line-height: 1.65; }
.module-card b { color: #5c5c57; font-size: 8px; }

.document-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 18px; }
.drop-zone { min-height: 330px; display: grid; place-content: center; justify-items: center; border: 1px dashed #a9a9a2; background: #fafaf7; cursor: pointer; }
.drop-zone.dragging { border-color: #b49a00; background: #fffbea; }
.drop-zone input { display: none; }
.drop-zone > span { width: 49px; height: 49px; display: grid; place-items: center; border: 1px solid #c8c8c1; background: #efefeb; font-size: 9px; font-weight: 900; }
.drop-zone b { margin-top: 18px; font-size: 12px; }
.drop-zone p { margin: 8px 0 0; color: #92928c; font-size: 8px; }
.document-list { min-height: 330px; }
.file-row { min-height: 62px; display: grid; grid-template-columns: 33px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #e3e3de; }
.file-row > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); background: #f1f1ed; font-size: 7px; font-weight: 900; }
.file-row b { display: block; font-size: 9px; }
.file-row small { display: block; margin-top: 4px; color: #95958f; font-size: 7px; }
.file-row em { color: #777772; font-size: 7px; font-style: normal; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.choice-grid article { min-height: 210px; display: grid; grid-template-columns: 55px 1fr; grid-template-rows: 1fr auto; gap: 20px; padding: 27px; border: 1px solid var(--line); background: #fff; }
.choice-grid article > span { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line-dark); background: #f1f1ed; font-weight: 900; }
.choice-grid article:nth-child(2) > span { border-color: #d2b714; background: var(--yellow-soft); }
.choice-grid p { margin: 3px 0 8px; color: #92928c; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.choice-grid h2 { margin: 0 0 12px; font-size: 19px; }
.choice-grid small { color: #777772; font-size: 9px; line-height: 1.65; }
.choice-grid button { grid-column: 2; justify-self: start; height: 33px; padding: 0 14px; border: 1px solid #2d2d2a; color: #fff; background: #2d2d2a; font-size: 8px; font-weight: 850; }
.settings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.settings-grid article { min-height: 190px; padding: 24px; background: #fff; }
.settings-grid span { color: #aaa9a3; font-size: 9px; font-weight: 900; }
.settings-grid h2 { margin: 48px 0 10px; font-size: 17px; }
.settings-grid p { margin: 0; color: #777772; font-size: 9px; line-height: 1.6; }

.drawer-backdrop { position: fixed; z-index: 50; inset: 30px 0 0; background: rgba(15, 15, 14, .34); }
.detail-drawer { position: fixed; z-index: 60; top: 30px; right: 0; bottom: 0; width: min(480px, 94vw); overflow-y: auto; border-left: 1px solid #30302e; background: #fff; box-shadow: -12px 0 30px rgba(0,0,0,.12); transform: translateX(102%); transition: transform .2s ease-out; }
.detail-drawer.open { transform: none; }
.drawer-head { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); color: #fff; background: #232321; }
.drawer-head p { margin: 0 0 5px; color: #aaa9a3; font-size: 8px; }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-head button, .modal-head button { width: 35px; height: 35px; border: 1px solid #5f5f5a; color: #fff; background: transparent; font-size: 21px; cursor: pointer; }
.drawer-content { padding: 22px; }
.drawer-badge { display: inline-flex; padding: 6px 8px; border: 1px solid #d3b715; color: #615500; background: var(--yellow-soft); font-size: 8px; font-weight: 900; }
.drawer-section { margin-top: 25px; }
.drawer-section h3 { margin: 0 0 9px; font-size: 10px; }
.drawer-section dl { margin: 0; border-top: 1px solid var(--line); }
.drawer-section dl div { min-height: 47px; display: grid; grid-template-columns: 110px 1fr; align-items: center; border-bottom: 1px solid var(--line); font-size: 9px; }
.drawer-section dt { color: #898983; }
.drawer-section dd { margin: 0; font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 76px 1fr; min-height: 58px; padding-left: 19px; font-size: 8px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px #9d9d96; }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline span { color: #999993; }
.timeline b { display: block; margin-bottom: 4px; font-size: 9px; }
.timeline p { margin: 0; color: #7d7d77; line-height: 1.5; }

.modal-backdrop { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15, 15, 14, .54); }
.modal-backdrop[hidden], .drawer-backdrop[hidden] { display: none; }
.task-modal { width: min(570px, 96vw); border: 1px solid #333330; background: #fff; box-shadow: 12px 12px 0 rgba(240,203,0,.72); }
.modal-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 15px 19px; color: #fff; background: #232321; }
.modal-head p { margin: 0 0 3px; color: #aaa9a3; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.modal-head h2 { margin: 0; font-size: 17px; }
.task-modal form { display: grid; gap: 14px; padding: 21px; }
.task-modal label { display: grid; gap: 6px; color: #656560; font-size: 8px; font-weight: 800; }
.task-modal input, .task-modal select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-dark); color: #282826; background: #fff; outline: 0; }
.task-modal input:focus, .task-modal select:focus { border-color: #282826; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { margin: 0; padding: 11px 13px; border: 1px solid #deded8; color: #777772; background: #f3f3ef; font-size: 8px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; padding-top: 5px; }
.toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 16px; border-left: 5px solid var(--yellow); color: #fff; background: #242422; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 9px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  :root { --sidebar: 190px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .side-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .side-panel .panel-head { grid-column: 1 / -1; }
  .guide-box { align-self: stretch; }
  .master-layout { grid-template-columns: 290px minmax(500px, 1fr); overflow-x: auto; }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --topbar: 60px; }
  .preview-bar { justify-content: flex-start; }
  .preview-bar p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell { grid-template: var(--topbar) auto 1fr / 1fr; }
  .topbar { grid-row: 1; padding: 0 15px; }
  .brand span, .icon-button, .divider, .account-button b, .account-button span { display: none; }
  .account-button { display: block; }
  .account-button i { display: grid; }
  .sidebar { position: sticky; z-index: 25; top: var(--topbar); grid-row: 2; width: 100%; height: auto; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; gap: 4px; padding: 8px 11px; }
  .nav-label, .sidebar-foot { display: none; }
  .sidebar nav a { flex: 0 0 auto; min-height: 34px; margin: 0; padding: 0 10px; white-space: nowrap; }
  .sidebar nav a span { display: none; }
  .workspace { grid-row: 3; padding: 25px 15px 45px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .page-heading .primary-button { width: 100%; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid article { min-height: 100px; }
  .filter-row { display: none; }
  .work-table { min-width: 670px; }
  .side-panel { display: block; }
  .module-grid, .choice-grid, .document-layout { grid-template-columns: 1fr; }
  .master-layout { display: block; overflow: visible; }
  .master-list-panel { min-height: auto; margin-bottom: 15px; }
  .master-list { display: flex; overflow-x: auto; }
  .master-item { flex: 0 0 270px; border-right: 1px solid var(--line); }
  .master-detail-panel { min-height: auto; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid div.wide { grid-column: auto; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-wrap: wrap; }
  .toolbar input { width: calc(100vw - 108px); }
  .toolbar span { display: none; }
  .toolbar .light-button { margin-left: auto; }
}

@media (max-width: 460px) {
  .preview-bar p { display: none; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid article { padding: 15px; }
  .summary-grid strong { font-size: 23px; }
  .form-grid, .settings-grid { grid-template-columns: 1fr; }
  .detail-tabs { overflow-x: auto; }
  .detail-tabs button { flex: 0 0 auto; }
  .task-modal { box-shadow: 6px 6px 0 rgba(240,203,0,.72); }
}
