:root {
  --green: #126f4e;
  --green-soft: #e8f5ee;
  --ink: #1f2d27;
  --muted: #64756d;
  --line: #d4dfd9;
  --bg: #f5f7f6;
  --head: #eaf2ee;
  --sat: #ecf9f1;
  --sun: #fff0f8;
  --holiday: #fff3ce;
  --a: #e7f6ed;
  --m: #edf2ff;
  --b: #f4edfb;
  --off: #eff2f3;
  --lv: #fff1dd;
  --ct: #e8f5f6;
  --rf: #f8edf1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 10px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 18px;
  font-weight: 900;
  color: var(--green);
}

.subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.nav-tabs {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button, input, select {
  font: inherit;
}

.nav-tabs button {
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  color: #62736b;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.nav-tabs button.active,
.nav-tabs button:hover {
  color: var(--green);
  background: var(--green-soft);
}

main {
  max-width: 1680px;
  margin: 18px auto 42px;
  padding: 0 18px;
}

.notice {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #d9e6df;
  border-radius: 8px;
  background: #fff;
  color: #52635b;
  font-size: 12px;
}

.notice strong { color: var(--green); }

.menu-guide {
  margin: -2px 0 12px;
  padding: 8px 11px;
  border: 1px solid #dfe9e3;
  border-radius: 7px;
  background: #fbfdfc;
  color: #586861;
  font-size: 11.5px;
}

.menu-guide summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.menu-guide summary::-webkit-details-marker { display: none; }

.menu-guide summary::after {
  content: "접기";
  margin-left: auto;
  color: #7a8b83;
  font-size: 10px;
  font-weight: 800;
}

.menu-guide:not([open]) summary::after { content: "펼치기"; }

.menu-guide ul {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding-left: 16px;
  line-height: 1.45;
}

.menu-guide li { word-break: keep-all; }

.view { display: none; }
.view.active { display: block; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 16px;
}

p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.btn {
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.btn.ghost {
  color: var(--green);
  background: #fff;
  border: 1px solid var(--green);
}

.btn.danger {
  color: #9c2f2f;
  background: #fff;
  border: 1px solid #d9aaaa;
}

.btn.danger:hover {
  background: #fff0f0;
}

.staff-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.staff-actions .btn {
  padding: 6px 9px;
  font-size: 11px;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 32, 27, .32);
}

.confirm-dialog {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 32, 27, .18);
}

.confirm-dialog p {
  margin: 0 0 14px;
  color: var(--ink);
  line-height: 1.55;
  font-weight: 800;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.work-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.entry-layout {
  display: grid;
  gap: 14px;
}

.entry-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.entry-controls .button-row {
  align-self: end;
}

.entry-controls .mini-status {
  align-self: end;
}

.entry-note-field {
  grid-column: span 2;
}

.required-leave-control {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 8px 10px;
  border: 1px solid #dbe7e0;
  border-radius: 7px;
  background: #fbfdfc;
}

.required-leave-control span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
}

.required-leave-control input {
  width: auto;
  margin: 0;
}

.required-leave-control small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  word-break: keep-all;
}

.required-leave-control:has(input:disabled) {
  opacity: .58;
}

.entry-calendar-panel {
  min-width: 0;
}

.panel,
.table-shell,
.mobile-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 15px;
}

.controls {
  display: grid;
  align-content: start;
  gap: 11px;
}

