:root {
  --bg: #0f172a;
  --bg-soft: #162033;
  --card: rgba(15, 23, 42, 0.72);
  --card-border: rgba(148, 163, 184, 0.2);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #7aa2f7;
  --accent-hover: #668de0;
  --done: #22c55e;
  --shadow: 0 20px 45px rgba(2, 6, 23, 0.35);
  --ring-sky: #7dd3fc;
  --ring-mint: #6ee7b7;
  --ring-lavender: #c4b5fd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background: linear-gradient(140deg, #101a2e 5%, #0f172a 52%, #0a1324 100%);
  position: relative;
  overflow-x: hidden;
  transition: color 400ms ease;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  transition: opacity 600ms ease, transform 900ms ease, filter 600ms ease;
}

body::before {
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(122, 162, 247, 0.25), transparent 45%),
    radial-gradient(circle at 80% 25%, rgba(96, 165, 250, 0.2), transparent 42%),
    radial-gradient(circle at 55% 75%, rgba(14, 165, 233, 0.12), transparent 48%);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 65% 70%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px);
  background-size: 220px 220px, 280px 280px;
  opacity: 0.42;
}

body.scene-break::before {
  background:
    radial-gradient(circle at 20% 25%, rgba(251, 191, 141, 0.22), transparent 46%),
    radial-gradient(circle at 76% 22%, rgba(167, 139, 250, 0.2), transparent 40%),
    radial-gradient(circle at 50% 74%, rgba(244, 114, 182, 0.11), transparent 50%);
}

body.motion-gentle::before {
  animation: sceneDrift 24s ease-in-out infinite alternate;
}

body.motion-gentle::after {
  animation: particleDrift 42s linear infinite;
}

body.motion-still::before {
  transform: scale(1.03);
}

body.motion-off::before,
body.motion-off::after {
  opacity: 0;
}

body.cozy-evening {
  background: linear-gradient(140deg, #120f25 2%, #15122a 48%, #0d1222 100%);
}

body.cozy-evening::before {
  filter: saturate(0.85) brightness(0.85);
}

body.cozy-evening::after {
  opacity: 0.28;
}

body.cozy-morning {
  --text: #1f2937;
  --muted: #64748b;
  --card: rgba(248, 250, 252, 0.78);
  --card-border: rgba(148, 163, 184, 0.35);
  --bg-soft: #eef2ff;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --shadow: 0 18px 36px rgba(100, 116, 139, 0.2);
  background-color: #eef2ff;
  background: linear-gradient(145deg, #f8fafc 5%, #eef2ff 50%, #e2e8f0 100%);
}

body.cozy-morning::before,
body.cozy-morning::after {
  opacity: 0;
}

body.cozy-morning .app-header p,
body.cozy-morning .timer-title,
body.cozy-morning .timer-caption,
body.cozy-morning .sound-hover-label,
body.cozy-morning .modes-panel h2,
body.cozy-morning .todo-header h2,
body.cozy-morning .ghost-btn,
body.cozy-morning .help-panel ul {
  color: #64748b;
}

body.cozy-morning .timer-circle {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.24);
}

body.cozy-morning .timer-circle::before {
  border-color: rgba(148, 163, 184, 0.42);
}

body.cozy-morning .time-display {
  color: #334155;
}

body.cozy-morning .timer-mood {
  color: #64748b;
}

body.cozy-morning .timer-mood:hover {
  color: #475569;
}

body.cozy-morning .timer-btn-reset,
body.cozy-morning .timer-btn-start {
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.34);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.2);
}

body.cozy-morning .timer-btn-start.breathing {
  animation: playButtonBreatheMorning 2.6s ease-in-out infinite;
}

body.cozy-morning .sound-category-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.34);
}

body.cozy-morning .sound-category-btn.active {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.95);
  border-color: rgba(96, 165, 250, 0.5);
}

body.cozy-morning .sound-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.34);
}

body.cozy-morning .sound-btn:hover {
  background: rgba(239, 246, 255, 0.96);
}

