/* ==========================================================================
   Admin — trainer workspace screens (review, trim, camera, share, CMS, ⌘K)
   ========================================================================== */

/* Active session hero */
.session-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; isolation: isolate; border: 1px solid rgba(232,163,61,.3); }
.session-hero__bg { position: absolute; inset: 0; z-index: -1; }
.session-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.session-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,13,11,.95) 20%, rgba(14,13,11,.55) 70%, rgba(14,13,11,.35)), linear-gradient(140deg, rgba(232,163,61,.18), transparent 50%); }
.session-hero h2 { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: .95; margin: 10px 0 12px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 var(--ember); animation: pulse 1.6s infinite; color: var(--ember); }
.rec-btn { position: relative; width: clamp(108px, 12vw, 140px); aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--amber); color: var(--on-accent); font-weight: 800; font-size: .875rem; box-shadow: 0 0 0 8px rgba(232,163,61,.15), 0 20px 50px -10px rgba(232,163,61,.6); transition: transform .4s var(--ease-spring); }
.rec-btn:hover { transform: scale(1.05); }
.rec-btn:active { transform: scale(.95); }
.rec-btn::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(232,163,61,.4); animation: fabPulse 2.6s var(--ease-out) infinite; }
.rec-btn__dot { width: 26px; height: 26px; border-radius: 50%; background: var(--ember); border: 4px solid var(--on-accent); }
@media (max-width: 640px) { .session-hero { grid-template-columns: 1fr; } .rec-btn { justify-self: start; width: 100%; aspect-ratio: auto; height: 64px; border-radius: 20px; grid-auto-flow: column; } .rec-btn::after { display: none; } }

/* Upload rows */
.up-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.up-row:first-child { border-top: 0; }
.up-row__thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--char-2); position: relative; }
.up-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-row__thumb svg { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; color: var(--bone); }
.up-row__main { min-width: 0; display: grid; gap: 6px; }
.up-row__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.up-row__name { font-weight: 650; font-size: .9rem; }
.up-row__meta { font-family: var(--mono); font-size: .6875rem; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.up-row__err { font-size: .8125rem; color: var(--ember-hi); display: flex; gap: 8px; align-items: flex-start; }
.up-row__err svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.up-row__actions { display: flex; gap: 6px; }
@media (max-width: 560px) { .up-row { grid-template-columns: 44px 1fr; padding: 14px; } .up-row__thumb { width: 44px; height: 44px; } .up-row__actions { grid-column: 1 / -1; justify-content: flex-end; } }

/* Record flow */
.ctx-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 18px; border: 1px solid rgba(232,163,61,.3); background: var(--amber-12); flex-wrap: wrap; }
.ctx-bar__txt { flex: 1; min-width: 160px; }
.ctx-bar__txt b { display: block; font-size: .9375rem; }
.ctx-bar__txt small { color: var(--text-2); font-size: .8125rem; }
.steps-nav { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.steps-nav span { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 650; color: var(--text-3); padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--line); }
.steps-nav span i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--mono); font-size: .6875rem; background: var(--bone-8); }
.steps-nav span.is-on { color: var(--text); border-color: var(--amber); }
.steps-nav span.is-on i { background: var(--amber); color: var(--on-accent); }
.steps-nav span.is-done i { background: var(--moss-hi); color: var(--ink); }
.pick { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; min-height: 72px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: all var(--t) var(--ease-out); }
.pick:hover { border-color: var(--bone-20); transform: translateY(-1px); }
.pick.is-selected { border-color: var(--amber); background: var(--amber-12); }
.pick__main { flex: 1; min-width: 0; }
.pick__main b { display: block; font-size: 1rem; }
.pick__main small { color: var(--text-3); font-size: .8125rem; }
.pick-dog { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line); text-align: left; transition: transform .5s var(--ease-out), border-color var(--t); display: block; width: 100%; }
.pick-dog img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-dog::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(14,13,11,.92)); }
.pick-dog__info { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 14px; }
.pick-dog__info b { font-family: var(--serif); font-size: 2.4rem; line-height: .9; font-weight: 400; display: block; }
.pick-dog__info small { font-family: var(--mono); font-size: .6875rem; color: var(--bone-80); }
.pick-dog:hover { transform: translateY(-3px); border-color: var(--bone-20); }
.pick-dog.is-selected { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber); }