label {
  display: grid;
  gap: 5px;
  color: #52635b;
  font-size: 11px;
  font-weight: 850;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

textarea {
  resize: vertical;
  min-height: 44px;
}

.button-row,
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar {
  margin-bottom: 12px;
}

.filter-bar select {
  width: auto;
  min-width: 150px;
}

.filter-bar.compact {
  margin-bottom: 10px;
}

.mini-status {
  border-radius: 7px;
  padding: 9px 10px;
  color: #52635b;
  background: #f6faf8;
  font-size: 12px;
  font-weight: 850;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px 12px;
  color: var(--muted);
  background: #fbfcfb;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.warning-state {
  margin-bottom: 10px;
  color: #8a5a00;
  background: #fff8e5;
  border-color: #efd28b;
}

.calendar-empty-state {
  margin-bottom: 10px;
}

.empty-table-row td {
  height: 72px;
  color: var(--muted);
  background: #fbfcfb;
  font-weight: 800;
  text-align: center;
}

.weekly-empty-text {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.section-head span {
  color: var(--muted);
  font-size: 11px;
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekdays span {
  padding: 5px;
  text-align: center;
  color: #62736b;
  font-size: 11px;
  font-weight: 900;
}

.day-card {
  position: relative;
  min-height: 78px;
  border: 1px solid #d8e3dd;
  border-radius: 8px;
  padding: 7px;
  background: #fff;
  cursor: pointer;
}

.day-card input {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.day-card.checked {
  box-shadow: inset 0 0 0 2px var(--green);
  background: #eaf7f0;
}

.day-card.other { color: #9da8a2; background: #fafbfa; }
.sat { background: var(--sat) !important; }
.sun { background: var(--sun) !important; }
.holiday { background: var(--holiday) !important; }

.date-num {
  display: block;
  font-weight: 900;
}

.code-pill,
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  border-radius: 5px;
  padding: 4px 5px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.day-card .code-pill {
  position: absolute;
  right: 6px;
  bottom: 6px;
}

.code-A { color: #0f714e; background: var(--a); }
.code-M { color: #365e9e; background: var(--m); }
.code-B { color: #744093; background: var(--b); }
.code-OFF { color: #59666e; background: var(--off); }
.code-LV { color: #a15c00; background: var(--lv); }
.code-CT { color: #176d76; background: var(--ct); }
.code-RF { color: #9a3c61; background: var(--rf); }
.code-BT { color: #3f4f92; background: #e8ecff; }
.code-IM { color: #2d6b55; background: #dff5ec; }
.code-ED { color: #7a4b16; background: #fff0da; }
.code-DH { color: #5b4b86; background: #eee9ff; }
.code-PH { color: #8e5e00; background: #fff2cc; }
.code-ML { color: #7a3f3f; background: #ffe8e8; }
.code-HOL { color: #8e5e00; background: var(--holiday); }
.code-EMPTY { color: #8a9690; background: #f6f8f7; }

.table-shell {
  overflow: auto;
}

#weeklyPrint,
#monthlyPrint {
  max-height: 72vh;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

th {
  background: var(--head);
  font-weight: 900;
}

th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.sortable.sorted {
  color: var(--green);
  background: #e8f5ed;
}

.staff-sort-button {
  margin-left: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  line-height: 1.3;
  cursor: pointer;
}

th.sortable.sorted .staff-sort-button,
.staff-sort-button:hover {
  color: var(--green);
  border-color: #9dceb0;
  background: var(--green-soft);
}

.monthly-table {
  min-width: 2200px;
  table-layout: fixed;
  font-size: 10px;
}

.monthly-table th,
.monthly-table td {
  height: 34px;
  padding: 3px;
}

.monthly-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.part-status-panel {
  margin-top: 14px;
}

.part-status-shell {
  max-height: 420px;
}

.part-calendar {
  overflow: auto;
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 6px;
  min-width: 1220px;
}

.calendar-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px;
  background: var(--head);
  color: #52635b;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.part-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 190px;
  border: 1px solid #d8e3dd;
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.part-day:hover {
  border-color: #9fcfb4;
}

.part-day.selected {
  border-color: var(--green);
  background: #eaf7f0 !important;
  box-shadow: inset 0 0 0 2px var(--green);
}

.date-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
}

.date-line em {
  border-radius: 999px;
  padding: 2px 5px;
  color: #8e5e00;
  background: #fff2c4;
  font-style: normal;
  font-size: 9px;
}

.date-line span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.date-summary {
  color: #52635b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.4;
}

.mini-roster {
  display: grid;
  gap: 4px;
}

.roster-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  font-size: 10px;
  line-height: 1.35;
}

.roster-row span {
  color: #52635b;
  font-weight: 900;
}

.roster-row b {
  font-weight: 750;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.roster-row strong {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.day-note {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px dashed #cddbd2;
  text-align: left;
}

.day-note span {
  color: #6f7f77;
  font-size: 9px;
  font-weight: 900;
}

.day-note b {
  color: #31443a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.part-status-table {
  min-width: 1900px;
  table-layout: fixed;
  font-size: 10px;
}

.part-status-table th,
.part-status-table td {
  height: 34px;
  padding: 4px;
}

.part-status-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.part-status-table tfoot th,
.part-status-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #f7faf8;
  font-weight: 850;
}

.part-status-row {
  cursor: pointer;
}

.part-status-row:hover td {
  background: #f6faf8;
}

.part-status-row.selected td {
  background: #eaf7f0;
  box-shadow: inset 0 1px 0 #91caa9, inset 0 -1px 0 #91caa9;
}

.part-status-row.selected .sticky-name {
  box-shadow: inset 3px 0 0 var(--green);
}

.shift-cell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.shift-cell:hover {
  border-color: #9fcfb4;
  background: #f6faf8;
}

.shift-cell.readonly {
  cursor: pointer;
  opacity: 0.82;
}

.shift-cell.readonly:hover {
  border-color: #d8e3dd;
  background: #fbfcfb;
}

.shift-cell.selected {
  border-color: var(--green);
  background: #dff2e8;
  box-shadow: inset 0 0 0 1px var(--green);
}

.row-pick {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.row-pick small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.summary-cell {
  color: #4f6258;
  line-height: 1.45;
  white-space: nowrap;
}

.holiday-mark {
  color: #8e5e00;
  font-size: 9px;
}

.sticky-name {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 110px;
  background: #fff;
  text-align: left;
  font-weight: 850;
}

th.sticky-name {
  z-index: 4;
  background: var(--head);
}

.monthly-table th.sticky-name {
  z-index: 7;
}

.left {
  text-align: left;
  font-weight: 850;
}

.group-row td {
  color: var(--green);
  background: #edf7f1;
  text-align: left;
  font-weight: 900;
}

.merged-part {
  color: var(--green);
  background: #f7faf8;
  text-align: center;
  vertical-align: middle;
  font-weight: 900;
  min-width: 72px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

#weeklyTable {
  --weekly-header-line: #aebfb6;
  --weekly-header-row-top: 28px;
  --weekly-header-row-date: 34px;
  table-layout: fixed;
  min-width: 1120px;
  font-size: 11px;
  border-color: #ccd9d2;
}

#weeklyTable thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  height: var(--weekly-header-row-top);
  padding: 4px 6px;
  line-height: 1.25;
  border-color: #cddbd3;
  background: #f4f8f5;
  vertical-align: middle;
}

#weeklyTable thead tr:nth-child(2) th {
  top: var(--weekly-header-row-top);
  z-index: 5;
  height: var(--weekly-header-row-date);
  border-bottom: 1px solid var(--weekly-header-line);
  box-shadow: inset 0 -1px 0 var(--weekly-header-line);
}

#weeklyTable .weekly-kind-col {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 54px;
  min-width: 54px;
  background: #fff;
  border-right-color: #c5d2ca;
  text-align: center;
  white-space: nowrap;
}

#weeklyTable .weekly-part-col,
#weeklyTable .merged-part {
  position: sticky;
  left: 54px;
  z-index: 4;
  width: 66px;
  min-width: 66px;
  background: #fff;
  border-right-color: #c5d2ca;
  text-align: center;
  white-space: nowrap;
}

#weeklyTable .weekly-target-col,
#weeklyTable .weekly-target {
  position: sticky;
  left: 120px;
  z-index: 4;
  width: 80px;
  min-width: 80px;
  background: #fff;
  border-right: 1px solid #aebfb6;
  box-shadow: 2px 0 0 rgba(174, 191, 182, .32);
  text-align: center;
  white-space: nowrap;
}

#weeklyTable thead .weekly-kind-col,
#weeklyTable thead .weekly-part-col,
#weeklyTable thead .weekly-target-col {
  z-index: 8;
  background: var(--head);
  height: calc(var(--weekly-header-row-top) + var(--weekly-header-row-date));
  border-bottom: 1px solid var(--weekly-header-line);
  box-shadow: inset 0 -1px 0 var(--weekly-header-line);
}

#weeklyTable thead tr:nth-child(2) th:first-child,
#weeklyTable .weekly-target + td {
  border-left: 1px solid #aebfb6;
}

#weeklyTable .holiday .weekly-kind-col,
#weeklyTable .holiday .merged-part,
#weeklyTable .holiday .weekly-target,
#weeklyTable .weekly-note-row td:first-child {
  background: #fbfaf4;
}

#weeklyTable th:nth-child(2),
#weeklyTable th:nth-child(3),
#weeklyTable .weekly-target {
  min-width: 78px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

#weeklyTable th:nth-child(3),
#weeklyTable .weekly-target {
  min-width: 86px;
}

#weeklyTable td {
  padding: 5px 6px;
  border-color: #d2ded7;
  line-height: 1.38;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

#weeklyTable tbody tr:hover td {
  background-color: #fbfdfc;
}

#weeklyTable .weekly-part-start td {
  border-top: 2px solid #afc3b8;
}

.weekly-names {
  display: inline;
  line-height: 1.42;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

.weekly-name-token {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
}

.weekly-name-token:not(:last-child)::after {
  content: " · ";
  white-space: pre;
}

.weekly-note-row td {
  padding: 4px 5px;
  background: #fffdf7;
  vertical-align: top;
}

.weekly-note-row td:first-child {
  color: #52635b;
  background: #f6f8f6;
  text-align: center;
  vertical-align: middle;
  font-weight: 900;
}

.weekly-note-display {
  min-height: 15px;
  margin-bottom: 3px;
  white-space: pre-wrap;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: 10.5px;
  font-weight: 750;
}

.weekly-note-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: start;
}

.weekly-note-editor .btn {
  padding: 5px 7px;
  font-size: 10px;
}

.weekly-note-editor textarea {
  min-height: 30px;
  padding: 5px 6px;
  font-size: 11px;
  line-height: 1.35;
  resize: vertical;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 22px;
}

.mobile-frame {
  max-width: 430px;
  margin: 0 auto;
  padding: 16px;
}

.mobile-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mobile-top strong {
  color: var(--green);
  font-size: 18px;
}

.mobile-top span {
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 850;
}

.mobile-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}

.mobile-subtabs button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 850;
}

.mobile-subtabs button.active {
  color: var(--green);
  border-color: #9dceb0;
  background: var(--green-soft);
}

.mobile-panel {
  display: none;
}

.mobile-panel.active {
  display: block;
}

.mobile-selects,
.mobile-week,
.mobile-stats {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

#mobileStaff {
  grid-column: 1 / -1;
}

.mobile-week {
  grid-template-columns: repeat(7, 1fr);
}

.mobile-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.mobile-cell {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px;
  font-size: 10px;
}

.mobile-week .mobile-cell {
  min-height: 66px;
  text-align: center;
}

.mobile-cell b {
  display: block;
  margin-bottom: 5px;
}

.mobile-stat {
  border-radius: 8px;
  padding: 10px;
  background: #f6faf8;
}

.mobile-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.mobile-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 18px;
}

.mobile-weekly-selects {
  grid-template-columns: 1fr 1fr;
}

.mobile-weekly-selects select:last-child {
  grid-column: 1 / -1;
}

.mobile-weekly {
  display: grid;
  gap: 9px;
}

.mobile-weekly-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.mobile-weekly-day h3 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 14px;
}

.mobile-weekly-part {
  border-top: 1px solid #edf1ee;
  padding: 6px 0;
}

.mobile-weekly-part-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #203b30;
  font-size: 12px;
}

.mobile-weekly-part-head span {
  color: var(--muted);
  white-space: nowrap;
}

.mobile-weekly-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px;
  padding: 2px 0;
  font-size: 12px;
  line-height: 1.4;
}

.mobile-weekly-line > span {
  color: var(--muted);
  font-weight: 850;
}

.mobile-weekly-line b {
  color: #203b30;
  font-weight: 750;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: normal;
}

.mobile-weekly-note {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding: 7px;
  border-radius: 7px;
  background: #fffdf6;
}

.mobile-weekly-note span {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.mobile-weekly-note b {
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: normal;
  font-weight: 750;
}

@media (max-width: 980px) {
  .app-header { align-items: flex-start; flex-direction: column; }
  .nav-tabs { margin-left: 0; justify-content: flex-start; }
  .work-layout { grid-template-columns: 1fr; }
  .entry-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .entry-controls { grid-template-columns: 1fr; }
  .entry-note-field { grid-column: auto; }
  main { padding: 0 10px; }
  .app-header { display: none; }
  .notice { display: none; }
  .menu-guide {
    margin: 8px 0 10px;
    padding: 7px 9px;
    font-size: 11px;
  }
  .menu-guide ul {
    gap: 2px;
    line-height: 1.4;
  }
  .view { display: none !important; }
  #view-mobile { display: block !important; }
  .mobile-frame {
    max-width: none;
    border: 0;
    border-radius: 0;
  }
}

@media print {
  body { background: #fff; }
  .app-header,
  .notice,
  .menu-guide,
  .page-head,
  .filter-bar,
  .view:not(.printing) {
    display: none !important;
  }
  main { margin: 0; padding: 0; max-width: none; }
  .printing { display: block !important; }
  .table-shell { border: 0; overflow: visible; }
  table { min-width: 0; font-size: 8px; }
  th, td { padding: 2px; }
  #weeklyTable {
    font-size: 7.5px;
  }
  #weeklyTable th,
  #weeklyTable td {
    padding: 2px 3px;
    line-height: 1.25;
  }
  .weekly-names {
    line-height: 1.25;
  }
  #weeklyTable thead th,
  #weeklyTable .weekly-kind-col,
  #weeklyTable .weekly-part-col,
  #weeklyTable .weekly-target-col,
  #weeklyTable .merged-part,
  #weeklyTable .weekly-target,
  .monthly-table thead th,
  .sticky-name {
    position: static !important;
    left: auto !important;
    top: auto !important;
  }
  .monthly-table { min-width: 0; font-size: 7px; }
  .weekly-note-editor { display: none !important; }
  .weekly-note-display {
    margin-bottom: 0;
    min-height: 0;
    font-size: 7.5px;
    line-height: 1.25;
  }
}
