#app-header {
  height: var(--header-h);
  background: rgba(10,21,37,.6);
  backdrop-filter: blur(var(--glass-blur-lg));
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 4px 24px rgba(0,0,0,.3);
  gap: 8px;
  contain: layout paint;
}

#app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(14,165,233,.25) 20%, rgba(103,212,255,.35) 50%, rgba(14,165,233,.25) 80%, transparent 100%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: contain;
  box-shadow: 0 2px 10px rgba(14,165,233,.2);
  transition: transform .3s cubic-bezier(.34,1.2,.64,1), box-shadow .3s;
  will-change: transform;
}

.brand-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(14,165,233,.3);
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.015em;
  line-height: 1.2;
}

.brand-text {
  min-width: 0;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 4px 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: border-color .2s, box-shadow .2s;
}

.month-nav:hover {
  border-color: var(--glass-border-h);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.nav-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: 18px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  transition: color .15s, background .15s, transform .15s;
  display: flex;
  align-items: center;
  will-change: transform;
}

.nav-btn:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
  transform: scale(1.1);
}

.nav-btn:active {
  transform: scale(.9);
}

#month-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  min-width: 120px;
  text-align: center;
  letter-spacing: -.015em;
  user-select: none;
  white-space: nowrap;
}

.month-label-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: inherit;
  padding: 4px 10px;
  border-radius: 8px;
}

.month-label-btn:hover {
  background: rgba(255,255,255,.08);
}

.month-label-btn:active {
  transform: scale(0.96);
}

.month-label-caret {
  color: rgba(255,255,255,.55);
  font-size: 11px;
}

.header-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.hbtn-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,.06);
  margin: 0 2px;
}

#stats-bar {
  height: var(--statsbar-h);
  background: rgba(248,250,252,.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid rgba(226,232,240,.5);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  gap: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
  position: relative;
  contain: layout paint;
}

#stats-bar::-webkit-scrollbar {
  display: none;
}

#stats-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(90deg, transparent, rgba(248,250,252,.75));
  pointer-events: none;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  border-right: 1px solid rgba(226,232,240,.4);
  white-space: nowrap;
  cursor: default;
  transition: background .15s;
}

.stat-item:first-child {
  padding-left: 0;
}

.stat-item:last-child {
  border-right: none;
}

.stat-item:hover {
  background: rgba(14,165,233,.08);
}

.stat-item-emp {
  padding: 0 12px 0 0;
  border-right: 1px solid var(--gray-200);
  margin-right: 4px;
  color: var(--gray-500);
  gap: 5px;
}

.stat-label-sm {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: .04em;
}

.stat-code {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  line-height: 1.5;
  letter-spacing: .01em;
}

.stat-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}

#stats-empty {
  font-size: 11px;
  color: var(--gray-400);
  font-style: italic;
}

#plan-bar {
  height: 52px;
  background: rgba(59,10,0,.45);
  backdrop-filter: blur(var(--glass-blur-lg));
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  flex-shrink: 0;
  z-index: 95;
  position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(251,191,36,.1);
  border-bottom: 1px solid rgba(251,191,36,.08);
  contain: layout paint;
}

#plan-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(251,191,36,.15) 20%, rgba(252,211,77,.35) 50%, rgba(251,191,36,.15) 80%, transparent 100%);
}

#plan-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245,158,11,.12) 30%, rgba(252,211,77,.25) 50%, rgba(245,158,11,.12) 70%, transparent 100%);
}

.plan-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.plan-bar-month {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  flex-shrink: 0;
}

.plan-bar-hint {
  font-size: 11.5px;
  color: rgba(255,255,255,.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-bar-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.plan-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px;
}

#grid-wrapper {
  width: max-content;
  max-width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  margin: 0 auto;
  overflow: auto;
  position: relative;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.2);
  contain: paint layout;
  overscroll-behavior: contain;
}

#grid-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#grid-wrapper::-webkit-scrollbar-track {
  background: rgba(241,245,249,.5);
  border-radius: 3px;
}

#grid-wrapper::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.4);
  border-radius: 3px;
}

#grid-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(148,163,184,.6);
}

#grid-wrapper::-webkit-scrollbar-corner {
  background: transparent;
}

#plan-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
}

