/* Robbie PRO Tasks. Brand book v1.0: Night, Lavender, White and their 80/60/40/20 tints. FbBooster for text,
   Matritsa for numbers. Robbie's exception for this tool: a white page always, and four status lights. */
@font-face { font-family: "FbBooster"; src: url("/fonts/FbBooster-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "FbBooster"; src: url("/fonts/FbBooster-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "FbBooster"; src: url("/fonts/FbBooster-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "FbBooster"; src: url("/fonts/FbBooster-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Matritsa"; src: url("/fonts/FbMatritsaNarrowEnHeb-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light only;
  --night: #12191c; --n80: #3a4043; --n60: #717577; --n40: #a0a3a4; --n20: #d0d1d2;
  --lav: #9d8ac1; --l80: #b1a1cd; --l60: #c4b9da; --l40: #d8d0e6; --l20: #ebe8f3;
  --hair: rgba(18, 25, 28, 0.1);
  --green: #1fb45a; --yellow: #f2b300; --red: #e5484d;
  --out: cubic-bezier(0.16, 1, 0.3, 1);     /* power4.out */
  --inout: cubic-bezier(0.65, 0, 0.35, 1);  /* power3.inOut */
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--night);
  font: 400 16px/1.4 FbBooster, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }
.muted { color: var(--n60); }
.hint { color: var(--n60); font-size: 13px; margin: 8px 0 0; }
.num { font-family: Matritsa, FbBooster, sans-serif; font-weight: 900; letter-spacing: 0.02em; font-feature-settings: "tnum"; }

/* icons: Night line, one lavender detail */
.ic { flex: none; display: block; }
.ic .ia { stroke: var(--lav); }
.ic.flip { transform: scaleX(-1); }
.ic.flag { display: inline-block; color: var(--lav); vertical-align: -2px; margin-inline-start: 6px; }
.ic.lav { color: var(--lav); }

/* eyebrow: English, Medium, tracked, lavender (brand book p.34) */
.eyebrow { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lav); line-height: 1.2; }

