:root {
  color-scheme: light;
  --canvas: #f5f7f8;
  --canvas-deep: #e8eef0;
  --surface: #ffffff;
  --surface-soft: #f6f9fa;
  --surface-raised: #ffffff;
  --ink: #17262b;
  --ink-soft: #3d5158;
  --muted: #6c7d83;
  --faint: #9aa9ae;
  --line: #dce5e8;
  --line-strong: #c6d3d7;
  --primary: #126b6f;
  --primary-dark: #0b5358;
  --primary-soft: #e3f1f1;
  --blue: #376f9f;
  --blue-soft: #e7f0f8;
  --amber: #9b6b16;
  --amber-soft: #f7edda;
  --coral: #bd594a;
  --coral-soft: #f8e7e4;
  --sidebar: #142b31;
  --sidebar-soft: #1c3b42;
  --sidebar-ink: #f5fafb;
  --sidebar-muted: #a8bcc1;
  --shadow-sm: 0 1px 3px rgba(22, 49, 57, 0.05);
  --shadow-md: 0 10px 28px rgba(22, 49, 57, 0.08);
  --radius: 7px;
  --sidebar-width: 236px;
}

body.dark {
  color-scheme: dark;
  --canvas: #152126;
  --canvas-deep: #0f181c;
  --surface: #1d2b30;
  --surface-soft: #18262b;
  --surface-raised: #23343a;
  --ink: #edf5f6;
  --ink-soft: #cad8dc;
  --muted: #9aacb1;
  --faint: #778b91;
  --line: #304147;
  --line-strong: #42565d;
  --primary: #6fc1c1;
  --primary-dark: #9bdada;
  --primary-soft: #213c3e;
  --blue: #8baac2;
  --blue-soft: #243743;
  --amber: #d3a75d;
  --amber-soft: #3a3021;
  --coral: #df8a76;
  --coral-soft: #3d2b27;
  --sidebar: #101f23;
  --sidebar-soft: #183238;
  --sidebar-ink: #f3f5f4;
  --sidebar-muted: #89968e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button,
select,
input[type="range"] {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

a {
  color: inherit;
}

svg {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4,
strong {
  letter-spacing: 0;
}

h2 {
  font-size: 23px;
  font-weight: 720;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
  font-weight: 720;
  line-height: 1.35;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--sidebar);
  color: var(--sidebar-ink);
  scrollbar-width: thin;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 83px;
  padding: 18px 17px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #dff1f1;
  color: #0b5559;
  font-size: 18px;
  font-weight: 800;
}

.brand p {
  margin-bottom: 2px;
  color: #7fc3c4;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.brand h1 {
  font-size: 17px;
  font-weight: 720;
  line-height: 1.2;
}

.nav {
  display: grid;
  gap: 15px;
  padding: 16px 11px 20px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group-primary {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-label {
  padding: 0 9px 4px;
  color: #718b91;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 36px;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
}

.nav-item svg {
  width: 16px;
  height: 16px;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 580;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-ink);
}

.nav-item.active {
  border-color: rgba(120, 199, 201, 0.16);
  background: var(--sidebar-soft);
  color: #f8faf8;
  box-shadow: inset 3px 0 #64c0c1;
}

.nav-item.active svg {
  color: #75cdce;
}

.nav-badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 9px;
  background: #a75b48;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.nav-badge[hidden] {
  display: none;
}

.local-status {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: auto 11px 14px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--sidebar-muted);
}

.local-status svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #74bfc0;
}

.local-status strong,
.local-status small {
  display: block;
}

.local-status strong {
  color: #dbe2dd;
  font-size: 11px;
  font-weight: 650;
}

.local-status small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 600px) minmax(220px, 0.7fr);
  align-items: center;
  min-height: 72px;
  gap: 18px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(18px);
}

.topbar-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.topbar-title > div {
  min-width: 0;
}

.topbar-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow,
.section-label,
.panel-kicker {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 1px;
}

.global-search-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 39px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.global-search-wrap > svg {
  color: var(--faint);
}

.global-search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: text;
}

.global-search-wrap kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
}

.search-results {
  position: absolute;
  inset: calc(100% + 7px) 0 auto;
  z-index: 80;
  max-height: min(520px, 70vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 18px 45px rgba(20, 31, 25, 0.18);
}

.search-results > button {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  width: 100%;
  gap: 2px 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

.search-results > button:hover {
  background: var(--surface-soft);
}

.search-results > button span {
  grid-row: 1 / 3;
  color: var(--primary);
  font-size: 11px;
  font-weight: 750;
}

.search-results > button strong,
.search-results > button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results > button small {
  color: var(--muted);
  font-size: 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.date-text {
  margin-right: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--primary);
}

.icon-button.subtle {
  width: 29px;
  height: 29px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.icon-button.subtle:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.mobile-menu {
  display: none;
}

.main {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 25px 28px 60px;
}

.view {
  display: none;
  animation: view-in 180ms ease-out;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  background: var(--surface);
}

input:not([type="range"]):not([type="checkbox"]),
select {
  min-height: 39px;
  padding: 8px 10px;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--primary) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 24%, transparent);
  outline-offset: 2px;
}

.primary-button,
.secondary-button,
.danger-button,
.wide-button,
.text-button,
.file-button,
.timer-controls button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 680;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--primary-dark);
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

