:root {
  color-scheme: light;
  --bg: #efe1cf;
  --panel: rgba(255, 249, 238, 0.82);
  --ink: #1f2728;
  --muted: #5b6f58;
  --line: rgba(121, 109, 88, 0.28);
  --green: #526c4f;
  --green-dark: #3f563d;
  --tomato: #d94a28;
  --tomato-dark: #a9341f;
  --timer-highlight: rgba(255, 226, 199, 0.9);
  --timer-shadow: rgba(191, 42, 24, 0.42);
  --timer-top: #ee6a35;
  --timer-bottom: #cf3d22;
  --timer-panel-bg: linear-gradient(180deg, rgba(255, 248, 235, 0.86), rgba(244, 224, 199, 0.76));
  --cream: #f6ead8;
  --gold: #c8914e;
  --blue: #496c75;
  --shadow: 0 30px 80px rgba(89, 62, 41, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.82), transparent 27rem),
    linear-gradient(100deg, rgba(92, 111, 75, 0.18), transparent 28%),
    linear-gradient(280deg, rgba(166, 128, 92, 0.18), transparent 30%),
    var(--bg);
}

body[data-theme="forest"] {
  --bg: #dfe6d4;
  --panel: rgba(249, 252, 241, 0.84);
  --ink: #17231b;
  --muted: #496246;
  --green: #3f7048;
  --green-dark: #2e5736;
  --tomato: #b95f35;
  --tomato-dark: #794226;
  --timer-highlight: rgba(226, 239, 198, 0.82);
  --timer-shadow: rgba(45, 95, 54, 0.42);
  --timer-top: #5f8f56;
  --timer-bottom: #315f3b;
  --timer-panel-bg: linear-gradient(180deg, rgba(244, 250, 231, 0.9), rgba(204, 220, 187, 0.78));
  --cream: #f7f3df;
  --gold: #9f884a;
  --blue: #416b61;
}

body[data-theme="ink"] {
  --bg: #d7d2c3;
  --panel: rgba(245, 241, 229, 0.86);
  --ink: #17191c;
  --muted: #50595d;
  --green: #394f55;
  --green-dark: #293b40;
  --tomato: #b8482f;
  --tomato-dark: #752d21;
  --timer-highlight: rgba(230, 225, 214, 0.72);
  --timer-shadow: rgba(30, 37, 42, 0.48);
  --timer-top: #4f636b;
  --timer-bottom: #20272d;
  --timer-panel-bg: linear-gradient(180deg, rgba(244, 240, 229, 0.9), rgba(198, 193, 181, 0.78));
  --cream: #f2ead8;
  --gold: #9a7745;
  --blue: #2f5968;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 82% 24%, rgba(83, 94, 66, 0.18), transparent 14rem),
    linear-gradient(90deg, transparent 62%, rgba(96, 77, 58, 0.08));
  filter: blur(8px);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-frame {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 32px;
}

.app-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.78);
  box-shadow: 0 14px 34px rgba(89, 62, 41, 0.12);
  backdrop-filter: blur(18px);
}

.app-nav > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 6px;
}

.account-chip span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 35%, #f47b45, var(--tomato) 62%, var(--tomato-dark));
  box-shadow: inset 0 -3px 5px rgba(88, 28, 16, 0.22);
}

.nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(239, 226, 204, 0.72);
}

.nav-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.nav-tab.active {
  background: rgba(255, 249, 238, 0.95);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(33, 42, 34, 0.08);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.app-shell {
  width: 100%;
  min-height: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 24px;
  align-items: center;
}

.timer-panel,
.side-panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.timer-panel {
  min-height: 760px;
  border-radius: 8px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--timer-panel-bg), var(--panel);
}

.side-panel {
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.topbar,
.section-heading,
.today-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  position: relative;
  z-index: 3;
  justify-content: center;
  text-align: center;
}

.topbar .icon-button {
  position: absolute;
  top: 0;
  right: 0;
}

.desk-prop {
  position: absolute;
  pointer-events: none;
}

.plant {
  left: -20px;
  top: 18px;
  width: 170px;
  height: 210px;
}

.plant::after {
  content: "";
  position: absolute;
  left: 38px;
  bottom: 0;
  width: 82px;
  height: 58px;
  border-radius: 12px 12px 24px 24px;
  background: #d8c7a7;
  box-shadow: inset 0 10px 18px rgba(86, 64, 43, 0.11);
}

.plant span {
  position: absolute;
  width: 76px;
  height: 34px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #678357, #2f512f);
  transform-origin: right bottom;
  box-shadow: inset 8px 3px 8px rgba(255, 255, 255, 0.15);
}

