/* GENOM v0.2 — карточки упражнений, лента, профиль, бонусы */

/* навигация на 4 вкладки */
.nav { grid-template-columns: repeat(4, 1fr); }
.nav .dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--acc); border: 1.5px solid var(--paper); }

/* пиктограмма-фигурка */
.fig { display: block; width: 100%; height: auto; }
.fig .bones line { stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; fill: none; }
.fig .head { fill: var(--ink); }
.fig .floor { stroke: var(--ink); stroke-width: 1; opacity: .25; stroke-dasharray: 2 4; }
.fig--acc .bones line { stroke: var(--acc); }
.fig--acc .head { fill: var(--acc); }
.fig--paper .bones line { stroke: var(--paper); }
.fig--paper .head { fill: var(--paper); }

/* строка упражнения кликабельна: подсказка «?» */
.ticket__list li, .check { position: relative; }
.ticket__list li .q, .check .q {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--fm); font-size: 12px; color: var(--ink-2); background: var(--paper-2);
}
.ticket__list li { cursor: pointer; padding-right: 36px; }
.check { grid-template-columns: 28px 72px 1fr 30px; }
.check .q { position: static; transform: none; justify-self: end; }
.check .q:active { background: var(--ink); color: var(--paper); }

/* шапка дня: серия + сообщество */
.strip { display: flex; gap: 8px; margin: -8px 0 18px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 100px; font-family: var(--fm); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--paper-2); }
.chip b { font-family: var(--fd); font-weight: 700; font-size: 13px; letter-spacing: 0; }
.chip--acc { background: var(--acc); }
.chip--ghost { background: transparent; border-style: dashed; color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--paper); }

/* бонус в тренировке */
.work .sub-h { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 4px; }
.work .sub-h .eyebrow { color: var(--acc); }
.check.bonus .n { color: var(--acc); }
.more { margin-top: 14px; justify-self: center; }

/* ==== шторка-карточка упражнения ==================================== */
.sheet--tall { max-height: 92dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: 0; }
.sheet__grip { position: sticky; top: 0; background: var(--paper); padding: 10px 0 6px; z-index: 2; }
.sheet__grip i { display: block; width: 44px; height: 4px; background: var(--ink); margin: 0 auto; border-radius: 2px; opacity: .35; }
.excard__fig { height: 190px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-2); display: grid; place-items: center; padding: 10px 50px; margin: 10px 0 16px; box-shadow: var(--sh); position: relative; }
.excard__fig .fig { height: 100%; width: auto; }
.excard__fig .diff { position: absolute; top: 10px; left: 12px; display: flex; gap: 3px; }
.excard__fig .diff i { width: 8px; height: 8px; border: 1.5px solid var(--ink); background: var(--paper-2); }
.excard__fig .diff i.on { background: var(--ink); }
.excard__fig .id { position: absolute; top: 8px; right: 12px; font-family: var(--fm); font-size: 10px; letter-spacing: .14em; color: var(--mute); }
.excard h2 { font-family: var(--fd); font-weight: 900; font-size: 26px; letter-spacing: -.02em; margin-bottom: 8px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tag { font-family: var(--fm); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--ink-2); color: var(--ink-2); border-radius: 2px; }
.excard h3 { font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 18px 0 10px; }
.steps { counter-reset: s; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: 15px; line-height: 1.45; }
.steps li::before { counter-increment: s; content: '0' counter(s); font-family: var(--fd); font-weight: 700; font-size: 14px; color: var(--acc); padding-top: 2px; }
.mist { display: grid; gap: 6px; }
.mist li { font-size: 14px; color: var(--ink-2); padding-left: 18px; position: relative; }
.mist li::before { content: '×'; position: absolute; left: 0; color: var(--acc); font-family: var(--fm); font-weight: 600; }
.easier { font-size: 14px; border-left: 3px solid var(--ink); padding: 6px 12px; background: var(--paper-2); }
.excard .act { margin-top: 22px; display: grid; gap: 10px; }
.excard .bonus-xp { font-family: var(--fm); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); text-align: center; }
.sheet .excard p.hint { margin: 0; }

