/* CHIKARA Haulage - product layer on top of Shell Kit v2.0 tokens. Colour comes from the kit variables only (Standards 1.2c). */
html, body { margin: 0; height: 100%; background: #F7F1E5; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
.stage { position: fixed; inset: 0; height: 100dvh; }
#app { height: 100%; }
.shell { --danger: #A33A2B; --ok: #1A6B5A; --warn-ink: #7A5A1E;
  --d1: 120ms; --d2: 200ms; --d3: 320ms; --d4: 480ms; --d5: 700ms; --stagger: 52ms;
  --e-std: cubic-bezier(.2, .7, .3, 1); --e-emph: cubic-bezier(.2, .9, .08, 1); --e-paper: cubic-bezier(.22, 1.14, .36, 1); --e-out: cubic-bezier(.05, .72, .12, 1); }
.shell[data-mode="dark"] { --danger: #F0907F; --ok: #5FC4B3; --warn-ink: #E0BC4A; }
.shell[data-mode="dark"][data-skin="gold"] { --on-primary: #1A140C; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- splash (shortened from the 4 s canonical sequence; see deviation register) ---------- */
#splash { position: fixed; inset: 0; z-index: 9999; background: #102B19; color: #F5F0E4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; text-align: center; transition: opacity .35s ease; padding: 1rem; }
#splash.gone { opacity: 0; pointer-events: none; }
/* the full logo at its real resolution; edges feathered by a mask (never a shadow); breathes by scale, never a glow (standards 20.3) */
#splash .logo { width: min(90vw, 420px); height: auto; aspect-ratio: 1448 / 1086; display: block; animation: breathe 2.4s ease-in-out infinite;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent); mask-composite: intersect; }
@media (min-width: 480px) { #splash .logo { width: 520px; } }
#splash .t { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2rem; letter-spacing: .14em; }
#splash .c { font-size: .66rem; color: rgba(245,240,228,.62); max-width: 34ch; line-height: 1.5; }
#splash .bar { width: 150px; height: 2px; background: rgba(245,240,228,.18); overflow: hidden; border-radius: 2px; flex: none; } #splash .bar i { display: block; height: 100%; width: 40%; background: #C9973A; animation: load 1s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.025); } } @keyframes load { from { transform: translateX(-100%); } to { transform: translateX(350%); } }

/* ---------- page furniture ---------- */
.page-head { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; margin-bottom: .4rem; }
.page-head h1 { margin: .1rem 0; } .page-head .spacer { flex: 1; }
.sub { color: var(--muted); font-size: .86rem; margin: .1rem 0 .8rem; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn { cursor: pointer; transition: transform var(--d1) var(--e-std), border-color var(--d2) var(--e-std), background var(--d2); min-height: 44px; }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn--sm { min-height: 44px; padding: .3rem .8rem; font-size: .78rem; }
.chips { display: flex; gap: .45rem; flex-wrap: wrap; margin: .5rem 0 .9rem; }
.chipbtn { min-height: 44px; padding: 0 .9rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--muted); }
.chipbtn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.badge { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge--complete { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.badge--progress { color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 50%, transparent); }
.badge--void { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.badge--sample { color: var(--accent-ink); border-style: dashed; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.empty b { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--primary-ink); margin-bottom: .3rem; }
.notice { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .84rem; margin: .6rem 0; }
.notice--warn { border-color: color-mix(in srgb, var(--warn-ink) 55%, transparent); } .notice--error { border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); }
.notice .i { margin-top: .12rem; flex: none; }
.notice > span { flex: 1; min-width: 0; line-height: 1.45; }
/* the action sits on its own line under the sentence, so it never breaks the text at any width */
.notice > span > .btn { display: flex; width: fit-content; margin-top: .55rem; }
.chipbtn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; line-height: 1; white-space: nowrap; }
.page-head .chipbtn { align-self: center; }
.skel { height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--bg-alt), var(--surface), var(--bg-alt)); background-size: 200% 100%; animation: skel 1.2s linear infinite; margin: .5rem 0; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- lists ---------- */
.rows { display: grid; gap: .55rem; } .rows > * { min-width: 0; }
.row { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.row-main { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: center; width: 100%; text-align: left; padding: .7rem .9rem; min-height: 56px; border-radius: 12px; }
.row-title { font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 1; }
.row-end { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-family: var(--font-mono); font-size: .82rem; color: var(--primary-ink); }
.row-end small { display: block; color: var(--muted); font-size: .64rem; }
.row-detail { padding: .2rem .9rem .8rem; border-top: 1px dashed var(--line); font-size: .84rem; overflow: hidden; }
.row-detail dl { display: grid; grid-template-columns: 7.5rem 1fr; gap: .25rem .6rem; margin: .6rem 0; } .row-detail dt { color: var(--muted); }
.row.is-selected { box-shadow: 0 0 0 2px var(--primary-ink); }
.row .minus { position: absolute; top: -8px; left: -8px; width: 44px; height: 44px; border-radius: 50%; background: var(--danger); color: #fff; display: none; place-items: center; z-index: 3; border: 2px solid var(--bg); }
.editing .row .minus { display: grid; } .editing .row:not(.is-selected) .row-main { animation: wiggle 1.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-.35deg); } 75% { transform: rotate(.35deg); } }
.row .selbox { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: none; place-items: center; }
.selecting .row .selbox { display: grid; } .selecting .row .row-end { margin-right: 44px; }
.selbar { position: sticky; bottom: 0; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: .8rem; z-index: 4; }
.grip { min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--muted); touch-action: none; cursor: grab; }
.pocket { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .9rem; border: 1.5px dashed var(--accent); border-radius: 99px; color: var(--accent-ink); font-size: .8rem; font-weight: 600; background: transparent; }
.pocket.hot { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent); }
.ghost-row { position: fixed; z-index: 130; pointer-events: none; opacity: .92; box-shadow: 0 14px 40px rgba(0,0,0,.3); background: var(--surface); border-radius: 12px; border: 1px solid var(--line); padding: .6rem .9rem; font-size: .84rem; max-width: 80vw; }
.ctxmenu { position: fixed; z-index: 140; min-width: 190px; padding: .3rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.ctxmenu button { display: flex; width: 100%; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .7rem; border-radius: 8px; font-size: .86rem; font-weight: 600; text-align: left; } .ctxmenu button:hover, .ctxmenu button:focus-visible { background: var(--bg-alt); }

/* ---------- forms and sheets ---------- */
.field { display: grid; gap: .3rem; margin: .65rem 0; } .field > label, .field > .lbl { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: .5rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary-ink); outline-offset: 1px; }
.field .hint { font-size: .74rem; color: var(--muted); } .field .err { font-size: .78rem; color: var(--danger); font-weight: 600; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; } @media (max-width: 420px) { .two.keep { grid-template-columns: 1fr 1fr; } }
.input-mic { display: grid; grid-template-columns: 1fr 44px; gap: .4rem; } .mic { min-height: 44px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--primary-ink); } .mic.listening { background: var(--primary); color: var(--on-primary); }
.crewpick { display: flex; flex-wrap: wrap; gap: .4rem; } .crewpick label { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 99px; font-size: .82rem; font-weight: 600; background: var(--surface); text-transform: none; letter-spacing: 0; color: var(--ink); }
.crewpick input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary-ink); } .crewpick label:has(input:checked) { border-color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; }
.switch button { position: relative; width: 56px; height: 32px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-alt); flex: none; }
.switch button::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform var(--d2) var(--e-std), background var(--d2); }
.switch button[aria-checked="true"] { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); border-color: var(--primary-ink); } .switch button[aria-checked="true"]::after { transform: translateX(24px); background: var(--primary-ink); }
#sheetLayer { position: absolute; inset: 0; z-index: 84; display: none; } #sheetLayer.open { display: block; }
#sheetLayer .sc { position: absolute; inset: 0; background: rgba(10,8,4,.5); }
#sheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(620px, 100%); max-height: 94%; overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 1rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.35); overscroll-behavior: contain; }
@media (min-width: 761px) { #sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 18px; max-height: 90%; } }
#sheet h2 { margin: .1rem 0 .2rem; font-size: 1.7rem; } #sheet .sheet-head { display: flex; align-items: center; gap: .6rem; } #sheet .sheet-head .spacer { flex: 1; }
.sheet-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; } .sheet-actions .btn { flex: 1 1 140px; justify-content: center; }
.trail { margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.trail div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .8rem; font-size: .88rem; border-bottom: 1px solid var(--line); } .trail div:last-child { border-bottom: 0; }
.trail .minus b { color: var(--muted); font-weight: 600; } .trail .net { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); font-weight: 800; font-size: 1rem; } .trail .net b { color: var(--primary-ink); }
.trail b { font-family: var(--font-mono); font-weight: 700; } .trail .m-changed b, .trail b.m-changed { animation: chg var(--d4) var(--e-std); }
.trail .tag { color: var(--muted); font-size: .72rem; }
@keyframes chg { 0% { background: color-mix(in srgb, var(--accent) 35%, transparent); } 100% { background: transparent; } }
.progress { height: 6px; border-radius: 6px; background: var(--bg-alt); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--primary-ink); }

