@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #172725;
  --ink-soft: #50605d;
  --ink-faint: #74817e;
  --paper: #f5f3eb;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --line: #d9ddd6;
  --line-strong: #bec8c2;
  --brand: #0d766f;
  --brand-dark: #163c3a;
  --brand-soft: #d7eeea;
  --accent: #d95d35;
  --todo: #315c9b;
  --todo-bg: #e6eef9;
  --progress: #9a5717;
  --progress-bg: #f8ead8;
  --blocked: #a23b39;
  --blocked-bg: #f8e4e2;
  --done: #257066;
  --done-bg: #dff0eb;
  --focus: #097f78;
  --font-body: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --sidebar-width: 232px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 140ms;
  --motion-panel: 280ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select,
a {
  touch-action: manipulation;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--brand-dark);
  transform: translateY(-160%);
  transition: transform var(--motion-fast) ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 30px 20px 24px;
  color: #f5fbf9;
  background: var(--brand-dark);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-dark);
  background: #cde8a9;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-nav {
  margin-top: 58px;
}

.nav-label {
  margin: 0 10px 10px;
  color: #a7c0bb;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-nav a {
  display: grid;
  min-height: 48px;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: background var(--motion-fast) ease;
}

.workspace-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.workspace-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-count {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--brand-dark);
  background: #cde8a9;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.avatar-stack {
  display: flex;
  padding-left: 6px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-left: -6px;
  border: 2px solid var(--brand-dark);
  border-radius: 50%;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.avatar--1 { background: #f5cbbd; }
.avatar--2 { background: #cde8a9; }
.avatar--3 { background: #bcd9f2; }
.avatar--4 { background: #ebd2f0; }
.avatar--5 { background: #f4dfa6; }
.avatar--6 { background: #c9dedb; }

.team-note {
  margin: 14px 0 0;
  color: #c3d4d0;
  font-size: 12px;
}

.main-content {
  min-height: 100vh;
  min-height: 100dvh;
  margin-left: var(--sidebar-width);
}

.mobile-header {
  display: none;
}

.inbox {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 54px clamp(32px, 5vw, 72px) 64px;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 18px;
  height: 2px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 4.6vw, 64px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 560px;
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.date-stamp {
  flex: none;
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: right;
}

.date-stamp span {
  display: block;
  color: var(--ink);
  font-weight: 650;
}

.status-overview {
  display: grid;
  grid-template-columns: 132px minmax(120px, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 38px;
  padding: 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 250, 0.72);
}

.status-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.status-total__number {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.status-meter {
  display: flex;
  height: 8px;
  overflow: hidden;
  gap: 2px;
  border-radius: 99px;
  background: var(--line);
}

.status-meter span {
  min-width: 3px;
}

.status-meter [data-status="todo"] { background: var(--todo); }
.status-meter [data-status="in-progress"] { background: #cf7b29; }
.status-meter [data-status="blocked"] { background: var(--blocked); }
.status-meter [data-status="done"] { background: var(--done); }

.status-counts {
  display: flex;
  gap: 20px;
  margin: 0;
}

.status-counts > div {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 6px;
  align-items: center;
}

.status-counts dt {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-counts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.count-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.count-dot[data-status="todo"] { background: var(--todo); }
.count-dot[data-status="in-progress"] { background: #cf7b29; }
.count-dot[data-status="blocked"] { background: var(--blocked); }
.count-dot[data-status="done"] { background: var(--done); }

.task-section {
  margin-top: 34px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 188px;
  gap: 12px;
  align-items: end;
}

.field label {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.input-wrap,
.select-wrap {
  position: relative;
}

.input-wrap svg,
.select-wrap svg {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 19px;
  height: 19px;
  pointer-events: none;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-wrap svg { left: 15px; }
.select-wrap svg { right: 14px; }

input,
select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-strong);
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

input:hover,
select:hover {
  border-color: #869792;
}

input {
  padding: 0 15px 0 45px;
}

input::placeholder {
  color: #8a9693;
}

select {
  appearance: none;
  padding: 0 42px 0 14px;
}

.list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 2px 12px;
}

.list-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.list-heading p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.list-key {
  display: flex;
  align-items: center;
  gap: 7px;
}

.list-key span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.task-list {
  border-top: 1px solid var(--line-strong);
}

.task-item {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.task-item::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 99px;
  background: transparent;
  content: "";
}

.task-item[data-priority="high"]::before {
  background: var(--accent);
}

.task-open {
  display: grid;
  width: 100%;
  min-height: 86px;
  grid-template-columns: minmax(260px, 1fr) 148px 124px 28px;
  align-items: center;
  gap: 20px;
  padding: 15px 8px 15px 18px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  transition: background var(--motion-fast) ease;
}

.task-open:hover {
  background: rgba(255, 255, 255, 0.68);
}

.task-open:active {
  background: rgba(215, 238, 234, 0.74);
}

.task-copy {
  min-width: 0;
}

.task-kicker {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.task-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.task-summary {
  display: -webkit-box;
  max-width: 620px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.task-person {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.mini-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(23, 39, 37, 0.12);
  border-radius: 50%;
  color: var(--ink);
  background: var(--avatar-bg, #d7eeea);
  font-size: 9px;
  font-weight: 750;
}

.task-person span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge[data-status="todo"] { color: var(--todo); background: var(--todo-bg); }
.status-badge[data-status="in-progress"] { color: var(--progress); background: var(--progress-bg); }
.status-badge[data-status="blocked"] { color: var(--blocked); background: var(--blocked-bg); }
.status-badge[data-status="done"] { color: var(--done); background: var(--done-bg); }

.due-date {
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.row-arrow {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast) ease, stroke var(--motion-fast) ease;
}

.task-open:hover .row-arrow {
  stroke: var(--brand);
  transform: translateX(3px);
}

.empty-state {
  padding: 54px 24px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.empty-state__icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}

.empty-state p {
  margin: 6px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.empty-state button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: var(--brand);
  font-weight: 650;
  transition: background var(--motion-fast) ease;
}

.empty-state button:hover {
  background: #095f59;
}

.detail-dialog {
  width: min(500px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px 0 0 24px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: -16px 0 50px rgba(14, 32, 29, 0.16);
}

.detail-dialog[open] {
  animation: panel-in var(--motion-panel) var(--ease-out) both;
}

.detail-dialog::backdrop {
  background: rgba(13, 32, 29, 0.42);
  backdrop-filter: blur(2px);
}

.detail-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.detail-topbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: max(24px, env(safe-area-inset-top)) 28px 16px;
}

.detail-id {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-id span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--paper);
}

.icon-button:active {
  background: var(--brand-soft);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.detail-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 28px calc(36px + env(safe-area-inset-bottom));
}

.detail-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
}

.priority-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.priority-pill[data-priority="high"]::before { background: var(--accent); }
.priority-pill[data-priority="medium"]::before { background: #c18924; }
.priority-pill[data-priority="low"]::before { background: #79918b; }

.detail-scroll h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.status-field {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #afd3cd;
  border-radius: 12px;
  background: #eef8f5;
}

.status-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.status-field label {
  font-size: 12px;
  font-weight: 700;
}

.status-feedback {
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}

.status-field select {
  border-color: #9ebdb8;
  background-color: white;
}

.detail-section {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 14px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-body p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
}

.detail-body p:last-child {
  margin-bottom: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--brand);
  background: #eef3ef;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.meta-grid > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-grid dt {
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.meta-grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  background: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes panel-in {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1050px) {
  :root { --sidebar-width: 196px; }

  .status-overview {
    grid-template-columns: 120px 1fr;
  }

  .status-counts {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--line);
  }

  .task-open {
    grid-template-columns: minmax(250px, 1fr) 124px 28px;
  }

  .task-person {
    display: none;
  }
}

@media (max-width: 760px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    padding: max(12px, env(safe-area-inset-top)) 18px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 243, 235, 0.94);
  }

  .brand--mobile {
    color: var(--brand-dark);
    font-size: 18px;
  }

  .brand--mobile .brand-mark {
    width: 34px;
    height: 34px;
  }

  .mobile-team {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
  }

  .inbox {
    padding: 32px 16px 48px;
  }

  .hero-row {
    display: block;
  }

  h1 {
    font-size: clamp(42px, 13vw, 56px);
  }

  .hero-copy {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.55;
  }

  .date-stamp {
    display: none;
  }

  .status-overview {
    display: block;
    margin-top: 28px;
    padding: 16px;
  }

  .status-total {
    margin-bottom: 13px;
  }

  .status-total__number {
    font-size: 28px;
  }

  .status-counts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
  }

  .status-counts > div {
    grid-template-columns: auto 1fr;
  }

  .status-counts dt {
    font-size: 9px;
    white-space: nowrap;
  }

  .task-section {
    margin-top: 26px;
  }

  .toolbar {
    grid-template-columns: 1fr 132px;
    gap: 8px;
  }

  .field label {
    font-size: 11px;
  }

  input,
  select {
    height: 48px;
  }

  .list-heading {
    margin-top: 24px;
  }

  .list-key {
    display: none;
  }

  .task-open {
    min-height: 92px;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    gap: 8px;
    padding: 15px 4px 15px 14px;
  }

  .task-summary,
  .task-person {
    display: none;
  }

  .task-copy {
    margin-bottom: 0;
  }

  .task-kicker {
    margin-bottom: 6px;
  }

  .task-title {
    font-size: 14px;
    line-height: 1.35;
  }

  .task-state {
    align-items: flex-end;
  }

  .due-date {
    display: none;
  }

  .row-arrow {
    width: 20px;
  }

  .detail-dialog {
    width: 100%;
    height: min(92dvh, 780px);
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -14px 40px rgba(14, 32, 29, 0.18);
  }

  .detail-dialog[open] {
    animation-name: sheet-in;
  }

  .detail-topbar {
    padding: 16px 18px 10px;
  }

  .detail-topbar::before {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: var(--line-strong);
    content: "";
    transform: translateX(-50%);
  }

  .detail-scroll {
    padding: 6px 18px calc(28px + env(safe-area-inset-bottom));
  }

  .detail-scroll h2 {
    font-size: 34px;
  }

  .toast {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .toolbar {
    grid-template-columns: 1fr 124px;
  }

  .status-counts {
    gap: 5px;
  }

  .status-badge {
    padding-inline: 7px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .detail-dialog {
    height: 100dvh;
    width: min(520px, 88vw);
    margin: 0 0 0 auto;
    border-radius: 20px 0 0 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