/* Camera */
.camera { position: fixed; inset: 0; z-index: 9000; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; animation: fadeIn .3s ease both; }
.camera__vf { position: absolute; inset: 0; }
.camera__vf video { width: 100%; height: 100%; object-fit: cover; }
.camera__vf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5), transparent 18%, transparent 75%, rgba(0,0,0,.7)); }
.camera__grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 33.33% 33.33%; background-position: -1px -1px; opacity: .5; }
.camera__top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(14px + var(--safe-t)) 16px 10px; }
.camera__btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; }
.camera__btn svg { width: 22px; height: 22px; }
.camera__ctx { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: .8125rem; font-weight: 600; max-width: 60vw; }
.camera__ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camera__timer { position: absolute; z-index: 3; top: calc(76px + var(--safe-t)); left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 1rem; padding: 4px 12px; border-radius: 8px; background: transparent; transition: background .3s; display: flex; align-items: center; gap: 8px; }
.camera.is-rec .camera__timer { background: var(--ember); }
.camera__timer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; }
.camera.is-rec .camera__timer::before { opacity: 1; animation: blink 1s steps(2) infinite; }
.camera__bottom { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 28px calc(28px + var(--safe-b)); }
.camera__mode { grid-column: 1 / -1; text-align: center; font-family: var(--mono); font-size: .75rem; letter-spacing: .2em; color: var(--amber); margin-bottom: 18px; }
.shutter { width: 84px; height: 84px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; justify-self: center; }
.shutter span { width: 66px; height: 66px; border-radius: 50%; background: var(--ember); transition: all .35s var(--ease-out); }
.camera.is-rec .shutter span { width: 32px; height: 32px; border-radius: 8px; }
.camera__lib { justify-self: start; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; border: 2px solid #fff; }
.camera__lib img { width: 100%; height: 100%; object-fit: cover; }
.camera__flip { justify-self: end; }
.camera__hint { position: absolute; z-index: 2; left: 50%; bottom: calc(170px + var(--safe-b)); transform: translateX(-50%); font-size: .75rem; color: rgba(255,255,255,.75); background: rgba(0,0,0,.4); padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.camera__review { position: absolute; inset: auto 0 0 0; z-index: 4; display: flex; justify-content: space-between; padding: 20px 24px calc(24px + var(--safe-b)); background: rgba(0,0,0,.85); }
.camera__review button { font-size: 1.05rem; font-weight: 600; min-height: 48px; padding: 0 12px; color: #fff; }
.camera__review button.use { color: var(--amber); font-weight: 800; }
@media (min-width: 900px) {
  .camera { background: radial-gradient(60% 60% at 50% 50%, #1a1712, #000); }
  .camera__frame { position: absolute; inset: 24px; margin: auto; aspect-ratio: 9 / 19; height: calc(100% - 48px); border-radius: 48px; overflow: hidden; box-shadow: 0 0 0 10px #1d1a15, 0 0 0 11px #3a352c, 0 50px 100px rgba(0,0,0,.8); }
}
.camera__frame { position: absolute; inset: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }

/* Review detail */
.review-actions { position: sticky; bottom: 0; z-index: 30; margin: 24px calc(clamp(16px, 3vw, 40px) * -1) -64px; padding: 14px clamp(16px, 3vw, 40px) calc(14px + var(--safe-b)); background: rgba(14,13,11,.85); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.review-actions__info { margin-right: auto; font-size: .8125rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
@media (max-width: 899px) { .review-actions { bottom: calc(var(--tabbar-h) + var(--safe-b)); margin-bottom: calc(-1 * (var(--tabbar-h) + 48px + var(--safe-b))); padding-bottom: 14px; } .review-actions .btn { flex: 1; } .review-actions__info { width: 100%; } }

.ai-panel { border-color: rgba(232,163,61,.28); background: linear-gradient(180deg, rgba(232,163,61,.07), transparent 140px), var(--surface); }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.ai-orb { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: conic-gradient(from 180deg, var(--amber), var(--ember), var(--amber-hi), var(--amber)); color: var(--ink); flex: none; animation: orb 6s linear infinite; }
.ai-orb svg { width: 18px; height: 18px; }
@keyframes orb { to { filter: hue-rotate(25deg); } }
.ai-field { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; transition: background var(--t), opacity var(--t); }
.ai-field:last-child { border-bottom: 0; }
.ai-field__label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ai-field__value { font-size: .9375rem; line-height: 1.5; }
.ai-field__value.serif { font-size: 1.5rem; line-height: 1.1; }
.ai-field__acts { display: flex; gap: 6px; }
.ai-field.is-accepted { background: var(--moss-20); }
.ai-field.is-rejected { opacity: .45; }
.ai-field.is-rejected .ai-field__value { text-decoration: line-through; }
.ai-mini { min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); }
.ai-mini svg { width: 14px; height: 14px; }
.ai-mini--ok:hover, .ai-mini--ok.is-on { background: var(--moss-20); border-color: var(--moss-hi); color: var(--moss-hi); }
.ai-mini--no:hover, .ai-mini--no.is-on { background: var(--ember-15); border-color: var(--ember); color: var(--ember-hi); }
.ai-tag { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bone-4); }
.ai-tag .conf__bar { grid-column: 1 / -1; }
.ai-evidence li { display: flex; gap: 10px; font-size: .8125rem; color: var(--text-2); padding: 6px 0; }
.ai-evidence svg { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--amber); }
.ai-skel { display: grid; gap: 10px; padding: 16px 20px; }

.trim { display: grid; gap: 12px; }
.trim__strip { position: relative; height: 72px; border-radius: 12px; overflow: hidden; display: flex; background: var(--char-2); user-select: none; touch-action: none; }
.trim__strip img, .trim__strip canvas { flex: 1; min-width: 0; height: 100%; object-fit: cover; display: block; }
.trim__shade { position: absolute; top: 0; bottom: 0; background: rgba(14,13,11,.75); pointer-events: none; }
.trim__sel { position: absolute; top: 0; bottom: 0; border-top: 3px solid var(--amber); border-bottom: 3px solid var(--amber); pointer-events: none; }
.trim__handle { position: absolute; top: 0; bottom: 0; width: 22px; margin-left: -11px; background: var(--amber); border-radius: 8px; cursor: ew-resize; display: grid; place-items: center; touch-action: none; z-index: 2; }
.trim__handle::after { content: ""; width: 3px; height: 22px; border-radius: 2px; background: var(--on-accent); opacity: .7; }
.trim__handle:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.trim__playhead { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bone); pointer-events: none; z-index: 1; box-shadow: 0 0 8px rgba(0,0,0,.6); }
.trim__times { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .75rem; color: var(--text-2); }
.trim__times b { color: var(--amber); font-weight: 500; }

.covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cover-opt { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.cover-opt img { width: 100%; height: 100%; object-fit: cover; }
.cover-opt input { position: absolute; opacity: 0; }
.cover-opt:has(input:checked) { border-color: var(--amber); }
.cover-opt:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); color: var(--ink); font-size: .7rem; display: grid; place-items: center; font-weight: 800; }
.cover-opt:has(input:focus-visible) { outline: 2px solid var(--bone); }

.ts-edit { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: center; }
.ts-edit + .ts-edit { margin-top: 8px; }

.tag-toggle { cursor: pointer; transition: all var(--t); opacity: .55; }
.tag-toggle[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 1px var(--tc) inset; }
.tag-toggle:hover { opacity: 1; }

/* Share composer */
.step-card__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .75rem; background: var(--amber); color: var(--on-accent); font-weight: 600; flex: none; }
.sel-media { display: flex; gap: 10px; flex-wrap: wrap; }
.sel-media__item { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bone-4); max-width: 100%; }
.sel-media__item img { width: 56px; height: 36px; border-radius: 8px; object-fit: cover; }
.sel-media__item b { font-size: .8125rem; display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-media__item small { font-size: .6875rem; color: var(--text-3); }
.aud-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.aud-row:first-child { border-top: 0; }
.aud-row .check { flex: 1; min-height: 40px; padding: 4px 0; align-items: center; }
.aud-row .check__text b { display: block; font-size: .9rem; }
.aud-row .check__text small { font-size: .75rem; color: var(--text-3); }
.grant-warn { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ember-15); border: 1px solid rgba(200,85,61,.3); font-size: .8125rem; flex-wrap: wrap; }
.grant-warn svg { width: 16px; height: 16px; color: var(--ember-hi); flex: none; }
.grant-ok { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--moss-20); font-size: .8125rem; }
.grant-ok svg { width: 16px; height: 16px; color: var(--moss-hi); }