/* ---------- tables and charts ---------- */
.tblwrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 460px; } .tbl th { text-align: left; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .6rem .7rem; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.tbl td { padding: .6rem .7rem; border-bottom: 1px dashed var(--line); } .tbl td.n, .tbl th.n { text-align: right; font-family: var(--font-mono); } .tbl tr:last-child td { border-bottom: 0; }
.neg { color: var(--danger); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: .4rem .2rem 0; } .bars i { flex: 1; min-width: 4px; background: var(--primary-ink); border-radius: 3px 3px 0 0; opacity: .85; } .bars i.neg { background: var(--danger); } .bars i.zero { background: var(--line); }
.kpi small { display: block; color: var(--muted); font-size: .7rem; margin-top: .2rem; }
.kpi b { font-size: clamp(1.5rem, 5vw, 2.1rem); overflow-wrap: anywhere; }

/* ---------- toast with action, update bar, install ---------- */
#undoToast { position: absolute; z-index: 96; left: 50%; bottom: 104px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; display: flex; gap: .8rem; align-items: center; padding: .55rem .6rem .55rem 1rem; border-radius: 99px; background: var(--island-bg); color: var(--island-ink); font-size: .84rem; font-weight: 600; max-width: calc(100% - 1.5rem); transition: opacity var(--d2), transform var(--d3) var(--e-std); }
#undoToast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
#undoToast button { min-height: 44px; padding: 0 1rem; border-radius: 99px; background: linear-gradient(135deg, #E0B860, #C9973A); color: #1A1208; font-weight: 700; }
#updateBar { position: absolute; z-index: 97; left: .75rem; right: .75rem; top: calc(var(--island-strip) + 4px); display: none; gap: .8rem; align-items: center; padding: .5rem .8rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--primary-ink); font-size: .84rem; } #updateBar.show { display: flex; } #updateBar span { flex: 1; }
.rec-item { padding: .7rem 0; border-bottom: 1px dashed var(--line); } .rec-item h4 { margin: 0 0 .2rem; font-size: .92rem; } .rec-item p { margin: 0 0 .4rem; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.rec-item.m-resumed { box-shadow: inset 3px 0 0 var(--primary-ink); }
textarea.pack { width: 100%; min-height: 160px; font-family: var(--font-mono); font-size: .76rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: .6rem; }

/* ---------- fracture layer ---------- */
.fx-group { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 120; }
.fx-shard { position: absolute; pointer-events: none; will-change: transform, opacity; }
.fx-shard > .row { margin: 0; } .fx-bevel, .fx-frostfill { position: absolute; inset: 0; pointer-events: none; border-radius: 12px; }
.fx-frostfill { background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,.3)); }
.fx-edge { position: absolute; left: 0; top: 0; pointer-events: none; } .fx-edge polygon { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 1.4; stroke-linejoin: round; opacity: .85; }
.fx-cracks { position: absolute; pointer-events: none; border-radius: 12px; overflow: hidden; } .fx-cracks path { fill: none; stroke-linecap: butt; stroke-linejoin: round; } .fx-cracks .c-dark path { stroke: rgba(26,18,8,.55); } .fx-cracks .c-light path { stroke: rgba(255,255,255,.95); }
.shell[data-mode="dark"] .fx-cracks .c-dark path { stroke: rgba(0,0,0,.7); } .shell[data-mode="dark"] .fx-edge polygon { stroke: rgba(255,236,190,.85); }

