/* POWER board. Layout: sticky brand bar + view tabs, then one working view
   (day board, stage lists, task lists, or a project sheet). Theme: red / white / black. */

/* ---------- tokens ---------- */
:root {
  --bg: #f4f4f4; --surface: #ffffff; --sunk: #ececec; --fg: #0b0b0b; --muted: #5c5c5c; --line: #dcdcdc;
  --brand: #d90429; --brand-ink: #fff; --warn: #b00020; --warn-bg: #fde4e8;
  --ok: #1f7a45; --ok-bg: #e3f3e9; --amber: #9a5b00; --amber-bg: #fdf1dc;
  --f-body: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  --f-brand: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070707; --surface: #131313; --sunk: #1f1f1f; --fg: #f7f7f7; --muted: #a3a3a3; --line: #2e2e2e;
    --brand: #ff1f3d; --brand-ink: #fff; --warn: #ff7a8a; --warn-bg: #3a1016;
    --ok: #6fd39a; --ok-bg: #16301f; --amber: #f4b860; --amber-bg: #3a2a10; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070707; --surface: #131313; --sunk: #1f1f1f; --fg: #f7f7f7; --muted: #a3a3a3; --line: #2e2e2e;
  --brand: #ff1f3d; --brand-ink: #fff; --warn: #ff7a8a; --warn-bg: #3a1016;
  --ok: #6fd39a; --ok-bg: #16301f; --amber: #f4b860; --amber-bg: #3a2a10; color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box }
[hidden] { display: none !important }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14px; line-height: 1.6; margin: 0; direction: rtl }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface) }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1280px; margin: 0 auto }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }
select, input[type=time], input[type=text] { font: inherit; font-size: 12.5px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 6px; padding: 2px 4px; max-width: 100% }
input[type=time] { direction: ltr; width: 96px }
input[type=time].blank { border-style: dashed; border-color: var(--brand) }
main { padding-block: 18px 60px }
h2 { font-size: 22px; margin: 0 0 4px; text-wrap: balance }
.lead { color: var(--muted); margin: 0 0 16px; max-width: 75ch }
.off { color: var(--muted); font-size: 13px }
.empty { color: var(--muted); padding: 12px; font-size: 13px }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; animation: none !important; transition: none !important } .utoast .bar { display: none } }

/* ---------- header ---------- */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 4px solid var(--brand) }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; flex-wrap: wrap }
.brand { display: flex; align-items: center; gap: 10px; direction: ltr; line-height: 1; color: var(--fg); cursor: pointer; background: none; border: 0; padding: 0; font: inherit }
.brand .mki { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; display: block }
.brand .wmi { height: 34px; width: auto; display: block }
:root[data-theme="dark"] .brand .wmi { background: #fff; border-radius: 10px; padding: 4px 14px }
.vt { font-weight: 800; font-size: 16px; border-right: 1px solid var(--line); padding-right: 12px }
.status { margin-right: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block }
.status.live i { background: var(--ok) }
.status.ro i { background: var(--amber) }
.addbtn { border: none; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; border-radius: 999px; padding: 5px 14px; cursor: pointer }
.themebtn { font: inherit; font-size: 13px; border: 1.5px solid var(--fg); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-weight: 700 }
nav.tabs { display: flex; gap: 6px; overflow-x: auto; padding-block: 0 10px; scrollbar-width: thin }
nav.tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 6px }
nav.tabs button .sw { width: 9px; height: 9px; border-radius: 3px }
nav.tabs button[aria-current="true"] { background: var(--brand); color: #fff; border-color: var(--brand) }
nav.tabs .div { flex: none; width: 1px; background: var(--line); margin: 4px 2px }

/* ---------- admin messages (between the tabs and the page) ---------- */
.msgs { display: grid; gap: 8px }
.msg-card { background: var(--surface); border: 1px solid var(--line); border-right: 4px solid var(--brand); border-radius: 10px; padding: 10px 14px; display: flex; gap: 12px; align-items: flex-start }
.msg-card .mbody { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px }
.msg-card .mmeta { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px }
.msgform { display: flex; gap: 8px; align-items: flex-end }
.msgform textarea { flex: 1; font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; min-height: 44px }
.msgform button { font: inherit; font-weight: 700; border: none; background: var(--brand); color: var(--brand-ink); border-radius: 10px; padding: 8px 16px; cursor: pointer }
.msgform button:disabled { opacity: .6 }

/* ---------- day board + lists ---------- */
.notice { background: var(--surface); border: 1px solid var(--line); border-right: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px }
.notice b { color: var(--brand) }
.daynav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px }
.daynav button, .btn { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 5px 12px; cursor: pointer }
.daynav .big { font-size: 20px; font-weight: 800; min-width: 0 }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0 }
.sec h3 { margin: 0; font-size: 14px; padding: 9px 12px; background: var(--sunk); display: flex; justify-content: space-between; align-items: center }
.sec h3 small { color: var(--muted); font-weight: 500 }
.toolrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px }
.datehead { margin: 18px 0 8px; padding: 6px 12px; border-radius: 10px; background: var(--sunk); font-weight: 800; font-size: 14px; display: flex; gap: 10px; align-items: center }
.datehead small { color: var(--muted); font-weight: 500 }
.datehead .cnt { margin-inline-start: auto }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 8px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }

