/* ================= «Сегодня» ================= */
.td-head {
  position: relative; overflow: hidden; color: #fff; background: var(--cover);
  padding: calc(var(--safe-top) + 34px) 22px 26px; border-radius: 0 0 26px 26px;
}
.td-head .ghost {
  position: absolute; right: -10px; top: calc(var(--safe-top) + 4px); font-family: var(--f-head); font-weight: 800; font-size: 132px; line-height: 1;
  color: rgba(255, 255, 255, .07); letter-spacing: -.04em; pointer-events: none;
}
.td-head .kicker { color: var(--cor-soft); letter-spacing: .2em; }
.td-head h1 { font-family: var(--f-head); font-weight: 800; font-size: 36px; letter-spacing: -.02em; margin: 4px 0 6px; }
.td-head .s { font-size: 13px; color: #DAD7FF; }

.list { padding: 4px 16px 0; }
.grp {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 18px 4px 8px; text-align: left;
  font-family: var(--f-head); font-weight: 800; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--vio);
}
.grp::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--cor2); }
.grp .cnt { margin-left: auto; margin-right: 8px; color: var(--muted); letter-spacing: .04em; }
.it {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line2); border-radius: 15px;
  padding: 12px 13px; margin-bottom: 7px; cursor: pointer; transition: opacity .3s;
}
.it:active { background: #FBFAFF; }
.cb {
  flex: none; position: relative; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #C9C5F0; margin-top: 1px;
  transition: background .2s, border-color .2s;
}
.cb::after { content: ''; position: absolute; inset: -10px; } /* палец больше квадратика */
.cb.on { border-color: transparent; background: var(--grad-ind); }
.cb.on::before {
  content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg);
}
.it-b { min-width: 0; flex: 1; }
.it .x { font-size: 15px; font-weight: 600; color: var(--head); line-height: 1.3; overflow-wrap: anywhere; }
.it .m { font-size: 12px; color: var(--muted); margin-top: 3px; }
.it .m .t-amb { color: var(--amber); }
.it .m .t-red { color: var(--cor); font-weight: 600; }
.it.dn { opacity: .55; }
.it.dn .x { color: #A9A6C8; text-decoration: line-through; text-decoration-color: #C9C5F0; }

/* ================= лист дела ================= */
.item-sheet .kicker { margin-bottom: 4px; }
.it-title {
  width: 100%; border: 0; outline: none; resize: none; padding: 0; background: transparent; margin: 4px 0 10px;
  font-family: var(--f-head); font-weight: 800; font-size: 21px; line-height: 1.25; color: var(--head);
}
.it-raw { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line2); padding-top: 9px; margin: 4px 0 6px; }
.it-lab { display: flex; justify-content: space-between; font-family: var(--f-head); font-weight: 800; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--vio); margin: 14px 0 7px; }
.it-where { font-family: var(--f-text); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-b { padding: 7px 12px; border-radius: 12px; background: var(--lil); color: #4338CA; font-size: 13px; font-weight: 600; }
.seg-b.on { background: var(--grad-ind); color: #fff; }
.item-sheet .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.item-sheet .btns .btn { height: 44px; font-size: 14px; }

/* ================= «Разбор» ================= */
.rv { padding: calc(var(--safe-top) + 24px) 0 0; }
.rv-top { padding: 0 20px; }
.rv-top .lab { display: flex; justify-content: space-between; font-family: var(--f-head); font-weight: 800; font-size: 14px; color: var(--head); }
.rv-top .lab span:last-child { color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad-ind); border-radius: 3px; transition: width .3s ease; }

.stack { position: relative; margin: 22px 16px 0; min-height: 250px; }
.card {
  position: relative; z-index: 2; background: #fff; border-radius: 24px; padding: 20px 20px 16px; min-height: 250px;
  box-shadow: 0 16px 34px -16px rgba(30, 27, 75, .32); touch-action: pan-y; user-select: none;
  transition: transform .2s ease, opacity .2s ease; display: flex; flex-direction: column;
}
.card.behind { position: absolute; inset: 0; z-index: 1; transform: translateY(12px) scale(.94); opacity: .6; box-shadow: none; border: 1px solid var(--line); }
.card[data-hint='right'] { box-shadow: 0 16px 34px -16px rgba(79, 70, 229, .55), inset 0 0 0 2px rgba(79, 70, 229, .35); }
.card[data-hint='left'] { box-shadow: 0 16px 34px -16px rgba(138, 135, 168, .55), inset 0 0 0 2px rgba(138, 135, 168, .4); }
.card .k { text-align: left; font-family: var(--f-head); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--cor); }
.card .tt { font-family: var(--f-head); font-weight: 800; font-size: 22px; line-height: 1.22; letter-spacing: -.01em; color: var(--head); margin: 10px 0 14px;
  overflow-wrap: anywhere; }
.card .chips { margin-bottom: 14px; }
.card .src { margin-top: auto; font-size: 11.5px; color: var(--muted); border-top: 1px solid #F0EFF8; padding-top: 10px; }

.rv-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 22px 16px 0; }
.rv-btns.wide .btn.pri { grid-column: 1 / -1; }
.rv-btns .btn { height: 48px; width: 100%; }
.swipe { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 14px; }
.rv-back { display: block; margin: 12px auto 0; font-family: var(--f-head); font-weight: 800; font-size: 13px; color: var(--ind); padding: 8px 14px; }
.rv-done { text-align: center; padding: 70px 28px 0; }
.rv-done .big { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 24px; background: var(--grad-ind); color: #fff;
  font-size: 34px; line-height: 72px; font-weight: 800; box-shadow: 0 16px 30px -14px rgba(79, 70, 229, .7); }
.rv-done h2 { font-family: var(--f-head); font-weight: 800; font-size: 26px; color: var(--head); margin: 0 0 8px; }
.rv-done p { color: var(--muted2); margin: 0 0 22px; }
.pick { display: grid; gap: 8px; }
.pick .sheet-title { margin-bottom: 4px; }

/* ================= «Все» ================= */
.filters { margin: 12px 0 4px; }
.all-list { padding-top: 6px; }
.k-mini { font-family: var(--f-head); font-weight: 800; font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--cor); margin-bottom: 3px; }

