:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e3e7f0;
  --border-strong: #cfd5e3;
  --text: #1c2233;
  --muted: #6b7386;
  --faint: #9aa1b2;
  --primary: #3657d6;
  --primary-600: #2a45b0;
  --primary-50: #eef2ff;
  --sun: #e5484d;
  --sat: #2f6fdb;
  --today: #3657d6;
  --danger: #d64545;
  --ok: #1f9d6b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 60, 0.05), 0 4px 16px rgba(20, 30, 60, 0.06);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: -0.02em; }
.brand-text small { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600;
}
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a.active { background: var(--primary-50); color: var(--primary); }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px;
}
.notice { background: var(--primary-50); color: var(--primary-600); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-weight: 600; font-size: 13px; }
.user-area { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 700; flex: none;
}
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { color: var(--danger); border-color: #f1c4c4; }
.btn.danger:hover { background: #fff5f5; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field > label { font-weight: 600; font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface);
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: 2px solid var(--primary-50); border-color: var(--primary); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > .none { flex: none; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error-text { color: var(--danger); font-size: 13px; white-space: pre-line; min-height: 1em; }

/* ---------- layout ---------- */
.app { max-width: 1480px; margin: 0 auto; padding: 20px 24px 40px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }
.sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.side-section { padding: 16px; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-head h3 { margin: 0; font-size: 14px; }
.link-btn { border: 0; background: none; color: var(--primary); font-weight: 600; cursor: pointer; padding: 2px 4px; font-size: 12px; }
.cal-group { margin-top: 10px; }
.cal-group-title { font-size: 12px; color: var(--faint); font-weight: 700; margin: 0 0 6px; display: flex; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  --c: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; cursor: pointer; user-select: none;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0.35; }
.chip.on { border-color: color-mix(in srgb, var(--c) 45%, white); background: color-mix(in srgb, var(--c) 10%, white); color: var(--text); }
.chip.on .dot { opacity: 1; }
.upcoming { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.upcoming li { display: flex; gap: 10px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.upcoming li:hover { background: var(--surface-2); }
.upcoming .when { flex: none; width: 46px; font-weight: 700; font-size: 12px; color: var(--muted); padding-top: 1px; }
.upcoming .what { min-width: 0; }
.upcoming .what b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--faint); font-size: 13px; padding: 8px 0; }

/* ---------- main calendar header ---------- */
.main-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.main-head h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; flex: 1; }
.hint { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.hint b { color: var(--text); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar h2 { margin: 0 8px; font-size: 20px; letter-spacing: -0.02em; min-width: 140px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.search { width: 190px; height: 34px; }
.summary { padding: 8px 16px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }

/* ---------- month view ---------- */
.month { --lane-h: 22px; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.dow div { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.dow div:first-child { color: var(--sun); }
.dow div:last-child { color: var(--sat); }
.week { position: relative; min-height: 118px; border-bottom: 1px solid var(--border); }
.week:last-child { border-bottom: 0; }
.week-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day { border-right: 1px solid var(--border); padding: 6px 8px; cursor: pointer; transition: background .1s; }
.day:last-child { border-right: 0; }
.day:hover { background: #fafbff; }
.day.other { background: var(--surface-2); }
.day.other .num { color: var(--faint); }
.day-top { display: flex; align-items: center; gap: 6px; height: 22px; }
.num { font-weight: 700; font-size: 13px; width: 24px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; }
.day.sun .num, .day.holiday .num { color: var(--sun); }
.day.sat .num { color: var(--sat); }
.day.today .num { background: var(--today); color: #fff; }
.hol-name { font-size: 11px; color: var(--sun); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-fg {
  position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: var(--lane-h); row-gap: 2px; padding: 32px 0 8px; pointer-events: none;
}
.ev {
  --c: var(--primary);
  pointer-events: auto; cursor: pointer; margin: 0 3px; padding: 0 6px;
  height: var(--lane-h); line-height: var(--lane-h); font-size: 12px; font-weight: 600;
  border-radius: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0;
}
.ev.bar { background: color-mix(in srgb, var(--c) 16%, white); color: color-mix(in srgb, var(--c) 70%, black); border-left: 3px solid var(--c); }
.ev.bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.ev.bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.ev.timed { color: var(--text); font-weight: 500; }
.ev.timed:hover, .ev.bar:hover { filter: brightness(0.96); }
.ev.timed::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: 1px; }
.ev .t { color: var(--muted); font-weight: 600; margin-right: 4px; }
.ev.private { font-style: italic; opacity: .8; }
.more { pointer-events: auto; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 9px; line-height: var(--lane-h); }
.more:hover { color: var(--primary); }
/* click-to-add affordance: "+" on hover, date number opens that day's list */
.day .num { cursor: pointer; }
.day .num:hover { background: var(--primary-50); color: var(--primary); }
.day.today .num:hover { background: var(--primary-600); color: #fff; }
.add-hint { margin-left: auto; color: var(--primary); font-weight: 800; font-size: 16px; line-height: 1; opacity: 0; transition: opacity .1s; }
.day:hover .add-hint { opacity: .7; }

/* ---------- week view ---------- */
.week-view { --gutter: 56px; --lane-h: 22px; overflow-x: auto; user-select: none; -webkit-user-select: none; }
.week-view > * { min-width: 640px; }
/* let the main column shrink so the week grid scrolls inside its card on phones */
.layout > section { min-width: 0; }
.wk-head, .wk-allday { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.wk-head { grid-template-columns: var(--gutter) repeat(7, minmax(0, 1fr)); }
.wk-gutter { font-size: 11px; color: var(--faint); text-align: right; padding: 4px 8px 0 0; }
.wk-dh { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px 6px; cursor: pointer; border-left: 1px solid var(--border); min-width: 0; }
.wk-dh:hover { background: #fafbff; }
.wk-dow { font-size: 12px; font-weight: 700; color: var(--muted); }
.wk-dh .num { width: 32px; height: 32px; border-radius: 50%; font-size: 17px; }
.wk-dh.sun .wk-dow, .wk-dh.sun .num, .wk-dh.holiday .num { color: var(--sun); }
.wk-dh.sat .wk-dow, .wk-dh.sat .num { color: var(--sat); }
.wk-dh.today .num { background: var(--today); color: #fff; }
.wk-dh .hol-name { max-width: 100%; }
.wk-ad { position: relative; min-height: 28px; }
.wk-ad-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wk-ad-cell { border-left: 1px solid var(--border); cursor: pointer; }
.wk-ad-cell:hover { background: #fafbff; }
.wk-ad-fg { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; padding: 3px 0; pointer-events: none; }
.wk-scroll { height: 620px; overflow-y: auto; position: relative; }
.wk-body { position: relative; display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); }
.wk-hours { position: relative; padding: 0; }
.wk-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); }
.wk-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative;
  background-image: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(to bottom, transparent 0 24px, #f1f3f8 24px 25px, transparent 25px 48px); }
.wk-col { position: relative; border-left: 1px solid var(--border); cursor: cell; touch-action: pan-y; user-select: none; }
.wk-col.sun, .wk-col.sat { background: rgba(244, 246, 251, .45); }
.wk-col.today { background: rgba(54, 87, 214, .04); }
.wk-ev {
  --c: var(--primary);
  position: absolute; overflow: hidden; border-radius: 6px; padding: 3px 6px; cursor: pointer; z-index: 1;
  background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c);
  color: color-mix(in srgb, var(--c) 70%, black); font-size: 12px; line-height: 1.3;
  box-shadow: 0 0 0 1px #fff;
}
.wk-ev:hover { filter: brightness(0.96); z-index: 2; }
.wk-ev b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ev span { display: block; font-size: 11px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ev.short { padding-top: 1px; display: flex; gap: 6px; align-items: center; }
.wk-ev.short b { flex: 0 1 auto; }
.wk-ev.private { font-style: italic; opacity: .85; }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--sun); z-index: 3; pointer-events: none; }
.wk-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.wk-ghost {
  position: absolute; left: 2px; right: 2px; z-index: 4; pointer-events: none; border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 22%, white); border: 1px solid var(--primary);
  color: var(--primary-600); font-size: 11px; font-weight: 700; padding: 2px 6px;
}

/* ---------- year view ---------- */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 16px; }
.ym { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface); }
.ym h4 { margin: 0 0 8px; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; }
.ym h4 small { color: var(--muted); font-weight: 600; font-size: 12px; }
.mini { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; font-size: 11px; }
.mini .h { color: var(--faint); font-weight: 700; }
.mini .d { position: relative; height: 28px; padding-top: 2px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.mini .d:hover { background: var(--surface-2); }
.mini .d.sun, .mini .d.holiday { color: var(--sun); }
.mini .d.sat { color: var(--sat); }
.mini .d.today { background: var(--primary-50); color: var(--primary); }
.mini .dots { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; justify-content: center; gap: 2px; }
.mini .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--c); }
.ym-list { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 3px; }
.ym-list li { display: flex; gap: 8px; font-size: 12px; cursor: pointer; align-items: baseline; }
.ym-list li:hover b { color: var(--primary); }
.ym-list .dd { color: var(--muted); width: 38px; flex: none; }
.ym-list b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ym-list .c { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; align-self: center; }

/* ---------- list view ---------- */
.list { padding: 4px 16px 16px; }
.list-day { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-day:last-child { border-bottom: 0; }
.list-date { font-weight: 700; }
.list-date small { display: block; color: var(--muted); font-weight: 500; }
.list-date.sun, .list-date.holiday { color: var(--sun); }
.list-date.sat { color: var(--sat); }
.list-date.today::after { content: "오늘"; display: inline-block; margin-top: 4px; font-size: 11px; background: var(--today); color: #fff; padding: 0 6px; border-radius: 4px; }
.list-items { display: flex; flex-direction: column; gap: 6px; }
.list-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.list-item:hover { background: var(--surface-2); border-color: var(--border); }
.list-item .time { color: var(--muted); font-size: 13px; font-weight: 600; }
.list-item .title { font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.list-item .title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .title i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.list-item .meta { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--c, var(--primary)) 12%, white); color: color-mix(in srgb, var(--c, var(--primary)) 75%, black); }
.foot-note { padding: 10px 16px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }

/* ---------- dialog ---------- */
.dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  background: var(--surface); color: var(--text);
}
.dialog::backdrop { background: rgba(15, 23, 42, 0.35); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.dlg-head h3 { margin: 0; font-size: 18px; flex: 1; letter-spacing: -0.01em; }
.dlg-body { padding: 10px 20px 4px; overflow: auto; max-height: calc(100vh - 200px); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px 18px; }
.dlg-foot .left { margin-right: auto; }
.detail-color { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.detail-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.detail-rows .r { display: grid; grid-template-columns: 64px 1fr; gap: 10px; }
.detail-rows .k { color: var(--muted); font-weight: 600; font-size: 13px; }
.desc { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; }
.person-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 130px; overflow: auto; padding: 8px; border: 1px solid var(--border-strong); border-radius: 10px; }
.person-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; }
.person-pick input { display: none; }
.person-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.day-list li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.day-list li:hover { background: var(--surface-2); }
.day-list .bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); }
.day-list .tm { color: var(--muted); font-size: 12px; width: 86px; flex: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: #1c2233; color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.auth-card { width: min(420px, 100%); padding: 28px; }
.auth-card h2 { margin: 0 0 4px; font-size: 22px; }
.auth-card p { margin: 0 0 20px; }
.auth-switch { text-align: center; margin-top: 14px; color: var(--muted); }

/* ---------- pages ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; flex: 1; letter-spacing: -0.02em; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.table td .input { height: 34px; }
.table-wrap { overflow-x: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-title { margin: 0 0 12px; font-size: 16px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.activity li:hover { background: var(--surface-2); }
.activity li:last-child { border-bottom: 0; }
.act-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; flex: none; font-size: 13px; }
.act-icon.create { background: #e7f7ef; color: var(--ok); }
.act-icon.update { background: var(--primary-50); color: var(--primary); }
.act-icon.delete { background: #fdeceC; color: var(--danger); }
.act-body { flex: 1; min-width: 0; }
.act-body .when { color: var(--faint); font-size: 12px; }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.annual-table td:first-child { width: 36px; text-align: center; color: var(--faint); }
.annual-table .w-date { width: 140px; }
.annual-table .w-check { width: 60px; text-align: center; }
.annual-table tr.invalid td { background: #fff6f6; }

/* ---------- fullscreen ---------- */
body.fullscreen .topbar, body.fullscreen .sidebar, body.fullscreen .main-head, body.fullscreen .hint { display: none; }
body.fullscreen .app { max-width: none; padding: 12px; }
body.fullscreen .layout { grid-template-columns: 1fr; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .topbar { gap: 12px; padding: 0 12px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .brand-text small { display: none; }
  .tabs { order: 3; flex-basis: 100%; overflow-x: auto; }
  .tabs a { padding: 6px 10px; font-size: 13px; }
  .app { padding: 12px 10px 30px; }
  .week { min-height: 86px; }
  .day { padding: 4px; }
  .hol-name { display: none; }
  .month { --lane-h: 18px; }
  .ev { font-size: 11px; padding: 0 3px; margin: 0 1px; }
  .ev .t { display: none; }
  .search { width: 100%; order: 10; }
  .toolbar h2 { font-size: 17px; min-width: 0; }
  .list-day { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 70px 1fr; }
  .list-item .meta { display: none; }
  .year-grid { grid-template-columns: 1fr; padding: 10px; }
}

/* ---------- print ---------- */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .topbar, .sidebar, .main-head, .hint, .toolbar .btn, .toolbar .seg, .search, .toast { display: none !important; }
  .app { padding: 0; max-width: none; }
  .layout { display: block; }
  .card { box-shadow: none; border-color: #ccc; }
  .week { break-inside: avoid; }
  .ev.bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
