/* Palette variables also paint the small, noninteractive settings previews. */
[data-theme="orbit"],
.theme-palette-orbit {
  --bg: #101e39;
  --panel: #203251;
  --raised: #29456a;
  --ink: #eef5ff;
  --muted: #b0c2da;
  --accent: #a2d8ff;
  --on-accent: #092644;
  --green: #b9d9d0;
  --line: #405773;
  --nav: #182b48;
  --radius: 24px;
  --button-radius: 16px;
  --scheme: dark;
}
[data-theme="warm"],
.theme-palette-warm {
  --bg: #fff4eb;
  --panel: #fffcf7;
  --raised: #f7decb;
  --ink: #542f24;
  --muted: #856454;
  --accent: #9e3d24;
  --on-accent: #ffffff;
  --green: #516536;
  --line: #e9cdb9;
  --field-line: #a97e68;
  --nav: #fffcf7;
  --radius: 27px;
  --button-radius: 30px;
  --scheme: light;
}
[data-theme="moon"],
.theme-palette-moon {
  --bg: #132b29;
  --panel: #203c37;
  --raised: #2d4c42;
  --ink: #eef4e8;
  --muted: #b0c7bc;
  --accent: #b9e3c7;
  --on-accent: #16392f;
  --green: #d0dbb4;
  --line: #47665b;
  --nav: #203c37;
  --radius: 28px;
  --button-radius: 22px;
  --scheme: dark;
}
[data-theme="apricot"],
.theme-palette-apricot {
  --bg: #fff8ee;
  --panel: #fffcf8;
  --raised: #f3e1ce;
  --ink: #503c31;
  --muted: #816855;
  --accent: #a1432c;
  --on-accent: #fff9ef;
  --green: #536637;
  --line: #e6d3bd;
  --field-line: #a18167;
  --nav: #fffcf8;
  --radius: 22px;
  --button-radius: 18px;
  --scheme: light;
}
.theme-palette-current {
  --bg: #191c1b;
  --panel: #232725;
  --raised: #2c312e;
  --ink: #f4f2ec;
  --muted: #acb5ad;
  --accent: #f0916b;
  --line: #3a413c;
  --radius: 20px;
}
html[data-theme]:not([data-theme="current"]) {
  --theme-nav: var(--nav);
  --theme-muted: var(--muted);
  --theme-line: var(--line);
  --theme-surface: var(--panel);
  --theme-field: var(--bg);
  --theme-field-line: var(--field-line, var(--line));
  --theme-raised: var(--raised);
  --theme-ink: var(--ink);
  --theme-on-accent: var(--on-accent);
  --theme-accent: var(--accent);
  --theme-green: var(--green);
}
html[data-theme="warm"],
html[data-theme="apricot"] {
  --theme-danger: #a2342b;
  --theme-danger-bg: #fbe4dc;
  --theme-danger-line: #d6a398;
  --theme-warning: #80501c;
}
html[data-theme="orbit"],
html[data-theme="moon"] {
  --theme-danger: #ffb8a6;
  --theme-danger-bg: #4a302f;
  --theme-danger-line: #84615b;
  --theme-warning: #e7c89e;
}
html {
  color-scheme: var(--scheme, dark);
}
[data-theme]:not([data-theme="current"]) .primary,
[data-theme]:not([data-theme="current"]) .secondary,
[data-theme]:not([data-theme="current"]) .danger {
  border-radius: var(--button-radius);
}
[data-theme]:not([data-theme="current"]) .counter,
[data-theme]:not([data-theme="current"]) .feed-card,
[data-theme]:not([data-theme="current"]) .motion-card,
[data-theme]:not([data-theme="current"]) .rest {
  border-radius: var(--radius);
}
[data-theme]:not([data-theme="current"]) .counter {
  background: var(--panel);
}
[data-theme]:not([data-theme="current"]) .hint {
  background: var(--raised);
  color: var(--ink);
}
[data-theme]:not([data-theme="current"]) .switch.on {
  background: var(--line);
}
/* Кнопка теперь во всю высоту полосы: заливка целиком выглядела бы тяжёлым блоком,
   поэтому активную вкладку в темах отмечаем так же - подложкой под значком. */