/* ==== библиотека карточек ============================================ */
.cards { padding-bottom: 24px; }
.cards .lead { color: var(--ink-2); margin: -8px 0 18px; font-size: 15px; }
.cardgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.excell { border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-2); padding: 12px 12px 10px; text-align: left; display: grid; gap: 6px; position: relative; transition: transform .08s; }
.excell:active { transform: translate(2px, 2px); }
.excell .fig { height: 92px; width: auto; justify-self: center; }
.excell .t { font-family: var(--fd); font-weight: 700; font-size: 13px; line-height: 1.2; min-height: 2.4em; }
.excell .k { font-family: var(--fm); font-size: 10px; letter-spacing: .1em; color: var(--mute); text-transform: uppercase; }
.excell .diff { position: absolute; top: 10px; right: 10px; display: flex; gap: 3px; }
.excell .diff i { width: 6px; height: 6px; border: 1px solid var(--ink); }
.excell .diff i.on { background: var(--ink); }
.excell.today::after { content: 'СЕГОДНЯ'; position: absolute; top: 8px; left: 8px; font-family: var(--fm); font-size: 9px; letter-spacing: .12em; padding: 3px 6px; background: var(--acc); border: 1px solid var(--ink); }
.excell.donebonus::after { content: 'БОНУС ✓'; position: absolute; top: 8px; left: 8px; font-family: var(--fm); font-size: 9px; letter-spacing: .12em; padding: 3px 6px; background: var(--ink); color: var(--paper); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex: 0 0 auto; cursor: pointer; }

/* ==== лента ========================================================== */
.feed { padding-bottom: 24px; }
.board { border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--ink); color: var(--paper); padding: 16px 18px; margin-bottom: 20px; box-shadow: 4px 4px 0 var(--acc); }
.board .eyebrow { color: var(--acc); margin-bottom: 8px; display: block; }
.board .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.board b { font-family: var(--fd); font-weight: 900; font-size: 30px; letter-spacing: -.03em; }
.board small { font-family: var(--fm); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-3); display: block; margin-top: 2px; }
.board .btn { margin-top: 14px; background: var(--paper); color: var(--ink); box-shadow: none; min-height: 44px; font-size: 13px; }