.plant span:nth-child(1) { left: 42px; top: 10px; transform: rotate(-50deg); }
.plant span:nth-child(2) { left: 76px; top: 50px; transform: rotate(14deg); }
.plant span:nth-child(3) { left: 12px; top: 66px; transform: rotate(-150deg); }
.plant span:nth-child(4) { left: 58px; top: 102px; transform: rotate(-24deg); }
.plant span:nth-child(5) { left: 8px; top: 126px; transform: rotate(-178deg); }

.books {
  left: -6px;
  bottom: 135px;
  width: 210px;
  height: 88px;
  transform: rotate(-1deg);
}

.books span {
  position: absolute;
  left: 0;
  width: 188px;
  height: 23px;
  border-radius: 3px;
  background: #f4e5c9;
  box-shadow: 0 6px 16px rgba(74, 53, 34, 0.14);
}

.books span::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  border-radius: 3px 3px 0 0;
  background: #526c4f;
}

.books span:nth-child(1) { top: 0; }
.books span:nth-child(2) { top: 29px; left: 10px; }
.books span:nth-child(2)::before { background: #c8914e; }
.books span:nth-child(3) { top: 58px; left: -4px; }

.notebook {
  left: 34px;
  bottom: -32px;
  width: 260px;
  height: 138px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(96, 87, 72, 0.12) 17px),
    #fbf0db;
  box-shadow: 0 16px 30px rgba(86, 64, 42, 0.16);
  transform: rotate(-9deg);
}

.pencil {
  left: 56px;
  bottom: 28px;
  width: 202px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d0a164 0 10px, #526c4f 10px 178px, #e5bd83 178px);
  transform: rotate(-20deg);
}

.cup {
  right: 28px;
  bottom: 110px;
  width: 142px;
  height: 122px;
  border: 7px solid #f7ead6;
  border-radius: 12px 12px 42px 42px;
  background:
    radial-gradient(circle at 38% 14%, #7b6042 0 28px, transparent 29px),
    linear-gradient(180deg, #fbf0df, #dcc09b);
  box-shadow: 0 14px 28px rgba(79, 58, 37, 0.16);
}

.cup::after {
  content: "";
  position: absolute;
  right: -40px;
  top: 26px;
  width: 48px;
  height: 48px;
  border: 12px solid #f3e2ca;
  border-left: 0;
  border-radius: 0 28px 28px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 5.3vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 600;
}

.tomato-divider {
  position: relative;
  width: min(230px, 70%);
  height: 34px;
  margin: 14px auto 0;
}

.tomato-divider::before,
.tomato-divider::after {
  content: "";
  position: absolute;
  top: 17px;
  width: calc(50% - 24px);
  height: 1px;
  background: rgba(88, 80, 65, 0.34);
}

.tomato-divider::before { left: 0; }
.tomato-divider::after { right: 0; }

.tomato-divider span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 35%, #f47b45, var(--tomato) 62%, var(--tomato-dark));
  transform: translateX(-50%);
}

.tomato-divider span::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -5px;
  width: 8px;
  height: 9px;
  border-radius: 8px 0 8px 0;
  background: #426636;
  transform: rotate(-24deg);
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.86);
  color: var(--green);
  font-weight: 800;
}

.icon-button.off {
  color: var(--muted);
  opacity: 0.65;
}

.mode-tabs {
  position: relative;
  z-index: 4;
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px auto 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(239, 226, 204, 0.72);
}

.mode-tab {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mode-tab.active {
  background: rgba(255, 249, 238, 0.95);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(33, 42, 34, 0.08);
}

.timer-wrap {
  position: relative;
  z-index: 2;
  width: min(440px, 74%);
  aspect-ratio: 1;
  margin: 8px auto 22px;
  display: grid;
  place-items: center;
}

.tomato-timer {
  border-radius: 48% 48% 42% 42%;
  background:
    radial-gradient(circle at 66% 28%, var(--timer-highlight), transparent 17%),
    radial-gradient(circle at 34% 38%, var(--timer-shadow), transparent 36%),
    linear-gradient(180deg, var(--timer-top) 0 45%, var(--timer-bottom) 46% 100%);
  box-shadow:
    inset 0 -18px 30px rgba(128, 36, 19, 0.25),
    inset 0 20px 28px rgba(255, 209, 169, 0.22),
    0 28px 42px rgba(102, 51, 31, 0.24);
}

.tomato-timer::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 51%;
  height: 2px;
  background: rgba(105, 31, 19, 0.34);
  box-shadow: 0 1px 0 rgba(255, 221, 196, 0.28);
}

