:root {
  --ink: #352316;
  --muted: #765f49;
  --paper: #fff5df;
  --paper-deep: #f6d99e;
  --green: #4f7c43;
  --blue: #22617b;
  --shadow: 0 18px 50px rgba(38, 22, 10, 0.28);
  --soft-shadow: 0 10px 24px rgba(38, 22, 10, 0.18);
  font-family: ui-rounded, "Nunito", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.45), transparent 20rem),
    linear-gradient(180deg, #8fc5d8 0%, #f5d496 78%, #d7a35d 100%);
}

button,
textarea { font: inherit; }
button { cursor: pointer; }

.phone-shell {
  width: min(100vw, 520px);
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
  background: #f7e2ac;
  box-shadow: 0 0 0 1px rgba(69, 43, 18, 0.18), var(--shadow);
}

.island-screen {
  position: relative;
  min-height: calc(100svh - max(0.7rem, env(safe-area-inset-bottom)));
  overflow: hidden;
  background: #f3d498;
}

.map-art {
  display: block;
  width: 100%;
  min-height: calc(100svh - max(0.7rem, env(safe-area-inset-bottom)));
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}

.map-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.map-label {
  --scroll-edge: 0.43rem;
  position: absolute;
  left: var(--label-x);
  top: var(--label-y);
  transform: translate(-50%, -50%);
  min-width: min(var(--label-w), 38vw);
  padding: 0.2rem 0.56rem 0.24rem;
  border: 1px solid rgba(116, 72, 28, 0.34);
  border-radius: 0.22rem 0.22rem 0.42rem 0.42rem / 0.18rem 0.18rem 0.34rem 0.34rem;
  color: #422615;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 249, 218, 0.86), transparent 58%),
    linear-gradient(180deg, rgba(251, 227, 166, 0.99), rgba(230, 190, 112, 0.99));
  box-shadow:
    0 0.08rem 0.14rem rgba(255, 255, 255, 0.54) inset,
    0 -0.08rem 0.16rem rgba(111, 67, 25, 0.18) inset,
    0 0.22rem 0.42rem rgba(35, 20, 8, 0.2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.72rem, 2.65vw, 0.96rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.018em;
  text-shadow: 0 0.045rem 0 rgba(255, 250, 223, 0.66);
}

.map-label::before,
.map-label::after {
  content: "";
  position: absolute;
  top: -0.04rem;
  width: var(--scroll-edge);
  height: calc(100% + 0.08rem);
  border: 1px solid rgba(116, 72, 28, 0.38);
  border-radius: 0.22rem 0.28rem 0.36rem 0.28rem;
  background:
    linear-gradient(90deg, rgba(184, 132, 59, 0.45), rgba(255, 232, 169, 0.98) 42%, rgba(213, 159, 78, 0.92));
  box-shadow:
    0 0.06rem 0.08rem rgba(255, 255, 255, 0.42) inset,
    0 0.1rem 0.18rem rgba(35, 20, 8, 0.16);
}

.map-label::before {
  left: calc(var(--scroll-edge) * -0.55);
}

.map-label::after {
  right: calc(var(--scroll-edge) * -0.55);
  transform: scaleX(-1);
}

.map-label-two-line {
  --scroll-edge: 0.38rem;
  min-width: min(7.8rem, 33vw);
  padding-top: 0.18rem;
  padding-bottom: 0.2rem;
  font-size: clamp(0.68rem, 2.45vw, 0.88rem);
  line-height: 0.96;
}

@media (max-width: 390px) {
  .map-label {
    --scroll-edge: 0.36rem;
    font-size: clamp(0.64rem, 2.48vw, 0.78rem);
    padding-left: 0.42rem;
    padding-right: 0.42rem;
  }

  .map-label-two-line {
    --scroll-edge: 0.34rem;
    min-width: min(7rem, 32vw);
    font-size: clamp(0.61rem, 2.28vw, 0.72rem);
  }
}


.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  border-radius: 22px;
  padding: 0;
}

.hotspot span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hotspot:focus-visible {
  outline: 4px solid rgba(255, 217, 86, 0.95);
  outline-offset: 2px;
  background: rgba(255, 245, 190, 0.18);
}

.event-location::after {
  content: "";
  position: absolute;
  left: 35%;
  top: 15%;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
}

.event-location.pulse::after {
  animation: eventPulse 1.2s ease-out 3;
  box-shadow: 0 0 0 0 rgba(255, 225, 92, 0.85);
  opacity: 1;
}

@keyframes eventPulse {
  0% { transform: scale(0.7); box-shadow: 0 0 0 0 rgba(255, 225, 92, 0.9); }
  70% { transform: scale(2.1); box-shadow: 0 0 0 24px rgba(255, 225, 92, 0); }
  100% { transform: scale(0.7); box-shadow: 0 0 0 0 rgba(255, 225, 92, 0); }
}

.status-card {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: max(9.4rem, env(safe-area-inset-bottom) + 8.8rem);
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), 440px);
  padding: 0.85rem 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(126, 81, 33, 0.28);
  background: rgba(255, 247, 226, 0.94);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(8px);
}

.status-card.hidden { display: none; }

.status-dismiss {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(126, 81, 33, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 242, 202, 0.98);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 6px 14px rgba(38, 22, 10, 0.16);
  font-size: 0;
  line-height: 1;
}