/* ---------- Origami motion (Living Motion Bible v2): classes only add transform/opacity ---------- */
.m-crease { position: fixed; z-index: 125; pointer-events: none; } .m-crease line { stroke: var(--accent); stroke-width: 2; }
.m-seed { position: fixed; z-index: 126; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); pointer-events: none; }
.m-thread { position: fixed; left: 0; top: 0; z-index: 124; pointer-events: none; } .m-thread path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.m-resumed { animation: resumed 1.4s var(--e-std); } @keyframes resumed { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.m-sheetin { animation: sheetin var(--d4) var(--e-std) backwards; animation-delay: calc(var(--i, 0) * var(--stagger)); }
@keyframes sheetin { from { opacity: 0; transform: translateY(10px); } }
.m-weight { animation: weight var(--d5) var(--e-emph); } @keyframes weight { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.shell[data-motion="rich3d"] .m-weight, .shell[data-motion="rich35"] .m-weight { animation-name: weight3d; transform-origin: 50% 0; } @keyframes weight3d { from { opacity: 0; transform: perspective(900px) rotateX(-14deg) translateY(10px); } }
/* Folded Space: destinations arrive as layered planes in 3D and 3.5D; 2D is a plain fade */
.view.on { animation-duration: var(--d3); }
.shell[data-motion="rich3d"] .view.on, .shell[data-motion="rich35"] .view.on { animation-name: plane; transform-origin: 50% 100%; } @keyframes plane { from { opacity: 0; transform: perspective(1000px) translateZ(-40px) rotateX(3deg) translateY(8px); } }
/* Dock Breath on the logo, three cycles only: earned, not ambient */
.brand-btn.has-resume img { box-shadow: 0 0 0 0 var(--accent); animation: dockbreath 2.4s ease-in-out 3; } .brand-btn.has-resume::after { content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin: -22px 0 0 28px; }
@keyframes dockbreath { 50% { transform: scale(1.06); } }
/* Pressure Glass (3.5D only) on the Record button */
.shell[data-motion="rich35"] .sh-dock .dock-act { transform: perspective(500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform var(--d2) var(--e-std); background-image: radial-gradient(circle at var(--lx, 50%) var(--ly, 30%), rgba(255,255,255,.4), transparent 55%); }
.shell[data-motion="rich35"] .sh-dock .dock-act:active { transform: perspective(500px) scale(.94); }
.shell[data-motion="rich35"] #sheet { box-shadow: 0 -30px 80px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.35); }
.hinge { transform-origin: 0 50%; } .shell[data-motion="rich3d"] .receipt-card, .shell[data-motion="rich35"] .receipt-card { animation: folio var(--d5) var(--e-emph); transform-origin: 0 50%; } @keyframes folio { from { opacity: 0; transform: perspective(1100px) rotateY(-26deg); } }
.shell[data-motion="light"] [data-reduced] { }
@media (prefers-reduced-motion: reduce) { .m-sheetin, .m-weight, .view.on, .brand-btn.has-resume img { animation: none !important; } }

/* ---------- receipt (screen and print) ---------- */
.receipt-card { background: #FFFDF7; color: #1A140C; border: 1px solid #C9973A; border-radius: 6px; padding: 1.1rem 1.2rem; font-size: .88rem; }
.receipt-card h3 { color: #5B4210; margin: 0; font-size: 1.5rem; } .receipt-card .no { font-family: var(--font-mono); font-size: .76rem; color: #5B4210; }
.receipt-card dl { display: grid; grid-template-columns: 7rem 1fr; gap: .25rem .6rem; margin: .8rem 0; } .receipt-card dt { color: #5E5548; }
.receipt-card .total { display: flex; justify-content: space-between; border-top: 2px solid #C9973A; padding-top: .6rem; font-weight: 800; font-size: 1.1rem; }
.receipt-card .sig { margin-top: .8rem; font-size: .72rem; color: #5E5548; border-top: 1px dashed #C9973A; padding-top: .5rem; } .receipt-card .void { color: #A33A2B; font-weight: 800; letter-spacing: .12em; }
@media print { body * { visibility: hidden; } .printable, .printable * { visibility: visible; } .printable { position: absolute; left: 0; top: 0; width: 100%; } #sheet { position: static; box-shadow: none; } }

/* ---------- additions: rows with a grip, daily bars, Read from image ---------- */
.row.has-grip { display: grid; grid-template-columns: 44px 1fr; align-items: stretch; } .row.has-grip .row-detail { grid-column: 1 / -1; } .row.has-grip .grip { align-self: center; }
.dbars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: .4rem .2rem 0; border-bottom: 1px solid var(--line); } .dbars i { flex: 1; min-width: 3px; background: var(--primary-ink); border-radius: 3px 3px 0 0; opacity: .85; } .dbars i.neg { background: var(--danger); } .dbars i.zero { background: var(--line); }
.scanbox { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .5rem 0; padding: .6rem; border: 1px dashed var(--line); border-radius: 12px; } .scanbox #sc-out { flex-basis: 100%; }
.sc-run, .sc-res { display: flex; gap: .8rem; align-items: flex-start; margin-top: .4rem; } .sc-img { width: 38%; max-width: 160px; max-height: 200px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.sc-text { white-space: pre-wrap; font-family: var(--font-mono); font-size: .72rem; max-height: 160px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; }
.chipbtn[aria-pressed="true"] .i { stroke: currentColor; }
.has-island .sh-main { scroll-padding-top: 3rem; }
@media (max-width: 380px) { .sc-run, .sc-res { flex-direction: column; } .sc-img { width: 100%; max-width: none; } }

/* ---------- the kit resets every button (.shell button), so button looks are restated here with matching weight ---------- */
.shell .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .84rem; }
.shell .btn--primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.shell .btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.shell .btn--sm { padding: .3rem .8rem; font-size: .78rem; }
.shell .btn:hover:not(:disabled) { border-color: var(--primary-ink); } .shell .btn--primary:hover:not(:disabled) { filter: brightness(1.05); }
.shell .chipbtn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.shell .chipbtn[aria-pressed="true"], .shell .chipbtn[aria-selected="true"][aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.shell .mic { border: 1px solid var(--line); background: var(--surface); } .shell .mic.listening { background: var(--primary); color: var(--on-primary); }
.shell .pocket { border: 1.5px dashed var(--accent); }
.shell .row-main { background: transparent; } .shell .row-main:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.shell .selbox input { width: 22px; height: 22px; }
.shell .ctxmenu button { background: transparent; }
.shell .ic-btn { background: transparent; }
.shell .chipbtn { display: inline-flex; align-items: center; justify-content: center; }
.btn svg.i, .chipbtn svg.i { flex: none; }

/* ---------- fixes found in browser tests ---------- */
.shell [hidden] { display: none !important; }
.kgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .8rem 0; } @media (min-width: 760px) { .kgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kgrid .kpi { padding: .7rem .8rem; } .kgrid .kpi b { font-size: clamp(1.25rem, 5.4vw, 1.9rem); } .kgrid .kpi span { font-size: .72rem; }
#undoMsg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#pocketZone { white-space: nowrap; }

/* Halo petals: always show the page name (the kit shows it only on hover, which phones do not have). Deviation 9. */
.petal { align-content: center; gap: 1px; }
.petal svg { width: 22px; height: 22px; }
.petal span { position: static; opacity: 1; background: none; color: inherit; padding: 0; font-size: .6rem; line-height: 1.1; }
