:root {
  --bg: #eee7dc;
  --bg-soft: #e3dacd;
  --surface: rgba(255, 253, 249, 0.84);
  --surface-strong: rgba(255, 255, 253, 0.96);
  --line: rgba(90, 83, 70, 0.12);
  --text: #1f2430;
  --muted: #68707d;
  --accent: #204f46;
  --accent-soft: #d6e5de;
  --accent-strong: #173a34;
  --gold: #b58853;
  --shadow: 0 26px 72px rgba(45, 38, 26, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-sans: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(181, 136, 83, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(32, 79, 70, 0.08), transparent 22%),
    linear-gradient(180deg, #fbf7f0 0%, #f2ece3 48%, var(--bg) 100%);
  transition:
    background 560ms cubic-bezier(0.22, 1, 0.36, 1),
    color 320ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 78%);
  pointer-events: none;
  transition:
    background-image 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms ease;
}

body::after {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.08);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 244, 225, 0.42), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(198, 213, 230, 0.28), transparent 24%),
    radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.18), transparent 34%);
  filter: blur(22px);
}

body[data-theme="dark"]::after {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(187, 163, 138, 0.16), transparent 24%),
    radial-gradient(circle at 50% 70%, rgba(160, 169, 184, 0.12), transparent 34%);
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.glass {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 20px;
  margin-bottom: 20px;
}

.hero__copy,
.hero__panel,
.panel,
.stat-card {
  border-radius: var(--radius-xl);
}

.hero__copy {
  padding: 40px;
  background: linear-gradient(145deg, rgba(255, 252, 246, 0.9), rgba(241, 235, 224, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.hero__copy h1,
.panel__heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero__copy h1 {
  max-width: 11ch;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 1.03;
}

.hero__text {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero__chip,
.panel__tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

.hero__panel {
  padding: 28px;
  display: grid;
  gap: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.9), rgba(246, 240, 231, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.hero__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: auto;
  padding: 2px 4px 16px;
  border: none;
  background: none;
  color: color-mix(in srgb, var(--text) 82%, var(--muted) 18%);
  font-size: clamp(1.45rem, 2vw, 1.72rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.2;
  box-shadow: none;
}

.hero__date::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 88px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(90, 83, 70, 0.36), transparent);
  transform: translateX(-50%);
}

.hero__main-stat {
  display: grid;
  gap: 8px;
}

.hero__main-stat span,
.stat-card span,
.task-item__delete,
.record-item__meta,
.week-card__date,
.report-card span,
.timer-foot span,
.calendar-day__meta {
  color: var(--muted);
}

.hero__main-stat strong {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  line-height: 1;
  font-family: var(--font-serif);
  font-weight: 600;
}

.hero__progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  overflow: hidden;
}

.hero__progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e6a5f, var(--accent));
  transition: width 280ms ease;
}

.hero__install-note {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.dashboard {
  display: grid;
  gap: 20px;
}

.sync-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  padding: 24px;
}

.sync-shell__intro,
.sync-shell__account {
  min-width: 0;
}

.sync-shell__intro h2,
.auth-card__header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sync-shell__intro h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.sync-shell__text {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.sync-shell__features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.sync-shell__features span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent);
}

.auth-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  min-height: 100%;
}

.auth-card.is-hidden {
  display: none;
}

.auth-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

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

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

.auth-form span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-card__message {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card__message--account {
  margin-top: 16px;
  font-size: 0.96rem;
  line-height: 1.8;
}

.auth-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.auth-summary div {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.64);
  display: grid;
  gap: 8px;
}

.auth-summary span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-summary strong {
  font-size: 1.05rem;
  line-height: 1.5;
  word-break: break-word;
}

.sync-actions {
  margin-top: 4px;
  gap: 12px;
}

