:root {
  color-scheme: light;
  --bg: #f6faf7;
  --panel: #ffffff;
  --panel-soft: #f8fbf9;
  --text: #1d1d1f;
  --muted: #69736f;
  --subtle: #8b9691;
  --line: #dde7e1;
  --line-strong: #bdd3c8;
  --accent: #2e7d5a;
  --accent-strong: #075f45;
  --accent-soft: #e8f4ee;
  --green: #3fa776;
  --green-soft: #eaf6ef;
  --blue: #4f7fcf;
  --blue-soft: #edf3ff;
  --violet: #7b6ac8;
  --violet-soft: #f2efff;
  --amber: #b98328;
  --amber-soft: #fff7e5;
  --danger: #bd3d35;
  --orange: #ff7a59;
  --orange-soft: #fff0e9;
  --shadow: 0 18px 45px rgba(32, 84, 62, 0.09);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -12%, rgba(167, 220, 192, 0.34), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(255, 186, 120, 0.14), transparent 26%),
    linear-gradient(180deg, #fbfdfb 0%, var(--bg) 46%, #f2f7f3 100%);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea,
select {
  min-width: 0;
}

button {
  min-height: 42px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

button:hover {
  border-color: var(--line-strong);
  background: #fdfdfd;
}

button:active {
  transform: scale(0.985);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.ghost {
  background: transparent;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(46, 125, 90, 0.68);
  box-shadow: 0 0 0 4px rgba(46, 125, 90, 0.12);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
  font-weight: 800;
}

h2 {
  font-size: clamp(19px, 3.6vw, 28px);
  line-height: 1.18;
  font-weight: 780;
}

h3 {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 760;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.message.failed,
.sync-text.failed {
  color: var(--danger);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 13px;
  padding: 26px;
  border: 1px solid rgba(221, 231, 225, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-card h1 {
  font-size: 30px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(7, 95, 69, 0.12);
}

.switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #eef4f0;
}

.switcher button {
  min-height: 36px;
  border-color: transparent;
  background: transparent;
}

.switcher button.active {
  background: var(--panel);
  box-shadow: 0 6px 18px rgba(29, 29, 31, 0.08);
  font-weight: 760;
  color: var(--accent-strong);
}

.app-shell {
  width: min(1320px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 18px calc(30px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -16px -18px 12px;
  padding: calc(16px + env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid rgba(221, 231, 225, 0.82);
  background: rgba(246, 250, 247, 0.86);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.topbar h1 {
  font-size: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(7, 95, 69, 0.12);
}

.sync-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.top-actions button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}

.user-badge {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.app-tabs {
  position: static;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid rgba(221, 231, 225, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.app-tabs button {
  min-height: 38px;
  min-width: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.app-tabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(46, 125, 90, 0.18);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 16px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  min-height: 172px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 30px;
  border: 1px solid rgba(221, 231, 225, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 246, 0.94)),
    radial-gradient(circle at 84% 18%, rgba(167, 220, 192, 0.25), transparent 34%);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  max-width: 860px;
  margin-bottom: 10px;
  font-size: clamp(30px, 6vw, 48px);
}

.hero-card .muted {
  max-width: 640px;
  font-size: 16px;
}

.metric-row,
.team-summary {
  display: grid;
  gap: 10px;
}

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

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

.metric-row article,
.team-summary article {
  min-height: 86px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(221, 231, 225, 0.78);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(32, 84, 62, 0.055);
}

.metric-row strong,
.team-summary strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.metric-row span,
.team-summary span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.metric-row .focus-metric strong {
  font-size: 24px;
  line-height: 1.1;
}

.quick-add,
.filter-card,
.admin-panel,
.feedback-panel,
.tool-card,
.timer-shell {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(221, 231, 225, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
}

.timer-shell {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: stretch;
}

.timer-main {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: clamp(260px, 36vh, 390px);
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(221, 231, 225, 0.72);
  background:
    radial-gradient(circle at 78% 22%, rgba(167, 220, 192, 0.25), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f5faf7 100%);
}

.timer-main h2 {
  max-width: 820px;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 4vw, 40px);
}

.timer-display {
  color: var(--accent-strong);
  font-size: clamp(58px, 10vw, 118px);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0;
}

.timer-today-focus {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.timer-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, max-content));
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.timer-actions button {
  min-width: 112px;
}

.timer-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(248, 251, 249, 0.92);
  min-width: 0;
}

.timer-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-card {
  gap: 14px;
}

.hongying-key-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.hongying-overview {
  padding: 16px;
  border: 1px solid rgba(221, 231, 225, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hongying-overview pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
}

.section-head.flush {
  padding: 0;
}

.section-head.compact {
  padding-bottom: 4px;
}

.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.tool-actions.compact {
  justify-content: flex-end;
}

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

.candidate-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(222, 222, 227, 0.8);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.candidate-card .checkline {
  align-items: flex-start;
}

.candidate-card .checkline span {
  padding-top: 1px;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.candidate-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, 0.7fr) minmax(120px, 0.7fr);
  gap: 10px;
}

.break-card {
  text-align: left;
  width: min(760px, calc(100% - 28px));
  max-width: calc(100% - 28px);
}

.break-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.break-countdown {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), #f6fbf8);
  color: var(--accent-strong);
  font-size: clamp(42px, 12vw, 72px);
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.compact-list {
  max-height: 260px;
  overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  align-items: stretch;
  padding-right: 4px;
}

.compact-list .task-card {
  min-height: 0;
  padding: 13px;
  border-radius: 18px;
}

.compact-list .card-line strong {
  font-size: 14px;
  line-height: 1.45;
}

.compact-list .task-note {
  margin-left: 0;
  font-size: 12px;
  padding: 8px 10px;
}

.compact-list .task-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  justify-content: stretch;
}

.compact-list .task-actions button {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.quick-add textarea {
  min-height: 92px;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  font-size: 16px;
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 10px;
}

.filter-card {
  grid-template-columns: minmax(220px, 1.5fr) auto auto minmax(118px, 0.72fr) minmax(118px, 0.72fr) minmax(142px, 0.9fr) minmax(142px, 0.9fr);
  align-items: center;
}

.filter-card input {
  border-radius: 999px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px;
}

.section-head .muted {
  margin-top: 5px;
  font-size: 13px;
}

.section-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.task-list.grouped {
  grid-template-columns: 1fr;
  gap: 14px;
}

.task-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(221, 231, 225, 0.82);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
}

.task-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px;
}

.task-group-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.task-group-head h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.task-group-important .task-group-head h3::before {
  background: var(--orange);
}

.task-group-medium .task-group-head h3::before {
  background: var(--green);
}

.task-group-normal .task-group-head h3::before {
  background: var(--blue);
}

.task-group-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

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

.empty.small {
  min-height: 76px;
  padding: 18px;
  font-size: 13px;
}

.task-card {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(221, 231, 225, 0.82);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(32, 84, 62, 0.045);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.task-card:hover {
  border-color: rgba(63, 167, 118, 0.34);
  box-shadow: 0 14px 28px rgba(32, 84, 62, 0.075);
  transform: translateY(-1px);
}

.task-card.done {
  opacity: 0.66;
}

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

.card-line strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.45;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--green);
}

.dot.team {
  background: var(--violet);
}

.task-note {
  margin-left: 22px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f5faf7;
  color: #4a4a4f;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

.task-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.share-action {
  border-color: rgba(46, 125, 90, 0.2);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 720;
}

.share-action.shared {
  border-color: rgba(123, 106, 200, 0.34);
  background: #fff;
  color: var(--muted);
}

.empty {
  padding: 28px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  text-align: center;
}

.team-board {
  display: grid;
  gap: 18px;
}

.team-layer {
  display: grid;
  gap: 12px;
}

.team-layer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.team-layer-head h3 {
  margin: 0;
  font-size: 22px;
}

.team-layer-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.team-layer-head > span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.team-project-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0 14px;
}

.team-project {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(221, 231, 225, 0.92);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
}

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

.team-project-head strong {
  display: block;
  font-size: 18px;
}

.team-project-head span,
.team-project-head em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.team-project-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-project-detail span {
  border: 1px solid rgba(221, 231, 225, 0.92);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
}

.team-project-summary,
.team-project-next {
  line-height: 1.6;
  margin: 0;
}

.team-project-records {
  display: grid;
  gap: 8px;
}

.team-project-records span {
  background: rgba(243, 247, 244, 0.9);
  border: 1px solid rgba(221, 231, 225, 0.92);
  border-radius: 8px;
  line-height: 1.5;
  padding: 8px 10px;
}

.team-project-records em {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-style: normal;
  margin-bottom: 3px;
}

.team-project-open {
  justify-self: flex-start;
}

.team-project-tasks {
  display: grid;
  gap: 8px;
}

.feedback-panel {
  margin-top: 4px;
}

.feedback-form {
  display: grid;
  gap: 10px;
}

.feedback-form textarea {
  min-height: 92px;
  resize: vertical;
}

.feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.file-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.feedback-preview {
  width: min(260px, 100%);
  max-height: 180px;
  border: 1px solid var(--line);
  border-radius: 16px;
  object-fit: cover;
  background: var(--panel);
}

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

.feedback-item {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(20, 31, 54, 0.08);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.feedback-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feedback-item-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.feedback-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
}

.feedback-item img {
  width: min(320px, 100%);
  max-height: 220px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.member-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(29, 29, 31, 0.045);
}

.member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.member-head strong {
  color: var(--text);
  font-size: 16px;
}

.team-task {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 0;
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: left;
  background: var(--panel-soft);
}

.team-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-task-top em {
  color: var(--subtle);
  font-size: 12px;
  font-style: normal;
}

.team-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.team-status.waiting {
  background: var(--amber-soft);
  color: var(--amber);
}

.team-status.done {
  background: var(--blue-soft);
  color: var(--blue);
}

.team-status.deferred {
  background: var(--violet-soft);
  color: var(--violet);
}

.team-status.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.team-task-title {
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.team-task-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.team-task-history {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(120, 138, 130, 0.28);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.team-task-history span {
  display: block;
  overflow-wrap: anywhere;
}

.team-task-history em {
  display: inline;
  margin-right: 6px;
  color: var(--subtle);
  font-style: normal;
}

.invite-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px auto;
  gap: 10px;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.mini-row strong {
  color: var(--text);
}

.mini-row.admin-user-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.8fr) auto;
  align-items: center;
}

.admin-user-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-row input {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mini-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

dialog {
  width: min(760px, calc(100% - 22px));
  max-height: min(88vh, 840px);
  border: 0;
  border-radius: 26px;
  padding: 0;
  background: transparent;
}

#importDialog,
#reviewDialog {
  width: min(980px, calc(100% - 22px));
}

dialog::backdrop {
  background: rgba(29, 29, 31, 0.32);
  backdrop-filter: blur(8px);
}

.dialog-card {
  display: grid;
  gap: 14px;
  max-height: min(88vh, 840px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(222, 222, 227, 0.85);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.dialog-head button {
  flex: 0 0 auto;
}

label {
  display: grid;
  gap: 7px;
  color: #3f3f45;
  font-size: 13px;
  font-weight: 720;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-box,
.wait-box {
  display: grid;
  gap: 10px;
  padding: 13px;
  border-radius: var(--radius-md);
  background: var(--blue-soft);
}

.share-box {
  background: var(--violet-soft);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.checkline input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.record-history-box {
  background: #f6f8fb;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  padding: 14px;
}

.record-history-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.record-history {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
}

.record-item {
  background: #ffffff;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  padding: 10px 12px;
}

.record-item p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.record-time,
.record-empty {
  color: var(--muted);
  font-size: 13px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, max-content));
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  padding-top: 2px;
}

.dialog-actions button,
.task-actions button,
.tool-actions button,
.top-actions button,
.filter-card button,
.invite-row button {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1080px) {
  .topbar {
    align-items: start;
  }

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

  .timer-main {
    min-height: 250px;
  }

  .timer-side {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    align-items: end;
  }
}

@media (max-width: 960px) {
  .dialog-actions,
  .task-actions,
  .tool-actions,
  .timer-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    justify-content: stretch;
  }

  .dialog-actions button,
  .task-actions button,
  .tool-actions button,
  .timer-actions button {
    width: 100%;
    min-width: 0;
  }

  .break-card {
    width: min(720px, calc(100% - 24px));
  }
}

.wide-dialog {
  width: 100%;
}

.settings-details {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.settings-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.eye-rest-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
}

.eye-rest-dialog::backdrop {
  background: rgba(222, 244, 226, 0.96);
}

.eye-rest-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  width: 100vw;
  height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.9), transparent 24%),
    radial-gradient(circle at 26% 34%, rgba(167, 220, 192, 0.38), transparent 32%),
    linear-gradient(180deg, rgba(238, 249, 238, 0.98) 0%, rgba(216, 239, 219, 0.98) 100%);
  color: #163f2a;
  text-align: center;
}

.eye-rest-card::before,
.eye-rest-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -18% -10%;
  height: 42vh;
  pointer-events: none;
  background:
    radial-gradient(80% 90% at 18% 80%, rgba(46, 125, 90, 0.16), transparent 70%),
    radial-gradient(62% 86% at 72% 78%, rgba(63, 167, 118, 0.14), transparent 68%);
  border-radius: 50% 50% 0 0;
  filter: blur(0.2px);
}

.eye-rest-card::after {
  inset: -12% -8% auto auto;
  width: 38vw;
  height: 38vw;
  border: 1px solid rgba(46, 125, 90, 0.12);
  background: rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.eye-rest-card h2 {
  position: relative;
  font-size: clamp(32px, 7vw, 72px);
}

.eye-rest-countdown {
  position: relative;
  min-width: min(520px, calc(100vw - 48px));
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(46, 125, 90, 0.16);
  font-size: clamp(72px, 18vw, 160px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.eye-rest-card p,
.eye-rest-card button,
.eye-rest-card .eyebrow {
  position: relative;
}

@media (min-width: 860px) {
  .task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-list.grouped {
    grid-template-columns: 1fr;
  }

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

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

@media (min-width: 1120px) {
  .app-shell {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  .topbar {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .view.active {
    gap: 18px;
  }

  .hero-card {
    min-height: 138px;
    border-radius: 24px;
    padding: 24px 30px;
  }

  .hero-card h2 {
    font-size: 36px;
    line-height: 1.16;
  }

  .metric-row article,
  .team-summary article {
    min-height: 74px;
    padding: 14px 18px;
  }

  .quick-add,
  .filter-card,
  .admin-panel,
  .feedback-panel,
  .tool-card {
    border-radius: 22px;
    padding: 16px 18px;
  }

  .quick-add {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
    align-items: stretch;
  }

  .quick-add textarea {
    min-height: 78px;
  }

  .inline-fields {
    align-content: center;
  }

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

  .task-list.grouped {
    grid-template-columns: 1fr;
  }

  .task-group-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #todayList {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-card {
    min-height: 154px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .app-shell {
    padding-inline: 12px;
  }

  .topbar {
    align-items: start;
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions button {
    min-height: 34px;
    padding: 0 10px;
  }

  .user-badge {
    max-width: 108px;
  }

  .app-tabs {
    gap: 4px;
  }

  .app-tabs button {
    min-height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  .hongying-key-row {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 24px;
  }

  .hero-card h2 {
    font-size: 30px;
  }

  .metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .team-summary {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .metric-row article,
  .team-summary article {
    min-height: 76px;
    padding: 12px 10px;
  }

  .metric-row strong,
  .team-summary strong {
    font-size: 26px;
  }

  .inline-fields,
  .filter-card,
  .invite-row,
  .grid-2,
  .candidate-grid,
  .timer-side,
  .timer-settings {
    grid-template-columns: 1fr;
  }

  .filter-card button {
    width: 100%;
  }

  .section-head {
    align-items: start;
  }

  .task-card {
    border-radius: 18px;
  }

  .timer-main {
    min-height: 220px;
  }

  .timer-display {
    font-size: clamp(54px, 18vw, 92px);
  }

  .dialog-card {
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .topbar {
    display: grid;
  }

  .top-actions {
    justify-content: start;
  }

  .metric-row,
  .team-summary {
    grid-template-columns: 1fr;
  }

  .task-actions,
  .dialog-actions,
  .tool-actions,
  .feedback-actions,
  .timer-actions {
    justify-content: stretch;
  }

  .task-actions button,
  .dialog-actions button,
  .tool-actions button,
  .feedback-actions button,
  .timer-actions button {
    flex: 1 1 auto;
  }
}