.th-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 50;
  width: var(--name-w);
  min-width: var(--name-w);
  background: rgba(10,21,37,.9);
  backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(14,165,233,.2);
}

.th-corner-inner {
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
}

.th-day {
  position: sticky;
  top: 0;
  z-index: 30;
  width: var(--cell-w);
  min-width: var(--cell-w);
  max-width: var(--cell-w);
  border-right: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(14,165,233,.2);
  text-align: center;
  vertical-align: bottom;
  user-select: none;
}

.th-day.is-fri {
  border-right: 1px solid rgba(255,255,255,.12) !important;
}

.th-day-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 2px 5px;
  height: 58px;
}

.d-kw {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .04em;
  min-height: 10px;
  line-height: 1;
  opacity: .5;
}

.d-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.d-dow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.d-hol {
  font-size: 7px;
  margin-top: 2px;
  max-width: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.th-day.wd {
  background: rgba(22,42,70,.85);
  color: rgba(255,255,255,.9);
}

.th-day.we {
  background: rgba(30,42,60,.8);
  color: var(--gray-400);
}

.th-day.hol {
  background: rgba(61,42,0,.8);
  color: #FCD34D;
}

.th-day.today {
  outline: 2px solid rgba(14,165,233,.5);
  outline-offset: -2px;
  z-index: 31;
}

.td-name {
  position: sticky;
  left: 0;
  z-index: 20;
  width: var(--name-w);
  min-width: var(--name-w);
  height: var(--row-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border-right: 1px solid rgba(226,232,240,.4);
  border-bottom: 1px solid rgba(226,232,240,.4);
  padding: 0 8px 0 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background .15s, border-right-color .15s;
  box-shadow: 2px 0 8px rgba(0,0,0,.03);
}

tr:hover .td-name {
  background: rgba(232,248,255,.8);
  border-right-color: rgba(14,165,233,.15);
}

.emp-label {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gray-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .1s;
  line-height: 1.3;
}

tr:hover .emp-label {
  color: var(--navy-600);
}

.emp-pos-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  letter-spacing: .03em;
  line-height: 1.5;
  white-space: nowrap;
  opacity: .9;
  transition: opacity .1s;
}

tr:hover .emp-pos-tag {
  opacity: 1;
}

.emp-profile-icon {
  opacity: 0;
  flex-shrink: 0;
  color: var(--accent);
  pointer-events: none;
  transition: opacity .12s;
  display: flex;
  align-items: center;
}

tr:hover .emp-profile-icon {
  opacity: .65;
}

.emp-del {
  opacity: 0;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: none;
  border: none;
  color: var(--gray-400);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .1s, background .1s, color .1s, transform 0.15s;
}

tr:hover .emp-del {
  opacity: 1;
}

.emp-del:hover {
  color: var(--red);
  background: var(--red-bg);
  transform: scale(1.1);
}

.emp-del:active {
  transform: scale(0.9);
}

.td-cell {
  width: var(--cell-w);
  min-width: var(--cell-w);
  max-width: var(--cell-w);
  height: var(--row-h);
  border-right: 1px solid rgba(226,232,240,.4);
  border-bottom: 1px solid rgba(226,232,240,.4);
  cursor: pointer;
  position: relative;
  vertical-align: top;
  transition: filter .1s, box-shadow .15s, transform 0.1s;
  outline: none;
  will-change: filter, transform;
}

.td-cell:hover {
  filter: brightness(.9);
  box-shadow: inset 0 0 0 1px rgba(14,165,233,.12);
  z-index: 5;
}

.td-cell:active {
  transform: scale(0.94);
  z-index: 6;
}

.td-cell:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 5;
}

.td-cell.we {
  background-color: rgba(241,245,249,.6) !important;
}

.td-cell.hol {
  background-color: rgba(255,251,235,.6) !important;
}

.td-cell.today {
  box-shadow: inset 0 0 0 1px rgba(14,165,233,.3);
  z-index: 2;
}

.td-cell.is-fri {
  border-right: 1px solid rgba(203,213,225,.5) !important;
}

.cell-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 3px;
}

.cell-assign {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  word-break: break-all;
  max-width: 100%;
}

.cell-assign-rbn {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  word-break: normal !important;
  letter-spacing: -0.01em;
}