.status-dismiss span {
  display: none;
}

.status-dismiss::before,
.status-dismiss::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.9rem;
  height: 0.12rem;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.status-dismiss::before { transform: translate(-50%, -50%) rotate(45deg); }
.status-dismiss::after { transform: translate(-50%, -50%) rotate(-45deg); }

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 0.38rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  color: #315d32;
  background: rgba(222, 246, 202, 0.92);
  border: 1px solid rgba(79, 124, 67, 0.28);
  font-size: 0.78rem;
  font-weight: 1000;
}

.status-badge.hidden {
  display: none;
}

.status-card h1 { margin: 0; padding-right: 2rem; font-size: 1.1rem; }
.status-card p { margin: 0.35rem 0 0; line-height: 1.35; }


.status-dismiss:hover {
  filter: brightness(0.98);
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.primary-button { color: white; background: linear-gradient(135deg, #2f708a, #184b60); }
.secondary-button { color: var(--ink); background: #fff2ca; }

.modal {
  width: min(calc(100vw - 2rem), 430px);
  border: 1px solid rgba(126, 81, 33, 0.3);
  border-radius: 28px;
  padding: 1.1rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 235, 0.97), rgba(255, 238, 192, 0.97));
  box-shadow: var(--shadow);
}

.modal::backdrop { background: rgba(37, 24, 12, 0.42); backdrop-filter: blur(3px); }
.modal h2 { margin: 0; font-size: 1.35rem; }
.modal p { line-height: 1.45; }
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: #fff2ca;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  font-size: 0;
  font-weight: 900;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.05rem;
  height: 0.14rem;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.modal-heading-row { display: flex; gap: 0.75rem; align-items: center; }
.modal-heading-row img { width: 64px; height: 64px; object-fit: contain; }
.modal-heading-row p { margin: 0.2rem 0 0; color: var(--muted); font-weight: 800; }
.callout,
.message-preview {
  margin: 0.8rem 0;
  padding: 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(126, 81, 33, 0.18);
}
label { display: block; margin: 0.7rem 0 0.35rem; font-weight: 900; color: var(--muted); }
textarea {
  width: 100%;
  border: 1px solid rgba(126, 81, 33, 0.24);
  border-radius: 18px;
  padding: 0.8rem;
  resize: vertical;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}
.log-list { padding-left: 1.1rem; }
.log-list li { margin: 0.5rem 0; line-height: 1.35; }

.visitor-card {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top) + 0.55rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), 390px);
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(126, 81, 33, 0.22);
  border-radius: 20px;
  background: rgba(255, 247, 226, 0.9);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(8px);
  z-index: 3;
}

.visitor-card .eyebrow { margin-bottom: 0.35rem; }

