:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --ink: #1b1c1b;
  --muted: #6d716e;
  --line: #d8dfd9;
  --panel: #fbfcfa;
  --panel-strong: #ffffff;
  --mint: #2f8f76;
  --mint-soft: #dff3ec;
  --coral: #db6d55;
  --gold: #bf8b23;
  --shadow: 0 22px 70px rgba(28, 28, 24, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(145deg, #ffffff, var(--bg));
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, var(--bg));
}

.auth-screen[hidden] {
  display: none !important;
}

.auth-panel {
  display: grid;
  gap: 16px;
  width: min(460px, calc(100vw - 36px));
  padding: 26px;
  border: 1px solid rgba(217, 211, 200, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-panel.is-signup {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form[hidden],
.signup-panel[hidden],
.backend-setup[hidden] {
  display: none !important;
}

.auth-panel h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.4rem, 11vw, 4.2rem);
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.link-button {
  position: relative;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--mint);
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 800;
}

.link-button:hover {
  background: rgba(47, 143, 118, 0.08);
}

.signup-panel {
  display: grid;
  gap: 18px;
}

.signup-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.signup-head-actions {
  display: grid;
  gap: 8px;
  min-width: 104px;
}

.setup-wizard {
  display: grid;
  gap: 14px;
}

.setup-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(217, 211, 200, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.035), rgba(47, 143, 118, 0.035)),
    rgba(255, 255, 255, 0.76);
}

.setup-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.setup-card-head h2 {
  margin-bottom: 4px;
}

.setup-card-head p,
.setup-note,
.setup-success {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.setup-note[data-tone="ok"],
.setup-success {
  color: #2f6f61;
}

.setup-note[data-tone="error"] {
  color: var(--coral);
}

.setup-step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.setup-backend-form,
.signup-form {
  gap: 12px;
}

.setup-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.signup-password-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.setup-checklist {
  display: grid;
  gap: 8px;
}

.setup-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(217, 211, 200, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.setup-check-item strong,
.setup-check-item span {
  display: block;
}

.setup-check-item strong {
  font-size: 0.88rem;
}

.setup-check-item span:not(.setup-check-dot) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
}

.setup-check-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 5px rgba(109, 113, 110, 0.08);
}

.setup-check-item.is-ok .setup-check-dot {
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(47, 143, 118, 0.12);
}

.setup-check-item.is-warning .setup-check-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(191, 139, 35, 0.12);
}

.setup-check-item.is-error .setup-check-dot {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(219, 109, 85, 0.12);
}

.backend-setup {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.backend-setup summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
}

.backend-setup summary::-webkit-details-marker {
  display: none;
}

.backend-setup summary span:last-child {
  color: var(--ink);
}

.backend-config-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.backend-config-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.auth-error {
  min-height: 1.25em;
  margin: 0;
  color: var(--coral);
  font-size: 0.88rem;
}

.toast-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 143, 118, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(28, 28, 24, 0.14);
  color: var(--ink);
  animation: toast-pop 260ms ease-out both;
  backdrop-filter: blur(18px);
}

.toast::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 7px rgba(47, 143, 118, 0.1);
}

.toast.is-leaving {
  animation: toast-leave 220ms ease-in forwards;
}

.feedback-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.feedback-ripple {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(47, 143, 118, 0.52);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: feedback-ripple 950ms ease-out forwards;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0;
  transition: width 180ms ease;
}

body[data-page="tracker"] .shell {
  width: min(980px, calc(100vw - 32px));
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.eyebrow,
.activity-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-line .eyebrow {
  margin-bottom: 0;
}

.version-pill,
.guide-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(47, 143, 118, 0.24);
  border-radius: 999px;
  background: rgba(223, 243, 236, 0.7);
  color: #2f6f61;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.guide-pill {
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
}

.version-pill:hover,
.guide-pill:hover {
  border-color: rgba(47, 143, 118, 0.44);
  background: rgba(223, 243, 236, 0.96);
  color: var(--mint);
  transform: translateY(-1px);
}

.version-pill:focus-visible,
.guide-pill:focus-visible {
  outline: 3px solid rgba(47, 143, 118, 0.22);
  outline-offset: 2px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 20ch;
  font-size: clamp(2rem, 4.8vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 1.1rem;
  line-height: 1.2;
}

.status-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-actions[hidden] {
  display: none !important;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(191, 139, 35, 0.26);
  animation: breathe 1.8s infinite;
}

.status-pill[data-state="ok"] .status-dot {
  background: var(--mint);
  box-shadow: 0 0 0 7px rgba(47, 143, 118, 0.12);
  animation: none;
}

.status-pill[data-state="error"] .status-dot {
  background: var(--coral);
  box-shadow: 0 0 0 7px rgba(219, 109, 85, 0.12);
  animation: none;
}

.page-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: min(820px, 100%);
  margin-top: 30px;
}

.page-view {
  display: none;
}

.page-view.is-active {
  display: block;
}

#trackerPage,
#calendarPage,
#plannerPage,
#subjectsPage {
  margin-top: 24px;
}

.workspace {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.mode-rail {
  display: grid;
  align-content: start;
  gap: 10px;
}

.page-button,
.mode-button,
.table-mode-button,
.quick-mode-button,
.ghost-button,
.file-button,
.submit-button {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.page-button:hover,
.mode-button:hover,
.table-mode-button:hover,
.quick-mode-button:hover,
.file-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 118, 0.42);
  box-shadow: 0 8px 28px rgba(28, 28, 24, 0.08);
}

.page-button.is-active,
.mode-button.is-active,
.table-mode-button.is-active,
.quick-mode-button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.panel {
  display: none;
  min-height: 520px;
  padding: 24px;
  border: 1px solid rgba(217, 211, 200, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.mini-count {
  color: var(--muted);
  font-size: 0.9rem;
}

form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#taskPanel .field-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#eventPanel .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-capture-field {
  padding: 12px;
  border: 1px solid rgba(217, 211, 200, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.045), rgba(47, 143, 118, 0.045)),
    var(--panel);
}

.quick-capture-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quick-capture-feedback {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

textarea {
  min-height: 118px;
  padding-top: 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 143, 118, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 143, 118, 0.12);
}

.custom-select,
.date-picker {
  position: relative;
  min-width: 0;
}

.custom-select.is-open,
.date-picker.is-open {
  z-index: 90;
}

.select-input-wrap {
  position: relative;
}

.select-trigger,
.date-text {
  position: relative;
  display: block;
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 0 14px;
  padding-right: 38px;
  text-align: left;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.select-trigger {
  cursor: text;
}

.date-text {
  cursor: text;
}

.select-trigger:hover,
.date-text:hover {
  border-color: rgba(47, 143, 118, 0.42);
}

.date-picker.is-parsed .date-text {
  border-color: rgba(47, 143, 118, 0.46);
  background: linear-gradient(0deg, rgba(47, 143, 118, 0.06), rgba(47, 143, 118, 0.06)),
    var(--panel-strong);
}

.date-picker.is-unresolved .date-text {
  border-color: rgba(219, 109, 85, 0.72);
  box-shadow: 0 0 0 4px rgba(219, 109, 85, 0.11);
}

.select-trigger:focus-visible,
.date-text:focus-visible,
.select-option:focus-visible,
.calendar-day:focus-visible,
.calendar-nav:focus-visible,
.calendar-apply:focus-visible,
.time-step:focus-visible {
  outline: none;
  border-color: rgba(47, 143, 118, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 143, 118, 0.12);
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 150ms ease;
}

.custom-select.is-open .select-chevron {
  transform: translateY(-20%) rotate(225deg);
}

.select-menu,
.date-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 90;
  border: 1px solid rgba(217, 211, 200, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 54px rgba(28, 28, 24, 0.16);
  backdrop-filter: blur(18px);
}

.select-menu[hidden],
.date-popover[hidden] {
  display: none !important;
}

.select-menu {
  display: grid;
  width: max(100%, 220px);
  max-width: calc(100vw - 48px);
  min-width: 168px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}

.field-row > .field:last-child .select-menu {
  right: 0;
  left: auto;
}

.select-option {
  position: relative;
  display: block;
  min-height: 40px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  text-align: left;
}

.select-option[hidden] {
  display: none !important;
}

.select-option:hover,
.select-option.is-selected,
.select-option.is-highlighted {
  background: var(--mint-soft);
}

.select-option.is-highlighted {
  box-shadow: inset 0 0 0 1px rgba(47, 143, 118, 0.18);
}

.select-option[data-status-option],
.select-option[data-subject-option] {
  padding-left: 30px;
}

.select-option[data-status-option]::before,
.select-option[data-subject-option]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--subject-bg, var(--status-bg));
  box-shadow: 0 0 0 2px rgba(27, 28, 27, 0.05);
  transform: translateY(-50%);
}