body.dark .primary-button {
  border-color: var(--primary);
  background: #287c7f;
  color: #fff;
}

.primary-button.compact {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.secondary-button,
.wide-button,
.timer-controls button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.secondary-button:hover,
.wide-button:hover,
.timer-controls button:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.danger-button {
  border: 1px solid color-mix(in srgb, var(--coral) 48%, var(--line));
  background: var(--surface);
  color: var(--coral);
}

.danger-button:hover {
  background: var(--coral-soft);
}

.text-button {
  min-height: 30px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}

.text-button svg {
  width: 14px;
  height: 14px;
}

.text-button:hover {
  color: var(--primary-dark);
}

.file-button input {
  display: none;
}

.panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading > div {
  min-width: 0;
}

.panel-kicker {
  margin-bottom: 2px;
  color: var(--muted);
}

.panel-heading > span,
.muted-note {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  align-items: end;
  min-height: 118px;
  gap: 26px;
  margin-bottom: 13px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-intro .section-label {
  margin-bottom: 5px;
}

.focus-input {
  display: block;
  width: 100%;
  min-height: auto !important;
  padding: 0 0 6px !important;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  cursor: text;
  font-size: 29px;
  font-weight: 720;
  line-height: 1.28;
}

.focus-input:focus {
  border-bottom-color: var(--line-strong);
}

.weekly-intent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  max-width: 760px;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
}

.weekly-intent span {
  font-size: 11px;
  font-weight: 700;
}

.weekly-intent input {
  min-height: 28px !important;
  padding: 3px 0 !important;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  cursor: text;
}

.phase-card {
  min-width: 0;
  padding: 14px 15px;
  border-left: 3px solid var(--primary);
  background: var(--surface-soft);
}

.phase-card span,
.phase-card small,
.phase-card strong {
  display: block;
}

.phase-card span,
.phase-card small {
  color: var(--muted);
  font-size: 11px;
}

.phase-card strong {
  margin: 2px 0 5px;
  font-size: 20px;
}

.capture-bar {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 92px auto;
  align-items: center;
  min-height: 52px;
  gap: 8px;
  margin-bottom: 13px;
  padding: 6px 7px 6px 13px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.capture-bar > svg {
  color: var(--primary);
}

.capture-bar input {
  min-height: 36px !important;
  padding-left: 2px !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: text;
}

.capture-bar select {
  min-height: 36px;
  border-color: var(--line);
  background: var(--surface-soft);
}

.capture-bar button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.capture-bar.standalone {
  max-width: 100%;
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-item {
  display: grid;
  min-width: 0;
  min-height: 80px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 0 8px;
  padding: 12px 15px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item:hover {
  background: var(--surface-soft);
}

.summary-item span,
.summary-item small {
  color: var(--muted);
  font-size: 11px;
}

.summary-item strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--ink);
  font-size: 29px;
  font-weight: 600;
}

.summary-item:first-child strong {
  color: var(--coral);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.72fr);
  align-items: start;
  gap: 13px;
}

.dashboard-main-column,
.dashboard-rail {
  display: grid;
  min-width: 0;
  gap: 13px;
}

.deadline-list,
.task-list,
.agenda-list,
.next-list,
.rhythm-list,
.record-list,
.direction-list,
.week-list,
.timeline-list,
.activity-list,
.inbox-list {
  display: grid;
  gap: 7px;
}

.deadline-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto 18px;
  align-items: center;
  width: 100%;
  min-height: 59px;
  gap: 12px;
  padding: 7px 9px 7px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  text-align: left;
}

.deadline-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.deadline-row.soon {
  border-left-color: var(--amber);
}

.deadline-row.urgent,
.deadline-row.overdue {
  border-left-color: var(--coral);
}

.deadline-date b,
.deadline-date small,
.deadline-copy strong,
.deadline-copy small {
  display: block;
}

.deadline-date b {
  font-size: 12px;
}

.deadline-date small,
.deadline-copy small {
  color: var(--muted);
  font-size: 10px;
}

.deadline-copy {
  min-width: 0;
}

.deadline-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.deadline-row.urgent em,
.deadline-row.overdue em {
  color: var(--coral);
  font-weight: 750;
}