.visitor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.visitor-button {
  border: 1px solid rgba(126, 81, 33, 0.2);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.visitor-button.active {
  color: white;
  background: linear-gradient(135deg, #4f7c43, #2f5f41);
}

.visitor-card p:last-child {
  margin: 0.42rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.message-meta {
  margin: -0.35rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

@media (min-width: 700px) {
  body { padding: 1.25rem; }
  .phone-shell { border-radius: 34px; overflow: hidden; min-height: calc(100svh - 2.5rem); }
  .island-screen { min-height: calc(100svh - 2.5rem); }
  .map-art { min-height: calc(100svh - 2.5rem); }
}


.switch-help {
  margin-top: 0.35rem !important;
  color: #24556b !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
}

.review-callout {
  margin: 0.75rem 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(34, 97, 123, 0.32);
  border-radius: 16px;
  background: rgba(219, 246, 255, 0.78);
  color: #24556b;
  font-weight: 900;
  line-height: 1.35;
}

.visitor-card {
  border: 2px solid rgba(34, 97, 123, 0.42);
  background: rgba(255, 250, 229, 0.96);
  z-index: 8;
}

.visitor-button {
  min-height: 2.45rem;
  font-size: 1rem;
}

@media (max-height: 720px) {
  .visitor-card {
    width: min(calc(100% - 1rem), 390px);
    padding: 0.45rem 0.55rem;
  }
  .visitor-card p:last-child,
  .switch-help { font-size: 0.72rem !important; }
}

#logSummary {
  margin: 0.45rem 0 0.7rem;
  color: var(--muted);
  font-weight: 800;
}

.log-list {
  display: grid;
  gap: 0.55rem;
  max-height: min(52vh, 440px);
  overflow: auto;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.log-entry {
  display: grid;
  grid-template-columns: 2.55rem 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.72rem;
  border: 1px solid rgba(126, 81, 33, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.log-avatar {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 2px solid rgba(126, 81, 33, 0.2);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 242, 202, 0.95);
  box-shadow: 0 5px 12px rgba(38, 22, 10, 0.12);
}

.log-avatar img {
  width: 115%;
  height: 115%;
  object-fit: contain;
  object-position: center;
}

.log-avatar-symbol {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 900;
}

.log-avatar-island {
  background: rgba(219, 246, 255, 0.72);
}

.log-content strong {
  display: block;
  font-size: 0.95rem;
}

.log-content p {
  margin: 0.25rem 0;
  color: var(--ink);
}

.log-content small {
  color: var(--muted);
  font-weight: 800;
}

.empty-log {
  display: block;
  color: var(--muted);
  font-weight: 800;
}


.event-location.event-completed::before {
  content: "✓";
  position: absolute;
  left: 32%;
  top: 10%;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(79, 124, 67, 0.92);
  box-shadow: 0 8px 18px rgba(38, 22, 10, 0.22);
  font-weight: 1000;
  pointer-events: none;
}

.event-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0.9rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  color: #24556b;
  background: rgba(219, 246, 255, 0.85);
  border: 1px solid rgba(34, 97, 123, 0.22);
  font-size: 0.82rem;
  font-weight: 1000;
}

.event-state-pill.complete {
  color: #315d32;
  background: rgba(222, 246, 202, 0.9);
  border-color: rgba(79, 124, 67, 0.26);
}

.event-state-pill.ready {
  color: #6d4d16;
  background: rgba(255, 241, 190, 0.92);
  border-color: rgba(201, 144, 31, 0.30);
}

.testing-button {
  border: 1px dashed rgba(126, 81, 33, 0.38);
  background: rgba(255, 250, 235, 0.96);
}


.character-marker {
  position: absolute;
  display: none;
  place-items: center;
  width: 3.35rem;
  height: 3.35rem;
  border: 2px solid rgba(255, 247, 226, 0.92);
  border-radius: 999px;
  background: rgba(255, 242, 202, 0.74);
  box-shadow: 0 0.6rem 1.2rem rgba(38, 22, 10, 0.22);
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0.25rem 0.22rem rgba(38, 22, 10, 0.16));
  transition: left 180ms ease, top 180ms ease, transform 180ms ease;
}

.character-marker.visited {
  display: grid;
}

.character-marker.active {
  border-color: rgba(255, 225, 92, 0.98);
  background: rgba(255, 252, 221, 0.92);
  transform: translate(-50%, -50%) scale(1.08);
}

.character-marker img {
  width: 118%;
  height: 118%;
  object-fit: contain;
  object-position: center;
}

.character-marker span {
  position: absolute;
  left: 50%;
  bottom: -0.65rem;
  transform: translateX(-50%);
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 247, 226, 0.96);
  box-shadow: 0 0.25rem 0.65rem rgba(38, 22, 10, 0.14);
  font-size: 0.62rem;
  font-weight: 1000;
  line-height: 1;
}

.marker-glen { left: 25%; top: 52%; }
.marker-sam { left: 25%; top: 66%; }


.helper-marker {
  position: absolute;
  left: 55.5%;
  top: 57.5%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border: 2px solid rgba(255, 247, 226, 0.94);
  border-radius: 999px;
  background: rgba(255, 242, 202, 0.84);
  box-shadow: 0 0.6rem 1.2rem rgba(38, 22, 10, 0.22);
  transform: translate(-50%, -50%);
  padding: 0;
  filter: drop-shadow(0 0.25rem 0.22rem rgba(38, 22, 10, 0.16));
}

.helper-marker::after {
  content: "?";
  position: absolute;
  right: -0.25rem;
  top: -0.3rem;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  color: #ffffff;
  background: #4f7c43;
  border: 2px solid rgba(255, 247, 226, 0.95);
  font-size: 0.72rem;
  font-weight: 1000;
  line-height: 1;
}

.helper-marker:focus-visible {
  outline: 4px solid rgba(255, 217, 86, 0.95);
  outline-offset: 4px;
}

.helper-marker img {
  width: 118%;
  height: 118%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.helper-marker span {
  position: absolute;
  left: 50%;
  bottom: -0.65rem;
  transform: translateX(-50%);
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 247, 226, 0.96);
  box-shadow: 0 0.25rem 0.65rem rgba(38, 22, 10, 0.14);
  font-size: 0.62rem;
  font-weight: 1000;
  line-height: 1;
  pointer-events: none;
}

.presence-summary {
  margin: 0.3rem 0 0 !important;
  color: #315d32 !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
}

@media (max-height: 720px) {
  .character-marker {
    width: 2.85rem;
    height: 2.85rem;
  }
  .character-marker span { font-size: 0.56rem; }
  .helper-marker { width: 2.85rem; height: 2.85rem; }
  .helper-marker span { font-size: 0.56rem; }
}


/* Phone identity polish */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visitor-pill {
  position: absolute;
  top: max(4.55rem, env(safe-area-inset-top) + 4.1rem);
  left: 0.75rem;
  max-width: 11.5rem;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(126, 81, 33, 0.22);
  border-radius: 999px;
  background: rgba(255, 247, 226, 0.86);
  box-shadow: 0 8px 18px rgba(38, 22, 10, 0.12);
  backdrop-filter: blur(8px);
  z-index: 4;
  pointer-events: none;
}

.visitor-pill p {
  margin: 0;
  line-height: 1.1;
}

.visitor-pill .eyebrow {
  font-size: 0.58rem;
}

.visitor-pill #currentVisitorText {
  margin-top: 0.05rem;
  font-size: 0.82rem;
  font-weight: 950;
  color: var(--ink);
}


.birthday-replay-pill {
  position: absolute;
  top: max(4.65rem, env(safe-area-inset-top) + 4.16rem);
  right: 0.72rem;
  z-index: 7;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 81, 33, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 247, 226, 0.62);
  box-shadow: 0 6px 14px rgba(38, 22, 10, 0.10);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-size: 0.98rem;
  line-height: 1;
}