.date-popover {
  width: min(324px, calc(100vw - 48px));
  padding: 12px;
}

.calendar-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-title {
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.calendar-nav,
.calendar-day,
.calendar-apply,
.time-step {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.calendar-nav,
.time-step {
  width: 36px;
  height: 36px;
  font-weight: 800;
}

.calendar-nav:hover,
.time-step:hover {
  background: var(--mint-soft);
}

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

.calendar-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  min-width: 0;
  font-size: 0.88rem;
}

.calendar-day:hover {
  background: var(--mint-soft);
}

.calendar-day.is-muted {
  color: #a7aaa5;
}

.calendar-day.is-today {
  border-color: rgba(47, 143, 118, 0.34);
}

.calendar-day.is-selected {
  background: var(--ink);
  color: #ffffff;
}

.time-row {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.time-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.time-input {
  width: 2.4ch;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  text-align: center;
  box-shadow: none;
}

.time-input:focus {
  box-shadow: none;
}

.calendar-apply {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  background: var(--mint);
  color: white;
  font-weight: 800;
}

.calendar-apply:hover {
  box-shadow: 0 10px 24px rgba(47, 143, 118, 0.18);
}

.actions {
  display: grid;
  padding-top: 4px;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  border-color: var(--mint);
  background: var(--mint);
  color: white;
  font-weight: 700;
  letter-spacing: 0;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(47, 143, 118, 0.22);
}

.submit-button.is-processing {
  border-color: #9d9f9b;
  background: #9d9f9b;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  transform: none;
}

.danger-submit {
  border-color: var(--coral);
  background: var(--coral);
}

.danger-submit:hover {
  box-shadow: 0 14px 32px rgba(219, 109, 85, 0.22);
}

.submit-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.submit-button.is-processing:disabled {
  opacity: 1;
}

.ghost-button {
  padding: 0 16px;
}

.dashboard-panel {
  margin-top: 18px;
  min-height: min(680px, calc(100vh - 230px));
  padding: clamp(28px, 4vw, 44px);
}

.dashboard-grid {
  display: grid;
  gap: 22px;
}

.dashboard-section {
  min-width: 0;
}

.dashboard-upcoming-row {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.dashboard-block {
  min-height: 100%;
  overflow: visible;
  padding: 14px;
  border: 1px solid rgba(217, 211, 200, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

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

.dashboard-section-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.dashboard-overdue-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-overdue-bar[hidden] {
  display: none !important;
}

.dashboard-overdue-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  border: 1px solid rgba(219, 109, 85, 0.46);
  border-radius: 8px;
  background: rgba(219, 109, 85, 0.1);
  color: #a83f2a;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 850;
}

.dashboard-list {
  display: grid;
  gap: 10px;
  overflow: visible;
}

.dashboard-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.dashboard-task-item {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.dashboard-item.is-overdue {
  border-color: rgba(219, 109, 85, 0.42);
  background: linear-gradient(0deg, rgba(219, 109, 85, 0.08), rgba(219, 109, 85, 0.08)),
    var(--panel-strong);
}

.dashboard-item.is-overdue .dashboard-item-main span {
  color: #a83f2a;
}

.dashboard-item.is-completed {
  background: linear-gradient(0deg, rgba(47, 143, 118, 0.045), rgba(47, 143, 118, 0.045)),
    var(--panel-strong);
}

.dashboard-item.is-completing {
  pointer-events: none;
  animation: task-complete-out 260ms ease-in forwards;
}

.dashboard-item.is-completing-gleam {
  position: relative;
  overflow: hidden;
}

.dashboard-item.is-editing {
  display: block;
  z-index: 70;
  padding: 16px;
}

.dashboard-check {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  width: 22px;
  height: 22px;
}

.dashboard-check input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.dashboard-check span {
  position: relative;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(112, 119, 111, 0.56);
  border-radius: 5px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.dashboard-check input:hover + span,
.dashboard-check input:focus-visible + span {
  border-color: rgba(47, 143, 118, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 143, 118, 0.1);
}

.dashboard-check input:checked + span {
  border-color: var(--mint);
  background: var(--mint);
  transform: scale(0.92);
}

.dashboard-check input:checked + span::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 4px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translate(5px, 5px) rotate(-45deg);
}

.dashboard-item-main {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dashboard-item-main strong,
.dashboard-item-main span {
  overflow-wrap: anywhere;
}

.dashboard-item-main span {
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-item-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-inline-editor {
  animation: table-panel-in 180ms ease-out both;
}

.dashboard-item .completed-task-copy > strong,
.dashboard-item .completed-task-copy > span {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.88rem;
}

.calendar-panel {
  position: relative;
  min-height: min(780px, calc(100vh - 230px));
  padding: clamp(22px, 4vw, 42px);
}

.calendar-panel-head {
  align-items: flex-start;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.calendar-month-title {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid rgba(217, 211, 200, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.035), rgba(47, 143, 118, 0.035)),
    rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 900;
}

.calendar-nav-button,
.calendar-now-button {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.calendar-now-button {
  min-width: 82px;
  padding: 0 14px;
}

.calendar-nav-button:hover,
.calendar-now-button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 118, 0.42);
  background: rgba(47, 143, 118, 0.08);
  box-shadow: 0 8px 28px rgba(28, 28, 24, 0.08);
}

.calendar-shell {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(217, 211, 200, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.calendar-month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 243, 0.68);
}

.calendar-month-weekdays span {
  padding: 11px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-month-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 620px;
  background: var(--line);
  gap: 1px;
}

.calendar-month-grid.is-turning {
  animation: table-panel-in 180ms ease-out both;
}

.calendar-month-grid.is-loading {
  opacity: 0.72;
}

.calendar-month-day {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 104px;
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    outline-color 150ms ease;
}

.calendar-month-day.is-muted {
  background: rgba(248, 249, 247, 0.62);
}

.calendar-month-day.is-today {
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.075), rgba(47, 143, 118, 0.075)),
    rgba(255, 255, 255, 0.94);
}

.calendar-month-day.is-drop-target {
  outline: 2px solid rgba(47, 143, 118, 0.62);
  outline-offset: -3px;
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.12), rgba(47, 143, 118, 0.12)),
    rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 118, 0.28);
}

.calendar-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-month-day.is-muted .calendar-day-head {
  color: rgba(109, 113, 110, 0.72);
}

.calendar-today-dot {
  display: inline-grid;
  min-height: 20px;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 900;
}

.calendar-day-items {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding-top: 7px;
}

.calendar-month-day.has-span-event .calendar-day-items {
  padding-top: var(--span-offset, 35px);
}

.calendar-chip,
.calendar-span-chip,
.calendar-more-button,
.calendar-more-item {
  position: relative;
  overflow: hidden;
}

.calendar-chip,
.calendar-span-chip {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 26px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 7px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  padding: 0 7px;
  text-align: left;
  box-shadow: 0 7px 16px rgba(28, 28, 24, 0.08);
  transition:
    transform 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease;
}

.calendar-span-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.calendar-span-chip {
  position: absolute;
  z-index: 4;
  pointer-events: auto;
  height: 26px;
}

.calendar-span-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

body.is-calendar-dragging .calendar-span-layer {
  pointer-events: none;
}

.calendar-event-chip {
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)),
    var(--chip-bg);
}

.calendar-chip:hover,
.calendar-chip:focus-visible,
.calendar-span-chip:hover,
.calendar-span-chip:focus-visible {
  z-index: 2;
  transform: translateY(-1px) scale(1.015);
  filter: saturate(1.08);
  box-shadow: 0 12px 28px rgba(28, 28, 24, 0.13);
}

.calendar-chip.is-dragging,
.calendar-span-chip.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.calendar-chip-kind {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.7;
}

