/* AgentNotes 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; }
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; 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; }
.brand em { font-style: normal; color: var(--accent); }
.mark { width: 24px; height: 24px; border-radius: 8px; position: relative; background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.7), transparent 34%), conic-gradient(from 210deg, #a99cff, #5b47f0, #7dd3fc, #a99cff); box-shadow: 0 6px 16px rgba(117,101,255,.4); }
.mark::after { content: ""; position: absolute; inset: 6px 7px 7px 6px; border-radius: 3px; background: #fff; }
.island { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; background: #000; border: 1px solid var(--line);
  font: 600 12px var(--hud); letter-spacing: .04em; max-width: 60vw; overflow: hidden; white-space: nowrap; }
.island span:last-child { overflow: hidden; text-overflow: ellipsis; }
.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; }
.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; height: 32px; padding: 0 12px; border-radius: 16px; 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); }

/* approval card */
.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: 8px 0 12px; font: 13px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); max-height: 140px; overflow: auto; }
.approve .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* task rows */
.row { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; min-height: 64px; padding: 10px 12px 10px 0; margin-bottom: 8px; 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); }
.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; }
.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; }

/* 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 { height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg, #22222a, #15151b); font-weight: 600; padding: 0 16px; }
.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 { opacity: .45; }

/* 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; height: 40px; 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; }
.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; } }
