/* ===== Otto · кабинет ===== */
:root {
  --bg: #FFF7F3; --card: #FFFFFF; --card2: #FFF1EC; --text: #2A1C18; --sub: #8A766F; --line: #F3E4DE;
  --accent: #FF6A4D; --accent2: #FF9A5C; --accent-soft: #FFEDE7; --accent-text: #D4503A;
  --ok: #1E8E5A; --ok-soft: #E2F6EC; --warn: #B7791F; --warn-soft: #FFF1D6; --bad: #D4433B; --bad-soft: #FFE4E1;
  --gold1: #FFE6A8; --gold2: #FFD27A; --gold-text: #5A3A00;
  --shadow: 0 2px 10px #C0705012; --shadow-lg: 0 8px 26px #8A4A3022; --chat-bg: #F3DFD5;
  --grad: linear-gradient(90deg, var(--accent), var(--accent2));
}
:root[data-theme="dark"] {
  --bg: #17110F; --card: #241B18; --card2: #2D221E; --text: #F6ECE8; --sub: #A8958E; --line: #382A25;
  --accent-soft: #3A231D; --accent-text: #FF8A6F;
  --ok: #4FD08E; --ok-soft: #173023; --warn: #F0B54A; --warn-soft: #3A2C10; --bad: #FF7A70; --bad-soft: #3A1C1A;
  --gold1: #5A4314; --gold2: #7A5A18; --gold-text: #FFE3A3;
  --shadow: 0 2px 10px #00000040; --shadow-lg: 0 8px 26px #00000060; --chat-bg: #2A1E1A;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.38 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); }
main { max-width: 560px; margin: 0 auto; padding: 14px 14px 110px; min-height: 100vh; }
.hidden { display: none !important; }

/* типографика */
.h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.sub { color: var(--sub); font-size: 13px; }
.sec { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin: 22px 4px 10px; }
.sec .cnt { background: var(--accent-soft); color: var(--accent-text); font-size: 11px; padding: 1px 8px; border-radius: 99px; }
.sec .more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }

/* шапка */
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.me { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 99px; padding: 4px 12px 4px 4px; box-shadow: var(--shadow); }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.lg { width: 56px; height: 56px; font-size: 22px; }
.plan { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--sub); }
.plan.pro { color: var(--gold-text); background: linear-gradient(90deg, var(--gold1), var(--gold2)); padding: 2px 8px; border-radius: 99px; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; background: var(--card); display: grid; place-items: center; position: relative; box-shadow: var(--shadow); flex: none; }
.iconbtn .badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rename { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; cursor: pointer; vertical-align: bottom; }
.rename i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: var(--sub); background: var(--card2); }
.rename:active i { transform: scale(.92); }

/* карточки */
.card { background: var(--card); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 10px; }
.item { background: var(--card); border-radius: 18px; padding: 12px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); margin-bottom: 8px; }
.item.click { cursor: pointer; }
.item.click:active, .press:active { transform: scale(.985); }
.tile { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.tile.sm { width: 38px; height: 38px; border-radius: 12px; }
.chev { color: var(--sub); flex: none; }

/* статусы */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; background: var(--card2); color: var(--sub); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.soft { background: var(--accent-soft); color: var(--accent-text); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 16px; padding: 13px 18px; font-weight: 800; width: 100%; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.main { background: var(--grad); color: #fff; box-shadow: 0 6px 16px #FF6A4D40; }
.btn.soft { background: var(--accent-soft); color: var(--accent-text); }
.btn.ghost { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.gold { background: linear-gradient(90deg, var(--gold1), var(--gold2)); color: var(--gold-text); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 12px; width: auto; }
.link { color: var(--accent); font-weight: 700; font-size: 14px; }
.btns2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }

/* поля */
.field { width: 100%; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); outline: none; transition: border-color .15s; }
.field:focus { border-color: var(--accent); }
.field.big { font-size: 20px; font-weight: 700; text-align: center; letter-spacing: .02em; }
textarea.field { min-height: 120px; resize: vertical; }
.label { font-size: 12px; font-weight: 700; color: var(--sub); text-transform: uppercase; letter-spacing: .04em; margin: 14px 4px 6px; }
.err { color: var(--bad); font-size: 13px; margin-top: 8px; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.note.info { background: var(--accent-soft); color: var(--accent-text); }
.safe { display: flex; gap: 6px; align-items: flex-start; justify-content: center; font-size: 12px; color: var(--sub); margin-top: 12px; text-align: left; }

/* сегменты-вкладки */
.seg { display: flex; background: var(--card2); border-radius: 16px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--sub); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; color: var(--sub); }
.chip.on { background: var(--accent); color: #fff; }

/* нижнее меню */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(532px, calc(100% - 24px)); background: var(--card); border-radius: 24px; display: flex; justify-content: space-around; padding: 7px 4px; box-shadow: var(--shadow-lg); z-index: 20; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--sub); padding: 6px 10px; border-radius: 16px; font-weight: 600; transition: background .2s; }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 800; }

