/* Team Tasks: the "Night" world (the owner's pick from design-options/gallery.html), with a matching "Day"
   appearance that follows the phone's light/dark setting. Green only ever means done; red only late (or
   destructive); amber only urgent. Readex Pro (variable, 400–700), self-hosted. Type sizes in rem so browser text settings scale them. */

@font-face{font-family:"Readex Pro";font-style:normal;font-display:swap;font-weight:400 700;src:url(/fonts/readexpro-arabic.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC7,U+10EC9-10EEE,U+10EF0-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;}
@font-face{font-family:"Readex Pro";font-style:normal;font-display:swap;font-weight:400 700;src:url(/fonts/readexpro-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

:root {
  --ground: #111315;
  --panel: #171a1d;
  --raised: #1e2226;
  --line: #23272b;
  --ring: #646c75;
  --text: #ecedee;
  --muted: #8a9099;
  --done: #7fdcb4;
  --on-done: #0f1714;
  --late: #ff8a80;
  --urgent: #e9c46a;
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  --selection: rgba(236, 237, 238, 0.22);
  --edge: #30363c;
  --well: #141619;
  --card: #1b1e22;
  color-scheme: dark;
}

/* Day: same rules, for bright warehouses and sunlight. Contrast on ground/panel: text 16.2/17.8,
   muted 5.6/6.2, done 4.8/5.3, late 4.9/5.4, urgent 5.4/5.9, rings 3.1/3.4. */
@media (prefers-color-scheme: light) {
  :root {
    --ground: #f3f4f5;
    --panel: #ffffff;
    --raised: #e9ecef;
    --line: #dfe2e6;
    --ring: #858d96;
    --text: #15181b;
    --muted: #5b626a;
    --done: #157755;
    --on-done: #ffffff;
    --late: #c0392b;
    --urgent: #8a5a00;
    --selection: rgba(21, 24, 27, 0.14);
    --edge: #d3d8dd;
    --well: #eaedf0;
    --card: #ffffff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); }
body {
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  caret-color: var(--text);
}
::selection { background: var(--selection); color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
/* Titles receive focus only so screen readers start on the new screen; they are not controls. */
[tabindex='-1']:focus { outline: none; }
html { scrollbar-color: var(--ring) var(--ground); scrollbar-width: thin; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; font-weight: 700; }
a { color: inherit; }

.wrap {
  max-width: 620px; margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(56px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}

/* ---------- Header ---------- */
header.top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 28px; }
header.top h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 0.875rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.sub .late-link { border: 0; min-height: 44px; padding: 0 4px; margin: -10px -4px; color: var(--late); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; }
.sub .late-link:hover { background: none; }
/* App mark: names the product on the home screen. */
.brand { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--raised); color: var(--done); display: grid; place-items: center; }
.brand-mark svg.ic { width: 14px; height: 14px; }

/* "⋯" menu with the team screen's secondary places. */
.menu-wrap { position: relative; flex-shrink: 0; }
.menu-btn { width: 44px; height: 44px; padding: 0; border-color: var(--line); border-radius: var(--radius); color: var(--text); }
.menu-btn[aria-expanded='true'] { background: var(--raised); }
.menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 15; min-width: 220px; padding: 6px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: open 180ms var(--ease);
}
.menu-item {
  width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text);
  display: flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 500; text-align: right; text-decoration: none; justify-content: flex-start;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--panel); }
.menu-item svg.ic { color: var(--muted); }

.top-actions { display: flex; gap: 4px; flex-shrink: 0; margin-top: -6px; }

/* ---------- Buttons ---------- */
/* Mint means "done" only; actions are neutral. The one main action is a light button. */
button, .btn {
  font: inherit; font-size: 1rem; font-weight: 500; color: var(--text); background: transparent;
  border: 1px solid var(--ring); border-radius: var(--radius); min-height: 44px; padding: 8px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease);
}
button:hover, .btn:hover { background: var(--raised); }
button:active, .btn:active { background: var(--line); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--text); border-color: var(--text); color: var(--ground); font-weight: 700; }
button.primary:hover { background: var(--text); opacity: 0.88; }
button.danger, .text-btn.danger { color: var(--late); }
button.armed { background: var(--late); border-color: var(--late); color: var(--ground); font-weight: 700; }
/* Secondary actions (رجوع، تذكير بالبريد، رابط مهام المهندس، إرفاق ملف…) are outlined, so every action reads as a button (owner request). */
.text-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--edge); border-radius: var(--radius); color: var(--text); font-size: 0.875rem; font-weight: 500;
}
.text-btn:hover { background: var(--panel); border-color: var(--ring); }
.text-btn.strong { font-weight: 700; }
.text-btn.danger { border-color: color-mix(in srgb, var(--late) 45%, var(--edge)); }
.text-btn.armed { background: var(--late); border-color: var(--late); color: var(--ground); font-weight: 700; }
/* The add slot is already a dashed box; its "إضافة" stays a plain word inside it. */
.add .text-btn { border-color: transparent; }
.block { width: 100%; }
svg.ic { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Team list (manager home) ---------- */
.team { display: flex; flex-direction: column; }
.w { border-bottom: 1px solid var(--line); }
.w-head {
  width: 100%; border: 0; border-radius: 0; background: none; min-height: 64px; padding: 12px 2px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; text-align: right; font-size: 1.125rem;
}
.w-head:hover, .w-head:active { background: none; }
.w-name { flex: 1 1 8em; min-width: 0; font-weight: 500; overflow-wrap: break-word; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.w-late { font-size: 0.875rem; color: var(--late); font-weight: 500; }
.w-count { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: left; }
.chev { width: 16px; height: 16px; color: var(--muted); transition: transform 220ms var(--ease); }
.w.open .chev { transform: rotate(-90deg); }
/* The opened worker is one outlined group: name, task cards, add slot and actions on a recessed "well".
   The group has the larger radius (16px) so the cards inside (12px) step down. */
.w.open { background: var(--well); border: 1px solid var(--edge); border-radius: 16px; padding: 0 12px; margin: 8px 0; }
.w.open .w-head { padding-inline: 2px; }

/* Beads: one per task. Filled mint = done, mint ring = started, grey ring = not started, filled red = late. */
.beads { display: flex; flex-wrap: wrap; gap: 5px; max-width: 112px; justify-content: flex-end; }
.bead { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ring); flex-shrink: 0; }
.bead.done { background: var(--done); border-color: var(--done); }
.bead.started { border-color: var(--done); }
.bead.late { background: var(--late); border-color: var(--late); border-radius: 0; transform: rotate(45deg) scale(0.8); }

.w-body { padding: 2px 0 18px; animation: open 260ms var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* A task row: the task (link) and, at its far end, its attachments and a paperclip to add one. */
/* Each task is one outlined card: a border, no shadow. Late tasks take a red-tinted edge as well as their red ring and word. */
.task-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding: 2px 8px 2px 14px;
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius);
  transition: border-color 160ms var(--ease);
}
.task-row:hover, .task-row:focus-within { border-color: var(--ring); }
.task-row.late { border-color: color-mix(in srgb, var(--late) 45%, var(--edge)); }
.task-row.done { background: transparent; }
.task-row .task { flex: 1 1 14em; min-width: 0; }
.task-files { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-inline-start: auto; padding: 4px 0; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 11em; padding: 0 10px; border-radius: var(--radius-sm);
  background: var(--raised); color: var(--text); font-size: 0.8125rem; font-weight: 500; text-decoration: none;
}
.file-chip:hover { background: var(--line); }
.file-chip svg.ic { width: 16px; height: 16px; color: var(--muted); }
.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-chip.more { color: var(--muted); }
.attach-btn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-sm); color: var(--muted); }
.attach-btn:hover { color: var(--text); background: var(--raised); }