.sync-actions .button {
  min-width: 136px;
  min-height: 56px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.sync-actions .button--primary {
  background: rgba(32, 34, 39, 0.94);
  color: #f7f4ef;
}

.sync-actions .button--secondary {
  background: rgba(32, 34, 39, 0.05);
  color: #314944;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 39, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.stat-card strong {
  font-size: 2rem;
  font-family: var(--font-serif);
  font-weight: 600;
}

.content-grid,
.feature-grid {
  display: grid;
  gap: 20px;
}

.content-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.feature-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.panel {
  padding: 24px;
}

.panel__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel__heading > div {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel__heading h2 {
  font-size: 2rem;
}

.panel__heading--calendar {
  align-items: center;
}

.panel--form {
  grid-row: span 2;
}

.panel--report {
  grid-column: span 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--gold);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  line-height: 1;
  opacity: 0.88;
  transform: translateY(-5px);
  text-transform: uppercase;
}

.eyebrow + h1,
.eyebrow + h2,
.eyebrow + h3,
.eyebrow + h4,
.eyebrow + p {
  margin-top: 6px;
}

.panel__heading .panel__tag {
  align-self: flex-start;
  margin-top: 2px;
}

.study-form,
.task-form {
  display: grid;
  gap: 16px;
}

.study-form__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.study-form label,
.task-form,
.task-form input {
  width: 100%;
}

.study-form label,
.task-form input {
  display: grid;
  gap: 10px;
}

.study-form span {
  font-size: 0.92rem;
  color: var(--muted);
}

.field-with-unit {
  position: relative;
}

.field-with-unit input {
  padding-right: 78px;
}

.field-with-unit__suffix {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
  pointer-events: none;
}

input,
textarea,
select {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(32, 79, 70, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(32, 79, 70, 0.12);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

.button,
.icon-button,
.mode-pill,
.calendar-day {
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, background 180ms ease;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  cursor: pointer;
}

.button:hover,
.icon-button:hover,
.mode-pill:hover,
.calendar-day:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, #244f47, #183c36);
  color: #f7f2ea;
  box-shadow: 0 18px 38px rgba(32, 79, 70, 0.22);
}

.button--secondary {
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent);
}

.task-form {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 18px;
}

.task-list,
.record-list,
.topic-breakdown {
  display: grid;
  gap: 14px;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.task-item__toggle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(32, 79, 70, 0.22);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.task-item.is-complete .task-item__toggle {
  background: var(--accent);
  border-color: var(--accent);
}

.task-item.is-complete .task-item__toggle::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #f6f0e7;
}

.task-item.is-complete .task-item__text {
  text-decoration: line-through;
  color: var(--muted);
}

.task-item__delete {
  border: none;
  background: transparent;
  cursor: pointer;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.week-card {
  padding: 18px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.64);
  min-height: 126px;
  display: grid;
  align-content: space-between;
}

.week-card__bar {
  margin-top: 16px;
  height: 90px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.week-card__fill {
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #79a89d, var(--accent));
  min-height: 6px;
}

.week-card.is-today {
  outline: 1px solid rgba(181, 136, 83, 0.28);
  box-shadow: inset 0 0 0 1px rgba(181, 136, 83, 0.14);
}

.record-list:empty::before,
.task-list:empty::before,
.topic-breakdown:empty::before {
  content: "还没有内容，先从今天开始。";
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
}

.record-item {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.record-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

.record-item__title {
  margin: 12px 0 8px;
  font-size: 1.2rem;
}

.record-item p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.record-item__reflection,
.record-item__next {
  color: var(--muted);
}

.timer-modes,
.timer-actions,
.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.timer-custom__field {
  display: grid;
  gap: 10px;
}

.timer-custom__field span,
.timer-custom__hint {
  color: var(--muted);
}

.timer-custom__hint {
  margin: 12px 0 0;
  line-height: 1.6;
}

.timer-custom__apply {
  min-height: 54px;
}

.mode-pill,
.icon-button {
  border: none;
  cursor: pointer;
}

.mode-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent);
}

.mode-pill.is-active {
  background: linear-gradient(135deg, rgba(32, 79, 70, 0.18), rgba(32, 79, 70, 0.1));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.14);
}

.timer-display {
  margin: 26px 0 10px;
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  font-family: var(--font-serif);
  line-height: 1;
  letter-spacing: -0.05em;
}

.timer-status {
  min-height: 48px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.timer-actions {
  margin-bottom: 18px;
}

.timer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.timer-foot strong {
  font-size: 1.4rem;
  font-family: var(--font-serif);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-size: 1.3rem;
}

.panel__tag--month {
  min-width: 0;
  justify-content: center;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 44px minmax(148px, auto) 44px;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.calendar-nav .icon-button {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-strong);
  font-size: 1.08rem;
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.08);
}