.birthday-replay-pill.hidden { display: none; }

.birthday-replay-pill:hover,
.birthday-replay-pill:focus-visible {
  filter: brightness(0.98);
}

.alpha-callout,
.review-callout {
  margin: 0.75rem 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(34, 97, 123, 0.32);
  border-radius: 16px;
  background: rgba(219, 246, 255, 0.78);
  color: #24556b;
  font-weight: 900;
  line-height: 1.35;
}

.identity-modal::backdrop {
  background: rgba(26, 40, 34, 0.38);
  backdrop-filter: blur(5px);
}

.visitor-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.visitor-choice-card {
  display: grid;
  place-items: center;
  gap: 0.45rem;
  min-height: 8.4rem;
  border: 1px solid rgba(126, 81, 33, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-weight: 950;
  font-size: 1rem;
  box-shadow: 0 10px 20px rgba(38, 22, 10, 0.12);
}

.visitor-choice-card img {
  width: min(6rem, 33vw);
  height: 5.5rem;
  object-fit: contain;
}

@media (max-height: 720px) {
  .visitor-pill {
    padding: 0.34rem 0.52rem;
  }

  .visitor-pill #currentVisitorText {
    font-size: 0.76rem;
  }

  .visitor-choice-card {
    min-height: 7.2rem;
  }
}


/* Phone polish step 2: welcome and stronger event framing */
.welcome-modal .welcome-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.85rem 0 1rem;
  padding-left: 1.1rem;
  line-height: 1.35;
}

.welcome-modal .welcome-list li {
  padding-left: 0.15rem;
}

.full-width-button {
  width: 100%;
  margin-top: 0.25rem;
}

.event-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.75rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(79, 124, 67, 0.28);
  border-radius: 999px;
  background: rgba(223, 247, 204, 0.92);
  color: #315d32;
  font-size: 0.82rem;
  font-weight: 1000;
}

.event-kicker::before {
  content: "★";
  color: #c8901f;
}

.event-callout {
  border-color: rgba(79, 124, 67, 0.28);
  background: rgba(255, 252, 221, 0.8);
  font-weight: 850;
}

.event-result-modal h2 {
  padding-right: 2.2rem;
}

.event-scene {
  position: relative;
  min-height: 9rem;
  margin: 0.85rem 0;
  border: 1px solid rgba(126, 81, 33, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 82%, rgba(117, 154, 77, 0.34), transparent 6.5rem),
    linear-gradient(180deg, rgba(223, 246, 255, 0.8), rgba(255, 245, 202, 0.9));
}

.event-scene::after {
  content: "Daisy tried. The onion declined.";
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.5rem);
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.92);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(38, 22, 10, 0.12);
}

.event-scene-daisy {
  position: absolute;
  left: 16%;
  bottom: 1.2rem;
  width: 7.2rem;
  height: 6.2rem;
  object-fit: contain;
  filter: drop-shadow(0 0.45rem 0.35rem rgba(38, 22, 10, 0.18));
}

.event-scene-onion {
  position: absolute;
  right: 20%;
  bottom: 1.95rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 5.25rem;
  border-radius: 0.75rem 0.75rem 0.9rem 0.9rem;
  background:
    linear-gradient(180deg, #2f7437 0%, #3f8a3f 48%, #82ad55 49%, #e8e2bd 69%, #f8f2d8 100%);
  box-shadow: 0 0.5rem 0.6rem rgba(38, 22, 10, 0.18);
  transform: rotate(-4deg);
}

.event-scene-onion::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1.75rem;
  width: 0.52rem;
  height: 2.45rem;
  border-radius: 999px 999px 0 0;
  background: #2f7437;
  box-shadow:
    -0.55rem 0.35rem 0 -0.06rem #397f3b,
    0.55rem 0.3rem 0 -0.05rem #3f8a3f;
  transform: translateX(-50%);
}

.event-scene-onion::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.34rem;
  width: 1.3rem;
  height: 0.55rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 22% 50%, #d7c98e 0 0.08rem, transparent 0.09rem),
    radial-gradient(circle at 50% 60%, #d7c98e 0 0.08rem, transparent 0.09rem),
    radial-gradient(circle at 78% 50%, #d7c98e 0 0.08rem, transparent 0.09rem);
  transform: translateX(-50%);
}

.onion-face {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  color: #315d32;
  font-size: 0.58rem;
  font-weight: 1000;
}

.reward-callout {
  margin: 0.8rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(201, 144, 31, 0.34);
  border-radius: 18px;
  background: rgba(255, 241, 190, 0.78);
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
}

.reward-callout.hidden {
  display: none;
}

/* Phone polish step 9: final phone comfort pass */
html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}

button,
textarea,
a {
  -webkit-tap-highlight-color: rgba(255, 225, 92, 0.28);
}

button {
  touch-action: manipulation;
}