/* ---------- cards ---------- */
.card { display: flex; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); align-items: flex-start; margin: 0 }
.card:first-of-type { border-top: none }
.stripe { width: 4px; align-self: stretch; border-radius: 3px; flex: none }
.cbody { flex: 1; min-width: 0 }
.card .cbody { padding: 8px 12px }
.ctop { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px }
.pname { background: var(--pc, #444); color: #fff; padding: 1px 9px; border-radius: 999px; font-weight: 700; font-size: 12px }
.ctopic { font-size: 13.5px; margin: 2px 0 4px }
.tcard .ctopic { font-weight: 700 }
.cmeta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--muted) }
.cmeta label { display: flex; align-items: center; gap: 4px }
.card .cmeta select, .card .cmeta input[type=time] { padding: 3px 6px; font-size: 12.5px; max-width: 132px }
.pubd { color: var(--muted); font-size: 11.5px }
.chk { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; color: var(--fg) }
.chk input { width: 16px; height: 16px; accent-color: var(--ok) }
.done .ctopic { text-decoration: line-through; color: var(--muted) }
.warn { color: var(--warn); background: var(--warn-bg); font-size: 11.5px; padding: 1px 7px; border-radius: 6px; display: inline-block; margin-top: 4px }
.tag { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap }
.tag.catch { background: var(--brand); color: var(--brand-ink) }
.tag.ai { background: var(--amber-bg); color: var(--amber) }
.tag.new { background: var(--ok-bg); color: var(--ok) }
.tag.role { background: var(--sunk); color: var(--fg) }
.tag.prio-f, .tag.late { background: var(--warn-bg); color: var(--warn) }
.tag.prio-m { background: var(--amber-bg); color: var(--amber) }
.del, .reset { font: inherit; font-size: 11px; border: none; background: none; cursor: pointer; padding: 0; text-decoration: underline }
.del { color: var(--warn) }
.reset { color: var(--brand) }

/* ---------- hand-over ---------- */
.hand { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 12px }
.hand.ok { color: var(--ok) }
.hand.wait { color: var(--amber) }
.hbtn { font: inherit; font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--brand); background: var(--surface); color: var(--brand); border-radius: 999px; padding: 3px 12px; cursor: pointer }
.hbtn:hover { background: var(--brand); color: var(--brand-ink) }
.hbtn.undo { border-color: var(--line); color: var(--muted); font-weight: 500; font-size: 11.5px; padding: 1px 9px }
.hbtn.undo:hover { background: var(--sunk); color: var(--fg) }
.hrow { display: flex; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); align-items: flex-start }
.sec .hrow:first-of-type { border-top: none }
nav.tabs .tcnt { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 11px; font-weight: 800; min-width: 18px; padding: 0 5px; text-align: center }
nav.tabs button[aria-current="true"] .tcnt { background: #fff; color: var(--brand) }

/* ---------- project sheet ---------- */
.pbanner { border-radius: 14px; padding: 16px 18px; color: #fff; margin-bottom: 14px; display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end }
.pbanner .pb-brand { font-family: var(--f-brand); letter-spacing: 4px; font-size: 16px; opacity: .85; direction: ltr }
.pbanner h2 { font-size: 26px; color: #fff; margin: 2px 0 }
.pbanner .meta { font-size: 13px; opacity: .9 }
.pbanner .stats { margin-right: auto; display: flex; gap: 10px; flex-wrap: wrap }
.pbanner .stats div { background: rgba(255, 255, 255, .14); border-radius: 8px; padding: 5px 10px; font-size: 12px }
.pbanner .stats b { font-size: 18px; margin-left: 4px }
.tw { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px }
table.sheet { border-collapse: collapse; width: 100%; min-width: 1080px; font-size: 12.5px; font-variant-numeric: tabular-nums }
table.sheet th { position: sticky; top: 0; background: var(--pc); color: #fff; text-align: right; padding: 7px 6px; font-weight: 700; white-space: nowrap }
table.sheet td { border-top: 1px solid var(--line); padding: 6px; vertical-align: top }
table.sheet td.n { font-weight: 800; color: var(--pc); text-align: center }
table.sheet tr.catch td { background: color-mix(in srgb, var(--brand) 7%, transparent) }
table.sheet tr.next td { color: var(--muted) }
.cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start }
.cell .sub { font-size: 11px; color: var(--muted); line-height: 1.35 }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 0 }
.legend span { display: flex; gap: 5px; align-items: center }

/* ---------- modal ---------- */
.mback { overscroll-behavior: contain; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px }
.modal { background: var(--surface); color: var(--fg); border-radius: 14px; max-width: 640px; width: 100%; padding: 18px; border: 1px solid var(--line); direction: rtl }
.modal h3 { margin: 0 0 12px; font-size: 17px }
.acc { display: flex; flex-direction: column; gap: 6px; align-items: flex-start }
.frm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px }
.frm .full { grid-column: 1 / -1 }
.frm label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); min-width: 0 }
.frm input { font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 100% }
.mact { display: flex; gap: 8px; justify-content: flex-start; margin-top: 14px }
.mact .primary { background: var(--brand); color: var(--brand-ink); border: none; font-weight: 700 }
.mact button { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 6px 16px; cursor: pointer }
.msg { color: var(--warn); font-size: 12.5px; margin-top: 8px; min-height: 18px }