.calendar-nav .panel__tag--month {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: color-mix(in srgb, var(--text) 84%, var(--muted) 16%);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.calendar-nav .panel__tag--month.is-month-switching {
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.calendar-nav .panel__tag--month.is-month-switching.is-next {
  animation-name: calendar-label-next;
}

.calendar-nav .panel__tag--month.is-month-switching.is-prev {
  animation-name: calendar-label-prev;
}

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

.calendar-grid.is-month-switching {
  animation-duration: 380ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

.calendar-grid.is-month-switching.is-next {
  animation-name: calendar-month-next;
}

.calendar-grid.is-month-switching.is-prev {
  animation-name: calendar-month-prev;
}

.calendar-weekdays {
  margin-bottom: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.calendar-day {
  min-height: 96px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.calendar-day.is-outside {
  opacity: 0.45;
}

.calendar-day.is-selected {
  background: linear-gradient(180deg, rgba(214, 229, 222, 0.95), rgba(255, 255, 255, 0.86));
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.16);
}

.calendar-day.is-today {
  outline: 1px solid rgba(181, 136, 83, 0.34);
}

.calendar-day__number {
  display: block;
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0;
}

.calendar-day__meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1;
  white-space: nowrap;
}

.calendar-day__meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}

.calendar-day.has-entry .calendar-day__meta {
  background: rgba(32, 79, 70, 0.12);
  color: var(--accent);
}

.calendar-detail,
.report-insight {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
  line-height: 1.7;
}

.calendar-detail h3,
.report-insight h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.calendar-detail.is-revealing {
  animation: calendar-detail-reveal 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

.calendar-detail__subtitle {
  margin: 0;
  color: var(--muted);
}

.calendar-detail__badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent);
  font-size: 0.84rem;
  white-space: nowrap;
}

.calendar-detail__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.calendar-detail__stat {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.66);
  display: grid;
  gap: 8px;
}

.calendar-detail__stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.calendar-detail__stat strong {
  font-size: 1rem;
  line-height: 1.5;
}

.calendar-detail__section {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.calendar-detail__section h4 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.calendar-detail__tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.calendar-detail__task {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.calendar-detail__task.is-complete {
  color: var(--muted);
}

.calendar-detail__task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

.calendar-detail__task.is-complete .calendar-detail__task-dot {
  background: var(--gold);
}

.calendar-detail__empty {
  margin: 0;
  color: var(--muted);
}

.calendar-detail p,
.report-insight p {
  margin: 8px 0 0;
  color: var(--muted);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.report-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.64);
  display: grid;
  gap: 10px;
}

.report-card strong {
  font-size: 1.35rem;
  line-height: 1.3;
  font-family: var(--font-serif);
}

.topic-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
}

.topic-item__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.topic-item__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  overflow: hidden;
}

.topic-item__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #86afa5, var(--accent));
}

@media (max-width: 1120px) {
  .sync-shell,
  .hero,
  .content-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .report-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .panel--report {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 16px, 100%);
    padding-top: 12px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }

  .hero__copy,
  .hero__panel,
  .sync-shell,
  .auth-card,
  .panel,
  .stat-card {
    padding: 20px;
    border-radius: 24px;
  }

  .hero__copy h1 {
    max-width: 100%;
    font-size: 2.8rem;
  }

  .stats-grid,
  .auth-summary,
  .study-form__row,
  .task-form,
  .week-strip,
  .report-grid,
  .calendar-weekdays,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-day {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .calendar-day__number {
    margin-bottom: 0;
  }

  .task-form,
  .auth-form__actions,
  .timer-actions,
  .timer-custom {
    gap: 12px;
  }

  .auth-form__actions .button,
  .task-form .button,
  .timer-actions .button,
  .timer-actions .button,
  .timer-modes .mode-pill,
  .timer-custom__apply {
    width: 100%;
    justify-content: center;
  }

  .timer-modes,
  .timer-actions {
    flex-direction: column;
  }

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

  .panel__heading--calendar {
    align-items: flex-start;
    gap: 16px;
  }

  .calendar-nav {
    width: 100%;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 10px;
  }

  .panel__tag--month {
    width: 100%;
    border-radius: 999px;
  }

  .calendar-nav .icon-button {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .calendar-detail__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-detail__stats {
    grid-template-columns: 1fr;
  }

  .timer-display {
    font-size: 4rem;
  }

  .week-card {
    min-height: auto;
  }

  .week-card__bar {
    height: 52px;
  }
}

.is-hidden {
  display: none !important;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.management-grid,
.analytics-grid {
  display: grid;
  gap: 20px;
}

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

.auth-divider {
  height: 1px;
  margin: 22px 0 18px;
  background: linear-gradient(90deg, rgba(32, 79, 70, 0.02), rgba(32, 79, 70, 0.18), rgba(32, 79, 70, 0.02));
}

.recovery-form__header,
.analytics-card__header,
.profile-preview,
.auth-identity,
.profile-preview__copy,
.auth-identity__copy {
  display: flex;
}

.recovery-form__header,
.analytics-card__header,
.auth-identity {
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.recovery-form__header h4,
.analytics-card__header h3 {
  margin: 0;
  font-size: 1rem;
}

.recovery-form__header span,
.auth-card__hint,
.profile-note,
.export-note,
.analytics-card__header span {
  color: var(--muted);
}

.auth-card__hint,
.profile-note,
.export-note {
  margin: 14px 0 0;
  line-height: 1.7;
}

.auth-identity {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.auth-identity__avatar,
.profile-preview__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(32, 79, 70, 0.16), rgba(181, 136, 83, 0.2));
  font-size: 1.8rem;
  flex-shrink: 0;
}

.auth-identity__avatar.has-image,
.profile-preview__avatar.has-image {
  padding: 0;
  overflow: hidden;
}

.auth-identity__avatar img,
.profile-preview__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-identity__copy,
.profile-preview__copy {
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.auth-identity__copy strong,
.profile-preview__copy strong {
  font-size: 1.08rem;
}

.auth-identity__copy span,
.profile-preview__copy span {
  color: var(--muted);
  word-break: break-word;
}

.panel__tag--status {
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent);
}

.profile-empty,
.profile-form {
  display: grid;
  gap: 16px;
}

.profile-empty {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
}

.profile-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.profile-preview {
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.profile-form label,
.profile-form__section,
.profile-file-upload {
  display: grid;
  gap: 10px;
}

.profile-form__section > span {
  font-size: 0.92rem;
  color: var(--muted);
}

.profile-file-upload > span {
  font-size: 0.92rem;
  color: var(--muted);
}

.file-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.74);
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
}

.file-upload:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(32, 34, 39, 0.08);
}