.stepper { display: flex; align-items: center; gap: 0; }
.stepper__s { display: grid; justify-items: center; gap: 6px; flex: 1; position: relative; font-family: var(--mono); font-size: .5625rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); text-align: center; }
.stepper__s::before { content: ""; position: absolute; top: 9px; right: 50%; width: 100%; height: 2px; background: var(--bone-12); z-index: 0; }
.stepper__s:first-child::before { display: none; }
.stepper__dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bone-20); background: var(--ink); position: relative; z-index: 1; display: grid; place-items: center; transition: all .4s var(--ease-out); }
.stepper__s.is-done { color: var(--text-2); }
.stepper__s.is-done::before, .stepper__s.is-on::before { background: var(--amber); }
.stepper__s.is-done .stepper__dot { background: var(--amber); border-color: var(--amber); }
.stepper__s.is-done .stepper__dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--on-accent); }
.stepper__s.is-on { color: var(--amber); }
.stepper__s.is-on .stepper__dot { border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-20); }

.wa-phone { border-radius: 36px; padding: 8px; background: #1b1914; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.wa-screen { border-radius: 28px; overflow: hidden; background: #0b141a; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #1f2c34; color: #e9edef; }
.wa-head b { font-size: .875rem; display: block; line-height: 1.2; }
.wa-head small { font-size: .6875rem; color: #8696a0; }
.wa-head svg { width: 18px; height: 18px; color: #aebac1; }
.wa-body { min-height: 360px; padding: 16px 12px 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; background-color: #0b141a; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 16px 16px; }
.wa-day { align-self: center; font-size: .6875rem; color: #8696a0; background: #182229; padding: 4px 10px; border-radius: 8px; margin-bottom: 8px; }
.wa-bubble { position: relative; max-width: 84%; background: #005c4b; color: #e9edef; border-radius: 10px 0 10px 10px; padding: 6px 8px 18px 9px; font-size: .84rem; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.3); white-space: pre-wrap; word-wrap: break-word; }
.wa-bubble::before { content: ""; position: absolute; top: 0; right: -7px; border-left: 8px solid #005c4b; border-bottom: 10px solid transparent; }
.wa-bubble + .wa-bubble::before { display: none; }
.wa-bubble + .wa-bubble { border-radius: 10px; }
.wa-bubble__time { position: absolute; right: 8px; bottom: 4px; font-size: .625rem; color: rgba(233,237,239,.6); display: flex; align-items: center; gap: 3px; }
.wa-bubble__time svg { width: 11px; height: 11px; }
.wa-link { display: block; border-radius: 8px; overflow: hidden; background: #025144; margin: 0 0 6px; }
.wa-link img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
.wa-link__txt { padding: 6px 8px; }
.wa-link__txt b { font-size: .8rem; display: block; }
.wa-link__txt small { font-size: .7rem; color: rgba(233,237,239,.65); display: block; }
.wa-url { color: #53bdeb; text-decoration: underline; }
.wa-video { position: relative; width: 220px; border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.wa-video img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.wa-video__play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; }
.wa-video__play svg { width: 18px; height: 18px; fill: #fff; color: #fff; }
.wa-video__meta { position: absolute; left: 6px; bottom: 4px; font-size: .625rem; display: flex; gap: 6px; align-items: center; }
.wa-video__meta svg { width: 12px; height: 12px; }
.wa-preparing { position: absolute; inset: 0; background: rgba(0,0,0,.65); display: grid; place-content: center; justify-items: center; gap: 8px; font-size: .6875rem; }
.wa-preparing .ring { --size: 44px; }
.wa-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #0b141a; }
.wa-input span { flex: 1; height: 38px; border-radius: 99px; background: #1f2c34; display: flex; align-items: center; padding: 0 14px; color: #8696a0; font-size: .8rem; }
.wa-input i { width: 38px; height: 38px; border-radius: 50%; background: #00a884; display: grid; place-items: center; }
.wa-input svg { width: 16px; height: 16px; color: #111b21; }

/* Inbox */
.wa-item { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.wa-item__media { width: 88px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--char-2); display: grid; place-items: center; position: relative; color: var(--text-2); }
.wa-item__media img { width: 100%; height: 100%; object-fit: cover; }
.wa-item__media > svg { width: 28px; height: 28px; }
.wa-item__kind { position: absolute; left: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 8px; background: rgba(0,0,0,.6); display: grid; place-items: center; }
.wa-item__kind svg { width: 13px; height: 13px; color: #fff; }
.wa-item__body { display: grid; gap: 8px; min-width: 0; }
.wa-item__top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.wa-item__caption { font-weight: 650; }
.wa-item__meta { font-family: var(--mono); font-size: .6875rem; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.wa-item__acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.wa-item.is-quarantined { border-style: dashed; border-color: rgba(200,85,61,.4); }
.waveform { display: flex; align-items: center; gap: 2px; height: 28px; }
.waveform span { width: 3px; border-radius: 2px; background: var(--amber); opacity: .8; }
@media (max-width: 560px) { .wa-item { grid-template-columns: 56px 1fr; padding: 12px; gap: 12px; } .wa-item__media { width: 56px; height: 56px; } }

/* CMS */
.cms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .cms { grid-template-columns: 1fr; } }
.block { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color var(--t), transform .3s var(--ease-out); }
.block + .block { margin-top: 8px; }
.block:hover { border-color: var(--bone-20); }
.block__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bone-4); border: 1px solid var(--line); color: var(--amber); flex: none; }
.block__icon svg { width: 16px; height: 16px; }
.block__main { flex: 1; min-width: 0; }
.block__type { font-family: var(--mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.block__title { font-weight: 650; font-size: .875rem; margin-top: 2px; }
.block__preview { font-size: .8125rem; color: var(--text-2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.block__acts { display: flex; gap: 2px; flex: none; }
.block__acts button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.block__acts button:hover { background: var(--bone-8); color: var(--text); }
.block__acts svg { width: 15px; height: 15px; }
.block.is-flagged { border-color: rgba(200,85,61,.5); background: linear-gradient(90deg, var(--ember-15), transparent 60%), var(--surface); }
.cms-preview { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--ink); overflow: hidden; max-height: calc(100vh - 160px); overflow-y: auto; }
.cms-preview__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--char); position: sticky; top: 0; z-index: 2; }
.cms-preview__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--bone-12); display: block; }
.cms-preview__bar span { margin-left: 8px; font-family: var(--mono); font-size: .6875rem; color: var(--text-3); }
.cms-preview__body { padding: 28px; display: grid; gap: 18px; }
.cms-preview__body h1 { font-size: 3.4rem; line-height: .9; }
.cms-preview__body h2 { font-size: 1.9rem; line-height: 1; margin-top: 8px; }
.cms-preview__body p { color: var(--bone-80); font-size: .9375rem; }
.cms-preview__body ol li { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.cms-preview__body ol li b { font-family: var(--serif); color: var(--amber); font-size: 1.4rem; line-height: 1; font-weight: 400; }
.add-block { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.add-block button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); font-size: .8125rem; font-weight: 600; min-height: 44px; }
.add-block button:hover { border-color: var(--amber); color: var(--amber); }
.add-block svg { width: 16px; height: 16px; }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; font-size: .875rem; }
.checklist li:first-child { border-top: 0; }
.checklist svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.checklist .ok svg { color: var(--moss-hi); }
.checklist .bad svg { color: var(--ember-hi); }
.checklist small { display: block; color: var(--text-3); font-size: .75rem; margin-top: 2px; }

/* Integration cards */
.integ { display: grid; gap: 12px; }
.integ__head { display: flex; align-items: center; gap: 12px; }
.integ__logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bone-4); border: 1px solid var(--line); color: var(--amber); }
.integ__logo svg { width: 20px; height: 20px; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 650; color: var(--moss-hi); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.status-dot--warn { color: var(--amber); }
.range { width: 100%; accent-color: var(--amber); height: 32px; }

/* Command palette */
.palette-root { position: fixed; inset: 0; z-index: 9300; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.palette { position: relative; width: min(640px, 100%); border-radius: 22px; background: rgba(23,21,15,.96); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); overflow: hidden; animation: modalIn .35s var(--ease-out) both; }
.palette__input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette__input svg { width: 20px; height: 20px; color: var(--amber); }
.palette__input input { flex: 1; height: 60px; background: none; border: 0; font-size: 1.05rem; outline: none; }
.palette__list { max-height: min(60vh, 460px); overflow-y: auto; padding: 8px; }
.palette__group { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 6px; }
.palette__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; min-height: 48px; font-size: .9rem; }
.palette__item.is-active { background: var(--bone-8); }
.palette__item.is-active .palette__go { opacity: 1; }
.palette__ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bone-4); border: 1px solid var(--line); flex: none; overflow: hidden; }
.palette__ic img { width: 100%; height: 100%; object-fit: cover; }
.palette__ic svg { width: 16px; height: 16px; color: var(--amber); }
.palette__item small { color: var(--text-3); font-size: .75rem; display: block; }
.palette__go { margin-left: auto; opacity: 0; font-family: var(--mono); font-size: .6875rem; color: var(--text-3); }
.palette__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .6875rem; color: var(--text-3); }
@media (max-width: 640px) { .palette-root { padding-top: calc(12px + var(--safe-t)); } }

/* Chart */
.chart__bar { transform-origin: bottom; animation: barUp .9s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); transform-box: fill-box; }
@keyframes barUp { from { transform: scaleY(0); } }
.gauge { display: grid; gap: 8px; }
.gauge__nums { display: flex; justify-content: space-between; align-items: baseline; }
.gauge__nums b { font-family: var(--serif); font-size: 2.4rem; font-weight: 400; line-height: 1; }
.gauge__nums span { font-family: var(--mono); font-size: .75rem; color: var(--text-3); }

/* Hide floating record button where it would cover primary actions */
body[data-route="/review/:id"] .fab, body[data-route="/camera"] .fab, body[data-route="/share"] .fab { display: none; }
body[data-route="/camera"] .tabbar { display: none; }