.calendar-event-chip .calendar-chip-kind {
  height: 14px;
  border-radius: 999px;
}

.calendar-chip-main {
  min-width: 0;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-chip-sub {
  min-width: 0;
  overflow: hidden;
  opacity: 0.82;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-more-button {
  min-height: 25px;
  border: 1px dashed rgba(109, 113, 110, 0.32);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: left;
  padding: 0 8px;
}

.calendar-more-button:hover {
  border-color: rgba(47, 143, 118, 0.36);
  background: rgba(47, 143, 118, 0.08);
  color: var(--ink);
}

.calendar-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 300px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

.calendar-popup-layer {
  position: fixed;
  inset: 0;
  z-index: 74;
  pointer-events: none;
}

.calendar-popup {
  position: fixed;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 70px rgba(28, 28, 24, 0.18);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(7px) scale(0.985);
  backdrop-filter: blur(18px);
}

.calendar-popup.is-open {
  animation: context-menu-in 150ms ease-out both;
}

.calendar-popup.is-editing {
  width: min(560px, calc(100vw - 24px));
}

.calendar-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.calendar-popup-body {
  display: grid;
  gap: 13px;
}

.calendar-popup-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.calendar-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.calendar-detail-grid div,
.calendar-notes {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(217, 211, 200, 0.78);
  border-radius: 8px;
  background: rgba(244, 246, 243, 0.56);
}

.calendar-detail-grid dt,
.calendar-notes span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-detail-grid dd,
.calendar-notes p {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.calendar-popup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.calendar-edit-button,
.calendar-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.compose-icon,
.trash-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
}

.compose-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 10px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transform: rotate(-38deg);
}

.compose-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(-38deg);
}

.trash-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 8px;
  height: 8px;
  border: 1.6px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.trash-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 10px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 3px -2px 0 -1px currentColor;
}

.calendar-more-list {
  display: grid;
  gap: 7px;
}