.file-upload__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(32, 34, 39, 0.94);
  color: #f8f5f0;
  font-weight: 600;
  white-space: nowrap;
}

.file-upload__name {
  min-width: 0;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.file-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.avatar-option {
  min-height: 54px;
  border: 1px solid rgba(32, 79, 70, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 1.4rem;
}

.avatar-option.is-selected {
  background: linear-gradient(180deg, rgba(214, 229, 222, 0.95), rgba(255, 255, 255, 0.86));
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.18);
}

.export-grid,
.analytics-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.export-actions {
  margin-top: 18px;
}

.analytics-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
}

.analytics-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.trend-chart,
.analytics-topic-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.trend-chart {
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
}

.trend-chart__item {
  display: grid;
  gap: 10px;
  align-items: end;
}

.trend-chart__item.is-today .trend-chart__fill {
  background: linear-gradient(180deg, #d3ab78, #b58853);
}

.trend-chart__value,
.trend-chart__label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.trend-chart__bar {
  height: 180px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.trend-chart__fill {
  width: 100%;
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, #86afa5, var(--accent));
}

.analytics-topic-item {
  display: grid;
  gap: 8px;
}

.analytics-topic-item__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.analytics-topic-item__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  overflow: hidden;
}

.analytics-topic-item__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d0ab7b, var(--accent));
}

@media (max-width: 1120px) {
  .management-grid,
  .analytics-layout,
  .community-grid,
  .community-thread-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .management-grid,
  .export-grid,
  .analytics-summary,
  .avatar-picker,
  .trend-chart {
    grid-template-columns: 1fr;
  }

  .auth-identity,
  .profile-preview,
  .recovery-form__header,
  .analytics-card__header,
  .community-form__footer,
  .community-card__header,
  .community-topic__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-identity__avatar,
  .profile-preview__avatar {
    width: 56px;
    height: 56px;
  }

  .trend-chart__bar {
    height: 56px;
  }

  .community-form__footer .button,
  .community-reply-form .button {
    width: 100%;
  }
}

body {
  transition: background 260ms ease, color 220ms ease;
}

body::before {
  transition: opacity 220ms ease;
}

.site-topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: 22px;
}

.site-topbar__brand,
.site-topbar__copy,
.site-topbar__actions {
  display: flex;
  align-items: center;
}

.site-topbar__brand {
  gap: 14px;
}

.site-topbar__copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.site-topbar__copy strong {
  font-size: 1rem;
}