body.cozy-morning .sound-btn.active {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.96);
  border-color: rgba(96, 165, 250, 0.52);
  box-shadow: 0 10px 24px rgba(96, 165, 250, 0.22);
}

body.cozy-morning .help-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.34);
}

body.cozy-morning .help-btn:hover {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.96);
}

body.cozy-morning .help-panel {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 16px 34px rgba(148, 163, 184, 0.24);
}

body.cozy-morning .panel-toolbar {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

body.cozy-morning .ghost-btn {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(148, 163, 184, 0.32);
}

body.cozy-morning .ghost-btn:hover {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.96);
}

body.cozy-morning .todo-form input {
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border-color: rgba(148, 163, 184, 0.34);
}

body.cozy-morning .todo-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.14);
}

body.cozy-morning .todo-item label {
  color: #334155;
}

body.cozy-morning .todo-item .delete-btn {
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.34);
}

body.cozy-morning .todo-item .delete-btn:hover {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.96);
}

body.cozy-morning .cozy-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.16);
}

body.cozy-morning .cozy-btn:hover {
  background: rgba(239, 246, 255, 0.96);
  color: #334155;
}

body.cozy-morning .cozy-btn.active {
  color: #334155;
  background: rgba(224, 242, 254, 0.96);
  border-color: rgba(125, 211, 252, 0.46);
}

body.cozy-morning .mode-preset-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.34);
}

body.cozy-morning .mode-preset-btn:hover {
  background: rgba(239, 246, 255, 0.96);
  color: #334155;
}

body.cozy-morning .mode-preset-btn.active {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.95);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 10px 22px rgba(96, 165, 250, 0.2);
}

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.35rem 1.25rem 1rem;
  display: grid;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}

.app-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.header-cat {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  animation:
    catFloat 3s ease-in-out infinite,
    catSway 4.2s ease-in-out infinite,
    catGlow 3.6s ease-in-out infinite;
}

.app-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.app-header {
  text-align: center;
  position: relative;
}

.header-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cozy-btn {
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #dbe4f4;
  border: 1px solid rgba(165, 180, 252, 0.34);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.cozy-btn.active {
  color: #eef2ff;
  background: rgba(99, 102, 241, 0.24);
  border-color: rgba(165, 180, 252, 0.5);
}

.help-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  padding: 0;
  background: rgba(96, 165, 250, 0.14);
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-weight: 700;
}

.help-btn:hover {
  background: rgba(96, 165, 250, 0.24);
  color: #dbeafe;
}

.help-panel {
  position: absolute;
  top: 2.2rem;
  right: 0;
  width: min(330px, calc(100vw - 2.5rem));
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.35);
  text-align: left;
  z-index: 30;
}

.help-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.help-panel ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
  display: grid;
  gap: 0.2rem;
}

.panel-toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.toolbar-btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
}

.card {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.modes-panel,
.todo-panel {
  display: none;
  scroll-margin-top: 5.2rem;
}

.layout.show-modes {
  grid-template-columns: 260px 1fr;
}

.layout.show-tasks {
  grid-template-columns: 1fr 320px;
}

.layout.show-modes.show-tasks {
  grid-template-columns: 260px 1fr 320px;
}

.layout.show-modes .modes-panel {
  display: grid;
}

.layout.show-tasks .todo-panel {
  display: grid;
}

.modes-panel {
  padding: 1.1rem;
}

.modes-panel h2 {
  margin: 0 0 0.85rem;
}

.modes-controls {
  display: grid;
  gap: 0.75rem;
}

.mode-preset-btn {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 0.62rem 0.78rem;
  background: rgba(30, 41, 59, 0.74);
  color: var(--text);
  border: 1px solid var(--card-border);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.mode-preset-btn:hover {
  background: rgba(59, 130, 246, 0.24);
}

.mode-preset-btn.active {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.3);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.2);
}