.td-cell.empty-wd .cell-inner::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: background .1s, transform 0.15s;
  flex-shrink: 0;
}

.td-cell.empty-wd:hover .cell-inner::after {
  background: var(--gray-300);
  transform: scale(1.5);
}

.td-cell.auto-f-rest .cell-assign {
  font-weight: 500 !important;
  font-style: italic;
  letter-spacing: .03em;
}

.td-cell.auto-f-rest::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: rgba(71,85,105,0.18);
  pointer-events: none;
}

.cell-duty {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 7px;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1.3;
  letter-spacing: .02em;
  pointer-events: none;
}

.cell-wish {
  position: absolute;
  bottom: 1px;
  left: 1px;
  font-size: 6px;
  font-weight: 900;
  padding: 0.5px 2.5px;
  border-radius: 2px;
  line-height: 1.3;
  pointer-events: none;
  letter-spacing: .02em;
  z-index: 1;
}

.cell-wish.wish-NO_DUTY {
  background: #FEE2E2;
  color: #991B1B;
}

.cell-wish.wish-BD_WISH {
  background: #FEE2E2;
  color: #B91C1C;
}

.cell-wish.wish-HG_WISH {
  background: #E0F2FE;
  color: #0369A1;
}

.tr-stat.tr-stat-first .td-stat-lbl,
.tr-stat.tr-stat-first .td-stat-val {
  border-top: 1px solid rgba(203,213,225,.5);
}

.tr-stat .td-stat-lbl {
  position: sticky;
  left: 0;
  z-index: 20;
  background: rgba(248,250,252,.85);
  color: var(--gray-600);
  backdrop-filter: blur(6px);
  height: var(--foot-h);
  padding: 0 10px;
  border-right: 1px solid rgba(226,232,240,.4);
  border-bottom: 1px solid rgba(226,232,240,.4);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: 2px 0 8px rgba(0,0,0,.03);
}

.tr-stat .td-stat-val {
  background: rgba(248,250,252,.6);
  color: var(--gray-300);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  height: var(--foot-h);
  border-bottom: 1px solid rgba(226,232,240,.4);
  border-right: 1px solid rgba(226,232,240,.4);
  font-variant-numeric: tabular-nums;
  transition: color .12s, background .12s;
}

.td-stat-val.dim {
  opacity: .28;
}

.td-stat-val.nz {
  color: var(--gray-700);
}

.td-stat-val.warn {
  color: var(--red);
  background: var(--red-lt);
  font-weight: 800;
}

.td-stat-val.today-col {
  background: var(--accent-xs);
}

.td-stat-val.is-fri {
  border-right: 1px solid var(--gray-300) !important;
}

.stat-lbl-badge {
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .01em;
}

.stat-lbl-text {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-500);
}

.td-empty {
  padding: 0;
  text-align: center;
}

.empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 52px 24px;
  color: var(--gray-400);
}

.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
}

.empty-hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--gray-400);
}

.tr-rbn .td-name-rbn {
  background: linear-gradient(90deg, rgba(14,165,233,.12), rgba(14,165,233,.02));
}

.td-cell-rbn .cell-assign-rbn {
  color: #0C4A6E;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

body.plan-mode-active #app-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(245,158,11,.4) 15%, #F59E0B 35%, #FCD34D 50%, #F59E0B 65%, rgba(245,158,11,.4) 85%, transparent 100%);
  opacity: .8;
}

body.plan-mode-active #grid-wrapper {
  box-shadow: inset 0 0 0 3px rgba(245,158,11,.35);
  outline: none;
}

body.plan-mode-active .th-corner {
  background: linear-gradient(135deg, #3B1000 0%, #6B2100 100%);
}

body.plan-mode-active .th-corner-inner::after {
  content: 'PLAN';
  position: absolute;
  bottom: 4px;
  left: 14px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #F59E0B;
  opacity: .7;
}

body.plan-mode-active .th-corner-inner {
  position: relative;
}

body.plan-mode-active .td-cell.empty-wd .cell-inner::after {
  background: rgba(245,158,11,.28) !important;
}

body.plan-mode-active .td-cell.empty-wd:hover .cell-inner::after {
  background: rgba(245,158,11,.5) !important;
}

body.plan-mode-active #stats-bar {
  border-top: 2px solid rgba(245,158,11,.25);
}

