﻿:root {
  --ink: #111827;
  --muted: #687385;
  --line: rgba(17, 24, 39, .12);
  --soft-line: rgba(17, 24, 39, .07);
  --surface: rgba(255, 255, 255, .92);
  --page: #eef2f7;
  --deep: #111827;
  --deep-2: #172033;
  --brand: #0e7490;
  --brand-2: #e11d48;
  --gold: #d97706;
  --shadow: 0 24px 70px rgba(17, 24, 39, .18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 1220px;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(14, 116, 144, .22), transparent 28%),
    radial-gradient(circle at 80% 4%, rgba(225, 29, 72, .16), transparent 28%),
    linear-gradient(135deg, #f6f7fb 0%, #e9edf5 48%, #f9fafb 100%);
  font-family: Pretendard, "Malgun Gothic", Arial, sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { padding: 24px 28px 34px; }

.hero-bar {
  display: grid;
  grid-template-columns: 270px minmax(360px, 1fr) 440px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(17,24,39,.96), rgba(17,32,51,.93));
  box-shadow: var(--shadow);
}

.brand { display: flex; gap: 13px; align-items: center; color: white; }
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #0e7490, #e11d48);
  font-weight: 900;
}
.brand h1 { margin: 0; font-size: 21px; font-weight: 900; }
.brand p { margin: 3px 0 0; color: rgba(255,255,255,.68); font-size: 13px; }