.task { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; min-height: 52px; text-decoration: none; color: var(--text); }
.dot { width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--ring); flex-shrink: 0; display: grid; place-items: center; }
.dot svg { width: 11px; height: 11px; color: var(--on-done); opacity: 0; }
.task.done .dot { background: var(--done); border-color: var(--done); }
.task.done .dot svg { opacity: 1; }
.task.started .dot { border-color: var(--done); }
.task.late .dot { border-color: var(--late); }
.task-main { flex: 1; min-width: 0; }
.task:hover .task-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ring); }
.task-title { display: block; font-size: 1rem; overflow-wrap: break-word; text-align: right; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--ring); }
.task-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
.late-text { color: var(--late); }
.urgent-text { color: var(--urgent); }
.empty-line { color: var(--muted); font-size: 1rem; padding: 12px 0 4px; margin: 0; }

.add { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 8px; padding: 2px 8px 2px 14px; border: 1px dashed var(--ring); border-radius: var(--radius); transition: border-color 160ms var(--ease); }
.add input[type='text'] { flex: 1 1 9em; min-width: 0; min-height: 44px; border: 0; border-radius: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; padding: 6px 0; }
.add input::placeholder { color: var(--muted); }
.add input:focus { outline: none; }
.add:focus-within { border-style: solid; border-color: var(--text); }
.after-add { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 0.875rem; color: var(--muted); padding-top: 4px; }
.w-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 24px 0 0; font-size: 0.8125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.foot-links { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

/* ---------- Generic blocks ---------- */
.section-title { font-size: 0.875rem; font-weight: 500; color: var(--muted); margin: 28px 0 8px; }
.panel { background: var(--panel); border-radius: var(--radius-lg); padding: 14px 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.875rem; color: var(--muted); margin: 0; }
.notes { margin-top: 14px; font-size: 1rem; }
.mini { font-size: 0.8125rem; color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-rows > li:last-child { border-bottom: 0; }
.person-name { font-size: 1.125rem; font-weight: 500; overflow-wrap: break-word; }
.items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.items li { display: flex; gap: 10px; font-size: 1rem; align-items: center; }
.items .item-text { text-align: right; overflow-wrap: break-word; }
.items .when { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.mark { width: 14px; height: 14px; flex-shrink: 0; display: grid; place-items: center; }
.mark.y { color: var(--done); }
.mark.y svg { width: 14px; height: 14px; }
.mark.n::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ring); }
.files { display: grid; gap: 2px; }
.file { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--text); }
.file svg { color: var(--muted); }
.file .grow { overflow-wrap: break-word; text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.status { font-size: 0.875rem; color: var(--muted); }
.status.done { color: var(--done); }
.status.late { color: var(--late); }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 20px; }
.field > span, .field-label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 6px; }
input[type='text'], input[type='email'], input[type='search'], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); min-height: 48px; padding: 10px 14px; transition: border-color 160ms var(--ease);
}
input:focus, textarea:focus { outline: none; border-color: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
.items-edit .item-row { display: flex; gap: 8px; margin-bottom: 8px; }
.items-edit .item-row input { flex: 1; }
.items-edit .item-row button { width: 48px; padding: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { min-height: 44px; border-radius: 999px; padding: 6px 16px; font-size: 1rem; color: var(--muted); }
.chip[aria-pressed='true'] { color: var(--ground); background: var(--text); border-color: var(--text); font-weight: 700; }
.chip.urgent[aria-pressed='true'] { background: var(--urgent); border-color: var(--urgent); }
.more { margin: 4px 0 24px; border-top: 1px solid var(--line); }
.more > summary { min-height: 52px; color: var(--text); font-size: 1rem; font-weight: 500; list-style: none; gap: 8px; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary .chev { transform: rotate(-90deg); }
.more-body { padding-top: 4px; }
.date-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.picked { display: grid; gap: 2px; margin-top: 6px; }
.picked .file { min-height: 32px; font-size: 0.875rem; color: var(--muted); }
.error { color: var(--late); font-size: 0.875rem; margin: 0 0 12px; }
.error:empty { display: none; }

/* ---------- Workers page ---------- */
.person { border-bottom: 1px solid var(--line); }
.person > summary { list-style: none; cursor: pointer; padding: 12px 0; min-height: 64px; display: flex; align-items: center; gap: 12px; }
.person > summary::-webkit-details-marker { display: none; }
.person-body { padding: 0 0 12px; }
.person[open] > summary .chev { transform: rotate(-90deg); }
.add-worker { margin-top: 28px; }
.add-worker > summary { list-style: none; cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.add-worker > summary::-webkit-details-marker { display: none; }
.add-worker .panel { margin-top: 8px; }

/* ---------- Worker page ---------- */
.wtasks { display: flex; flex-direction: column; gap: 12px; }
/* Same outlined card as the manager's task cards, so both sides of the app share one shape. */
.wtask { background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius-lg); padding: 2px 16px 4px; }
.wtask-head { padding: 14px 0 2px; }
.wtask-head h2 { font-size: 1.125rem; text-align: right; }
.wtask .meta { padding: 2px 0 6px; }
.wtask .files { padding: 0 0 6px; }
.check { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 56px; }
.check:last-child { border-bottom: 0; }
.check input {
  appearance: none; -webkit-appearance: none; margin: 1px 0 0; width: 26px; height: 26px; flex-shrink: 0; cursor: pointer;
  border: 1.5px solid var(--ring); border-radius: 50%; background: transparent; display: grid; place-content: center;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}
.check input::after {
  content: ''; width: 10px; height: 5px; margin-top: -3px; border: solid var(--on-done); border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg) scale(0); transition: transform 220ms var(--ease);
}
.check input:checked { background: var(--done); border-color: var(--done); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check .label { display: block; font-size: 1.125rem; overflow-wrap: break-word; text-align: right; }
.check.done .label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--ring); }
.check .when { display: block; font-size: 0.8125rem; color: var(--muted); }

/* ---------- Feedback ---------- */
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty p { margin: 0 0 14px; font-size: 1rem; }
.toast {
  position: fixed; inset-inline: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 420px; z-index: 20;
  background: var(--raised); color: var(--text); border: 1px solid var(--ring); border-radius: var(--radius); padding: 12px 16px;
  text-align: center; font-size: 1rem; animation: toast 220ms var(--ease);
}
@keyframes toast { from { opacity: 0; transform: translateY(6px); } }
details > summary { cursor: pointer; display: flex; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 720px) {
  .wrap { padding-top: calc(48px + env(safe-area-inset-top, 0px)); }
}

/* ---------- Computer (960px and wider) ----------
   A top bar with every place in view, and on the team screen the roster beside the chosen worker's tasks.
   Phones keep the single column, the "⋯" menu and the accordion. */
.appbar { display: none; }

@media (min-width: 960px) {
  .appbar { display: block; position: sticky; top: 0; z-index: 10; background: var(--ground); border-bottom: 1px solid var(--line); }
  .appbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 32px; min-height: 60px; display: flex; align-items: center; gap: 32px; }
  .appbar-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
  .appbar-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
  .appbar-link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
    color: var(--muted); font-size: 0.875rem; font-weight: 500; text-decoration: none;
  }
  .appbar-link:hover { color: var(--text); background: var(--panel); }
  .appbar-link[aria-current='page'] { color: var(--text); background: var(--raised); }
  .appbar-link[download] { margin-inline-start: auto; }
  .appbar-link svg.ic { width: 16px; height: 16px; }

  .wrap { padding-top: 40px; padding-inline: 32px; }
  .wrap.wide { max-width: 1240px; }

  .split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
  .roster { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 108px); overflow-y: auto; }
  .roster-row {
    width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid transparent; border-radius: var(--radius);
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; text-align: right; background: none; font-size: 1rem;
  }
  .roster-row:hover { background: var(--panel); }
  .roster-row[aria-current='true'] { background: var(--well); border-color: var(--edge); }
  .roster-row .beads { max-width: 96px; }
  .roster .legend { justify-content: flex-start; margin: 16px 14px 0; }

  .detail { background: var(--well); border: 1px solid var(--edge); border-radius: 16px; padding: 20px 24px 24px; }
  .detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
  .detail-head h2 { font-size: 1.125rem; }
  .detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .detail .w-body { padding: 0; animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
