:root {
  --ink: #28251f;
  --muted: #6b665d;
  --paper: #fffdf7;
  --cream: #fff4d7;
  --line: #ded6c7;
  --brand: #e4562a;
  --brand-dark: #a8321d;
  --navy: #073b78;
  --navy-dark: #042d5d;
  --turquoise: #078c8c;
  --sun: #f3b71b;
  --blue: #2563eb;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  color-scheme: light;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Hiragino Kaku Gothic ProN',
    'Yu Gothic',
    sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: #f4efe5;
}

* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--brand-dark);
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #0b67d0;
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 100;
  padding: 12px;
  background: #fff;
}
.skip-link:focus {
  top: 12px;
}

.site-header {
  background: var(--navy);
  color: #fff;
}
.header-inner,
main,
.footer-inner {
  width: min(calc(100% - 32px), 780px);
  margin-inline: auto;
}
.header-inner {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 78%);
  border-radius: 50%;
  background: var(--brand);
  font-size: 0.84rem;
  line-height: 1;
}
.header-nav {
  display: flex;
  gap: 14px;
}
.header-nav a {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
main {
  padding: 24px 0 56px;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: #f8f3e8;
}
.footer-inner {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.875rem;
}
h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 7vw, 2.3rem);
  line-height: 1.25;
}
h2 {
  margin: 32px 0 14px;
  font-size: 1.3rem;
}
h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}
p {
  line-height: 1.7;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
}
.lead {
  color: var(--muted);
  margin: 0 0 20px;
}
.safety-notice {
  border: 2px solid #e5a129;
  border-radius: 14px;
  background: #fff8df;
  padding: 14px 16px;
  font-weight: 700;
  line-height: 1.6;
}
.update-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 12px 2px;
  color: var(--muted);
  font-size: 0.875rem;
}
.update-line[data-error='true'] {
  color: var(--red);
  font-weight: 700;
}
.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.venue-map {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1200 / 680;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #f8f2e6 url('/assets/img/venue-map.svg') center / 100% 100% no-repeat;
}
.venue-map figcaption {
  position: absolute;
  right: 10px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  color: var(--muted);
  font-size: 0.7rem;
}
.venue-map figcaption span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}
.map-marker {
  position: absolute;
  display: flex;
  width: auto;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 900;
}
.marker-pin {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 9px;
  rotate: -45deg;
  background: #6f746f;
}
.marker-pin > span {
  rotate: 45deg;
}
.marker-label {
  max-width: 170px;
  padding: 7px 10px;
  border: 2px solid #fff;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-size: clamp(0.66rem, 1.2vw, 0.86rem);
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}
.map-marker:hover .marker-label,
.map-marker:focus-visible .marker-label {
  background: var(--brand-dark);
}
.map-marker:focus-visible {
  outline-offset: 6px;
}
.map-marker[data-order='1'] {
  left: 20%;
  top: 18%;
}
.map-marker[data-order='2'] {
  left: 77%;
  top: 19%;
}
.map-marker[data-order='3'] {
  left: 19%;
  top: 43%;
}
.map-marker[data-order='4'] {
  left: 77%;
  top: 42%;
}
.map-marker[data-order='5'] {
  left: 77%;
  top: 70%;
}
.map-marker[data-order='6'] {
  left: 40%;
  top: 84%;
}
.map-marker[data-order='7'] {
  left: 63%;
  top: 85%;
}
[data-level='1'] {
  --level-color: var(--blue);
}
[data-level='2'] {
  --level-color: var(--green);
}
[data-level='3'] {
  --level-color: var(--amber);
}
[data-level='4'] {
  --level-color: var(--red);
}
.map-marker[data-level] {
  --marker-color: var(--level-color);
}
.map-marker[data-level] .marker-pin {
  background: var(--marker-color);
}