.site-topbar__copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-topbar__mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(32, 34, 39, 0.96);
  border: 1px solid rgba(32, 34, 39, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 24px rgba(15, 17, 20, 0.12);
  color: #f6f3ee;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.theme-toggle,
.app-nav__item {
  border: none;
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.theme-toggle__icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 320ms ease,
    opacity 220ms ease;
}

.theme-toggle__glyph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition:
    opacity 280ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle__glyph--moon {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

.theme-toggle__glyph--sun {
  opacity: 0;
  transform: translateY(18%) scale(0.72) rotate(-45deg);
}

body[data-theme="dark"] .theme-toggle__glyph--moon {
  opacity: 0;
  transform: translateY(-18%) scale(0.72) rotate(36deg);
}

body[data-theme="dark"] .theme-toggle__glyph--sun {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

.theme-toggle.is-switching .theme-toggle__icon {
  animation: theme-icon-swap 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-layout,
.app-frame {
  display: grid;
  gap: 20px;
}

.auth-layout__intro {
  padding: 36px 40px;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 18px;
}

.auth-layout__intro h1,
.home-focus h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.auth-layout__text,
.home-focus__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.app-nav {
  position: sticky;
  top: 96px;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
}

.app-nav__item {
  padding: 14px 16px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.app-nav__item.is-active {
  background: linear-gradient(135deg, rgba(32, 79, 70, 0.16), rgba(181, 136, 83, 0.14));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.12);
}

.app-nav__item.is-open {
  background: linear-gradient(135deg, rgba(32, 79, 70, 0.16), rgba(181, 136, 83, 0.14));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.12);
}

.app-section {
  display: none;
}

.app-section.is-active {
  display: grid;
  gap: 20px;
  animation: section-fade 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero--home {
  margin-bottom: 0;
}

.home-focus,
.focus-grid,
.account-grid,
.log-grid,
.updates-grid,
.community-grid,
.community-thread-layout {
  display: grid;
  gap: 20px;
}

.home-focus {
  grid-template-columns: 1.05fr 0.95fr;
}

.home-focus__card,
.home-focus__actions {
  padding: 28px;
  border-radius: var(--radius-xl);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.log-grid {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}

.log-stack,
.focus-grid__main {
  display: grid;
  gap: 20px;
}

.focus-grid {
  grid-template-columns: 0.95fr 1.05fr;
  align-items: start;
}

.account-grid {
  grid-template-columns: 0.92fr 1.08fr;
  align-items: start;
}

.updates-grid {
  grid-template-columns: 0.92fr 1.08fr;
  align-items: start;
}

.community-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.community-discussion {
  display: grid;
}

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

.community-form label,
.community-reply-form label {
  display: grid;
  gap: 10px;
}

.community-form span,
.community-reply-form span,
.community-form__hint {
  color: var(--muted);
}

.community-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.community-form__hint {
  margin: 0;
  line-height: 1.7;
}

.community-form--discussion {
  margin-bottom: 22px;
}

.community-list,
.community-topic-list,
.community-thread__list {
  display: grid;
  gap: 14px;
}

.community-list {
  margin-top: 18px;
}

.community-card,
.community-topic,
.community-thread__card,
.community-thread__empty {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.community-card__header,
.community-topic__header,
.community-thread__header,
.community-meta {
  display: flex;
  align-items: center;
}

.community-card__header,
.community-topic__header,
.community-thread__header {
  justify-content: space-between;
  gap: 12px;
}

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

.community-author__avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(32, 79, 70, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.community-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-author__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.community-author__copy strong,
.community-topic__title,
.community-thread__title {
  margin: 0;
}

.community-author__copy span,
.community-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.community-card__content,
.community-topic__content,
.community-thread__content {
  margin: 14px 0 0;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.community-meta__pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
}

.community-delete {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.community-topic-list {
  align-content: start;
}

.community-topic {
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.community-topic.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.9), rgba(244, 238, 229, 0.78));
  box-shadow: inset 0 0 0 1px rgba(32, 79, 70, 0.14);
}

.community-topic__title,
.community-thread__title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.community-thread {
  display: grid;
  gap: 18px;
}

.community-thread__body {
  min-height: 180px;
}

.community-thread__empty {
  color: var(--muted);
  line-height: 1.8;
}

.community-thread__head {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.community-reply-form {
  display: grid;
  gap: 14px;
}

.community-reply-target {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent-strong);
}

.community-reply-target.is-hidden {
  display: none;
}

.community-reply-target__clear,
.community-action {
  border: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.community-reply-target__clear {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
}

.community-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent);
}

.community-action.is-active {
  background: rgba(32, 79, 70, 0.16);
  color: var(--accent-strong);
}

.community-reply-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.announcement-featured,
.announcement-list {
  display: grid;
  gap: 16px;
}

.announcement-empty {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  line-height: 1.8;
}

.announcement-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.announcement-card--featured {
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.92), rgba(247, 241, 232, 0.8));
}

.announcement-card__header,
.announcement-card__meta,
.announcement-card__chips {
  display: flex;
}

.announcement-card__header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.announcement-card__header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.announcement-card__eyebrow + h3 {
  margin-top: 6px;
}

.announcement-card__eyebrow {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.announcement-card__meta {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--muted);
  white-space: nowrap;
}

.announcement-card__meta strong {
  color: var(--text);
  font-size: 1rem;
}

.announcement-card__chips {
  flex-wrap: wrap;
  gap: 10px;
}

.announcement-card__chips span,
.announcement-block__title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(32, 79, 70, 0.08);
  color: var(--accent-strong);
}

.announcement-card__sections {
  display: grid;
  gap: 14px;
}

.announcement-block {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
}

.announcement-block__title {
  font-size: 0.9rem;
}

.announcement-block__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  line-height: 1.7;
}

.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.announcement-modal.is-active {
  display: grid;
  place-items: center;
}

.announcement-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 20, 0.42);
  backdrop-filter: blur(10px);
}

