:root {
  color-scheme: light;
  --page: #f4f7f4;
  --surface: #ffffff;
  --ink: #18302e;
  --muted: #657775;
  --line: #e1eae5;
  --soft: #eaf3ef;
  --green: #176b59;
  --green-dark: #104f43;
  --amber: #efad39;
  --amber-soft: #fff4dc;
  --room: #ffffff;
  --room-map: #edf2ef;
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(193, 224, 209, .3), transparent 34rem),
    var(--page);
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 89, .35);
  outline-offset: 2px;
}

.site-header {
  display: flex;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 20px 26px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: white;
  font-size: 19px;
  font-weight: 800;
}
.brand-copy strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.version-pill { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.75); color: var(--muted); font-size: 11px; }

.page-shell { max-width: 1180px; margin: 0 auto; padding: 12px 26px 60px; }
.intro-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 12px 0 26px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.045em; }
.intro-copy { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.quick-facts { display: flex; flex: 0 0 auto; gap: 8px; padding-bottom: 3px; }
.quick-facts span { padding: 10px 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); color: var(--muted); font-size: 11px; white-space: nowrap; }
.quick-facts strong { margin-right: 4px; color: var(--green-dark); font-size: 15px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(280px, .78fr); align-items: start; gap: 18px; }
.map-card, .guide-card { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 8px 28px rgba(24, 48, 46, .035); }
.map-card { padding: 20px; }
.guide-card { padding: 22px; }
.card-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.card-heading .eyebrow { margin-bottom: 4px; }
.card-heading h2, .guide-card h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.map-actions { display: flex; align-items: center; gap: 10px; }
.schematic-label { padding-bottom: 2px; color: var(--muted); font-size: 10px; text-align: right; }
.zoom-button { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--green-dark); font-size: 10px; font-weight: 700; cursor: pointer; }
.zoom-button:hover { background: var(--soft); }

