/* ==========================================================
   Avokada — стили. Mobile-first: сначала телефон, ниже — шире.
   Идея: «наклейки» с толстым контуром, как у самого Авокадо.
   ========================================================== */
/* ---------- шрифты (свои, без Google Fonts; лицензия SIL OFL) ---------- */
@font-face { font-family: "M PLUS Rounded 1c"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/mplus-rounded-cyrillic-800.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "M PLUS Rounded 1c"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/mplus-rounded-latin-800.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: "M PLUS Rounded 1c"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/mplus-rounded-cyrillic-900.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "M PLUS Rounded 1c"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/mplus-rounded-latin-900.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: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/nunito-cyrillic-400.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/nunito-latin-400.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: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/nunito-cyrillic-700.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-700.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: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-cyrillic-800.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800.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; }

:root {
  --bg: #EDF6EE;
  --paper: #FFFFFF;
  --ink: #1E3D34;
  --ol: #2C6252;
  --main: #7AC38B;
  --shade: #429275;
  --hl: #A4E5BB;
  --pulp: #F3D35B;   /* мякоть: жёлтый акцент для главных кнопок */
  --pit: #8A5A3B;    /* косточка */
  --tomato: #F08A6C;
  --plum: #B9A2E8;
  --sky: #8FCBF0;

  --line: 3px;
  --lift: 0 5px 0 var(--ol);
  --r-lg: 26px;
  --r-md: 16px;

  --f-display: "M PLUS Rounded 1c", "Nunito", system-ui, sans-serif;
  --f-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 900; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 7vw, 52px); }
h2 { font-size: clamp(22px, 5vw, 32px); }
p { margin: 0 0 1em; }
a { color: var(--ol); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.lead { font-size: clamp(17px, 2.4vw, 20px); max-width: 34em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border: var(--line) solid var(--ol); border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- шапка / подвал ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 14px 18px;
}
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.logo-text { font: 900 27px/1 var(--f-display); color: var(--ol); letter-spacing: .01em; }
.logo-slogan { font-weight: 700; font-size: 14px; color: var(--shade); }
.site-nav a {
  font-weight: 800; text-decoration: none; color: var(--ink);
  padding: 8px 14px; border-radius: 999px; border: var(--line) solid transparent;
}
.site-nav a[aria-current="page"], .site-nav a:hover { border-color: var(--ol); background: var(--paper); }
@media (max-width: 480px) { .logo-slogan { display: none; } .site-nav a { padding: 6px 10px; font-size: 15px; } }

main { max-width: 1120px; margin: 0 auto; padding: 0 18px 48px; }
.site-footer { text-align: center; padding: 24px 18px 36px; color: var(--shade); font-size: 15px; }
.site-footer p { margin: 0; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 16px/1.1 var(--f-body);
  padding: 13px 20px; min-height: 48px;
  border: var(--line) solid var(--ol); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink);
  box-shadow: var(--lift); cursor: pointer; text-decoration: none;
  transition: transform .08s, box-shadow .08s, background-color .15s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #F7FBF7; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ol); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--pulp); }
.btn-primary:hover { background: #F7DD74; }
.btn-big { font-size: 19px; padding: 16px 28px; min-height: 58px; border-radius: 20px; }
.btn-ghost { background: var(--paper); }

/* ---------- маскот ---------- */
.mascot { position: relative; margin-inline: auto; }
.mascot-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mascot-hero { width: min(300px, 72vw); }
.mascot-side { width: min(220px, 52vw); }
.mascot-small { width: 170px; }

/* точки вращения частей в координатах viewBox (1024×1054) */
.mascot-svg g { transform-box: view-box; }
.mascot-svg #arm-right { transform-origin: 575px 700px; }
.mascot-svg #arm-left  { transform-origin: 235px 585px; }
.mascot-svg #leg-left  { transform-origin: 330px 900px; }
.mascot-svg #leg-right { transform-origin: 545px 900px; }
.mascot-svg #face      { transform-origin: 430px 470px; }
.mascot-svg #actor     { transform-origin: 430px 1030px; }
.mascot-svg #shadow    { transform-box: fill-box; transform-origin: center; }
.mascot-svg #eye-left, .mascot-svg #eye-right,
.mascot-svg #brow-left, .mascot-svg #brow-right,
.mascot-svg #mouth     { transform-box: fill-box; transform-origin: center; }
.mascot-svg #pupil-left, .mascot-svg #pupil-right { transition: transform .12s ease-out; }
.m-breath { transform-origin: 430px 1030px; animation: m-breath 3.2s ease-in-out infinite; }
@keyframes m-breath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, .988); } }
@media (prefers-reduced-motion: reduce) { .m-breath { animation: none; } }

/* облачко над головой */
.bubble {
  position: absolute; left: 62%; bottom: 92%; z-index: 2;
  transform: translateX(-50%) scale(.6); transform-origin: 30% 100%;
  opacity: 0; pointer-events: none;
  max-width: min(260px, 70vw); width: max-content;
  background: var(--paper); border: var(--line) solid var(--ol); border-radius: 20px;
  padding: 9px 15px; box-shadow: 0 4px 0 var(--ol);
  font: 800 clamp(15px, 3.8vw, 18px)/1.25 var(--f-body); text-align: center;
  transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.bubble::after {
  content: ""; position: absolute; left: 28%; bottom: -15px;
  border: 9px solid transparent; border-top: 11px solid var(--ol);
}
.bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }
.bubble.think { border-radius: 40px; }
.bubble.think::after {
  width: 13px; height: 13px; border: var(--line) solid var(--ol); background: var(--paper);
  border-radius: 50%; bottom: -22px; left: 24%;
}
.dots span { display: inline-block; animation: dot 1s infinite; }
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }

/* ---------- главная: hero ---------- */
.hero {
  display: grid; gap: 8px; align-items: center;
  padding: 64px 0 40px;
}
.hero-mascot { order: -1; position: relative; }
.hero-mascot::before {
  /* мякоть авокадо: светлый круг за маскотом */
  content: ""; position: absolute; left: 50%; top: 56%;
  width: min(300px, 70vw); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #F6EBA6 0 58%, #CFE9B4 59% 100%);
  border-radius: 50%; border: var(--line) solid var(--ol);
}
.hero-text { text-align: center; }
.hero-text .lead { margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

@media (min-width: 820px) {
  .hero { grid-template-columns: 1.1fr 1fr; gap: 32px; padding: 80px 0 64px; }
  .hero-mascot { order: 0; }
  .hero-text { text-align: left; }
  .hero-text .lead { margin-inline: 0; }
  .hero-actions { justify-content: flex-start; }
  .mascot-hero { width: min(400px, 36vw); }
  .hero-mascot::before { width: min(400px, 36vw); }
}

/* ---------- главная: плитки разделов ---------- */
.skills { padding-top: 16px; }
.tiles {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (min-width: 820px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.tile-link {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 16px; border: var(--line) solid var(--ol); border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--lift);
  color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
a.tile-link:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ol); }
a.tile-link:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ol); }
.tile-icon {
  display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; border: var(--line) solid var(--ol); background: var(--tone, var(--hl));
}
.tile-icon .icon { width: 36px; height: 36px; display: block; }
.tone-pulp   { --tone: var(--pulp); }
.tone-plum   { --tone: var(--plum); }
.tone-sky    { --tone: var(--sky); }
.tone-tomato { --tone: var(--tomato); }
.tile-title { font: 800 17px/1.2 var(--f-display); margin-top: 4px; }
.tile-text { font-size: 15px; line-height: 1.4; color: #3B5A51; }
.is-soon .tile-link { background: #F6FAF6; box-shadow: 0 5px 0 #9DBDB0; border-color: #9DBDB0; }
.is-soon .tile-icon { filter: saturate(.6); border-color: #9DBDB0; }
.is-soon .tile-icon .icon { opacity: .85; }
.tile-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px;
  background: var(--bg); border: 2px solid #9DBDB0; color: var(--shade);
}
.wiggle { animation: wiggle .45s; }
@keyframes wiggle { 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } }
@media (min-width: 820px) { .tile-link { padding: 22px; } .tile-title { font-size: 19px; } }

/* ---------- «Реши за меня» ---------- */
.reshi, .game { padding-top: 8px; }
/* Телефон: Авокадо «прилипает» сверху слева и следит за выбором, пока листаешь.
   Облачко — справа от него. */
@media (max-width: 859px) {
  .reshi-mascot, .game-mascot {
    position: sticky; top: 0; z-index: 5;
    padding: 8px 0 14px; margin-inline: -18px; padding-left: 14px;
    background: linear-gradient(var(--bg) 84%, rgba(237, 246, 238, 0));
  }
  .mascot-side { width: 112px; margin-inline: 0; }
  .mascot-side .bubble {
    left: calc(100% + 14px); bottom: 42%; width: max-content; max-width: calc(100vw - 150px);
    transform: scale(.6); transform-origin: 0 70%; text-align: left;
  }
  .mascot-side .bubble.show { transform: scale(1); }
  .mascot-side .bubble::after {
    left: -20px; bottom: 12px; border: 9px solid transparent; border-right: 11px solid var(--ol); border-top-color: transparent;
  }
  .mascot-side .bubble.think::after { left: -22px; bottom: 6px; border: var(--line) solid var(--ol); }
}
.reshi-panel h1, .game-panel h1 { text-align: center; }
.reshi-panel > .lead, .game-panel > .lead { text-align: center; margin-inline: auto; }
@media (min-width: 860px) {
  .reshi, .game { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; padding-top: 72px; }
  .reshi-mascot, .game-mascot { position: sticky; top: 90px; }
  .mascot-side { width: 320px; }
  .reshi-panel h1, .reshi-panel > .lead, .game-panel h1, .game-panel > .lead { text-align: left; margin-inline: 0; }
}
.reshi-panel, .game-panel {
  background: var(--paper); border: var(--line) solid var(--ol); border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--ol); padding: 22px 16px 24px;
}
@media (min-width: 560px) { .reshi-panel, .game-panel { padding: 30px 32px 32px; } }

.presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 18px; }
@media (min-width: 860px) { .presets { justify-content: flex-start; } }
.chip {
  font: 700 14px/1 var(--f-body); color: var(--ink);
  padding: 9px 13px; border-radius: 999px; border: 2px solid var(--ol);
  background: var(--bg); cursor: pointer;
}
.chip:hover { background: var(--hl); }
.chip:disabled { opacity: .5; cursor: not-allowed; }