.announcement-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 32px));
  max-height: min(86vh, 920px);
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 30px;
  overflow: hidden;
  animation: section-fade 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.announcement-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-modal__header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 2rem;
}

.announcement-modal__body {
  overflow: auto;
  display: grid;
  gap: 20px;
  padding: 0 24px 24px;
}

.announcement-modal__close {
  display: grid;
  place-items: center;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 220ms ease,
    box-shadow 220ms ease;
}

.announcement-modal__close::before,
.announcement-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.announcement-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.announcement-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.announcement-modal__close:hover {
  transform: translateY(-1px);
}

.announcement-modal__close:active {
  transform: translateY(1px) scale(0.985);
}

.has-modal-open {
  overflow: hidden;
}

.site-signoff {
  display: flex;
  justify-content: center;
  padding: 18px 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.button,
.icon-button,
.mode-pill,
.calendar-day,
.app-nav__item,
.theme-toggle,
.avatar-option,
.task-item__toggle,
.task-item__delete {
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    opacity 180ms ease,
    background 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.button {
  position: relative;
  overflow: hidden;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.2) 50%, transparent 82%);
  opacity: 0;
  transform: translateX(-30%);
  transition: opacity 180ms ease, transform 280ms ease;
  pointer-events: none;
}

.button:hover::before {
  opacity: 1;
  transform: translateX(16%);
}

.button:active,
.icon-button:active,
.mode-pill:active,
.calendar-day:active,
.app-nav__item:active,
.theme-toggle:active,
.avatar-option:active,
.task-item__toggle:active,
.task-item__delete:active {
  transform: translateY(1px) scale(0.985);
}

.button--secondary {
  background: rgba(32, 79, 70, 0.09);
}