.post { border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-2); margin-bottom: 16px; overflow: hidden; }
.post--mine { box-shadow: var(--sh); }
.post__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.ava { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; color: #fff; font-family: var(--fd); font-weight: 900; font-size: 16px; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava--sm { width: 28px; height: 28px; font-size: 11px; }
.post__who { flex: 1; min-width: 0; }
.post__who .n { font-family: var(--fd); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.post__who .n .pill { font-size: 9px; padding: 3px 7px; }
.post__who .m { font-family: var(--fm); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-top: 2px; }
.post__time { font-family: var(--fd); font-weight: 900; font-size: 22px; letter-spacing: -.03em; text-align: right; }
.post__time small { display: block; font-family: var(--fm); font-size: 9px; letter-spacing: .12em; color: var(--mute); font-weight: 400; }
.post__photo { display: block; width: 100%; max-height: 420px; object-fit: cover; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.post__ticket { margin: 0 16px; border: 1px dashed var(--ink-2); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.post__ticket span { font-size: 13px; }
.post__ticket span b { font-family: var(--fd); font-weight: 700; font-size: 14px; margin-right: 4px; }
.post__ticket .code { margin-left: auto; font-family: var(--fm); font-size: 10px; letter-spacing: .12em; color: var(--mute); align-self: center; }
.post__text { padding: 12px 16px 4px; font-size: 15px; line-height: 1.45; }
.post__bonus { padding: 0 16px; font-family: var(--fm); font-size: 11px; letter-spacing: .08em; color: var(--acc); text-transform: uppercase; }
.post__acts { display: flex; gap: 8px; padding: 12px 16px 14px; }
.react { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 100px; font-family: var(--fm); font-size: 12px; background: var(--paper-2); transition: transform .08s; }
.react:active { transform: scale(.95); }
.react svg { width: 16px; height: 16px; }
.react.on { background: var(--acc); }
.react b { font-family: var(--fd); font-weight: 700; }
.react--share { margin-left: auto; }
.comments { border-top: 1px dashed var(--ink-2); padding: 12px 16px 14px; display: grid; gap: 10px; background: var(--paper); }
.comment { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.comment .b { font-size: 14px; line-height: 1.4; }
.comment .b b { font-family: var(--fd); font-weight: 700; font-size: 12px; margin-right: 6px; }
.comment .b small { display: block; font-family: var(--fm); font-size: 10px; color: var(--mute); margin-top: 2px; }
.cform { display: grid; grid-template-columns: 1fr 48px; gap: 8px; margin-top: 4px; }
.cform .input { height: 44px; font-size: 15px; }
.cform .btn { min-height: 44px; padding: 0; box-shadow: var(--sh-sm); }
.feed .empty { border: 1.5px dashed var(--ink-2); padding: 26px 18px; }

/* ==== публикация ====================================================== */
.compose { padding-bottom: 28px; }
.photo-pick { height: 240px; border: 1.5px dashed var(--ink); border-radius: var(--r); background: var(--paper-2); display: grid; place-items: center; position: relative; overflow: hidden; margin-bottom: 16px; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick .ph { text-align: center; color: var(--mute); display: grid; gap: 6px; justify-items: center; }
.photo-pick .ph svg { width: 36px; height: 36px; }
.photo-pick .rm { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; background: var(--ink); color: var(--paper); border-radius: 50%; display: grid; place-items: center; font-family: var(--fm); }
.textarea { width: 100%; min-height: 92px; padding: 12px 16px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-2); font: inherit; font-size: 16px; resize: vertical; outline: none; }
.textarea:focus { box-shadow: var(--sh-sm); }
.compose .stack { margin-top: auto; padding-top: 20px; }
.compose .post__ticket { margin: 0 0 16px; }

/* ==== результат: доп. действия ========================================= */
.result .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.result .stack { margin-top: auto; padding-top: 24px; }
.result .btn { margin-top: 0; }

/* ==== профиль: вкладки, бейджи ========================================== */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; margin-bottom: 20px; background: var(--paper-2); }
.seg button { padding: 12px 6px; font-family: var(--fm); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 24px; }
.badge { border: 1.5px solid var(--ink); border-radius: var(--r); padding: 10px 8px; display: grid; gap: 4px; text-align: center; background: var(--paper-2); }
.badge .ic { font-size: 20px; line-height: 1; }
.badge .t { font-family: var(--fd); font-weight: 700; font-size: 10px; line-height: 1.2; }
.badge .h { font-family: var(--fm); font-size: 9px; color: var(--mute); letter-spacing: .04em; }
.badge.off { border-style: dashed; opacity: .5; background: transparent; }
.badge.on { box-shadow: var(--sh-sm); }
.profile .stack { margin-bottom: 22px; }
.minepost { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--paper-3); }
.minepost .th { width: 64px; height: 64px; border: 1.5px solid var(--ink); border-radius: var(--r); object-fit: cover; background: var(--paper-2); display: grid; place-items: center; }
.minepost .th .fig { height: 48px; width: auto; }
.minepost .t { font-size: 14px; }
.minepost .t small { display: block; font-family: var(--fm); font-size: 10px; color: var(--mute); letter-spacing: .08em; margin-top: 2px; text-transform: uppercase; }
.minepost .r { font-family: var(--fm); font-size: 11px; color: var(--ink-2); text-align: right; line-height: 1.6; }

/* ==== таблица времени ================================================== */
.lb { display: grid; }
.lb .row { display: grid; grid-template-columns: 28px 32px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--paper-3); font-size: 14px; }
.lb .row .pos { font-family: var(--fm); font-size: 11px; color: var(--mute); }
.lb .row .t { font-family: var(--fd); font-weight: 700; font-size: 15px; }
.lb .row.me { background: var(--acc-soft); margin: 0 -8px; padding: 9px 8px; border-radius: 2px; }

/* ==== тост =============================================================== */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translateX(-50%) translateY(10px); background: var(--ink); color: var(--paper); font-family: var(--fm); font-size: 12px; letter-spacing: .04em; padding: 10px 16px; border-radius: 100px; z-index: 70; opacity: 0; transition: .2s; pointer-events: none; max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* закрытая карточка дня: действия */
.closed .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.closed .acts .btn { min-height: 46px; font-size: 12px; box-shadow: var(--sh-sm); }
.closed .acts .btn:active { transform: translate(2px, 2px); }
.closed .bonusline { margin-top: 10px; font-family: var(--fm); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }

@media (max-width: 360px) { .cardgrid { grid-template-columns: 1fr 1fr; gap: 8px; } .badges { grid-template-columns: repeat(3, 1fr); } }

/* число с единицей не переносится под цифру */
.ticket__list li { grid-template-columns: minmax(72px, auto) 1fr; }
.ticket__list .n, .check .n { white-space: nowrap; }
.check { grid-template-columns: 28px minmax(72px, auto) 1fr 30px; }
