/* Вкладки, формы и списки. Цвета — только из tokens.css. */

/* ---------- кнопки и ссылки ---------- */
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-soft { background: #f1ebe4; color: var(--ink); }
.btn-ghost-dark { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-text { display: block; margin: 10px auto 0; padding: 8px; color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.btn-text.danger, .danger { color: #b33b2e !important; }
.link { color: var(--green-dark); font-weight: 650; font-size: 14px; padding: 6px 0; }
.mt { margin-top: 12px; }
.row-2 { margin-top: 10px; }
.row-2 .btn { flex: 1; }
.toast-btn { margin-left: 8px; color: #8fe08f; font-weight: 700; }
.small { font-size: 14px !important; }

/* ---------- строки задач ---------- */
.trow, .step-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.trow:last-child, .step-row:last-child { border-bottom: 0; }
.tcheck { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c8bcae; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; background: #fff; }
.trow.done .tcheck, .step-row.done .tcheck { background: var(--green); border-color: var(--green); }
.ttitle { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; font-weight: 600; }
.ttitle > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttitle small { font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-top: 1px; }
.trow.done .ttitle, .step-row.done .ttitle { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.trow.overdue .ttitle small { color: #a8742a; }
.txp { flex: none; font-size: 12px; font-weight: 750; color: var(--green-dark); }
.dp-empty { color: var(--ink-soft); font-size: 14px; margin: 8px 0; }
.hrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- вкладка «День» ---------- */
.view-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tabs { display: flex; gap: 4px; background: #ece4da; border-radius: 12px; padding: 3px; margin: 12px 0 14px; }
.tabs button { flex: 1; min-height: 36px; border-radius: 10px; font-size: 14px; font-weight: 650; color: var(--ink-soft); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.day-nav button { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; color: var(--ink-soft); }
.day-nav b { font-size: 17px; }
.day-progress { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 12px; }
.day-progress small { color: var(--ink-soft); }
.ring { --p: 0; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #ece4da 0); }
.ring span { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 750; }
.quick-add { display: flex; gap: 8px; margin-bottom: 8px; }
.quick-add .f-input { margin: 0; }
.tlist { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 2px 12px; margin-bottom: 10px; }
.day-extra { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.view-h3 small { color: var(--green-dark); font-size: 12px; }

/* ---------- формы ---------- */
.sheet-tall { max-height: 92vh; overflow-y: auto; text-align: left; }
.sheet-tall .sheet-title { text-align: center; }
.form { text-align: left; }
.f-row { display: flex; gap: 8px; }
.f-input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px;
  background: #fff; color: var(--ink); margin-bottom: 10px; -webkit-user-select: text; user-select: text; }
.f-input:focus { outline: 2px solid var(--green); border-color: transparent; }
.f-emoji { flex: none; width: 52px; min-height: 46px; text-align: center; font-size: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.f-note { min-height: 70px; padding: 10px 12px; resize: vertical; }
.f-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 6px 0 6px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 8px 0; }
.f-check input { width: 20px; height: 20px; accent-color: var(--green); }
.f-hint { font-size: 13px; color: var(--ink-soft); margin: 6px 0 12px; }
.f-sub { margin-bottom: 4px; }
.f-sub2 { display: flex; gap: 4px; margin: 6px 0 10px; }
.chips-row, .eh-add, .sp-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.opt { min-height: 36px; padding: 0 12px; border-radius: 999px; background: #f1ebe4; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.opt.on { background: var(--ink); color: #fff; }
.opt.day { flex: 1; padding: 0; }
.menu { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; text-align: left; }
.menu button, .menu-date { min-height: 48px; padding: 0 16px; border-radius: 14px; background: #f5f0ea; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.menu-date input { border: 0; background: transparent; font: inherit; color: var(--ink); }

/* настройка кнопок главного */
.eh-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.eh-btns { display: flex; gap: 4px; }
.eh-btns button { width: 36px; height: 36px; border-radius: 10px; background: #f1ebe4; font-size: 15px; }
.eh-list { margin-bottom: 12px; }

/* ---------- вкладка «Планы» ---------- */
.sp-filter { flex-wrap: nowrap; overflow-x: auto; margin: 12px -16px 14px; padding: 0 16px; scrollbar-width: none; }
.sp-filter .opt { flex: none; }
.goal { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--sp); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 12px; }
.goal-h { display: flex; align-items: center; gap: 10px; }
.goal-sp { font-size: 24px; }
.goal-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goal-t small { color: var(--ink-soft); font-size: 12px; }
.goal-menu { width: 36px; height: 36px; border-radius: 50%; font-size: 20px; color: var(--ink-soft); }
.goal-why { font-size: 13.5px; color: var(--ink-soft); margin: 6px 0 0; font-style: italic; }
.goal-bar { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.goal-bar .bar { height: 8px; }
.goal-bar small { font-size: 12px; font-weight: 700; color: var(--green-dark); }
.step-plan { flex: none; width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.step-add { display: flex; gap: 6px; margin-top: 6px; }
.step-add input { flex: 1; min-height: 38px; border: 1px dashed #cbbfb2; border-radius: 10px; padding: 0 10px; font: inherit; font-size: 15px; background: transparent; -webkit-user-select: text; user-select: text; }
.step-add button { width: 38px; border-radius: 10px; background: #f1ebe4; font-size: 18px; }
.goal-done { opacity: .8; }
.goal-won { margin: 8px 0 0; font-weight: 700; color: var(--green-dark); }
.quests { display: flex; flex-direction: column; gap: 8px; }
.quest { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.quest > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quest small { color: var(--ink-soft); font-size: 12px; }
.quest-sp { font-size: 22px; }

/* ---------- вкладка «Карта» ---------- */
.view-map { background: #dcefee; }
.map-wrap { max-width: 520px; margin: 0 auto; }
.map { width: 100%; height: auto; display: block; }
.map .isle { cursor: pointer; transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.map .isle:active { transform: scale(.96); }
.map .fog ellipse { fill: rgba(250,252,252,.92); }
.map .route { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.map .waves path { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 1.4; stroke-linecap: round; }

/* ---------- вкладка «Я» ---------- */
.me-days { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.need-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.need-line .nl-t { width: 120px; font-size: 14px; font-weight: 600; }
.need-line .nl-t small { color: var(--ink-soft); font-weight: 500; }
.need-line .bar { height: 9px; }
.need-line b { width: 26px; text-align: right; font-size: 13px; }
.hidden-need { opacity: .5; }
.range-big { width: 100%; accent-color: var(--green); height: 30px; }
.range-val { margin: 4px 0 14px; color: var(--ink-soft); }
.skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skin { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; background: #fff; border: 2px solid var(--line); border-radius: 14px; font-size: 12.5px; font-weight: 650; }
.skin small { color: var(--ink-soft); font-weight: 500; font-size: 11px; }
.skin .sw { width: 22px; height: 34px; clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); }
.skin.on { border-color: var(--green); }
.skin.locked { opacity: .45; }
.reward { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.reward span:first-child { display: flex; flex-direction: column; font-weight: 600; }
.reward small { color: var(--ink-soft); font-weight: 500; font-size: 12px; }
.reward.claimed { opacity: .6; }
.reward .btn-text { margin: 0; }
.tag { font-size: 12px; color: var(--green-dark); font-weight: 700; }
.reward-add { display: flex; gap: 6px; margin-top: 10px; }
.reward-add .f-input { margin: 0; }
.reward-add .lvl-in { width: 70px; flex: none; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; filter: grayscale(1); opacity: .45; }
.ach span { font-size: 26px; }
.ach b { font-size: 12.5px; }
.ach small { font-size: 11px; color: var(--ink-soft); }
.ach.got { filter: none; opacity: 1; border-color: #cfe9cf; }
.prompts { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; }
.prompts summary { font-weight: 700; cursor: pointer; }
.prompt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.prompt p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.prompt > div { flex: 1; }
.steps-ol { padding-left: 20px; margin: 0 0 12px; line-height: 1.5; font-size: 14px; }
.look-del.sure { background: var(--rose); }

/* ---------- знакомство и утренний вопрос ---------- */
.iv-options, .res-quests { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-bottom: 22px; }
.iv-opt { min-height: 50px; padding: 0 18px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 16px; font-weight: 600; text-align: left; }
.iv-opt.on { background: #fff; color: var(--ink); }
.iv-opt small { opacity: .7; font-weight: 500; }
.ci-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; text-align: left; font-weight: 650; font-size: 14px; }
.ci-opts { display: flex; gap: 6px; }
.ci-opts button { flex: 1; min-height: 46px; border-radius: 12px; background: #f5f0ea; font-size: 22px; transition: transform .1s; }
.ci-opts button.on { background: #dff3df; outline: 2px solid var(--green); transform: scale(1.05); }
.levelup-x { margin: 0 0 10px; font-size: 14px; max-width: 260px; }

/* ---------- боковые панели компьютера ---------- */
.side-head { display: flex; justify-content: space-between; align-items: center; }
.side-h2 { margin-top: 18px !important; }
.side-h3 { margin: 0 0 8px; font-size: 14px; }
.goal-mini { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 6px 0; text-align: left; font-size: 13.5px; font-weight: 600; }
.goal-mini .bar { height: 6px; width: 100%; flex: none; }
@media (min-width: 900px) {
  .day-chip, .day-panel { display: none !important; }
  .side-left .trow { padding: 7px 0; }
  .sheet-tall { max-height: 88vh; }
}

/* ---------- итог недели, графики, альбом ---------- */
.me-week { margin-top: 12px; }
.wk-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.wk-head small { color: var(--ink-soft); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.tile { background: #f7f2ec; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.tile b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tile small { font-size: 12px; color: var(--ink-soft); }
.wk-line { margin: 6px 0 0; font-size: 14px; }
.album-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); text-align: left; }
.album-btn > span:first-child { font-size: 26px; }
.album-btn div { flex: 1; display: flex; flex-direction: column; }
.album-btn small { color: var(--ink-soft); font-size: 12.5px; }
.album-btn > span:last-child { font-size: 22px; color: var(--ink-soft); }
.charts { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .charts { grid-template-columns: 1fr 1fr; } }
.ch { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 6px; }
.ch-h { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 650; margin-bottom: 2px; }
.ch-h b { font-variant-numeric: tabular-nums; }
.ch-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.ch-line { fill: none; stroke: var(--green-dark); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ch-area { fill: var(--green); opacity: .12; }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.ch-base { stroke: #d9cfc4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-dot { fill: var(--green-dark); stroke: #fff; stroke-width: 2; }
.ch-cross { stroke: var(--ink-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-x { font-size: 10px; fill: var(--ink-soft); }
.ch-tip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.ch-table { overflow-x: auto; margin-top: 6px; }
.ch-table table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; background: #fff; border-radius: 12px; }
.ch-table th, .ch-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.ch-table td:first-child, .ch-table th:first-child { text-align: left; }
.help { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
.help small { color: var(--ink-soft); }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.alb-ph { aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--line); }
.alb-ph img { width: 100%; height: 100%; object-fit: cover; }
.viewer { position: fixed; inset: 0; z-index: 40; background: rgba(15,10,8,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: fade .2s; }
.viewer img { max-width: 100%; max-height: 80vh; border-radius: 12px; }
.viewer p { color: #fff; margin: 12px 0 0; font-size: 15px; text-align: center; }
.net { position: fixed; left: 50%; top: calc(var(--safe-top) + 6px); transform: translateX(-50%); z-index: 35; background: #6b5a4c; color: #fff;
  font-size: 12.5px; font-weight: 650; padding: 5px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.25); white-space: nowrap; }