.tomato-timer::after {
  content: "";
  position: absolute;
  left: calc(50% - 13px);
  top: 50%;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 30px solid rgba(255, 248, 235, 0.92);
  filter: drop-shadow(0 2px 3px rgba(80, 34, 21, 0.2));
}

.tomato-leaves {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 3;
  width: 170px;
  height: 62px;
  transform: translateX(-50%);
}

.tomato-leaves span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70px;
  height: 22px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #789158, #415d32);
  transform-origin: 0 100%;
}

.tomato-leaves span:nth-child(1) { transform: rotate(-72deg); }
.tomato-leaves span:nth-child(2) { transform: rotate(-36deg); }
.tomato-leaves span:nth-child(3) { width: 24px; height: 58px; border-radius: 16px; transform: translateX(-50%); }
.tomato-leaves span:nth-child(4) { transform: rotate(18deg) scaleX(-1); }
.tomato-leaves span:nth-child(5) { transform: rotate(56deg) scaleX(-1); }

.progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-progress {
  fill: none;
  stroke-width: 14;
}

.ring-bg {
  stroke: rgba(255, 242, 220, 0.55);
}

.ring-progress {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 703.72;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.35s ease, stroke 0.25s ease;
}

.timer-display {
  position: absolute;
  inset: 16%;
  display: grid;
  place-content: center;
  text-align: center;
}

.timer-display p {
  margin: 0 0 8px;
  color: rgba(255, 248, 235, 0.9);
  font-weight: 800;
}

.timer-display time {
  display: block;
  color: var(--cream);
  font-size: clamp(4rem, 10vw, 7.1rem);
  line-height: 0.95;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-shadow: 0 3px 8px rgba(82, 30, 20, 0.28);
}

.timer-display span,
.timer-display strong {
  display: block;
  margin-top: 12px;
  color: rgba(255, 248, 235, 0.86);
  font-weight: 700;
}

.timer-display strong {
  margin-top: 6px;
  color: rgba(255, 248, 235, 0.96);
  font-size: 0.92rem;
}

.tomato-scale {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 17%;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 244, 226, 0.9);
  font-size: 1.35rem;
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(75, 30, 20, 0.26);
}

.timer-actions {
  position: relative;
  z-index: 4;
  width: min(560px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 0.8fr);
  gap: 12px;
}

.primary-action,
.secondary-action,
.text-button,
.task-form button {
  border-radius: 7px;
  border: 0;
  font-weight: 800;
}

.primary-action,
.secondary-action {
  min-height: 54px;
}

.primary-action {
  border-radius: 999px;
  background: var(--green);
  color: white;
  box-shadow: 0 10px 18px rgba(62, 86, 61, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 248, 235, 0.82);
  color: var(--ink);
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ad-slot {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(82, 108, 79, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.7), rgba(239, 226, 204, 0.58)),
    rgba(255, 248, 235, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-slot ins {
  width: 100%;
  min-height: inherit;
}

.ad-slot span {
  position: absolute;
  pointer-events: none;
}

.ad-banner {
  width: min(728px, 100%);
  min-height: 90px;
  margin: 18px auto 0;
}

.today-card,
.task-panel,
.settings-panel,
.next-card,
.how-to-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.78);
}

.today-card {
  padding: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 8px;
}

.stats-grid div {
  padding: 12px;
  border-radius: 6px;
  background: rgba(221, 211, 188, 0.4);
}

.stats-grid span {
  display: block;
  color: var(--blue);
  font-size: 1.6rem;
  font-weight: 800;
}

.stats-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.task-panel {
  min-height: 360px;
  padding: 18px;
}

.text-button {
  min-height: 32px;
  padding: 0 10px;
  background: rgba(221, 211, 188, 0.45);
  color: var(--muted);
  font-size: 0.82rem;
}

.task-form {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  margin: 18px 0 12px;
}

.session-task-field,
.settings-card label:not(.toggle-row) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.session-task-field {
  margin-bottom: 12px;
}

.task-form input,
.settings-grid input,
.settings-card select,
.session-task-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.82);
  color: var(--ink);
  outline: 0;
}

.settings-card select,
.session-task-field select {
  min-height: 42px;
  padding: 0 10px;
}

.settings-card input[type="range"] {
  accent-color: var(--green);
}

.task-form input {
  min-height: 44px;
  padding: 0 12px;
}

.task-form input:focus,
.settings-grid input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(82, 108, 79, 0.16);
}

.task-form button {
  background: var(--tomato);
  color: white;
  font-size: 1.4rem;
}

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

