/* Палитра и шрифт — из брендбука «Хингал Чам» 2026 */
:root {
  --pumpkin: #EB5F1D;       /* Тыква — основной */
  --pumpkin-dark: #C94A0F;
  --pumpkin-soft: #FBE0CF;
  --dough: #FEF6E6;         /* Тесто — основной фон */
  --dough-deep: #F8EAD0;
  --seeds: #5A2B12;         /* Семена — текст, акценты */
  --seeds-70: rgba(90, 43, 18, .7);
  --seeds-50: rgba(90, 43, 18, .5);
  --seeds-12: rgba(90, 43, 18, .12);
  --greens: #2F5C3A;        /* Зелень — успех */
  --greens-soft: #DDEBDD;
  --card: #FFFDF8;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(90, 43, 18, .06), 0 8px 24px rgba(90, 43, 18, .08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--dough); color: var(--seeds); }
body {
  font-family: 'Nunito', system-ui, sans-serif; font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
#app { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 96px); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0; }
.muted { color: var(--seeds-70); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.fade-in { animation: fade .28s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 22px; border-radius: 16px; font-weight: 800; font-size: 16.5px;
  background: var(--pumpkin); color: #fff; width: 100%;
  box-shadow: 0 6px 16px rgba(235, 95, 29, .28); transition: transform .12s, background .2s;
}
.btn:active { transform: scale(.98); background: var(--pumpkin-dark); }
.btn[disabled] { opacity: .5; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--seeds); box-shadow: none; border: 1.5px solid var(--seeds-12); }
.btn.soft { background: var(--pumpkin-soft); color: var(--pumpkin-dark); box-shadow: none; }
.btn.green { background: var(--greens); box-shadow: 0 6px 16px rgba(47, 92, 58, .25); }
.field {
  width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--seeds-12);
  background: var(--card); font-size: 18px; font-weight: 700; outline: none; transition: border .2s;
}
.field:focus { border-color: var(--pumpkin); }
textarea.field { height: 110px; padding: 14px 16px; font-size: 16px; font-weight: 500; resize: none; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--pumpkin); height: 40px; margin-bottom: 4px; }
.back svg { width: 22px; height: 22px; }

/* ---------- Карточки ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.pad { padding: 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px;
  font-size: 12.5px; font-weight: 800; background: var(--dough-deep); color: var(--seeds-70); white-space: nowrap;
}
.pill.orange { background: var(--pumpkin); color: #fff; }
.pill.green { background: var(--greens-soft); color: var(--greens); }
.pill.soft { background: var(--pumpkin-soft); color: var(--pumpkin-dark); }
.cover { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: var(--dough-deep); }

/* Знак бренда как крупный декоративный фрагмент (брендбук, стр. 27) */
.ornament { position: relative; overflow: hidden; }
.ornament::after {
  content: ''; position: absolute; width: 240px; height: 240px; right: -70px; top: -80px; opacity: .13;
  background: currentColor; -webkit-mask: url(/brand/mark.svg) center / contain no-repeat; mask: url(/brand/mark.svg) center / contain no-repeat;
  pointer-events: none;
}

