:root {
  color-scheme: light;
  --paper: #f7f4f5;
  --card: #ffffff;
  --ink: #271d28;
  --muted: #6f616c;
  --plum: #4b304b;
  --plum-deep: #342039;
  --rose: #f2e7ee;
  --rose-dark: #6b3e59;
  --border: #e8dfe5;
  --soft: #fbf8fa;
  --green: #305f50;
  --green-bg: #e7f2eb;
  --amber: #824d21;
  --amber-bg: #fcf0e3;
  --red: #963b4a;
  --red-bg: #faebed;
  --radius: 20px;
  --shadow: 0 10px 35px rgba(65, 40, 65, .06);
  --nav-height: 68px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

button, input, textarea, select { font: inherit; }
button, select, input[type="file"] { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--rose-dark); outline-offset: 3px; }
[hidden] { display: none !important; }
h1[tabindex="-1"]:focus { outline: none; }
a { color: var(--rose-dark); }
p, h1, h2, h3, h4, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.82rem, 5.8vw, 2.8rem); letter-spacing: -.04em; }
h2 { font-size: 1.16rem; letter-spacing: -.015em; }
h3 { font-size: 1.02rem; }
small { font-size: .83rem; }
svg { display: inline-block; flex: none; vertical-align: middle; }

.app-shell { min-height: 100vh; }
.app-main {
  width: min(100%, 880px);
  margin-inline: auto;
  padding: calc(28px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    calc(var(--nav-height) + 42px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  outline: none;
}
.screen { display: grid; min-width: 0; gap: 20px; }
.screen > *, .stack > *, .grid-2 > *, .row > *, .order-top > *, .stat-grid > * { min-width: 0; }

.page-head, .section-head, .order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.page-head { min-height: 54px; }
.page-head p, .section-head p { margin-top: 5px; }
.page-head :is(h1, h2) { overflow-wrap: normal; }
.page-head > :is(button, .btn), .section-head > :is(button, .btn) { flex: none; }
.section-head { margin-block: 2px 10px; }
.app-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--plum); font-weight: 700; }
.app-brand img { width: 30px; height: 30px; border-radius: 9px; }
.app-brand svg { width: 24px; height: 24px; }
.eyebrow { color: var(--rose-dark); font-size: .82rem; font-weight: 700; letter-spacing: .075em; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .86rem; }
.hint + .hint { margin-top: 6px; }

