/* Niu Board, part 2 of 2 (after board.css): task windows and the bottom bar, the Advisor, the queue, the full view. */
/* Task windows (#170): the half window on a computer, the dock of minimized tasks */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 6px; padding: 6px max(16px, env(safe-area-inset-left, 0px)) max(6px, env(safe-area-inset-bottom, 0px)); overflow-x: auto; background: var(--col); border-top: 1px solid var(--line); }
.docktab { flex: none; display: flex; align-items: center; width: 200px; max-width: 60vw; border: 1px solid var(--line); border-left: 3px solid var(--pc, var(--line)); border-radius: 6px; background: var(--card); }
.docktab button:first-child { min-width: 0; padding: 0 4px 0 9px; margin: 4px 0; max-height: 2.5em; font-size: 11.5px; line-height: 1.25; text-align: left; white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.docktab .tnum { font-size: 1em; }
.dockx { flex: none; width: 28px; height: 30px; color: var(--dim); }
.dockx:hover { color: var(--fg); }
/* The Advisor (#347): a panel on the right on a computer (windows and board keep clear of it), a sheet on the phone */
.advb { padding: 0 3px; }
.advb svg, .advw { color: var(--orange); }
.advb svg { width: 22px; height: 22px; display: block; }
.advb.on { border-color: var(--orange); }
.advw { font-weight: 700; }
@media (min-width: 761px) { .advw { display: none; } }
.adv { position: fixed; z-index: 45; background: var(--col); display: flex; flex-direction: column; font-size: 14px; }
.adv-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px; }
.adv-head b { font-size: 16px; }
.adv-head .icon { width: 32px; height: 32px; color: var(--dim); }
.adv-head .icon:first-of-type { margin-left: auto; }
.adv-logo svg { width: 24px; height: 24px; color: var(--orange); display: block; }
.adv-n { color: var(--dim); font-size: 12px; }
.adv-tabs { display: flex; gap: 6px; padding: 4px 14px 8px; flex-wrap: wrap; }
.adv-tabs button { border: 1px solid var(--line); border-radius: 14px; padding: 4px 11px; font-size: 13px; color: var(--dim); }
.adv-tabs button.on { color: var(--orange); background: var(--orange-soft); border-color: transparent; }
.adv-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 8px; }
.adv-task { color: var(--dim); font-size: 13px; line-height: 1.4; }
.adv-task b { color: var(--orange); }
.adv-prio { display: inline-block; border: 1px solid var(--orange); color: var(--orange); border-radius: 10px; padding: 0 7px; font-size: 11px; }
.adv-advice h5 { margin: 12px 0 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.adv-advice p { margin: 0; line-height: 1.45; }
.adv-old, .adv-empty, .adv-writing { color: var(--dim); font-style: italic; margin: 10px 0 0 !important; }
.adv-plan { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--orange) 50%, var(--line)); border-radius: 8px; background: var(--orange-soft); }
.adv-plan div { flex: 1; line-height: 1.35; }
.adv-plan b { color: var(--orange); }
.adv-plan small { display: block; color: var(--dim); font-size: 12px; }
.adv-chat { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.adv-chat:not(:has(*)) { display: none; }
.adv-msg { max-width: 88%; padding: 7px 10px; border-radius: 8px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: break-word; }
.adv-msg.me { align-self: flex-end; background: var(--card); }
.adv-msg.ai { align-self: flex-start; background: color-mix(in srgb, var(--orange) 16%, var(--card)); }
#advisor a { color: var(--orange); }
.adv-head .gear { margin-left: auto; } .adv-head .gear ~ .icon { margin-left: 0; } .adv-head .gear.on { color: var(--orange); }
.adv-set { padding: 4px 0 14px; display: flex; flex-direction: column; gap: 14px; }
.adv-set h6 { margin: 0 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.adv-set .seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.adv-set .seg button { flex: 1; padding: 7px 4px; font-size: 13px; color: var(--dim); border: 0; border-right: 1px solid var(--line); background: none; }
.adv-set .seg button:last-child { border-right: 0; } .adv-set .seg button.on { color: var(--orange); background: var(--orange-soft); }
.adv-set .chk { display: flex; flex-wrap: wrap; gap: 6px; }
.adv-set .chk label { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.adv-set .chk label.off { color: var(--dim); opacity: .6; } .adv-set .chk input { accent-color: var(--orange); margin: 0; }
.adv-set .chk i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.adv-set small { color: var(--dim); font-size: 12px; display: block; margin-top: 4px; }
.adv-set .rst { align-self: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.adv-ask { display: flex; gap: 8px; padding: 8px 14px 0; }
.adv-ask input { flex: 1; min-width: 0; height: 38px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; }
.adv-ask input:focus { border-color: var(--orange); outline: none; }
.adv-ask button { width: 40px; }
.adv-btns { display: flex; gap: 8px; padding: 8px 14px 12px; }
.adv-btns button { flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 8px; }
.adv-btns button:disabled { opacity: .4; }
.adv .adv-go { background: var(--orange); color: #1b1b1b; border-color: var(--orange); font-weight: 600; border-radius: 8px; padding: 0 12px; height: 36px; }
.adv-closelist { display: flex; flex-direction: column; }
.adv-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; line-height: 1.4; }
.adv-row input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
.adv-row b { color: var(--orange); }
.adv-row small { display: block; color: var(--dim); font-size: 12px; }
.adv-hide { position: absolute; left: -15px; top: 50%; width: 28px; height: 52px; margin-top: -26px; border: 1px solid var(--line); border-radius: 8px; background: var(--col); color: var(--dim); }
.adv-strip { position: fixed; z-index: 45; right: 0; bottom: 0; top: var(--advtop, 56px); width: 18px; background: var(--orange-soft); border-left: 2px solid var(--orange); }
.adv-strip span { position: absolute; right: 0; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 8px 0 0 8px; background: var(--col); border: 1px solid var(--orange); border-right: 0; padding: 3px; }
.adv-strip svg { width: 100%; height: 100%; color: var(--orange); display: block; }
@media (min-width: 761px) {
  .adv { right: 0; bottom: 0; top: var(--advtop, 56px); width: 380px; border-left: 2px solid var(--orange); }
  #lblbar, #tabs, #board { margin-right: calc(var(--br, 0px) + var(--advw, 0px)) !important; }
  .dock { right: var(--advw, 0px); }
}
@media (max-width: 760px) {
  .adv { left: 0; right: 0; bottom: 0; max-height: 80vh; border-top: 2px solid var(--orange); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .adv-strip { top: auto; bottom: calc(var(--dockh, 0px) + 70px); width: 36px; height: 40px; background: none; border: 0; }
  .adv-strip span { top: 0; margin: 0; width: 36px; height: 40px; }
}
/* Share → Niu Board (#199): which task gets the shared picture */
.list.sharepick { top: 70px; z-index: 47; max-height: calc(100% - 90px); }
.sharepick #share-q { width: 100%; height: 38px; margin: 6px 0; background: var(--bg); border: 1px solid var(--orange); border-radius: 6px; padding: 0 10px; font-size: 16px; }
.sp-pics { display: flex; gap: 6px; margin: 4px 0; }
.sp-pics img { height: 90px; max-width: 32%; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.sp-text { color: var(--dim); font-size: 13px; margin: 4px 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sharepick small { color: var(--orange); font-size: 11px; margin-left: 4px; }
/* The task bar (#340): the front task lit, minimized ones dimmed */
.dock { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.docktab.pin { background: color-mix(in srgb, var(--pc, var(--orange)) 42%, var(--card)); border-color: color-mix(in srgb, var(--pc, var(--orange)) 70%, var(--line)); opacity: 1; }
.docktab.pin button:first-child { color: var(--fg); font-style: normal; padding-right: 10px; }
.docktab.pin.on { box-shadow: inset 0 2px 0 var(--orange); }
.tabdragging .docktab { transition: transform .1s; }
.tabdragging, .tabdragging * { cursor: grabbing !important; }
.menu.docmenu { position: fixed; right: auto; width: 210px; z-index: 46; }
.menu.tabmenu { position: fixed; top: auto; right: auto; bottom: calc(var(--dockh, 46px) + 6px); width: 190px; z-index: 46; }
.docktab.on { border-color: var(--orange); border-left-color: var(--pc, var(--orange)); box-shadow: inset 0 2px 0 var(--orange); background: color-mix(in srgb, var(--orange) 10%, var(--card)); }
.docktab.on button:first-child { color: var(--fg); font-weight: 600; }
.docktab.min { opacity: .6; background: none; }
.docktab.min button:first-child { font-style: italic; }
@media (max-width: 760px) {
  .docked .panel:not(:has(:is(input, textarea, select, niu-box):focus)) { height: calc(var(--vh, 100%) - var(--dockh, 46px)); }
  .docked:has(.panel :is(input, textarea, select, niu-box):focus) .dock { display: none; }   /* only for the keyboard: a pressed button must not move the window (#453) */
}
.docked .board { padding-bottom: 56px; }
.maxb { display: none; }
.icon svg { vertical-align: middle; }
@media (min-width: 761px) {
  .maxb { display: inline-block; }
  /* Windows (#170): placed by windows.js under the top bar; the board keeps the free part */
  .panel.win { right: auto; bottom: auto; --side: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: none; padding-top: 0; padding-bottom: 0; }
  .panel.win.focus { border-color: color-mix(in srgb, var(--dim) 60%, var(--line)); }
  .panel.win .p-head, .panel.win .p-acts { cursor: grab; }
  .panel.win.dragging { z-index: 40 !important; opacity: .9; cursor: grabbing; transition: none; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
  #lblbar, #tabs, #board { margin-left: var(--bl, 0px); margin-right: var(--br, 0px); }
  #lblbar { margin-top: var(--bt, 0px); }
  #lblbar[hidden] + #board { margin-top: var(--bt, 0px); }
  #board { margin-bottom: var(--bb, 0px); }
  .boxed #board { overflow-x: auto; }
  .noboard #lblbar, .noboard #board { visibility: hidden; }
  #snapguide i { position: fixed; z-index: 39; opacity: .45; pointer-events: none; }
  #snapguide .v { left: 50%; top: var(--top); bottom: 0; border-left: 1px dashed var(--dim); }
  #snapguide .h { left: 0; right: 0; top: calc(var(--top) + (100vh - var(--top)) / 2); border-top: 1px dashed var(--dim); }
  #snapguide b { position: fixed; z-index: 39; pointer-events: none; border: 2px dashed var(--orange); border-radius: 12px; background: color-mix(in srgb, var(--orange) 14%, transparent); transition: all .12s ease-out; }
}
/* A task fills the whole browser area; its text stays in a readable centred width. */
.panel { --side: max(16px, env(safe-area-inset-left, 0px), calc((100vw - 860px) / 2)); position: fixed; top: var(--vtop, 0px); left: 0; right: 0; height: var(--vh, 100%); background: var(--bg); z-index: 30; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.panel > * { padding-left: var(--side) !important; padding-right: var(--side) !important; }
.p-head { flex: none; display: flex; gap: 8px; align-items: flex-start; padding-block: 12px 8px; position: relative; }
.p-head h3 { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.icon { flex: none; width: 40px; height: 40px; border-radius: 6px; font-size: 20px; line-height: 1; color: var(--dim); }
.icon:hover { background: var(--line); color: var(--fg); }
button:disabled { opacity: .5; cursor: progress; }
.place.shorten { margin-left: auto; }
.p-sub { flex: none; position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 16px 8px; font-size: 13px; color: var(--dim); }
.place { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; max-width: 100%; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); font-size: 13px; overflow-wrap: anywhere; text-align: left; }
.place:hover, .place[aria-expanded="true"] { border-color: var(--orange); }
.place svg { flex: none; color: var(--dim); }
.menu.picker { top: 100%; right: auto; left: var(--side); width: min(240px, calc(100vw - 32px)); max-height: 60vh; }
.p-acts { flex: none; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.p-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.newpill { position: sticky; bottom: 6px; align-self: center; margin-top: auto; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--orange); color: var(--on-orange); font: inherit; font-weight: 700; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); cursor: pointer; z-index: 2; }
.desc { color: var(--fg); overflow-wrap: anywhere; }
.comment { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.comment .who { font-size: 12px; color: var(--dim); }
.comment .ctools { margin-left: 6px; opacity: .75; }
.comment .ctools .linkbtn { font-size: inherit; }
.comment .cedit { display: block; min-height: 3em; padding: 6px 8px; border: 1px solid var(--line, #444); border-radius: 6px; }
.comment .who b { color: var(--fg); font-weight: 600; }
/* Your own comments in a soft dark orange (#167) */
.comment.mine .body, .comment.mine .who b { color: var(--mine); }
.comment.summary .body { color: var(--summary); }
/* #355 the task's Stan, pinned in the top card */
.p-top > .stan { margin: 0 12px 10px; padding: 7px 10px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 8px; font-size: 14px; }
.stan .st-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); min-width: 0; }
.stan .st-h b { color: var(--orange); font-weight: 600; }
.stan .st-t { margin-left: auto; }
.stan .st-h button { flex: none; width: auto; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); padding: 2px 8px; font: inherit; cursor: pointer; }
.stan .st-b { max-height: 30vh; overflow-y: auto; line-height: 1.4; overflow-wrap: anywhere; }
.stan .st-b ul, .stan .st-b ol { margin: 4px 0 0; padding-left: 18px; } .stan .st-b p { margin: 4px 0 0; }
.stan .st-one { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font-size: 13px; }
.comment .who i { color: var(--blue); font-style: normal; font-weight: 600; }
.comment p { margin: 0; overflow-wrap: anywhere; }
.comment img { border-radius: 6px; display: block; }
.compose { flex: none; display: flex; flex-direction: column; gap: 6px; }
.compose.panel-c { border-top: 1px solid var(--line); padding: 10px 16px; }
.compose textarea, .compose niu-box { width: 100%; min-height: 54px; resize: vertical; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 13px; display: block; }
.compose niu-box { max-height: 40vh; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; outline: none; }
.compose niu-box:focus { border-color: var(--orange); }
.compose niu-box:empty::before { content: attr(placeholder); color: var(--dim); pointer-events: none; }
.compose .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.compose .row span { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach, .send { height: 28px; border-radius: 6px; padding: 0 10px; font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; cursor: pointer; flex: none; position: relative; }
.attach { border: 1px solid var(--line); color: var(--dim); }
.attach:hover { color: var(--fg); }
.uploads:empty { display: none; }
.urow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; color: var(--dim); padding: 3px 0; }
.urow .uname { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.urow .uerr { color: var(--red); }
.urow .uok { color: var(--green); }
.urow .linkbtn { font-size: 12px; }
.ubar { flex: 1 0 100%; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ubar i { display: block; height: 100%; background: var(--orange); transition: width .2s; }
.urow.fail .ubar i { background: var(--red); }
.urow.done .ubar i { background: var(--green); }
.unattach { flex: none; color: var(--dim); padding: 0 6px; font-size: 15px; }
.unattach:hover { color: var(--fg); }
.attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attach:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.send { background: var(--orange); color: var(--on-orange); font-weight: 600; }

.menu { position: absolute; top: 52px; right: var(--side); width: 240px; max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px; z-index: 5; }
.menu h4 { margin: 6px 10px 2px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 4px; font-size: 14px; }
.menu button:hover { background: var(--line); }
.menu button.danger { color: var(--red); }
.menu.find { position: fixed; top: calc(46px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: auto; max-width: 520px; margin-left: auto; max-height: 75vh; padding: 6px; z-index: 50; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.menu.find form { display: flex; gap: 6px; align-items: center; }
#findq { flex: 1; min-width: 0; height: 36px; background: var(--bg); border: 1px solid var(--orange); border-radius: 6px; padding: 0 10px; font-size: 16px; }
.menu.find form .icon { width: 36px; height: 36px; padding: 0; text-align: center; flex: none; }
#findq::-webkit-search-cancel-button { display: none; }
#findres:not(:empty) { margin-top: 4px; }
#findres button { display: flex; gap: 6px; align-items: baseline; }
#findres .ft { flex: 1; min-width: 0; overflow-wrap: break-word; }
#findres small { flex: none; color: var(--dim); font-size: 12px; max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#findres .gone { opacity: .55; }
#findres p { margin: 8px 10px; color: var(--dim); font-size: 13px; }
#findres .pdot { flex: none; align-self: center; }
.briefset { padding: 4px 6px 6px; }
.briefset .brow { display: flex; gap: 6px; margin-top: 6px; }
.briefset input, .briefset select { min-width: 0; font: inherit; font-size: 14px; padding: 6px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; }
.briefset input { flex: 0 0 auto; }
.briefset select { flex: 1; }
.briefset .brow button { width: auto; flex: 1; text-align: center; border: 1px solid var(--line); }
.briefset .brow button.primary { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
.errlist { padding: 2px 6px 6px; }   /* #666: this device's last errors */
.errlist .err { padding: 6px 4px; border-top: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.errlist .errh, .errlist .errs { color: var(--dim); }
.errlist .errm { margin: 2px 0; }
.errlist .brow { display: flex; gap: 6px; margin-top: 6px; }
.errlist .brow button { width: auto; flex: 1; text-align: center; border: 1px solid var(--line); }

.list { position: fixed; top: 96px; right: 16px; width: min(380px, calc(100% - 32px)); max-height: 70%; overflow-y: auto; background: var(--col); border: 1px solid var(--line); border-radius: 8px; z-index: 30; padding: 8px; }
.list h3 { margin: 4px 8px 8px; font-size: 14px; font-weight: 600; }
.list button { display: block; width: 100%; text-align: left; padding: 10px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.list button:hover { background: var(--card); }
.list small { display: flex; gap: 0; color: var(--dim); font-size: 12px; white-space: nowrap; min-width: 0; }
.list small > * { flex: none; }
.list small > * + *::before { content: '·'; margin: 0 .35em; color: var(--dim); font-weight: 400; }
.list small .where { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.list small b { font-weight: 600; }
.list small b.late { color: var(--red); }
.list h4 { margin: 10px 8px 2px; font-size: 12px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
/* The "Your turn" queue (#447): one card at a time, in the middle on a computer, the whole screen on the phone */
.queue { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); max-height: calc(100% - 90px); overflow-y: auto; background: var(--col); border: 1px solid var(--line); border-radius: 8px; z-index: 30; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; resize: both; min-width: min(360px, calc(100% - 32px)); max-width: calc(100% - 32px); }
@media (pointer: coarse) { .queue { resize: none; } }
.queue .qhead { display: flex; align-items: center; }
.queue h3 { flex: 1; margin: 0; font-size: 14px; font-weight: 600; }
.queue .qx { width: 32px; height: 32px; font-size: 20px; color: var(--dim); border-radius: 6px; }
.queue .qparts { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--dim); }
.queue .qparts .on { color: var(--orange); font-weight: 600; }
.queue .rvcard { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 10px; border-radius: 6px; background: var(--card); border-left: 3px solid var(--pc); }
.queue .rvp { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.queue .rvp i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.queue .rvtitle { display: block; width: 100%; text-align: left; padding: 6px 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.queue .dnote { margin: 4px 0 8px; padding: .4em .6em; border-left: 2px solid var(--green); background: var(--green-soft); border-radius: 4px; font-size: 14px; line-height: 1.4; }
.queue .dnote b { font-weight: normal; margin-right: .2em; }
.queue .dnote .undo, .queue .dnote .none, .queue .none { color: var(--dim); }
.queue p.step { margin: 4px 0 8px; }
.queue .qtext { max-height: 40vh; overflow-y: auto; margin-bottom: 8px; font-size: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.queue .qtext .comment + .comment { margin-top: 8px; }
.queue .qtext p.step, .queue .qtext p.sugl { display: none; }   /* the step stands above, the suggestion is the green button */
.queue .quiet { color: var(--red); margin: 4px 0; }
.queue .quiet.amber { color: var(--orange); }
.queue .quiet.dim { color: var(--dim); }
.queue .rvcard.red { background: var(--stuck-bg); box-shadow: inset 0 0 0 1px var(--stuck-line); }   /* #610: blocked on him */
.queue .rvcard.amber { box-shadow: inset 0 0 0 1px var(--orange); }
.queue .compose { margin-top: 4px; }
.queue .qacts { display: flex; flex-wrap: wrap; gap: 6px; }
.queue .qacts button { flex: 1 1 0; min-width: 70px; min-height: 44px; text-align: center; padding: 8px 6px; border: 1px solid var(--line); border-radius: 6px; }
.queue .qacts .qdone { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
.queue .qacts .sug { background: var(--green); color: var(--on-dot); border-color: var(--green); }
.queue .qacts .qskip { flex: 0 1 auto; color: var(--dim); }
.queue .qfoot { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.queue .qfoot button { min-width: 36px; height: 32px; padding: 0 8px; border-radius: 6px; color: var(--dim); }
.queue .qfoot button:hover, .queue .qx:hover { background: var(--card); color: var(--fg); }
.queue .qkeys { flex: 1; text-align: center; }
.queue .rvempty { margin: 8px 0; }
/* the Your step line on a To-Do card with Needs (#447), like the done note but orange-edged */
.card .stepl { margin: .35em 0 .1em; padding: .35em .55em; border-left: 2px solid var(--orange); background: color-mix(in srgb, var(--orange) 9%, transparent); border-radius: 4px; font-size: .84em; line-height: 1.35; overflow-wrap: anywhere; }
.list .rvswitch { margin-top: 6px; text-align: center; font-size: 13px; color: var(--dim); }
.rvempty { margin: 8px; color: var(--dim); }
.list small b.today { color: var(--orange); }

.pull { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 40; background: var(--card); border: 1px solid var(--orange); color: var(--fg); border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.pull[hidden] { display: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: max-content; max-width: calc(100% - 32px); z-index: 40; background: var(--fg); color: var(--bg); border-radius: 8px; padding: 8px 12px; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.toast button { font-weight: 600; color: var(--bg); text-decoration: underline; min-height: 28px; }

@media (min-width: 761px) {
  .bar { order: 0; flex: 1 1 0; }
  .board { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
@media (max-width: 760px) {
  .tabs { display: flex; }
  .board { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  header { margin-bottom: 8px; column-gap: 10px; }
  .bar { display: contents; }
  .brand { display: none; }
  header { column-gap: 6px; }
  .allc { margin-left: auto; }
  .projects { order: 5; flex: 1 1 100%; }
  .dots { order: 6; flex: 1 1 100%; flex-wrap: wrap; margin-left: 0; }
  .dot { flex: 1 1 auto; padding: 0 4px; }   /* never narrower than its text; a row too full wraps (#716) */
  .grip { display: none; }
  .card { font-size: 14px; }
  .column { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; border: 0; border-radius: 0; background: transparent; }
  .column h2 { display: none; }
  .stack { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .seg button { height: 32px; padding: 0 9px; font-size: 13px; }
  .chev { width: 32px; height: 32px; }
  .attach, .send { height: 32px; }
  /* 16px stops iPhones zooming in on a field; while typing, the free space goes to the text. */
  input, textarea, .compose textarea, .thread .compose textarea, .compose niu-box, .thread .compose niu-box, .edit niu-box { font-size: 16px; }
  .typing header, .typing .tabs, .typing .p-sub, .typing .p-acts { display: none; }
  .typing .panel { padding-bottom: 0; }
  .typing .p-head { padding-block: 4px 0; }
  .typing .p-head h3 { align-self: center; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .list { top: auto; left: 0; right: 0; bottom: 0; width: 100%; border-radius: 12px 12px 0 0; border-width: 1px 0 0; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .queue { top: 0; bottom: 0; left: 0; transform: none; width: 100%; max-height: none; border: 0; border-radius: 0; padding: calc(8px + env(safe-area-inset-top, 0px)) 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .queue .qkeys { visibility: hidden; }
  /* #671: only the card scrolls, the buttons stay at the bottom; the filter chips fold under one button */
  .queue .rvcard { flex: 1 1 auto; }
  .queue .qtext { max-height: none; overflow: visible; }
  .queue .qacts { flex-wrap: nowrap; }
  .queue .qacts button { min-width: 0; padding: 8px 4px; }
  /* #612: the tab bar (z 35) sits on the same edge: sheets stand on it, not behind it */
  .docked .list { bottom: var(--dockh, 46px); max-height: calc(70% - var(--dockh, 46px)); padding-bottom: 8px; }
  .docked .queue { bottom: var(--dockh, 46px); padding-bottom: 12px; }
  .card .stepl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: no-preference) {
  .panel { animation: slide .16s ease-out; }
  .card.hl { animation: breathe 1.5s ease-in-out 4; }
  @keyframes breathe { 50% { box-shadow: 0 0 0 2px var(--orange), 0 0 0 7px var(--orange-soft); } }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } }
}

.comment p, .desc p { margin: 0 0 .4em; }
.comment ul, .comment ol, .desc ul, .desc ol { margin: .2em 0; padding-left: 1.4em; }
.comment h1, .comment h2, .comment h3, .comment h4 { font-size: 1.05em; margin: .3em 0; }
.comment a, .desc a { color: var(--orange); }
.code { position: relative; margin: .4em 0; }
.code pre { margin: 0; padding: 8px 10px; padding-top: 34px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; font: 12px/1.45 var(--mono); }
.copy { position: absolute; top: 5px; right: 5px; height: 24px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); font-size: 12px; font-weight: 500; }
.copy:hover { border-color: var(--orange); }
.body { min-width: 0; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
button.filechip:hover, a.filechip[role]:hover { color: var(--fg); }
.filechip small { opacity: .75; }
.lblbar { flex: none; display: flex; gap: 6px; align-items: center; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.lblbar[hidden] { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 13px; font-size: 12px; color: var(--fg); background: var(--card); white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.chip b { font: 600 11px var(--mono); color: var(--dim); }
.chip.on { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.p-tags { flex: none; padding: 0 16px 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .8em; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
/* All (#169): the card's project, and the project picker of a new task */
.pchip { display: flex; align-items: center; gap: 5px; font-size: .8em; color: var(--dim); min-width: 0; overflow-wrap: anywhere; }
.pchip i { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.quick { gap: 6px; }
.quickp { flex: none; max-width: 40%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; font-size: 13px; color: var(--fg); }
.chip.proj i { border-radius: 2px; }
.lblbar .sep { flex: none; width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.tag.needs { background: var(--orange); border-color: var(--orange); color: var(--on-orange); font-weight: 600; }
.tag.mine { border-color: var(--orange); color: var(--orange); font-weight: 600; }
p.step { margin-top: 6px; padding: 7px 10px; border-left: 3px solid var(--orange); background: color-mix(in srgb, var(--orange) 9%, transparent); border-radius: 4px; }
select.filepick { max-width: 9em; appearance: none; -webkit-appearance: none; background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
select.filepick option { background: var(--card); color: var(--fg); }
a.filechip.inline { display: inline-block; cursor: pointer; text-decoration: none; margin: 2px 0; }
a.filechip.gone { cursor: default; text-decoration: line-through; color: var(--dim); opacity: .7; }
.fileitem { display: inline-flex; align-items: stretch; max-width: 100%; }
.fileitem .filechip { border-radius: 5px 0 0 5px; }
.fileact { min-width: 28px; padding: 0 6px; border: 1px solid var(--line); border-left: 0; font-size: 12px; color: var(--dim); }
.fileact:last-child { border-radius: 0 5px 5px 0; }
.fileact:hover { color: var(--orange); }
.archive { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.archhead { align-self: flex-start; display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--dim); }
.archhead[aria-expanded="true"] svg { transform: rotate(180deg); }
.edit { display: flex; flex-direction: column; gap: 6px; }
.edit input, .edit textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
.edit textarea { min-height: 120px; resize: vertical; }
.edit niu-box { display: block; width: 100%; min-height: 120px; max-height: 60vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; cursor: text; outline: none; }
.edit niu-box:focus { border-color: var(--orange); }
.edit niu-box:empty::before { content: attr(placeholder); color: var(--dim); pointer-events: none; }
.edit niu-box img { display: inline-block; width: 44px; height: 30px; background: var(--line); border-radius: 4px; vertical-align: middle; }
.login { margin: auto; width: min(340px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 10px; }
.login h1 { margin: 0 0 6px; font-size: 18px; color: var(--orange); }
.login input { background: var(--col); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; width: 100%; }
.login .send { height: 38px; justify-content: center; }
.login p { margin: 0; color: var(--red); font-size: 13px; }
.login .part { display: flex; flex-direction: column; gap: 10px; }
.login .ask { color: var(--fg); font-size: 14px; }
.linkbtn { color: var(--dim); font-size: 13px; text-decoration: underline; padding: 6px; }
.linkbtn:hover { color: var(--fg); }
header { position: relative; }
#addmenu { top: 46px; right: auto; z-index: 40; }
.presses { padding: 6px 10px; font-size: 13px; color: var(--dim); }
.presses summary { cursor: pointer; }
.presses div { display: flex; justify-content: space-between; padding: 2px 0; }
.presses b { color: var(--orange); font-weight: 600; }
#acctmenu { top: 46px; right: max(16px, env(safe-area-inset-right, 0px)); z-index: 40; }
.menulink { display: block; padding: 9px 10px; border-radius: 4px; font-size: 14px; color: var(--fg); text-decoration: none; }
.menulink:hover { background: var(--line); }
/* The rounded head of the full view (#168) */
.p-top > * { padding-left: 14px; padding-right: 14px; }
.p-top .p-acts { border-bottom: 0; padding-bottom: 10px; display: flex; align-items: center; gap: 8px; position: relative; }
.p-top .p-acts .acts { flex-wrap: nowrap; }
.wbtns { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.wbtns .icon { width: 34px; height: 34px; font-size: 18px; }
.wbtns .tbtn { width: auto; min-width: 30px; height: 30px; margin: 0 4px 0 0; font-size: 14px; }
@media (max-width: 760px) { .p-top .p-acts { flex-wrap: wrap; row-gap: 6px; } }
@media (max-width: 400px) { .wbtns .icon { width: 28px; } .p-top .p-acts { gap: 4px; } .p-top .p-acts .seg button { padding: 0 6px; white-space: nowrap; } }
.p-top .p-acts .menu { top: 100%; right: 8px; }
.wbtns .spb { display: none; }
.p-top .menu { right: 8px; }
.p-top .menu.picker { left: 8px; }
.p-sub .short, .menu .phoneonly { display: none; }
/* The full view on a phone (#173): buttons in a row above the title, one short line for place and date */
@media (max-width: 760px) {
  .p-top .p-head { flex-wrap: wrap; gap: 2px; padding-block: 6px 4px; }
  .p-top .p-head h3 { order: 2; flex-basis: 100%; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .p-top .p-sub { flex-wrap: nowrap; gap: 6px; font-size: 12px; padding-bottom: 6px; white-space: nowrap; }
  .p-top .p-sub > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* not the row: it holds the pickers (#198) */
  .p-top .p-sub .place { min-height: 26px; font-size: 12px; padding: 0 6px; }
  .p-top .p-sub .long, .p-top .p-sub .shorten { display: none; }
  .p-top .p-sub .short, .menu .phoneonly { display: inline; }
  .menu .phoneonly button { display: block; width: 100%; }
  .p-top .p-tags { padding-bottom: 6px; font-size: 12px; }
  .p-top .p-acts { padding-bottom: 8px; gap: 4px; }
  .wbtns .refb { display: none; }
  .wbtns .spb { display: inline-block; }
  .wbtns .icon { width: 32px; }
  .wbtns .tbtn { height: 28px; font-size: 13px; margin-right: 2px; }
  .panel > .p-top { margin-top: 6px; }
  .typing .panel > .p-top { margin-top: 2px; }
}

/* #457: ▶ Session's list: running card conversations only */
#addmenu.sessmenu { width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.sessmenu .srow { display: flex; align-items: center; gap: 6px; width: 100%; }
.sessmenu .sopen { display: flex; width: auto; align-items: center; gap: 4px; flex: 1; min-width: 0; padding: 8px 10px; border-radius: 4px; text-align: left; }
.sessmenu .sbtn { flex: none; width: auto; text-align: center; min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; color: var(--fg); text-decoration: none; }
.sessmenu .sbtn:hover { border-color: var(--orange); }
.sessmenu .sbtn.off { opacity: .4; cursor: default; }
.sessmenu .srow + .srow { border-top: 1px solid var(--line); }
.sessmenu .srow .st { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sessmenu .srow .st small { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.sess .sproj { color: var(--dim); font-weight: 400; font-size: 12px; margin-left: 6px; }
/* #501 the archive before the newest Summary, the Summarize press, the summary draft */
.archline { margin: 6px 0 10px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--dim); font-size: 13px; }
.archline .linkbtn.hot { color: var(--orange); font-weight: 600; }
.comment.arch { opacity: .55; }
.sumdraft { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 8px; }
.sumdraft .who { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.sumdraft .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* Markdown file window (#579) */
.mdwin .p-head h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdwin .mdsub { color: var(--dim); font-size: 12px; flex: 1; }
.mdwin .mdbody { display: block; }
.mdwin .mdwait, .mdwin .mderr { color: var(--dim); }
.mdwin .mderr { color: var(--red); }
.mdwin .mdtext { width: 100%; min-height: 100%; box-sizing: border-box; resize: none; background: var(--bg); color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.mdwin .mdsave { background: #f08c1c; color: #1a1a1a; border-color: #f08c1c; }
.md { line-height: 1.55; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 1.2em 0 .4em; line-height: 1.25; }
.md h1 { font-size: 1.6em; border-bottom: 1px solid var(--line); padding-bottom: .2em; }
.md h2 { font-size: 1.3em; border-bottom: 1px solid var(--line); padding-bottom: .15em; }
.md h3 { font-size: 1.12em; }
.md h4, .md h5, .md h6 { font-size: 1em; color: var(--dim); }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md table { margin: 0 0 .8em; }
.md ul, .md ol { padding-left: 1.5em; }
.md a { color: #f08c1c; }
.md code { background: color-mix(in srgb, currentColor 12%, transparent); border-radius: 4px; padding: .1em .35em; font: .9em ui-monospace, Menlo, Consolas, monospace; }
.md pre { background: var(--col); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 3px solid #f08c1c; margin-left: 0; padding: .1em 0 .1em 12px; color: var(--dim); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.md th { background: color-mix(in srgb, currentColor 8%, transparent); }
.mdwin .mdswap { display: none; font-weight: 700; }
@media (max-width: 760px) { .mdwin .mdswap { display: inline-block; } }
.mdwin.mded .mdbody { height: 100%; }
.mdwin.mded .mdtext { height: 100%; min-height: 240px; }
.mdwin .mdcheat { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 8px; max-height: 38%; overflow: auto; }
.mdwin .mdcheat button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--bg); color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; cursor: pointer; }
.mdwin .mdcheat code { color: #f08c1c; font-size: 12px; }
.mdwin .mdcheat span { color: var(--dim); font-size: 11px; }
.mdwin.mded .mdbody { display: flex; flex-direction: column; }
.mdwin.mded .mdtext { flex: 1; }
.mdwin .place.on { border-color: #f08c1c; color: #f08c1c; }
@media (max-width: 760px) { .mdwin .mdcheat { grid-template-columns: 1fr; } }
.qbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: none; }
.qbar .qfilter { flex: 1 0 100%; }
.qbar .qftog { display: none; align-items: center; margin-left: auto; padding: 3px 9px; font-size: 12px; color: var(--dim); border: 1px solid var(--line); border-radius: 12px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.qbar .qftog.on { color: var(--orange); border-color: var(--orange); }
.qbar .qfilter { display: flex; flex-wrap: wrap; gap: 6px; }
.qbar .qfilter button { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 12px; color: var(--dim); border: 1px solid var(--line); border-radius: 12px; white-space: nowrap; }
.qbar .qfilter button i { width: 7px; height: 7px; border-radius: 50%; }
.qbar .qfilter button.on { color: var(--orange); border-color: var(--orange); }
@media (max-width: 760px) { .qbar .qftog { display: inline-block; } .qbar .qfilter:not(.open) { display: none; } }   /* #671: one line on the phone */
/* GitHub's extras in the Markdown window (#587): alert boxes, folded parts, swatch, footnotes; red only where it warns */
.md .mdalert { color: inherit; border-left-color: var(--dim); background: color-mix(in srgb, currentColor 5%, transparent); border-radius: 0 6px 6px 0; padding: .4em .8em .1em 12px; }
.md .mdalert > :last-child { margin-bottom: .4em; }
.md .mdalert-t { font-weight: 700; margin: 0 0 .3em; }
.md .mdalert-note .mdalert-t { color: var(--dim); }
.md .mdalert-tip, .md .mdalert-important { border-left-color: #f08c1c; }
.md .mdalert-tip .mdalert-t, .md .mdalert-important .mdalert-t { color: #f08c1c; }
.md .mdalert-warning, .md .mdalert-caution { border-left-color: var(--red); }
.md .mdalert-warning .mdalert-t, .md .mdalert-caution .mdalert-t { color: var(--red); }
.md .mdalert-t::before { margin-right: .4em; }
.md .mdalert-note .mdalert-t::before { content: "ⓘ"; }
.md .mdalert-tip .mdalert-t::before { content: "💡"; }
.md .mdalert-important .mdalert-t::before { content: "❕"; }
.md .mdalert-warning .mdalert-t::before, .md .mdalert-caution .mdalert-t::before { content: "⚠"; }
.md details { margin: 0 0 .8em; border: 1px solid var(--line); border-radius: 8px; padding: .3em .8em; }
.md summary { cursor: pointer; font-weight: 700; }
.md details[open] summary { margin-bottom: .5em; }
.md ins { text-decoration: underline; }
.md ul.mdtasks { list-style: none; padding-left: .4em; }
.md mark { background: color-mix(in srgb, #f08c1c 35%, transparent); color: inherit; }
.md .mdswatch { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .3em; vertical-align: -.05em; border: 1px solid var(--line); }
.md .mdfnref a, .md .mdfnback { text-decoration: none; }
.md .mdfn { font-size: .88em; color: var(--dim); }
.md [data-slug] { scroll-margin-top: 8px; }
.mdwin .mdcheat h4 { grid-column: 1 / -1; margin: 6px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.mdwin .mdcheat h4:first-child { margin-top: 0; }
.sp-new { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sp-new b { flex: 1 0 100%; font-size: 13px; color: var(--orange); }
.sp-new input { flex: 1 0 100%; height: 38px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font-size: 16px; }
.sp-new select { flex: 1; min-width: 0; height: 38px; background: var(--bg); color: inherit; border: 1px solid var(--line); border-radius: 6px; font-size: 16px; }
.sp-old { margin: 10px 2px 0; font-size: 13px; color: var(--dim); font-weight: normal; }
/* #327: the reload bar (orange, a press) and the offline bar (gray) at the top, above every window */
.topbar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(6px + env(safe-area-inset-top, 0px)); z-index: 1001; width: max-content; max-width: calc(100% - 32px); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.topbar[hidden] { display: none; }
.newver { background: var(--orange); color: var(--on-orange); border: 0; cursor: pointer; font-weight: 700; }
.offbar { background: var(--card-hi); color: var(--fg); border: 1px solid var(--line); }
.newver:not([hidden]) + .offbar { top: calc(44px + env(safe-area-inset-top, 0px)); }
/* #631: a repeating card stuck on a used date */
.stall { background: var(--orange-soft); color: var(--orange); border: 1px solid var(--orange); border-radius: 8px; padding: 2px 8px; font: inherit; font-size: .85em; font-weight: 600; cursor: pointer; }
.meta .stall { margin: 2px 0; }
/* #676: Start automatically Off greys out the column buttons (still pickable, kept for On) */
.tpop .trauto { align-items: center; gap: 10px; } .tpop .trauto .tl { margin: 0; font-size: 14px; color: var(--fg); }
.tpop .trauto .seg2 { width: 120px; } .tpop .trauto .seg2 button { padding: 6px 0; } .tpop .toff { opacity: .5; }