.week-title-wrap {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 74px;
  color: white;
}
.week-kicker { color: #7dd3fc; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.week-title { margin-top: 4px; font-size: 30px; font-weight: 900; }

.hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.week-controls { display: grid; grid-template-columns: 44px 64px 44px; gap: 6px; }

.command-strip {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 160px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(17,24,39,.13);
  border-radius: 8px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 25px rgba(17, 24, 39, .06);
}
.search-box span { padding-right: 12px; color: var(--muted); font-size: 12px; font-weight: 900; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; }

.select, .primary-btn, .ghost-btn, .today-btn, .icon-btn, .mini-btn, .danger-btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}
.primary-btn, .today-btn {
  color: white;
  border: 0;
  background: linear-gradient(135deg, #0e7490, #155e75);
  box-shadow: 0 12px 24px rgba(14, 116, 144, .24);
}
.ghost-btn, .icon-btn, .select {
  color: var(--ink);
  border: 1px solid rgba(17,24,39,.13);
  background: rgba(255,255,255,.88);
}
.hero-bar .ghost-btn, .hero-bar .icon-btn {
  color: white;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.danger-btn { color: white; border: 0; background: #be123c; }

.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dashboard article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 12px 26px rgba(17, 24, 39, .07);
}
.dashboard span { color: var(--muted); font-size: 12px; font-weight: 900; }
.dashboard strong { font-size: 24px; font-weight: 900; }

.layout { display: grid; grid-template-columns: minmax(930px, 1fr) 260px; gap: 14px; align-items: start; }
.planner-card, .side-section {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(17, 24, 39, .09);
  backdrop-filter: blur(16px);
}

.calendar {
  display: grid;
  grid-template-columns: 116px repeat(6, minmax(118px, 1fr));
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}
.cell {
  position: relative;
  min-height: 54px;
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  background: rgba(255,255,255,.68);
}
.cell:nth-child(7n) { border-right: 0; }
.head-cell {
  display: grid;
  min-height: 46px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #172033, #243145);
  font-size: 14px;
  font-weight: 900;
}
.row-label {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 10px;
  color: #172033;
  background: rgba(255,255,255,.52);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
.day-cell { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 38px; }
.day-cell.today { background: linear-gradient(180deg, rgba(255, 247, 237, .98), rgba(255,255,255,.72)); box-shadow: inset 0 0 0 2px #f59e0b; }

.add-cell-btn {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-width: 64px;
  min-height: 26px;
  border: 1px solid rgba(17,24,39,.18);
  border-radius: 7px;
  color: #384254;
  background: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 900;
}
.add-cell-btn:hover { color: white; background: #172033; }

.task {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  padding: 7px 8px 7px 0;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  text-align: left;
  box-shadow: 0 8px 18px rgba(17,24,39,.06);
}
.task::before { content: ""; border-radius: 8px; background: var(--task-color, #334155); }
.task strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.time-badge { color: #0f172a; font-weight: 900; }
.range-badge { color: #9f1239; font-weight: 900; }
.author-dot, .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.empty-hint { color: rgba(104,115,133,.56); font-size: 12px; font-weight: 700; }

.next-common { display: grid; grid-template-columns: 116px 1fr; min-height: 92px; }
.next-common-label { display: grid; place-items: center; border-right: 1px solid var(--soft-line); color: white; background: #172033; font-weight: 900; text-align: center; }
.next-common-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.next-day { min-height: 92px; padding: 8px; border-right: 1px solid var(--soft-line); }
.next-day:last-child { border-right: 0; }
.next-day b { display: block; margin-bottom: 7px; font-size: 12px; }

.side-panel { display: flex; flex-direction: column; gap: 12px; }
.side-section { padding: 13px; }
.focus-section { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(240,249,255,.86)); }
.side-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.side-title h2 { margin: 0; font-size: 16px; font-weight: 900; }
.mini-btn { min-width: 32px; min-height: 28px; color: white; border: 0; background: #172033; font-size: 12px; }
.mini-btn.wide { min-width: 46px; }
.people-item, .author-item, .notice-row { padding: 7px 0; color: #155e75; font-size: 13px; line-height: 1.45; }
.legend { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.legend li, .author-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
.legend span, .author-item span { display: inline-flex; align-items: center; gap: 8px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(15,23,42,.46); backdrop-filter: blur(5px); }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 30;
  width: min(560px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 8px;
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}
.hidden { display: none !important; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 22px; font-weight: 900; }
.close-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #eef2f6; font-size: 20px; }
form { display: grid; gap: 12px; }
.form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 900; }
.toggle-label { grid-template-columns: 18px 1fr; align-items: center; min-height: 43px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: #243145; background: #f8fafc; }
.toggle-label input { width: 16px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; outline-color: #0e7490; }
input[type="color"] { padding: 3px; min-height: 42px; }
textarea { resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.inline-form { display: grid; grid-template-columns: 1fr 58px 120px 72px; gap: 8px; align-items: center; margin-bottom: 12px; }
.manage-list { display: grid; gap: 8px; }
.manage-row { display: grid; grid-template-columns: 1fr 58px 74px; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--soft-line); border-radius: 8px; background: #f8fafc; }
.manage-row span { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }

.notice-popup { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 360px; padding: 16px; border: 1px solid rgba(14,116,144,.24); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.notice-popup > div { display: flex; justify-content: space-between; align-items: center; }
.notice-popup p { margin: 12px 0; line-height: 1.5; }

@media (max-width: 900px) {
  body { min-width: 0; }
  .app-shell { padding: 14px; }
  .hero-bar, .command-strip, .layout, .dashboard, .form-grid.two, .inline-form { grid-template-columns: 1fr; }
  .hero-actions { justify-content: start; flex-wrap: wrap; }
  .calendar, .next-common, .next-common-grid { display: block; }
  .head-cell, .row-label { min-height: 40px; }
  .cell { border-right: 0; }
}

/* Refinement pass: readability, subtle today marker, category system, auth gate */
.app-shell.locked main,
.app-shell.locked .hero-actions,
.app-shell.locked .command-strip {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.calendar {
  grid-template-columns: 124px repeat(6, minmax(142px, 1fr));
  align-items: stretch;
}
.head-cell {
  position: relative;
  min-height: 48px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #162033, #202d42);
  line-height: 1.2;
  text-align: center;
}
.head-cell span {
  position: absolute;
  right: 8px;
  top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #111827;
  background: #facc15;
  font-size: 10px;
  font-weight: 900;
}
.weekend-head,
.holiday-head {
  color: #f8fafc;
  background: linear-gradient(135deg, #4c1d2f, #7f1d1d);
}
.today-head {
  box-shadow: inset 0 -3px 0 #facc15;
}

.cell { min-height: 58px; }
.day-cell {
  min-height: 58px;
  padding: 8px 8px 36px;
  background: rgba(255,255,255,.72);
}
.day-cell.today {
  background: linear-gradient(180deg, rgba(255,251,235,.9), rgba(255,255,255,.76));
  box-shadow: inset 0 3px 0 #facc15;
}
.day-cell.offday {
  background: repeating-linear-gradient(135deg, rgba(15,23,42,.035), rgba(15,23,42,.035) 8px, rgba(255,255,255,.72) 8px, rgba(255,255,255,.72) 18px);
}
.day-cell.offday .empty-hint { color: rgba(127, 29, 29, .48); }
.cell-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.row-label {
  justify-items: stretch;
  align-content: center;
  min-height: 58px;
  padding: 9px 10px 9px 13px;
  border-left: 5px solid var(--category-color, #0e7490);
  background: linear-gradient(90deg, color-mix(in srgb, var(--category-color, #0e7490) 13%, white), rgba(255,255,255,.76));
  text-align: left;
}
.row-label span {
  overflow: hidden;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-label small {
  margin-top: 3px;
  color: color-mix(in srgb, var(--category-color, #0e7490) 72%, #111827);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.main-row {
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-color, #0e7490) 22%, white), rgba(255,255,255,.92));
}
.sub-row { opacity: .94; }

.task {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  gap: 0;
  min-width: 0;
  padding: 8px 9px 8px 12px;
  border-left: 4px solid var(--task-color, #334155);
  overflow: hidden;
}
.task::before { display: none; }
.task span { min-width: 0; }
.task strong {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: clamp(11px, .78vw, 13px);
  line-height: 1.35;
}
.task-meta {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.task-meta b,
.task-meta em,
.range-badge {
  flex: 0 0 auto;
  font-style: normal;
}
.time-badge {
  display: inline-block;
  margin-right: 4px;
  color: #111827;
}

.next-common {
  margin-top: 14px;
  border-top: 0;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(14,116,144,.86));
  box-shadow: 0 18px 44px rgba(15,23,42,.14);
}
.next-common-label {
  border-right: 1px solid rgba(255,255,255,.16);
  background: transparent;
  line-height: 1.35;
}
.next-common-grid { background: rgba(255,255,255,.92); }
.next-day { background: rgba(255,255,255,.72); }
.next-day.offday { background: rgba(127,29,29,.06); }

.people-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #155e75;
  white-space: nowrap;
}
.people-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.people-item small {
  flex: 0 0 auto;
  color: #64748b;
  font-weight: 800;
}
.muted-line { white-space: normal; }

.category-legend { display: grid; gap: 7px; }
.category-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}
.category-legend-item i {
  width: 10px;
  height: 24px;
  border-radius: 999px;
}
.category-legend-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-legend-item em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.wide-modal { width: min(880px, calc(100vw - 36px)); }
.modal-help { margin: -6px 0 14px; color: #64748b; font-size: 13px; line-height: 1.5; }
.category-form {
  display: grid;
  grid-template-columns: 1fr 100px 58px 145px 130px 74px;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.category-row {
  display: grid;
  grid-template-columns: minmax(120px,1fr) 86px 58px minmax(170px,1fr) 68px 68px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-left: 5px solid var(--category-color, #0e7490);
  border-radius: 8px;
  background: #f8fafc;
}
.category-row span { color: #64748b; font-size: 12px; font-weight: 800; }

.auth-modal {
  width: min(430px, calc(100vw - 36px));
  text-align: center;
}
.auth-modal form { gap: 14px; }
.auth-logo {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0 auto;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #0e7490, #e11d48);
  font-weight: 900;
}
.auth-modal h2 { margin: 0; font-size: 24px; }
.auth-modal p { margin: 0; color: #64748b; line-height: 1.5; }
.admin-card .side-note { margin: 0; color: #64748b; font-size: 12px; line-height: 1.45; }

@media (max-width: 900px) {
  .category-form,
  .category-row { grid-template-columns: 1fr; }
}

/* Simple calendar skin */
:root {
  --ink: #1f2937;
  --muted: #8a94a6;
  --line: #e6e9ee;
  --soft-line: #f0f2f5;
  --surface: #ffffff;
  --page: #f3f1ec;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
body {
  background: #f3f1ec;
  color: var(--ink);
}
.app-shell { padding: 28px 30px 34px; }
.hero-bar {
  grid-template-columns: 280px minmax(360px, 1fr) 390px;
  padding: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand { color: #111827; }
.brand-mark {
  width: 36px;
  height: 36px;
  color: #111827;
  border: 1px solid #111827;
  background: transparent;
}
.brand h1 {
  display: flex;
  align-items: baseline;
  gap: 0;
  color: #111827;
  font-size: 17px;
  letter-spacing: 0;
}
.brand h1 span {
  margin-left: 4px;
  color: #111827;
  font-weight: 900;
}
.brand p { color: #8a94a6; font-size: 12px; }
.week-title-wrap { color: #111827; min-height: 50px; }
.week-kicker { color: #9aa3af; font-size: 11px; letter-spacing: .16em; }
.week-title { font-size: 18px; font-weight: 800; }
.hero-actions { gap: 7px; }
.primary-btn, .today-btn {
  color: #111827;
  border: 1px solid #d7dce3;
  background: #fff;
  box-shadow: none;
}
.ghost-btn, .icon-btn, .select {
  color: #374151;
  border: 1px solid #d7dce3;
  background: #fff;
  box-shadow: none;
}
.hero-bar .ghost-btn,
.hero-bar .icon-btn { color: #374151; border-color: #d7dce3; background: #fff; }
.command-strip { grid-template-columns: minmax(280px, 390px) 150px 1fr; }
.search-box,
.dashboard article,
.side-section {
  border: 1px solid #e4e7ec;
  background: #fff;
  box-shadow: none;
}
.dashboard article { min-height: 44px; }
.dashboard strong { font-size: 20px; }
.layout { grid-template-columns: minmax(930px, 1fr) 260px; }
.planner-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.calendar {
  grid-template-columns: 118px repeat(6, minmax(138px, 1fr));
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.head-cell {
  min-height: 50px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
  font-size: 13px;
  font-weight: 800;
}
.corner-cell { color: #9aa3af; }
.weekend-head,
.holiday-head {
  color: #b91c1c;
  background: #fff7f7;
}
.head-cell span {
  right: 50%;
  top: auto;
  bottom: 5px;
  transform: translateX(50%);
  padding: 2px 7px;
  color: #fff;
  background: #111827;
  font-size: 10px;
}
.today-head { box-shadow: inset 0 -2px 0 #111827; }
.cell {
  border-color: #edf0f3;
  background: #fff;
}
.day-cell {
  min-height: 52px;
  padding: 7px 7px 30px;
  background: #fff;
}
.day-cell.today {
  background: #fafafa;
  box-shadow: none;
}
.day-cell.offday {
  background: #fafafa;
}
.cell-content { gap: 5px; }
.empty-hint { display: none; }
.row-label {
  min-height: 52px;
  border-left: 4px solid var(--category-color, #9ca3af);
  background: #fbfbfb;
  padding: 8px 9px;
}
.row-label span { font-size: 13px; font-weight: 700; }
.row-label small { display: none; }
.main-row { background: #f7faf9; }
.task {
  min-height: 24px;
  padding: 5px 7px 5px 9px;
  border: 0;
  border-left: 3px solid var(--task-color, #9ca3af);
  border-radius: 5px;
  background: color-mix(in srgb, var(--task-color, #9ca3af) 12%, white);
  box-shadow: none;
}
.task.normal-task {
  border-left-color: #9ca3af;
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf0f3;
}
.task strong {
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}
.task-meta {
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
  color: #8a94a6;
  font-size: 10.5px;
}
.task-meta em { display: none; }
.author-dot { display: none; }
.range-badge { color: #8a94a6; }
.add-cell-btn {
  right: 6px;
  bottom: 5px;
  display: grid;
  min-width: 22px;
  width: 24px;
  min-height: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7dce3;
  border-radius: 50%;
  color: #6b7280;
  background: #fff;
  font-size: 14px;
  line-height: 1;
}
.add-cell-btn:hover { color: #fff; background: #111827; }
.next-common {
  display: grid;
  grid-template-columns: 118px 1fr;
  margin-top: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}
.next-common-label {
  color: #374151;
  border-right: 1px solid #e5e7eb;
  background: #fafafa;
  font-size: 13px;
  font-weight: 800;
}
.next-common-grid { background: #fff; }
.next-day {
  min-height: 78px;
  background: #fff;
  border-color: #edf0f3;
}
.next-day.offday { background: #fafafa; }
.next-day b { color: #6b7280; font-size: 11.5px; font-weight: 700; }
.side-title h2 { font-size: 14px; }
.mini-btn {
  color: #374151;
  border: 1px solid #d7dce3;
  background: #fff;
}
.people-item em,
.editable-row em {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}
.people-item button,
.editable-row button {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}
.editable-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf0f3;
}
.editable-row > span { min-width: 0; }
.modal {
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
}

/* Fix pass for captured issues 6-10 */
.head-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.2;
}
.head-cell:nth-child(7n) { border-right: 0; }
.head-cell b {
  display: block;
  font: inherit;
  white-space: nowrap;
}
.head-cell span {
  position: static;
  transform: none;
  padding: 1px 7px 2px;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  font-size: 10px;
  line-height: 1.2;
}
.today-head {
  background: #f7fbff;
  box-shadow: inset 0 -2px 0 #93c5fd;
}
.day-cell.today {
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px #dbeafe;
}
.day-cell.today.offday {
  background: #f7fbff;
}
.task {
  border-left: 0;
  padding: 5px 7px;
  background: color-mix(in srgb, var(--task-color, #9ca3af) 13%, white);
}
.task.normal-task {
  border-left: 0;
  background: #fff;
}
.task strong {
  color: color-mix(in srgb, var(--task-color, #1f2937) 55%, #111827);
}
.task.normal-task strong { color: #1f2937; }
.people-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  display: grid;
  align-items: center;
}
.people-item span {
  min-width: 0;
  white-space: nowrap;
}
.people-item .person-name {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #155e75;
  font: inherit;
  font-weight: 500;
  text-align: left;
}
.people-item em button {
  padding: 2px 5px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
}
.brand h1 span:empty { display: none; }
.brand h1 span:not(:empty) { display: inline; }

/* Header/date overflow and today/offday adjustment */
.head-cell {
  min-width: 0;
  overflow: hidden;
  padding: 7px 8px;
}
.head-cell b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  word-break: keep-all;
}
.head-cell span {
  position: static;
  flex: 0 0 auto;
  transform: none;
  margin-left: 2px;
  padding: 1px 6px 2px;
  color: #111827;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.15;
}
.today-head {
  background: #f3f4f6;
  box-shadow: inset 0 -2px 0 #9ca3af;
}
.day-cell.today {
  background: #f3f4f6;
  box-shadow: none;
}
.weekend-head,
.holiday-head {
  background: #fff;
  color: #b91c1c;
}
.day-cell.offday,
.day-cell.today.offday {
  background: #fff;
}

/* Requested final visual tune */
.main-row span {
  font-size: 14px;
  font-weight: 900;
}
.sub-row span {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.main-row {
  background: #f7faf9;
}
.sub-row {
  background: #fbfbfb;
  opacity: 1;
}
.today-head,
.day-cell.today {
  background: #fafafa;
}
.today-head {
  box-shadow: inset 0 -2px 0 #9ca3af;
}
.day-cell.today {
  box-shadow: none;
}
.weekend-head,
.holiday-head {
  background: #f1f1f1;
  color: #b91c1c;
}
.day-cell.offday,
.day-cell.today.offday {
  background: #fff;
}
.brand h1 span:not(:empty) {
  display: inline-block;
  margin-left: 5px;
  color: #111827;
  font-weight: 900;
}
.brand p {
  color: #6b7280;
}

#departmentName {
  display: inline-block;
  margin-left: 5px;
  color: #111827;
  font-weight: 900;
  white-space: nowrap;
}
#departmentName:empty {
  display: none;
}

/* Final fixes: main row emphasis, stable brand title, people list layout */
.brand {
  min-width: 0;
}
.brand h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
.brand-title-base {
  flex: 0 0 auto;
  margin-left: 0 !important;
  white-space: nowrap;
}
#departmentName {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(46vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-day-cell {
  background: #f7faf9;
}
.main-day-cell.today,
.day-cell.today {
  background: #fafafa;
}
.main-day-cell.offday {
  background: #f7faf9;
}
.day-cell.offday:not(.main-day-cell),
.day-cell.today.offday:not(.main-day-cell) {
  background: #fff;
}
.main-row {
  background: #f7faf9;
}
.main-row span {
  font-weight: 900;
}
.sub-row span {
  font-weight: 500;
}
.weekend-head,
.holiday-head {
  background: #eceff3;
  color: #b91c1c;
}
.people-item span {
  min-width: 0;
}
.people-item small {
  min-width: max-content;
}

/* Final pass: main/sub emphasis and consistent main-row color */
.row-label span {
  font-weight: 400;
}
.main-row span {
  font-weight: 900;
}
.sub-row span {
  font-weight: 400;
  color: #4b5563;
}
.main-day-cell,
.main-day-cell.today,
.main-day-cell.offday,
.main-day-cell.today.offday {
  background: #f7faf9;
}
.sub-day-cell {
  background: #fff;
}
.sub-day-cell.today {
  background: #fafafa;
}
.sub-day-cell.offday,
.sub-day-cell.today.offday {
  background: #fff;
}

/* Notice stack and row-based task weight */
.notice-popup {
  top: 22px;
  bottom: auto;
  left: 50%;
  right: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow: auto;
  transform: translateX(-50%);
  border-color: #d7dce3;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
}
.notice-popup-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.notice-popup-card {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  line-height: 1.45;
}
.notice-popup-card b {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}
.notice-popup-card strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}
.notice-popup-card span {
  font-size: 13px;
}
.main-day-cell .task strong,
.main-day-cell .time-badge {
  font-weight: 800;
}
.sub-day-cell .task strong,
.sub-day-cell .time-badge,
.sub-day-cell .range-badge,
.sub-day-cell .task-meta,
.sub-day-cell .task-meta b {
  font-weight: 400;
}
.sub-day-cell .task strong {
  color: #1f2937;
}


/* Weekend header background should match weekday header */
.weekend-head,
.holiday-head {
  background: #fff;
  color: #b91c1c;
}

/* Weekend and holiday headers should visually match regular date headers */
.weekend-head,
.holiday-head {
  background: #fff;
  color: #111827;
}

/* Weekend and holiday headers: same cell color as weekdays, red text kept */
.weekend-head,
.holiday-head {
  background: #fff;
  color: #b91c1c;
}

/* Weekend and holiday headers: exact same background as weekday headers */
.weekend-head,
.holiday-head {
  background: #fafafa;
  color: #b91c1c;
}

/* Individual notice popups */
.notice-popup-stack {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  gap: 10px;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  transform: translateX(-50%);
  pointer-events: none;
}
.notice-popup-stack .notice-popup {
  position: static;
  width: auto;
  max-height: none;
  transform: none;
  pointer-events: auto;
}
.notice-popup-item {
  display: block;
}
.notice-popup-item .notice-popup-card {
  margin: 12px 0;
}