.timer-panel {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.1rem 1.5rem 1.2rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.timer-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.timer-panel h2,
.todo-panel h2 {
  margin-top: 0;
}

.timer-circle {
  --progress: 0;
  --ring-color: var(--ring-sky);
  --ring-thickness: 16px;
  width: min(70vw, 390px);
  aspect-ratio: 1;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  background: rgba(226, 232, 240, 0.04);
  margin-bottom: 0.7rem;
  transition: transform 0.35s ease;
}

.timer-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: var(--ring-thickness) solid rgba(148, 163, 184, 0.26);
}

.timer-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: conic-gradient(
    var(--ring-color) calc(var(--progress) * 1%),
    transparent 0
  );
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--ring-color) 45%, transparent));
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--ring-thickness)),
    #000 calc(100% - (var(--ring-thickness) - 1px))
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--ring-thickness)),
    #000 calc(100% - (var(--ring-thickness) - 1px))
  );
}

.timer-circle.ring-sky {
  --ring-color: var(--ring-sky);
}

.timer-circle.ring-mint {
  --ring-color: var(--ring-mint);
}

.timer-circle.ring-lavender {
  --ring-color: var(--ring-lavender);
}

.timer-circle > * {
  position: relative;
  z-index: 1;
}

.timer-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.2rem;
  width: 100%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-mood {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.02em;
  max-width: 70%;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.timer-mood:hover {
  color: rgba(189, 201, 223, 0.95);
}

.timer-mood.swaying {
  animation: timerMoodSway 3.5s ease-in-out infinite;
}

.time-display {
  margin: 0;
  font-size: clamp(2.8rem, 10vw, 5.9rem);
  letter-spacing: 0.03em;
  font-weight: 500;
  color: #dbe4f4;
  white-space: nowrap;
  max-width: 78%;
}

.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}

.ambient-inline-controls {
  margin-top: 0.95rem;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  max-width: min(100%, 620px);
  padding: 0.1rem 0.1rem 0.15rem;
}

.sound-category-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.15rem;
}

.sound-category-btn {
  background: rgba(30, 41, 59, 0.75);
  color: var(--muted);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.sound-category-btn.active {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.3);
  border-color: rgba(96, 165, 250, 0.5);
}

.sound-groups {
  width: 100%;
}

.sound-hover-label {
  min-height: 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sound-hover-label.visible {
  opacity: 1;
  transform: translateY(0);
}

.sound-group {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.1rem;
}

.sound-group.active {
  display: flex;
}

.timer-btn {
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
}

.timer-btn-reset {
  width: 74px;
  height: 74px;
  background: rgba(226, 232, 240, 0.85);
  color: #1e293b;
  font-size: 2rem;
}

.timer-btn-start {
  width: 74px;
  height: 74px;
  background: rgba(226, 232, 240, 0.92);
  color: #1e293b;
}

.timer-btn-start.running {
  text-indent: 0;
}

.timer-btn-start.breathing {
  animation: playButtonBreathe 2.6s ease-in-out infinite;
}

.timer-caption {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
  font-size: clamp(0.72rem, 1.2vw, 1.05rem);
  letter-spacing: 0.12em;
  font-weight: 500;
  line-height: 1.25;
  max-width: 72%;
  text-wrap: balance;
}

.timer-btn-start .icon-play {
  border-top-width: 9px;
  border-bottom-width: 9px;
  border-left-width: 14px;
}

.timer-btn-start .icon-pause {
  display: none;
}

.timer-btn-start.running .icon-play {
  display: none;
}

.timer-btn-start.running .icon-pause {
  display: inline-flex;
}

button,
select,
input {
  font: inherit;
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #031021;
  font-weight: 600;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background-color 0.28s ease, transform 0.2s ease, box-shadow 0.28s ease;
}

button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.18);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ghost-btn {
  background: rgba(96, 165, 250, 0.16);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.25);
}

.todo-panel {
  padding: 1.2rem;
  align-content: start;
  gap: 0.9rem;
}

.todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.todo-header h2 {
  margin-bottom: 0;
}

.todo-content {
  display: grid;
  gap: 0.9rem;
  max-height: 460px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease;
}

.todo-form {
  display: flex;
  gap: 0.5rem;
}