/* ---------- login ---------- */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 50% 0, rgba(217, 4, 41, .22), transparent 55%), var(--bg) }
#login .lbox { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: 18px; padding: 26px 22px; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .18) }
#login img { width: 112px; height: 112px; border-radius: 24px; display: block; margin: 0 auto 10px; box-shadow: 0 8px 24px rgba(217, 4, 41, .35) }
#login h1 { margin: 0 0 2px; font-family: var(--f-brand); font-size: 34px; letter-spacing: 6px; color: var(--fg) }
#login p { margin: 0 0 16px; color: var(--muted); font-size: 13px }
#login label { display: flex; flex-direction: column; gap: 4px; text-align: right; margin-bottom: 12px; font-size: 12.5px; color: var(--muted) }
#login input { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; direction: ltr; text-align: left }
#login button { width: 100%; font: inherit; font-weight: 800; font-size: 15px; background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 11px; cursor: pointer; margin-top: 4px }
#login button:disabled { opacity: .6 }
#login .lerr { min-height: 20px; color: var(--warn); font-size: 13px; margin-top: 8px }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr }
  .vt { font-size: 14px }
  .frm { grid-template-columns: 1fr }
  .brand .mki { width: 34px; height: 34px }
  .brand .wmi { height: 26px }
}

/* finished items of a day: collapsed group under the open ones */
.donegrp{margin-top:8px}
.donegrp>summary{cursor:pointer;color:var(--muted,#6b7280);font-size:.9em;padding:6px 2px}
.donegrp[open]>summary{margin-bottom:6px}

/* who edits the project (edit tab) */
.editor { margin-top: 6px; font-size: 13px }
.editor select { font: inherit; font-size: 13px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg) }

/* «افراد» tab: names grouped by stage */
.pgroups { display: grid; gap: 10px; margin: 12px 0 16px }
.pgroup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.pgroup > b { min-width: 96px; font-size: 13px; color: var(--muted) }
.pchip { font: inherit; font-size: 13.5px; display: inline-flex; gap: 7px; align-items: center; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 5px 13px }
.pchip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 700 }
.pchip .tcnt { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 11px; font-weight: 800; min-width: 18px; padding: 0 5px; text-align: center }
.pchip .tcnt.zero { background: var(--sunk); color: var(--muted) }
.pchip[aria-pressed="true"] .tcnt { background: #fff; color: var(--brand) }

/* new task for one person (people tab) */
.newtask { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--sunk) }
.newtask > b, .newtask .wide, .newtask .err, .newtask button { grid-column: 1 / -1 }
.newtask label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted) }
.newtask input, .newtask select { font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px }
.newtask .err { color: var(--warn); font-size: 12.5px; min-height: 0 }
.newtask button { justify-self: start; font: inherit; font-weight: 700; border: none; background: var(--brand); color: var(--brand-ink); border-radius: 10px; padding: 7px 18px; cursor: pointer }
.newtask button:disabled { opacity: .6 }

