/* Dark room: a watch on the left, the daemon's terminal on the right. */
:root { --bg: #1c1c1e; --panel: #111113; --line: #2c2c2e; --fg: #e5e5ea; --muted: #8e8e93; --run-bg: #3a3a3c; --run-fg: #e5e5ea; --ask-bg: #3e2a06; --ask-fg: #f2b544; --done-bg: #1c3a16; --done-fg: #9fe08a; --trash: #8a1f1f; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif; color: var(--fg); background: var(--bg); }
.app { height: calc(100% - 34px); display: grid; grid-template-columns: 300px 1fr; }
.wrist { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; border-right: 1px solid var(--line); }
.caption { margin: 0; max-width: 240px; font-size: 12px; color: var(--muted); text-align: center; }
.watch { position: relative; width: 212px; height: 258px; padding: 14px; border-radius: 48px; background: linear-gradient(160deg, #3a3a3d, #0c0c0d 60%); box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
.crown { position: absolute; right: -8px; top: 70px; width: 10px; height: 38px; border-radius: 4px; background: linear-gradient(90deg, #2a2a2c, #4a4a4d); }
.screen { position: relative; width: 184px; height: 230px; overflow: hidden; border-radius: 36px; background: #000; font-size: 14px; user-select: none; }
.clock { position: absolute; top: 10px; right: 16px; z-index: 2; font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); }
.empty .check { font-size: 28px; color: #777; }
.tiles { position: absolute; inset: 0; display: grid; gap: 2px; padding-top: 0; }
.tiles.n1 { grid-template-rows: 1fr; }
.tiles.n2 { grid-template-rows: 1fr 1fr; }
.tiles.n3 { grid-template-rows: 1fr 1fr 1fr; }
.tiles.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tile { position: relative; overflow: hidden; background: var(--run-bg); color: var(--run-fg); }
.tile.waiting { background: var(--ask-bg); color: var(--ask-fg); }
.tile.done { background: var(--done-bg); color: var(--done-fg); }
.tile .face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px; cursor: pointer; transition: transform 160ms ease; touch-action: pan-y; }
.tile.swiped .face { transform: translateX(-54px); }
.tile .tool { font-size: 13px; font-weight: 600; opacity: .9; }
.tile .state { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.n1 .tile .tool { font-size: 20px; } .n1 .tile .state { font-size: 30px; }
.n2 .tile .tool { font-size: 17px; } .n2 .tile .state { font-size: 24px; }
.n4 .tile .state { font-size: 15px; }
.tile .trash { position: absolute; top: 0; right: 0; bottom: 0; width: 54px; display: grid; place-items: center; background: var(--trash); color: #ffb3b3; border: 0; font-size: 18px; cursor: pointer; transform: translateX(100%); transition: transform 160ms ease; }
.tile.swiped .trash { transform: none; }
.more { position: absolute; top: 10px; left: 12px; z-index: 2; padding: 1px 8px; border-radius: 999px; background: #000; font-size: 12px; font-weight: 700; }
.detail { position: absolute; inset: 0; padding: 44px 16px 14px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.detail.running { background: var(--run-bg); color: var(--run-fg); }
.detail.waiting { background: var(--ask-bg); color: var(--ask-fg); }
.detail.done { background: var(--done-bg); color: var(--done-fg); }
.detail .close { position: absolute; top: 8px; left: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 16px; cursor: pointer; }
.detail .tool { font-size: 13px; font-weight: 600; opacity: .9; }
.detail .project { font-size: 19px; font-weight: 700; color: #fff; line-height: 1.2; overflow-wrap: anywhere; }
.detail .state { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.detail .meta { font-size: 12px; opacity: .85; }
.detail .msg { margin-top: 4px; font-size: 12px; line-height: 1.35; color: #fff; opacity: .9; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.daemon { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.daemon-head, .cards-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cards-head { border-top: 1px solid var(--line); }
.prompt { color: var(--muted); } .cmd { color: #fff; font-weight: 600; } .muted { color: var(--muted); }
.spacer { flex: 1; }
.btn { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: #1f1f22; color: var(--fg); font: inherit; font-size: 12px; cursor: pointer; }
.btn:hover { border-color: #555; }
.btn.primary { background: #fff; color: #000; border-color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.controls { display: grid; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.agent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.agent .name { min-width: 190px; color: #fff; }
.agent .name small { color: var(--muted); }
.log { flex: 1; min-height: 120px; margin: 0; padding: 10px 14px; overflow: auto; white-space: pre-wrap; color: #c8c8cc; }
.log .t { color: var(--muted); } .log .hook { color: #7fd1ff; } .log .ok { color: #9fe08a; }
.cards { margin: 0; padding: 10px 14px; min-height: 96px; max-height: 40%; overflow: auto; white-space: pre; color: #c8c8cc; }
.banner { height: 34px; display: flex; align-items: center; justify-content: center; gap: .3em; font: 12px/1.4 -apple-system, "Segoe UI", system-ui, sans-serif; color: #fff; background: #000; }
.banner a { color: #8ab4f8; }
body.preview .banner, body.preview .controls, body.preview .caption { display: none; }
body.preview .app { height: 100%; }
@media (max-width: 700px) { .app { grid-template-columns: 1fr; } .wrist { border-right: 0; border-bottom: 1px solid var(--line); } }