.mobile-nav {
  display: none;
}

.mobile-view {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.is-mobile main {
  display: none !important;
}

body.is-mobile #stats-bar {
  display: none !important;
}

body.is-mobile .mobile-view {
  display: flex !important;
}

body.is-mobile .mobile-nav {
  display: flex !important;
}

body.is-mobile #app-header .header-actions {
  display: none !important;
}

body.is-mobile.plan-mode-active .mobile-view {
  border-top: 2px solid rgba(245,158,11,.35);
}

body.is-mobile.plan-mode-active #plan-bar {
  height: auto !important;
  min-height: 52px !important;
  padding: 8px 12px !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

body.is-mobile.plan-mode-active #plan-bar::-webkit-scrollbar {
  display: none !important;
}

body.is-mobile .plan-bar-left {
  flex-shrink: 0 !important;
  flex: 0 0 auto !important;
}

body.is-mobile .plan-bar-center {
  flex-shrink: 0 !important;
}

body.is-mobile .plan-bar-right {
  flex-shrink: 0 !important;
  margin-left: auto;
}

@media (max-width: 1200px) {
  .brand-sub { display: none; }
  #month-label { min-width: 100px; font-size: 13px; }
  .plan-bar-hint { display: none; }
  .plan-bar-month { font-size: 11px; }
}

@media (max-width: 768px) {
  :root {
    --header-h: 48px;
    --name-w: 140px;
    --cell-w: 40px;
    --row-h: clamp(36px, 4.5vh, 50px);
    --overlay-pad: 12px;
  }
  .brand-text { display: none; }
  .brand { position: absolute; left: 12px; gap: 0; }
  #app-header { justify-content: center; padding: 0; }
  .month-nav { margin: 0 auto; }
  #month-label { min-width: 80px; font-size: 12px; }
  .nav-btn { padding: 4px 8px; font-size: 16px; }
  .header-actions { display: none; }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mnav-h);
    background: rgba(10,21,37,.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,.1);
    z-index: 1000;
    padding-bottom: var(--safe-bottom);
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  }
  main { padding-bottom: calc(12px + var(--mnav-h)); }
  .mnav-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    transition: color 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mnav-btn:hover { color: var(--accent-lt); }
  .mnav-btn:active { transform: scale(0.92); color: var(--accent-lt); }
  .mnav-plan { position: relative; color: #FCD34D; }
  .mnav-plan-icon {
    background: rgba(251,191,36,.15);
    border: 1px solid rgba(251,191,36,.3);
    border-radius: 12px;
    width: 44px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
  }
  body.plan-mode-active .mnav-plan-icon { background: #F59E0B; color: #fff; }
  #stats-bar { padding: 0 8px; }
  .stat-item { padding: 0 8px; }
  .stat-label-sm { display: none; }
  #plan-bar { gap: 8px; padding: 0 8px; flex-wrap: wrap; height: auto; min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
  .plan-bar-left { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .plan-bar-center { gap: 2px; }
  .plan-bar-right { gap: 3px; }
}

@media (max-width: 480px) {
  :root {
    --header-h: 44px;
    --name-w: 110px;
    --cell-w: 36px;
    --row-h: clamp(32px, 4.5vh, 44px);
    --foot-h: 26px;
    --overlay-pad: 10px;
  }
  .brand-icon { width: 28px; height: 28px; }
  .month-nav { padding: 3px 4px; }
  #month-label { min-width: 70px; font-size: 11px; }
  .nav-btn { padding: 4px 6px; font-size: 14px; }
  .cell-assign { font-size: 8px; }
  .cell-assign-rbn { font-size: 7.5px !important; }
  .td-name { padding: 0 4px 0 6px; }
  .emp-label { font-size: 11px; }
  .emp-pos-tag { font-size: 7.5px; padding: 1px 3px; }
  .emp-profile-icon { display: none; }
  .d-num { font-size: 12px; }
  .d-dow { font-size: 8px; }
  .d-kw { font-size: 6px; }
  .th-day-inner { height: 48px; }
  .th-corner-inner { height: 48px; font-size: 8px; }
  .plan-bar-month { display: none; }
}