.location-grid,
.staff-location-grid {
  display: grid;
  gap: 12px;
}
.location-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.location-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  -webkit-tap-highlight-color: rgb(7 59 120 / 12%);
}
.location-card:hover {
  border-color: var(--navy);
}
.location-card-heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 5px;
}
.location-card-heading .order-badge {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}
.location-card-copy {
  display: contents;
}
.location-card-title {
  grid-column: 2 / 4;
  grid-row: 1;
  min-width: 0;
  font-size: clamp(0.88rem, 3.8vw, 1.2rem);
  font-weight: 800;
  line-height: 1.35;
  word-break: keep-all;
}
.order-badge {
  display: grid;
  place-items: center;
  align-self: start;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
}
.card-status {
  grid-column: 2;
  grid-row: 2;
  align-self: baseline;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  color: #4d4942;
  font-size: 1rem;
  line-height: 1.35;
}
.location-card[data-level] .card-status {
  color: var(--level-color);
}
.card-level-label {
  overflow-wrap: anywhere;
}
.card-meta {
  grid-column: 3;
  grid-row: 2;
  align-self: baseline;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}
.meta {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.home-page main {
  width: min(calc(100% - 28px), 1120px);
  padding: 18px 0 64px;
}
.safety-notice-compact {
  display: flex;
  align-items: center;
  gap: 9px;
  border-width: 1px;
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 0.78rem;
  line-height: 1.45;
}
.safety-notice-compact > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: #503600;
  font-size: 0.78rem;
  font-weight: 900;
}
.safety-notice-compact p {
  margin: 0;
  line-height: inherit;
}
.map-section {
  padding: 18px;
  border: 1px solid #d8e0da;
  border-radius: 22px;
  background: #fff;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 2px 12px;
}
.section-heading h2 {
  margin: 0;
  color: var(--navy-dark);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}
.section-heading > p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.section-kicker {
  margin: 0 0 2px;
  color: var(--turquoise);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.2;
}
.location-section {
  margin-top: 30px;
}
.location-section .section-heading {
  align-items: center;
}
.location-section .update-line {
  flex: 0 0 auto;
  justify-content: flex-end;
  min-height: auto;
  margin: 0;
  color: #58656c;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}
.location-section .update-line[data-error='true'] {
  max-width: 60%;
  text-align: right;
  white-space: normal;
}

.sheet {
  width: min(calc(100% - 24px), 520px);
  max-height: calc(100dvh - 24px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  color: var(--ink);
}
.sheet::backdrop {
  background: rgb(33 26 20 / 55%);
}
.sheet-inner {
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  max-height: calc(100dvh - 24px);
}
.sheet-handle {
  width: 48px;
  height: 5px;
  margin: 2px auto 16px;
  border-radius: 8px;
  background: #c9c3b9;
}
.sheet-close {
  float: right;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #eee9df;
  font-size: 1.4rem;
}
.sheet-title {
  padding-right: 52px;
  margin-top: 6px;
}
.current-panel {
  margin: 18px 0;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #faf8f3;
}
.current-panel[data-level] {
  border-color: var(--level-color);
}
.current-level {
  margin: 2px 0 5px;
  font-size: 1.2rem;
  font-weight: 900;
}
.current-panel[data-level] .current-level {
  color: var(--level-color);
}
.current-caption {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.current-level-hero {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: clamp(1rem, 4vw, 1.25rem);
  line-height: 1.25;
}
.current-level-label {
  white-space: nowrap;
}
.fact-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 18px 0;
}
.fact-list dt {
  color: var(--muted);
}
.fact-list dd {
  margin: 0;
  font-weight: 650;
}
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.button,
.button-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  text-decoration: none;
}
.button {
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
}
.button:hover {
  background: var(--brand-dark);
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.button-secondary {
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.button-full {
  width: 100%;
}
.hidden {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.level-options {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 0;
  border: 0;
}
.level-options legend {
  margin-bottom: 10px;
  font-weight: 800;
}
.level-option {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-weight: 750;
}
.level-option:has(input:checked) {
  border-color: var(--level-color);
  background: color-mix(in srgb, var(--level-color) 8%, white);
}
.level-option input {
  width: 22px;
  height: 22px;
  accent-color: var(--level-color);
}
.level-chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--level-color);
  color: #fff;
  font-weight: 900;
}
.report-inline {
  margin-top: 20px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f4ea;
}
.report-inline-title {
  margin: 0;
  font-size: 1.05rem;
}
.report-inline-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.level-scale {
  margin: 14px 0 12px;
  padding: 0;
  border: 0;
}
.scale-row {
  display: grid;
  gap: 8px;
}
.scale-option {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 750;
}
.scale-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.scale-option .level-chip {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 3px solid var(--level-color);
  background: #fff;
  color: var(--level-color);
  font-size: 1rem;
}
.scale-option:has(input:checked) {
  border-color: var(--level-color);
  background: color-mix(in srgb, var(--level-color) 8%, white);
}
.scale-option:has(input:checked) .level-chip {
  background: var(--level-color);
  color: #fff;
}
.scale-option:has(input:focus-visible) .level-chip {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}
.scale-option-label {
  line-height: 1.4;
}
.form-field {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  font-weight: 700;
}
.form-field input {
  min-height: 48px;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
}
.confirm-box {
  min-height: 48px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f3efe6;
  line-height: 1.55;
}
.form-message {
  min-height: 26px;
  margin: 12px 0 0;
  font-weight: 750;
}
.form-message[data-kind='error'] {
  color: var(--red);
}
.form-message[data-kind='success'] {
  color: var(--green);
}

.staff-location-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.staff-location-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 88px;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 13px 12px;
  background: #fff;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
}
.staff-card-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}
.staff-location-card .order-badge {
  margin: 0;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  font-size: 0.84rem;
}
.staff-card-name {
  font-size: 0.92rem;
  line-height: 1.35;
}
.staff-card-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.staff-location-card[data-level] .staff-card-level {
  color: var(--level-color);
}
.staff-card-time {
  margin-left: auto;
  font-weight: 650;
  white-space: nowrap;
}
.staff-location-card[aria-pressed='true'] {
  border-color: var(--brand);
  background: #fff6f1;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.history-list {
  display: grid;
  gap: 12px;
}
.history-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.history-card[data-status='retracted'] {
  opacity: 0.65;
  text-decoration: line-through;
}
.history-card h3 {
  margin-bottom: 8px;
}
.history-actions {
  margin-top: 12px;
  text-decoration: none;
}
.history-card[data-status='retracted'] .history-actions {
  display: none;
}
@media (min-width: 620px) {
  .sheet {
    margin-bottom: 24px;
    border-radius: 22px;
  }
}

