/* Brigata phone. Same palette and tokens as the PC Command Deck (researched 2026-11-29):
   near-black base, one light violet accent, desaturated status colours. Mobile lane: body 16, weight 400. */
:root {
  --ground: #0a0a0c; --surface: #141418; --raised: #1c1c22; --line: rgba(255,255,255,.08);
  --text: #f4f4f6; --muted: #a6a6b2; --faint: #8a8a96;
  --accent: #a99cff; --fill: #5b47f0; --fill-2: #7565ff;
  --s-inbox: #b4b4c2; --s-queued: #7dd3fc; --s-running: #86efac; --s-waiting: #fcd34d; --s-done: #8e8ea0; --s-failed: #fda4af;
  --hud: "Bahnschrift", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Roboto Mono", ui-monospace, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--ground); color: var(--text); font: 400 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: calc(84px + var(--safe-b)); overscroll-behavior-y: contain; }
body.home-quick { padding-bottom: var(--safe-b); min-height: 100dvh; display: flex; flex-direction: column; }
body.home-quick main { flex: 1; display: flex; flex-direction: column; padding: 6px 14px calc(14px + var(--safe-b)); }
button, input, textarea, select { font: inherit; color: inherit; }
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg .o1 { position: absolute; width: 320px; height: 320px; right: -120px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.45), rgba(157,143,255,.5) 12%, rgba(74,53,230,.3) 40%, transparent 70%); }
.bg .o2 { position: absolute; width: 240px; height: 240px; left: -110px; bottom: 60px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.3), rgba(125,211,252,.35) 14%, transparent 70%); }
.bg .floor { position: absolute; left: -30%; right: -30%; bottom: -5%; height: 40%; transform: perspective(500px) rotateX(62deg); transform-origin: top;
  background-image: linear-gradient(rgba(169,156,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(169,156,255,.16) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask: linear-gradient(transparent, #000 40%, transparent); mask: linear-gradient(transparent, #000 40%, transparent); }

/* top */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: linear-gradient(180deg, rgba(10,10,12,.95), rgba(10,10,12,.75)); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 8px; font: 700 14px var(--hud); letter-spacing: .14em; background: none; border: 0; padding: 6px 2px; min-height: 44px; cursor: pointer; }
.brand em { font-style: normal; color: var(--accent); }
.mark { width: 24px; height: 24px; flex: none; display: inline-block; background: url("icon.svg") center / contain no-repeat; }
.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.island { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: 17px; background: rgba(0,0,0,.75); border: 1px solid var(--line);
  font: 600 12px var(--hud); letter-spacing: .04em; max-width: 44vw; overflow: hidden; white-space: nowrap; }
.island span:last-child { overflow: hidden; text-overflow: ellipsis; }
.menu-btn { position: relative; min-width: 44px; min-height: 44px; width: 44px; height: 44px; border-radius: 13px; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(28,28,36,.92), rgba(16,16,22,.92)); color: var(--text); display: grid; place-items: center; padding: 0; flex: none; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--s-waiting); color: #241500;
  font: 700 10px var(--hud); display: grid; place-items: center; box-shadow: 0 0 12px rgba(252,211,77,.55); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.island.ok .pulse { background: var(--s-running); box-shadow: 0 0 10px var(--s-running); }
.island.busy .pulse { background: var(--s-queued); box-shadow: 0 0 10px var(--s-queued); animation: pulse 1.2s infinite; }
.island.alert { border-color: rgba(252,211,77,.5); box-shadow: 0 0 24px rgba(252,211,77,.2); }
.island.alert .pulse { background: var(--s-waiting); box-shadow: 0 0 10px var(--s-waiting); }
.island.off .pulse { background: var(--s-failed); }
@keyframes pulse { 50% { opacity: .35; } }

main { padding: 6px 14px 16px; }
.update-bar { margin: 6px 14px 0; padding: 12px 12px 12px 14px; border-radius: 16px; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, rgba(117,101,255,.22), rgba(117,101,255,.06)); border: 1px solid rgba(169,156,255,.45); box-shadow: 0 0 24px rgba(117,101,255,.18); }
.update-bar div { flex: 1; min-width: 0; }
.update-bar b { display: block; font: 600 15px var(--hud); letter-spacing: .02em; }
.update-bar small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-bar .btn { min-height: 44px; flex: none; }
.h { display: flex; align-items: flex-end; justify-content: space-between; margin: 10px 2px 12px; }
.h h2 { margin: 0; font: 600 11px var(--hud); letter-spacing: .32em; color: var(--muted); text-transform: uppercase; }
.h h2 b { display: block; font: 300 22px/1.1 var(--hud); letter-spacing: .01em; color: var(--text); text-transform: none; margin-top: 3px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  font: 600 11px var(--hud); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.chips button.on { background: var(--raised); color: var(--text); border-color: rgba(255,255,255,.14); }
.chips i { font-style: normal; color: var(--accent); margin-left: 4px; font-family: var(--mono); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* approval & question cards */
.approve { border-radius: 18px; padding: 14px; margin-bottom: 12px; border: 1px solid rgba(252,211,77,.45);
  background: linear-gradient(160deg, rgba(252,211,77,.14), rgba(252,211,77,.03)); box-shadow: 0 0 30px rgba(252,211,77,.12); }
.approve b { display: block; font: 600 15px var(--hud); letter-spacing: .02em; }
.approve pre { margin: 10px 0 12px; font: 13px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); max-height: 150px; overflow: auto; }
.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.card-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font: 700 10px var(--hud); letter-spacing: .12em; text-transform: uppercase; flex: none; }
.card-pill.ap { background: rgba(252,211,77,.2); color: var(--s-waiting); border: 1px solid rgba(252,211,77,.4); }
.card-pill.q { background: rgba(125,211,252,.18); color: var(--s-queued); border: 1px solid rgba(125,211,252,.4); }
.card-tool { font: 600 13px var(--mono); color: var(--text); overflow-wrap: anywhere; }
.card-ctx { font: 600 15px var(--hud); letter-spacing: .01em; color: var(--text); min-width: 0; flex: 1; overflow-wrap: anywhere; }
.btn.scope { width: 100%; margin-top: 8px; border-color: rgba(252,211,77,.35); background: rgba(252,211,77,.1); color: #fde68a; }

/* multi-question card */
.q-card { border-color: rgba(125,211,252,.48); background: linear-gradient(160deg, rgba(125,211,252,.14), rgba(125,211,252,.03)); box-shadow: 0 0 30px rgba(125,211,252,.12); }
.q-list { display: grid; gap: 12px; margin-top: 10px; }
.q-item { padding: 10px; border-radius: 14px; background: rgba(6,6,8,.55); border: 1px solid rgba(255,255,255,.07); transition: border-color .15s; }
.q-item.missing { border-color: rgba(253,164,175,.75); box-shadow: 0 0 0 1px rgba(253,164,175,.3); }
.q-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 10px; font-size: 15px; line-height: 1.4; }
.q-hdr { display: inline-block; padding: 2px 7px; border-radius: 6px; background: rgba(169,156,255,.16); color: var(--accent); font: 700 10px var(--hud); letter-spacing: .12em; text-transform: uppercase; }
.q-num { font: 700 13px var(--mono); color: var(--s-queued); }
.q-multi { width: 100%; font: 600 11px var(--mono); letter-spacing: .06em; color: var(--faint); }
.q-opts { display: grid; gap: 8px; margin-bottom: 10px; }
.q-opt { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  display: flex; align-items: center; gap: 10px; text-align: left; font-weight: 500; font-size: 15px; line-height: 1.35; }
.q-opt.on { border-color: rgba(125,211,252,.7); background: rgba(125,211,252,.16); color: #fff; }
.q-rad, .q-chk { width: 18px; height: 18px; flex: none; border: 2px solid rgba(255,255,255,.35); position: relative; }
.q-rad { border-radius: 50%; }
.q-chk { border-radius: 5px; }
.q-opt.on .q-rad { border-color: var(--s-queued); }
.q-opt.on .q-rad::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--s-queued); }
.q-opt.on .q-chk { border-color: var(--s-queued); background: var(--s-queued); }
.q-opt.on .q-chk::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #06131c; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.q-opt-txt { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.q-text { min-height: 46px; }
.q-err { margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--s-failed); background: rgba(253,164,175,.1); border: 1px solid rgba(253,164,175,.3); }
.q-submit { width: 100%; margin-top: 12px; }