.task-item {
  display: grid;
  grid-template-columns: 28px 1fr 32px;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.76);
}

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

.task-item span {
  overflow-wrap: anywhere;
  font-weight: 700;
}

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

.task-item.current {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(82, 108, 79, 0.12);
}

.task-item button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
}

.empty-state {
  margin: 24px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-panel {
  padding: 4px 16px 16px;
}

.next-card {
  padding: 18px;
}

.next-card p:last-child,
.how-to-card li {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.how-to-card {
  padding: 18px;
}

.how-to-card ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.how-to-card li {
  padding-left: 4px;
  font-weight: 700;
}

.settings-panel summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 800;
  cursor: pointer;
}

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

.settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.settings-grid input {
  min-height: 40px;
  padding: 0 10px;
}

.dashboard-screen,
.settings-screen {
  min-height: calc(100vh - 110px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.88), rgba(244, 224, 199, 0.78)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.screen-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.screen-heading h1 {
  font-size: clamp(2.2rem, 4.4vw, 4rem);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.history-panel,
.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.78);
}

.metric-card {
  min-height: 132px;
  padding: 18px;
  display: grid;
  align-content: end;
}

.metric-card span {
  color: var(--tomato);
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.history-panel {
  padding: 20px;
}

.stats-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.ad-sidebar {
  min-height: 280px;
  position: sticky;
  top: 92px;
}

.bar-chart {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  margin: 22px 0;
  padding: 16px;
  border-radius: 8px;
  background: rgba(221, 211, 188, 0.34);
}

.chart-day {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 5px;
  align-items: end;
  justify-items: center;
}

.chart-day span {
  width: min(34px, 72%);
  min-height: 12px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #e96a3f, var(--tomato-dark));
  box-shadow: 0 8px 14px rgba(126, 49, 28, 0.18);
}

.chart-day strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.chart-day em {
  color: var(--ink);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

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

.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.history-list li:last-child {
  border-bottom: 0;
}

.history-list span {
  color: var(--muted);
  font-weight: 700;
}

.settings-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.settings-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.settings-card h2 {
  font-size: 1.1rem;
}

.toggle-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.76);
  color: var(--ink);
  font-weight: 800;
}

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

.theme-options {
  display: grid;
  gap: 10px;
}

.theme-swatch {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.76);
  color: var(--ink);
  font-weight: 800;
}

.theme-swatch.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(82, 108, 79, 0.16);
}

.theme-swatch span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tomato), var(--green));
}

.theme-swatch[data-theme="forest"] span {
  background: linear-gradient(135deg, #3f7048, #9f884a);
}

.theme-swatch[data-theme="ink"] span {
  background: linear-gradient(135deg, #17191c, #b8482f);
}

.shortcut-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 700;
}

.account-dialog {
  width: min(430px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.account-dialog::backdrop {
  background: rgba(31, 39, 40, 0.36);
  backdrop-filter: blur(4px);
}

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

.account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.account-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(255, 253, 247, 0.86);
  color: var(--ink);
}

.auth-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}

.sign-out-button {
  justify-self: start;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 26px;
  margin-right: 6px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--ink);
  font: 800 0.78rem Inter, sans-serif;
}

@media (max-width: 900px) {
  .app-frame {
    width: min(100% - 24px, 1280px);
    padding-top: 12px;
  }

  .app-nav {
    position: static;
    display: grid;
  }

  .account-chip {
    justify-content: space-between;
    padding-left: 0;
  }

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

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

  .timer-panel {
    min-height: auto;
    padding: 22px;
  }

  .desk-prop {
    opacity: 0.28;
  }

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

  .dashboard-grid,
  .settings-board {
    grid-template-columns: 1fr 1fr;
  }

  .stats-content-grid {
    grid-template-columns: 1fr;
  }

  .ad-sidebar {
    position: static;
    min-height: 180px;
  }
}

@media (max-width: 560px) {
  .app-frame {
    width: min(100% - 18px, 1160px);
  }

  .nav-tabs,
  .dashboard-grid,
  .settings-board {
    grid-template-columns: 1fr;
  }

  .topbar,
  .today-card {
    display: grid;
  }

  .mode-tabs,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .timer-wrap {
    width: min(360px, 92%);
  }

  .plant,
  .books,
  .notebook,
  .pencil,
  .cup {
    display: none;
  }

  .timer-display time {
    font-size: clamp(3.3rem, 18vw, 4.8rem);
  }

  .tomato-scale {
    font-size: 1rem;
  }

  .dashboard-screen,
  .settings-screen {
    padding: 22px;
  }

  .history-list li {
    display: grid;
  }
}