@media (max-width: 760px) {
  .section-heading {
    align-items: start;
  }
  .section-heading > p {
    max-width: 15rem;
    text-align: right;
  }
  .marker-label {
    display: none;
  }
  .map-marker[data-order='1'] {
    left: 20%;
  }
  .map-marker[data-order='2'],
  .map-marker[data-order='4'],
  .map-marker[data-order='5'] {
    left: 78%;
  }
}

@media (max-width: 520px) {
  .header-inner,
  main,
  .footer-inner {
    width: min(calc(100% - 24px), 780px);
  }
  .header-nav a {
    font-size: 0.76rem;
  }
  .brand {
    gap: 7px;
    font-size: 0.88rem;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }
  .home-page main {
    width: min(calc(100% - 20px), 1120px);
    padding-top: 14px;
  }
  .map-section {
    padding: 10px;
    border-radius: 17px;
  }
  .section-heading {
    display: block;
    margin: 2px 2px 10px;
  }
  .section-heading > p {
    margin-top: 3px;
    max-width: none;
    text-align: left;
  }
  .venue-map {
    aspect-ratio: 4 / 3;
    border-width: 1px;
    border-radius: 14px;
  }
  .marker-pin {
    width: 38px;
    height: 38px;
    border-width: 2px;
  }
  .venue-map figcaption {
    right: 6px;
    bottom: 6px;
    padding: 4px 7px;
    font-size: 0.62rem;
  }
  .location-section {
    margin-top: 24px;
  }
  .location-card {
    min-height: 86px;
  }
}

@media (max-width: 340px) {
  .location-card {
    padding: 8px;
  }
  .location-card-heading {
    gap: 6px;
  }
  .location-card-heading .order-badge {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 0.8rem;
  }
  .sheet-inner {
    padding-inline: 14px;
  }
  .current-panel {
    padding: 12px;
  }
  .current-level-hero {
    gap: 8px;
  }
}

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