.deadline-row.soon em {
  color: var(--amber);
}

.deadline-row > svg {
  width: 15px;
  color: var(--faint);
}

.task-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px 34px;
  align-items: center;
  min-height: 46px;
  gap: 9px;
  padding: 6px 7px 6px 9px;
  border-bottom: 1px solid var(--line);
}

.task-item:last-child {
  border-bottom: 0;
}

.task-item > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.task-item > div strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 620;
}

.task-item.done > div strong {
  color: var(--muted);
  text-decoration: line-through;
}

.check-control {
  position: relative;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-control > span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}

.check-control input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
}

.check-control input:checked + span::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.priority-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 9px;
  font-weight: 750;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px auto;
  gap: 7px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.agenda-row {
  display: grid;
  grid-template-columns: 44px 2px minmax(0, 1fr);
  align-items: stretch;
  min-height: 47px;
  gap: 10px;
}

.agenda-row time {
  padding-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.agenda-line {
  position: relative;
  width: 2px;
  height: 100%;
  background: var(--line);
}

.agenda-line::before {
  position: absolute;
  top: 5px;
  left: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  content: "";
}

.agenda-row strong,
.agenda-row small {
  display: block;
}

.agenda-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.next-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  text-align: left;
}

.next-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.next-row span {
  grid-row: 1 / 3;
  align-self: start;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 750;
}

.next-row strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.next-row small {
  color: var(--muted);
  font-size: 10px;
}

.rhythm-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.rhythm-row > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.category-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.category-dot.研究 { background: var(--primary); }
.category-dot.项目 { background: var(--amber); }
.category-dot.生活 { background: var(--coral); }

.rhythm-row > div {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--canvas-deep);
}

.rhythm-row > div b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.rhythm-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.wellbeing-panel textarea {
  width: 100%;
  min-height: 58px;
  margin-top: 10px;
  background: var(--surface-soft);
}

.range-field {
  display: grid;
  gap: 6px;
}

.range-field span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.range-field b {
  color: var(--primary);
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 2px;
  accent-color: var(--primary);
  background: var(--canvas-deep);
}

.compact-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px auto;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
}

.compact-field input {
  min-height: 32px !important;
  padding: 5px 7px !important;
}

.compact-field em {
  color: var(--muted);
  font-style: normal;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.quick-links a,
.quick-links button {
  display: grid;
  min-width: 0;
  min-height: 64px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 7px 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  text-align: center;
  text-decoration: none;
}

.quick-links a:hover,
.quick-links button:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary);
}

.quick-links span {
  max-width: 100%;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 112px;
  place-items: center;
  align-content: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  color: var(--faint);
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.empty-state p {
  max-width: 360px;
  margin-top: 2px;
  font-size: 10px;
}

.page-lead,
.resource-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 92px;
  gap: 24px;
  margin-bottom: 16px;
  padding: 3px 2px 16px;
  border-bottom: 1px solid var(--line-strong);
}

.page-lead h3,
.resource-header h3 {
  font-size: 23px;
  font-weight: 720;
}

.page-lead p,
.resource-header p:not(.section-label) {
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.segmented button.active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 700;
}

.inbox-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  gap: 12px;
  padding: 8px 8px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.inbox-row:last-child {
  border-bottom: 0;
}

.inbox-row.processed {
  opacity: 0.6;
}