/* people tab: responsibility + collapsible projects */
.pdetail { display: grid; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line) }
.presp { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted) }
.presp input, .pnote textarea { font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; width: 100%; box-sizing: border-box }
.pprojs { display: grid; gap: 6px }
.pproj { border: 1px solid var(--line); border-radius: 10px; background: var(--surface) }
.pproj > summary { cursor: pointer; padding: 8px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.pproj .sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block }
.pbody { display: grid; gap: 8px; padding: 4px 12px 12px }
.pstats, .pticks { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.pnote { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted) }
.mynotes { background: var(--surface); border: 1px solid var(--line); border-right: 4px solid var(--brand); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px }
.mynotes > summary { cursor: pointer; font-weight: 700 }
.mynotes .mn { margin-top: 6px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere }

/* extra description per project and stage */
.snote { margin-top: 6px; font-size: 13px }
.snote > summary { cursor: pointer; color: var(--muted) }
.snote textarea { width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px }
.snote-ro { margin-top: 6px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); border-radius: 8px; padding: 6px 10px }

/* scoped descriptions */
.sn-item { display: grid; gap: 4px; margin-top: 6px }
.sn-item textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px }
.snform { display: grid; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line) }
.snform select { font: inherit; font-size: 13px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg) }
.snform .sn-days, .snform .sn-weekly { display: none; gap: 6px; flex-wrap: wrap; align-items: center }
.snform[data-mode="days"] .sn-days, .snform[data-mode="weekly"] .sn-weekly { display: flex }
.sn-chip { cursor: pointer; display: inline-flex; border: 1px solid var(--line); background: var(--sunk); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; margin-inline-end: 4px }
.snform button[type=submit] { justify-self: start; font: inherit; font-weight: 700; border: none; background: var(--brand); color: var(--brand-ink); border-radius: 10px; padding: 6px 16px; cursor: pointer }
.snform textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px }
.snform .err { color: var(--warn); font-size: 12.5px }

.sn-view { display: grid; gap: 4px }
.sn-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px }
.sn-actions { display: flex; gap: 8px; align-items: center }
.sn-editbox { display: none }
.sn-item.editing .sn-view { display: none }
.sn-item.editing .sn-editbox { display: block }
.snform .ghost { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 10px; padding: 6px 14px; cursor: pointer }

.editbox { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; font-size: 13px }
.editbox summary { cursor: pointer; font-weight: 700; color: var(--brand) }
.editbox label { display: grid; gap: 3px; margin-top: 6px }
.editbox input, .editbox textarea, .editbox select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); width: 100%; box-sizing: border-box }

.psearch { margin: 8px 0 }
.psearch input, .daynav .jump { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg) }
.psearch input { width: 100%; max-width: 360px; box-sizing: border-box }

.donegrp.undone summary { color: var(--warn) }

nav.tabs { flex-wrap: wrap; overflow-x: visible }
nav.tabs .tabsel { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); max-width: 46vw; cursor: pointer }
nav.tabs .tabsel[aria-current="true"] { background: var(--brand); color: #fff; border-color: var(--brand) }
nav.tabs .tabsel[aria-current="true"] option { background: var(--surface); color: var(--fg) }

.more { margin-top: 8px; font-size: 13px }
.more > summary { cursor: pointer; color: var(--muted, #777); font-weight: 700; padding: 4px 0 }
.more .morebody { display: grid; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line) }
.more .editbox { border-top: none; margin-top: 0; padding-top: 0 }

#undoRoot { position: fixed; inset-inline: 0; bottom: 14px; display: grid; gap: 8px; justify-items: center; z-index: 60; pointer-events: none; padding: 0 12px }
.utoast { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 14px; background: var(--fg); color: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25) }
.utoast button { font: inherit; font-weight: 800; border: none; background: transparent; color: inherit; text-decoration: underline; cursor: pointer; padding: 4px 8px; min-height: 32px }
.utoast .bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--brand); transform-origin: right; animation: undobar linear forwards }
@keyframes undobar { to { transform: scaleX(0) } }
.mact .danger { background: var(--brand); color: var(--brand-ink); border: none; font-weight: 700 }

/* ---------- accessibility: readable sizes, bigger touch targets, visible focus ---------- */
summary:focus-visible, a:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }
.msg-card .mmeta, .pubd, .warn, .hbtn.undo { font-size: 12.5px }
.tag, nav.tabs .tcnt, .pchip .tcnt, .cell .sub { font-size: 12px }
.chk { font-size: 13px }
.del, .reset { font-size: 12.5px; padding: 6px 4px }
@media (pointer: coarse) {
  nav.tabs button, nav.tabs .tabsel, .daynav button, .daynav .jump, .addbtn, .pchip, .mact button, .del, .reset, summary { min-height: 40px }
  select, input[type=time], input[type=text], input[type=search], textarea { font-size: 16px; min-height: 40px; padding: 4px 8px }
  .chk { min-height: 40px }
  .chk input { width: 22px; height: 22px }
  .more > summary, .snote > summary { display: flex; align-items: center }
}
