:root {
  color-scheme: light;
  --ink: #183229;
  --ink-soft: #53675f;
  --forest: #24483b;
  --forest-2: #315f4e;
  --sage: #8da397;
  --cream: #f5f1e8;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --line: rgba(36, 72, 59, 0.13);
  --line-strong: rgba(36, 72, 59, 0.22);
  --clay: #c77555;
  --clay-soft: #f1d9cb;
  --shadow: 0 24px 70px rgba(41, 58, 49, 0.1);
  --shadow-soft: 0 10px 34px rgba(41, 58, 49, 0.075);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 13px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 255, 255, 0.88), transparent 27rem),
    radial-gradient(circle at 92% 94%, rgba(213, 222, 207, 0.58), transparent 32rem),
    var(--cream);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(199, 117, 85, 0.28);
  outline-offset: 2px;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--forest);
  border-radius: 9px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  width: min(1440px, calc(100% - 48px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand,
.topbar-meta,
.brand > span:last-child,
.coach-identity,
.coach-title-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  background: var(--forest);
  box-shadow: 0 8px 20px rgba(36, 72, 59, 0.18);
}

.brand-mark span {
  position: absolute;
  bottom: 8px;
  width: 5px;
  border-radius: 999px 999px 2px 2px;
  background: #f4ecda;
  transform-origin: bottom;
}

.brand-mark span:nth-child(1) {
  height: 12px;
  transform: translateX(-8px) rotate(-25deg);
}

.brand-mark span:nth-child(2) {
  height: 19px;
}

.brand-mark span:nth-child(3) {
  height: 14px;
  transform: translateX(8px) rotate(25deg);
}

.brand > span:last-child {
  align-items: flex-start;
  flex-direction: column;
  line-height: 1;
}

.brand strong {
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.topbar-meta {
  gap: 22px;
  color: var(--ink-soft);
  font-size: 13px;
}

.quiet-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sound-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--ink-soft);
  border-radius: 10px;
}

.sound-toggle:hover {
  color: var(--forest);
  background: rgba(36, 72, 59, 0.06);
}

.sound-toggle svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sound-toggle[aria-pressed="false"] .sound-wave {
  opacity: 0.2;
}

.app-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 30px auto 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, 0.82fr);
  gap: 28px;
  align-items: start;
}

.focus-column {
  min-width: 0;
}

.welcome-row {
  min-height: 90px;
  margin: 0 4px 19px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: clamp(31px, 3vw, 47px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.today-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.7);
}

.today-summary > div {
  min-width: 79px;
  padding: 7px 12px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  border-radius: 10px;
}

.today-summary > div + div {
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.today-summary strong {
  color: var(--forest);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.today-summary span {
  color: var(--ink-soft);
  font-size: 11px;
}

.timer-card,
.tasks-card,
.coach-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 253, 248, 0.91);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.timer-card {
  position: relative;
  min-height: 520px;
  padding: 26px 30px 23px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.timer-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -115px;
  top: -120px;
  border-radius: 50%;
  background: rgba(199, 117, 85, 0.07);
  pointer-events: none;
}

.mode-tabs {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f2eee5;
}

.mode-tabs button {
  min-width: 88px;
  padding: 9px 14px;
  color: var(--ink-soft);
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: 160ms ease;
}

.mode-tabs button:hover {
  color: var(--ink);
}

.mode-tabs button[aria-pressed="true"] {
  color: var(--forest);
  background: var(--paper-strong);
  box-shadow: 0 4px 13px rgba(36, 72, 59, 0.09);
}

.timer-stage {
  margin: 23px 0 14px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.timer-dial {
  --progress: 0deg;
  position: relative;
  width: 258px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--clay) var(--progress), rgba(36, 72, 59, 0.105) 0);
  box-shadow: 0 18px 46px rgba(36, 72, 59, 0.1);
  transition: background 220ms linear;
}

.timer-dial::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: inherit;
  background:
    radial-gradient(circle at 45% 32%, #fff, transparent 52%),
    #faf8f2;
}