.card, .order-card, .item-card, .money-tile {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 17px;
}
.card + .card, .item-card + .item-card { margin-top: 10px; }
.stack > .card, .stack > .item-card { margin-top: 0; }

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 148px;
  padding: 21px 20px;
  border: 1px solid #4b354a;
  border-radius: 25px;
  color: #fffafd;
  background: radial-gradient(ellipse at 103% 1%, #724f6e 0%, transparent 51%),
    linear-gradient(119deg, #382339, #4b304b 79%);
  box-shadow: 0 13px 26px rgba(62, 37, 60, .14);
}
.hero::before, .hero::after {
  position: absolute;
  z-index: -1;
  right: -28px;
  top: -83px;
  width: 233px;
  height: 233px;
  border: 1px solid rgba(249, 215, 234, .22);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.hero::after { right: 2px; top: -45px; width: 199px; height: 199px; }
.hero :is(.hero-date, .eyebrow, .muted, .hint, small) { color: #ead8e6; }
.hero-date { font-size: .89rem; font-weight: 600; }
.hero-count {
  display: inline-block;
  margin-block: 2px;
  color: #fff;
  font: 700 clamp(2.1rem, 8vw, 3.35rem)/1.1 "Times New Roman", serif;
  font-variant-numeric: tabular-nums;
}
.hero h2 { color: #fff; font-size: 1.35rem; }
.hero .btn, .hero button { border-color: transparent; background: #f5e7ef; color: var(--plum-deep); }
.hero p + p { margin-top: 5px; }

.stat-grid, .money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.stat-card, .money-tile {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 12px 9px;
  text-align: left;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.4;
}
.stat-card:is(button, a):active { background: var(--rose); }
.stat-card:is(button, a) { text-decoration: none; }
.stat-count, .money-tile strong {
  display: block;
  color: var(--plum-deep);
  font: 700 1.8rem/1.1 "Times New Roman", serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.money-tile strong { font-size: clamp(1.15rem, 5vw, 1.9rem); }
.money-tile :is(small, .muted) { line-height: 1.4; }

.task-list, .order-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.task-row {
  display: flex;
  width: 100%;
  min-height: 57px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card);
  appearance: none;
  text-align: left;
}
.task-row:is(button, a), .order-card:is(button, a) { text-decoration: none; }
.task-row:is(button, a):active, .order-card:is(button, a):active { background: var(--soft); }
.task-content { flex: 1; min-width: 0; }
.task-title, .order-title { display: block; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.task-meta { display: block; margin-top: 2px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.order-card { display: grid; width: 100%; gap: 8px; text-align: left; }
.order-card :is(p, small), .order-top > * { overflow-wrap: anywhere; }
.order-title { font-size: 1.09rem; }
.order-top { align-items: flex-start; }
.order-top .chip { flex: 0 1 auto; }
.due-mark { color: var(--red); font-weight: 700; }
.due-mark, .calendar-week, .calendar-day { font-variant-numeric: tabular-nums; }

.chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rose);
  color: var(--rose-dark);
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.4;
  vertical-align: middle;
}
.chip:is([data-tone="good"], [data-tone="green"], [data-tone="success"], .success) { color: var(--green); background: var(--green-bg); }
.chip:is([data-tone="warn"], [data-tone="amber"], [data-tone="warning"], .warning) { color: var(--amber); background: var(--amber-bg); }
.chip:is([data-tone="danger"], [data-tone="red"], [data-tone="late"], .danger) { color: var(--red); background: var(--red-bg); }
.chip:is([data-tone="muted"], [data-tone="neutral"], .neutral) { color: var(--muted); background: #f1edf0; }

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--card);
  color: var(--plum);
  font-size: .92rem;
  font-weight: 680;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.btn:is(.primary, [data-tone="primary"]) { border-color: var(--plum); background: var(--plum); color: #fff; }
.btn:is(.secondary, [data-tone="secondary"]) { border-color: transparent; background: var(--rose); color: var(--plum); }
.btn:is(.danger, [data-tone="danger"]) { border-color: transparent; background: var(--red-bg); color: var(--red); }
.btn:is(.ghost, .plain) { border-color: transparent; background: transparent; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.row, .toolbar, .filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.row.between, .toolbar.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.filters { margin: 0; }
.filters > :is(input, select) { flex: 1 1 118px; }

.segmented {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #eee8ed;
}
.segmented > button {
  min-height: 37px;
  padding: 4px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
}
.segmented > button:is(.active, [aria-pressed="true"], [aria-current="page"], [aria-selected="true"]) {
  background: #fff;
  color: var(--plum-deep);
  box-shadow: 0 1px 3px #00000010;
}

.editor { display: grid; gap: 14px; }
.editor fieldset { min-width: 0; margin: 0; }
.editor legend { padding: 0 4px; color: var(--plum); font-weight: 700; }
.field { display: grid; min-width: 0; align-content: start; gap: 5px; color: var(--ink); }
.field > span:first-child, .field-label { font-size: .88rem; font-weight: 670; }
.field .hint { font-weight: 400; }

:is(input, select, textarea):not([type="checkbox"], [type="radio"], [type="file"]) {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 45px;
  padding: 8px 10px;
  border: 1px solid #ded3dc;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}
input:is([type="date"], [type="month"]) { max-width: 100%; }
input::-webkit-date-and-time-value { text-align: left; }
select:not([multiple]) {
  appearance: none;
  padding-right: 34px !important;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) !important;
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52% !important;
  background-size: 5px 5px !important;
  background-repeat: no-repeat !important;
}
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #80717d; }
input[type="file"] { max-width: 100%; color: var(--muted); font-size: .9rem; }
input[type="file"]::file-selector-button {
  min-height: 37px;
  margin-right: 8px;
  padding: 5px 9px;
  border: 0;
  border-radius: 10px;
  background: var(--rose);
  color: var(--plum);
  font-weight: 650;
}

.item-card { display: grid; gap: 11px; background: var(--soft); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo { position: relative; min-width: 0; margin: 0; }
.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--rose);
  object-fit: cover;
}
.photo button { min-height: 44px; min-width: 44px; }
.photo button:first-child:not(.btn) { width: 100%; padding: 0; border: 0; border-radius: 13px; background: none; }
.photo figcaption { padding-top: 3px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }

.empty, .notice {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--soft);
  color: var(--muted);
}
.empty { min-height: 80px; text-align: center; }
.empty p + *, .notice p + * { margin-top: 7px; }
.empty strong, .notice strong { color: var(--plum-deep); }
.notice:is([data-tone="warn"], [data-tone="warning"], .warning) { background: var(--amber-bg); color: var(--amber); }
.notice:is([data-tone="danger"], .danger) { background: var(--red-bg); color: var(--red); }

.calendar-grid, .calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  text-align: center;
}
.calendar-week { margin-bottom: 5px; color: var(--muted); font-size: .85rem; }
.calendar-day {
  position: relative;
  display: grid;
  min-height: 44px;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 1px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: .92rem;
  line-height: 1.1;
}
.calendar-day:is(.today, [aria-current="date"]) { border-color: #d6b9cc; color: var(--plum-deep); font-weight: 750; }
.calendar-day:is(.active, .selected, [aria-pressed="true"], [aria-selected="true"]) { background: var(--plum); color: #fff; }
.calendar-day:is(.outside, .other-month) { color: var(--muted); opacity: .7; }
.calendar-day small { color: inherit; font-size: .7rem; }

dialog {
  width: min(440px, calc(100% - 30px));
  max-height: calc(100% - 40px);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog:not([open]) { display: none; }
dialog::backdrop { background: rgba(31, 18, 30, .48); }
dialog img { display: block; width: 100%; max-height: 65vh; border-radius: 12px; object-fit: contain; }
.dialog-body { display: grid; gap: 10px; }
.dialog-body p { color: var(--muted); }
.dialog-body .button-row { justify-content: flex-end; }
.photo-dialog > .icon-button { justify-self: end; }

.tabbar {
  position: fixed;
  z-index: 10;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 5px max(8px, env(safe-area-inset-right))
    calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-top: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 -7px 23px rgba(49, 27, 48, .035);
}
.tabbar button {
  display: grid;
  min-width: 0;
  min-height: 49px;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 3px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.15;
}
.tabbar button:is(.active, [aria-current="page"], [aria-selected="true"]) { color: var(--plum-deep); font-weight: 750; }
.tabbar button span:first-child { border-radius: 999px; }
.tabbar button:is(.active, [aria-current="page"], [aria-selected="true"]) span:first-child { background: var(--rose); }
.tab-icon { display: grid; width: 41px; height: 28px; place-items: center; }
.tab-icon::after {
  display: block;
  width: 23px;
  height: 23px;
  background: currentColor;
  -webkit-mask: var(--tab-icon) center / contain no-repeat;
  mask: var(--tab-icon) center / contain no-repeat;
  content: "";
}
[data-tab="home"] { --tab-icon: url("./icons/tab-home.png"); }
[data-tab="orders"] { --tab-icon: url("./icons/tab-orders.png"); }
[data-tab="calendar"] { --tab-icon: url("./icons/tab-calendar.png"); }
[data-tab="income"] { --tab-icon: url("./icons/tab-income.png"); }
[data-tab="settings"] { --tab-icon: url("./icons/tab-settings.png"); }

.toast {
  position: fixed;
  z-index: 12;
  right: 14px;
  bottom: calc(var(--nav-height) + 14px + env(safe-area-inset-bottom));
  left: 14px;
  width: fit-content;
  max-width: min(440px, calc(100% - 28px));
  margin: auto;
  padding: 10px 15px;
  border-radius: 13px;
  background: var(--plum-deep);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: .92rem;
  overflow-wrap: anywhere;
}
.toast:empty { display: none; }

@media (max-width: 360px) {
  .app-main { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .stat-grid, .money-grid { gap: 5px; }
  .stat-card, .money-tile { padding-inline: 6px; }
  .grid-2 { gap: 7px; }
}

@media (min-width: 640px) {
  .app-main { padding-top: calc(39px + env(safe-area-inset-top)); padding-inline: 26px; }
  .screen { gap: 25px; }
  .hero { min-height: 176px; padding: 24px 26px; }
  .stat-grid, .money-grid { gap: 12px; }
  .stat-card, .money-tile, .card, .order-card, .item-card { padding: 18px; }
  .task-row { padding-inline: 16px; }
  .tabbar {
    inset: auto max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    width: min(506px, calc(100% - 28px));
    min-height: var(--nav-height);
    margin-inline: auto;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 5px 30px #3a22391a;
  }
  .toast { bottom: calc(var(--nav-height) + 24px + env(safe-area-inset-bottom)); }
}

@media (hover: hover) {
  .btn:not(.primary):hover, .tabbar button:hover { filter: brightness(.97); }
  .task-row:is(button, a):hover, .order-card:is(button, a):hover { border-color: #cdb7c8; }
}

.hero { display: flex; align-items: center; }
.hero > div:first-child { position: relative; z-index: 1; max-width: 68%; }
.hero-label { color: #f1dbe9; font-weight: 700; }
.hero-count { display: block; }
.hero-count span { font: 600 .91rem/1.1 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.hero p { color: #f1e0ec; font-size: .85rem; }
.hero-art {
  position: absolute;
  inset: 50% 13px auto auto;
  width: min(39%, 178px);
  color: #f1bbcc;
  opacity: .88;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-art svg { display: block; width: 100%; }

.stat-card { gap: 7px; padding: 12px 10px; }
.stat-icon, .task-icon, .empty-icon {
  display: inline-grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--rose);
  color: var(--rose-dark);
}
.stat-icon svg, .task-icon svg, .empty-icon svg { width: 19px; height: 19px; }
:is(.chip, .stat-icon, .task-icon)[data-tone="violet"] { background: #ede7f4; color: #604e7d; }
:is(.chip, .stat-icon, .task-icon)[data-tone="sage"] { background: var(--green-bg); color: var(--green); }
.stat-count small { color: var(--muted); font: 600 .78rem/1.1 system-ui, sans-serif; }
.stat-label { color: #5d4d59; font-size: .88rem; font-weight: 650; }

.task-list.card { overflow: hidden; gap: 0; padding: 0; }
.task-list.card .task-row { min-height: 64px; border: 0; border-radius: 0; }
.task-list.card .task-row + .task-row { border-top: 1px solid var(--border); }
.task-list.card .task-row:focus-visible { outline-offset: -3px; }
.task-list .chip { flex: 0 0 auto; }
.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 113px;
  padding-block: 15px;
  background: #ffffffa8;
}
.empty-icon { width: 34px; height: 34px; margin-bottom: 2px; }
.empty p { font-size: .87rem; }

.order-list > .order-card { margin-top: 0; }
.order-meta { font-size: .88rem; }
.order-bottom { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order-bottom .due-mark { font-size: .86rem; font-weight: 600; }
.order-bottom strong { color: var(--plum-deep); font: 700 1.3rem/1.2 "Times New Roman", serif; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--muted); }
.search-field input[type="search"] { padding-inline-start: 42px; appearance: none; }
.filters button {
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: .87rem;
  font-weight: 650;
}
.filters button:is(.active, [aria-pressed="true"]) { border-color: var(--plum); background: var(--plum); color: #fff; }

.month-bar { justify-content: space-between; gap: 2px; margin-bottom: 10px; }
.month-bar strong { font-size: 1.02rem; }
.icon-button, .text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--rose-dark);
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
}
.icon-button { min-width: 44px; background: var(--soft); }
.text-button.danger-text { color: var(--red); }
.calendar-dots, .calendar-key { display: flex; align-items: center; justify-content: center; gap: 3px; }
.calendar-dots { min-height: 6px; margin-top: 3px; }
.calendar-key { flex-wrap: wrap; margin-top: 12px; gap: 5px 13px; color: var(--muted); font-size: .83rem; }
.calendar-key span { display: inline-flex; align-items: center; gap: 5px; }
:is(.calendar-dots, .calendar-key) i { width: 6px; height: 6px; border-radius: 50%; background: #a25277; }
:is(.calendar-dots, .calendar-key) i[data-tone="violet"] { background: #7960a4; }
:is(.calendar-dots, .calendar-key) i[data-tone="sage"] { background: #548472; }
.calendar-day.selected .calendar-dots i { background: #fff; }

.income-current {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px 9px;
  border-radius: 14px;
  background: var(--rose);
}
.income-current strong { color: var(--plum-deep); font: 700 clamp(2rem, 8vw, 3.15rem)/1.1 "Times New Roman", serif; }
.money-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.money-grid > .money-tile { margin-top: 0; padding: 14px; }

.settings-card { display: grid; justify-items: start; gap: 10px; }
.screen > .settings-card { margin-top: 0; }
.settings-card .section-head { width: 100%; margin: 0; }
.settings-top { display: flex; gap: 11px; align-items: flex-start; }
.settings-top .muted { margin-top: 5px; }
.settings-top + .notice { width: 100%; }
.backup-actions { width: 100%; padding: 11px; border-radius: 13px; background: var(--soft); }
.button-row, .editor-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button-row { margin-top: 5px; }
.editor-actions .primary { flex: 1 1 160px; }
.editor .file-button { justify-self: start; }
.file-button { position: relative; }
.file-button:focus-within { outline: 2px solid var(--rose-dark); outline-offset: 3px; }
.file-button input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }

.back-link { margin-block: -7px -13px; }
.back-link .btn { margin-left: -8px; padding-inline: 8px; }
.detail-card :is(p, dd), .parcel-card p { overflow-wrap: anywhere; }
.detail-grid, .parcel-grid { display: grid; gap: 9px; }
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.detail-grid > div, .parcel-card { padding: 11px; border-radius: 13px; background: var(--soft); }
.detail-grid dt { color: var(--muted); font-size: .83rem; }
.detail-grid dd { margin: 3px 0 0; color: var(--plum-deep); font-size: .92rem; font-weight: 650; }
.detail-grid + .hint, .order-notes { margin-top: 8px; }
.parcel-card .section-head, .item-card .section-head { margin: 0; }
.parcel-card .field, .parcel-card p { margin-top: 7px; }
.order-notes { white-space: pre-wrap; }
.delete-area { display: flex; justify-content: flex-end; }
.item-photos:empty { display: none; }
.photo-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--rose);
  color: var(--rose-dark);
}
.photo-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--red);
  box-shadow: 0 1px 6px #32202d30;
}
.toast[data-kind="error"] { background: #6a2935; }

@media (min-width: 640px) {
  .stat-card { padding: 15px 17px; }
  .parcel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { right: 44px; width: 175px; }
}

@media (max-width: 639px) {
  .calendar-card { padding-inline: 8px; }
}