/* task rows + inline steer */
.task-item { margin-bottom: 8px; }
.row { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; min-height: 64px; padding: 10px 12px 10px 0; border-radius: 14px;
  background: linear-gradient(90deg, rgba(28,28,34,.85), rgba(20,20,24,.6)); border: 1px solid rgba(255,255,255,.05); box-shadow: 0 8px 18px rgba(0,0,0,.35); }
.task-item.steering .row { border-radius: 14px 14px 0 0; border-bottom-color: transparent; }
.row .bar { width: 4px; align-self: stretch; border-radius: 0 4px 4px 0; background: var(--c, var(--s-inbox)); box-shadow: 0 0 10px var(--c, transparent); }
.row .t { min-width: 0; }
.row .t b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t small { display: block; font: 12px var(--mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.row-right { display: flex; align-items: center; gap: 8px; flex: none; }
.flap { font: 700 11px var(--hud); letter-spacing: .14em; color: var(--c); padding: 5px 8px; border-radius: 6px; background: linear-gradient(180deg, #1c1c22 49%, #121216 51%); white-space: nowrap; }
.steer-btn.on { color: var(--s-waiting); border-color: rgba(252,211,77,.5); background: rgba(252,211,77,.14); }
.steer-bar { padding: 10px 12px 12px; border-radius: 0 0 14px 14px; border: 1px solid rgba(169,156,255,.32); border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(22,22,29,.96), rgba(12,12,16,.96)); display: grid; gap: 8px; }
.steer-in { min-height: 46px; }

/* send-later queue cards */
.fu-list { display: grid; gap: 8px; margin-bottom: 14px; }
.fu-card { padding: 10px 12px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.16); background: rgba(255,255,255,.025); display: grid; gap: 8px; }
.fu-card.editing { border-style: solid; border-color: rgba(169,156,255,.55); background: rgba(169,156,255,.07); }
.fu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.fu-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font: 700 10px var(--hud); letter-spacing: .14em; }
.fu-pill.steer { color: var(--s-waiting); background: rgba(252,211,77,.14); border: 1px solid rgba(252,211,77,.35); }
.fu-pill.next { color: var(--s-queued); background: rgba(125,211,252,.12); border: 1px solid rgba(125,211,252,.32); }
.fu-hint { font: 600 11px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.fu-move { display: flex; gap: 6px; }
.fu-text { font-size: 14px; line-height: 1.45; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.fu-edit-in { min-height: 76px; }
.fu-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fu-acts .btn { flex: 1 1 auto; }
.d-fu-acts { margin-bottom: 14px; }

/* private desk */
.papers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.paper { border-radius: 4px 4px 14px 4px; padding: 12px; min-height: 120px; color: #2b2410; box-shadow: 0 10px 20px rgba(0,0,0,.35); transform: rotate(var(--tilt)); font-family: "Segoe Print", "Comic Sans MS", cursive; }
.paper b { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
.paper p { margin: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 90px; overflow: hidden; }
.c-yellow { background: linear-gradient(180deg, #fff59d, #fdea6b); } .c-pink { background: linear-gradient(180deg, #ffc1d9, #ffa7c8); }
.c-blue { background: linear-gradient(180deg, #bfe3ff, #9fd2ff); } .c-green { background: linear-gradient(180deg, #c8f5c0, #a9eb9d); }
.c-orange { background: linear-gradient(180deg, #ffd5a6, #ffc080); } .c-purple { background: linear-gradient(180deg, #e2cdff, #d0b2ff); }

/* pc panel */
.pc { border-radius: 20px; padding: 18px; margin-bottom: 12px; background: linear-gradient(165deg, var(--raised), var(--surface)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 16px 30px rgba(0,0,0,.4); }
.pc .name { font: 300 26px/1.1 var(--hud); }
.pc .meta { font: 12px var(--mono); color: var(--faint); margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tile { height: 76px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, #1f1f26, #141418); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font: 600 11px var(--hud); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.tile svg { width: 22px; height: 22px; color: var(--text); }
.tile.danger svg { color: var(--s-failed); }

/* buttons */
.btn { min-height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg, #22222a, #15151b); font-weight: 600; padding: 10px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.25; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.sm { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.btn.primary { background: linear-gradient(180deg, var(--fill-2), var(--fill)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(91,71,240,.4); }
.btn.amber { background: var(--s-waiting); color: #241500; border-color: transparent; }
.btn.ghost { background: none; }
.btn.danger { color: var(--s-failed); }
.btn:disabled, .icon-btn:disabled { opacity: .4; }
.icon-btn { min-width: 44px; min-height: 44px; width: 44px; height: 44px; border-radius: 11px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  color: var(--muted); display: grid; place-items: center; padding: 0; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }

/* tabs + fab */
.tabs { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); height: 62px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; z-index: 20;
  border-radius: 22px; background: linear-gradient(180deg, rgba(28,28,34,.92), rgba(10,10,12,.95)); border: 1px solid var(--line); backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.07); }
.tabs button { height: 100%; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint);
  font: 600 9px var(--hud); letter-spacing: .12em; text-transform: uppercase; position: relative; }
.tabs button svg { width: 22px; height: 22px; }
.tabs button.on { color: var(--text); }
.tabs button.on svg { color: var(--accent); filter: drop-shadow(0 0 6px rgba(169,156,255,.7)); }
.tabs .fab { width: 54px; height: 54px; margin: -26px auto 0; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, var(--fill-2), var(--fill)); box-shadow: 0 10px 24px rgba(91,71,240,.55), inset 0 1px 0 rgba(255,255,255,.4); }
.tabs .fab svg { width: 26px; height: 26px; }
.tabs .badge { position: absolute; top: 8px; right: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--s-waiting); color: #241500; font: 700 10px var(--hud); display: grid; place-items: center; padding: 0 4px; }

/* sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: .25s; z-index: 30; }
.sheet-back.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; z-index: 31; transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.9,.3,1.1);
  border-radius: 24px 24px 0 0; padding: 10px 16px calc(18px + var(--safe-b)); background: linear-gradient(180deg, #17171c, #0e0e11); border-top: 1px solid rgba(255,255,255,.1); }
.sheet.on { transform: none; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 12px; font: 300 22px var(--hud); }
.field { margin-bottom: 12px; }
.label { display: block; font: 600 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.in { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: #060608; outline: none; }
.in:focus { border-color: rgba(169,156,255,.6); }
textarea.in { min-height: 120px; resize: vertical; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: #000; border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 44px; border: 0; background: none; border-radius: 9px; font: 600 12px var(--hud); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.seg button.on { background: var(--raised); color: var(--text); }
.seg button.on.priv { color: #fcd34d; }
.log { font: 12px/1.5 var(--mono); background: #030304; border: 1px solid var(--line); border-radius: 12px; padding: 10px; max-height: 40vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #cfd3ea; }
.log .approval { color: var(--s-waiting); } .log .error, .log .stderr { color: var(--s-failed); } .log .start, .log .end { color: var(--accent); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* pairing / empty */
.empty { text-align: center; padding: 48px 16px; color: var(--faint); font-size: 14px; }
.empty b { display: block; font: 300 24px var(--hud); color: var(--text); margin-bottom: 8px; }
.ask-back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 24px; }
.ask-box { width: min(360px, 100%); border-radius: 20px; padding: 20px; background: linear-gradient(180deg, #1c1c22, #121216); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px rgba(0,0,0,.7); }
.ask-box p { margin: 0 0 16px; font-size: 16px; line-height: 1.45; }
.btn.danger-fill { background: var(--s-failed); color: #3a0710; border-color: transparent; }
.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%) translateY(20px); opacity: 0; transition: .3s; z-index: 50;
  padding: 10px 16px; border-radius: 12px; background: #1c1c22; border: 1px solid rgba(255,255,255,.12); font-size: 14px; max-width: 90vw; }
.toast.on { opacity: 1; transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* PC offline: the app keeps showing the last snapshot under this strip */
.offline-strip { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.4; color: #ffd9a8; background: rgba(252,211,77,.08); border: 1px solid rgba(252,211,77,.25); }

/* Phase 2: Flight Plan Gate, Dossier diff stats & Conflict Radar */
.plan-toggle-row { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.plan-card { border-color: rgba(169,156,255,.52); background: linear-gradient(160deg, rgba(117,101,255,.16), rgba(117,101,255,.04)); box-shadow: 0 0 28px rgba(117,101,255,.14); }
.card-pill.plan { background: rgba(169,156,255,.22); color: var(--accent); border: 1px solid rgba(169,156,255,.45); }
.plan-summary { font: 500 12px var(--mono); color: var(--muted); margin: 2px 0 8px; }
.plan-sec { margin-top: 8px; }
.plan-sec-lbl { font: 700 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.plan-files { display: flex; flex-wrap: wrap; gap: 5px; }
.plan-file-chip { padding: 3px 8px; border-radius: 7px; font: 500 11px var(--mono); background: rgba(6,6,8,.65); border: 1px solid rgba(255,255,255,.1); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.plan-ol, .plan-ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; color: var(--text); }
.plan-in { min-height: 64px; }
.plan-acts { margin-top: 10px; }

.dossier-card { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.09); }
.dos-kicker { font: 700 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.dos-headline { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.dos-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dos-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font: 600 11px var(--mono); border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--muted); }
.dos-pill.tone-add { color: #86efac; background: rgba(134,239,172,.12); border-color: rgba(134,239,172,.35); }
.dos-pill.tone-del { color: #fda4af; background: rgba(253,164,175,.12); border-color: rgba(253,164,175,.35); }
.dos-pill.tone-ok { color: #86efac; background: rgba(134,239,172,.14); border-color: rgba(134,239,172,.4); }
.dos-pill.tone-err { color: #fda4af; background: rgba(253,164,175,.14); border-color: rgba(253,164,175,.4); }
.dos-pill.tone-info { color: #7dd3fc; background: rgba(125,211,252,.12); border-color: rgba(125,211,252,.35); }
.dos-pill.tone-warn { color: #fcd34d; background: rgba(252,211,77,.12); border-color: rgba(252,211,77,.35); }

.conflict-pill { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font: 700 10px var(--mono); background: rgba(252,211,77,.16); border: 1px solid rgba(252,211,77,.45); color: #fde68a; vertical-align: 1px; }
.conflict-card { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(252,211,77,.42); background: rgba(252,211,77,.08); }
.conflict-line { font-size: 13px; color: var(--text); margin-top: 4px; overflow-wrap: anywhere; }

/* Part A: Distraction-free Quick Note home */
.qn-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.qn-box { flex: 1; display: flex; flex-direction: column; min-height: 240px; border-radius: 22px; padding: 14px;
  background: linear-gradient(170deg, rgba(24,24,32,.92), rgba(13,13,18,.96)); border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px rgba(0,0,0,.45); }
.qn-input { flex: 1; width: 100%; min-height: 180px; resize: none; border: 0; outline: none; background: transparent; color: var(--text);
  font-size: 17px; line-height: 1.55; padding: 4px 2px 12px; }
.qn-input::placeholder { color: var(--faint); }
.qn-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.qn-status { min-height: 36px; max-width: 55%; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: var(--muted); font: 600 12px var(--hud); letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.qn-status.tone-local { color: #fde68a; background: rgba(252,211,77,.12); border-color: rgba(252,211,77,.35); }
.qn-status.tone-relay { color: #7dd3fc; background: rgba(125,211,252,.12); border-color: rgba(125,211,252,.35); }
.qn-status.tone-pc, .qn-status.tone-done { color: #86efac; background: rgba(134,239,172,.12); border-color: rgba(134,239,172,.35); }
.qn-status.tone-inbox { color: var(--accent); background: rgba(169,156,255,.16); border-color: rgba(169,156,255,.4); }
.qn-count { font: 600 11px var(--mono); color: var(--faint); margin-left: auto; }
.qn-send { margin-left: auto; min-width: 112px; min-height: 50px; padding: 0 22px; border-radius: 15px; font-size: 16px; letter-spacing: .02em; }
.qn-count:not([hidden]) + .qn-send { margin-left: 0; }
.tabs[hidden] { display: none; }

/* Compact top-right menu drawer */
.menu-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 35; }
.menu-back.on { opacity: 1; pointer-events: auto; }
.menu-drawer { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; width: min(290px, calc(100vw - 24px)); z-index: 36;
  border-radius: 20px; padding: 12px; background: linear-gradient(180deg, #1b1b23, #111116); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 56px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.08);
  opacity: 0; transform: translateY(-10px) scale(.97); pointer-events: none; transition: opacity .18s, transform .2s; }
.menu-drawer.on { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; border-bottom: 1px solid rgba(255,255,255,.07);
  font: 700 11px var(--hud); letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
.menu-x { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.menu-list { display: grid; gap: 4px; margin-top: 8px; }
.menu-item { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  display: flex; align-items: center; gap: 12px; text-align: left; font-weight: 500; color: var(--text); cursor: pointer; }
.menu-item.on { background: rgba(169,156,255,.14); border-color: rgba(169,156,255,.32); color: #fff; }
.menu-ic { width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted); flex: none; }
.menu-item.on .menu-ic { color: var(--accent); }
.menu-ic svg { width: 20px; height: 20px; }
.menu-lbl { flex: 1; min-width: 0; }
.menu-pill { padding: 2px 8px; border-radius: 999px; font: 700 11px var(--mono); }
.menu-pill.alert { background: var(--s-waiting); color: #241500; }
.menu-pill.info { background: rgba(125,211,252,.18); color: var(--s-queued); }
.menu-pill.muted { background: rgba(255,255,255,.08); color: var(--muted); }

/* Sent notes list */
.sn-list { display: grid; gap: 10px; }
.sn-card { padding: 14px; border-radius: 16px; background: linear-gradient(165deg, rgba(28,28,36,.88), rgba(18,18,24,.75));
  border: 1px solid rgba(255,255,255,.07); box-shadow: 0 8px 20px rgba(0,0,0,.32); }
.sn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sn-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 700 11px var(--hud); letter-spacing: .05em; border: 1px solid rgba(255,255,255,.12); }
.sn-pill.tone-local { color: #fde68a; background: rgba(252,211,77,.14); border-color: rgba(252,211,77,.38); }
.sn-pill.tone-relay { color: #7dd3fc; background: rgba(125,211,252,.14); border-color: rgba(125,211,252,.38); }
.sn-pill.tone-pc, .sn-pill.tone-done { color: #86efac; background: rgba(134,239,172,.14); border-color: rgba(134,239,172,.38); }
.sn-pill.tone-inbox { color: var(--accent); background: rgba(169,156,255,.18); border-color: rgba(169,156,255,.42); }
.sn-time { font: 12px var(--mono); color: var(--faint); }
.sn-body { font-size: 15px; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.sn-result { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sn-result b { color: #86efac; font-weight: 600; }

/* Group Chat mobile views */
.gc-p-row { cursor: pointer; }
.gc-p-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gc-p-meta { font-size: 12px; color: var(--faint); margin-top: 3px; }
.gc-p-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gc-p-title-wrap { min-width: 0; flex: 1; }
.gc-p-warn { border-color: rgba(252,211,77,.45); background: rgba(252,211,77,.09); color: #fde68a; font-size: 13px; }
.gc-p-usage { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gc-p-ag { padding: 4px 9px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.gc-p-ag.blocked { border-color: rgba(252,211,77,.48); color: #fde68a; }
.gc-p-mhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.gc-p-mt { margin-left: auto; min-height: 36px; padding: 4px 10px; font-size: 12px; }
.gc-p-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.gc-p-msg.kind-external { border-color: rgba(125,211,252,.4); }
.gc-p-msg.kind-user { border-color: rgba(169,156,255,.4); }

/* Phase 5 Step 7: Jump-to-bottom floating pill & PC Health card */
.log-wrap, .gc-p-thread-wrap { position: relative; }
.gc-p-thread { max-height: 55vh; overflow-y: auto; padding-right: 2px; margin-bottom: 10px; }
.jump-bottom-btn { position: absolute; right: 10px; bottom: 10px; z-index: 4; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(169,156,255,.5); background: rgba(20,20,28,.94); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--hud); letter-spacing: .04em;
  box-shadow: 0 10px 24px rgba(0,0,0,.65); backdrop-filter: blur(10px); cursor: pointer; }
.jump-bottom-btn[hidden] { display: none; }
.jump-bottom-btn svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

.pc-health.tone-warn { border-color: rgba(252,211,77,.42); }
.pc-health.tone-danger { border-color: rgba(253,164,175,.5); }
.pc-health-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pc-health-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font: 700 11px var(--hud); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--muted); }
.pc-health-pill.tone-ok { color: #86efac; background: rgba(134,239,172,.14); border-color: rgba(134,239,172,.38); }
.pc-health-pill.tone-warn { color: #fde68a; background: rgba(252,211,77,.16); border-color: rgba(252,211,77,.42); }
.pc-health-pill.tone-danger { color: #fda4af; background: rgba(253,164,175,.16); border-color: rgba(253,164,175,.45); }
.pc-health-warn { margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  color: #fde68a; background: rgba(252,211,77,.1); border: 1px solid rgba(252,211,77,.35); }
.pc-health-warn.tone-danger { color: #fecdd3; background: rgba(253,164,175,.12); border-color: rgba(253,164,175,.42); }
.pc-health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-health-cell { padding: 10px 12px; border-radius: 12px; background: rgba(6,6,8,.55); border: 1px solid rgba(255,255,255,.06); }
.pc-health-lbl { display: block; font: 600 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.pc-health-val { display: block; font: 600 14px/1.3 var(--hud); color: var(--text); }
.pc-health-val.tone-warn { color: #fde68a; }
.pc-health-val.tone-danger { color: #fda4af; }
.pc-health-val.tone-info { color: var(--s-queued); }
.pc-health-val.tone-muted { color: var(--muted); }