.floorplan-frame {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  isolation: isolate;
}
.floorplan-image {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(.92) brightness(1.04);
}
.old-point-mask {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.99) 0 48%, rgba(255,255,255,.93) 68%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.old-c { top: 59.5%; left: 62.5%; width: 8.3%; height: 6.3%; }
.old-e { top: 92%; left: 45.4%; width: 10.8%; height: 7%; }
.map-point {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
}
.map-point.has-records::after {
  position: absolute;
  top: 1px;
  right: 0;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #21845e;
  color: #fff;
  content: "✓";
  font-size: 9px;
  font-weight: 900;
}
.map-point::before {
  display: grid;
  width: clamp(30px, 4.5cqi, 44px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #173f58;
  box-shadow: 0 3px 8px rgba(12, 34, 49, .24);
  color: #fff;
  content: attr(data-point);
  font-size: clamp(12px, 1.65cqi, 16px);
  font-weight: 800;
  transition: transform .14s ease, box-shadow .14s ease;
}
.map-point:hover::before { transform: scale(1.08); }
.map-point.is-selected::before { box-shadow: 0 0 0 4px rgba(239, 173, 57, .8), 0 3px 8px rgba(12, 34, 49, .24); }
.map-point-static { pointer-events: none; cursor: default; }
.point-a { top: 51.96%; left: 41.9%; }
.point-b { top: 64.2%; left: 37.9%; }
.point-c { top: 62.2%; left: 83%; }
.point-d { top: 78.4%; left: 45%; }
.point-e { top: 95.7%; left: 75.6%; }

.map-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 14px 2px 8px; color: var(--muted); font-size: 11px; }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: #173f58; }
.legend-saved { display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: #21845e; color: #fff; font-size: 10px; font-style: normal; font-weight: 900; }
.ap-dot { background: var(--amber); }
.e-position-note { margin: 9px 2px 0; color: #815817; font-size: 11px; }
.e-position-note strong { color: #6b4610; }

.zoom-dialog {
  width: min(1040px, calc(100% - 24px));
  max-width: 1040px;
  max-height: 94vh;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(10, 31, 27, .22);
}
.zoom-dialog::backdrop { background: rgba(17, 34, 31, .55); backdrop-filter: blur(3px); }
.zoom-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.zoom-heading .eyebrow { margin-bottom: 3px; }
.zoom-heading h2 { margin: 0; font-size: 18px; }
.zoom-hint { margin: 6px 0 12px; color: var(--muted); font-size: 11px; }
.zoom-scroll { max-height: calc(94vh - 105px); overflow: auto; overscroll-behavior: contain; border-radius: 12px; background: #f6f8f6; }
.zoom-frame { width: min(100%, 900px); margin: 0 auto; overflow: visible; }

.guide-card .eyebrow { margin-bottom: 7px; }
.guide-copy { margin: 10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.selection-preview { display: flex; min-height: 72px; align-items: center; gap: 12px; padding: 13px; border-radius: 15px; background: #f2f7f4; }
.selection-letter { display: grid; flex: 0 0 40px; height: 40px; place-items: center; border-radius: 12px; background: #dceee6; color: var(--green-dark); font-size: 15px; font-weight: 800; }
.selection-preview strong { display: block; font-size: 12px; }
.selection-preview small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.button-primary {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 11px;
  border: 0;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-primary:disabled { background: #dfe8e3; color: #7d8d86; cursor: not-allowed; }
.steps { display: grid; gap: 0; margin-top: 22px; }
.step { display: flex; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.step span { display: grid; flex: 0 0 29px; height: 29px; place-items: center; border-radius: 9px; background: var(--soft); color: var(--green); font-size: 10px; font-weight: 800; }
.step p { margin: 0; color: #344a46; font-size: 12px; }
.saved-total { margin: 17px 0 -7px; color: var(--green-dark); font-size: 11px; font-weight: 750; }
.prototype-note { margin: 16px 0 0; padding: 11px 12px; border-radius: 12px; background: var(--amber-soft); color: #795818; font-size: 10px; line-height: 1.5; }

.observation-dialog {
  width: min(540px, calc(100% - 28px));
  max-width: 540px;
  max-height: min(90vh, 860px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(10, 31, 27, .22);
}
.observation-dialog::backdrop { background: rgba(17, 34, 31, .48); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-header .eyebrow { margin-bottom: 5px; }
.dialog-header h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--page); color: var(--ink); font-size: 25px; cursor: pointer; }
.dialog-subtitle { margin: 8px 0 17px; color: var(--muted); font-size: 12px; }
.saved-records { margin: 0 0 17px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf9; }
.saved-records-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.saved-records-heading h3 { margin: 0; font-size: 11px; }
.new-record-button { flex: 0 0 auto; min-height: 32px; padding: 0 9px; border: 1px solid #cfe1d9; border-radius: 9px; background: #fff; color: var(--green-dark); font-size: 10px; font-weight: 750; cursor: pointer; }
.new-record-button:hover { background: var(--soft); }
.saved-record-list { display: grid; max-height: 145px; gap: 6px; overflow-y: auto; }
.saved-record-empty { margin: 0; padding: 8px 2px 2px; color: var(--muted); font-size: 10px; }
.saved-record-item { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.saved-record-item[aria-pressed="true"] { border-color: #72a894; background: #edf6f1; }
.saved-record-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.saved-record-item small { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.observation-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .environment-field legend { color: var(--ink); font-size: 11px; font-weight: 700; }
.field > span small { color: var(--muted); font-size: 10px; font-weight: 400; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.field textarea { min-height: 78px; resize: vertical; }
.environment-field legend { margin-bottom: 8px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkbox-grid label { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--page); color: #405652; font-size: 11px; }
.checkbox-grid input { accent-color: var(--green); }
.rssi-note { margin: -4px 0 0; padding: 10px 11px; border-radius: 11px; background: var(--soft); color: var(--green-dark); font-size: 10px; line-height: 1.5; }
.form-stage-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dialog-actions { display: flex; gap: 9px; padding-top: 2px; }
.dialog-actions .button-primary { width: auto; flex: 1; margin-top: 0; }
.button-secondary { min-width: 88px; min-height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.button-secondary:hover { background: var(--page); }

@media (max-width: 860px) {
  .intro-row { align-items: start; flex-direction: column; gap: 15px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-card { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .guide-card > .eyebrow, .guide-card > h2, .guide-copy, .selection-preview, .button-primary, .prototype-note { grid-column: 1 / -1; }
  .steps { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .site-header { padding: 14px 16px; }
  .page-shell { padding: 8px 14px 36px; }
  .version-pill { padding: 7px 9px; font-size: 9px; }
  .intro-row { margin: 10px 0 18px; }
  h1 { font-size: 29px; }
  .quick-facts { flex-wrap: wrap; }
  .map-card { padding: 13px; border-radius: 18px; }
  .card-heading { align-items: start; }
  .map-actions { align-items: end; flex-direction: column; gap: 6px; }
  .schematic-label { max-width: 135px; line-height: 1.4; }
  .floorplan-frame { border-radius: 11px; }
  .guide-card { display: block; padding: 17px; }
  .observation-dialog { padding: 18px; border-radius: 18px; }
  .zoom-dialog { width: calc(100% - 14px); padding: 12px; border-radius: 15px; }
  .zoom-scroll { max-height: calc(94vh - 100px); }
  .zoom-frame { width: 900px; max-width: none; margin: 0; }
}

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

/* Phase 1: participant journey */
[hidden] { display: none !important; }
.site-header { position: relative; z-index: 2; }
.version-pill { letter-spacing: .08em; font-size: 9px; font-weight: 800; }
.page-shell { padding-top: 12px; }
.page-screen { min-height: calc(100vh - 90px); }

.welcome-screen { position: relative; display: grid; place-items: center; padding: 28px 16px 54px; }
.welcome-screen[hidden] { display: none !important; }
.welcome-card { position: relative; width: min(100%, 540px); overflow: hidden; padding: 43px 48px 34px; border: 1px solid rgba(255,255,255,.85); border-radius: 28px; background: rgba(255,255,255,.92); box-shadow: 0 22px 70px rgba(23,63,56,.1); }
.welcome-card::before { position: absolute; top: -105px; right: -70px; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(202,232,215,.68), rgba(202,232,215,0) 70%); content: ""; pointer-events: none; }
.welcome-emblem { position: relative; display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 28px; border-radius: 19px; background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(23,107,89,.23); }
.welcome-emblem > span { font-size: 24px; font-weight: 900; }
.welcome-emblem i { position: absolute; right: -7px; bottom: -6px; display: grid; width: 25px; height: 25px; place-items: center; border: 2px solid white; border-radius: 50%; background: var(--amber); color: #573b09; font-size: 15px; font-style: normal; font-weight: 900; }
.welcome-card .eyebrow { margin-bottom: 10px; }
.welcome-card h1 { max-width: 430px; margin-bottom: 13px; font-size: clamp(34px, 5vw, 47px); }
.welcome-copy { max-width: 390px; margin-bottom: 27px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.welcome-form { display: grid; gap: 9px; }
.welcome-form > label { color: var(--ink); font-size: 12px; font-weight: 800; }
.welcome-form input, .welcome-form select { width: 100%; min-height: 51px; padding: 12px 14px; border: 1px solid #d8e4dd; border-radius: 13px; background: #fff; color: var(--ink); font-size: 15px; }
.welcome-form input::placeholder { color: #a4b1ab; }
.group-code-hint { color: var(--muted); font-size: 10px; }
.welcome-submit { margin-top: 3px; min-height: 51px; justify-content: space-between; padding: 0 17px; font-size: 13px; }
.welcome-error { margin: 0; color: #a52e31; font-size: 11px; }
.resume-team-button { min-height: 40px; margin-top: 2px; padding: 8px 12px; border: 1px solid #d9e8de; border-radius: 11px; background: #f5faf6; color: var(--green-dark); }
.resume-team-button:hover { background: #eaf4ed; text-decoration: none; }
.duplicate-resume-button { border-color: #efdfbd; background: #fff9ec; color: #785516; }
.duplicate-resume-button:hover { background: #fff1d6; }
.welcome-tip { display: flex; align-items: flex-start; gap: 11px; margin-top: 22px; padding: 13px 14px; border-radius: 13px; background: #f0f6f2; color: var(--green-dark); }
.welcome-tip > span { color: #cc9225; font-size: 15px; }
.welcome-tip p { margin: 0; color: #62736d; font-size: 10px; line-height: 1.65; }
.welcome-tip strong { color: var(--ink); font-size: 11px; }
.welcome-side-note { position: absolute; right: 1%; bottom: 18%; display: grid; justify-items: center; gap: 12px; color: #94a59c; font-size: 8px; font-weight: 800; letter-spacing: .17em; writing-mode: vertical-rl; }
.welcome-side-note i { width: 1px; height: 54px; background: #cbd8d0; }

.dashboard-intro { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin: 14px 0 20px; }
.dashboard-intro h1 { margin-bottom: 8px; font-size: clamp(29px, 3.2vw, 40px); }
.mobile-break { display: none; }
.active-team-card { display: flex; min-width: 194px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.9); }
.team-avatar { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: #e6f2eb; color: var(--green); font-size: 20px; font-weight: 800; }
.active-team-card > span:nth-child(2), .form-team-chip > span:nth-child(2) { flex: 1; min-width: 0; }
.active-team-card small, .form-team-chip small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; }
.active-team-card strong, .form-team-chip strong { display: block; color: var(--ink); font-size: 13px; }
.text-button { padding: 6px 3px; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.text-button:hover { color: var(--green-dark); text-decoration: underline; }

.dashboard-progress-strip { display: grid; grid-template-columns: 44px minmax(170px, 1fr) auto; align-items: center; gap: 13px; margin: 0 0 17px; padding: 14px 17px; border: 1px solid #e3ece6; border-radius: 17px; background: linear-gradient(100deg, #fff 0%, #f5faf6 100%); }
.progress-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #e7f2eb; color: var(--green); font-size: 23px; }
.progress-summary > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.progress-summary strong { font-size: 11px; }
.progress-summary #progress-fraction { color: var(--green-dark); font-size: 14px; font-weight: 850; }
.progress-summary #progress-fraction small { color: var(--muted); font-size: 9px; font-weight: 600; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e3ebe6; }
.progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #268d68, #76bd83); transition: width .25s ease; }
.progress-caption { color: var(--muted); font-size: 10px; white-space: nowrap; }
.workspace-grid { grid-template-columns: minmax(0, 1.48fr) minmax(270px, .72fr); gap: 17px; }
.map-card { padding: 18px; }
.map-card .card-heading { margin-bottom: 12px; }
.map-card .card-heading h2 { font-size: 18px; }
.guide-card.progress-card { display: block; padding: 20px; }
.progress-card-heading { display: flex; align-items: center; justify-content: space-between; }
.progress-card-heading .eyebrow { margin: 0; font-size: 9px; }
.checklist-count { padding: 6px 9px; border-radius: 9px; background: #eaf3ed; color: var(--green-dark); font-size: 10px; font-weight: 850; }
.progress-card h2 { margin: 12px 0 6px; font-size: 18px; }
.progress-card .guide-copy { margin: 0 0 10px; font-size: 11px; }
.point-checklist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.point-checklist li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; min-height: 48px; border-bottom: 1px solid #edf1ee; color: #344a46; font-size: 11px; }
.check-letter { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; background: #edf2ef; color: #64766f; font-size: 10px; font-weight: 850; }
.check-status { color: #98a49e; font-size: 9px; }
.point-checklist li.is-done .check-letter { background: #ddf1e5; color: #1c7957; }
.point-checklist li.is-done .check-status { color: #21845e; font-weight: 750; }
.reopen-button { min-height: 43px; margin-top: 14px; font-size: 11px; }
.finish-mission-button { min-height: 45px; margin-top: 8px; justify-content: space-between; padding: 0 14px; font-size: 11px; }
.finish-mission-button:disabled { opacity: .72; }
.finish-mission-hint { margin: 7px 1px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.dashboard-status { min-height: 15px; margin: 8px 0 0; color: var(--green); font-size: 10px; }
.sync-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.sync-now-button { min-height: 35px; padding: 0 12px; font-size: 10px; }
#connection-state { color: var(--muted); font-size: 9px; text-align: right; }
.privacy-note { display: flex; gap: 7px; margin: 9px 0 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.55; }
.privacy-note span { color: var(--green); }
.map-legend { gap: 8px 13px; font-size: 10px; }
.e-position-note { font-size: 10px; }
.map-point.has-records::before { background: #21845e; }

.mission-screen { display: grid; place-items: center; padding: 22px 12px 52px; }
.mission-screen[hidden] { display: none !important; }
.mission-card { position: relative; width: min(100%, 530px); overflow: hidden; padding: 36px 40px 30px; border: 1px solid #e4ede6; border-radius: 27px; background: #fff; box-shadow: 0 20px 62px rgba(23,63,56,.09); text-align: center; }
.mission-confetti { position: absolute; inset: 0 0 auto; height: 125px; pointer-events: none; }
.mission-confetti span { position: absolute; color: #e9b34c; font-size: 20px; }
.mission-confetti span:nth-child(1) { top: 22px; left: 16%; color: #75b58a; }
.mission-confetti span:nth-child(2) { top: 51px; right: 14%; font-size: 15px; }
.mission-confetti span:nth-child(3) { top: 16px; right: 25%; color: #8bbcaf; }
.mission-confetti span:nth-child(4) { top: 76px; left: 11%; font-size: 13px; }
.mission-confetti span:nth-child(5) { top: 90px; right: 21%; color: #77aa80; }
.mission-check { position: relative; display: grid; width: 70px; height: 70px; place-items: center; margin: 10px auto 17px; border: 8px solid #e7f4eb; border-radius: 50%; background: #27875f; color: #fff; font-size: 31px; font-weight: 900; box-shadow: 0 8px 21px rgba(39,135,95,.19); }
.mission-card .eyebrow { margin-bottom: 8px; font-size: 9px; }
.mission-card h1 { margin-bottom: 8px; font-size: clamp(29px, 4vw, 36px); }
.mission-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mission-score { display: grid; justify-items: center; gap: 2px; margin: 17px 0 12px; }
.mission-score strong { color: var(--green-dark); font-size: 38px; line-height: 1; }
.mission-score strong span { color: #91a49a; font-size: 19px; }
.mission-score small { color: var(--muted); font-size: 9px; }
.sync-status-card { margin: 14px 0; padding: 14px 15px; border: 1px solid #efdcae; border-radius: 14px; background: #fffaf0; text-align: left; }
.sync-status-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sync-status-heading > strong { color: #53645c; font-size: 10px; }
.sync-badge { padding: 5px 9px; border-radius: 999px; background: #f7e8c5; color: #795817; font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.sync-status-title { display: block; margin-bottom: 4px; color: #624b1d; font-size: 11px; }
.sync-status-card p { margin: 0; color: #786a4e; font-size: 10px; line-height: 1.6; }
.sync-status-card > small { display: block; margin-top: 7px; color: #6c7d73; font-size: 9px; }
.sync-status-card[data-sync-status="synced"] { border-color: #cde5d3; background: #f1f8f2; }
.sync-status-card[data-sync-status="synced"] .sync-badge { background: #dcefe1; color: #1f714f; }
.sync-status-card[data-sync-status="synced"] .sync-status-title { color: #1f714f; }
.sync-status-card[data-sync-status="synced"] p { color: #526d5b; }
.completed-points { display: flex; justify-content: center; gap: 8px; margin: 16px 0 18px; }
.completed-point { display: grid; min-width: 47px; height: 35px; place-items: center; padding: 0 8px; border: 1px solid #d8ebdf; border-radius: 11px; background: #f1f8f3; color: #21845e; font-size: 11px; font-weight: 850; }
.souvenir-code { display: grid; gap: 5px; padding: 13px; border: 1px dashed #b8d7c3; border-radius: 13px; background: #f8fbf8; }
.souvenir-code span { color: var(--muted); font-size: 9px; }
.souvenir-code strong { color: var(--green-dark); font-size: 18px; letter-spacing: .1em; }
.mission-map-button { min-height: 45px; margin-top: 14px; font-size: 11px; }

.observation-dialog { width: min(540px, calc(100% - 28px)); }
.point-record-state { margin: -8px 0 14px; color: var(--green-dark); font-size: 10px; }
.form-team-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f0f6f2; }
.dialog-actions { align-items: center; }

@media (max-width: 860px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .progress-card { display: grid !important; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .progress-card > * { grid-column: 1 / -1; }
  .welcome-side-note { right: 1px; }
}

@media (max-width: 600px) {
  .page-shell { padding: 7px 13px 30px; }
  .page-screen { min-height: calc(100vh - 72px); }
  .welcome-screen { padding: 14px 0 30px; }
  .welcome-card { padding: 30px 22px 23px; border-radius: 22px; }
  .welcome-emblem { width: 50px; height: 50px; margin-bottom: 24px; border-radius: 16px; }
  .welcome-card h1 { font-size: 34px; }
  .welcome-copy { font-size: 12px; }
  .welcome-side-note { display: none; }
  .dashboard-intro { align-items: start; flex-direction: column; gap: 12px; margin-top: 9px; }
  .dashboard-intro h1 { font-size: 31px; }
  .mobile-break { display: block; }
  .active-team-card { width: 100%; min-height: 56px; }
  .dashboard-progress-strip { grid-template-columns: 37px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .progress-icon { width: 36px; height: 36px; font-size: 20px; }
  .progress-caption { grid-column: 2; margin-top: -5px; font-size: 9px; }
  .map-card { padding: 12px; }
  .map-card .card-heading { gap: 5px; }
  .map-card .card-heading h2 { font-size: 16px; }
  .map-actions { gap: 7px; }
  .schematic-label { max-width: 110px; font-size: 9px; }
  .zoom-button { min-height: 33px; font-size: 9px; }
  .map-legend { gap: 8px 11px; }
  .progress-card { padding: 16px !important; }
  .point-checklist li { min-height: 44px; }
  .mission-screen { padding: 10px 0 28px; }
  .mission-card { padding: 29px 18px 24px; border-radius: 22px; }
  .sync-status-card { padding: 12px; }
  .completed-points { gap: 5px; }
  .completed-point { min-width: 43px; height: 33px; font-size: 10px; }
  .observation-dialog { padding: 17px; }
  .dialog-actions { gap: 7px; }
  .button-secondary { min-width: 98px; padding: 0 10px; font-size: 10px; }
  .save-button { font-size: 10px; }
}