.hero__progress-fill {
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-theme-switching,
body.is-theme-switching *,
body.is-theme-switching *::before,
body.is-theme-switching *::after {
  transition-property: background, background-color, color, border-color, box-shadow, opacity, filter;
  transition-duration: 520ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-theme-switching::after {
  animation: theme-sheen 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes section-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes theme-sheen {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }

  18% {
    opacity: 0.75;
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes theme-icon-swap {
  0% {
    transform: rotate(0deg) scale(1);
  }

  35% {
    transform: rotate(-10deg) scale(0.9);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes calendar-month-next {
  0% {
    opacity: 0.36;
    transform: translateX(22px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes calendar-month-prev {
  0% {
    opacity: 0.36;
    transform: translateX(-22px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes calendar-label-next {
  0% {
    opacity: 0.55;
    transform: translateX(10px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-label-prev {
  0% {
    opacity: 0.55;
    transform: translateX(-10px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-detail-reveal {
  0% {
    opacity: 0.5;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after,
  .theme-toggle__icon,
  .calendar-grid,
  .calendar-nav .panel__tag--month,
  .calendar-detail {
    transition: none !important;
    animation: none !important;
  }
}

body[data-theme="dark"] {
  --bg: #111214;
  --bg-soft: #181a1d;
  --surface: rgba(28, 30, 34, 0.76);
  --surface-strong: rgba(34, 36, 41, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f3f5;
  --muted: #a5a9b2;
  --accent: #b7bcc6;
  --accent-soft: rgba(183, 188, 198, 0.14);
  --accent-strong: #f5f7fa;
  --gold: #bba38a;
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 24%),
    radial-gradient(circle at top right, rgba(187, 163, 138, 0.08), transparent 18%),
    linear-gradient(180deg, #18191c 0%, var(--bg) 50%, #0d0e10 100%);
}

body[data-theme="dark"]::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  opacity: 0.7;
}

body[data-theme="dark"] .glass,
body[data-theme="dark"] .hero__copy,
body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .auth-summary div,
body[data-theme="dark"] .task-item,
body[data-theme="dark"] .record-item,
body[data-theme="dark"] .week-card,
body[data-theme="dark"] .report-card,
body[data-theme="dark"] .analytics-card,
body[data-theme="dark"] .calendar-day,
body[data-theme="dark"] .calendar-detail,
body[data-theme="dark"] .report-insight,
body[data-theme="dark"] .timer-foot,
body[data-theme="dark"] .profile-preview,
body[data-theme="dark"] .auth-identity,
body[data-theme="dark"] .topic-item,
body[data-theme="dark"] .record-list:empty::before,
body[data-theme="dark"] .task-list:empty::before,
body[data-theme="dark"] .topic-breakdown:empty::before {
  background: rgba(30, 32, 36, 0.84);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .hero__chip,
body[data-theme="dark"] .panel__tag,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .mode-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .hero__date {
  background: none;
  color: rgba(245, 247, 250, 0.95);
  box-shadow: none;
}

body[data-theme="dark"] .hero__date::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: rgba(242, 243, 245, 0.38);
}

body[data-theme="dark"] .button--secondary,
body[data-theme="dark"] .sync-shell__features span,
body[data-theme="dark"] .calendar-day__meta,
body[data-theme="dark"] .app-nav__item.is-active,
body[data-theme="dark"] .app-nav__item.is-open,
body[data-theme="dark"] .announcement-card__chips span,
body[data-theme="dark"] .announcement-block__title {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-strong);
}

body[data-theme="dark"] .field-with-unit__suffix {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.78);
}

body[data-theme="dark"] .calendar-nav {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .calendar-day__number {
  color: rgba(245, 247, 250, 0.92);
}

body[data-theme="dark"] .calendar-day.is-outside .calendar-day__number {
  color: rgba(245, 247, 250, 0.34);
}

body[data-theme="dark"] .calendar-detail__badge,
body[data-theme="dark"] .calendar-detail__stat,
body[data-theme="dark"] .calendar-detail__section {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .calendar-detail__badge {
  color: rgba(245, 247, 250, 0.9);
}

body[data-theme="dark"] .calendar-nav .panel__tag--month {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.94);
}

body[data-theme="dark"] .calendar-nav .icon-button {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .community-card,
body[data-theme="dark"] .community-topic,
body[data-theme="dark"] .community-thread__card,
body[data-theme="dark"] .community-thread__empty {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .community-topic.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .community-author__avatar,
body[data-theme="dark"] .community-meta__pill {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .community-action,
body[data-theme="dark"] .community-reply-chip,
body[data-theme="dark"] .community-reply-target {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.9);
}

body[data-theme="dark"] .community-reply-target__clear {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(245, 247, 250, 0.92);
}

body[data-theme="dark"] .button--primary {
  background: linear-gradient(135deg, #eceef2, #bcc2cc);
  color: #111214;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .sync-actions .button--primary {
  background: rgba(244, 245, 247, 0.94);
  color: #111214;
  box-shadow: none;
}

body[data-theme="dark"] .sync-actions .button--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .hero__progress-track,
body[data-theme="dark"] .week-card__bar,
body[data-theme="dark"] .topic-item__bar,
body[data-theme="dark"] .trend-chart__bar,
body[data-theme="dark"] .analytics-topic-item__bar {
  background: rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .announcement-card,
body[data-theme="dark"] .announcement-empty,
body[data-theme="dark"] .announcement-block {
  background: rgba(33, 35, 39, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .announcement-card--featured {
  background: linear-gradient(180deg, rgba(42, 45, 50, 0.94), rgba(31, 33, 38, 0.86));
}

body[data-theme="dark"] .announcement-modal__backdrop {
  background: rgba(6, 7, 9, 0.58);
}

body[data-theme="dark"] .announcement-modal__close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body[data-theme="dark"] .file-upload {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .file-upload__button {
  background: rgba(244, 245, 247, 0.94);
  color: #111214;
}

body[data-theme="dark"] .file-upload__name {
  color: var(--muted);
}

body[data-theme="dark"] .site-topbar__mark {
  background: rgba(244, 245, 247, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 10px 24px rgba(0, 0, 0, 0.22);
  color: #111214;
}

body[data-theme="dark"] .auth-divider {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}

body[data-theme="dark"] .task-item__delete,
body[data-theme="dark"] .record-item__meta,
body[data-theme="dark"] .week-card__date,
body[data-theme="dark"] .week-card__minutes,
body[data-theme="dark"] .analytics-card__header span,
body[data-theme="dark"] .export-note,
body[data-theme="dark"] .profile-note,
body[data-theme="dark"] .auth-card__hint,
body[data-theme="dark"] .calendar-detail p,
body[data-theme="dark"] .report-insight p {
  color: var(--muted);
}

body[data-theme="dark"] .task-item.is-complete .task-item__toggle::after {
  background: #141519;
}

@media (max-width: 1120px) {
  .home-focus,
  .log-grid,
  .focus-grid,
  .account-grid,
  .updates-grid,
  .community-grid,
  .community-thread-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-topbar {
    top: max(8px, env(safe-area-inset-top));
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 18px;
  }

  .site-topbar,
  .site-topbar__brand,
  .site-topbar__actions,
  .auth-layout__intro,
  .home-actions,
  .app-nav {
    gap: 12px;
  }

  .site-topbar {
    align-items: center;
    flex-direction: row;
  }

  .site-topbar__brand {
    min-width: 0;
    flex: 1;
    align-items: center;
  }

  .site-topbar__copy {
    min-width: 0;
    gap: 2px;
  }

  .site-topbar__copy strong,
  .site-topbar__copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-topbar__copy strong {
    font-size: 0.94rem;
  }

  .site-topbar__copy span {
    font-size: 0.78rem;
  }

  .site-topbar__mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 1rem;
  }

  .site-topbar__actions {
    flex-shrink: 0;
  }

  .theme-toggle {
    width: auto;
    min-height: 40px;
    padding: 10px 12px;
    gap: 8px;
  }

  .theme-toggle__icon {
    width: 18px;
    height: 18px;
  }

  .home-actions .button {
    width: 100%;
    justify-content: center;
  }

  .auth-layout__intro {
    padding: 24px 20px;
  }

  .auth-layout__intro h1,
  .home-focus h2 {
    font-size: 2.4rem;
  }

  .announcement-card__header,
  .announcement-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .announcement-modal__dialog {
    width: min(100% - 16px, 100%);
    max-height: 92vh;
    border-radius: 24px;
  }

  .announcement-modal__header,
  .announcement-modal__body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .file-upload {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 24px;
  }

  .file-upload__button {
    width: 100%;
  }

  .app-nav {
    position: sticky;
    top: calc(env(safe-area-inset-top) + 74px);
    display: flex;
    flex-wrap: nowrap;
    padding: 8px;
    margin-bottom: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .app-nav::-webkit-scrollbar {
    display: none;
  }

  .app-nav__item {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 11px 15px;
    border-radius: 14px;
    white-space: nowrap;
  }

  .community-grid,
  .community-thread-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .community-form,
  .community-reply-form,
  .community-thread {
    gap: 14px;
  }

  .community-card,
  .community-topic,
  .community-thread__card,
  .community-thread__empty,
  .community-reply-target {
    padding: 16px;
  }

  .community-form__footer,
  .community-card__header,
  .community-topic__header,
  .community-reply-target {
    flex-direction: column;
    align-items: stretch;
  }

  .community-form__footer .button,
  .community-reply-form .button,
  .community-reply-target__clear {
    width: 100%;
    justify-content: center;
  }

  .community-topic__title,
  .community-thread__title {
    font-size: 1.18rem;
    line-height: 1.18;
  }

  .community-card__content,
  .community-topic__content,
  .community-thread__content {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .community-meta {
    gap: 8px;
  }

  .community-action,
  .community-meta__pill {
    width: 100%;
    justify-content: center;
  }

  .community-form textarea,
  .community-reply-form textarea {
    min-height: 132px;
  }

  .community-reply-form textarea {
    min-height: 108px;
  }

  .community-author__avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .community-thread__card[style] {
    margin-left: 0 !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
