:root {
  --night: #0b1d4a;
  --blue: #2b5fb8;
  --ember: #c2410c;
  --ink: #0f1b3d;
  --muted: #4a5679;
  --line: #e3e9f5;
  --cta: linear-gradient(135deg, #2b5fb8, #c2410c);
  --dawn: linear-gradient(135deg, #0b1d4a 0%, #2b5fb8 28%, #7fb4e8 50%, #ffc08a 76%, #ff7a2f 100%);
  --shadow: 0 10px 30px rgba(11, 29, 74, .22);
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); overflow: hidden;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
/* Visually hidden, still reachable by screen readers and the label that wraps it */
.vh {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden !important;
  clip-path: inset(50%) !important; white-space: nowrap !important;
}
:focus-visible { outline: 3px solid var(--night); outline-offset: 2px; }
.topbar :focus-visible { outline-color: #fff; }

/* ---- Opening: the dawn colors and the title until the map has loaded, then a slow fade into it */
.intro {
  position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; overflow: hidden;
  padding: calc(24px + var(--sat)) calc(24px + var(--sar)) calc(24px + var(--sab)) calc(24px + var(--sal));
  background: var(--night); color: #fff; text-align: center; cursor: pointer;
  transition: opacity 1.4s ease-in-out;
  animation: intro-safety .6s 9s forwards; /* hides it even if the script does not run */
}
.intro::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; background: var(--dawn);
  animation: dawn-drift 6s ease-in-out both;
}
.intro-in {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 56rem; transition: transform 1.4s ease-in-out;
}
.intro-in::before { /* a soft shade behind the words keeps them readable on the light part of the colors */
  content: ""; position: absolute; inset: -40% -20%; z-index: -1;
  background: radial-gradient(closest-side, rgba(11, 29, 74, .4), rgba(11, 29, 74, 0));
}
.intro-sun {
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3d6, #ffb77a 45%, #ff7a2f);
  box-shadow: 0 0 40px 12px rgba(255, 183, 122, .7), 0 0 120px 48px rgba(255, 122, 47, .3);
  animation: sun-rise 1.8s cubic-bezier(.2, .8, .2, 1) both;
}
.intro-title {
  margin: 0; font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; line-height: 1.1; text-wrap: balance;
  text-shadow: 0 2px 4px rgba(11, 29, 74, .45), 0 4px 28px rgba(11, 29, 74, .5);
  animation: fade-up 1s .5s ease-out both;
}
.intro-place {
  margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(11, 29, 74, .6);
  animation: fade-up 1s .9s ease-out both;
}
.intro.out { opacity: 0; pointer-events: none; }
.intro.out .intro-in { transform: scale(1.06); }
@keyframes dawn-drift { from { transform: translate(6%, 6%); } to { transform: translate(-6%, -6%); } }
@keyframes sun-rise { from { opacity: 0; transform: translateY(40px) scale(.8); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes intro-safety { to { opacity: 0; visibility: hidden; } }
@media (max-height: 500px) {
  .intro-in { gap: 10px; }
  .intro-sun { width: 64px; height: 64px; }
}

/* ---- Map */
#map { position: fixed; inset: 0; z-index: 0; background: var(--dawn); }
.leaflet-container { font-family: inherit; }
.leaflet-tile-pane { opacity: .86; } /* the dawn colors show through a little */
.leaflet-bottom { bottom: var(--sab); }
.leaflet-left { left: var(--sal); }
.leaflet-container .leaflet-control-attribution { font-size: 11px; background: rgba(255, 255, 255, .85); }
.leaflet-container .leaflet-bar a,
.leaflet-container .locate-ctl button { width: 38px; height: 38px; line-height: 38px; font-size: 20px; }
.locate-ctl button {
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 2px;
  background: #fff; color: var(--night); cursor: pointer;
}
.locate-ctl button.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) { .locate-ctl button:hover { background: #f4f4f4; } }
@media (pointer: coarse) {
  .leaflet-container .leaflet-bar a,
  .leaflet-container .locate-ctl button { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
}

/* Report markers */
.leaflet-marker-icon.mk { background: none; border: 0; }
.mk svg {
  display: block; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
  transform-origin: 50% 95%; transition: transform .15s;
}
@media (hover: hover) { .mk:hover svg { transform: scale(1.12); } }
.mk:focus-visible { outline-offset: 0; border-radius: 8px; }
.mk.new svg { animation: drop .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes drop { from { opacity: 0; transform: translateY(-30px) scale(.7); } }

/* Popups */
.leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: 0 10px 30px rgba(11, 29, 74, .3); }
.leaflet-popup-content { margin: 14px 16px 12px; font-size: .95rem; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button {
  width: 40px; height: 40px; font: 26px/40px system-ui, sans-serif; color: var(--night);
}
.pop h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding-right: 26px;
  font-size: 1rem; color: var(--night);
}
.pop h3 i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.pop .ex {
  flex: none; margin-left: auto; padding: 2px 8px; border-radius: 99px; background: #e8eef9; color: var(--night);
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.pop img {
  display: block; width: 100%; height: 150px; margin-bottom: 8px; border-radius: 10px;
  object-fit: cover; background: #eef2fa;
}
.pop p { margin: 0 0 10px; max-height: 9.6em; overflow-y: auto; white-space: pre-line; overflow-wrap: anywhere; }
.pop footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px;
  font-size: .8rem; color: var(--muted);
}
/* The status stays on one line; on a narrow popup the date moves below it */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 99px; white-space: nowrap;
  background: var(--t); color: #fff; font-size: .75rem; font-weight: 700;
}

/* ---- Top bar and filters */
.top-ui {
  position: fixed; z-index: 1000;
  top: calc(12px + var(--sat)); left: calc(12px + var(--sal)); right: calc(12px + var(--sar));
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  pointer-events: none; /* only the bar and the panel take taps; the map stays usable around them */
}
.top-ui > * { pointer-events: auto; }
.topbar {
  position: relative; z-index: 2; align-self: stretch;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px 8px 16px; border-radius: 999px; color: #fff;
  background: linear-gradient(90deg, rgba(11, 29, 74, .94), rgba(43, 95, 184, .94) 55%, rgba(194, 65, 12, .94));
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; }
.brand-sun {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3d6, #ffb77a 45%, #ff7a2f);
  box-shadow: 0 0 14px rgba(255, 183, 122, .9);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; }
.brand-text small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.menu-toggle {
  display: none; flex: none; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.menu-toggle > span:first-child { font-size: 1.2rem; line-height: 1; }
.main-nav { display: flex; gap: 4px; }
.main-nav button {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none;
  color: #fff; font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
}
@media (hover: hover) { .main-nav button:hover { background: rgba(255, 255, 255, .18); } }

.glass { background: rgba(255, 255, 255, .95); border: 1px solid rgba(255, 255, 255, .7); box-shadow: var(--shadow); }
@media (min-width: 721px) and (min-height: 501px) {
  .glass {
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  }
}
.filters {
  display: flex; flex-direction: column; width: 260px; min-height: 0; padding: 8px; border-radius: 18px;
  max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px); /* leaves room for the map buttons */
}
.filters-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px;
  padding: 4px 8px; border: 0; border-radius: 10px; background: none;
  color: var(--night); font: inherit; font-weight: 800; cursor: pointer;
}
.filters-toggle span { transition: transform .15s; }
.filters.collapsed .filters-toggle span { transform: rotate(-90deg); }
.filters ul {
  display: flex; flex-direction: column; gap: 2px; min-height: 0; margin: 4px 0 0; padding: 0;
  list-style: none; overflow-y: auto;
}
.chip {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; margin: 0; padding: 6px 10px;
  border: 0; border-radius: 12px; background: none; color: var(--ink);
  font: inherit; font-size: .92rem; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(.97); }
.chip i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; }
.chip .n {
  min-width: 26px; margin-left: auto; padding: 2px 7px; border-radius: 99px;
  background: #e8eef9; color: var(--night); font-size: .78rem; text-align: center;
}
.chip .n:empty { display: none; }
.chip.active { background: linear-gradient(135deg, #0b1d4a, #2b5fb8); color: #fff; font-weight: 700; }
.chip.active .n { background: rgba(255, 255, 255, .22); color: #fff; }
@media (hover: hover) { .chip:not(.active):hover { background: #eef3fc; } }
.count { margin: 8px 8px 2px; font-size: .82rem; color: var(--muted); }
.filters.collapsed ul, .filters.collapsed .count { display: none; }

/* ---- New report button and messages */
.fab {
  position: fixed; z-index: 1000; right: calc(20px + var(--sar)); bottom: calc(24px + var(--sab));
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 26px;
  border: 0; border-radius: 999px; background: var(--cta); color: #fff;
  font: inherit; font-size: 1.05rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 10px 28px rgba(194, 65, 12, .45); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .15s;
}
.fab:active { transform: scale(.97); }
@media (hover: hover) { .fab:hover { transform: translateY(-2px); } }

.toast {
  position: fixed; z-index: 3000; left: 12px; right: 12px; bottom: calc(96px + var(--sab));
  width: fit-content; max-width: 560px; margin: 0 auto; padding: 12px 20px; border-radius: 16px;
  background: var(--night); color: #fff; font-weight: 600; line-height: 1.35; text-align: center;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }
body.picking .toast { bottom: calc(160px + var(--sab)); }

/* ---- Buttons and form fields */
.btn {
  display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border: 1.5px solid transparent; border-radius: 999px;
  font: inherit; font-size: .95rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s, background-color .15s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn[aria-busy="true"], .btn.busy { cursor: progress; }
.btn.primary { background: var(--cta); color: #fff; }
.btn.ghost { background: #fff; color: var(--night); border-color: #a9b6d3; }
@media (hover: hover) {
  .btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
  .btn.ghost:hover:not(:disabled) { background: #eef3fc; }
}
.btn:has(input:focus-visible) { outline: 3px solid var(--night); outline-offset: 2px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--night); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #7486ad; border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; /* 16px: no zoom on iPhone */
}
textarea { min-height: 96px; line-height: 1.4; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(194, 65, 12, .3);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: .9rem; font-weight: 700; color: var(--night); }
.loc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#locStatus { font-size: .9rem; color: var(--muted); }
#locStatus.ok { color: #047857; font-weight: 700; }
.photo-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-pick .btn { flex: 1 1 auto; gap: 0; } /* the &nbsp; before "de la galería" is the only space */
.photo-box { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 12px; }
.photo-box .btn { justify-self: start; }
#photoPreview { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: #eef2fa; }
.note { margin: 0; font-size: .85rem; color: var(--muted); }
.error {
  margin: 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 12px;
  background: #fef2f2; color: #b91c1c; font-size: .9rem; font-weight: 600;
}

/* ---- Dialogs */
dialog {
  width: min(calc(100% - 24px), 480px); max-width: none; max-height: min(calc(100% - 24px), 760px);
  padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--ink);
  box-shadow: 0 30px 80px rgba(11, 29, 74, .45); overscroll-behavior: contain;
}
dialog:not(.sheet) { width: min(calc(100% - 24px), 420px); }
dialog[open] { animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
dialog::backdrop { background: linear-gradient(180deg, rgba(11, 29, 74, .72), rgba(194, 65, 12, .45)); }
dialog h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; color: var(--night); }
dialog p { margin: 0; line-height: 1.5; }
.sheet form { display: flex; flex-direction: column; min-height: 100%; }
.sheet-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); background: #fff;
}
.sheet-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 16px 20px 20px; }
.close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: #eef2fa; color: var(--night);
  font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sheet .actions {
  position: sticky; bottom: 0; z-index: 1;
  padding: 12px 20px; padding-bottom: calc(12px + var(--sab)); border-top: 1px solid var(--line); background: #fff;
}
.sheet .actions .btn { flex: 1; }
.sheet .actions .primary { flex: 1.6; }
.doc { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.doc h2::after {
  content: ""; display: block; width: 48px; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--dawn);
}
.doc .actions { margin-top: 4px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }

/* Guide */
#guideModal .doc { text-align: center; }
#guideModal h2::after { margin-inline: auto; }
.slide-icon {
  display: grid; place-items: center; width: 84px; height: 84px; margin: 4px auto 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3d6, #ffd9b8 60%, #ffc08a); font-size: 2.6rem; line-height: 1;
}
.dots { display: flex; justify-content: center; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: #c5cfe4; transition: width .2s, background-color .2s; }
.dots i.on { width: 22px; background: var(--ember); }
#guideModal .actions .btn { padding-inline: 14px; }
#guideSkip { margin-right: auto; }
#guidePrev, #guideNext { min-width: 48px; }

/* ---- Location picker: the tip of the pin is the center of the map */
.picker { position: fixed; inset: 0; z-index: 1500; pointer-events: none; }
.picker-bar {
  position: absolute; top: calc(10px + var(--sat)); left: 12px; right: 12px; max-width: 560px; margin: 0 auto;
  padding: 12px 16px; border-radius: 16px; background: rgba(11, 29, 74, .92); color: #fff;
  font-weight: 600; line-height: 1.35; text-align: center; box-shadow: var(--shadow);
}
.pin {
  position: absolute; left: 50%; top: 50%; margin: -51px 0 0 -20px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); transition: transform .15s ease-out;
}
.pin-tip {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 6px; margin: -3px 0 0 -6px;
  border-radius: 50%; background: rgba(11, 29, 74, .45); transition: transform .15s ease-out;
}
.picker.moving .pin { transform: translateY(-12px); }
.picker.moving .pin-tip { transform: scale(1.5); }
.picker-actions {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 12px calc(12px + var(--sar)) calc(12px + var(--sab)) calc(12px + var(--sal));
  border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(11, 29, 74, .25);
  pointer-events: auto;
}
.picker-actions .row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
@media (min-width: 721px) {
  .picker-actions {
    left: 50%; right: auto; bottom: calc(16px + var(--sab)); width: min(480px, calc(100% - 24px));
    padding: 12px; border-radius: 20px; transform: translateX(-50%);
  }
}
body.picking .top-ui, body.picking .fab, body.picking .leaflet-popup-pane, body.picking .locate-ctl { display: none; }
body.picking .leaflet-marker-icon { opacity: .35; pointer-events: none !important; }

@media (hover: hover) and (pointer: fine) { .touch-only { display: none !important; } }

/* ---- Phones (same breakpoint as the script) */
@media (max-width: 720px), (max-height: 500px) {
  .top-ui { top: calc(8px + var(--sat)); left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); gap: 6px; }
  .topbar { padding: 6px 6px 6px 12px; border-radius: 24px; }
  .brand { gap: 8px; }
  .brand-text strong { font-size: .95rem; }
  .brand-text small { display: none; }
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: calc(100% + 6px); right: 0; display: none; flex-direction: column; min-width: 210px;
    padding: 6px; border-radius: 16px; background: #fff; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav button { min-height: 48px; padding: 0 16px; border-radius: 12px; color: var(--night); font-size: 1rem; text-align: left; }
  .main-nav :focus-visible { outline-color: var(--night); outline-offset: -3px; }

  /* Categories as one row of chips that scrolls sideways */
  .filters {
    align-self: stretch; width: auto; max-height: none; padding: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none;
  }
  .filters-toggle { display: none; }
  .filters ul, .filters.collapsed ul {
    display: flex; flex-direction: row; gap: 6px; margin: 0 -8px; padding: 2px 28px 8px 8px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 28px), transparent);
  }
  .filters ul::-webkit-scrollbar { display: none; }
  .filters li { flex: none; }
  .chip {
    width: auto; min-height: 44px; padding: 0 14px; gap: 8px; border-radius: 999px;
    background: rgba(255, 255, 255, .97); box-shadow: 0 2px 8px rgba(11, 29, 74, .28);
    font-size: .9rem; font-weight: 600; white-space: nowrap;
  }
  .chip .n { margin-left: 0; }
  .count { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .leaflet-popup-content { font-size: 1rem; }
  body.picking .leaflet-bottom { bottom: calc(150px + var(--sab)); }
}
@media (max-width: 720px) {
  .fab { left: calc(12px + var(--sal)); right: calc(12px + var(--sar)); bottom: calc(12px + var(--sab)); }
  .leaflet-bottom { bottom: calc(80px + var(--sab)); }
  .toast { bottom: calc(84px + var(--sab)); }
}
@media (max-width: 419px) {
  .menu-label { display: none; }
  .menu-toggle { width: 44px; padding: 0; }
}
/* Forms take the whole screen on phones */
@media (max-width: 600px), (max-height: 500px) {
  dialog.sheet {
    width: 100%; height: 100%; height: 100dvh; max-height: 100%; max-height: 100dvh;
    margin: 0; border-radius: 0;
  }
  dialog.sheet[open] { animation-name: slide-up; }
  .sheet-head { padding-top: calc(12px + var(--sat)); }
}
@media (min-width: 601px) and (max-height: 500px) {
  dialog.sheet { width: min(100%, 560px); margin: 0 auto; }
}
@keyframes slide-up { from { opacity: 0; transform: translateY(40px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