.phone-shell {
  min-height: 100dvh;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.island-screen,
.map-art {
  min-height: calc(100dvh - max(1rem, env(safe-area-inset-bottom)));
}

.hotspot {
  min-width: 44px;
  min-height: 44px;
}

.nav-hotspot {
  min-height: 4.1rem;
  transform: translate(-50%, -57%);
}

.status-card {
  bottom: max(10.3rem, env(safe-area-inset-bottom) + 9.5rem);
  max-height: min(35dvh, 18rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.status-dismiss,
.modal-close {
  min-width: 44px;
  min-height: 44px;
}

.primary-button,
.secondary-button,
.visitor-choice-card {
  min-height: 44px;
}

.modal {
  max-height: calc(100dvh - max(2rem, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 1.5rem));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

textarea {
  min-height: 7rem;
}

.log-list {
  max-height: min(48dvh, 430px);
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
}

@media (max-height: 720px) {
  .status-card {
    bottom: max(9.2rem, env(safe-area-inset-bottom) + 8.6rem);
    max-height: 31dvh;
    padding: 0.72rem 0.82rem;
  }

  .modal {
    padding: 0.95rem;
  }

  .button-row {
    gap: 0.42rem;
  }
}

.event-action-modal .event-action-location {
  margin: 0.25rem 0 0.65rem;
  color: var(--muted);
  font-weight: 900;
}

.event-action-modal .event-action-buttons .primary-button {
  flex: 1 1 100%;
}

.event-action-modal .event-callout {
  margin-top: 0.8rem;
}

.location-mode .map-labels,
.location-mode .character-marker,
.location-mode .helper-marker,
.location-mode .location-hotspot,
.location-mode .visitor-pill {
  opacity: 0;
  pointer-events: none;
}

.location-view-hotspots.hidden {
  display: none;
}

.location-view-hotspots {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.scene-action-hotspot,
.scene-close-hotspot {
  position: absolute;
  inset: 0 auto auto 0;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  transform: translate(-50%, -50%);
  opacity: 0;
  border: 0;
  background: transparent;
  z-index: 7;
}

.location-mode .nav-overlays {
  z-index: 8;
}

.location-mode .status-card {
  z-index: 9;
}

/* Location-view framework fix:
   keep scene action hotspots tappable without blocking the baked-in bottom nav buttons. */
.location-view-hotspots {
  pointer-events: none;
}

.scene-action-hotspot,
.scene-close-hotspot {
  pointer-events: auto;
}

.location-mode .nav-hotspot {
  z-index: 30;
  pointer-events: auto;
}

.location-mode .scene-action-hotspot,
.location-mode .scene-close-hotspot {
  z-index: 20;
}


/* Clean8 Garden proof: Garden uses cleaned art with minimal dynamic overlays; other locations retain Clean7 fallback cover. */
.scene-context-badge { display: none; }

.scene-clean-header {
  position: absolute;
  left: 1.8%;
  top: max(0.45rem, env(safe-area-inset-top) + 0.22rem);
  width: 96.4%;
  height: 17.4%;
  box-sizing: border-box;
  z-index: 7;
  pointer-events: none;
  padding: 0.78rem 0.9rem 1.15rem;
  border-radius: 1.4rem 1.4rem 1.1rem 1.1rem;
  border: 2px solid rgba(102, 62, 23, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 242, 205, 0.98) 0%, rgba(245, 219, 166, 0.96) 70%, rgba(245, 219, 166, 0.80) 100%);
  box-shadow:
    inset 0 0 1.2rem rgba(255, 250, 228, 0.72),
    0 0.35rem 0.9rem rgba(55, 33, 13, 0.15);
  color: #3f2813;
}

.scene-clean-header.hidden { display: none; }

.scene-clean-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: rgba(71, 43, 17, 0.78);
}

.scene-clean-title-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.35rem auto 0.22rem;
  width: min(72%, 18rem);
  min-height: 3.25rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(96, 55, 18, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 237, 192, 0.98), rgba(221, 168, 87, 0.94));
  box-shadow:
    inset 0 0 0.85rem rgba(255, 248, 216, 0.65),
    0 0.22rem 0.32rem rgba(56, 32, 10, 0.16);
}

.scene-clean-title-row h1 {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.55rem);
  font-weight: 850;
  line-height: 1;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
}

.scene-clean-close {
  position: absolute;
  right: 0.95rem;
  top: 78%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  border: 2px solid rgba(100, 55, 18, 0.36);
  background: linear-gradient(180deg, rgba(255, 229, 169, 0.98), rgba(223, 166, 78, 0.96));
  box-shadow: inset 0 0 0.7rem rgba(255, 250, 229, 0.74), 0 0.15rem 0.28rem rgba(54, 33, 12, 0.22);
  font-size: 1.75rem;
  font-weight: 900;
}

.scene-clean-header p {
  margin: 0 auto;
  max-width: 86%;
  font-size: 0.86rem;
  line-height: 1.25;
  text-align: center;
  font-weight: 750;
}

.location-mode[data-scene="birthday-hug"] .scene-clean-header { display: none; }