.todo-form input {
  flex: 1;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.55rem 0.65rem;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-height: 320px;
  overflow: auto;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.5rem 0.6rem;
}

.todo-item label {
  color: var(--text);
  overflow-wrap: anywhere;
}

.todo-item.done label {
  text-decoration: line-through;
  color: var(--done);
}

.todo-item .delete-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
  padding: 0.3rem 0.5rem;
}

.calm-select {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  min-width: 96px;
}

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

.icon-pause {
  display: none;
  align-items: center;
  gap: 4px;
}

.icon-pause span {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
}

.sparkle {
  position: absolute;
  pointer-events: none;
  color: #94a3b8;
  font-size: 10px;
  opacity: 0.5;
  animation: sparkleFloatUp 1s ease-out forwards;
  z-index: 60;
}

.heart-float {
  position: fixed;
  color: #fecdd3;
  font-size: 16px;
  pointer-events: none;
  animation: floatHeart 1.5s ease-out forwards;
  z-index: 70;
}

.companion-speech {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -8px);
  background: rgba(226, 232, 240, 0.94);
  color: #1e293b;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.companion-speech::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: rgba(226, 232, 240, 0.94);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 1px;
}

.companion-speech.show {
  opacity: 1;
  transform: translate(-50%, -14px);
}

.sound-btn {
  background: rgba(30, 41, 59, 0.75);
  color: var(--text);
  border: 1px solid var(--card-border);
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  position: relative;
}

.sound-btn:hover {
  background: rgba(59, 130, 246, 0.28);
}

.sound-btn.active {
  background: rgba(96, 165, 250, 0.34);
  border-color: rgba(96, 165, 250, 0.5);
  color: #dbeafe;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.2);
}

.sound-btn.loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(226, 232, 240, 0.35);
  border-top-color: rgba(226, 232, 240, 0.95);
  pointer-events: none;
  animation: soundSpinner 0.75s linear infinite;
}

.sound-btn.loading {
  color: transparent;
  box-shadow: none;
}

.sound-btn.playing::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.45);
}

@keyframes sceneDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(2%, 1.5%, 0) scale(1.06);
  }
}

@keyframes particleDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-3%, -2%, 0);
  }
}

@keyframes timerMoodSway {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(2deg);
  }
}

@keyframes sparkleFloatUp {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-20px) scale(0) rotate(90deg);
    opacity: 0;
  }
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px) scale(1.2) rotate(15deg);
    opacity: 0;
  }
}

@keyframes soundSpinner {
  to {
    transform: rotate(360deg);
  }
}


@keyframes playButtonBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 6px 14px rgba(125, 211, 252, 0.08);
  }
  50% {
    transform: translateY(0) scale(1.06);
    box-shadow: 0 12px 26px rgba(125, 211, 252, 0.24);
  }
}

@keyframes playButtonBreatheMorning {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.2);
  }
  50% {
    transform: translateY(0) scale(1.05);
    box-shadow: 0 14px 28px rgba(96, 165, 250, 0.28);
  }
}

@keyframes catFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3.5px);
  }
}

@keyframes catSway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2.5deg);
  }
  75% {
    transform: rotate(-2.5deg);
  }
}

@keyframes catGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(125, 211, 252, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(125, 211, 252, 0.45));
  }
}

@media (max-width: 900px) {
  .panel-toolbar {
    position: sticky;
    top: 0.45rem;
    z-index: 24;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: color-mix(in srgb, var(--card) 90%, transparent);
    backdrop-filter: blur(8px);
  }

  .toolbar-btn {
    min-height: 44px;
    font-size: 0.86rem;
  }

  .layout,
  .layout.show-modes,
  .layout.show-tasks,
  .layout.show-modes.show-tasks {
    grid-template-columns: 1fr;
  }

  .ambient-inline-controls {
    width: min(100%, 360px);
  }

  .header-actions {
    position: static;
    justify-content: center;
    margin-top: 0.4rem;
  }

  .help-panel {
    right: 50%;
    transform: translateX(50%);
  }
}