/* ================= «Настройки» ================= */
.settings .field { margin-bottom: 4px; }
select.field { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A87A8' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.set-lab { display: block; font-family: var(--f-head); font-weight: 800; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--vio); margin: 18px 2px 7px; }
.set-hint { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.sph-row { display: flex; gap: 8px; margin-bottom: 7px; }
.sph-del { flex: none; width: 50px; height: 50px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); color: var(--muted); font-size: 22px; }
.btn.add { height: 42px; color: var(--ind); }
.btn.wide { width: 100%; margin-top: 18px; }
.set-link { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; padding: 15px 16px; border-radius: 16px; background: var(--lil); text-decoration: none;
  font-family: var(--f-head); font-weight: 800; color: var(--head); }
.set-link small { font-family: var(--f-text); font-weight: 500; color: var(--muted2); font-size: 12.5px; }

/* ================= «Настройка iPhone» ================= */
.setup { padding-bottom: calc(var(--safe-bottom) + 28px); }
.setup .back { display: inline-block; color: var(--ind); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.step { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line2); border-radius: 20px; padding: 16px; margin-bottom: 10px; }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--grad-ind); color: #fff; font-family: var(--f-head); font-weight: 800;
  display: flex; align-items: center; justify-content: center; }
.step.ok .step-n { background: var(--green-bg); color: var(--green); }
.step-b { min-width: 0; flex: 1; }
.step h3 { font-family: var(--f-head); font-weight: 800; font-size: 16.5px; color: var(--head); margin: 5px 0 6px; }
.step h4 { font-family: var(--f-head); font-weight: 800; font-size: 13px; color: var(--head); margin: 14px 0 4px; }
.step p { margin: 0 0 10px; font-size: 14px; }
.step ol { margin: 4px 0 8px; padding-left: 18px; }
.step li { margin-bottom: 10px; font-size: 14px; }
.step li::marker { color: var(--vio); font-weight: 800; }
.step a { color: var(--ind); font-weight: 600; }
.step .btn { height: 44px; }
.token { display: block; margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: var(--lil); font-family: var(--f-mono); font-size: 12px;
  color: #3730A3; word-break: break-all; user-select: all; }
.muted.small { font-size: 12.5px; margin-top: 4px; }
.manual { margin-top: 12px; border-top: 1px solid var(--line2); padding-top: 10px; }
.manual summary { cursor: pointer; font-family: var(--f-head); font-weight: 800; font-size: 13px; color: var(--ind); }