.calendar-more-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(217, 211, 200, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.calendar-more-item:hover {
  border-color: rgba(47, 143, 118, 0.34);
  background: rgba(47, 143, 118, 0.08);
}

.calendar-more-item .calendar-chip-kind {
  color: var(--chip-bg);
}

.calendar-more-item strong,
.calendar-more-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-more-item strong {
  font-size: 0.84rem;
}

.calendar-more-item small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.tracker-panel {
  min-height: min(720px, calc(100vh - 230px));
  padding: clamp(40px, 5vw, 64px);
}

.planner-panel {
  min-height: min(720px, calc(100vh - 230px));
  padding: clamp(28px, 4vw, 44px);
}

.project-mode-tabs {
  margin-bottom: 26px;
}

.project-panel {
  display: none;
}

.project-panel.is-active {
  display: block;
  animation: table-panel-in 220ms ease-out both;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-list-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.project-select-field {
  width: min(360px, 100%);
}

.project-add-task {
  width: auto;
  min-width: 132px;
  min-height: 48px;
  padding: 0 18px;
}

.project-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(217, 211, 200, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 34px rgba(28, 28, 24, 0.06);
  animation: table-row-in 220ms ease-out both;
}

.project-card.is-completing {
  pointer-events: none;
  animation: task-complete-out 260ms ease-in forwards;
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.icon-button:hover {
  border-color: rgba(47, 143, 118, 0.36);
  background: rgba(47, 143, 118, 0.08);
  color: var(--ink);
  transform: translateY(-1px);
}

.project-title-edit {
  display: grid;
  grid-template-columns: minmax(160px, 280px) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.project-title-edit input {
  min-height: 38px;
}

.project-card-head p,
.project-card-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.project-task-list {
  display: grid;
  gap: 10px;
}

.project-task-row {
  animation: table-row-in 180ms ease-out both;
}

.project-task-row.is-overdue td {
  background: rgba(219, 109, 85, 0.1);
  border-bottom-color: rgba(219, 109, 85, 0.18);
}

.project-task-row.is-completed td {
  background: rgba(47, 143, 118, 0.11);
  border-bottom-color: rgba(47, 143, 118, 0.2);
}

.project-task-row.is-completed .primary-cell strong {
  color: #2f6d5f;
}

.project-task-main,
.project-task-meta {
  min-width: 0;
}

.project-task-main {
  display: grid;
  gap: 4px;
}

.project-task-main strong {
  overflow-wrap: anywhere;
}

.project-task-main span {
  color: var(--muted);
  font-size: 0.84rem;
}

.project-task-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-table-scroll {
  max-height: none;
}

.project-task-table th:last-child,
.project-task-table td:last-child {
  min-width: 260px;
  text-align: right;
}

.project-task-table .table-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.project-task-table .table-actions .micro-button {
  flex: 0 0 auto;
  min-width: 86px;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.planner-form {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(217, 211, 200, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.planner-field-grid,
.planner-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.planner-upload-field {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.planner-upload-field > span:first-child {
  grid-column: 1 / -1;
}

.file-button {
  position: relative;
  min-height: 48px;
  padding: 0 14px;
  font-weight: 800;
}

.planner-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-preview {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.planner-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 0 4px;
}

.planner-preview-head h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.planner-preview-head p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.planner-preview-head .micro-button {
  flex: 0 0 auto;
  min-width: 132px;
}

.planner-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.planner-task-list {
  display: grid;
  gap: 12px;
}

.planner-task-card {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  animation: table-row-in 220ms ease-out both;
}

.planner-task-check {
  position: relative;
  display: grid;
  place-items: start center;
  padding-top: 33px;
}

.planner-task-check input {
  position: absolute;
  top: 33px;
  left: 2px;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.planner-task-check span {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(112, 119, 111, 0.56);
  border-radius: 6px;
  background: #ffffff;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.planner-task-check input:hover + span,
.planner-task-check input:focus-visible + span {
  border-color: rgba(47, 143, 118, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 143, 118, 0.1);
}

.planner-task-check input:checked + span {
  border-color: var(--mint);
  background: var(--mint);
  transform: scale(0.94);
}

.planner-task-check input:checked + span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translate(5px, 5px) rotate(-45deg);
}

.planner-task-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.planner-task-body textarea {
  min-height: 82px;
}

.planner-task-reason {
  padding: 10px 12px;
  border: 1px solid rgba(191, 139, 35, 0.26);
  border-radius: 8px;
  background: rgba(191, 139, 35, 0.08);
  color: #775713;
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tracker-panel .panel-head {
  margin-bottom: 42px;
}

.table-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 34px;
}

.table-mode-button {
  min-height: 42px;
  font-weight: 800;
}

.tracker-section {
  display: grid;
  gap: 44px;
}

.table-panel {
  display: none;
}

.table-panel.is-active {
  display: grid;
  animation: table-panel-in 220ms ease-out both;
}

.table-module {
  min-width: 0;
}

.table-module.is-page-turning .table-scroll {
  box-shadow: 0 12px 36px rgba(28, 28, 24, 0.08);
}

.tracker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 20px;
  padding: 0 4px;
}

.tracker-head h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.table-count {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.compact-button {
  min-height: 36px;
  padding: 0 12px;
}

.settings-apply.is-dirty {
  border-color: rgba(47, 143, 118, 0.62);
  background: var(--mint);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(47, 143, 118, 0.18);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.table-scroll.has-inline-editor {
  overflow: visible;
}

.tracker-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

.tracker-table th,
.tracker-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tracker-table th:last-child,
.tracker-table td:last-child {
  padding-left: 20px;
}

.tracker-table th {
  background: rgba(47, 143, 118, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tracker-table tbody tr {
  transition:
    background 150ms ease,
    opacity 150ms ease;
}

.tracker-table tbody.is-swapping tr {
  animation: table-row-in 220ms ease-out both;
}

.tracker-table tbody tr:hover {
  background: rgba(47, 143, 118, 0.045);
}

.tracker-table tbody tr:last-child td {
  border-bottom: 0;
}

.tracker-table tr.is-done {
  opacity: 0.68;
}

.tracker-table tr.is-completing {
  pointer-events: none;
  animation: task-complete-out 260ms ease-in forwards;
}

.tracker-table th:nth-child(1),
.tracker-table td:nth-child(1) {
  width: 30%;
}

.tracker-table th:nth-child(2),
.tracker-table td:nth-child(2) {
  width: 12%;
}

.tracker-table th:nth-child(3),
.tracker-table td:nth-child(3) {
  width: 14%;
}

.tracker-table th:nth-child(4),
.tracker-table td:nth-child(4) {
  width: 11%;
}

.tracker-table th:nth-child(5),
.tracker-table td:nth-child(5) {
  width: 13%;
}

.tracker-table th:nth-child(6),
.tracker-table td:nth-child(6) {
  width: 20%;
}

.event-table th:nth-child(1),
.event-table td:nth-child(1) {
  width: 28%;
}

.event-table th:nth-child(2),
.event-table td:nth-child(2),
.event-table th:nth-child(3),
.event-table td:nth-child(3) {
  width: 17%;
}

.event-table th:nth-child(4),
.event-table td:nth-child(4) {
  width: 10%;
}

.event-table th:nth-child(5),
.event-table td:nth-child(5) {
  width: 10%;
}

.event-table th:nth-child(6),
.event-table td:nth-child(6) {
  width: 18%;
}

.completed-task-table tbody tr,
.completed-event-table tbody tr {
  height: 92px;
}

.completed-task-table .empty-row,
.completed-event-table .empty-row {
  height: 92px;
}

.completed-task-main {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}

.completed-task-copy {
  min-width: 0;
}

.completed-task-table .completed-task-copy > strong,
.completed-task-table .completed-task-copy > span {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.completed-indicator {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 0 !important;
  border: 1px solid rgba(47, 143, 118, 0.34);
  border-radius: 50%;
  background: rgba(47, 143, 118, 0.1);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.completed-indicator::before {
  content: "";
  width: 8px;
  height: 4px;
  border-bottom: 2px solid var(--mint);
  border-left: 2px solid var(--mint);
  transform: translateY(-1px) rotate(-45deg);
}

button.completed-indicator {
  padding: 0;
  border: 1px solid rgba(47, 143, 118, 0.34);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

button.completed-indicator:hover,
button.completed-indicator:focus-visible {
  border-color: rgba(47, 143, 118, 0.58);
  background: rgba(47, 143, 118, 0.16);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.82),
    0 0 0 5px rgba(47, 143, 118, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.primary-cell {
  position: relative;
}

.primary-cell strong,
.primary-cell span {
  display: block;
  overflow-wrap: anywhere;
}

.primary-cell strong {
  font-size: 0.94rem;
  line-height: 1.25;
}

.primary-cell span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.muted-cell {
  color: #a2a7a1;
}

.status-chip,
.subject-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip {
  background: var(--status-bg, var(--mint-soft));
  color: var(--status-ink, #206f5c);
}

.status-chip[data-status="done"] {
  --status-bg: #e6e8e3;
  --status-ink: var(--muted);
}

.status-chip[data-status="waiting"],
.status-chip[data-status="scheduled"] {
  --status-bg: #fff0d3;
  --status-ink: #8a610f;
}

.status-chip[data-status="canceled"] {
  --status-bg: #f7ded8;
  --status-ink: #9b412e;
}

.subject-chip {
  background: var(--subject-bg, #eaf0ff);
  color: var(--subject-ink, #315fba);
}

button.status-chip,
button.subject-chip {
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

button.status-chip:hover,
button.subject-chip:hover {
  filter: saturate(1.08) brightness(0.98);
  transform: translateY(-1px);
}

.subject-chip.is-empty {
  --subject-bg: #e6e8e3;
  --subject-ink: var(--muted);
}

.subject-chip[data-subject="en"] {
  --subject-bg: #e5f3ff;
  --subject-ink: #23628b;
}

.subject-chip[data-subject="ma"] {
  --subject-bg: #efe8ff;
  --subject-ink: #6542a6;
}

.subject-chip[data-subject="ch"] {
  --subject-bg: #fff0d3;
  --subject-ink: #8a610f;
}

.subject-chip[data-subject="others"] {
  --subject-bg: #e6e8e3;
  --subject-ink: var(--muted);
}

.priority-cell {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.completion-gleam-block {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  border-radius: 20px;
  background: rgba(47, 143, 118, 0.68);
  box-shadow:
    0 0 24px rgba(47, 143, 118, 0.5),
    0 0 58px rgba(47, 143, 118, 0.42),
    0 0 116px rgba(47, 143, 118, 0.28);
  filter: blur(18px) saturate(1.12);
  opacity: 0;
  animation: completion-gleam 1340ms cubic-bezier(0.16, 0.76, 0.18, 1) forwards;
}

.completion-gleam-block::before {
  display: none;
}

.dashboard-item.is-completing-gleam,
.project-card.is-completing-gleam {
  position: relative;
  z-index: 121;
  overflow: visible;
  border-color: rgba(47, 143, 118, 0.34);
  background: #2f8f76;
  color: #ffffff;
}

.tracker-table tr.is-completing-gleam,
.project-task-row.is-completing-gleam {
  position: relative;
  z-index: 121;
}

.tracker-table tr.is-completing-gleam td,
.project-task-row.is-completing-gleam td {
  border-bottom-color: rgba(47, 143, 118, 0.22);
  background: #2f8f76 !important;
  color: #ffffff;
}

.is-completing-gleam .dashboard-item-main span,
.is-completing-gleam .primary-cell span,
.is-completing-gleam .muted-cell,
.is-completing-gleam .priority-cell {
  color: rgba(255, 255, 255, 0.92) !important;
}

.is-completing-gleam .status-chip,
.is-completing-gleam .subject-chip {
  filter: saturate(0.85) brightness(1.08);
}

.empty-list,
#storageDetails {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 148px;
  padding-left: 8px;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.table-pager .micro-button {
  min-width: 92px;
}

.micro-button {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  min-width: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.micro-button:hover {
  border-color: rgba(47, 143, 118, 0.42);
  background: var(--mint-soft);
}

.micro-button.is-processing {
  border-color: #9d9f9b;
  background: #9d9f9b;
  color: rgba(255, 255, 255, 0.82);
}

.danger-button:hover {
  border-color: rgba(219, 109, 85, 0.44);
  background: #f9e5e0;
}

.micro-button:disabled {
  cursor: default;
  opacity: 0.46;
}

.inline-edit-cell {
  padding: 16px !important;
  background: linear-gradient(0deg, rgba(47, 143, 118, 0.045), rgba(47, 143, 118, 0.045)),
    var(--panel-strong);
}

.inline-editor {
  display: grid;
  gap: 14px;
}

.inline-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.inline-edit-grid .is-wide {
  grid-column: 1 / -1;
}

.inline-editor textarea {
  min-height: 86px;
}

.inline-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.empty-list {
  display: grid;
  place-items: center;
  min-height: 78px;
  text-align: center;
}

.empty-row:hover {
  background: transparent !important;
}

.subjects-panel {
  min-height: 560px;
  padding: clamp(28px, 4vw, 44px);
}

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-section[hidden] {
  display: none !important;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
  padding: 5px;
  border: 1px solid rgba(217, 211, 200, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.settings-tab-button {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 850;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.settings-tab-button:hover {
  background: rgba(223, 243, 236, 0.52);
  color: var(--ink);
}

.settings-tab-button.is-active {
  background: var(--mint-soft);
  color: #285f53;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 118, 0.18);
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-section-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.subject-add-form,
.status-add-form,
.event-type-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 240px) 160px;
  gap: 14px;
  align-items: end;
}

.status-add-form {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 240px) 160px;
}

.event-type-add-form {
  grid-template-columns: minmax(0, 1fr) 180px;
}

.subject-add-form .submit-button,
.status-add-form .submit-button,
.event-type-add-form .submit-button {
  min-height: 48px;
}

.color-picker {
  position: relative;
}

.color-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 0 12px;
  text-align: left;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.color-trigger:hover,
.color-picker.is-open .color-trigger {
  border-color: rgba(47, 143, 118, 0.42);
}

.color-picker.is-open .color-trigger {
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.05), rgba(47, 143, 118, 0.05)),
    var(--panel-strong);
}

.color-trigger:focus-visible,
.hex-input:focus-visible {
  outline: none;
  border-color: rgba(47, 143, 118, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 143, 118, 0.12);
}

.color-swatch {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(27, 28, 27, 0.1);
  border-radius: 50%;
  background: var(--picker-color, #2f8f76);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.76);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 120ms ease;
}

.color-picker.is-open .color-swatch {
  animation: color-swatch-pop 220ms ease-out both;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.76),
    0 0 0 7px rgba(47, 143, 118, 0.08);
}

.color-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 16;
  width: min(292px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid rgba(217, 211, 200, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 54px rgba(28, 28, 24, 0.16);
  backdrop-filter: blur(18px);
  transform-origin: 28px 0;
}

.color-popover[hidden] {
  display: none !important;
}

.color-picker.is-open .color-popover {
  animation: color-popover-in 180ms ease-out both;
}

.color-map {
  position: relative;
  height: 164px;
  overflow: hidden;
  border: 1px solid rgba(27, 28, 27, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(to top, #000000, transparent),
    linear-gradient(to right, #ffffff, var(--picker-hue, #2f8f76));
  cursor: crosshair;
  touch-action: none;
}

.color-map-pin,
.hue-pin {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.color-map-pin {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(27, 28, 27, 0.36),
    0 3px 10px rgba(27, 28, 27, 0.24);
  transition:
    width 120ms ease,
    height 120ms ease,
    box-shadow 120ms ease;
}

.color-picker.is-open .color-map-pin {
  animation: color-pin-pop 180ms ease-out both;
}

.hue-slider {
  position: relative;
  height: 18px;
  margin-top: 12px;
  border: 1px solid rgba(27, 28, 27, 0.12);
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
  cursor: pointer;
  touch-action: none;
}

.hue-pin {
  top: 50%;
  width: 12px;
  height: 24px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--picker-color, #2f8f76);
  box-shadow:
    0 0 0 1px rgba(27, 28, 27, 0.28),
    0 3px 10px rgba(27, 28, 27, 0.18);
  animation: color-pin-pop 180ms ease-out both;
}

.hex-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.hex-field span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hex-input {
  min-height: 40px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: lowercase;
}

.subject-list,
.status-list,
.event-type-list {
  display: grid;
  gap: 12px;
}

.subject-row,
.status-row,
.event-type-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(210px, 240px) 90px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.status-row {
  grid-template-columns: 140px minmax(0, 1fr) minmax(210px, 240px) 90px;
}

.event-type-row {
  grid-template-columns: minmax(0, 1fr) 90px;
}

.subject-preview {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.settings-status-chip {
  align-self: center;
  justify-self: start;
}

.delete-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(244, 246, 243, 0.58);
  opacity: 0;
  backdrop-filter: blur(11px);
}

.delete-confirm-overlay[hidden] {
  display: none !important;
}

.delete-confirm-overlay.is-open {
  opacity: 1;
  animation: quick-overlay-in 140ms ease-out both;
}

.delete-confirm-modal {
  display: grid;
  gap: 12px;
  width: min(390px, calc(100vw - 36px));
  padding: 20px;
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 78px rgba(28, 28, 24, 0.2);
  animation: quick-create-in 170ms ease-out 40ms both;
}

.delete-confirm-modal h2 {
  font-size: 1.1rem;
}

.delete-confirm-modal p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.delete-confirm-actions {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.delete-confirm-actions .submit-button,
.delete-confirm-actions .micro-button {
  min-height: 42px;
}

.changelog-overlay {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(244, 246, 243, 0.62);
  opacity: 0;
  backdrop-filter: blur(12px);
}

.changelog-overlay[hidden] {
  display: none !important;
}

.changelog-overlay.is-open {
  opacity: 1;
  animation: quick-overlay-in 150ms ease-out both;
}

.changelog-modal {
  display: grid;
  gap: 18px;
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  padding: 20px;
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 78px rgba(28, 28, 24, 0.2);
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  animation: changelog-in 190ms ease-out 40ms both;
}

.changelog-overlay.is-open .changelog-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.changelog-modal:focus {
  outline: none;
}

.changelog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.changelog-head h2 {
  margin-top: 2px;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1;
}

.changelog-close {
  min-width: 84px;
}

.changelog-list {
  display: grid;
  gap: 14px;
  max-height: min(590px, calc(100vh - 178px));
  padding-right: 4px;
  overflow: auto;
}

.changelog-entry {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(216, 223, 217, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 252, 250, 0.98)),
    var(--panel-strong);
}

.changelog-entry:first-child {
  border-color: rgba(47, 143, 118, 0.32);
  background:
    linear-gradient(180deg, rgba(244, 251, 248, 0.98), rgba(255, 255, 255, 0.98)),
    var(--panel-strong);
}

.user-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 132;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(244, 246, 243, 0.72);
  backdrop-filter: blur(16px);
  animation: quick-overlay-in 180ms ease-out both;
}

.user-guide-overlay[hidden] {
  display: none !important;
}

.user-guide-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
  padding: 20px;
  border: 1px solid rgba(217, 211, 200, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 1;
  transform: translateY(0) scale(1);
  backdrop-filter: blur(18px);
}

.user-guide-overlay.is-open .user-guide-modal {
  animation: changelog-in 180ms ease-out both;
}

.user-guide-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.user-guide-content {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.55;
}

.user-guide-content section {
  display: grid;
  gap: 10px;
}

.user-guide-content h3,
.user-guide-content h4,
.user-guide-content h5 {
  margin: 0;
  line-height: 1.2;
}

.user-guide-content h3 {
  font-size: 1.22rem;
}

.user-guide-content h4 {
  font-size: 1.02rem;
}

.user-guide-content h5 {
  color: var(--muted);
  font-size: 0.92rem;
  text-transform: uppercase;
}

.user-guide-content p,
.user-guide-content ul,
.user-guide-content ol {
  margin: 0;
}

.user-guide-content ul,
.user-guide-content ol {
  padding-left: 20px;
}

.user-guide-content li + li {
  margin-top: 5px;
}

.user-guide-content a {
  color: #2f6f61;
  font-weight: 800;
  text-decoration-color: rgba(47, 143, 118, 0.34);
}

.user-guide-content code {
  border-radius: 6px;
  background: rgba(47, 143, 118, 0.09);
  color: #255f54;
  padding: 2px 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.user-guide-content pre {
  max-width: 100%;
  overflow: auto;
  margin: 0;
  border: 1px solid rgba(47, 143, 118, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 143, 118, 0.08), rgba(47, 143, 118, 0)),
    #f7faf8;
  padding: 14px;
}

.user-guide-content pre code {
  display: block;
  background: transparent;
  color: #1f332f;
  padding: 0;
  white-space: pre;
}

.user-guide-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(217, 211, 200, 0.82);
  border-radius: 8px;
  font-size: 0.86rem;
}

.user-guide-content th,
.user-guide-content td {
  border-bottom: 1px solid rgba(217, 211, 200, 0.72);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.user-guide-content th {
  background: rgba(47, 143, 118, 0.08);
  font-weight: 900;
}

.user-guide-doc-link {
  padding: 14px;
  border: 1px solid rgba(47, 143, 118, 0.24);
  border-radius: 8px;
  background: rgba(223, 243, 236, 0.42);
}

.changelog-entry-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.changelog-entry h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.15;
}

.changelog-entry-head p {
  margin-top: 4px;
  color: var(--muted);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 0.94rem;
  line-height: 1.35;
}

.changelog-version {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 3px;
  min-width: max-content;
  padding: 6px 8px;
  border: 1px solid rgba(47, 143, 118, 0.22);
  border-radius: 999px;
  background: rgba(223, 243, 236, 0.78);
  color: #285f53;
  font-size: 0.82rem;
  font-weight: 900;
}

.version-prefix,
.version-dot {
  color: rgba(40, 95, 83, 0.62);
}

.version-part {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  min-height: 20px;
  border-radius: 999px;
}

.version-part.is-patch {
  background: var(--mint);
  color: white;
  box-shadow: 0 8px 20px rgba(47, 143, 118, 0.2);
}

.changelog-sections {
  display: grid;
  gap: 12px;
}

.changelog-section {
  display: grid;
  gap: 7px;
}

.changelog-section h4 {
  margin: 0;
  color: #2f6f61;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.changelog-section ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #333834;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.5;
}

.changelog-empty {
  color: var(--muted);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.5;
}

.context-menu {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 6px;
  min-width: 190px;
  padding: 7px;
  border: 1px solid rgba(217, 211, 200, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 54px rgba(28, 28, 24, 0.16);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transform-origin: top left;
  backdrop-filter: blur(18px);
}

.context-menu[hidden] {
  display: none !important;
}

.context-menu.is-open {
  animation: context-menu-in 150ms ease-out both;
}

.context-menu-item {
  position: relative;
  min-height: 38px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 11px;
  text-align: left;
  font-weight: 750;
}

.context-menu-item:hover {
  background: var(--mint-soft);
}

.context-menu-playbook.has-progress {
  background: rgba(47, 143, 118, 0.1);
  color: #2f6d5f;
}

.context-menu-playbook.has-progress:hover {
  background: rgba(47, 143, 118, 0.16);
}

.quick-chip-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.quick-chip-menu-item.is-selected {
  background: rgba(47, 143, 118, 0.12);
}

.quick-chip-menu-item .status-chip,
.quick-chip-menu-item .subject-chip {
  pointer-events: none;
}

.context-menu-danger {
  color: #a83f2a;
}

.context-menu-danger:hover {
  background: #f9e5e0;
}

.quick-create-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(244, 246, 243, 0.52);
  opacity: 0;
  backdrop-filter: blur(10px);
}

.quick-create-overlay[hidden] {
  display: none !important;
}

.quick-create-overlay.is-open {
  opacity: 1;
  animation: quick-overlay-in 140ms ease-out both;
}

.quick-create-modal {
  --quick-create-y: -50%;
  position: fixed;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 16px;
  width: min(420px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 78px rgba(28, 28, 24, 0.2);
  opacity: 0;
  transform: translate(-50%, var(--quick-create-y)) scale(0.98);
  animation: quick-create-in 170ms ease-out 40ms both;
}

.quick-create-modal.is-placed {
  --quick-create-y: 0;
}

.quick-create-overlay.is-open .quick-create-modal {
  opacity: 1;
  transform: translate(-50%, var(--quick-create-y)) scale(1);
}

.quick-create-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.quick-create-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px;
}

.quick-mode-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.quick-create-body {
  display: grid;
  gap: 12px;
}

.quick-create-modal.is-switching .quick-create-body {
  animation: quick-create-switch 190ms ease-out both;
}

.quick-create-actions {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 10px;
}

.quick-create-actions .submit-button,
.quick-create-actions .micro-button {
  min-height: 42px;
}

.breakdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 112;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(244, 246, 243, 0.58);
  opacity: 1;
  backdrop-filter: blur(18px);
}

.breakdown-overlay[hidden] {
  display: none !important;
}

.breakdown-overlay.is-open {
  animation: quick-overlay-in 150ms ease-out both;
}

.breakdown-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
  width: min(1120px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  overflow: hidden;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.035), rgba(47, 143, 118, 0.035)),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 90px rgba(28, 28, 24, 0.2);
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: breakdown-modal-in 180ms ease-out 40ms both;
}

.breakdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.breakdown-head > div {
  min-width: 0;
}

.breakdown-head h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.65rem);
  line-height: 0.96;
}

.breakdown-head p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.breakdown-progress {
  display: grid;
  gap: 8px;
}

.breakdown-progress > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.breakdown-progress-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(47, 143, 118, 0.16);
  border-radius: 999px;
  background: rgba(47, 143, 118, 0.09);
}

.breakdown-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8f76, #7fc4ac);
  box-shadow: 0 0 20px rgba(47, 143, 118, 0.28);
  transition: width 260ms ease;
}

.breakdown-body {
  min-height: 0;
  max-height: min(580px, calc(100vh - 270px));
  overflow: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.breakdown-body.has-playbook {
  overflow: hidden;
  padding-right: 0;
}

.breakdown-loading,
.breakdown-error,
.breakdown-done {
  display: grid;
  place-items: center;
  min-height: 270px;
  border: 1px solid rgba(217, 211, 200, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.breakdown-loading {
  gap: 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.loading-dots {
  display: inline-flex;
  gap: 6px;
}

.loading-dots i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  animation: loading-dot 900ms ease-in-out infinite;
}

.loading-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.loading-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.breakdown-error {
  color: #a83f2a;
  font-weight: 850;
}

.breakdown-done {
  gap: 8px;
  min-height: 300px;
  padding: 24px;
  animation: breakdown-done-in 240ms ease-out both;
}

.breakdown-done strong {
  color: #2f6d5f;
  font-size: clamp(1.2rem, 4vw, 1.85rem);
  line-height: 1.05;
}

.breakdown-done p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.micro-step-list {
  display: grid;
  gap: 10px;
  animation: table-panel-in 180ms ease-out both;
}

.micro-step-card {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  min-height: 76px;
  min-width: 0;
  overflow: visible;
  padding: 13px 14px;
  border: 1px solid rgba(217, 211, 200, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(28, 28, 24, 0.055);
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease;
}

.micro-step-card:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 118, 0.34);
  box-shadow: 0 16px 38px rgba(28, 28, 24, 0.08);
}

.micro-step-card.is-completed {
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.08), rgba(47, 143, 118, 0.08)),
    rgba(255, 255, 255, 0.88);
  color: #2f6d5f;
}

.micro-step-card.is-pulsing {
  animation: micro-step-complete 360ms ease-out both;
}

.micro-step-check {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 3px;
}

.micro-step-check input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 28px;
  height: 28px;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.micro-step-check span {
  position: relative;
  width: 23px;
  height: 23px;
  border: 1.5px solid rgba(112, 119, 111, 0.56);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.micro-step-check input:hover + span,
.micro-step-check input:focus-visible + span {
  border-color: rgba(47, 143, 118, 0.72);
  box-shadow: 0 0 0 5px rgba(47, 143, 118, 0.1);
}

.micro-step-check input:checked + span {
  border-color: var(--mint);
  background: var(--mint);
  transform: scale(0.92);
  box-shadow:
    0 0 0 5px rgba(47, 143, 118, 0.12),
    inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.micro-step-check input:checked + span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}

.micro-step-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: visible;
}

.micro-step-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  line-height: 1.2;
}

.micro-step-description {
  display: flow-root;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.72;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  padding-bottom: 0.28em;
}

.micro-step-card.is-completed .micro-step-description {
  color: #4f776d;
}

.breakdown-footer {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 10px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px);
}

.breakdown-footer .submit-button[hidden] {
  display: none !important;
}

.breakdown-button.has-progress {
  border-color: rgba(47, 143, 118, 0.42);
  background: rgba(47, 143, 118, 0.08);
  color: #2f6d5f;
}

.playbook-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.playbook-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 211, 200, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 38px rgba(28, 28, 24, 0.07);
}

.playbook-reference-panel {
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.038), rgba(47, 143, 118, 0.038)),
    rgba(255, 255, 255, 0.82);
}

.playbook-execution-panel {
  background:
    linear-gradient(0deg, rgba(191, 139, 35, 0.035), rgba(191, 139, 35, 0.035)),
    rgba(255, 255, 255, 0.82);
}

.playbook-panel-head {
  display: grid;
  gap: 3px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(217, 211, 200, 0.76);
  background: rgba(255, 255, 255, 0.66);
}

.playbook-panel-head h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.12;
}

.playbook-reference-list,
.playbook-execution-panel .micro-step-list,
.playbook-execution-panel .breakdown-done {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 12px;
  scrollbar-gutter: stable;
}

.playbook-reference-list {
  display: grid;
  gap: 12px;
}

.playbook-reference-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: visible;
  padding: 13px 14px;
  border: 1px solid rgba(217, 211, 200, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  animation: table-panel-in 180ms ease-out both;
}

.playbook-reference-section h4 {
  margin: 0;
  color: #2f6d5f;
  font-size: 0.98rem;
  line-height: 1.16;
}

.playbook-rich {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.62;
}

.playbook-rich p,
.playbook-rich ul,
.playbook-rich ol {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
}

.playbook-rich ul,
.playbook-rich ol {
  display: grid;
  gap: 5px;
  padding-left: 1.15rem;
}

.playbook-rich h4,
.playbook-rich h5,
.playbook-rich h6 {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.18;
}

.playbook-rich code,
.micro-step-copy code {
  padding: 0.1em 0.28em;
  border: 1px solid rgba(217, 211, 200, 0.72);
  border-radius: 5px;
  background: rgba(244, 246, 243, 0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.playbook-rich table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid rgba(217, 211, 200, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.playbook-rich th,
.playbook-rich td {
  padding: 7px 9px;
  border-bottom: 1px solid rgba(217, 211, 200, 0.72);
  border-right: 1px solid rgba(217, 211, 200, 0.56);
  text-align: left;
  vertical-align: top;
}

.playbook-rich th {
  color: #2f6d5f;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.playbook-rich mjx-container[jax="CHTML"],
.micro-step-copy mjx-container[jax="CHTML"] {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.18em 0.04em 0.42em;
  line-height: 1.35;
}

.playbook-rich mjx-container[jax="CHTML"][display="true"],
.micro-step-copy mjx-container[jax="CHTML"][display="true"] {
  display: block;
  margin: 0.28em 0;
}

.playbook-rich mjx-container[jax="CHTML"]:not([display="true"]),
.micro-step-copy mjx-container[jax="CHTML"]:not([display="true"]) {
  display: inline-block;
  max-width: 100%;
  vertical-align: -0.38em;
}

.playbook-execution-panel .micro-step-list {
  align-content: start;
}

.playbook-execution-panel .micro-step-card {
  height: auto;
  min-height: max-content;
  contain: layout;
}

.playbook-execution-panel .micro-step-description {
  min-height: calc(1em * 1.72);
}

.project-files-overlay {
  position: fixed;
  inset: 0;
  z-index: 113;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(244, 246, 243, 0.6);
  opacity: 1;
  backdrop-filter: blur(18px);
}

.project-files-overlay[hidden] {
  display: none !important;
}

.project-files-overlay.is-open {
  animation: quick-overlay-in 150ms ease-out both;
}

.project-files-modal {
  display: grid;
  gap: 16px;
  width: min(680px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  overflow: hidden;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 90px rgba(28, 28, 24, 0.2);
  animation: breakdown-modal-in 180ms ease-out 40ms both;
}

.project-files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-files-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.35rem);
  line-height: 1;
}

.project-files-head p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.project-files-upload {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr) minmax(130px, auto);
  gap: 10px;
  align-items: center;
}

.project-files-upload > span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.project-files-list {
  display: grid;
  gap: 10px;
  max-height: min(380px, calc(100vh - 310px));
  overflow: auto;
  padding-right: 3px;
  scrollbar-gutter: stable;
}

.project-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(217, 211, 200, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.project-file-row:hover {
  border-color: rgba(47, 143, 118, 0.34);
  background: rgba(47, 143, 118, 0.055);
  transform: translateY(-1px);
}

.project-file-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-file-main strong {
  overflow-wrap: anywhere;
}

.project-file-main span {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.project-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-files-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.project-file-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 116;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(244, 246, 243, 0.64);
  opacity: 1;
  backdrop-filter: blur(20px);
}

.project-file-viewer-overlay[hidden] {
  display: none !important;
}

.project-file-viewer-overlay.is-open {
  animation: quick-overlay-in 150ms ease-out both;
}

.project-file-viewer-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: min(900px, calc(100vw - 28px));
  height: min(760px, calc(100vh - 28px));
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(217, 211, 200, 0.94);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(47, 143, 118, 0.03), rgba(47, 143, 118, 0.03)),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 92px rgba(28, 28, 24, 0.22);
  animation: breakdown-modal-in 180ms ease-out 40ms both;
}

.project-file-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-file-viewer-head > div {
  min-width: 0;
}

.project-file-viewer-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.2rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.project-file-viewer-head p:not(.eyebrow) {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.project-file-viewer-body {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(217, 211, 200, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.project-file-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: #ffffff;
}

.project-file-text {
  min-height: 100%;
  margin: 0;
  padding: 18px;
  color: var(--ink);
  font: 0.88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 18px 18px;
}

.storage-grid {
  display: block;
}

.button-ripple {
  position: absolute;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%) scale(0);
  animation: button-ripple 640ms ease-out forwards;
}

.ghost-button .button-ripple,
.table-mode-button .button-ripple,
.context-menu-item .button-ripple,
.select-option .button-ripple,
.calendar-day .button-ripple,
.calendar-nav .button-ripple,
.time-step .button-ripple,
.calendar-apply .button-ripple {
  background: rgba(47, 143, 118, 0.18);
}

.shake {
  animation: shake 280ms ease-in-out;
}

@keyframes button-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(24);
  }
}

@keyframes feedback-ripple {
  0% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(72);
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(191, 139, 35, 0.24);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(191, 139, 35, 0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-5px);
  }
  70% {
    transform: translateX(5px);
  }
}

@keyframes table-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes table-row-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes task-complete-out {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(16px) scale(0.985);
  }
}

@keyframes completion-gleam {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  24% {
    opacity: 1;
    transform: scale(1);
  }
  58% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes context-menu-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes quick-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes quick-create-in {
  from {
    opacity: 0;
    transform: translate(-50%, var(--quick-create-y)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, var(--quick-create-y)) scale(1);
  }
}

@keyframes breakdown-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loading-dot {
  0%,
  100% {
    opacity: 0.32;
    transform: translateY(0) scale(0.86);
  }
  42% {
    opacity: 1;
    transform: translateY(-4px) scale(1);
  }
}

@keyframes micro-step-complete {
  0% {
    border-color: rgba(47, 143, 118, 0.3);
    box-shadow:
      0 10px 28px rgba(28, 28, 24, 0.055),
      0 0 0 rgba(47, 143, 118, 0);
    transform: translateY(0) scale(1);
  }
  42% {
    border-color: rgba(47, 143, 118, 0.62);
    background:
      linear-gradient(0deg, rgba(47, 143, 118, 0.18), rgba(47, 143, 118, 0.18)),
      rgba(255, 255, 255, 0.92);
    box-shadow:
      0 0 0 5px rgba(47, 143, 118, 0.12),
      0 0 28px rgba(47, 143, 118, 0.24),
      0 16px 42px rgba(28, 28, 24, 0.08);
    transform: translateY(-1px) scale(1.006);
  }
  100% {
    border-color: rgba(47, 143, 118, 0.3);
    box-shadow:
      0 10px 28px rgba(28, 28, 24, 0.055),
      0 0 0 rgba(47, 143, 118, 0);
    transform: translateY(0) scale(1);
  }
}

@keyframes breakdown-done-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes changelog-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes quick-create-switch {
  0% {
    opacity: 0.55;
    transform: translateY(5px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes color-popover-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes color-pin-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes color-swatch-pop {
  0% {
    transform: scale(0.86);
  }
  72% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes toast-pop {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-leave {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

@media (max-width: 780px) {
  .auth-screen {
    align-items: start;
    overflow: auto;
  }

  .auth-panel,
  .auth-panel.is-signup {
    width: min(100%, 620px);
    max-height: none;
    padding: 18px;
  }

  .signup-head {
    align-items: stretch;
    flex-direction: column;
  }

  .signup-head .micro-button,
  .signup-head-actions {
    width: 100%;
  }

  .setup-actions,
  .signup-password-row {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 18px, 620px);
    padding: 14px 0 22px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
    gap: 16px;
    min-height: auto;
  }

  h1 {
    max-width: 13ch;
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .status-wrap {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .status-pill {
    justify-content: center;
  }

  .changelog-modal {
    width: min(100vw - 20px, 620px);
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .changelog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .changelog-close {
    width: 100%;
  }

  .changelog-list {
    max-height: calc(100vh - 190px);
    padding-right: 0;
  }

  .changelog-entry {
    padding: 14px;
  }

  .changelog-entry-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-guide-modal {
    width: min(100vw - 20px, 620px);
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .user-guide-head {
    align-items: stretch;
    flex-direction: column;
  }

  .user-guide-close {
    width: 100%;
  }

  .user-guide-content {
    max-height: calc(100vh - 190px);
    padding-right: 0;
  }

  .user-guide-content table {
    display: block;
    overflow-x: auto;
  }

  .page-tabs {
    position: sticky;
    top: 8px;
    z-index: 18;
    width: 100%;
    margin-top: 18px;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(217, 211, 200, 0.76);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 12px 34px rgba(28, 28, 24, 0.08);
    backdrop-filter: blur(18px);
  }

  .page-button {
    min-height: 40px;
    padding: 0 3px;
    font-size: 0.72rem;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .mode-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel {
    min-height: auto;
    padding: 14px;
  }

  .dashboard-panel {
    padding: 14px;
  }

  .dashboard-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-upcoming-row {
    grid-template-columns: 1fr;
  }

  .dashboard-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-task-item {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .dashboard-task-item .dashboard-item-meta {
    grid-column: 2;
  }

  .dashboard-item-meta {
    justify-content: flex-start;
  }

  #trackerPage,
  #calendarPage,
  #plannerPage,
  #subjectsPage {
    margin-top: 14px;
  }

  .calendar-panel {
    padding: 14px;
  }

  .calendar-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 7px;
  }

  .calendar-now-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .calendar-month-title {
    min-height: 42px;
    font-size: 1rem;
  }

  .calendar-nav-button,
  .calendar-now-button {
    min-height: 42px;
  }

  .calendar-month-weekdays span {
    padding: 8px 2px;
    font-size: 0.62rem;
  }

  .calendar-month-grid {
    min-height: 560px;
  }

  .calendar-month-day {
    min-height: 86px;
    padding: 5px;
  }

  .calendar-day-head {
    min-height: 18px;
    font-size: 0.72rem;
  }

  .calendar-today-dot {
    width: 6px;
    min-height: 6px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .calendar-day-items {
    gap: 4px;
    padding-top: 5px;
  }

  .calendar-month-day.has-span-event .calendar-day-items {
    padding-top: var(--span-offset, 31px);
  }

  .calendar-chip,
  .calendar-span-chip {
    grid-template-columns: 6px minmax(0, 1fr);
    gap: 4px;
    min-height: 23px;
    padding: 0 5px;
  }

  .calendar-span-chip {
    height: 23px;
  }

  .calendar-chip-sub {
    display: none;
  }

  .calendar-chip-main {
    font-size: 0.66rem;
  }

  .calendar-more-button {
    min-height: 22px;
    padding: 0 5px;
    font-size: 0.65rem;
  }

  .calendar-popup {
    width: min(420px, calc(100vw - 18px));
    max-height: calc(100vh - 18px);
    padding: 12px;
  }

  .calendar-popup.is-editing {
    top: 10px !important;
    right: 10px;
    bottom: 10px;
    left: 10px !important;
    width: auto;
    max-height: none;
    overflow: auto;
  }

  .calendar-popup.is-editing .calendar-popup-body {
    min-height: 0;
  }

  .calendar-popup.is-editing .inline-edit-actions {
    position: sticky;
    bottom: -1px;
    z-index: 2;
    padding-top: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 30%);
  }

  .calendar-detail-grid,
  .calendar-popup-actions {
    grid-template-columns: 1fr;
  }

  .tracker-panel {
    padding: 14px;
  }

  .planner-panel {
    padding: 14px;
  }

  .planner-layout,
  .planner-field-grid,
  .planner-task-grid,
  .planner-upload-field {
    grid-template-columns: 1fr;
  }

  .planner-form {
    padding: 12px;
  }

  .planner-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-preview-head .micro-button {
    width: 100%;
  }

  .project-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .project-add-task,
  .project-select-field {
    width: 100%;
  }

  .planner-preview-actions,
  .project-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-title-edit {
    grid-template-columns: 1fr;
  }

  .project-title-edit .micro-button {
    width: 100%;
  }

  .project-task-meta {
    justify-content: flex-start;
  }

  .project-task-table th:last-child,
  .project-task-table td:last-child {
    min-width: 0;
  }

  .project-task-table .table-actions .micro-button {
    flex: 1;
    min-width: 0;
  }

  .planner-task-card {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 12px;
  }

  .tracker-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .table-mode-tabs {
    gap: 8px;
    margin-bottom: 20px;
  }

  .tracker-section {
    gap: 26px;
  }

  .tracker-head {
    margin-bottom: 12px;
  }

  .field-row,
  #taskPanel .field-row,
  #eventPanel .field-row,
  .setup-grid,
  .subject-add-form,
  .status-add-form,
  .event-type-add-form,
  .subject-row,
  .status-row,
  .event-type-row,
  .inline-edit-grid {
    grid-template-columns: 1fr;
  }

  .inline-edit-actions {
    justify-content: stretch;
  }

  .context-menu {
    display: none !important;
  }

  .breakdown-overlay {
    align-items: end;
    padding: 10px;
  }

  .breakdown-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    gap: 12px;
    padding: 16px;
  }

  .breakdown-head {
    align-items: flex-start;
    flex-direction: row;
  }

  .breakdown-head h2 {
    max-width: none;
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .breakdown-close {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    flex: 0 0 38px;
  }

  .breakdown-body {
    min-height: 0;
    max-height: calc(100dvh - 226px);
    padding-right: 0;
  }

  .breakdown-body.has-playbook {
    overflow: auto;
  }

  .playbook-grid {
    grid-template-columns: 1fr;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
  }

  .playbook-panel {
    min-width: 0;
    overflow: visible;
  }

  .playbook-reference-list,
  .playbook-execution-panel .micro-step-list,
  .playbook-execution-panel .breakdown-done {
    overflow: visible;
    padding: 10px;
  }

  .playbook-reference-section {
    padding: 12px;
  }

  .playbook-rich {
    font-size: 0.84rem;
    line-height: 1.58;
  }

  .playbook-rich mjx-container[jax="CHTML"],
  .micro-step-copy mjx-container[jax="CHTML"] {
    font-size: 92%;
    padding-bottom: 0.46em;
  }

  .micro-step-description {
    line-height: 1.74;
    padding-bottom: 0.32em;
  }

  .micro-step-card {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 72px;
    min-width: 0;
    padding: 12px;
  }

  .breakdown-footer {
    grid-template-columns: 1fr;
    padding-top: 2px;
  }

  .project-files-overlay {
    align-items: end;
    padding: 10px;
  }

  .project-files-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
    gap: 12px;
    padding: 16px;
  }

  .project-files-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-files-close {
    width: 100%;
    min-height: 42px;
  }

  .project-files-upload,
  .project-file-row {
    grid-template-columns: 1fr;
  }

  .project-files-list {
    max-height: calc(100vh - 330px);
    padding-right: 0;
  }

  .project-file-actions {
    justify-content: stretch;
  }

  .project-file-actions .micro-button {
    flex: 1;
  }

  .project-file-viewer-overlay {
    align-items: end;
    padding: 10px;
  }

  .project-file-viewer-modal {
    width: 100%;
    height: calc(100dvh - 20px);
    gap: 12px;
    padding: 16px;
  }

  .project-file-viewer-head {
    align-items: flex-start;
    flex-direction: row;
  }

  .project-file-viewer-close {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    flex: 0 0 38px;
  }

  .project-file-frame {
    min-height: 100%;
  }

  .project-file-text {
    padding: 14px;
    font-size: 0.8rem;
  }

  .select-menu,
  .date-popover,
  .color-popover {
    max-width: calc(100vw - 36px);
  }

  .table-scroll {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .tracker-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
  }

  .tracker-table thead {
    display: none;
  }

  .tracker-table tbody {
    display: grid;
    gap: 10px;
  }

  .tracker-table tr {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-strong);
  }

  .tracker-table th,
  .tracker-table td {
    width: 100% !important;
  }

  .tracker-table td {
    display: grid;
    grid-template-columns: minmax(76px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
  }

  .tracker-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .tracker-table td.primary-cell {
    display: block;
  }

  .tracker-table td.primary-cell::before {
    display: block;
    margin-bottom: 7px;
  }

  .tracker-table td[data-label="Actions"] {
    display: block;
  }

  .tracker-table td[data-label="Actions"]::before {
    content: none;
  }

  .tracker-table .empty-row {
    min-height: 92px;
    place-items: center;
  }

  .tracker-table .empty-row td {
    display: block;
  }

  .tracker-table .empty-row td::before {
    content: none;
  }

  .completed-task-table tbody tr,
  .completed-event-table tbody tr {
    height: auto;
  }

  .table-actions {
    justify-content: stretch;
    min-width: 0;
    padding-left: 0;
  }

  .micro-button {
    flex: 1;
    min-height: 40px;
  }

  .table-pager {
    justify-content: stretch;
  }

  .table-pager .micro-button {
    min-width: 0;
  }

  .submit-button,
  .ghost-button {
    width: 100%;
  }
}
