/* The panel mock-ups on the home page, drawn as 1.1.0's panel (DESIGN.md): threads that need you
   are lamp-lit cards at the top, busy threads are quiet rows with a live dot, finished threads rest
   on a dim shelf. Loaded after night-sky.css. */

/* The drawer */
.drawer, .mini-drawer { background: linear-gradient(180deg, #241f52, #100e27) !important; }
.drawer { box-shadow: -18px 0 50px rgba(0,0,0,.45), inset 1px 0 0 rgba(255,255,255,.07) !important; border-radius: 22px 0 0 22px !important; }
.drawer::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px 200px at 100% 0%, rgba(89,235,209,.13), transparent 70%),
              radial-gradient(280px 240px at 0% 100%, rgba(255,115,191,.12), transparent 70%); }
.drawer-head { padding: 6px 4px 6px !important; }
.drawer-head .t { font: 700 18px/1 var(--display) !important; letter-spacing: -.01em; background: none !important; color: var(--ink) !important; -webkit-text-fill-color: currentColor; }
.needpill { font: 700 13px/1 var(--display); padding: 5px 11px; border-radius: 999px; background: var(--lamp); color: var(--lamp-ink); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.status-chip { font: 700 12px/1 var(--display) !important; background: var(--lamp) !important; color: var(--lamp-ink) !important; padding: 5px 10px !important; }
.status-chip.calm { background: rgba(255,255,255,.08) !important; color: var(--muted) !important; }
.dbody { position: relative; z-index: 1; height: calc(100% - 40px); overflow: hidden; padding: 0 2px; }
.bh { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 4px 7px; }
.bh b { font: 700 15px/1.2 var(--display); letter-spacing: -.005em; }
.bh span { font: 500 12px/1 var(--body); color: var(--faint); }

/* Every mock card starts as a working row: flat, no stripe, no tint */
.card { --c: var(--blue); background: transparent !important; box-shadow: none !important; border-radius: 14px !important;
  padding: 6px 8px 6px 4px !important; grid-template-columns: 50px 1fr !important; gap: 10px !important; transition: background .25s; }
.card::before { display: none !important; }
.card:hover { background: rgba(255,255,255,.06) !important; }
.card .pet { width: 50px !important; height: 50px !important; }
.card .proj { font: 500 11.5px/1.25 var(--body) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--faint) !important; }
.card .title { font: 650 14px/1.25 var(--display) !important; letter-spacing: -.005em; color: var(--ink); }
.card .meta { font: 500 12px/1.4 var(--body) !important; color: var(--faint) !important; }
.card .meta .ml { color: var(--ink) !important; }
.card .detail { font: 400 12px/1.35 var(--body) !important; color: var(--muted) !important; }
.card .tx { min-width: 0; display: grid; gap: 2px; }
.card .hr { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.card .hr .title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .hr .ago { flex: none; font: 500 12px/1 var(--body); color: var(--faint); font-variant-numeric: tabular-nums; }
.card .ask { display: flex; align-items: center; gap: 7px; min-width: 0; font: 500 13px/1.3 var(--body); color: var(--ink); }
.card .ask > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .ask .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(102,166,255,.18); }
.card[data-kind="snag"] .ask .dot { background: #ff8a6b; box-shadow: 0 0 0 3px rgba(255,138,107,.18); }
.card .mline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font: 400 12px/1.3 var(--body); color: var(--faint); }
.card .projname { color: var(--faint); }
.mbadge { font: 500 11.5px/1.3 var(--body) !important; color: var(--muted) !important; }
.mbadge .pips i.off { opacity: .45; background: currentColor !important; }
.tag, .badge.agent { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px !important; border-radius: 999px !important; border: 0 !important;
  background: var(--tag-bg) !important; color: var(--tag-ink) !important; font: 600 11px/1.3 var(--display) !important; letter-spacing: 0 !important; text-transform: none !important; }
.card .badge.xhigh, .card .badge.max, .card .badge.ultra { display: none; }

/* Waiting on you: the lamp-lit window. Warm light only here. */
.card.loud, .card.lit { padding: 10px 12px 11px 8px !important; border-radius: 16px !important; grid-template-columns: 64px 1fr !important; gap: 12px !important;
  background: radial-gradient(140px 110px at 34px 50%, rgba(255,196,107,.30), transparent 70%), linear-gradient(180deg, var(--lit-top), var(--lit-bottom)) !important;
  box-shadow: 0 10px 28px rgba(255,168,70,.16), 0 2px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,226,176,.18) !important; }
.card.loud .pet, .card.lit .pet { width: 64px !important; height: 64px !important; }
.card.loud .title, .card.lit .title { font: 700 15px/1.2 var(--display) !important; }
.card.lit .ask { font-weight: 600; color: var(--lamp-soft); }
.card.lit .ask .dot { display: none; }
.card.lit[data-kind="question"] .ask, .card.lit[data-kind="plan"] .ask { color: var(--question); }
.card.lit[data-kind="reply"] .ask { color: var(--reply); }
.card.loud .meta .ml { color: var(--lamp-soft) !important; font-weight: 600; }
.card.lit .detail, .card.loud .detail { font: 400 12px/1.3 var(--mono) !important; color: var(--muted) !important; background: rgba(16,14,39,.55); border-radius: 7px; padding: 5px 8px; margin-top: 4px; }
.card.lit[data-kind="reply"] .detail:empty, .card.lit .detail:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .card.lit, .card.loud { animation: lamp 3.2s ease-in-out infinite; }
  .card.lit:nth-child(2) { animation-delay: 1.1s; }
}
@keyframes lamp { 50% { box-shadow: 0 10px 34px rgba(255,168,70,.28), 0 2px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,226,176,.24); } }
.cards { gap: 8px !important; }
#cardsWork, .cards:not(#cards) { gap: 2px !important; }

