:root {
  --ink: #1f2329;
  --ink-2: #646a73;
  --paper: #f5f6f8;
  --paper-deep: #e9ebef;
  --cream: #ffffff;
  --red: #3370ff;
  --red-dark: #245bdb;
  --green: #00a870;
  --mint: #e8f7f1;
  --gold: #f5a623;
  --line: #e5e7eb;
  --shadow: 0 8px 24px rgba(31, 35, 41, 0.08);
  --display: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --serif: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --body: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button, label, .task-card { -webkit-tap-highlight-color: transparent; }

.paper-grain {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: flex;
  gap: 3px;
  align-items: end;
  justify-content: center;
  padding-bottom: 8px;
  border-radius: 10px;
  background: var(--red);
  box-shadow: none;
}
.brand-mark span { display: block; width: 4px; border-radius: 4px; background: var(--paper); transform: rotate(27deg); }
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 20px; }
.brand-mark span:nth-child(3) { height: 15px; }
.brand-copy { min-width: 0; }
.brand-copy h1 { margin: 0; overflow: hidden; font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { margin: 0; color: var(--ink-2); font-family: var(--body); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.icon-button, .close-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.icon-button { width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.icon-button svg { fill: none; stroke: currentColor; stroke-width: 1.8; }

main { width: min(100%, 760px); margin: 0 auto; padding: 14px 14px 120px; }
.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: center;
  min-height: 116px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31,35,41,.04);
}
.hero-panel::before { display: none; }
.hero-kicker { margin: 0; color: var(--ink); font-family: var(--body); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.hero-score { position: relative; width: 92px; height: 92px; z-index: 1; }
.hero-score svg { width: 100%; transform: rotate(-90deg); }
.hero-score circle { fill: none; stroke-width: 6; }
.score-track { stroke: rgba(22,51,45,.1); }
.score-progress { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 302; stroke-dashoffset: 302; transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); }
.hero-score div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hero-score strong { display: block; font-family: var(--body); font-size: 21px; }
.hero-score span { color: var(--ink-2); font-size: 10px; }

.alert-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 10px 0 18px;
  padding: 12px 14px;
  border: 1px solid #d6e2ff;
  border-radius: 12px;
  background: #f2f6ff;
}
.alert-strip > div:nth-child(2) { min-width: 0; }
.alert-strip.is-clear { border-color: #ccecdf; background: #f0faf6; }
.alert-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: white; background: var(--red); font-family: var(--body); font-weight: 700; }
.alert-strip.is-clear .alert-icon { background: var(--green); }
.alert-strip strong, .alert-strip span { display: block; }
.alert-strip strong { font-size: 13px; }
.alert-strip span { margin-top: 2px; color: var(--ink-2); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.alert-strip button { border: 0; color: var(--red); background: transparent; font-weight: 700; cursor: pointer; }

.tabbar { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 13px 4px; border: 0; color: rgba(22,51,45,.55); background: transparent; font-weight: 700; cursor: pointer; }
.tab span { display: inline-grid; min-width: 18px; height: 18px; place-items: center; border-radius: 10px; color: white; background: var(--red); font-size: 10px; }
.tab::after { content: ''; position: absolute; left: 28%; right: 28%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); transform: scaleX(0); transition: transform .25s; }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { transform: scaleX(1); }
.tab-panel { display: none; animation: reveal .35s both; }
.tab-panel.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(31,35,41,.04);
}
.action-card input { display: none; }
.action-card strong, .action-card small { display: block; }
.action-card strong { font-family: var(--body); font-size: 13px; }
.action-card small { margin-top: 4px; color: var(--ink-2); font-size: 10px; }
.action-icon { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 10px; color: var(--cream); background: #4e5969; font-size: 25px; line-height: 1; }
.action-icon.accent { background: var(--red); }
.action-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.week-calendar { margin-top: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(31,35,41,.04); }
.week-toolbar { display: grid; grid-template-columns: 30px 1fr auto 30px; align-items: center; gap: 8px; margin-bottom: 11px; }
.week-toolbar p, .week-toolbar strong { margin: 0; display: block; }
.week-toolbar p { color: var(--ink-2); font-size: 9px; }
.week-toolbar strong { margin-top: 2px; font-size: 12px; }
.week-arrow { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.week-filter-button { padding: 6px 8px; border: 0; border-radius: 7px; color: var(--ink-2); background: #f1f2f4; font-size: 9px; font-weight: 700; cursor: pointer; }
.week-filter-button.is-active { color: var(--red-dark); background: #edf3ff; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.week-day { position: relative; display: grid; justify-items: center; gap: 3px; min-width: 0; min-height: 67px; padding: 7px 2px 5px; border: 1px solid transparent; border-radius: 10px; color: var(--ink-2); background: #f7f8fa; cursor: pointer; }
.week-day span { font-size: 9px; white-space: nowrap; }
.week-day strong { color: var(--ink); font-size: 15px; line-height: 1; }
.week-day em { display: grid; min-width: 17px; height: 17px; padding: 0 4px; place-items: center; border-radius: 9px; color: var(--ink-2); background: #e9ebef; font-size: 8px; font-style: normal; }
.week-day.is-past { opacity: .42; }
.week-day.is-today { border-style: dashed; border-color: #b8bdc7; }
.week-day.is-tomorrow { color: var(--red-dark); background: #edf3ff; }
.week-day.is-tomorrow strong { color: var(--red-dark); }
.week-day.is-tomorrow em { color: #fff; background: var(--red); }
.week-day.is-active { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); opacity: 1; }

.section-block { margin-top: 28px; }
.section-heading, .month-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 3px 14px; }
.section-heading.compact { align-items: center; }
.section-heading > div, .month-header > div { min-width: 0; }
.section-heading h3, .month-header h3 { margin: 2px 0 0; font-family: var(--body); font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.text-button { padding: 8px 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.text-button.danger { color: var(--red); }
.muted { color: var(--ink-2); font-size: 11px; }

.selected-person { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); background: var(--mint); font-size: 12px; }
.selected-person button { float: right; border: 0; color: var(--green); background: transparent; font-weight: 800; }
.task-list { display: grid; gap: 10px; }
.task-period-group { display: grid; gap: 8px; }
.period-heading { display: flex; align-items: center; gap: 7px; width: fit-content; padding: 5px 9px; border-radius: 8px; font-size: 11px; }
.period-heading span { opacity: .7; }
.task-period-group.is-morning .period-heading { color: #9a5b00; background: #fff4df; }
.task-period-group.is-afternoon .period-heading { color: #245bdb; background: #edf3ff; }
.task-period-list { display: grid; gap: 10px; }
.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31,35,41,.04);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.task-card.is-complete { border-left-color: var(--green); }
.task-card.is-target { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 13px 32px rgba(160,111,24,.16); }
.task-time { text-align: center; border-right: 1px dashed var(--line); }
.task-time strong { display: block; font-family: var(--body); font-size: 15px; }
.task-time span { color: var(--ink-2); font-size: 10px; }
.task-main { min-width: 0; }
.task-main h4 { margin: 0; overflow: hidden; font-family: var(--body); font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.task-location { margin: 5px 0 8px; color: var(--ink-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 8px; }
.task-meta span { padding: 3px 6px; border-radius: 6px 2px 6px 2px; color: var(--ink-2); background: rgba(22,51,45,.06); font-size: 9px; }
.task-meta .content-tag { color: #245d71; background: #d8e9ed; }
.task-meta .contact-tag { color: #7c5721; background: #f1e4c5; }
.task-meta .request-tag { color: #8e3729; background: #f4dcd3; }
.task-meta .payroll-tag { color: #4c527f; background: #e2e2f1; }
.assignments { display: flex; flex-wrap: wrap; gap: 5px; }
.assignment-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 0; border-radius: 8px; color: var(--green); background: var(--mint); font-size: 10px; font-weight: 700; cursor: pointer; }
.assignment-pill span { font-size: 13px; opacity: .7; }
.slot-pill { padding: 4px 7px; border: 1px dashed rgba(214,83,60,.4); border-radius: 8px; color: var(--red); background: transparent; font-size: 10px; cursor: pointer; }
.task-actions { display: grid; gap: 6px; flex-shrink: 0; }
.task-actions button { width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 50%; color: var(--ink-2); background: rgba(22,51,45,.06); cursor: pointer; }
.task-actions svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.conflict-note { grid-column: 2 / -1; margin-top: -4px; color: var(--red); font-size: 10px; font-weight: 700; }

.empty-state { padding: 44px 20px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; }
.empty-state h4 { margin: 14px 0 5px; font-family: var(--serif); }
.empty-state p { margin: 0; color: var(--ink-2); font-size: 12px; }
.empty-illustration { height: 42px; display: flex; align-items: end; justify-content: center; gap: 7px; }
.empty-illustration span { display: block; width: 10px; border-radius: 7px 7px 2px 2px; background: var(--mint); }
.empty-illustration span:nth-child(1) { height: 24px; }.empty-illustration span:nth-child(2) { height: 40px; background: var(--red); }.empty-illustration span:nth-child(3) { height: 30px; }

.roster-block { padding-bottom: 24px; }
.person-pool { display: grid; gap: 14px; min-height: 50px; }
.roster-group { display: grid; gap: 8px; }
.roster-group-heading, .quick-person-heading { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); }
.roster-group-heading strong, .quick-person-heading strong { color: var(--ink); font-size: 10px; letter-spacing: .08em; }
.roster-group-heading span, .quick-person-heading span { font-size: 9px; }
.roster-group-list { display: flex; flex-wrap: wrap; gap: 8px; }
.roster-group.is-reserve { padding-top: 12px; border-top: 1px dashed var(--line); }
.roster-group.is-reserve .person-chip { background: #fbfaf6; }
.person-chip { display: inline-flex; min-width: 0; align-items: center; gap: 7px; padding: 8px 9px 8px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: grab; }
.person-chip.is-selected { color: white; border-color: var(--green); background: var(--green); box-shadow: 0 0 0 3px rgba(28,107,87,.13); }
.person-avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-family: var(--serif); font-size: 11px; }
.person-chip.is-selected .person-avatar { color: var(--green); background: var(--cream); }
.person-chip-copy { display: grid; min-width: 0; }
.person-chip strong { font-size: 11px; }
.person-chip small { color: var(--red); font-size: 9px; }
.person-chip.is-selected small { color: var(--mint); }
.person-chip em, .quick-person-option em { margin-left: auto; padding: 3px 6px; border-radius: 6px; font-size: 9px; font-style: normal; white-space: nowrap; }
.person-chip.is-free em, .quick-person-option.is-free em { color: #4e5969; background: #f1f2f4; }
.person-chip.is-morning em, .quick-person-option.is-morning em { color: #9a5b00; background: #fff1d6; }
.person-chip.is-afternoon em, .quick-person-option.is-afternoon em { color: #245bdb; background: #e7efff; }
.person-chip.is-full em, .quick-person-option.is-full em { color: #6b3fb3; background: #efe6ff; }

.publish-dock {
  position: static;
  z-index: 7;
  width: 100%;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px 11px 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: white;
  background: rgba(16,45,39,.94);
  box-shadow: 0 20px 44px rgba(10,31,26,.28);
  backdrop-filter: blur(14px);
}
.publish-dock span, .publish-dock strong { display: block; }
.publish-dock span { color: var(--mint); font-size: 9px; letter-spacing: .12em; }
.publish-dock strong { font-family: var(--serif); font-size: 17px; }
.publish-dock button, .primary-button { border: 0; border-radius: 10px; color: white; background: var(--red); font-weight: 700; cursor: pointer; }
.publish-dock button { padding: 12px 18px; }
.publish-dock button:disabled { opacity: .45; cursor: not-allowed; }

.month-header { margin-top: 14px; }
.month-controls { display: flex; gap: 5px; }
.month-controls button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; }
.metrics-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 24px 0; }
.metrics-row article { min-width: 0; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.metrics-row span, .metrics-row strong { display: block; }
.metrics-row span { color: var(--ink-2); font-size: 10px; }
.metrics-row strong { margin-top: 5px; font-family: var(--body); font-size: 23px; }
.legend { color: var(--ink-2); font-size: 10px; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: var(--red); }
.stats-list { display: grid; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stat-row { display: grid; grid-template-columns: 34px 54px 1fr 28px; align-items: center; gap: 8px; }
.stat-rank { color: var(--ink-2); font-family: var(--body); font-size: 12px; }
.stat-name { font-size: 12px; font-weight: 800; }
.stat-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--paper-deep); }
.stat-fill { height: 100%; min-width: 3px; border-radius: inherit; background: var(--green); transition: width .5s; }
.stat-row:first-child .stat-fill { background: var(--red); }
.stat-count { font-family: var(--body); font-weight: 700; text-align: right; }
.insight-card { display: flex; gap: 12px; margin-top: 16px; padding: 17px; border: 1px solid #d6e2ff; border-radius: 14px; background: #f2f6ff; }
.insight-spark { color: var(--gold); font-size: 25px; }
.insight-card strong { font-family: var(--serif); font-size: 13px; }
.insight-card p { margin: 4px 0 0; color: var(--ink-2); font-size: 11px; line-height: 1.7; }

.history-list { display: grid; gap: 10px; }
.history-card { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 15px; border-bottom: 1px solid var(--line); }
.history-date { font-family: var(--body); font-size: 13px; text-align: center; }
.history-date strong { display: block; font-size: 23px; }
.history-card h4 { margin: 0; font-family: var(--body); font-size: 14px; }
.history-card p { margin: 5px 0; color: var(--ink-2); font-size: 11px; }
.history-people { color: var(--green); font-size: 11px; font-weight: 800; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(9,26,22,.55); backdrop-filter: blur(4px); }
.sheet-dialog, .notice-dialog {
  width: min(calc(100% - 20px), 520px);
  max-height: 88vh;
  margin: auto auto 0;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.sheet-dialog[open], .notice-dialog[open] { animation: sheetUp .28s ease-out both; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0; } }
.sheet-dialog form, .notice-dialog { padding: 10px 18px max(24px, env(safe-area-inset-bottom)); }
.dialog-handle { width: 44px; height: 4px; margin: 2px auto 18px; border-radius: 99px; background: rgba(22,51,45,.18); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dialog-heading > div { min-width: 0; }
.dialog-heading h3 { margin: 2px 0 0; font-family: var(--body); font-size: 20px; font-weight: 650; }
.close-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; font-size: 25px; line-height: 1; }
.sheet-dialog label { display: block; margin: 13px 0; }
.sheet-dialog label > span { display: block; margin: 0 0 6px; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.sheet-dialog input, .sheet-dialog textarea, .notice-dialog textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: rgba(255,252,243,.82);
}
.sheet-dialog input:focus, .sheet-dialog textarea:focus, .notice-dialog textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(28,107,87,.1); }
.field-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.primary-button { width: 100%; min-height: 48px; margin-top: 12px; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: end; }
.dialog-actions .primary-button { min-width: 0; }
.secondary-button { min-height: 48px; padding: 0 14px; border: 1px solid rgba(214,83,60,.3); border-radius: 12px 4px 12px 4px; color: var(--red); background: transparent; font-weight: 800; cursor: pointer; }
.secondary-button[hidden] { display: none; }
.dialog-help { margin: -7px 0 12px; color: var(--ink-2); font-size: 11px; line-height: 1.7; }
.import-preview { max-height: 48vh; overflow: auto; display: grid; gap: 7px; }
.preview-row { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,252,243,.75); }
.preview-row strong, .preview-row span { display: block; }
.preview-row strong { font-family: var(--body); font-size: 12px; }
.preview-row span { margin-top: 3px; color: var(--ink-2); font-size: 10px; }
.import-status { display: inline-block; margin-left: 6px; padding: 2px 5px; border-radius: 5px; font-size: 9px; font-style: normal; font-weight: 600; }
.import-status.is-new { color: #087d55; background: #e5f7ef; }
.import-status.is-update { color: #245bdb; background: #e7efff; }
.empty-state.compact { padding: 24px 16px; }
.assign-dialog-body { padding: 10px 18px max(24px, env(safe-area-inset-bottom)); }
.availability-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.availability-legend span { padding: 4px 7px; border-radius: 6px; font-size: 9px; }
.availability-legend .is-free { color: #4e5969; background: #f1f2f4; }
.availability-legend .is-morning { color: #9a5b00; background: #fff1d6; }
.availability-legend .is-afternoon { color: #245bdb; background: #e7efff; }
.availability-legend .is-full { color: #6b3fb3; background: #efe6ff; }
.quick-person-list { display: grid; gap: 14px; }
.quick-person-group { display: grid; gap: 8px; }
.quick-person-group.is-reserve { padding-top: 12px; border-top: 1px dashed var(--line); }
.quick-person-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-person-option { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.quick-person-option strong, .quick-person-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-person-option strong { font-size: 11px; }
.quick-person-option small { margin-top: 2px; color: var(--ink-2); font-size: 9px; }
.quick-person-option.is-conflict { border-color: #f2c7c7; background: #fff5f5; }
.quick-person-option.is-conflict em { color: #c0362c; background: #ffe1df; }
.quick-person-option.is-assigned { border-color: #b9e5d5; background: #f2fbf7; }
.quick-person-option.is-assigned em { color: #087d55; background: #dff5eb; }
.quick-person-option:disabled { cursor: not-allowed; opacity: .72; }
.notice-dialog { margin: auto; border-radius: 16px; padding: 20px; }
.notice-dialog textarea { min-height: 300px; line-height: 1.7; resize: vertical; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 90px; padding: 10px 16px; border-radius: 99px; color: white; background: rgba(16,45,39,.94); font-size: 12px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 720px) {
  .topbar { max-width: 900px; margin: 0 auto; border-inline: 1px solid rgba(22,51,45,.06); }
  .sheet-dialog, .notice-dialog { margin: auto; border-radius: 16px; }
  .task-period-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .task-card { grid-template-columns: 64px 1fr auto; }
  .hero-panel { padding-inline: 30px; }
}

@media (max-width: 560px) {
  .task-card {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "time main"
      "time actions"
      "conflict conflict";
    align-items: start;
  }
  .task-time { grid-area: time; align-self: stretch; padding-top: 2px; }
  .task-main { grid-area: main; }
  .task-actions { grid-area: actions; display: flex; justify-content: flex-end; margin-top: 4px; }
  .conflict-note { grid-area: conflict; margin: 2px 0 0; }
}

@media (max-width: 400px) {
  .topbar { gap: 9px; padding-inline: 12px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-copy h1 { font-size: 17px; }
  .icon-button { width: 36px; height: 36px; }
  main { padding-inline: 10px; }
  .hero-panel { grid-template-columns: minmax(0, 1fr) 78px; min-height: 102px; padding: 14px; }
  .hero-score { width: 74px; height: 74px; }
  .hero-score strong { font-size: 18px; }
  .alert-strip { grid-template-columns: auto minmax(0, 1fr); gap: 9px; }
  .alert-strip button { grid-column: 2; justify-self: start; padding: 3px 0; }
  .action-card { min-width: 0; min-height: 104px; padding: 11px; flex-direction: column; align-items: flex-start; justify-content: space-between; }
  .action-card > span:last-child { min-width: 0; }
  .action-card strong, .action-card small { overflow-wrap: anywhere; }
  .action-icon { flex: 0 0 34px; width: 34px; height: 34px; }
  .section-heading, .month-header { gap: 10px; }
  .section-heading h3, .month-header h3 { font-size: 17px; }
  .text-button { flex: 0 0 auto; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .metrics-row { gap: 6px; }
  .metrics-row article { padding: 12px 8px; }
  .metrics-row span { font-size: 9px; white-space: nowrap; }
  .metrics-row strong { font-size: 20px; }
  .publish-dock { width: 100%; padding-left: 14px; }
  .publish-dock button { padding: 11px 14px; }
  .quick-person-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