.type-mark {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.type-任务 { background: var(--blue-soft); color: var(--blue); }
.type-文献 { background: var(--primary-soft); color: var(--primary-dark); }
.type-想法 { background: var(--amber-soft); color: var(--amber); }
.type-沟通 { background: var(--coral-soft); color: var(--coral); }

.inbox-copy {
  min-width: 0;
}

.inbox-copy strong,
.inbox-copy small {
  display: block;
}

.inbox-copy strong {
  overflow-wrap: anywhere;
  font-weight: 620;
}

.inbox-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.inbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.process-select {
  min-height: 32px;
  max-width: 105px;
  padding: 5px 7px;
  font-size: 11px;
}

.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.week-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-switcher strong {
  min-width: 155px;
  text-align: center;
}

.schedule-compose {
  margin-bottom: 13px;
  padding: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.form-grid textarea {
  grid-column: 1 / -2;
}

.form-grid button {
  align-self: end;
}

.schedule-form {
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(110px, 0.7fr)) auto;
  margin: 0;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  min-width: 930px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

#schedule {
  overflow-x: auto;
  padding-bottom: 5px;
}

.day-column {
  min-height: 480px;
  border-right: 1px solid var(--line);
}

.day-column:last-child {
  border-right: 0;
}

.day-column > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.day-column > header strong {
  font-size: 22px;
  font-weight: 500;
}

.day-column.today > header {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.day-blocks {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 420px;
  padding: 7px;
}

.day-empty,
.kanban-empty {
  display: block;
  padding: 16px 4px;
  color: var(--faint);
  font-size: 10px;
  text-align: center;
}

.schedule-block {
  position: relative;
  min-width: 0;
  padding: 8px 44px 8px 8px;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: var(--blue-soft);
}

.schedule-block.category-研究 { border-left-color: var(--primary); background: var(--primary-soft); }
.schedule-block.category-项目 { border-left-color: var(--amber); background: var(--amber-soft); }
.schedule-block.category-生活 { border-left-color: var(--coral); background: var(--coral-soft); }

.schedule-block time,
.schedule-block strong,
.schedule-block small {
  display: block;
}

.schedule-block time,
.schedule-block small {
  color: var(--muted);
  font-size: 9px;
}

.schedule-block strong {
  margin: 2px 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.schedule-block button {
  position: absolute;
  top: 5px;
  right: 4px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.schedule-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 2px;
}

.schedule-actions button {
  position: static;
}

.schedule-block button svg {
  width: 12px;
  height: 12px;
}

.grid {
  display: grid;
  align-items: start;
  gap: 13px;
  margin-bottom: 13px;
}

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

.grid.two-thirds {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.82fr);
}

.stacked-form {
  grid-template-columns: 1fr 1fr;
}

.stacked-form textarea {
  grid-column: 1 / -1;
}

.stacked-form button {
  grid-column: -2 / -1;
}

.record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.record-card > div {
  min-width: 0;
}

.record-card strong,
.record-card small,
.record-card p {
  display: block;
}

.record-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.record-card p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.record-card a {
  color: var(--primary-dark);
  text-decoration: none;
}

.record-card a:hover {
  text-decoration: underline;
}

.record-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.record-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-status-select {
  flex: 0 0 auto;
  width: auto;
  max-width: 104px;
  min-height: 27px;
  padding: 3px 22px 3px 7px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 48%;
  min-height: 21px;
  align-items: center;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.assignment-form {
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) repeat(3, minmax(120px, 0.7fr)) auto;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  min-height: 420px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.kanban-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 35px;
  padding: 2px 3px 8px;
}

.kanban-column h4 {
  font-size: 12px;
}

.kanban-column > header span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 10px;
  background: var(--canvas-deep);
  color: var(--muted);
  font-size: 10px;
}

.kanban-stack {
  display: grid;
  gap: 7px;
}

.kanban-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kanban-card.overdue {
  border-color: color-mix(in srgb, var(--coral) 45%, var(--line));
}

.kanban-meta,
.kanban-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kanban-meta > span {
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
}

.kanban-meta .priority-重要 { background: var(--amber-soft); color: var(--amber); }
.kanban-meta .priority-紧急 { background: var(--coral-soft); color: var(--coral); }

.kanban-card > strong,
.kanban-card > small {
  display: block;
}

.kanban-card > strong {
  margin: 7px 0 2px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.kanban-card > small,
.kanban-due {
  color: var(--muted);
  font-size: 9px;
}

.kanban-due {
  justify-content: flex-start;
  margin: 9px 0 7px;
}

.kanban-due svg {
  width: 12px;
  height: 12px;
}

.kanban-card > select {
  width: 100%;
  min-height: 31px;
  padding: 5px 7px;
  font-size: 10px;
}

.timer-display {
  display: grid;
  min-height: 178px;
  place-items: center;
  margin: 5px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--primary-dark);
  font-family: "PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 62px;
  font-variant-numeric: tabular-nums;
  font-weight: 520;
}

.timer-controls,
.timer-settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.timer-settings {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 10px;
}

.timer-settings label {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.timer-settings input {
  min-height: 34px !important;
  padding: 5px 7px !important;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 6px;
  margin: 8px 0 14px;
}

.calendar-day {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.calendar-day.checked {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 750;
}

.calendar-day.today {
  border-color: var(--amber);
}

.wide-button {
  width: 100%;
}

.date-picker-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.date-picker-label input {
  min-height: 32px !important;
  padding: 5px 7px !important;
}

.large-textarea {
  width: 100%;
  min-height: 360px;
  border-color: var(--line);
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.8;
}

.save-status {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.activity-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
}

.activity-row > span svg {
  width: 14px;
  height: 14px;
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row strong { font-size: 11px; }
.activity-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.compact-search {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  min-width: 190px;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.compact-search svg {
  width: 14px;
  color: var(--faint);
}

.compact-search input {
  min-height: 32px !important;
  padding: 5px 0 !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: text;
}

.literature-form {
  grid-template-columns: minmax(210px, 1.6fr) repeat(4, minmax(100px, 0.65fr));
}

.literature-card select {
  min-height: 30px;
  margin-top: 8px;
  padding: 4px 7px;
  font-size: 10px;
}

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

.link-grid.single {
  grid-template-columns: 1fr;
}

.link-grid a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 620;
  text-decoration: none;
}

.link-grid a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.link-grid a svg {
  width: 13px;
  height: 13px;
  color: var(--faint);
}

.link-grid a:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.direction-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(120px, 1fr) 30px;
  align-items: center;
  gap: 12px;
  min-height: 51px;
  padding: 7px 3px;
  border-bottom: 1px solid var(--line);
}

.direction-row:last-child {
  border-bottom: 0;
}

.direction-row span strong,
.direction-row span small {
  display: block;
}

.direction-row span strong {
  font-size: 11px;
}

.direction-row span small,
.direction-row > b {
  color: var(--muted);
  font-size: 9px;
}

.advisor-form {
  grid-template-columns: 140px minmax(180px, 1fr) minmax(240px, 1.4fr) minmax(180px, 1fr) 120px auto;
}

.advisor-form textarea {
  grid-column: auto;
  min-height: 39px;
  max-height: 90px;
}

.next-note {
  color: var(--primary-dark) !important;
  font-weight: 620;
}

.thesis-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.75fr);
  gap: 16px 28px;
  margin-bottom: 13px;
  padding: 23px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.thesis-copy .section-label {
  margin-bottom: 6px;
}

.thesis-title-input,
.thesis-section-input {
  display: block;
  width: 100%;
  min-height: auto !important;
  padding: 3px 0 !important;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  cursor: text;
}

.thesis-title-input {
  font-size: 25px;
  font-weight: 620;
}

.thesis-section-input {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.thesis-title-input:focus,
.thesis-section-input:focus {
  border-bottom-color: var(--line-strong);
}

.thesis-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.thesis-stats label span,
.thesis-progress label {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.thesis-stats input {
  width: 100%;
  margin-top: 4px;
}

.thesis-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 1.2fr);
  gap: 7px 22px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.thesis-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.thesis-progress > div:nth-child(2) {
  grid-column: 1;
}

.thesis-progress label {
  grid-column: 2;
  grid-row: 1 / 3;
}

.thesis-progress label input {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39px;
  gap: 6px;
}

.input-action-row .icon-button {
  width: 39px;
  height: 39px;
}

.progress-wrap {
  height: 7px;
  overflow: hidden;
  margin: 7px 0 13px;
  border-radius: 3px;
  background: var(--canvas-deep);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.week-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.week-row:last-child {
  border-bottom: 0;
}

.week-row strong,
.week-row small,
.week-row p {
  display: block;
}

.week-row strong { font-size: 11px; }
.week-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.week-row p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.week-row.done { opacity: 0.64; }

.project-form {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(240px, 1.4fr) 140px 120px auto;
}

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

.project-grid > .empty-state {
  grid-column: 1 / -1;
}

.project-card {
  min-width: 0;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--surface-soft);
}

.project-top,
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-top > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.project-card h3 {
  min-height: 43px;
  margin: 9px 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.project-next {
  min-height: 59px;
  padding: 8px;
  border-left: 2px solid var(--primary);
  background: var(--surface);
}

.project-next small,
.project-next strong {
  display: block;
}

.project-next small { color: var(--muted); font-size: 9px; }
.project-next strong { margin-top: 2px; overflow-wrap: anywhere; font-size: 11px; }

.project-footer {
  margin-top: 10px;
}

.project-footer select {
  width: 105px;
  min-height: 31px;
  padding: 5px 7px;
  font-size: 10px;
}

.project-footer span {
  color: var(--muted);
  font-size: 9px;
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 9px 5px 14px;
}

.timeline-row::before {
  position: absolute;
  top: 39px;
  bottom: -1px;
  left: 23px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-row:last-child::before {
  display: none;
}

.timeline-index {
  display: grid;
  z-index: 1;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.timeline-row.current .timeline-index {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.timeline-row strong,
.timeline-row small,
.timeline-row span {
  display: block;
}

.timeline-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.timeline-row span {
  width: max-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
}

.archive-panel {
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.archive-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.archive-panel summary::-webkit-details-marker {
  display: none;
}

.archive-panel summary span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 680;
}

.archive-panel summary small {
  color: var(--muted);
}

.archive-panel[open] summary {
  margin-bottom: 12px;
}

.review-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.review-snapshot article {
  display: grid;
  min-height: 92px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.review-snapshot article:last-child {
  border-right: 0;
}

.review-snapshot span,
.review-snapshot small {
  color: var(--muted);
  font-size: 10px;
}

.review-snapshot strong {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 29px;
  font-weight: 550;
}

.review-form {
  display: grid;
  gap: 11px;
}

.review-form > input {
  max-width: 180px;
}

.review-form label {
  display: grid;
  gap: 5px;
}

.review-form label span {
  font-size: 11px;
  font-weight: 650;
}

.review-form textarea {
  min-height: 112px;
  background: var(--surface-soft);
}

.review-form button {
  justify-self: end;
}

.resource-header {
  align-items: center;
}

.resource-header .section-label {
  margin-bottom: 4px;
}

.resource-inline-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) minmax(220px, 1.2fr) auto;
  flex: 0 1 620px;
  gap: 7px;
}

.resource-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.resource-search {
  width: min(340px, 100%);
  background: var(--surface);
}

.segmented.scrollable {
  max-width: calc(100% - 360px);
  overflow-x: auto;
}

.resource-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 13px;
  margin-bottom: 13px;
}

.resource-sections > .empty-state {
  grid-column: 1 / -1;
}

.resource-section {
  box-shadow: none;
}

.resource-section .panel-heading h3 {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 580;
}

/* Expanded graduate workspace */
.record-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.record-form > button {
  grid-column: 2;
  justify-self: end;
}

.analysis-form {
  grid-template-columns: minmax(140px, 0.7fr) minmax(150px, 0.8fr) minmax(260px, 1.5fr) minmax(160px, 0.9fr) auto;
  margin-bottom: 14px;
}

.analysis-form textarea {
  min-height: 39px;
  height: 39px;
  padding-block: 8px;
}

.managed-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.managed-card .managed-status {
  width: auto;
  min-height: 30px;
  margin-top: 8px;
  padding: 4px 28px 4px 8px;
  font-size: 10px;
}

.record-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}

.record-card > .record-actions {
  align-self: start;
}

.ticktick-action:hover {
  border-color: #dc5a56;
  background: #fff0ef;
  color: #bd3f3b;
}

.requirement-form,
.habit-form {
  grid-template-columns: minmax(0, 1fr) 160px auto;
  margin-bottom: 14px;
}

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

.requirement-item,
.habit-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px 34px;
  align-items: center;
  min-height: 56px;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.requirement-item > div,
.habit-row > div {
  min-width: 0;
}

.requirement-item strong,
.requirement-item small,
.habit-row strong,
.habit-row small {
  display: block;
}

.requirement-item strong,
.habit-row strong {
  font-size: 12px;
}

.requirement-item small,
.habit-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.requirement-item.done,
.habit-row.done {
  background: var(--primary-soft);
  opacity: 0.72;
}

.requirement-item.done strong,
.habit-row.done strong {
  text-decoration: line-through;
}

.health-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 15px;
}

.health-form textarea {
  grid-column: span 2;
  min-height: 70px;
}

.health-form button {
  align-self: end;
}

.form-labelled {
  display: grid;
  gap: 3px;
}

.form-labelled > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

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

.habit-row {
  grid-template-columns: 24px minmax(0, 1fr) 34px;
}

.health-row {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.favorite-strip {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  padding: 8px 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.favorite-strip > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 5px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 800;
}

.favorite-strip > span svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.favorite-strip a {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.favorite-strip a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.favorite-strip small {
  color: var(--muted);
  font-size: 10px;
}

.resource-link-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.resource-link-row > a {
  min-height: 40px;
  border: 0;
  background: transparent;
}

.resource-link-row > a:hover {
  border: 0;
}

.resource-star {
  display: grid;
  width: 31px;
  min-height: 100%;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: var(--faint);
}

.resource-star svg {
  width: 13px;
  height: 13px;
}

.resource-star:hover,
.resource-star.active {
  background: var(--amber-soft);
  color: var(--amber);
}

.resource-star.active svg {
  fill: currentColor;
}

.resource-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-section {
  padding: 15px;
}

.resource-section .panel-heading {
  min-height: 44px;
}

.resource-section .link-grid {
  grid-template-columns: 1fr;
}

.app-launch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.settings-form label {
  display: grid;
  gap: 5px;
}

.settings-form label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.settings-form button {
  grid-column: 2;
  justify-self: end;
}

.local-data-panel > .panel-heading > svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.local-data-panel > p {
  color: var(--muted);
  line-height: 1.7;
}

.data-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.data-stats div {
  padding: 12px 8px 0 0;
}

.data-stats dt {
  color: var(--muted);
  font-size: 9px;
}

.data-stats dd {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #202824;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-scrim {
  display: none;
}

.sync-status {
  display: inline-flex;
  min-width: 92px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  white-space: nowrap;
}

.sync-status svg {
  width: 15px;
  height: 15px;
}

.sync-status.is-synced {
  border-color: rgba(18, 107, 111, 0.24);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.sync-status.is-syncing svg {
  animation: sync-spin 1s linear infinite;
}

.sync-status.is-error {
  color: var(--coral);
  background: var(--coral-soft);
}

@keyframes sync-spin {
  to { transform: rotate(360deg); }
}

.full-width-button {
  width: 100%;
  margin-top: 14px;
}

.mobile-bottom-nav,
.more-sheet,
.sheet-backdrop {
  display: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 23, 27, 0.68);
  backdrop-filter: blur(10px);
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(9, 24, 29, 0.24);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 23px;
}

.auth-brand p,
.auth-brand strong {
  display: block;
  margin: 0;
}

.auth-brand p {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.auth-brand strong {
  font-size: 17px;
}

.auth-card h2 {
  max-width: 360px;
  margin: 5px 0 9px;
  font-size: 25px;
  line-height: 1.3;
}

.auth-copy,
.auth-message {
  color: var(--muted);
  font-size: 12px;
}

.auth-message:empty {
  display: none;
}

.auth-message.is-error {
  color: #a33b32;
  font-weight: 700;
}

.auth-message.is-success {
  color: #24735f;
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin: 22px 0 12px;
}

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

.auth-form label span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.auth-form input {
  min-height: 46px;
}

.auth-form button,
.auth-actions button {
  min-height: 44px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-link-form {
  margin-top: 12px;
}

.auth-text-button {
  display: block;
  margin: 2px 0 0 auto;
  padding: 4px 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.set-password-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.account-summary > svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.account-summary strong,
.account-summary small {
  display: block;
  overflow-wrap: anywhere;
}

.account-summary small {
  margin-top: 3px;
  color: var(--muted);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 23px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.privacy-note svg {
  width: 14px;
  min-width: 14px;
}

.offline-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 6px;
  color: #fff;
  background: #25383d;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  transform: translateX(-50%);
}

.offline-banner[hidden] {
  display: none;
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: minmax(180px, 0.75fr) minmax(280px, 1.35fr) auto;
    padding-inline: 22px;
  }

  .date-text {
    display: none;
  }

  .main {
    padding-inline: 22px;
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  }

  .summary-grid {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    overflow-x: auto;
  }

  .summary-item {
    min-width: 110px;
  }

  .schedule-form,
  .assignment-form,
  .advisor-form,
  .project-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .advisor-form textarea {
    grid-column: span 2;
  }

  .literature-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .analysis-form textarea,
  .analysis-form button {
    grid-column: span 2;
  }
}

@media (max-width: 1020px) {
  :root {
    --sidebar-width: 218px;
  }

  .topbar {
    grid-template-columns: minmax(170px, 0.7fr) minmax(220px, 1fr) auto;
    gap: 10px;
  }

  .dashboard-layout,
  .grid.two-thirds {
    grid-template-columns: 1fr;
  }

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

  .quick-launch-panel,
  .wellbeing-panel {
    min-height: 100%;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .focus-input {
    font-size: 25px;
  }

  .resource-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-inline-form {
    width: 100%;
    flex-basis: auto;
  }

  .thesis-workspace {
    grid-template-columns: 1fr;
  }

  .thesis-progress {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    min-width: 0;
  }

  .mobile-menu {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    gap: 8px 10px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
  }

  .global-search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 42px;
    box-shadow: none;
  }

  .global-search-wrap input {
    font-size: 16px;
  }

  .global-search-wrap kbd {
    display: none;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
  }

  .top-actions #quickCaptureBtn,
  .top-actions #themeBtn,
  .top-actions #exportBtn,
  .date-text {
    display: none;
  }

  .topbar-title h2 {
    font-size: 18px;
  }

  .main {
    width: 100%;
    padding: 14px 14px calc(82px + env(safe-area-inset-bottom));
  }

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

  .phase-card {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .phase-card strong {
    grid-row: 2;
  }

  .phase-card small {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }

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

  .resource-sections {
    grid-template-columns: 1fr;
  }

  .requirement-grid {
    grid-template-columns: 1fr;
  }

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

  .review-snapshot article:nth-child(2) {
    border-right: 0;
  }

  .review-snapshot article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    box-shadow: 0 -8px 24px rgba(20, 43, 49, 0.08);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav button {
    display: grid;
    min-width: 0;
    min-height: 50px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
    font-weight: 650;
  }

  .mobile-bottom-nav button svg {
    width: 21px;
    height: 21px;
  }

  .mobile-bottom-nav button.active {
    color: var(--primary-dark);
    background: var(--primary-soft);
  }

  .sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    background: rgba(12, 25, 29, 0.48);
  }

  .sheet-backdrop[hidden],
  .more-sheet[hidden] {
    display: none;
  }

  .more-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: block;
    max-height: min(82dvh, 760px);
    overflow-y: auto;
    padding: 7px 14px calc(22px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--surface);
    box-shadow: 0 -20px 60px rgba(12, 27, 32, 0.2);
  }

  .sheet-handle {
    width: 38px;
    height: 4px;
    margin: 0 auto 9px;
    border-radius: 4px;
    background: var(--line-strong);
  }

  .sheet-heading {
    position: sticky;
    top: -7px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 12px;
    background: var(--surface);
  }

  .sheet-heading h3 {
    margin: 0;
    font-size: 18px;
  }

  .mobile-all-nav section {
    margin-bottom: 18px;
  }

  .mobile-all-nav section > p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-all-nav section > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-all-nav button {
    display: grid;
    min-width: 0;
    min-height: 76px;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 9px 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 11px;
    line-height: 1.25;
  }

  .mobile-all-nav button svg {
    width: 21px;
    height: 21px;
    color: var(--primary);
  }

  .mobile-all-nav button.active {
    border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
    color: var(--primary-dark);
    background: var(--primary-soft);
  }

  body.sheet-open {
    overflow: hidden;
  }
}

@media (max-width: 620px) {
  h2 {
    font-size: 18px;
  }

  .eyebrow {
    display: none;
  }

  .topbar-title h2 {
    white-space: normal;
  }

  .sync-status {
    min-width: 78px;
    width: auto;
    height: 36px;
    padding: 0 9px;
  }

  .sync-status span {
    display: inline;
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main {
    padding-inline: 12px;
  }

  input:not([type="range"]):not([type="checkbox"]),
  select,
  textarea {
    font-size: 16px;
  }

  .dashboard-intro {
    min-height: 0;
    padding: 16px;
  }

  .focus-input {
    font-size: 21px;
  }

  .weekly-intent {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .capture-bar {
    grid-template-columns: 20px minmax(0, 1fr) 85px;
    padding-bottom: 7px;
  }

  .capture-bar button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .summary-item {
    min-width: 0;
    min-height: 74px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-item:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .summary-item:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
    border-right: 0;
  }

  .summary-item strong {
    font-size: 24px;
  }

  .panel {
    padding: 14px;
  }

  .deadline-row {
    grid-template-columns: 65px minmax(0, 1fr) 15px;
    gap: 8px;
  }

  .deadline-row em {
    grid-column: 2;
    grid-row: 2;
  }

  .deadline-row > svg {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .inline-form,
  .form-grid,
  .stacked-form,
  .schedule-form,
  .assignment-form,
  .advisor-form,
  .project-form,
  .literature-form {
    grid-template-columns: 1fr;
  }

  .record-form,
  .analysis-form,
  .health-form,
  .requirement-form,
  .habit-form {
    grid-template-columns: 1fr;
  }

  .record-form > button,
  .analysis-form textarea,
  .analysis-form button,
  .health-form textarea {
    grid-column: auto;
  }

  .form-grid textarea,
  .stacked-form textarea,
  .stacked-form button,
  .advisor-form textarea {
    grid-column: auto;
  }

  .form-grid button,
  .review-form button {
    width: 100%;
    justify-self: stretch;
  }

  .page-lead {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-lead h3,
  .resource-header h3 {
    font-size: 20px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions > * {
    flex: 1;
  }

  .segmented {
    max-width: 100%;
    overflow-x: auto;
  }

  .inbox-row {
    grid-template-columns: 45px minmax(0, 1fr);
  }

  .inbox-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .schedule-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .week-switcher {
    width: 100%;
  }

  .week-switcher strong {
    min-width: 0;
    flex: 1;
  }

  .course-list,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .timer-display {
    min-height: 140px;
    font-size: 47px;
  }

  .timer-controls {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .timer-controls button {
    padding-inline: 4px;
    font-size: 11px;
  }

  .timer-settings,
  .settings-form,
  .thesis-stats,
  .data-stats {
    grid-template-columns: 1fr;
  }

  .settings-form button {
    grid-column: auto;
    width: 100%;
  }

  .thesis-workspace {
    padding: 16px;
  }

  .thesis-title-input {
    font-size: 21px;
  }

  .thesis-progress {
    grid-template-columns: 1fr;
  }

  .thesis-progress > div:nth-child(2),
  .thesis-progress label {
    grid-column: 1;
    grid-row: auto;
  }

  .resource-inline-form {
    grid-template-columns: 1fr;
  }

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

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

  .resource-search,
  .segmented.scrollable {
    width: 100%;
    max-width: 100%;
  }

  .settings-actions {
    display: grid;
  }

  .auth-overlay {
    align-items: end;
    padding: 0;
  }

  .auth-card {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .offline-banner {
    right: 12px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    left: 12px;
    justify-content: center;
    transform: none;
  }
}

@media (max-width: 370px) {
  .mobile-all-nav section > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