/* Birthday launch: simple private PIN gate and replayable Sam birthday tour. */
.pin-modal .pin-input {
  width: 100%;
  margin: 0.35rem 0 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(126, 81, 33, 0.24);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.pin-error {
  margin: 0.25rem 0 0.65rem;
  color: #8f362f;
  font-weight: 900;
}

.pin-error.hidden {
  display: none;
}

.birthday-tour-card {
  position: absolute;
  z-index: 42;
  left: 50%;
  bottom: max(9.35rem, env(safe-area-inset-bottom) + 8.8rem);
  transform: translateX(-50%);
  width: min(calc(100% - 1.7rem), 450px);
  padding: 0.9rem 1rem 0.95rem;
  border: 1px solid rgba(126, 81, 33, 0.26);
  border-radius: 24px;
  color: var(--ink);
  background:
    radial-gradient(90% 140% at 50% 0%, rgba(255, 250, 226, 0.24), rgba(255, 250, 226, 0.04) 72%),
    linear-gradient(180deg, rgba(255, 245, 218, 0.34), rgba(242, 211, 151, 0.24));
  box-shadow: 0 10px 24px rgba(56, 34, 16, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(2px) saturate(1.02);
  -webkit-backdrop-filter: blur(2px) saturate(1.02);
}

.birthday-tour-card.hidden { display: none; }

.birthday-tour-hug-step .birthday-tour-card {
  top: max(4.6rem, env(safe-area-inset-top) + 4rem);
  bottom: auto;
  padding: 0.72rem 0.86rem 0.78rem;
  background:
    radial-gradient(90% 140% at 50% 0%, rgba(255, 250, 226, 0.18), rgba(255, 250, 226, 0.03) 72%),
    linear-gradient(180deg, rgba(255, 245, 218, 0.26), rgba(242, 211, 151, 0.18));
  backdrop-filter: blur(1.5px) saturate(1.01);
  -webkit-backdrop-filter: blur(1.5px) saturate(1.01);
}

.birthday-tour-hug-step .birthday-tour-card h1 {
  font-size: clamp(1.14rem, 4.4vw, 1.46rem);
  margin-bottom: 0.32rem;
}

.birthday-tour-hug-step .birthday-tour-card p {
  line-height: 1.25;
}

.birthday-tour-hug-step .birthday-tour-buttons {
  margin-top: 0.52rem;
}

.birthday-tour-card h1 {
  margin: 0.1rem 0 0.45rem;
  font-size: clamp(1.25rem, 5vw, 1.62rem);
  line-height: 1.05;
}

.birthday-tour-card h1,
.birthday-tour-card p,
.birthday-tour-card .eyebrow {
  text-shadow: 0 1px 2px rgba(255, 250, 235, 0.92), 0 0 10px rgba(255, 250, 235, 0.72), 0 0 2px rgba(78, 46, 22, 0.18);
}

.birthday-tour-card p {
  margin: 0.35rem 0;
  font-weight: 760;
  line-height: 1.38;
}

.birthday-tour-buttons {
  margin-top: 0.75rem;
}

.birthday-tour-buttons .primary-button,
.birthday-tour-buttons .secondary-button {
  flex: 1 1 5.8rem;
  padding: 0.66rem 0.8rem;
}

.birthday-tour-buttons button:disabled {
  opacity: 0.45;
  cursor: default;
}

.birthday-tour-active .location-view-hotspots {
  pointer-events: none;
}

.birthday-tour-active .nav-hotspot {
  pointer-events: auto;
}

@media (max-height: 720px) {
  .birthday-tour-card {
    bottom: max(8.9rem, env(safe-area-inset-bottom) + 8.2rem);
    padding: 0.72rem 0.82rem 0.78rem;
  }

  .birthday-tour-card p {
    line-height: 1.3;
  }
}


/* Clean8 Garden proof pass:
   Garden's cleaned image no longer needs the oversized Clean7 header cover.
   Keep other location screens on the Clean7 fallback until their images are cleaned. */
.location-mode[data-scene="garden"] .scene-clean-header {
  display: none;
}

.scene-sign-overlay {
  position: absolute;
  left: 49.4%;
  top: 67.7%;
  width: 27%;
  min-height: 3.1rem;
  transform: translate(-50%, -50%) rotate(2.5deg);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.38rem;
  color: #4b2e16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.72rem, 3.1vw, 1rem);
  font-weight: 800;
  line-height: 0.95;
  text-align: center;
  text-shadow: 0 0.045rem 0 rgba(255, 246, 214, 0.78);
  pointer-events: none;
}

.scene-sign-overlay.hidden {
  display: none;
}

.location-mode[data-scene="garden"] .scene-action-hotspot {
  opacity: 1;
  border: 1px solid rgba(98, 58, 21, 0.32);
  border-radius: 1rem;
  color: #3f2813;
  background:
    radial-gradient(85% 130% at 50% 0%, rgba(255, 249, 220, 0.95), rgba(255, 249, 220, 0.48) 70%),
    linear-gradient(180deg, rgba(249, 226, 176, 0.96), rgba(222, 173, 98, 0.93));
  box-shadow:
    inset 0 0 0.75rem rgba(255, 250, 229, 0.68),
    0 0.18rem 0.45rem rgba(43, 27, 12, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.74rem, 3.1vw, 1.02rem);
  font-weight: 800;
  line-height: 1.02;
  text-align: center;
}

.location-mode[data-scene="garden"] .scene-action-hotspot span {
  display: block;
  padding: 0.32rem;
}

.location-mode[data-scene="garden"] .scene-action-hotspot.hidden {
  display: none;
}

.location-mode[data-scene="garden"] .scene-close-hotspot {
  opacity: 1;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 2px solid rgba(98, 58, 21, 0.36);
  border-radius: 999px;
  color: #4b2d16;
  background: linear-gradient(180deg, rgba(255, 229, 169, 0.98), rgba(223, 166, 78, 0.96));
  box-shadow: inset 0 0 0.7rem rgba(255, 250, 229, 0.72), 0 0.16rem 0.32rem rgba(54, 33, 12, 0.22);
  font-size: 0;
}

.location-mode[data-scene="garden"] .scene-close-hotspot::before {
  content: "×";
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.location-mode[data-scene="garden"] .scene-close-hotspot span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}


/* Clean9 Garden live proof:
   The Garden proof image now contains the polished sign, Daisy bubble, and primary parchment button.
   Keep click behavior with invisible hotspots so the visual quality comes from the approved art, not browser-style controls. */
.location-mode[data-scene="garden"] .scene-sign-overlay {
  display: none;
}

.location-mode[data-scene="garden"] #sceneActionPrimaryButton {
  --x: 50% !important;
  --y: 79.4% !important;
  --w: 46% !important;
  --h: 7.3% !important;
  opacity: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.location-mode[data-scene="garden"] #sceneActionPrimaryButton span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.location-mode[data-scene="garden"] .scene-close-hotspot {
  opacity: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.location-mode[data-scene="garden"] .scene-close-hotspot::before {
  content: "";
}


/* Clean10 repair2 location rollout test:
   Rebuilt from untouched Clean9 app logic. The six new cleaned location screens use baked illustrated UI.
   Keep runtime behavior through invisible hotspots only; do not show the old Clean7 header cover. */
.location-mode[data-scene="lookout"] .scene-clean-header,
.location-mode[data-scene="mystery-rock"] .scene-clean-header,
.location-mode[data-scene="cabin"] .scene-clean-header,
.location-mode[data-scene="campfire"] .scene-clean-header,
.location-mode[data-scene="message-dock"] .scene-clean-header,
.location-mode[data-scene="beach"] .scene-clean-header {
  display: none;
}

.location-mode[data-scene="lookout"] .scene-sign-overlay,
.location-mode[data-scene="mystery-rock"] .scene-sign-overlay,
.location-mode[data-scene="cabin"] .scene-sign-overlay,
.location-mode[data-scene="campfire"] .scene-sign-overlay,
.location-mode[data-scene="message-dock"] .scene-sign-overlay,
.location-mode[data-scene="beach"] .scene-sign-overlay {
  display: none;
}

.location-mode[data-scene="lookout"] .scene-close-hotspot,
.location-mode[data-scene="mystery-rock"] .scene-close-hotspot,
.location-mode[data-scene="cabin"] .scene-close-hotspot,
.location-mode[data-scene="campfire"] .scene-close-hotspot,
.location-mode[data-scene="message-dock"] .scene-close-hotspot,
.location-mode[data-scene="beach"] .scene-close-hotspot {
  opacity: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.location-mode[data-scene="lookout"] .scene-close-hotspot::before,
.location-mode[data-scene="mystery-rock"] .scene-close-hotspot::before,
.location-mode[data-scene="cabin"] .scene-close-hotspot::before,
.location-mode[data-scene="campfire"] .scene-close-hotspot::before,
.location-mode[data-scene="message-dock"] .scene-close-hotspot::before,
.location-mode[data-scene="beach"] .scene-close-hotspot::before {
  content: "";
}

.location-mode[data-scene="lookout"] #sceneActionPrimaryButton,
.location-mode[data-scene="mystery-rock"] #sceneActionPrimaryButton,
.location-mode[data-scene="cabin"] #sceneActionPrimaryButton,
.location-mode[data-scene="campfire"] #sceneActionPrimaryButton,
.location-mode[data-scene="message-dock"] #sceneActionPrimaryButton,
.location-mode[data-scene="beach"] #sceneActionPrimaryButton {
  opacity: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.location-mode[data-scene="lookout"] #sceneActionPrimaryButton span,
.location-mode[data-scene="mystery-rock"] #sceneActionPrimaryButton span,
.location-mode[data-scene="cabin"] #sceneActionPrimaryButton span,
.location-mode[data-scene="campfire"] #sceneActionPrimaryButton span,
.location-mode[data-scene="message-dock"] #sceneActionPrimaryButton span,
.location-mode[data-scene="beach"] #sceneActionPrimaryButton span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.location-mode[data-scene="lookout"] #sceneActionSecondaryButton,
.location-mode[data-scene="lookout"] #sceneActionTertiaryButton,
.location-mode[data-scene="mystery-rock"] #sceneActionSecondaryButton,
.location-mode[data-scene="mystery-rock"] #sceneActionTertiaryButton,
.location-mode[data-scene="cabin"] #sceneActionSecondaryButton,
.location-mode[data-scene="cabin"] #sceneActionTertiaryButton,
.location-mode[data-scene="campfire"] #sceneActionSecondaryButton,
.location-mode[data-scene="campfire"] #sceneActionTertiaryButton,
.location-mode[data-scene="message-dock"] #sceneActionSecondaryButton,
.location-mode[data-scene="message-dock"] #sceneActionTertiaryButton,
.location-mode[data-scene="beach"] #sceneActionSecondaryButton,
.location-mode[data-scene="beach"] #sceneActionTertiaryButton {
  display: none !important;
}

.location-mode[data-scene="lookout"] #sceneActionPrimaryButton { --x: 77.8% !important; --y: 68.4% !important; --w: 36.2% !important; --h: 6.0% !important; }
.location-mode[data-scene="mystery-rock"] #sceneActionPrimaryButton { --x: 81.6% !important; --y: 56.4% !important; --w: 34.9% !important; --h: 5.1% !important; }
.location-mode[data-scene="cabin"] #sceneActionPrimaryButton { --x: 79.7% !important; --y: 69.3% !important; --w: 33.7% !important; --h: 4.8% !important; }
.location-mode[data-scene="campfire"] #sceneActionPrimaryButton { --x: 80.6% !important; --y: 67.6% !important; --w: 34.9% !important; --h: 5.4% !important; }
.location-mode[data-scene="message-dock"] #sceneActionPrimaryButton { --x: 79.1% !important; --y: 66.7% !important; --w: 40.1% !important; --h: 5.1% !important; }
.location-mode[data-scene="beach"] #sceneActionPrimaryButton { --x: 82.9% !important; --y: 56.2% !important; --w: 34.9% !important; --h: 4.8% !important; }


/* Clean11 Repair6 release-facing birthday build:
   Hide the review-only visitor switch from the app UI. Visitor choice still appears during startup. */
#changeVisitorButton {
  display: none !important;
}


/* Clean12 Garden event polish:
   Garden now has baked event title/sign art plus three invisible hit targets over the illustrated buttons. */
.event-scene.event-scene-image {
  min-height: 0;
  margin: 0.75rem 0;
  border-radius: 22px;
  background: rgba(255, 250, 235, 0.78);
}

.event-scene.event-scene-image::after,
.event-scene.event-scene-image .event-scene-daisy,
.event-scene.event-scene-image .event-scene-onion {
  display: none;
}

.event-result-art {
  display: block;
  width: 100%;
  max-height: min(34svh, 15rem);
  object-fit: contain;
  background: rgba(255, 250, 235, 0.62);
}

.location-mode[data-scene="garden"] #sceneActionPrimaryButton,
.location-mode[data-scene="garden"] #sceneActionSecondaryButton,
.location-mode[data-scene="garden"] #sceneActionTertiaryButton,
.location-mode[data-scene="garden"] #sceneCloseButton {
  opacity: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.location-mode[data-scene="garden"] #sceneActionPrimaryButton { --x: 89.5% !important; --y: 46.0% !important; --w: 34.0% !important; --h: 9.0% !important; }
.location-mode[data-scene="garden"] #sceneActionSecondaryButton { --x: 89.5% !important; --y: 54.0% !important; --w: 34.0% !important; --h: 9.0% !important; }
.location-mode[data-scene="garden"] #sceneActionTertiaryButton { --x: 47.0% !important; --y: 63.5% !important; --w: 34.0% !important; --h: 8.0% !important; }
.location-mode[data-scene="garden"] #sceneCloseButton { --x: 67.3% !important; --y: 29.8% !important; --w: 10.0% !important; --h: 6.0% !important; }

.location-mode[data-scene="garden"] #sceneActionPrimaryButton span,
.location-mode[data-scene="garden"] #sceneActionSecondaryButton span,
.location-mode[data-scene="garden"] #sceneActionTertiaryButton span,
.location-mode[data-scene="garden"] #sceneCloseButton span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* Clean13 main island proof:
   The rebuilt island map bakes stable decorative location plaques into the image.
   Dynamic/state UI remains code-owned. */
.map-labels {
  display: none;
}

.visitor-pill {
  display: none;
}

/* Dynamic current-event marker. The star is not baked into the map art. */
.event-location::before {
  content: "★";
  position: absolute;
  left: 29%;
  top: 8%;
  width: clamp(2.2rem, 9vw, 3.1rem);
  height: clamp(2.2rem, 9vw, 3.1rem);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff2a5;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 230, 0.95), rgba(255, 210, 74, 0.82) 48%, rgba(221, 122, 34, 0.78) 100%);
  border: 0.12rem solid rgba(255, 244, 182, 0.92);
  box-shadow:
    0 0 0.75rem rgba(255, 213, 74, 0.8),
    0 0.28rem 0.55rem rgba(62, 35, 10, 0.25);
  font-size: clamp(1.35rem, 5.6vw, 2rem);
  line-height: 1;
  text-shadow: 0 0.08rem 0.1rem rgba(98, 54, 12, 0.35);
  pointer-events: none;
  z-index: 3;
  animation: eventMarkerFloat 2.6s ease-in-out infinite;
}

.event-location.event-completed::before {
  opacity: 0.42;
  filter: saturate(0.7);
}

.event-location::after {
  left: 29%;
  top: 8%;
  width: clamp(2.2rem, 9vw, 3.1rem);
  height: clamp(2.2rem, 9vw, 3.1rem);
}

@keyframes eventMarkerFloat {
  0%, 100% { transform: translate(-50%, -52%) scale(1); }
  50% { transform: translate(-50%, -63%) scale(1.045); }
}