.timer-dial-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.timer-mode {
  color: var(--clay);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.timer-dial strong {
  margin: 11px 0 7px;
  color: var(--forest);
  font-family: ui-serif, Georgia, serif;
  font-size: 57px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.timer-round {
  color: var(--sage);
  font-size: 11px;
  font-weight: 650;
}

.timer-context {
  max-width: 520px;
  margin-top: 15px;
  text-align: center;
}

.timer-context span {
  display: block;
  margin-bottom: 4px;
  color: var(--sage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.timer-context strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.primary-button,
.secondary-button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.primary-button {
  color: #fffef9;
  border: 1px solid var(--forest);
  background: var(--forest);
  box-shadow: 0 11px 24px rgba(36, 72, 59, 0.2);
}

.primary-button:hover {
  background: var(--forest-2);
  box-shadow: 0 13px 28px rgba(36, 72, 59, 0.25);
}

.start-button {
  min-width: 153px;
  padding: 0 23px;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.start-button.is-running .play-icon {
  width: 9px;
  height: 11px;
  border: 0;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.secondary-button {
  padding: 0 14px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.secondary-button:hover {
  color: var(--forest);
  border-color: var(--line-strong);
  background: #fff;
}

.icon-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.duration-section {
  margin-top: 19px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-top: 1px solid var(--line);
}

.duration-section > span {
  color: var(--ink-soft);
  font-size: 11px;
}

.duration-options {
  display: flex;
  gap: 5px;
}

.duration-options button {
  min-width: 45px;
  padding: 6px 9px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.duration-options button:hover {
  color: var(--forest);
  background: rgba(36, 72, 59, 0.05);
}

.duration-options button[aria-pressed="true"] {
  color: var(--forest);
  border-color: var(--line);
  background: #fff;
  font-weight: 750;
  box-shadow: 0 4px 12px rgba(36, 72, 59, 0.07);
}

.tasks-card {
  margin-top: 22px;
  padding: 24px 26px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.task-progress {
  color: var(--ink-soft);
  font-size: 11px;
}

.task-progress strong {
  color: var(--forest);
  font-size: 14px;
}

.task-form {
  margin: 20px 0 13px;
  padding: 5px 5px 5px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(245, 241, 232, 0.6);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.task-form:focus-within {
  border-color: rgba(199, 117, 85, 0.38);
  box-shadow: 0 0 0 3px rgba(199, 117, 85, 0.09);
}

.task-form input {
  min-width: 0;
  flex: 1;
  padding: 7px 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.task-form input::placeholder {
  color: #99a49e;
}

.task-form button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  border: 0;
  border-radius: 10px;
  background: var(--clay);
  cursor: pointer;
}

.task-form button:hover {
  background: #b96649;
}

.task-form svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.task-list {
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.task-item {
  min-height: 51px;
  padding: 7px 8px 7px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  transition: 150ms ease;
}

.task-item:hover {
  background: white;
  border-color: var(--line);
}

.task-item.is-active {
  border-color: rgba(199, 117, 85, 0.26);
  background: rgba(241, 217, 203, 0.22);
}

.task-check {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: white;
  border: 1.5px solid #aab7b0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.task-check svg {
  width: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  opacity: 0;
}

.task-item.is-completed .task-check {
  border-color: var(--forest-2);
  background: var(--forest-2);
}

.task-item.is-completed .task-check svg {
  opacity: 1;
}

.task-main {
  min-width: 0;
  flex: 1;
  padding: 6px 3px;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.task-main strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-main span {
  display: block;
  margin-top: 3px;
  color: var(--clay);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.task-item.is-completed .task-main strong {
  color: #9ba69f;
  text-decoration: line-through;
}

.task-delete {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #9aa69f;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: 150ms ease;
}

.task-item:hover .task-delete,
.task-delete:focus-visible {
  opacity: 1;
}

.task-delete:hover {
  color: #a9533f;
  background: rgba(199, 117, 85, 0.1);
}

.task-delete svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

@media (hover: none) {
  .task-delete {
    opacity: 0.55;
  }
}

.empty-state {
  padding: 25px 12px 14px;
  color: #89988f;
  text-align: center;
}

.empty-state span {
  width: 28px;
  height: 28px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border: 1px dashed #aab8b0;
  border-radius: 50%;
  font-size: 12px;
}

.empty-state p {
  margin-bottom: 0;
  font-size: 12px;
}

.coach-card {
  position: sticky;
  top: 22px;
  height: min(780px, calc(100vh - 44px));
  min-height: 620px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.coach-header {
  padding: 22px 21px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.coach-identity {
  min-width: 0;
  gap: 11px;
}

.coach-avatar {
  position: relative;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--forest);
}

.coach-avatar::before,
.coach-avatar::after,
.coach-avatar span {
  content: "";
  position: absolute;
  width: 5px;
  border-radius: 999px;
  background: #f6eee0;
  transform-origin: bottom;
}

.coach-avatar::before {
  height: 13px;
  transform: translate(-7px, 4px) rotate(-28deg);
}

.coach-avatar::after {
  height: 18px;
  transform: translate(0, 1px);
}

.coach-avatar span {
  height: 12px;
  transform: translate(7px, 5px) rotate(28deg);
}

.coach-title-row {
  gap: 8px;
}

.coach-title-row h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
}

.online-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #638172;
  font-size: 9px;
}

.online-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6e9e7d;
  box-shadow: 0 0 0 3px rgba(110, 158, 125, 0.12);
}

.coach-identity p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clear-chat {
  padding: 7px 9px;
  color: var(--ink-soft);
  border-radius: 8px;
  font-size: 10px;
}

.clear-chat:hover {
  color: var(--forest);
  background: rgba(36, 72, 59, 0.06);
}

.clear-chat:disabled {
  cursor: wait;
  opacity: 0.45;
}

.chat-messages {
  min-height: 0;
  padding: 20px 20px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(36, 72, 59, 0.2) transparent;
  scrollbar-width: thin;
}

.chat-message {
  max-width: 88%;
  margin-bottom: 15px;
  animation: message-in 180ms ease-out both;
}

.chat-message.assistant {
  margin-right: auto;
}

.chat-message.user {
  margin-left: auto;
}

.chat-message-label {
  margin: 0 5px 5px;
  color: #8b9891;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chat-message.user .chat-message-label {
  text-align: right;
}

.chat-bubble {
  padding: 11px 13px;
  color: #2a3f36;
  border: 1px solid var(--line);
  border-radius: 5px 15px 15px 15px;
  background: #f3efe6;
  font-size: 12px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.user .chat-bubble {
  color: #fffef8;
  border-color: var(--forest);
  border-radius: 15px 5px 15px 15px;
  background: var(--forest);
}

.chat-message.is-loading .chat-bubble {
  width: 54px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  animation: typing 1.1s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 130ms;
}

.typing-dot:nth-child(3) {
  animation-delay: 260ms;
}

.chat-error {
  margin: 0 0 13px;
  padding: 9px 11px;
  color: #9b4f3c;
  border: 1px solid rgba(169, 83, 63, 0.18);
  border-radius: 10px;
  background: rgba(199, 117, 85, 0.08);
  font-size: 10px;
  line-height: 1.5;
}

.coach-bottom {
  padding: 12px 18px 17px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.93);
}

.quick-prompts {
  margin-bottom: 9px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-prompts::-webkit-scrollbar {
  display: none;
}

.quick-prompts button {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--forest-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  cursor: pointer;
}

.quick-prompts button:hover {
  border-color: var(--line-strong);
  background: white;
}

.chat-form {
  min-height: 48px;
  padding: 5px 5px 5px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 25px rgba(36, 72, 59, 0.06);
}

.chat-form:focus-within {
  border-color: rgba(199, 117, 85, 0.45);
  box-shadow: 0 0 0 3px rgba(199, 117, 85, 0.08);
}

.chat-form textarea {
  min-width: 0;
  max-height: 112px;
  flex: 1;
  padding: 8px 0;
  resize: none;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.5;
}

.chat-form textarea::placeholder {
  color: #a1aaa5;
}

.chat-form button {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: white;
  border: 0;
  border-radius: 11px;
  background: var(--clay);
  cursor: pointer;
  transition: 150ms ease;
}

.chat-form button:hover:not(:disabled) {
  background: #b86649;
  transform: translateY(-1px);
}

.chat-form button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.chat-form svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-note {
  margin: 8px 3px 0;
  color: #9aa59f;
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  color: white;
  border-radius: 12px;
  background: rgba(24, 50, 41, 0.94);
  box-shadow: 0 12px 35px rgba(24, 50, 41, 0.24);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
  }

  .welcome-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-summary {
    align-self: stretch;
  }

  .today-summary > div {
    flex: 1;
  }
}

@media (max-width: 860px) {
  .topbar,
  .app-shell {
    width: min(100% - 28px, 680px);
  }

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

  .welcome-row {
    min-height: 0;
    margin-top: 10px;
  }

  .coach-card {
    position: relative;
    top: 0;
    height: 720px;
  }
}

@media (max-width: 560px) {
  .topbar {
    width: calc(100% - 24px);
    height: 69px;
  }

  .topbar-meta > span:first-child,
  .sound-toggle span {
    display: none;
  }

  .app-shell {
    width: calc(100% - 20px);
    margin-top: 20px;
    gap: 16px;
  }

  h1 {
    font-size: 32px;
  }

  .welcome-row {
    margin-right: 2px;
    margin-left: 2px;
  }

  .timer-card {
    min-height: 0;
    padding: 18px 14px 17px;
    border-radius: 23px;
  }

  .mode-tabs {
    width: 100%;
  }

  .mode-tabs button {
    min-width: 0;
    padding: 9px 7px;
  }

  .timer-dial {
    width: min(238px, 72vw);
  }

  .timer-dial strong {
    font-size: 51px;
  }

  .timer-actions {
    gap: 8px;
  }

  .secondary-button {
    width: 43px;
    padding: 0;
    font-size: 0;
  }

  .secondary-button svg {
    width: 17px;
  }

  .start-button {
    min-width: 145px;
  }

  .duration-section {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .duration-options {
    width: 100%;
  }

  .duration-options button {
    flex: 1;
  }

  .tasks-card {
    margin-top: 16px;
    padding: 20px 16px;
  }

  .coach-card {
    height: 680px;
    min-height: 580px;
    border-radius: 23px;
  }

  .coach-header {
    padding: 17px 15px 14px;
  }

  .chat-messages {
    padding-right: 14px;
    padding-left: 14px;
  }

  .coach-bottom {
    padding-right: 12px;
    padding-left: 12px;
  }

  .chat-message {
    max-width: 93%;
  }
}

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