
:root { color-scheme: light; --bg: #e7e9ee; --surface: #f6f7f9; --surface-2: #e8eaef; --line: rgba(20, 30, 60, .12);
  --label: #1b1f26; --label-2: rgba(27, 31, 38, .62); --label-3: rgba(27, 31, 38, .4); --accent: #0a6cff; --accent-fill: rgba(10, 108, 255, .1);
  --warning: #b8860b; --mark: #ffe58a; --pin: #0a6cff; --pin-hover: #2f7fff; --pin-active: #0043a8; --pin-done: #7a8190; --shadow: rgba(0, 0, 0, .18); }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; --bg: #15181e; --surface: #1e222a; --surface-2: #292e37; --line: rgba(210, 222, 245, .12);
  --label: #e9ecf2; --label-2: rgba(226, 232, 244, .62); --label-3: rgba(226, 232, 244, .4); --accent: #4d8dff; --accent-fill: rgba(77, 141, 255, .16); --warning: #e8bd4f; --mark: #6b5b1e;
  --pin: #4d8dff; --pin-hover: #6ea1ff; --pin-active: #2c67d6; --pin-done: #6b7280; --shadow: rgba(0, 0, 0, .5); } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--label); font: 14px/1.45 -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; }
body { display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
button, .button { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--surface); color: var(--label); cursor: pointer; display: inline-block; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { background: transparent; border-color: transparent; color: var(--label-2); }
button.ghost:hover, button:hover { border-color: var(--line); color: var(--label); }
button.small { padding: 2px 8px; font-size: 12px; }
button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: #b91c1c; }
.meta { color: var(--label-2); font-size: 12px; }
code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.bar { flex: none; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); gap: 12px; }
.bar-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.bar-title h1 { font-size: 15px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home { font-weight: 600; color: var(--label-2); white-space: nowrap; }
.bar-title .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.version select { font: inherit; margin-left: 4px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--label); max-width: 320px; }
.watch { display: inline-flex; align-items: center; gap: 6px; color: var(--label-2); font-size: 12px; }
.watch .dot { width: 6px; height: 6px; border-radius: 50%; background: #1f9d55; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, .5); } 70% { box-shadow: 0 0 0 6px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
.banner { flex: none; background: var(--accent-fill); padding: 6px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.stage { flex: 1 1 auto; position: relative; min-height: 0; overflow: hidden; }
iframe { position: absolute; inset: 0; border: 0; width: 100%; height: 100%; background: #fff; }
.overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.box { position: absolute; top: 0; left: 0; border-radius: 3px; }
.box.hover { background: rgba(10, 108, 255, .06); outline: 1px solid rgba(10, 108, 255, .7); }
.box.picked { background: rgba(10, 108, 255, .12); outline: 1px solid rgba(10, 108, 255, .85); }
.pin { position: absolute; top: 0; left: 0; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 50% 50% 50% 3px; background: var(--pin); color: #fff; font: 600 10px/1 -apple-system, system-ui, sans-serif; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .35), 0 0 0 1px #fff; pointer-events: auto; cursor: pointer; transition: background .12s; }
.pin:hover { background: var(--pin-hover); border-color: transparent; color: #fff; }
.pin.active { background: var(--pin-active); }
.pin.resolved { background: var(--pin-done); }
.pin.pending { pointer-events: none; }
.popover { position: absolute; top: 0; left: 0; z-index: 30; width: 340px; max-height: calc(100% - 16px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); overflow: hidden; }
.pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 6px 0 12px; }
.pop-head .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid transparent; }
.chip:hover { border-color: var(--line); }
blockquote.quote { margin: 6px 12px 0; padding-left: 8px; border-left: 3px solid var(--accent); color: var(--label-2); font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 60px; overflow: hidden; }
.thread { overflow-y: auto; max-height: 288px; padding: 4px 12px; }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 8px; }
.who .meta { margin-left: auto; white-space: nowrap; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 9px/22px -apple-system, system-ui, sans-serif; text-align: center; flex: none; }
.body { white-space: pre-wrap; word-break: break-word; margin: 4px 0 0; }
.actions { display: flex; gap: 6px; padding: 6px 12px; border-top: 1px solid var(--line); align-items: center; }
.actions .meta { margin-right: auto; }
.composer, .reply { padding: 8px 12px 10px; }
.composer textarea, .reply textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--bg); color: var(--label); resize: vertical; }
.row { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.panel { position: absolute; top: 12px; right: 12px; z-index: 20; width: 340px; max-height: calc(100% - 24px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); }
.panel-head .row { margin: 0; }
.panel-tools { padding: 8px 12px 0; }
.panel .empty { margin: 0; padding: 14px 12px; }
.panel-list { overflow-y: auto; list-style: none; margin: 0; padding: 6px; }
.section { margin: 8px 0 2px; padding: 0 8px; color: var(--label-2); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.section-note { margin: 0 0 4px; padding: 0 8px; color: var(--label-3); font-size: 12px; }
.item { padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.item:hover { background: var(--surface-2); }
.item.active { border-color: var(--accent); }
.item.resolved { opacity: .6; }
.item .where { color: var(--label-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.item .body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--surface-2); color: var(--label-2); font-size: 11px; margin-left: 4px; }
.badge.public { background: var(--accent-fill); color: var(--accent); font-size: 11px; padding: 1px 6px; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.modal-card { width: 480px; max-width: 100%; max-height: 80vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px var(--shadow); padding-bottom: 8px; }
.share-section { padding: 4px 12px 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.share-section .section { padding: 0; margin: 8px 0 6px; }
.choice { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.choice input { margin-top: 3px; }
.field { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--bg); color: var(--label); }
.note { margin: 0 0 6px; }
.invite-new { margin-top: 8px; padding: 8px; border-radius: 8px; background: var(--accent-fill); }
.invite-list { list-style: none; margin: 8px 0 0; padding: 0; }
.invite-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.invite-list .who-col { flex: 1; min-width: 0; }
.invite-list .who-col div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.button.small { padding: 2px 8px; font-size: 12px; }
.hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 25; background: var(--label); color: var(--bg); padding: 6px 12px; border-radius: 999px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.plain { max-width: 720px; margin: 0 auto; padding: 32px 16px; }
.plain.center { text-align: center; padding-top: 18vh; }
.pages { list-style: none; padding: 0; } .pages li { padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 800px) { .panel { inset: 0; width: auto; max-height: none; border-radius: 0; } .popover { width: calc(100% - 16px) !important; } .watch-text, .version { display: none; } }