/* ---------- the four lights ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--n20); }
.dot-green { background: var(--green); box-shadow: 0 0 0 3px rgba(31, 180, 90, 0.16), 0 0 10px rgba(31, 180, 90, 0.45); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 0 3px rgba(242, 179, 0, 0.16); }
.dot-red { background: var(--red); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.14); }
.dot-gray { background: var(--n20); }
.dot-now { background: var(--lav); }
.dot-done { background: transparent; box-shadow: inset 0 0 0 1.5px var(--n40); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 26px; width: auto; display: block; }
.brand-sep { width: 1px; height: 22px; background: var(--n20); }
.brand-name { font-weight: 900; font-size: 19px; }

/* split-flap counters: Night 80% tile, cut line in the middle, Matritsa digits (one board per page) */
.flaps { display: flex; gap: 10px; margin-inline-start: auto; }
.flap { display: flex; align-items: center; gap: 7px; transition: opacity 0.24s; }
.flap.off { opacity: 0.32; }
.flap.off .dot { box-shadow: none; }
.tile { position: relative; display: inline-block; min-width: 30px; padding: 4px 5px 3px; border-radius: 4px; background: var(--n80); color: #fff; font: 900 18px/1 Matritsa, sans-serif; letter-spacing: 0.06em; text-align: center; }
.tile::after { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: var(--night); }
.focus-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--n20); font-size: 14px; font-weight: 500; transition: border-color 0.24s, background 0.24s, color 0.24s; }
.focus-btn:hover { border-color: var(--lav); }
.focus-btn.on { background: var(--night); border-color: var(--night); color: #fff; }

/* lists: outline pills, the chosen one in lavender (brand book p.82) */
.lists { display: flex; gap: 6px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
.lists::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--n20); background: #fff; font-size: 14px; font-weight: 500; transition: border-color 0.24s, background 0.24s; }
.chip:hover { border-color: var(--lav); }
.chip.on { background: var(--lav); border-color: var(--lav); color: var(--night); }
.chip.on .ic .ia, .chip.on .ic.flag, .chip.on .ic { color: var(--night); stroke: currentColor; }
.chip.on .ic .ia { stroke: var(--night); }
.chip.ghost { padding: 0 10px; color: var(--n60); }

/* quick add */
.quick { display: flex; align-items: center; gap: 10px; margin: 0 16px 16px; padding: 4px 4px 4px 4px; padding-inline-start: 14px; border: 1px solid var(--n20); border-radius: 12px; background: #fff; transition: border-color 0.24s; }
.quick:focus-within { border-color: var(--lav); box-shadow: 0 0 0 1px var(--lav); }
.quick-plus { color: var(--night); }
.quick input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 10px 0; font-size: 16px; background: none; }
.quick input::placeholder { color: var(--n60); }
.quick-go { height: 38px; padding: 0 16px; border-radius: 9px; background: var(--night); color: #fff; font-size: 14px; font-weight: 500; }
.quick:not(:focus-within) .quick-go { visibility: hidden; }

main { padding: 0 16px 40px; max-width: 1480px; margin: 0 auto; }

/* ---------- buttons. Hover: lavender fill comes in from the right (brand book p.69) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--n20); background-color: #fff; color: var(--night); font-size: 15px; font-weight: 500; white-space: nowrap;
  background-image: linear-gradient(var(--lav), var(--lav)); background-repeat: no-repeat; background-position: right center; background-size: 0% 100%;
  transition: background-size 0.32s var(--out), color 0.24s, border-color 0.24s, transform 0.12s var(--out);
}
.btn:hover { background-size: 100% 100%; border-color: var(--lav); color: var(--night); }
.btn:hover .ic .ia { stroke: var(--night); }
.btn:active { transform: scale(0.98); }
.btn.primary { background-color: var(--night); border-color: var(--night); color: #fff; }
.btn.primary:hover { color: var(--night); border-color: var(--lav); }
.btn.lav { background-color: var(--lav); border-color: var(--lav); color: var(--night); background-image: linear-gradient(#fff, #fff); }
.btn.on-dark { background-color: transparent; border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.btn.on-dark:hover { color: var(--night); border-color: var(--lav); }
.btn.ghost { border-color: transparent; color: var(--n60); }
.btn.on-dark.ghost { color: rgba(255, 255, 255, 0.6); }
.btn.danger:hover { color: var(--night); }
.btn.big { height: 48px; padding: 0 22px; font-size: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--n60); flex: none; transition: background 0.24s; }
.icon-btn:hover { background: rgba(18, 25, 28, 0.06); }
.link-btn { color: var(--night); font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--lav); text-underline-offset: 4px; }

/* ---------- the NOW card: a standing ticket (body, perforation, lavender stub) ---------- */
.ticket { display: flex; flex-direction: column; margin-bottom: 22px; filter: drop-shadow(0 10px 24px rgba(18, 25, 28, 0.12)); transition: transform 0.24s var(--out); }
.t-body { background: var(--night); color: #fff; border-radius: 18px 18px 0 0; padding: 18px 20px 6px; }
.t-head { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 6px; }
.t-head .icon-btn { color: rgba(255, 255, 255, 0.6); margin-inline-end: -8px; }
.t-head .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.h-light { font-size: 18px; color: var(--lav); line-height: 1.25; }
.h-light .ic.flag { color: var(--lav); }
.h-black { margin: 2px 0 0; font-size: 28px; line-height: 1.12; font-weight: 900; }
.h-black.enter { animation: rise 0.9s var(--out); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.t-note, .t-link, .t-peek { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, 0.78); }
.t-note .ic, .t-link .ic, .t-peek .ic { margin-top: 2px; color: #fff; }
.t-link, .t-peek { color: #fff; text-decoration: none; font-size: 14px; }
.t-link span, .t-peek span { border-bottom: 1px solid var(--lav); }
.peek { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; color: rgba(255, 255, 255, 0.55); }
.peek li { display: flex; gap: 10px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.peek .num { color: var(--lav); font-size: 13px; min-width: 18px; }
.peek li.done { text-decoration: line-through; color: rgba(255, 255, 255, 0.35); }
.peek li.cur { color: #fff; }
.t-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 14px; }
.t-actions .btn.lav { grid-column: 1 / -1; height: 48px; font-size: 16px; }
.t-actions .btn.ghost { grid-column: 1 / -1; height: 34px; }
/* perforation: lavender dashes on Night, notches cut at both ends (brand book p.37, 49) */
.t-perf { position: relative; height: 22px; background: var(--night);
  -webkit-mask: radial-gradient(circle 11px at 0 50%, transparent 97%, #000 100%) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 50%, transparent 97%, #000 100%) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 50%, transparent 97%, #000 100%) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 50%, transparent 97%, #000 100%) right / 51% 100% no-repeat; }
.t-perf::before { content: ""; position: absolute; inset-inline: 18px; top: 10px; height: 2px; background: repeating-linear-gradient(to left, var(--lav) 0 7px, transparent 7px 11px); border-radius: 2px; }
.t-stub { display: flex; gap: 0; background: var(--lav); color: var(--night); border-radius: 0 0 18px 18px; padding: 14px 20px 16px; }
.db { flex: 1; display: flex; flex-direction: column; gap: 3px; padding-inline-end: 14px; }
.db + .db { padding-inline-start: 14px; border-inline-start: 1px solid rgba(18, 25, 28, 0.22); }
.db-l { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; color: var(--night); opacity: 0.75; }
.db-v { font-size: 15px; font-weight: 500; line-height: 1.1; }
.db-v.num { font-size: 22px; }
.db-v.num.big { font-size: 30px; }
.db-v i { font-style: normal; opacity: 0.45; margin: 0 2px; }
.drop-on.ticket, .drop-on.ticket-empty { transform: translateY(-2px); }
.drop-on.ticket .t-body { box-shadow: inset 0 0 0 2px var(--lav); }

.ticket-empty { margin-bottom: 22px; transition: transform 0.24s var(--out); }
.ticket-empty .outline { border: 1.5px solid var(--night); border-radius: 18px; padding: 20px; }
.ticket-empty .h-light { margin-top: 6px; }
.ticket-empty .h-black { color: var(--night); margin-bottom: 16px; }
.ticket-empty .btn { width: 100%; justify-content: flex-start; }
.ticket-empty .btn span { overflow: hidden; text-overflow: ellipsis; }
.drop-on.ticket-empty .outline { border-color: var(--lav); box-shadow: 0 0 0 1px var(--lav); }

/* ---------- columns and rows ---------- */
.board { display: flex; flex-direction: column; gap: 26px; }
.col-h { padding-bottom: 10px; border-bottom: 1px solid var(--lav); }
.col-t { display: flex; align-items: center; gap: 9px; margin-top: 4px; font-size: 19px; font-weight: 900; }
.col-t .count { margin-inline-start: auto; font-size: 18px; color: var(--n40); }
.col.is-empty .col-t .count { color: var(--n20); }
.col.drop-on .col-h { border-bottom-width: 2px; }
.rows { list-style: none; margin: 0; padding: 0; min-height: 48px; }
.empty-row { display: none; color: var(--n40); font-size: 14px; padding: 14px 2px; }
.col.is-empty .empty-row { display: block; }
.rows:has(.placeholder) .empty-row { display: none; }
.col.is-empty { display: none; }
.col-gray.is-empty { display: block; }

.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 11px 6px; border-bottom: 1px solid var(--hair); background: #fff; border-radius: 0; transition: background 0.24s; }
.row:hover { background: rgba(18, 25, 28, 0.025); }
.row.arrive { animation: arrive 0.9s var(--out); }
@keyframes arrive { from { opacity: 0; transform: translateY(-8px); } }
.row-main { flex: 1; min-width: 0; cursor: pointer; }
.row-title { font-weight: 500; font-size: 15.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 3px; font-size: 13px; color: var(--n60); }
.row-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--n40); margin: 0 8px; }
.row-meta .tool { color: var(--night); font-weight: 500; }
.row-meta .eta { display: inline-flex; align-items: center; gap: 5px; }
.row-meta .eta.strong { color: var(--night); font-weight: 500; }
.row-meta .num { font-size: 14px; color: var(--night); }
.row-meta .stp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.row-meta .lst { color: var(--lav); font-weight: 500; }
.row-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--n60); }
.row-note .ic { margin-top: 1px; color: var(--n60); }
.row-note span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(var(--lav) calc(var(--p) * 360deg), var(--l40) 0); -webkit-mask: radial-gradient(circle, transparent 4px, #000 4.5px); mask: radial-gradient(circle, transparent 4px, #000 4.5px); }
.row.r-done .row-title { text-decoration: line-through; color: var(--n60); }

.mini {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--n20); font-size: 13px; font-weight: 500; white-space: nowrap; flex: none;
  background-image: linear-gradient(var(--lav), var(--lav)); background-repeat: no-repeat; background-position: right center; background-size: 0% 100%;
  transition: background-size 0.32s var(--out), border-color 0.24s, color 0.24s;
}
.mini:hover { background-size: 100% 100%; border-color: var(--lav); color: var(--night); }
.mini.dark { background-color: var(--night); border-color: var(--night); color: #fff; }
.mini.dark:hover { color: var(--night); }
.hover-only { display: none; }
.grip { display: flex; align-items: center; color: var(--n40); padding: 10px 2px; margin-inline-end: -4px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.row.dragging { background: #fff; border: 1px solid var(--lav); border-radius: 10px; box-shadow: 0 14px 30px rgba(18, 25, 28, 0.16); cursor: grabbing; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.placeholder { list-style: none; border: 1px dashed var(--lav); border-radius: 10px; margin: 4px 0; }

.demo-note { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 14px; color: var(--n60); padding: 0 0 18px; }

/* done: a perforation line, then the delivered list */
.done-sec { margin-top: 30px; padding-top: 18px; position: relative; }
.done-sec::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1.5px; background: repeating-linear-gradient(to left, var(--lav) 0 7px, transparent 7px 11px); }
.done-h { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; }
.done-h .eyebrow { margin-inline-end: 2px; }
.done-h .num { color: var(--n40); font-size: 16px; }
.done-h .ic { color: var(--n60); transition: transform 0.24s var(--out); }
.done-h .ic.rot45 { transform: rotate(45deg); }
.done-sec .rows { margin-top: 8px; }

/* ---------- focus: the ticket alone, framed by crop marks (brand book p.51) ---------- */
body.focus .lists, body.focus .quick { display: none; }
body.focus main { max-width: 940px; padding-top: 7vh; }
.focus-stage { position: relative; padding: 30px; }
.focus-stage .ticket, .focus-stage .ticket-empty { margin: 0; }
.crop { position: absolute; width: 18px; height: 18px; border-color: var(--night); border-style: solid; border-width: 0; }
.crop.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.crop.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.crop.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.crop.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.focus-bar { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--n60); font-size: 15px; padding: 18px; }
.focus-bar .num { color: var(--night); font-size: 17px; }

/* ---------- sheets ---------- */
#sheet { position: fixed; inset: 0; z-index: 60; display: none; }
#sheet.open { display: block; }
.sheet-back { position: absolute; inset: 0; background: rgba(18, 25, 28, 0.32); animation: fade 0.24s; }
.sheet-panel {
  position: absolute; inset-inline: 0; bottom: 0; max-height: 92dvh; overflow-y: auto;
  background: #fff; border-radius: 20px 20px 0 0; padding: 20px 18px calc(22px + var(--safe-b));
  animation: up 0.48s var(--out);
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.s-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.s-head > div { flex: 1; min-width: 0; }
.s-head .dot { margin-top: 26px; }
.s-ic { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--n20); flex: none; }
.s-head h3 { margin: 3px 0 0; font-size: 21px; font-weight: 900; line-height: 1.2; }
.s-head .icon-btn { margin-inline-end: -6px; }
.lead { font-size: 16px; margin: 10px 0 14px; color: var(--n80); }
.lbl { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 9px; font-size: 14px; font-weight: 500; color: var(--n80); }
.lbl .eyebrow { display: inline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .num { font-size: 16px; }
.field { width: 100%; padding: 12px 14px; border: 1px solid var(--n20); border-radius: 10px; font-size: 16px; outline: 0; resize: vertical; background: #fff; transition: border-color 0.24s; }
.field:focus { border-color: var(--lav); box-shadow: 0 0 0 1px var(--lav); }
.sheet-actions { display: flex; gap: 8px; margin-top: 22px; }
.sheet-actions.wrap { flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--hair); }
.switch-opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--n20); font-size: 16px; font-weight: 500; text-align: start;
  background-image: linear-gradient(var(--lav), var(--lav)); background-repeat: no-repeat; background-position: right center; background-size: 0% 100%;
  transition: background-size 0.32s var(--out), border-color 0.24s;
}
.opt:hover { background-size: 100% 100%; border-color: var(--lav); }
.opt:hover .ic .ia { stroke: var(--night); }
.title-in { width: 100%; border: 0; outline: 0; font-size: 21px; font-weight: 900; padding: 2px 0; border-bottom: 1px solid transparent; background: none; }
.title-in:focus { border-bottom-color: var(--lav); }
#dFlags { margin-top: 14px; }
.steps { list-style: none; margin: 0 0 8px; padding: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--hair); }
.steps .check { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--n40); color: var(--n60); flex: none; }
.steps .check .num { font-size: 13px; }
.steps li.done .check { background: var(--lav); border-color: var(--lav); color: #fff; }
.steps li.done .step-in { color: var(--n60); text-decoration: line-through; }
.steps li.cur .check { border: 1.5px solid var(--night); color: var(--night); }
.steps li.cur .step-in { font-weight: 700; }
.step-in { flex: 1; min-width: 0; border: 0; outline: 0; padding: 8px 2px; font-size: 16px; background: none; }
.steps .x { color: var(--n40); padding: 6px; }

.toast {
  position: fixed; left: 16px; right: 16px; margin-inline: auto; bottom: calc(24px + var(--safe-b)); z-index: 70;
  display: flex; align-items: center; gap: 12px; width: fit-content; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--night); color: #fff; font-size: 15px;
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform 0.48s var(--out), opacity 0.24s;
}
.toast.show { transform: none; opacity: 1; pointer-events: auto; }
.toast-undo { color: var(--lav); font-weight: 700; margin-inline-start: 4px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.2s !important; transition-duration: 0.2s !important; transform: none !important; } }

/* ---------- iPhone ---------- */
@media (max-width: 979px) {
  .brand-sep, .brand-name { display: none; }
  .brand img { height: 24px; }
  .flaps { gap: 8px; }
  .focus-btn { width: 38px; padding: 0; justify-content: center; }
  .focus-btn span { display: none; }
  .quick {
    position: fixed; inset-inline: 12px; bottom: calc(10px + var(--safe-b)); z-index: 30; margin: 0;
    box-shadow: 0 10px 30px rgba(18, 25, 28, 0.14);
  }
  main { padding-bottom: calc(110px + var(--safe-b)); }
  body.sheet-open .quick { display: none; }
  .toast { bottom: calc(84px + var(--safe-b)); }
  .phone-only { margin-bottom: 22px; }
  .board .col-green { display: none; }
  .h-black { font-size: 24px; }
  .t-actions .btn { padding: 0 10px; }
}

/* ---------- Mac: the ticket on the right, the board in four columns ---------- */
@media (min-width: 980px) {
  .phone-only { display: none !important; }
  .top { padding: 16px 32px 12px; }
  .lists { padding: 0 32px 14px; }
  .quick { max-width: 560px; margin: 0 32px 22px; }
  main { padding: 0 32px 60px; }
  .layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 36px; align-items: start; }
  .side { position: sticky; top: 84px; }
  .board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; align-items: start; }
  .col.is-empty { display: block; }
  .row:hover .hover-only { display: inline-flex; }
  .mini { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
  .mini .mini-t { display: none; }
  .row { gap: 10px; }
  .grip { opacity: 0; transition: opacity 0.24s; }
  .row:hover .grip { opacity: 1; }
  #sheet .sheet-panel { inset: auto; top: 7vh; left: 50%; width: min(580px, 92vw); max-height: 86vh; border-radius: 20px; padding: 24px 26px; animation: pop 0.48s var(--out); transform: translateX(-50%); }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, 16px); } }
  /* focus: the same ticket lying down, stub on the right (brand book p.37) */
  body.focus .ticket { flex-direction: row-reverse; }
  body.focus .t-body { flex: 69; border-radius: 18px 0 0 18px; padding: 26px 30px 22px; }
  body.focus .t-perf { width: 22px; height: auto;
    -webkit-mask: radial-gradient(circle 11px at 50% 0, transparent 97%, #000 100%) top / 100% 51% no-repeat, radial-gradient(circle 11px at 50% 100%, transparent 97%, #000 100%) bottom / 100% 51% no-repeat;
    mask: radial-gradient(circle 11px at 50% 0, transparent 97%, #000 100%) top / 100% 51% no-repeat, radial-gradient(circle 11px at 50% 100%, transparent 97%, #000 100%) bottom / 100% 51% no-repeat; }
  body.focus .t-perf::before { inset-inline: auto; left: 10px; top: 18px; bottom: 18px; width: 2px; height: auto; background: repeating-linear-gradient(to bottom, var(--lav) 0 7px, transparent 7px 11px); }
  body.focus .t-stub { flex: 31; flex-direction: column; gap: 16px; border-radius: 0 18px 18px 0; padding: 26px 22px; }
  body.focus .db { padding: 0 0 14px; border: 0; border-bottom: 1px solid rgba(18, 25, 28, 0.22); }
  body.focus .db:last-child { border-bottom: 0; }
  body.focus .db-v.num.big { font-size: 48px; }
  body.focus .h-black { font-size: 38px; }
  body.focus .h-light { font-size: 21px; }
  body.focus .t-actions { grid-template-columns: 2fr 1fr 1fr; }
  body.focus .t-actions .btn.lav { grid-column: auto; }
}

/* ---------- login ---------- */
#login { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff; animation: fade 0.24s; }
.login-card { width: min(380px, 100%); }
.login-card img { display: block; height: 34px; width: auto; margin-bottom: 40px; }
.login-card .h-black { color: var(--night); font-size: 34px; }
.login-txt { color: var(--n80); margin: 14px 0 22px; }
.login-card .btn { width: 100%; }
#loginForm { display: grid; gap: 10px; }
#loginForm[hidden] { display: none; }
.code-in { text-align: center; font-size: 34px; letter-spacing: 0.3em; padding: 10px; direction: ltr; }
#loginForm .link-btn { justify-self: center; margin-top: 6px; }
.login-err { color: var(--night); font-weight: 500; min-height: 1.4em; margin-top: 14px; }