.options { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 6px;
  border: var(--line) solid var(--ol); border-radius: var(--r-md); background: var(--paper);
  padding: 4px 4px 4px 14px;
  transition: background-color .08s, transform .08s;
}
.option:focus-within { box-shadow: 0 0 0 3px var(--hl); }
.option-input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: 700 18px/1.3 var(--f-body); color: var(--ink); padding: 10px 0;
}
.option-input::placeholder { color: #8AA79D; font-weight: 600; }
.option-del {
  flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: transparent; color: var(--shade); font: 800 24px/1 var(--f-body); cursor: pointer;
}
.option-del:hover { background: var(--bg); }
.option.spin { background: var(--pulp); }
.option.picked { background: var(--hl); box-shadow: 0 4px 0 var(--ol); }
.option.picked .option-input { font-weight: 800; }
.option.picked::after { content: "👍"; font-size: 22px; padding-right: 8px; }

.btn-add { width: 100%; box-shadow: none; border-style: dashed; margin-bottom: 18px; }
.btn-add:active:not(:disabled) { transform: none; box-shadow: none; }
.btn-decide { width: 100%; }
.hint { text-align: center; color: var(--shade); font-weight: 700; font-size: 15px; min-height: 1.5em; margin: 10px 0 0; }

.result {
  margin-top: 18px; padding: 20px 16px; text-align: center;
  border: var(--line) solid var(--ol); border-radius: var(--r-lg); background: #F6FBF3;
}
.result.pop { animation: pop .4s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-label { font-weight: 800; color: var(--shade); margin: 0 0 4px; }
.result-choice { font: 800 clamp(26px, 7vw, 40px)/1.15 var(--f-display); color: var(--ol); margin: 0 0 8px; overflow-wrap: anywhere; }
.result-phrase { font-size: 17px; margin: 0 0 16px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.result-actions .btn { flex: 1 1 140px; }
.result-actions .btn-primary { flex-basis: 100%; }
.share-note { margin: 12px 0 0; font-weight: 700; color: var(--shade); min-height: 1.4em; font-size: 15px; }

.confetti {
  position: fixed; width: 10px; height: 14px; border-radius: 3px; z-index: 50; pointer-events: none;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0 40px; }
.notfound .lead { margin-inline: auto; }

/* ---------- /stats/ ---------- */
.stats-login { max-width: 460px; margin: 60px auto; background: var(--paper); border: var(--line) solid var(--ol); border-radius: var(--r-lg); box-shadow: 0 6px 0 var(--ol); padding: 26px; }
.stats-form { display: grid; gap: 14px; }
.stats-form label { display: grid; gap: 6px; font-weight: 800; }
.stats-form input { font: 600 17px var(--f-body); padding: 12px 14px; border: var(--line) solid var(--ol); border-radius: var(--r-md); }
.stats-msg { background: #FFF6D6; border: 2px solid var(--pulp); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.stats-hash { white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 2px dashed var(--ol); border-radius: 12px; padding: 12px; font-size: 14px; }
.stats { padding-top: 24px; }
.stats-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stats-periods { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.stats-periods .chip { text-decoration: none; }
.stats-periods .chip[aria-current] { background: var(--main); color: #fff; }
.stats h2 { margin-top: 8px; }
.stats h3 { font-size: 19px; margin: 26px 0 10px; }
.stats-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat-card { background: var(--paper); border: var(--line) solid var(--ol); border-radius: var(--r-md); box-shadow: 0 4px 0 var(--ol); padding: 14px; display: grid; gap: 2px; }
.stat-card b { font: 900 28px/1.1 var(--f-display); color: var(--ol); }
.stat-card span { font-size: 14px; color: #3B5A51; line-height: 1.3; }
.stat-card.accent { background: var(--pulp); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; background: var(--paper); border: var(--line) solid var(--ol); border-radius: var(--r-md); padding: 12px 10px 26px; overflow-x: auto; }
.bar { position: relative; flex: 1 0 12px; height: 100%; display: flex; align-items: flex-end; }
.bar-s { position: relative; display: block; width: 100%; min-height: 2px; background: var(--hl); border: 2px solid var(--ol); border-radius: 5px 5px 2px 2px; overflow: hidden; }
.bar-a { position: absolute; left: 0; right: 0; bottom: 0; background: var(--shade); }
.bar small { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--shade); }
.bars-hours { height: 120px; }
.stats-legend { font-size: 14px; color: var(--shade); margin-top: 8px; }
.stats-legend i { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--ol); border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 10px; }
.stats-legend .lg-s { background: var(--hl); margin-left: 0; }
.stats-legend .lg-a { background: var(--shade); }
.stats-grid { display: grid; gap: 8px 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stats-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: var(--line) solid var(--ol); border-radius: var(--r-md); overflow: hidden; font-size: 15px; }
.stats-table th, .stats-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #DDEBE2; }
.stats-table th { background: var(--bg); font-weight: 800; font-size: 13px; }
.stats-table td:not(:first-child), .stats-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.stats-table tr:last-child td { border-bottom: 0; }
.muted { color: #6F8F85; }
.small { font-size: 13px; margin-top: 8px; }

/* ---------- «Спор» ---------- */
.btn-wide { width: 100%; }
.kicker { text-align: center; font-weight: 800; color: var(--shade); margin: 0 0 4px; }
@media (min-width: 860px) { .kicker { text-align: left; } }
.game-panel h1 { overflow-wrap: anywhere; }

.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 8px;
  border: var(--line) solid var(--ol); border-radius: 18px; background: var(--bg);
}
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: 10px 6px; border-radius: 13px; font-weight: 800; font-size: 15px; line-height: 1.25; }
@media (max-width: 400px) { .segmented span { font-size: 14px; } }
.segmented input:checked + span { background: var(--pulp); box-shadow: 0 3px 0 var(--ol); border: 2px solid var(--ol); padding: 8px 6px; }
.segmented input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.mode-hint { text-align: center; color: #3B5A51; font-size: 15px; margin: 0 0 16px; }

.spor-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-label, .side-fields legend { font-weight: 800; }
.field-label small { font-weight: 600; color: #6F8F85; }
.spor-form input[type=text], .spor-form textarea {
  width: 100%; font: 700 17px/1.35 var(--f-body); color: var(--ink);
  padding: 12px 14px; border: var(--line) solid var(--ol); border-radius: var(--r-md); background: var(--paper);
}
.spor-form textarea { font-weight: 600; font-size: 16px; resize: vertical; min-height: 64px; }
.spor-form input::placeholder, .spor-form textarea::placeholder { color: #8AA79D; font-weight: 600; }
.spor-form input:focus, .spor-form textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--hl); }
.side-fields { display: grid; gap: 8px; margin: 0; padding: 12px 14px 14px; border: 2px dashed #9DBDB0; border-radius: var(--r-lg); }
.side-fields legend { padding: 0 6px; }
.side-a-fields { background: #FFFBEA; }
.side-b-fields { background: #F4EFFD; }
.form-error { min-height: 1.4em; margin: 0; color: #B4462B; font-weight: 800; text-align: center; }

.versus { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: stretch; margin: 10px 0 18px; }
@media (min-width: 560px) { .versus { grid-template-columns: 1fr auto 1fr; } }
.vs {
  align-self: center; justify-self: center; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--ol); color: #fff;
  font: 900 15px/1 var(--f-display);
}
.side {
  position: relative; padding: 14px 16px; border: var(--line) solid var(--ol); border-radius: var(--r-lg);
  background: var(--paper); box-shadow: 0 4px 0 var(--ol); transition: transform .3s, opacity .3s, background-color .3s;
}
.side-a { background: #FFFBEA; }
.side-b { background: #F4EFFD; }
.side-label { display: block; font-weight: 800; color: var(--shade); font-size: 14px; }
.side-option { font: 900 clamp(20px, 5vw, 26px)/1.2 var(--f-display); margin: 4px 0; overflow-wrap: anywhere; }
.side-arg { margin: 6px 0 0; font-size: 15px; color: #3B5A51; font-style: italic; overflow-wrap: anywhere; }
.side-arg::before { content: "«"; } .side-arg::after { content: "»"; }
.side-empty .side-arg::before, .side-empty .side-arg::after { content: none; }
.side-empty, .side-you { border-style: dashed; box-shadow: none; background: var(--bg); }
.side-empty .side-option, .side-you .side-option { color: #9DBDB0; }
.side-ok { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--shade); }
.side.is-winner { background: var(--pulp); transform: scale(1.02); }
.side.is-winner .side-badge::after {
  content: "Победа"; position: absolute; top: -13px; right: 14px; padding: 2px 10px;
  background: var(--ol); color: #fff; border-radius: 999px; font: 800 13px/1.5 var(--f-body);
}
.side.is-loser { opacity: .7; }

.share-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; padding: 16px; border: var(--line) solid var(--ol); border-radius: var(--r-lg); background: #F6FBF3; }
.share-box p { margin: 0; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; width: 100%; font: 700 15px var(--f-body); padding: 12px; border: var(--line) solid var(--ol); border-radius: var(--r-md); background: var(--paper); color: var(--ink); }

.verdict { text-align: center; padding: 20px 16px; border: var(--line) solid var(--ol); border-radius: var(--r-lg); background: #F6FBF3; }
.verdict.pop { animation: pop .45s cubic-bezier(.3, 1.5, .5, 1); }
.verdict-label { font-weight: 800; color: var(--shade); margin: 0 0 4px; }
.verdict-main { font: 900 clamp(24px, 6.5vw, 36px)/1.15 var(--f-display); color: var(--ol); margin: 0 0 8px; overflow-wrap: anywhere; }
.verdict-text { font-size: 17px; margin: 0 0 16px; }

/* интрига: до «взвешивания» вердикт скрыт, победитель не подсвечен */
.is-revealing .verdict { visibility: hidden; }
.is-revealing .side.is-winner, .is-revealing .side.is-loser { background: var(--paper); transform: none; opacity: 1; }
.is-revealing .side-a { background: #FFFBEA; } .is-revealing .side-b { background: #F4EFFD; }
.is-revealing .side-badge::after { display: none; }
.stats-section { margin-top: 44px; padding-top: 24px; border-top: 3px dashed #9DBDB0; }
.stats-msg .btn { margin-top: 10px; }
.stats-diag { margin-top: 40px; }
.stats-diag summary { cursor: pointer; font-weight: 800; color: var(--shade); margin-bottom: 10px; }

/* ---------- шапка: больше пунктов меню ---------- */
.site-nav { display: flex; gap: 4px; }
@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; row-gap: 6px; padding-bottom: 6px; }
  .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -6px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; flex: none; }
}

/* ---------- «Авокадо дня» ---------- */
.den-card {
  position: relative; margin: 6px 0 18px; padding: 22px 18px 20px 18px;
  border: var(--line) solid var(--ol); border-radius: var(--r-lg); box-shadow: 0 5px 0 var(--ol);
  background: #EAF5FC;
}
.den-card.den-tip { background: #FFFBEA; }
.den-card.den-task { background: #F4EFFD; }
.den-icon {
  position: absolute; top: -22px; right: 16px; display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%; border: var(--line) solid var(--ol); background: var(--paper);
}
.den-icon .icon { width: 32px; height: 32px; }
.den-text { font: 800 clamp(20px, 5vw, 26px)/1.35 var(--f-body); margin: 0; overflow-wrap: anywhere; }
.den-link { margin-top: 14px; }
.den-react { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.den-react .btn[aria-pressed="true"] { background: var(--main); color: #fff; }
.den-react .btn[aria-pressed="false"] { opacity: .7; }
.den-result { min-height: 1.5em; text-align: center; font-weight: 800; color: var(--shade); margin: 10px 0 4px; }

.den-streak { margin: 14px 0 6px; padding: 14px 16px; border: 2px dashed #9DBDB0; border-radius: var(--r-lg); text-align: center; }
.den-streak-title { font-weight: 800; margin: 0 0 10px; }
.den-week { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 8px; }
.den-week li { display: grid; justify-items: center; gap: 4px; }
.den-week .dot { width: 22px; height: 22px; border-radius: 50%; border: var(--line) solid #9DBDB0; background: var(--paper); }
.den-week li.on .dot { background: var(--main); border-color: var(--ol); }
.den-week li.today .dot { box-shadow: 0 0 0 3px var(--pulp); }
.den-week small { font-size: 12px; color: var(--shade); font-weight: 700; }

.den-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.den-next { margin: 0; color: #3B5A51; font-size: 15px; }

.den-past { margin-top: 36px; }
.den-past-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.den-past-item { padding: 14px 16px; border: 2px solid #9DBDB0; border-radius: var(--r-md); background: var(--paper); }
.den-past-item p { margin: 4px 0 0; font-size: 15px; }
.den-past-meta { font-size: 13px; font-weight: 800; color: var(--shade); }

/* тизер на главной */
.den-teaser { margin: 4px 0 36px; }
.den-teaser-link {
  display: grid; gap: 6px; padding: 18px 20px; text-decoration: none; color: var(--ink);
  border: var(--line) solid var(--ol); border-radius: var(--r-lg); box-shadow: var(--lift);
  background: linear-gradient(120deg, #EAF5FC, #FFFBEA);
  transition: transform .12s, box-shadow .12s;
}
.den-teaser-link:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ol); }
.den-teaser-kicker { font-size: 14px; font-weight: 800; color: var(--shade); }
.den-teaser-text { font: 800 clamp(17px, 3.6vw, 21px)/1.35 var(--f-body); }
.den-teaser-more { font-weight: 800; color: var(--ol); }

/* ---------- нативная реклама (компактная полоса) ---------- */
.tone-main  { --tone: var(--hl); }
.tone-shade { --tone: #CFE3D8; }

/* общий вид: логотип | заголовок и текст | маленькая кнопка */
.ad-card a, .tile-ad .tile-link {
  display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center;
  padding: 8px 12px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 2px dashed #B7CFC4; border-radius: 14px; box-shadow: none;
  transition: border-color .15s, background-color .15s;
}
.ad-card a:hover, .tile-ad .tile-link:hover { border-color: var(--shade); background: #F9FCF9; transform: none; box-shadow: none; }
.ad-logo {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; overflow: hidden;
  border-radius: 50%; border: 2px solid #B7CFC4; background: #FFFFFF;
}
.ad-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ad-letter { display: grid; place-items: center; width: 100%; height: 100%; background: var(--tone, var(--hl)); font: 900 17px/1 var(--f-display); color: var(--ink); }
.ad-body { display: grid; gap: 0; min-width: 0; }
.ad-label { font-size: 11px; font-weight: 700; color: #7E9C92; line-height: 1.3; }
.ad-title, .tile-ad .tile-title {
  font: 800 14px/1.3 var(--f-body); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-text, .tile-ad .tile-text {
  font-size: 13px; line-height: 1.35; color: #4F6D64;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-cta {
  font: 800 13px/1 var(--f-body); color: var(--ol); white-space: nowrap;
  padding: 7px 11px; border: 2px solid #B7CFC4; border-radius: 999px; background: var(--paper);
}
.ad-card a:hover .ad-cta, .tile-ad .tile-link:hover .ad-cta { border-color: var(--ol); background: var(--hl); }
@media (max-width: 559px) {
  .ad-text, .tile-ad .tile-text { -webkit-line-clamp: 2; }
  .ad-cta { padding: 6px 9px; font-size: 12px; }
}

/* под панелями разделов */
.ad-card { margin: 22px auto 0; max-width: 680px; }
@media (min-width: 860px) { .ad-card { margin-left: 380px; margin-right: 0; } }   /* под основной панелью, мимо колонки с маскотом */

/* на главной: отдельной узкой полосой под плитками, а не плиткой в сетке */
.tile-ad { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 720px; margin-top: 4px; }
.tile-ad .ad-logo { width: 40px; height: 40px; }

/* ---------- ИИ-разделы («Что подарить» и др.) ---------- */
.ai-form { display: grid; gap: 16px; }
.chips-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips-group legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip-radio span {
  display: block; padding: 9px 14px; border-radius: 999px; border: 2px solid var(--ol);
  background: var(--bg); font-weight: 700; font-size: 15px; line-height: 1.2; transition: background-color .12s, box-shadow .12s;
}
.chip-radio:hover span { background: var(--hl); }
.chip-radio input:checked + span { background: var(--pulp); box-shadow: 0 3px 0 var(--ol); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.age-row { padding: 10px 12px; border: 2px dashed #9DBDB0; border-radius: var(--r-md); }
.ai-form input[type=text] {
  width: 100%; font: 700 17px/1.35 var(--f-body); color: var(--ink);
  padding: 12px 14px; border: var(--line) solid var(--ol); border-radius: var(--r-md); background: var(--paper);
}
.ai-form input[type=text]::placeholder { color: #8AA79D; font-weight: 600; }
.ai-form input[type=text]:focus { outline: none; box-shadow: 0 0 0 3px var(--hl); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.ai-result { padding: 22px 18px; text-align: center; border: var(--line) solid var(--ol); border-radius: var(--r-lg); background: #FFFBEA; }
.ai-result.pop { animation: pop .4s cubic-bezier(.3, 1.5, .5, 1); }
.gift-title { font: 900 clamp(22px, 6vw, 32px)/1.2 var(--f-display); color: var(--ol); margin: 4px 0 10px; overflow-wrap: anywhere; }
.gift-why { font-size: 17px; margin: 0 0 10px; }
.gift-tip { font-size: 15px; color: #3B5A51; margin: 0 0 14px; padding: 8px 12px; background: var(--paper); border-radius: 12px; border: 2px dashed #9DBDB0; }
.gift-shops { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 15px; }
.gift-shops span { font-weight: 800; color: var(--shade); }
.gift-shops a { font-weight: 800; color: var(--ol); padding: 4px 12px; border: 2px solid var(--ol); border-radius: 999px; background: var(--paper); text-decoration: none; }
.gift-shops a:hover { background: var(--hl); }
.ai-note { min-height: 1.2em; margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--shade); }
.ai-test { margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* рецепт */
.dish-time { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ol); font-weight: 800; font-size: 14px; }
.recipe { display: grid; gap: 14px; text-align: left; margin: 0 0 14px; }
@media (min-width: 640px) { .recipe { grid-template-columns: 1fr 1.4fr; gap: 20px; } }
.recipe > div { background: var(--paper); border: 2px solid #9DBDB0; border-radius: var(--r-md); padding: 12px 14px; }
.recipe-h { font-size: 17px; margin: 0 0 8px; }
.recipe-h small { font: 700 13px var(--f-body); color: var(--shade); }
.recipe-ing, .recipe-steps { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.45; }
.recipe-ing li, .recipe-steps li { margin-bottom: 4px; }
.recipe-steps li::marker { font-weight: 900; color: var(--shade); }

/* фильм */
.kino-orig { margin: -6px 0 6px; font-style: italic; color: #3B5A51; }
.kino-meta { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ol); font-weight: 800; font-size: 14px; }

/* готовый текст */
.say-text {
  margin: 6px 0 14px; padding: 16px 18px; text-align: left; position: relative;
  background: var(--paper); border: var(--line) solid var(--ol); border-radius: var(--r-md); box-shadow: 0 4px 0 var(--ol);
  font: 700 17px/1.55 var(--f-body); overflow-wrap: anywhere;
}
.link-btn { font: 800 15px var(--f-body); color: var(--ol); padding: 6px 14px; border: 2px solid var(--ol); border-radius: 999px; background: var(--paper); cursor: pointer; }
.link-btn:hover { background: var(--hl); }

/* варианты имён */
.names { list-style: none; margin: 6px 0 16px; padding: 0; display: grid; gap: 10px; text-align: left; }
.names li { position: relative; display: grid; gap: 2px; padding: 12px 16px; background: var(--paper); border: 2px solid #9DBDB0; border-radius: var(--r-md); }
.names li.fav { border: var(--line) solid var(--ol); box-shadow: 0 4px 0 var(--ol); background: #FFFDF2; }
.names .name { font: 900 clamp(20px, 5vw, 24px)/1.2 var(--f-display); color: var(--ol); overflow-wrap: anywhere; padding-right: 96px; }
.names .why { font-size: 15px; color: #3B5A51; }
.fav-badge { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 800; color: #fff; background: var(--ol); padding: 2px 10px; border-radius: 999px; }
.names li:not(.fav) .name { padding-right: 0; }

/* ---------- ИИ: «Авокадо думает» ---------- */
.ai-thinking {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; margin: 14px 0 0; padding: 14px 16px 18px;
  background: var(--pulp); border: var(--line) solid var(--ol); border-radius: var(--r-md); box-shadow: 0 4px 0 var(--ol);
  text-align: left; animation: think-in .25s ease-out;
}
.ai-result > .ai-thinking { margin: 0 0 14px; }
@keyframes think-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-thinking .pit {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #B98056 0 30%, var(--pit) 31%);
  border: var(--line) solid var(--ol); animation: pit-spin 1.1s linear infinite;
}
.ai-thinking .pit::after { content: ""; display: block; width: 8px; height: 8px; margin: 5px 0 0 6px; border-radius: 50%; background: #D9A77F; }
@keyframes pit-spin { to { transform: rotate(360deg); } }
.ai-thinking-text { display: grid; gap: 1px; }
.ai-thinking-text b { font: 900 18px/1.2 var(--f-display); color: var(--ink); }
.ai-thinking-text small { font-size: 14px; font-weight: 700; color: #5A4A1A; min-height: 1.3em; }
.ai-thinking .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(44, 98, 82, .15); }
.ai-thinking .bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--ol); border-radius: 3px;
  animation: bar-run 1.3s ease-in-out infinite;
}
@keyframes bar-run { from { left: -35%; } to { left: 100%; } }

/* пока думает: форма и результат приглушены и недоступны */
.is-thinking .ai-form > :not(.ai-thinking):not(#askBtn) { opacity: .45; pointer-events: none; transition: opacity .2s; }
.ai-result.is-thinking > :not(.ai-thinking):not(.result-actions) { opacity: .35; pointer-events: none; transition: opacity .2s; }
.btn-spin {
  display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px;
  border: 3px solid rgba(30, 61, 52, .25); border-top-color: var(--ink); border-radius: 50%; animation: pit-spin .8s linear infinite;
}
.is-thinking .btn:disabled { opacity: 1; cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  .ai-thinking .pit, .btn-spin, .ai-thinking .bar::after { animation-duration: 3s; }
}

/* занятие */
@media (min-width: 640px) { .recipe.recipe-one { grid-template-columns: 1fr; } }
.cross-link { font-size: 15px; margin: 0 0 14px; color: #3B5A51; }
.cross-link a { font-weight: 800; color: var(--ol); }

/* ---------- Шар Авокадо ---------- */
.shar { text-align: center; }
.shar-q { text-align: left; margin-bottom: 18px; }
.shar-q input {
  width: 100%; font: 700 17px/1.35 var(--f-body); color: var(--ink);
  padding: 12px 14px; border: var(--line) solid var(--ol); border-radius: var(--r-md); background: var(--paper);
}
.shar-q input::placeholder { color: #8AA79D; font-weight: 600; }
.shar-q input:focus { outline: none; box-shadow: 0 0 0 3px var(--hl); }

.pit-ball {
  position: relative; display: block; margin: 6px auto 18px; padding: 0; cursor: pointer;
  width: min(290px, 76vw); aspect-ratio: 1; border-radius: 50%;
  border: 5px solid var(--ol); box-shadow: 0 10px 0 var(--ol), 0 18px 30px rgba(44, 98, 82, .25);
  background: radial-gradient(circle at 34% 30%, #C08A61 0 12%, #A06C45 30%, #8A5A3B 55%, #6C4429 100%);
  -webkit-tap-highlight-color: transparent; transition: transform .15s;
}
.pit-ball:hover { transform: translateY(-3px); }
.pit-ball:active { transform: translateY(3px); }
.pit-ball:focus-visible { outline: 4px solid var(--ink); outline-offset: 6px; }
.pit-shine { position: absolute; left: 18%; top: 13%; width: 26%; height: 14%; border-radius: 50%; background: rgba(255, 255, 255, .28); transform: rotate(-30deg); }
.pit-window {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: 58%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #245446, #13322A); border: 4px solid #5C3A22;
}
/* треугольник вершиной вниз; размеры подобраны так, чтобы углы целиком помещались в круглом окошке */
.pit-tri {
  position: absolute; left: 11%; top: 17%; width: 78%; aspect-ratio: 1.15;
  display: grid; place-items: center; padding: 5% 17% 40%;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  background: var(--pulp); color: var(--ink);
  font: 900 clamp(12px, 3.4vw, 15px)/1.12 var(--f-display); text-align: center;
  overflow-wrap: anywhere; hyphens: auto;
  opacity: .25; transform: scale(.7);
}
.pit-tri.idle span { font-size: 30px; }
.pit-tri.blank { opacity: 0; transform: scale(.6); transition: none; }
.pit-tri.show { opacity: 1; transform: none; transition: opacity .5s ease-out, transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.pit-ball.yes .pit-tri { background: var(--hl); }
.pit-ball.no .pit-tri { background: var(--tomato); }
.pit-ball.shaking { animation: pit-shake 1s ease-in-out; }
@keyframes pit-shake {
  0%, 100% { transform: none; }
  10% { transform: translate(-14px, -6px) rotate(-10deg); }  20% { transform: translate(12px, 4px) rotate(9deg); }
  30% { transform: translate(-12px, 6px) rotate(-8deg); }    40% { transform: translate(10px, -6px) rotate(7deg); }
  50% { transform: translate(-8px, 4px) rotate(-5deg); }     60% { transform: translate(6px, -3px) rotate(4deg); }
  75% { transform: translate(-3px, 2px) rotate(-2deg); }
}
.shar-answer-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.shar-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.shar-history { margin-top: 18px; text-align: left; background: var(--paper); border: 2px solid #9DBDB0; border-radius: var(--r-md); padding: 12px 16px; }
.shar-history ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.shar-history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.shar-history b { white-space: nowrap; color: var(--ol); }
.shar-history b.no { color: #B4462B; }
.shar-history b.maybe { color: var(--pit); }
.shar .cross-link { margin-top: 18px; }
.pit-tri.long { font-size: clamp(10px, 2.9vw, 13px); }

/* ---------- «Реши за меня»: вкладки, монетка, кубик ---------- */
.segmented-3 { grid-template-columns: repeat(3, 1fr); margin: 0 0 18px; }
.segmented a { display: block; text-decoration: none; color: var(--ink); }
.segmented a span { display: block; text-align: center; padding: 10px 4px; border-radius: 13px; font-weight: 800; font-size: 15px; line-height: 1.25; }
.segmented a[aria-selected="true"] span { background: var(--pulp); box-shadow: 0 3px 0 var(--ol); border: 2px solid var(--ol); padding: 8px 2px; }
.segmented a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 13px; }
@media (max-width: 400px) { .segmented a span { font-size: 14px; } }

.toss-result { text-align: center; font: 900 clamp(22px, 6vw, 30px)/1.25 var(--f-display); color: var(--ol); min-height: 1.3em; margin: 6px 0 14px; }
.toss-score { text-align: center; color: var(--shade); font-weight: 700; margin: 14px 0 0; }

/* монетка */
.coin-labels { display: grid; gap: 8px; margin-bottom: 8px; }
@media (min-width: 560px) { .coin-labels { grid-template-columns: 1fr 1fr; } }
.coin-labels label { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.coin-labels span { white-space: nowrap; }
.coin-labels input {
  flex: 1; min-width: 0; font: 700 16px var(--f-body); color: var(--ink);
  padding: 9px 12px; border: 2px solid var(--ol); border-radius: 12px; background: var(--paper);
}
.coin-labels input:focus { outline: none; box-shadow: 0 0 0 3px var(--hl); }
.coin-stage { perspective: 900px; display: grid; place-items: center; height: 250px; margin-top: 10px; }
.coin { width: 180px; height: 180px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.coin:focus-visible { outline: 4px solid var(--ink); outline-offset: 6px; border-radius: 50%; }
.coin-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1.25s cubic-bezier(.2, .7, .3, 1); }
.coin-face {
  position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: grid; place-items: center; align-content: center; gap: 4px;
  background: radial-gradient(circle at 35% 30%, #FFF1B0, #F3D35B 45%, #D9AE2F 100%);
  border: 5px solid var(--ol); box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .35), inset 0 0 0 11px rgba(44, 98, 82, .35);
  color: var(--ol);
}
.coin-face b { font: 900 18px/1 var(--f-display); letter-spacing: .06em; }
.coin-tails { transform: rotateY(180deg); }
.coin-pit { width: 58px; height: 58px; border-radius: 50%; border: 4px solid var(--ol);
  background: radial-gradient(circle at 35% 30%, #C08A61 0 15%, #8A5A3B 60%, #6C4429); }
.coin-num { font: 900 64px/1 var(--f-display); }
.coin.tossing { animation: coin-toss 1.25s cubic-bezier(.3, .6, .4, 1); }
@keyframes coin-toss { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(-55px) scale(1.1); } 100% { transform: translateY(0) scale(1); } }

/* кубик */
.dice-count { justify-content: center; align-items: center; margin-bottom: 6px; }
.dice-count .chip-radio span { min-width: 44px; text-align: center; }
.dice-count-label { font-weight: 800; color: var(--shade); margin-left: 4px; }
.dice-stage {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px 34px;
  min-height: 200px; padding: 30px 0 20px; perspective: 700px; cursor: pointer;
}
.die { --s: 78px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; }
.dice-stage.many .die { --s: 60px; }
.die .face {
  position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12%;
  background: #FFFFFF; border: 3px solid var(--ol); border-radius: 18%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: inset 0 -5px 0 rgba(44, 98, 82, .12);
}
.die .face i { display: block; margin: 12%; border-radius: 50%; }
.die .face i.on { background: var(--ol); }
.die .f1 i.on { background: var(--tomato); }
.die .f1 { transform: translateZ(calc(var(--s) / 2)); }
.die .f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.die .f3 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.die .f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.die .f2 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.die .f5 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.die.bounce { animation: die-bounce 1s ease-out; }
@keyframes die-bounce { 0% { translate: 0 0; } 30% { translate: 0 -60px; } 60% { translate: 0 0; } 75% { translate: 0 -14px; } 100% { translate: 0 0; } }

/* ---------- случайное число ---------- */
.segmented-4 { grid-template-columns: repeat(4, 1fr); margin: 0 0 18px; }
@media (max-width: 400px) { .segmented-4 a span { font-size: 13px; padding-inline: 0; } }
.num-presets { justify-content: center; }
.num-form { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 10px; }
.num-form label { display: grid; gap: 4px; font-weight: 800; font-size: 14px; }
.num-form input {
  width: 100%; min-width: 0; font: 800 20px var(--f-body); color: var(--ink); text-align: center;
  padding: 10px 6px; border: var(--line) solid var(--ol); border-radius: var(--r-md); background: var(--paper);
}
.num-form input:focus { outline: none; box-shadow: 0 0 0 3px var(--hl); }
.num-unique { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 4px; font-weight: 800; cursor: pointer; }
.num-unique input { width: 20px; height: 20px; accent-color: var(--ol); }

.num-stage {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
  min-height: 150px; margin: 14px 0 4px; padding: 16px; cursor: pointer;
  background: var(--ink); border: var(--line) solid var(--ol); border-radius: var(--r-lg);
  box-shadow: inset 0 6px 14px rgba(0, 0, 0, .35), 0 5px 0 var(--ol);
}
.num-idle { font: 900 64px/1 var(--f-display); color: rgba(243, 211, 91, .35); }
.reels { display: flex; gap: 6px; font: 900 clamp(58px, 17vw, 96px)/1 var(--f-display); }
.reel, .reel-sign {
  display: block; height: 1em; overflow: hidden; width: .72em; text-align: center; border-radius: 10px;
  background: linear-gradient(#E9DDA3, #FFF8D6 30%, #FFF8D6 70%, #E9DDA3); color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--ol);
}
.reel-sign { background: none; box-shadow: none; color: var(--pulp); width: .5em; }
.strip { display: block; will-change: transform; }
.strip span { display: block; height: 1em; }
.num-chip {
  min-width: 56px; padding: 8px 12px; text-align: center; border-radius: 14px; font: 900 22px/1.1 var(--f-display);
  background: rgba(243, 211, 91, .25); color: var(--pulp); transition: background-color .2s, color .2s;
}
.num-chip.done { background: var(--pulp); color: var(--ink); box-shadow: 0 3px 0 #9E8420; animation: pop .3s ease-out; }