/* липкая панель действий */
.sticky { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(532px, calc(100% - 24px)); display: flex; gap: 10px; z-index: 20; }
.sticky .sq { width: 58px; flex: none; border-radius: 16px; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow-lg); color: var(--bad); }
.sticky .btn { box-shadow: var(--shadow-lg); padding: 15px; font-size: 16px; }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; box-shadow: 0 -6px 20px #8A4A3018; z-index: 20; }
.buybar .btn { width: auto; flex: none; padding: 13px 22px; }

/* главная */
.greet { display: flex; justify-content: space-between; align-items: center; margin: 10px 2px 8px; gap: 8px; }
.greet .mini { width: 96px; height: 92px; flex: none; }
.hero { background: var(--card); border-radius: 26px; padding: 16px; box-shadow: 0 6px 22px #FF6A4D17; }
.ring { width: 108px; height: 108px; position: relative; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring b { font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.ring span { font-size: 11px; color: var(--sub); }
.hname { font-weight: 800; font-size: 17px; margin: 7px 0 2px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tiles.t3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--card); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--sub); }
.stat .d { font-size: 11px; font-weight: 800; margin-left: 4px; }
.d.up { color: var(--ok); } .d.down { color: var(--bad); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 8px 2px 0; }
.chart .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bars { width: 100%; max-width: 30px; display: flex; flex-direction: column-reverse; border-radius: 8px; overflow: hidden; min-height: 4px; background: var(--card2); }
.chart .ok { background: var(--grad); }
.chart .er { background: var(--bad); opacity: .8; }
.chart .lbl { font-size: 11px; color: var(--sub); font-weight: 600; }
.chart .c.today .lbl { color: var(--accent); font-weight: 800; }
.chart .v { font-size: 10px; font-weight: 800; color: var(--sub); min-height: 13px; }
.meter { height: 6px; border-radius: 99px; background: var(--card2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.meter.green i { background: var(--ok); }
.probanner { border-radius: 20px; padding: 12px; display: flex; gap: 12px; align-items: center; background: linear-gradient(90deg, var(--gold1), var(--gold2)); color: var(--gold-text); margin-top: 14px; cursor: pointer; }
.probanner .tile { background: #FFFFFF66; color: var(--gold-text); }
.onb { text-align: center; }
.onb .otto-wrap { width: 170px; height: 160px; margin: 0 auto; }
.steps3 { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; text-align: left; }
.steps3 div { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.steps3 i { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; flex: none; }
.steps3 .done i { background: var(--ok); color: #fff; }

/* аккордеон рассылки */
.acc { background: var(--card); border-radius: 18px; margin-bottom: 8px; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .2s; }
.acc.open { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.acc .ah { display: flex; gap: 12px; align-items: center; padding: 11px 12px; cursor: pointer; }
.acc .ab { border-top: 1px solid var(--line); padding: 8px 12px 12px; }
.acc .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); flex: none; }
.acc .chev svg { transition: transform .2s; }
.acc.open .ah .chev svg { transform: rotate(90deg); }
.statsrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.statsrow div { background: var(--card); border-radius: 16px; padding: 10px; text-align: center; box-shadow: var(--shadow); }
.statsrow b { display: block; font-size: 20px; letter-spacing: -.02em; }
.statsrow span { font-size: 11px; color: var(--sub); }
.cr { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.cr + .cr { border-top: 1px solid var(--line); }
.cav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; font-size: 14px; }
.cr b { font-size: 14px; }
.check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: all .15s; color: transparent; }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini-sel { background: var(--card2); border: 0; border-radius: 10px; padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--text); }
.setrow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--card2); border-radius: 14px; cursor: pointer; margin-top: 8px; }
.setrow b { font-size: 14px; }
.setrow .val { color: var(--accent-text); font-weight: 800; font-size: 14px; }
.cycle { font-size: 12px; margin-top: 10px; }

/* шаги входа */
.steps { display: flex; align-items: center; gap: 6px; margin: 16px 2px 14px; font-size: 13px; font-weight: 700; color: var(--sub); }
.steps .st { display: flex; align-items: center; gap: 6px; }
.steps .st i { width: 24px; height: 24px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-style: normal; font-size: 12px; }
.steps .st.done { color: var(--text); } .steps .st.done i { background: var(--ok); color: #fff; }
.steps .st.on { color: var(--text); } .steps .st.on i { background: var(--accent); color: #fff; }
.steps .ln { flex: 1; height: 2px; background: var(--card2); border-radius: 2px; }
.steps .ln.done { background: var(--ok); }
.otp { display: flex; gap: 9px; justify-content: center; margin: 18px 0 10px; position: relative; }
.otp .f { width: 50px; height: 60px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: 26px; font-weight: 800; transition: all .15s; }
.otp .f.cur { border-color: var(--accent); box-shadow: 0 0 0 4px #FF6A4D22; }
.otp input { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
.hint { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 10px 12px; font-size: 13px; text-align: center; }

/* bottom sheet */
.shade { position: fixed; inset: 0; background: #0006; z-index: 50; opacity: 0; transition: opacity .2s; }
.shade.on { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; width: min(560px, 100%); transform: translate(-50%, 100%); background: var(--bg); border-radius: 26px 26px 0 0; z-index: 51; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); transition: transform .25s cubic-bezier(.2,.8,.2,1); max-height: 88vh; overflow-y: auto; }
.sheet.on { transform: translate(-50%, 0); }
.sheet .grip { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 12px; }
.sheet .x { position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow); }
.sheet h3 { margin: 4px 0 4px; font-size: 19px; text-align: center; }

/* колесо выбора */
.wheel-wrap { position: relative; height: 220px; margin: 14px 0; }
.wheel.drag { scroll-snap-type: none; cursor: grabbing; }
.wheel { position: relative; z-index: 1; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; height: 220px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 88px 0; }
.wheel::-webkit-scrollbar { display: none; }
.wheel div { height: 44px; display: grid; place-items: center; scroll-snap-align: center; font-size: 18px; font-weight: 700; color: var(--sub); transition: all .15s; }
.wheel div.on { color: var(--text); font-size: 22px; font-weight: 800; }
.wheel-wrap::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 88px; height: 44px; border-radius: 14px; background: var(--accent-soft); pointer-events: none; }
.wheel-wrap::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(var(--bg), transparent 30%, transparent 70%, var(--bg)); }

/* редактор */
.vtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vtabs button { flex: none; padding: 8px 14px; border-radius: 12px; background: var(--card); font-weight: 700; font-size: 13px; color: var(--sub); box-shadow: var(--shadow); }
.vtabs button.on { background: var(--accent); color: #fff; }
.vtabs button.empty { background: transparent; box-shadow: none; outline: 1.5px dashed var(--line); outline-offset: -1.5px; opacity: .75; }
.toolbar { display: flex; gap: 2px; background: var(--card2); border-radius: 14px; padding: 4px; }
.toolbar button { flex: 1; min-width: 0; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--sub); font-weight: 800; }
.toolbar button:active, .toolbar button.on { background: var(--card); color: var(--accent); }
.editor { min-height: 150px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); outline: none; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.editor:focus { border-color: var(--accent); }
.editor:empty::before { content: attr(data-ph); color: var(--sub); }
.editor blockquote, .bubble blockquote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 4px; }
.editor code, .bubble code { background: var(--card2); padding: 1px 5px; border-radius: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.counter { text-align: right; font-size: 12px; color: var(--sub); margin-top: 6px; }
.counter.over { color: var(--bad); font-weight: 800; }
.mediabox { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.mediabtn { border: 2px dashed var(--accent); color: var(--accent); border-radius: 14px; padding: 10px 14px; font-weight: 800; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.thumb { width: 54px; height: 54px; border-radius: 12px; background: var(--card2) center/cover; display: grid; place-items: center; flex: none; }
.chatbg { background: var(--chat-bg); border-radius: 20px; padding: 16px 12px; background-image: radial-gradient(#ffffff40 1.5px, transparent 1.5px); background-size: 16px 16px; }
.bubble { background: var(--card); border-radius: 16px 16px 16px 4px; padding: 8px 11px 6px; max-width: 88%; box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }
.bubble .from { color: var(--accent); font-weight: 800; font-size: 13px; margin-bottom: 2px; }
.bubble .sig { color: var(--sub); font-size: 13px; margin-top: 6px; }
.bubble .time { text-align: right; font-size: 11px; color: var(--sub); margin-top: 2px; }
.bubble .pic { height: 140px; border-radius: 10px; background: var(--card2) center/cover; margin: 2px -4px 6px; display: grid; place-items: center; color: var(--sub); }

/* Pro */
.phero { border-radius: 26px; padding: 18px; background: linear-gradient(135deg, var(--accent), #FF8A5C 60%, #FFB36B); position: relative; min-height: 186px; overflow: hidden; color: #fff; }
.phero .txt { position: relative; z-index: 1; width: 62%; }
.phero .po { position: absolute; right: -24px; bottom: -18px; width: 190px; height: 180px; }
.phero .chipsw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.phero .chipsw span { background: #FFFFFF33; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 99px; }
.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.term { background: var(--card); border-radius: 18px; padding: 14px 6px 12px; text-align: center; position: relative; border: 2px solid transparent; box-shadow: var(--shadow); cursor: pointer; }
.term b { font-size: 24px; display: block; line-height: 1.1; }
.term span { font-size: 11px; color: var(--sub); }
.term small { display: block; font-weight: 800; margin-top: 6px; font-size: 13px; }
.term.on { border-color: var(--accent); background: var(--accent-soft); }
.term em { position: absolute; top: -9px; right: 6px; background: var(--ok); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.pay { border: 2px solid transparent; cursor: pointer; }
.pay.on { border-color: var(--accent); }
.price { font-weight: 800; }

/* прочее */
.empty { text-align: center; padding: 24px 12px; color: var(--sub); }
.empty .otto-wrap { width: 150px; height: 140px; margin: 0 auto 6px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.notif { display: flex; gap: 12px; align-items: flex-start; }
.notif .tile { width: 38px; height: 38px; }
.notif .txt { font-size: 14px; }
.notif.unread { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -150%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; z-index: 90; transition: transform .25s; max-width: 92%; box-shadow: var(--shadow-lg); }
.toast.on { transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
.savestate { font-size: 12px; color: var(--sub); text-align: center; margin: -6px 0 10px; min-height: 16px; }
.qrbox { background: #fff; border-radius: 20px; padding: 14px; width: 230px; margin: 10px auto; box-shadow: var(--shadow); }
.qrbox svg { width: 100%; height: auto; display: block; }
.tips div { display: flex; gap: 10px; padding: 10px 0; }
.tips div + div { border-top: 1px solid var(--line); }
.tips i { font-style: normal; font-size: 20px; flex: none; }
.search { position: relative; }
.search input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--sub); }

/* Отто: анимации */
.otto-wrap { max-width: 190px; margin-left: auto; margin-right: auto; }
.otto-wrap svg, .otto { width: 100%; height: 100%; display: block; overflow: visible; }
.otto .otto-body { animation: otto-bob 3.2s ease-in-out infinite; transform-origin: 102px 200px; }
.otto .otto-eyes { animation: otto-blink 4.6s infinite; }
.otto .otto-spark { animation: otto-twinkle 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.otto-sleep .otto-body { animation-duration: 5s; }
.otto-worry .otto-body { animation: otto-shake 2.6s ease-in-out infinite; }
@keyframes otto-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
@keyframes otto-blink { 0%,92%,100% { transform: scaleY(1) } 95% { transform: scaleY(.1) } }
@keyframes otto-twinkle { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .4; transform: scale(.7) } }
@keyframes otto-shake { 0%,80%,100% { transform: translateX(0) } 85% { transform: translateX(-3px) } 90% { transform: translateX(3px) } 95% { transform: translateX(-2px) } }
@media (prefers-reduced-motion: reduce) { .otto * { animation: none !important; } }

/* заставка */
.splash { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; transition: opacity .35s; }
.splash .otto-wrap { width: 180px; height: 170px; }
.splash .pb { width: 160px; height: 6px; border-radius: 9px; background: var(--card2); margin-top: 18px; overflow: hidden; }
.splash .pb i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 9px; animation: load 1.1s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%) } 100% { transform: translateX(260%) } }
.splash.out { opacity: 0; pointer-events: none; }
.fade { animation: fade .22s ease-out; }
/* только прозрачность: transform ломает закреплённые кнопки (position: fixed) внутри страницы */
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ---------- админка ---------- */
.atabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.atabs .chip { white-space: nowrap; }
.kgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--card); border-radius: 16px; padding: 10px 8px; text-align: center; box-shadow: var(--shadow); min-width: 0; }
.kpi b { display: block; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi span { font-size: 11px; color: var(--sub); line-height: 1.2; display: block; margin-top: 2px; }
.kpi.big b { font-size: 22px; }
.kpi.ok b { color: var(--ok); }
.kpi.warn b { color: var(--warn); }
.kpi.bad b { color: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin-top: 12px; }
.bars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bars i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--grad); min-height: 2px; }
.bars span { position: absolute; top: -2px; font-size: 9px; color: var(--sub); font-weight: 700; }
.bars div:last-child i { box-shadow: 0 0 0 2px var(--accent-soft); }
.ulink { color: var(--text); font-weight: 700; }
.ulink .sub { font-weight: 500; }
.atext { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; background: var(--card2); border-radius: 12px; padding: 8px 10px; margin-top: 6px; cursor: pointer; }
.atext.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.afeed { align-items: flex-start; }
.mt4 { margin-top: 4px; }
.link.sm { font-size: 12.5px; cursor: pointer; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv span { color: var(--sub); }
.kv b { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--sub); }
.abtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.abtns .btn.sm { width: 100%; padding: 11px 10px; }
.acamp + .acamp { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.alog { align-items: flex-start; }
.alog .lic { width: 24px; text-align: center; font-size: 16px; line-height: 1.4; flex: none; }
.alog .ltxt { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }

/* ---------- тариф Max ---------- */
.plan.max { background: linear-gradient(135deg, #2B2140, #5A3F8C); color: #FFD27A; }
.phero.max { background: linear-gradient(135deg, #2B2140, #5A3F8C 55%, #B0623E); }
.phero.max .h1 { color: #FFD27A; }

/* ---------- каталог ---------- */
.chip .cn { opacity: .6; font-weight: 600; margin-left: 2px; }
.chip .cn i { font-style: normal; }
.pill.max { background: linear-gradient(135deg, #2B2140, #5A3F8C); color: #FFD27A; }
.catrow.mine { opacity: .55; }
.maxban { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #2B2140, #5A3F8C 60%, #B0623E); }
.maxban .tile { background: rgba(255,255,255,.14); font-size: 20px; }
.maxban .sub { color: rgba(255,255,255,.75); }
.maxban b { color: #FFD27A; }
.buybar.hidden { display: none; }
/* панель «Добавить» в каталоге стоит над нижним меню, как плавающая карточка */
.buybar.overnav { left: 50%; right: auto; transform: translateX(-50%); width: min(532px, calc(100% - 24px));
  bottom: calc(88px + env(safe-area-inset-bottom)); border-radius: 20px; padding: 10px 10px 10px 16px; box-shadow: var(--shadow-lg); }

/* каталог без Max: размытые строки под градиентом */
.lockwrap { position: relative; overflow: hidden; max-height: 210px; pointer-events: none; user-select: none; }
.ghostrow { filter: blur(3px); opacity: .9; }
.ghostrow .cav { background: var(--card2); border-radius: 50%; flex: none; }
.ghostrow i { display: block; height: 10px; border-radius: 6px; background: var(--line); margin: 5px 0; }
.lockfade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--card) 85%); }
.lockcta { text-align: center; padding: 4px 8px 14px; margin-top: -40px; position: relative; }
.lockcnt { font-weight: 800; font-size: 16px; }

/* спамблок аккаунта */
.spamrow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--bg2, rgba(127,127,127,.08)); cursor: pointer; }
.spamrow.ok { background: var(--ok-soft, rgba(52,199,89,.12)); color: var(--ok, #2a9d4b); }
.spamrow.bad { background: var(--bad-soft); color: var(--bad); }
.spamrow.warn { background: var(--warn-soft); color: var(--warn); }
.spamrow .sub { font-weight: 500; }
/* воронка */
.funnel .fstep { margin-top: 10px; }
.funnel .fbar { height: 26px; border-radius: 8px; background: var(--accent-soft); position: relative; overflow: hidden; }
.funnel .fbar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 8px; opacity: .45; }
.funnel .fbar b { position: absolute; left: 10px; top: 4px; font-size: 13px; color: var(--text, inherit); }
.funnel .fhead { display: flex; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.funnel .fhead .drop { color: var(--bad); }
/* правила */
.legal h4 { margin: 16px 0 6px; font-size: 15px; }
.legal p, .legal li { font-size: 14px; line-height: 1.5; margin: 4px 0; }
.legal ul { padding-left: 18px; margin: 4px 0; }

/* ---------- каталог ---------- */
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; white-space: nowrap; }
.fbtn { width: 50px; height: 50px; border-radius: 16px; }
.fbtn.on { background: var(--accent); color: #fff; }
.sclear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--sub); background: var(--card2); }
.ccard { background: var(--card); border-radius: 20px; padding: 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); margin-bottom: 10px;
  border: 1.5px solid transparent; transition: border-color .15s, transform .1s; }
.ccard.on { border-color: var(--accent); }
.ccard .check { flex: none; }
.cava { border-radius: 50%; object-fit: cover; flex: none; background: var(--card2); }
.cmeta { font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 4px; font-weight: 600; }
.cmeta .okc { color: var(--ok); }
.ctitle { font-weight: 800; font-size: 16px; margin-top: 2px; }
.cabout { font-size: 13px; color: var(--sub); line-height: 1.35; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ccard.ghostrow i { display: block; height: 10px; border-radius: 6px; background: var(--line); margin: 6px 0; }
.chead { display: flex; gap: 14px; align-items: center; padding-right: 34px; }
.chead .h2 { font-size: 19px; font-weight: 800; line-height: 1.2; }
.ell2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acts { padding: 4px 0; }
.arow { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.arow + .arow { border-top: 1px solid var(--line); }
.arow .aic { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.arow b { font-size: 15px; }
.infocard { padding: 14px 16px; }
.infocard .about { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; color: var(--text); opacity: .85; max-height: 220px; overflow: auto; }
.item.dim { opacity: .6; }
/* двойной ползунок «от–до» */
.rangecard { padding: 16px 18px; }
.drange { position: relative; height: 34px; margin: 8px 4px; }
.drange .track { position: absolute; left: 0; right: 0; top: 15px; height: 4px; border-radius: 4px; background: var(--line); }
.drange .track i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.drange input[type=range] { position: absolute; left: 0; right: 0; top: 4px; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 26px; }
.drange input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.15); cursor: pointer; }
.drange input[type=range]::-moz-range-thumb { pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }
.drange input[type=range]::-webkit-slider-runnable-track { background: none; }
.search .sclear svg { position: static; transform: none; color: inherit; }
.search input { padding-right: 44px; }
