/* Оформление «с шутками» (1.32.0, Кирилл 26.10.2026): та же «Тарелка»,
   но в стиле «Росомах». Всё действует только под html.theme-comic, класс
   ставит comic.js по настройке «я › Вид»; без него этот файл ничего не
   меняет. Цвета тарелки и смыслы (песочный для перебора) прежние, меняются
   контур, тени, шрифты, фон и кнопки. */

/* Шрифты лежат в /fonts (1.32.1, лицензии в fonts/OFL.txt): только
   кириллица и латиница. Браузер качает файл, только когда текст этим
   шрифтом виден, то есть в оформлении «с шутками»; в спокойном не
   качается ничего. Офлайн их отдаёт кеш sw.js после первого показа. */
@font-face { font-family: 'Balsamiq Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/balsamiq-sans-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Balsamiq Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/balsamiq-sans-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Balsamiq Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/balsamiq-sans-700-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Balsamiq Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/balsamiq-sans-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Pangolin'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/pangolin-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Pangolin'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/pangolin-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('/fonts/rubik-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('/fonts/rubik-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik Bubbles'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/rubik-bubbles-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Rubik Bubbles'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/rubik-bubbles-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

html.theme-comic {
  --ink: #17181C;
  --paper: #FFF4D6;
  --yellow: #FFD500;
  --yellow-soft: #FFF0C2;
  --blue: #2463EB;
  --pink: #FF5FA2;

  --bg: var(--paper);
  --bg-soft: #FFFBEA;
  --card: #ffffff;
  --card-2: #FFF8E4;
  --line: #E3D9C4;
  --text: var(--ink);
  --muted: #6E6459;
  --accent: #12924A;
  --accent-dark: #0E6B37;
  --accent-soft: #D8F5E2;
  --accent-btn: #12924A;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-soft: 3px 3px 0 var(--ink);
  --font: 'Balsamiq Sans', 'Comic Sans MS', 'Segoe UI', system-ui, sans-serif;
  /* крупные цифры и заголовки: вместо Palatino жирный Rubik */
  --serif: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  --f-head: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  --f-logo: 'Rubik Bubbles', 'Rubik', system-ui, sans-serif;
  --f-hand: 'Pangolin', 'Balsamiq Sans', 'Comic Sans MS', cursive;
  --dots: radial-gradient(rgba(23, 24, 28, .09) 1.3px, transparent 1.5px);
}

html.theme-comic body,
html.theme-comic .layer {
  background-color: var(--paper);
  background-image: var(--dots);
  background-size: 14px 14px;
}

/* ---------- шапка и экраны второго уровня ---------- */

html.theme-comic .header { background: var(--paper); backdrop-filter: none; border-bottom: 2.5px solid var(--ink); }
html.theme-comic .layer__head { background: var(--paper); border-bottom: 2.5px solid var(--ink); }
html.theme-comic .header__title,
html.theme-comic .layer__title { font-family: var(--f-head); font-weight: 900; letter-spacing: 0; }
html.theme-comic .header__brand { font-family: var(--f-head); font-weight: 900; }
html.theme-comic .card__title { font-family: var(--f-head); font-weight: 800; }

/* ---------- карточки ---------- */

html.theme-comic .card,
html.theme-comic .hztile {
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-soft);
}
html.theme-comic .hztile--warn { background: #FFF1E6; }
html.theme-comic .card--warn { border-color: var(--ink); background: #FFF1E6; }

/* крупные числа: жирный Rubik вместо тонкого Palatino */
html.theme-comic :is(.dhero__num, .dsh__kcal-num, .hztile__value, .mhero__num, .hzact__num, .dmeal__kcal, .ddish__kcal, .dmsr__val, .ribbon__num) {
  font-family: var(--f-head);
  font-weight: 800;
  letter-spacing: -.3px;
}

/* Ряд «вес · утро · вечер» на «Дне»: Rubik шире Palatino, без этих правок
   ряд на 360 px переносился на две строки. */
html.theme-comic :is(.dmsr__items, .dmsr__group) { column-gap: 8px; }
html.theme-comic .dmsr__val { font-size: 16px; font-weight: 700; letter-spacing: -.4px; }
html.theme-comic .dmsr__label { font-size: 12px; }

/* ---------- кнопки, чипы, выбор ---------- */

html.theme-comic .btn {
  border: 2.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: var(--f-head);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
}
html.theme-comic .btn:active { transform: translate(2px, 2px); box-shadow: none; }
html.theme-comic .btn--primary {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 800;
}
html.theme-comic .btn--danger { color: var(--brick); }
html.theme-comic .btn--ghost { background: transparent; box-shadow: none; }

html.theme-comic .chip {
  border: 2px solid var(--ink);
  background: #fff;
  font-family: var(--f-head);
  font-weight: 700;
}
html.theme-comic :is(.chip--active, .chip.is-active) {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

html.theme-comic .me-seg__btn { border: 2px solid var(--ink); font-family: var(--f-head); font-weight: 700; }
html.theme-comic .me-seg__btn.is-on { background: var(--yellow); border-color: var(--ink); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
html.theme-comic .me-seg__btn.is-on small { color: var(--ink); }
html.theme-comic .me-row + .me-row { border-top-style: dashed; }

html.theme-comic .dsh__opt {
  border: 2px dashed var(--ink);
  color: var(--ink);
  background: #fff;
  font-family: var(--f-head);
  font-weight: 700;
}
html.theme-comic .dsh__opt:active { background: var(--yellow); }

html.theme-comic .dmeal__dash { border: 2px dashed var(--ink); color: var(--ink); font-family: var(--f-head); font-weight: 700; }
html.theme-comic .ribbon__day.is-open { box-shadow: inset 0 0 0 2.5px var(--ink); }
html.theme-comic .ribbon__day.is-today .ribbon__wd,
html.theme-comic .ribbon__day.is-today .ribbon__num { color: var(--ink); }

/* ---------- меню внизу ---------- */

html.theme-comic .nav { background: #fff; backdrop-filter: none; border-top: 3px solid var(--ink); }
html.theme-comic .nav__btn { font-family: var(--f-head); font-weight: 700; font-size: 11.5px; }
html.theme-comic .nav__btn.is-active { color: var(--ink); }
html.theme-comic .fab {
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
html.theme-comic .fab:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- окна, подсказки, строка «считаю» ---------- */

html.theme-comic .sheet { border: 3px solid var(--ink); border-bottom: 0; box-shadow: none; }
html.theme-comic .sheet__title { font-family: var(--f-head); font-weight: 900; }

html.theme-comic .toast {
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-family: var(--f-hand);
  font-size: 15px;
}
html.theme-comic .toast--warn { background: #FFF1E6; }
html.theme-comic .toast--error { background: #FFE5E2; }
html.theme-comic .toast__btn {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--f-head);
  font-weight: 800;
}

html.theme-comic .statusbar__row {
  border: 2.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: 4px 4px 0 var(--yellow);
  font-family: var(--f-hand);
  font-size: 15px;
}
html.theme-comic button.statusbar__row { color: var(--yellow); }

/* ---------- маскот с репликой ---------- */

.cmx-say { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.cmx-say__pic { flex: none; display: block; line-height: 0; }
.cmx-say__bubble {
  position: relative; flex: 1 1 auto; min-width: 0; margin: 0 0 0 6px;
  padding: 9px 12px;
  border: 2.5px solid var(--ink); border-radius: 18px;
  background: #fff; box-shadow: var(--shadow-soft);
  font: 400 15.5px/1.3 var(--f-hand); color: var(--ink);
}
.cmx-say__bubble::before {
  content: ''; position: absolute; left: -12px; top: 50%; margin-top: -9px;
  border: 9px solid transparent; border-right-color: var(--ink); border-left: 0;
}
.cmx-say__bubble::after {
  content: ''; position: absolute; left: -7px; top: 50%; margin-top: -7px;
  border: 7px solid transparent; border-right-color: #fff; border-left: 0;
}
.cmx-say--dish .cmx-say__bubble { font-size: 14.5px; }

/* подпись-шутка в плитке «здоровья» и в пустом приёме «Дня» */
.hztile__joke {
  margin-top: 3px; font: 400 13px/1.25 var(--f-hand); color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.theme-comic .hztile__hint { font-family: var(--f-hand); }
.cmx-emptymeal {
  flex: 1 1 auto; min-width: 0; margin-left: auto; text-align: right;
  font: 400 14px/1.2 var(--f-hand); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- метка ---------- */

.cmx-tag {
  display: inline-block; padding: 3px 10px;
  border: 2.5px solid var(--ink); border-radius: 8px; background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
  font: 800 12px var(--f-head); text-transform: uppercase; color: var(--ink);
}

/* ---------- мем недели ---------- */

.cmx-meme {
  position: relative; overflow: hidden; text-align: center;
  padding: 44px 12px 14px;
  border: 2.5px solid var(--ink); border-radius: 18px;
  background-color: var(--blue);
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1.6px, transparent 1.8px);
  background-size: 12px 12px;
  box-shadow: var(--shadow);
}
.cmx-meme .cmx-tag { position: absolute; left: 10px; top: 10px; }
.cmx-meme__t, .cmx-meme__b {
  margin: 0; font: 900 21px/1.1 var(--f-head); text-transform: uppercase;
  color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill;
}
.cmx-meme__pic { display: flex; justify-content: center; margin: 6px 0 2px; line-height: 0; }
.cmx-meme__b { margin-top: 6px; font-size: 18px; color: var(--yellow); }
.cmx-meme__stk {
  display: inline-block; margin: 10px 0 0; padding: 4px 12px;
  border: 2.5px solid var(--ink); border-radius: 999px; background: #fff;
  font: 700 13px var(--f-head); color: var(--ink);
}
.cmx-meme__stk b { font-size: 16px; letter-spacing: 2px; }

/* ---------- наклейки ---------- */

.cmx-coll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.cmx-stk {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; font: 700 12px/1.15 var(--f-head); color: var(--ink);
}
button.cmx-stk { padding: 0; border: 0; background: none; font: 700 12px/1.15 var(--f-head); color: var(--ink); cursor: pointer; }
.cmx-stk__i {
  display: grid; place-items: center; width: 62px; height: 62px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink); font-size: 28px; line-height: 1;
  transform: rotate(-6deg);
}
.cmx-stk__c {
  position: absolute; top: -4px; right: calc(50% - 40px);
  padding: 1px 6px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--pink); color: #fff; font: 800 11px var(--f-head);
}
.cmx-stk.is-off { color: var(--muted); }
.cmx-stk.is-off .cmx-stk__i {
  background: #EEE6D4; border-style: dashed; box-shadow: none;
  filter: grayscale(1); opacity: .55;
}

.cmx-new {
  position: relative; overflow: hidden; text-align: center;
  padding: 18px 12px 14px;
  border: 2.5px solid var(--ink); border-radius: 18px; background: var(--yellow);
}
.cmx-new__rays {
  position: absolute; inset: -40%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .45) 0 10deg, transparent 10deg 20deg);
}
.cmx-new__list { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.cmx-new .cmx-stk__i { background: #fff; }
.cmx-new__t { position: relative; margin: 12px 0 0; font: 400 15px/1.25 var(--f-hand); color: var(--ink); }

/* ---------- понедельник: итоги недели готовы ---------- */

.cmx-monday {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left; color: var(--ink);
  background: var(--yellow-soft);
}
.cmx-monday__i { flex: none; font-size: 28px; line-height: 1; }
.cmx-monday__t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cmx-monday__t b { font: 800 16px/1.2 var(--f-head); }
.cmx-monday__t span { font: 400 14px/1.25 var(--f-hand); color: var(--muted); }
.cmx-monday__go { flex: none; font: 900 24px/1 var(--f-head); }
