/* Skalia · final4 mobile — additions on top of the round-2 Pocket Chat base (base.css) */
.inbox-btn { position: relative; }
.badge { position: absolute; top: 6px; right: 5px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font: 600 10.5px/17px var(--sans); text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--paper); }
.badge:empty { display: none; }
.plus { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.composer.has .plus { display: none; }
.who-sub .live.off { background: var(--ink3); animation: none; }

/* desktop side card */
.sync-card { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 249, .7); }
.sync-card p { font-size: 12.5px; color: var(--ink2); line-height: 1.5; margin: 10px 0 12px; }
.sync-row { display: flex; gap: 9px; align-items: center; margin-top: 12px; font: 600 14px/1.3 var(--sans); }
.sync-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); flex: none; }
.sync-row .dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(46, 122, 87, .14); }
.sync-links { display: flex; flex-wrap: wrap; gap: 6px; }
.sync-links a { font: 500 12px/1 var(--sans); color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.sync-links a:hover { border-color: var(--ink3); }

/* messages: inline actions */
.msg .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-family: var(--sans); }
.msg .acts .b { height: 44px; font-size: 14.5px; }
.msg.done.desk i { background: var(--gold); color: #1c1a17; }
.msg.done.note i { background: var(--ink); }
.msg.done .undo { margin-left: auto; font: 500 12px/1 var(--sans); color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; padding: 8px 0 8px 8px; flex: none; }
.msg.done span { flex: 1; min-width: 0; }
.msg.done .k { display: block; color: var(--ink3); font-weight: 400; margin-top: 2px; }
.msg.notice { font: 500 12.5px/1.35 var(--sans); color: var(--ink2); background: rgba(255, 253, 249, .6); border: 1px dashed var(--line); border-radius: 12px; padding: 9px 12px; display: flex; gap: 8px; align-items: center; }
.msg.notice i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.ans-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ans-acts button { font: 500 12.5px/1 var(--sans); color: var(--ink); padding: 9px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--ink); min-height: 34px; }