/* ---------- Шапка ---------- */
.topbar { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.topbar .logo { height: 34px; color: var(--pumpkin); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--pumpkin); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: 16px; flex: none;
}
.hero {
  background: var(--pumpkin); color: #fff; border-radius: 26px; padding: 22px 20px; margin-bottom: 22px;
  box-shadow: 0 12px 28px rgba(235, 95, 29, .3);
}
.hero h1 { font-size: 26px; }
.hero p { opacity: .92; margin-top: 4px; font-weight: 600; }
.hero .todo { display: grid; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero .todo a {
  display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .16); border-radius: 14px;
  padding: 11px 14px; font-weight: 700; font-size: 15px; backdrop-filter: blur(4px);
}
.hero .todo a b { margin-left: auto; background: #fff; color: var(--pumpkin); border-radius: 99px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: 13px; padding: 0 8px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-title h2 { font-size: 20px; }

/* ---------- Новости ---------- */
.news-card { display: block; }
.news-card + .news-card { margin-top: 14px; }
.news-card .body { padding: 16px 18px 14px; }
.news-card h3 { font-size: 18.5px; margin: 8px 0 6px; }
.news-card .excerpt { color: var(--seeds-70); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--seeds-50); font-weight: 700; }
.news-card.must { outline: 2.5px solid var(--pumpkin); outline-offset: -2.5px; }
.like { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--dough); font-weight: 800; font-size: 14px; color: var(--seeds-70); transition: transform .15s; }
.like svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.like.on { color: var(--pumpkin); background: var(--pumpkin-soft); }
.like.on svg { fill: currentColor; }
.like:active { transform: scale(.9); }
.article .cover { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.article h1 { font-size: 27px; margin: 16px 0 10px; }
.article .text { font-size: 17px; line-height: 1.6; white-space: pre-line; }
.ack-box { margin-top: 24px; padding: 18px; border-radius: var(--radius); background: var(--pumpkin-soft); }
.ack-box.done { background: var(--greens-soft); color: var(--greens); font-weight: 800; display: flex; align-items: center; gap: 10px; }

/* ---------- Обучение ---------- */
.progress-hero { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .25) 0); position: relative; z-index: 1; }
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--pumpkin); }
.ring span { position: relative; font-weight: 900; font-size: 20px; }
.course { display: flex; gap: 14px; padding: 12px; align-items: center; }
.course + .course { margin-top: 12px; }
.course img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; flex: none; }
.course h3 { font-size: 16.5px; }
.bar { height: 7px; border-radius: 99px; background: var(--dough-deep); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--pumpkin); border-radius: inherit; transition: width .5s; }
.bar.done i { background: var(--greens); }
.lesson { display: flex; align-items: center; gap: 14px; padding: 15px 16px; }
.lesson + .lesson { border-top: 1px solid var(--seeds-12); }
.lesson .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--dough-deep); flex: none; font-size: 15px; }
.lesson.done .num { background: var(--greens); color: #fff; }
.lesson.test .num { background: var(--pumpkin); color: #fff; }
.lesson-body { font-size: 17px; line-height: 1.65; white-space: pre-line; }
.placeholder { border: 2px dashed var(--seeds-12); border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--seeds-50); font-weight: 700; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 16px; border-radius: 16px; background: var(--card); border: 2px solid var(--seeds-12); font-weight: 700; transition: border .15s, background .15s; }
.option + .option { margin-top: 10px; }
.option .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--seeds-50); flex: none; }
.option.sel { border-color: var(--pumpkin); background: #FFF4EC; }
.option.sel .radio { border: 7px solid var(--pumpkin); }
.option.ok { border-color: var(--greens); background: var(--greens-soft); }
.option.bad { border-color: #C0392B; background: #FBE3E0; }

/* ---------- Опросы ---------- */
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 18px 0 8px; }
.scale button { height: 52px; border-radius: 14px; font-weight: 900; font-size: 18px; background: var(--card); border: 2px solid var(--seeds-12); transition: all .15s; }
.scale button.sel { color: #fff; border-color: transparent; transform: scale(1.06); }
.scale button.sel.d { background: #D9534F; }
.scale button.sel.p { background: #E3A21A; }
.scale button.sel.g { background: var(--greens); }
.scale-legend { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--seeds-50); }
.anon { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: var(--greens-soft); color: var(--greens); padding: 12px 14px; border-radius: 14px; font-weight: 700; }
.anon svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* ---------- Профиль ---------- */
.profile-head { text-align: center; padding: 26px 18px 22px; background: var(--pumpkin); color: #fff; border-radius: 26px; }
.profile-head .avatar { width: 86px; height: 86px; font-size: 32px; margin: 0 auto 12px; background: var(--dough); color: var(--pumpkin); position: relative; z-index: 1; }
.profile-head h1 { font-size: 25px; position: relative; z-index: 1; }
.profile-head p { opacity: .92; font-weight: 700; position: relative; z-index: 1; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tile { background: var(--card); border-radius: 18px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 24px; font-weight: 900; color: var(--pumpkin); }
.tile span { font-size: 12.5px; font-weight: 700; color: var(--seeds-70); }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; font-size: 15px; }
.info-row + .info-row { border-top: 1px solid var(--seeds-12); }
.info-row span:first-child { color: var(--seeds-70); font-weight: 600; }
.info-row span:last-child { font-weight: 800; text-align: right; }
.shift { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.shift + .shift { border-top: 1px solid var(--seeds-12); }
.shift .date { width: 46px; text-align: center; flex: none; }
.shift .date b { display: block; font-size: 20px; font-weight: 900; line-height: 1; }
.shift .date span { font-size: 12px; font-weight: 800; color: var(--pumpkin); text-transform: uppercase; }

/* ---------- Вход ---------- */
.login { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.login .art { margin: -12px -16px 0; height: 42dvh; min-height: 250px; background: url(/brand/ill-kitchen.jpg) center 30% / cover; border-radius: 0 0 36px 36px; position: relative; }
.login .art::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(254, 246, 230, .0)); }
.login .logo { height: 46px; color: var(--pumpkin); margin: 26px 0 6px; }
.login h1 { font-size: 26px; margin-top: 8px; }
.login form { margin-top: 20px; }
.phone-wrap { position: relative; }
.phone-wrap span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 18px; color: var(--seeds-50); }
.phone-wrap .field { padding-left: 52px; letter-spacing: .02em; }
.code-hint { margin-top: 10px; font-size: 14px; background: var(--dough-deep); padding: 10px 14px; border-radius: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--seeds-50); font-size: 13px; font-weight: 700; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--seeds-12); }
.error { color: #C0392B; font-weight: 700; font-size: 14.5px; margin-top: 10px; }

/* ---------- Нижнее меню ---------- */
.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 12px);
  width: min(488px, calc(100% - 24px)); height: 68px; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 253, 248, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 24px; box-shadow: 0 10px 30px rgba(90, 43, 18, .16); z-index: 10;
}
.tabs[hidden] { display: none; }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 800; color: var(--seeds-50); position: relative; transition: color .2s; }
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--pumpkin); }
.tabs .dot { position: absolute; top: 12px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--pumpkin); border: 2px solid var(--card); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px); transform: translate(-50%, 20px); opacity: 0;
  background: var(--seeds); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  transition: all .25s; pointer-events: none; z-index: 20; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 30px 20px; }