/* Subtasks under a lead row */
.group .card.lead { position: relative; }
.lead .pill { position: static !important; margin-left: auto; font: 600 11px/1 var(--display) !important; color: var(--muted) !important; background: rgba(255,255,255,.07) !important; box-shadow: none !important; padding: 4px 8px !important; }
.lead > .pill { position: absolute !important; top: 6px; right: 8px; }
.lead .hr { padding-right: 92px; }
.subtasks { border-left: 0 !important; margin: 0 0 0 38px !important; padding-left: 0 !important; }
.sub { background: transparent !important; box-shadow: none !important; grid-template-columns: 30px 1fr !important; padding: 3px 8px 3px 4px !important; }
.sub img { width: 30px !important; height: 30px !important; }
.sub b { font: 650 12.5px/1.25 var(--display) !important; }
.sub .meta, .sub .detail { font-weight: 400 !important; color: var(--faint) !important; }
.sub .meta .w { color: var(--muted) !important; }
.crew span { background: var(--facade) !important; box-shadow: 0 0 0 1.5px #1b1846 !important; }

/* Resting: the dim shelf */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.32)); box-shadow: inset 0 0 0 3px rgba(0,0,0,.12); }
.shelf .rest { display: grid; justify-items: center; text-align: center; padding: 4px 4px 2px; border-radius: 12px; }
.shelf img { width: 52px; height: 52px; opacity: .72; filter: saturate(.75); }
.shelf b { font: 650 12px/1.2 var(--display); color: var(--faint); margin-top: 2px; }
.shelf span { font: 400 11px/1.3 var(--body); color: var(--faint); }

/* Tab and menu bar */
.tab { background: linear-gradient(180deg, #2a2563, #191636) !important; }
.tab-badge { background: var(--lamp) !important; color: var(--lamp-ink) !important; }

/* The hero drawer keeps all three bands in view: subtask rows drop their "doing" line there */
.drawer .sub .detail { display: none; }
.drawer .bh { margin: 10px 4px 6px; }
.dbody { overflow-y: auto; scrollbar-width: none; }
.dbody::-webkit-scrollbar { display: none; }
.drawer .dbody { height: calc(100% - 96px); }
.dfoot { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); z-index: 1; }
.dfoot span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 9px; background: rgba(255,255,255,.05); color: var(--muted); font: 600 12.5px/1 var(--display); }
.dfoot span:first-child { flex: 1; }
.dfoot svg { width: 14px; height: 14px; }

/* Film slot, until the studio's 1.1.0 film arrives (preview only) */
.film-slot .slot-note { position: absolute; left: 14px; top: 12px; z-index: 3; padding: 6px 11px; border-radius: 999px; background: rgba(16,14,39,.8); color: var(--lamp-soft); font: 600 13px/1 var(--display); pointer-events: none; }
.film-poster .play { background: rgba(23,20,58,.72) !important; }

/* Terminal threads keep the app's green console chip (Nick prefers it: it stands out) */
.tbadge { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-left: 0 !important; padding: 2px 6px !important; border-radius: 5px !important;
  background: #0d1410 !important; border: 1px solid rgba(89,242,115,.6) !important; color: #5af273 !important;
  font: 700 10.5px/1.2 ui-monospace, "SF Mono", Menlo, monospace !important; letter-spacing: .04em !important; white-space: nowrap; }
.tbadge b { font-size: 11.5px; font-weight: 800; letter-spacing: 0; }
.card .hr .title { flex: 0 1 auto; }
.card .hr .ago { margin-left: auto; }

/* Done mood: the pet takes turns at its four resting places, a few seconds each */
.mood .cycle { position: relative; width: 112px; height: 112px; margin: 0 auto 4px; }
.mood .cycle img { position: absolute; inset: 0; margin: 0; opacity: 0; }
.mood .cycle img:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .mood .cycle img { animation: restcycle 12s ease-in-out infinite; }
  .mood .cycle img:nth-child(2) { animation-delay: 3s; }
  .mood .cycle img:nth-child(3) { animation-delay: 6s; }
  .mood .cycle img:nth-child(4) { animation-delay: 9s; }
}
@keyframes restcycle { 0% { opacity: 0; } 6%, 25% { opacity: 1; } 31%, 100% { opacity: 0; } }

/* A row gliding to a new place inside its band is opaque and above its neighbours */
.card.moving, .group.moving { position: relative; z-index: 3; }
.card.moving:not(.lit), .group.moving > .card { background: #1f1b48 !important; }
.group.moving { background: #1f1b48; border-radius: 14px; }