[data-theme]:not([data-theme="current"]) #navigation button.active .nav-inner {
  background: var(--raised);
}
[data-theme]:not([data-theme="current"]) #navigation {
  gap: 4px;
  padding-left: 10px;
  padding-right: 10px;
}
[data-theme="orbit"] .app-shell {
  background:
    radial-gradient(ellipse at 95% 0%, #324771 0%, transparent 55%), var(--bg);
}
[data-theme="orbit"] .plan-card {
  background: linear-gradient(135deg, #385377b3, #263458d9);
  border: 1px solid #6687ad;
  text-align: center;
  padding: 22px;
}
[data-theme="orbit"] .plan-card:not(.past)::before {
  content: "";
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 1px solid #bdd8f4;
  background: radial-gradient(
    circle at 30% 25%,
    #bfdcf8,
    #6995bd 40%,
    #36456f 75%
  );
  box-shadow:
    0 0 35px #95bdff33,
    inset -10px -8px 20px #1b255a77;
}
[data-theme="orbit"] .feed-card:not(.thin),
[data-theme="orbit"] .quick-three button {
  background: #29405bb3;
  border: 1px solid #405773;
}
[data-theme="orbit"] .quick-three button {
  border-radius: 20px;
  min-height: 76px;
}
[data-theme="warm"] .plan-card,
.theme-palette-warm .preview-hero {
  background: #efb98f;
  border-radius: 30px 30px 7px 30px;
}
[data-theme="warm"] .plan-card .eyebrow,
[data-theme="warm"] .plan-card .sub,
[data-theme="warm"] .plan-card .stat-grid small {
  color: #713e27;
}
[data-theme="warm"] .plan-card .text-button {
  color: var(--ink);
}
[data-theme="warm"] .app-shell h1,
[data-theme="warm"] .plan-card h2 {
  font-family: "Trebuchet MS", sans-serif;
}
[data-theme="warm"] .plan-card h2 {
  font-size: 28px;
}
[data-theme="warm"] .quick-three {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
[data-theme="warm"] .quick-three button {
  min-height: 74px;
  border-radius: 24px;
  align-items: flex-start;
  padding: 16px;
}
[data-theme="warm"] .quick-three button:first-child {
  grid-row: span 2;
  background: #e8dacc;
  justify-content: space-between;
  font-size: 18px;
}
[data-theme="warm"] .quick-three button:first-child svg {
  width: 30px;
  height: 30px;
}
[data-theme="warm"] .quick-three button:nth-child(2) {
  background: #dce2c5;
}
[data-theme="warm"] .quick-three button:nth-child(3) {
  background: #f6d7c6;
}
[data-theme="warm"] .panel,
[data-theme="warm"] .feed-card,
[data-theme="apricot"] .counter {
  box-shadow: 0 3px 0 #e6cdb847;
}
[data-theme="moon"] .plan-card {
  position: relative;
  background: linear-gradient(125deg, #375c4e, #25473e);
  border: 1px solid var(--line);
  padding: 22px;
}
[data-theme="moon"] .plan-card:not(.past) {
  padding-top: 27px;
}
[data-theme="moon"] .plan-card:not(.past)::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b9d6b5, #6d9a82);
  box-shadow: inset -12px -4px 0 #325d49;
  pointer-events: none;
}
[data-theme="moon"] .plan-card:not(.past) > .eyebrow,
[data-theme="moon"] .plan-card:not(.past) > h2 {
  padding-right: 52px;
}
[data-theme="moon"] .quick-three {
  gap: 0;
  padding: 12px 0;
  background: var(--panel);
  border-radius: 22px;
}
[data-theme="moon"] .quick-three button {
  background: transparent;
  border-radius: 0;
}
[data-theme="moon"] .quick-three button + button {
  border-left: 1px solid var(--line);
}
[data-theme="moon"] .counter-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
[data-theme="apricot"] .plan-card,
.theme-palette-apricot .preview-hero {
  background: linear-gradient(120deg, #f7d9b9, #f0bd93);
  border-radius: 26px;
}
[data-theme="apricot"] .plan-card h2 {
  font-family: Georgia, serif;
  font-size: 29px;
}
[data-theme="apricot"] .plan-card .sub,
[data-theme="apricot"] .plan-card .eyebrow,
[data-theme="apricot"] .plan-card .stat-grid small {
  color: #684731;
}
[data-theme="apricot"] .plan-card .text-button {
  color: var(--ink);
}
[data-theme="apricot"] .quick-three button {
  min-height: 75px;
  border-radius: 18px;
  background: #eee2d2;
}
[data-theme="apricot"] .quick-three button:nth-child(2) {
  background: #e0e5cc;
}
[data-theme="apricot"] .quick-three button:nth-child(3) {
  background: #f5ded0;
}
[data-theme="apricot"] .rest {
  padding: 12px 15px;
  border-radius: 16px;
}
[data-theme="apricot"] .rest .timer {
  font-size: 28px;
}
/* A single column keeps every theme name and description readable on phones. */
.theme-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.theme-option {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  align-items: stretch;
  padding: 12px;
  gap: 16px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--ink);
}
.theme-option[aria-pressed="true"] {
  border-color: var(--accent);
}
.theme-description {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}
.theme-description b {
  font-size: 17px;
}
.theme-caption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.theme-choice {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}
.theme-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
  flex: 0 0 96px;
  min-height: 138px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 8px;
}
.preview-date {
  text-align: center;
}
.preview-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 6px;
  background: var(--panel);
  border-radius: 9px;
  font-weight: 600;
}
.preview-action {
  height: 8px;
  border-radius: 5px;
  background: var(--accent);
}
.preview-tiles {
  display: flex;
  gap: 4px;
}
.preview-tiles i {
  flex: 1;
  height: 17px;
  border-radius: 5px;
  background: var(--raised);
}
.preview-line {
  height: 8px;
  width: 70%;
  background: var(--raised);
  border-radius: 5px;
}
.theme-palette-orbit .preview-hero::before,
.theme-palette-moon .preview-hero::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--raised));
  align-self: center;
}
.theme-palette-moon .preview-hero::before {
  align-self: flex-end;
  width: 15px;
  height: 15px;
}
.theme-palette-warm .preview-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.theme-palette-warm .preview-tiles i:first-child {
  grid-row: span 2;
  height: 38px;
}

/* Рисунки упражнений нарисованы светлой линией на прозрачном фоне: на светлых темах они
   пропадали, оставалась одна красная подсветка мышц. Подкладываем тёмную плашку - сами
   рисунки не трогаем, они общие для всех тем. */
[data-theme="warm"] .motion-picture,
[data-theme="apricot"] .motion-picture {
  background: #23282c;
  border-radius: 12px;
  margin: 0 8px 6px;
  padding: 10px 4px 6px;
}
[data-theme="warm"] .motion-tag,
[data-theme="apricot"] .motion-tag {
  color: #c9d2cb;
}
[data-theme="warm"] .exercise-icon,
[data-theme="apricot"] .exercise-icon {
  background: #23282c;
}