.empty img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; margin-bottom: 14px; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--greens); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; animation: pop .4s cubic-bezier(.2, 1.6, .5, 1) both; }
.check svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.skeleton { height: 220px; border-radius: var(--radius); background: linear-gradient(90deg, var(--dough-deep), #fbf0dc, var(--dough-deep)); background-size: 200% 100%; animation: sh 1.2s infinite; }
.skeleton + .skeleton { margin-top: 14px; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- Комментарии ---------- */
.comments { margin-top: 8px; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.comment.hr .avatar { background: var(--greens); }
.bubble { background: var(--card); border-radius: 4px 18px 18px 18px; padding: 10px 14px; box-shadow: var(--shadow); flex: 1; min-width: 0; }
.comment.hr .bubble { background: var(--greens-soft); }
.bubble .who { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 14.5px; }
.bubble .who span { font-size: 12.5px; color: var(--seeds-50); font-weight: 700; }
.comment.hr .who b { color: var(--greens); }
.bubble p { margin-top: 3px; font-size: 15.5px; white-space: pre-line; overflow-wrap: anywhere; }
.bubble .when { font-size: 12px; color: var(--seeds-50); font-weight: 700; margin-top: 4px; }
.bubble .when button { color: var(--seeds-50); font-weight: 800; text-decoration: underline; font-size: 12px; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.comment-form .field { height: 48px; min-height: 48px; padding: 13px 16px; font-size: 16px; font-weight: 500; resize: none; line-height: 1.35; }
.comment-form .send { width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--pumpkin); color: #fff; display: grid; place-items: center; transition: opacity .2s; }
.comment-form .send svg { width: 22px; height: 22px; }
.comment-form .send[disabled] { opacity: .35; }

/* ---------- Уведомления ---------- */
.push-banner { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 4px; position: relative; }
.push-banner .x { position: absolute; top: 10px; right: 12px; color: var(--seeds-50); font-size: 16px; width: 28px; height: 28px; }
.push-banner b { display: block; padding-right: 24px; }
.bell { width: 42px; height: 42px; border-radius: 14px; background: var(--pumpkin-soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.toggle { width: 52px; height: 32px; border-radius: 99px; background: var(--seeds-12); position: relative; flex: none; transition: background .2s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.toggle.on { background: var(--greens); }
.toggle.on i { transform: translateX(20px); }

/* ---------- Вход по звонку ---------- */
.call-hint { display: flex; gap: 12px; align-items: flex-start; background: var(--pumpkin-soft); border-radius: 18px; padding: 14px 16px; }
.call-hint .call-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--pumpkin); color: #fff; display: grid; place-items: center; flex: none; animation: ring 1.2s ease-in-out infinite; }
.call-hint .call-ico svg { width: 22px; height: 22px; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }
.call-hint .title { display: block; font-size: 16px; }
.call-hint p { margin-top: 2px; font-size: 15px; }
.call-hint .example { margin-top: 8px; font-size: 13.5px; color: var(--seeds-70); background: rgba(255,255,255,.6); border-radius: 10px; padding: 6px 10px; display: inline-block; }
.call-hint .example b { display: inline; font-size: inherit; }
.call-hint .example u { text-decoration: none; background: var(--pumpkin); color: #fff; border-radius: 5px; padding: 0 4px; font-weight: 800; }
.resend { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 14px; }
.resend button { color: var(--pumpkin-dark); font-weight: 800; }
.resend button[disabled] { color: var(--seeds-50); font-weight: 700; }

/* ---------- Моя ставка ---------- */
.rate-sum { display: flex; align-items: baseline; gap: 6px; }
.rate-sum b { font-size: 40px; font-weight: 900; color: var(--pumpkin); line-height: 1; }
.rate-sum span { font-weight: 800; color: var(--seeds-70); }
.rate-parts { margin-top: 12px; border-top: 1px solid var(--seeds-12); }
.rate-parts div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--seeds-12); font-size: 15px; }
.rate-parts span { color: var(--seeds-70); font-weight: 600; }
.rate-parts b.plus { color: var(--greens); }
.rate-parts .soon b { color: var(--seeds-50); font-weight: 700; font-size: 13.5px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.step { text-align: center; padding: 8px 4px; border-radius: 12px; background: var(--dough-deep); }
.step b { display: block; font-size: 16px; font-weight: 900; color: var(--seeds-50); }
.step span { font-size: 11.5px; font-weight: 800; color: var(--seeds-50); }
.step.on { background: var(--pumpkin-soft); }
.step.on b { color: var(--pumpkin-dark); }
.step.on span { color: var(--pumpkin-dark); }
.rate .next { margin-top: 12px; font-size: 14.5px; background: var(--greens-soft); color: var(--greens); padding: 10px 12px; border-radius: 12px; font-weight: 600; }