/* session header inside the feed */
.sess { margin: 4px 0 14px; display: flex; align-items: center; gap: 10px; font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.sess::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sess b { color: var(--ink); font-weight: 600; }

/* card extras */
.c-eye .phone-tag, .tag-phone { font: 600 10.5px/1 var(--sans); letter-spacing: .04em; color: var(--gold-ink); background: #f4e8c8; padding: 4px 7px; border-radius: 6px; }
.c-plain { font: 400 19px/1.36 var(--serif); margin: 10px 0 0; text-wrap: pretty; }
.c-recl { font: 500 13px/1.4 var(--sans); color: var(--ink2); margin: 8px 0 0; }
.c-recl b { color: var(--ink); font-weight: 600; }
.c-sub { display: flex; justify-content: space-between; gap: 6px; margin-top: 10px; }
.c-sub button { font: 500 13px/1 var(--sans); color: var(--ink2); padding: 10px 6px; min-height: 40px; border-radius: 10px; display: inline-flex; gap: 6px; align-items: center; }
.c-sub button:hover, .c-sub button:active { color: var(--ink); background: var(--paper2); }
.c-sub .later { color: var(--gold-ink); font-weight: 600; }
.consq { margin: 0 0 14px; font: 400 13px/1.45 var(--sans); color: var(--ink2); padding: 9px 11px; border-radius: 12px; background: var(--paper2); }
.consq b { color: var(--ink); font-weight: 600; }
.chg-note { width: 100%; min-height: 48px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; font: 400 16px/1.3 var(--sans); padding: 10px 2px; outline: none; margin-top: 6px; }

/* desk card rows (extends base .desk) */
.desk-row .st.gold { color: var(--gold-ink); font-weight: 600; }
.desk-row small.always { display: block; }
.desk-foot { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px 11px; border-top: 1px solid var(--line2); font: 500 12px/1.2 var(--sans); color: var(--ink3); }
.desk-foot button { color: var(--ink); font-weight: 600; padding: 6px 0 6px 8px; }

/* toast (inside the phone) */
.toast-host { position: absolute; left: 14px; right: 14px; bottom: 132px; z-index: 75; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 100%; display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; background: rgba(28, 26, 23, .94); color: #f4efe5; font: 500 13px/1.35 var(--sans); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); transform: translateY(10px); opacity: 0; transition: .3s var(--ease); }
.toast.in { transform: none; opacity: 1; }
.toast button { color: #f3d98f; font-weight: 600; flex: none; padding: 6px 0 6px 6px; }

/* ---------------- triage (inbox zero) ---------------- */
.triage, .recorder { position: absolute; inset: 0; z-index: 30; background: var(--paper); display: flex; flex-direction: column; animation: tIn .38s var(--ease) both; }
.triage[hidden], .recorder[hidden] { display: none; }
@keyframes tIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.t-top { flex: none; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 52px 8px 4px; }
.t-title { text-align: center; }
.t-title b { display: block; font: 600 16px/1.1 var(--sans); letter-spacing: -.01em; }
.t-title span { font: 500 12px/1 var(--sans); color: var(--ink3); font-variant-numeric: tabular-nums; }
.t-prog { height: 3px; margin: 8px 20px 0; border-radius: 2px; background: var(--line); overflow: hidden; }
.t-prog i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .5s var(--ease); }
.t-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 12px; display: flex; flex-direction: column; scrollbar-width: none; }
.t-body::-webkit-scrollbar { display: none; }
.t-card { background: var(--card); border-radius: 22px; padding: 18px; box-shadow: 0 0 0 1px var(--line), 0 18px 34px -20px rgba(60, 45, 20, .35); animation: cardIn .45s var(--spring) both; touch-action: pan-y; position: relative; will-change: transform; }
.t-card.fly-r { animation: flyR .32s var(--ease) both; }
.t-card.fly-l { animation: flyL .32s var(--ease) both; }
.t-card.fly-d { animation: flyD .32s var(--ease) both; }
@keyframes flyR { to { opacity: 0; transform: translateX(110%) rotate(6deg); } }
@keyframes flyL { to { opacity: 0; transform: translateX(-110%) rotate(-6deg); } }
@keyframes flyD { to { opacity: 0; transform: translateY(40px) scale(.96); } }
.t-kind { display: flex; justify-content: space-between; align-items: center; font: 500 11.5px/1 var(--sans); color: var(--ink3); gap: 8px; }
.t-kind .pill { font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--paper2); color: var(--ink2); }
.t-kind .pill.dec { background: var(--ink); color: #fff; }
.t-from { display: flex; gap: 11px; align-items: center; margin: 14px 0 10px; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--paper2); display: grid; place-items: center; font: 600 13px/1 var(--sans); color: var(--ink2); flex: none; }
.t-from b { display: block; font: 600 15px/1.2 var(--sans); }
.t-from small { display: block; font: 400 12.5px/1.2 var(--sans); color: var(--ink3); margin-top: 2px; }
.t-subj { font: 600 17px/1.3 var(--sans); letter-spacing: -.01em; margin: 0 0 6px; }
.t-sum { font: 400 14px/1.45 var(--sans); color: var(--ink2); margin: 0; }
.t-body-txt { font: 400 13.5px/1.5 var(--sans); color: var(--ink2); margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--paper2); display: none; }
.t-body-txt.on { display: block; }
.t-more { font: 500 12.5px/1 var(--sans); color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.t-draft-l { font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin: 14px 0 8px; display: flex; justify-content: space-between; }
.t-draft-l span { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink3); }
.t-draft { width: 100%; min-height: 96px; resize: none; border: 0; outline: none; background: transparent; font: italic 400 16px/1.45 var(--serif); color: var(--ink); padding: 2px 0 2px 12px; border-left: 2px solid var(--gold); }
.t-link { margin-top: 12px; font: 500 12.5px/1.4 var(--sans); color: var(--ink2); display: flex; gap: 8px; align-items: center; }
.t-link i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.t-acts { flex: none; padding: 10px 16px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.t-acts .b { height: 52px; }
.t-acts .wide { grid-column: 1 / -1; }
.t-acts .b.later { background: #f4e8c8; color: #5e4510; }
.t-hint { text-align: center; font: 500 11.5px/1 var(--sans); color: var(--ink3); padding: 0 0 12px; }
.t-zero { margin: auto 0; text-align: center; padding: 0 10px; animation: rise .5s var(--ease) both; }
.t-zero .ok { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: var(--ink); color: #f3d98f; box-shadow: 0 0 0 10px rgba(28, 26, 23, .05); }
.t-zero h2 { font: 400 40px/1 var(--serif); letter-spacing: -.02em; margin: 0 0 12px; }
.t-zero p { font: 400 15px/1.5 var(--sans); color: var(--ink2); margin: 0 auto 22px; max-width: 290px; }
.t-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 22px; }
.t-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 4px; }
.t-stats b { display: block; font: 400 26px/1 var(--serif); }
.t-stats span { font: 500 11px/1.2 var(--sans); color: var(--ink3); }
.t-done-list { text-align: left; }

/* ---------------- recorder ---------------- */
.recorder { background: #151311; color: #efe8da; }
.recorder .t-top { color: #efe8da; }
.recorder .ibtn { color: #cfc6b5; }
.recorder .ibtn:hover { background: rgba(255, 255, 255, .08); }
.r-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 22px 14px; display: flex; flex-direction: column; scrollbar-width: none; }
.r-body::-webkit-scrollbar { display: none; }
.r-eye { font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #a49b89; margin: 10px 0 10px; }
.r-h { font: 400 26px/1.15 var(--serif); margin: 0 0 6px; letter-spacing: -.01em; }
.r-sub { font: 400 14px/1.45 var(--sans); color: #b5ab98; margin: 0 0 18px; }
.r-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.r-chip { height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .16); color: #efe8da; font: 500 14px/1 var(--sans); }
.r-chip.on { background: #efe8da; color: #151311; border-color: #efe8da; }
.r-who { margin-top: 14px; font: 400 13px/1.4 var(--sans); color: #a49b89; }
.r-timer { font: 300 54px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-align: center; margin: 26px 0 8px; }
.r-state { text-align: center; font: 500 12.5px/1 var(--sans); color: #a49b89; display: flex; gap: 8px; justify-content: center; align-items: center; }
.r-state i { width: 8px; height: 8px; border-radius: 50%; background: #e0574b; animation: live 1.6s infinite; }
.r-wave { height: 64px; display: flex; align-items: center; justify-content: center; gap: 3px; margin: 18px 0 14px; }
.r-wave i { width: 3px; border-radius: 2px; background: #efe8da; opacity: .85; height: 6px; transition: height .12s linear; }
.r-wave.idle i { opacity: .25; }
.r-lines { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.r-line { font: 400 15px/1.45 var(--serif); color: #e9e1d1; animation: rise .4s var(--ease) both; }
.r-line b { font: 600 11.5px/1 var(--sans); letter-spacing: .04em; color: #a49b89; display: block; margin-bottom: 3px; }
.r-line.m { color: #b5ab98; }
.r-acts { flex: none; padding: 12px 22px 32px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.r-big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #e0574b; color: #fff; box-shadow: 0 0 0 6px rgba(224, 87, 75, .18); transition: transform .15s; }
.r-big:active { transform: scale(.95); }
.r-big.stop i { width: 24px; height: 24px; border-radius: 5px; background: #fff; display: block; }
.r-big.rec i { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: block; }
.r-btn { height: 52px; padding: 0 20px; border-radius: 14px; font: 600 15px/1 var(--sans); background: #efe8da; color: #151311; flex: 1; }
.r-btn.ghost { background: transparent; color: #efe8da; border: 1px solid rgba(255, 255, 255, .18); flex: none; }
.r-steps { list-style: none; padding: 0; margin: 18px 0 0; }
.r-steps li { display: flex; gap: 12px; align-items: center; padding: 9px 0; font-size: 14.5px; color: #8c836f; }
.r-steps li.done { color: #cfc6b5; }
.r-steps li.now { color: #efe8da; }
.r-steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #4a443b; flex: none; display: grid; place-items: center; font-size: 10px; color: #151311; }
.r-steps li.done .dot { background: #9fd1b5; border-color: #9fd1b5; }
.r-steps li.now .dot { border-color: #efe8da; border-top-color: transparent; animation: spin 1s linear infinite; }
.r-facts { list-style: none; padding: 0; margin: 8px 0 0; }
.r-facts li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.r-facts li button { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid #6d6556; flex: none; display: grid; place-items: center; color: #151311; margin-top: 1px; }
.r-facts li.on button { background: #f3d98f; border-color: #f3d98f; }
.r-facts li span { font: 400 15px/1.4 var(--serif); color: #efe8da; }
.r-facts li small { display: block; font: 500 12px/1.35 var(--sans); color: #d9a35a; margin-top: 4px; }
.r-sec { font: 600 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #a49b89; margin: 22px 0 4px; }

/* ---------------- sheets: deal / doc / note ---------------- */
.rail { display: flex; gap: 0; margin: 4px -4px 16px; overflow-x: auto; scrollbar-width: none; padding: 0 4px 4px; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { display: none; }
.rail-g { flex: none; min-width: 74px; padding: 0 6px 0 0; scroll-snap-align: start; text-align: left; }
.rail-g .ln { display: flex; align-items: center; gap: 0; margin-bottom: 7px; }
.rail-g .ln i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); flex: none; }
.rail-g .ln::after { content: ''; flex: 1; height: 1.5px; background: var(--line); }
.rail-g:last-child .ln::after { display: none; }
.rail-g.cleared .ln i { background: var(--ink); border-color: var(--ink); }
.rail-g.cleared .ln::after { background: var(--ink); }
.rail-g.waiting .ln i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 165, 55, .2); }
.rail-g.preparing .ln i { border-color: var(--ink); border-style: dashed; }
.rail-g.skipped .ln i { background: var(--paper2); border-color: var(--ink3); }
.rail-g b { display: block; font: 600 11.5px/1.2 var(--sans); color: var(--ink); }
.rail-g small { display: block; font: 400 11px/1.3 var(--sans); color: var(--ink3); margin-top: 2px; }
.rail-g.future b { color: var(--ink3); font-weight: 500; }
.dl { list-style: none; margin: 0; padding: 0; }
.dl li { border-bottom: 1px solid var(--line2); }
.dl li:last-child { border-bottom: 0; }
.dl button { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; padding: 12px 0; min-height: 52px; }
.dl .ic { width: 32px; height: 38px; border-radius: 4px; border: 1px solid var(--line); background: #fffefb; flex: none; display: grid; place-items: center; font: 600 9px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.dl .ic.you { border-color: var(--gold); color: var(--gold-ink); }
.dl b { display: block; font: 550 14.5px/1.25 var(--sans); }
.dl small { display: block; font: 400 12.5px/1.3 var(--sans); color: var(--ink3); margin-top: 2px; }
.hist { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1.5px solid var(--line); }
.hist li { position: relative; padding: 0 0 13px 4px; font: 400 13.5px/1.4 var(--sans); color: var(--ink2); }
.hist li::before { content: ''; position: absolute; left: -19.5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink3); }
.hist li.gate::before { background: var(--ink); border-color: var(--ink); }
.hist li.call::before, .hist li.note::before { background: var(--gold); border-color: var(--gold); }
.hist li small { display: block; font-size: 11.5px; color: var(--ink3); margin-bottom: 1px; }
.memo-page h4 .vtag { margin-left: 8px; letter-spacing: .04em; color: var(--gold-ink); background: #f4e8c8; padding: 3px 6px; border-radius: 5px; text-transform: none; }
.memo-page p + p { margin-top: 10px; }
.memo-page .scaffold { font: 400 13px/1.45 var(--sans); color: var(--ink2); background: var(--paper2); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.redl { font: 400 15px/1.5 var(--serif); }
.redl del { color: var(--red); text-decoration-color: rgba(176, 68, 58, .6); }
.redl ins { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(46, 122, 87, .5); }
.verdict { display: inline-block; font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; background: var(--paper2); color: var(--ink2); margin-left: 6px; vertical-align: 2px; }
.verdict.escalate { background: #f8ece8; color: var(--red); }
.verdict.counter { background: #f4e8c8; color: var(--gold-ink); }
.verdict.accept { background: #e3f0e8; color: var(--green); }
.ta { width: 100%; min-height: 120px; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font: 400 16px/1.45 var(--sans); background: #fffefb; outline: none; }
.ta:focus { border-color: var(--ink3); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.pick button { height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font: 500 13px/1 var(--sans); }
.pick button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act-tile { text-align: left; padding: 14px; border-radius: 16px; background: var(--paper2); min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.act-tile svg { color: var(--ink); }
.act-tile b { font: 600 14.5px/1.2 var(--sans); }
.act-tile small { display: block; font: 400 12px/1.3 var(--sans); color: var(--ink3); margin-top: 3px; }
.act-tile:active { background: #e8e0d2; }
.kpi4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 4px; }
.kpi4 div { background: var(--paper2); border-radius: 12px; padding: 10px; }
.kpi4 b { display: block; font: 400 21px/1 var(--serif); }
.kpi4 span { font: 500 11px/1.2 var(--sans); color: var(--ink3); }
.sess-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line2); text-align: left; min-height: 56px; }
.sess-row .tm { font: 400 22px/1 var(--serif); width: 62px; font-variant-numeric: tabular-nums; }
.sess-row .r-main { flex: 1; }
.sess-row b { display: block; font-weight: 600; font-size: 15px; }
.sess-row small { display: block; color: var(--ink3); font-size: 12.5px; margin-top: 2px; }
.sess-row em { font-style: normal; font: 600 12px/1 var(--sans); padding: 7px 10px; border-radius: 999px; background: var(--paper2); color: var(--ink2); }
.sess-row em.next { background: var(--ink); color: #fff; }
.sess-row em.done { background: #e3f0e8; color: var(--green); }

@media (max-width: 760px) {
  .foot { padding-left: 10px; justify-content: center; }
  .t-top { padding-top: calc(var(--sat) + 8px); }
  .t-acts, .r-acts { padding-bottom: max(18px, calc(var(--sab) + 10px)); }
  .toast-host { bottom: calc(var(--sab) + 130px); }
}

.triage:not([hidden]) ~ .toast-host { bottom: 206px; }
.recorder:not([hidden]) ~ .toast-host { bottom: 130px; }
.b.decide { width: 100%; margin-top: 14px; height: auto; min-height: 56px; padding: 12px 16px; white-space: normal; line-height: 1.3; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.b.decide small { font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #f3d98f; }
.sess-row em.live { background: #f4e8c8; color: var(--gold-ink); }
