#leavePark {
  display: grid;
  place-items: center;
  flex: none;
  color: #66533d;
}
.lantern-paper {
  background: #fff8e9ee;
  color: #4c4336;
  border: 1px solid #fffdf7;
  border-radius: 18px;
  box-shadow: 0 12px 32px #29241f26;
  backdrop-filter: blur(12px);
}
.lantern-action {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: max(111px, calc(env(safe-area-inset-bottom) + 101px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 28px);
}
#lanternCarryActions {
  padding: 8px 13px;
  text-align: center;
  font-size: 13px;
}
#lanternCarryActions div {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}
#lanternCarryActions button,
#lanternGlow {
  min-height: 42px;
}
#lanternCancel {
  padding-inline: 14px;
}
#lanternPicker {
  position: fixed;
  z-index: 4;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px));
  width: min(348px, calc(100vw - 36px));
  max-height: 64dvh;
  overflow: auto;
  padding: 17px;
}
.lantern-heading,
.lantern-card-wish {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lantern-heading {
  justify-content: space-between;
}
.lantern-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
#lanternClose {
  min-width: 38px;
  min-height: 38px;
  font-size: 22px;
}
#lanternColors {
  display: flex;
  gap: 8px;
  margin: 6px 0 13px;
}
#lanternColors button {
  flex: 1;
  min-height: 37px;
  background: var(--swatch);
  border: 1px solid #725f4933;
  border-radius: 11px;
}
#lanternColors button[aria-pressed="true"] {
  outline: 2px solid #756448;
  outline-offset: 2px;
}
#lanternWishes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#lanternWishes button {
  min-height: 38px;
  padding: 5px;
  border: 1px solid #8e6c3a20;
  border-radius: 8px;
  background: #fffdf760;
  font-size: 12px;
  line-height: 1.4;
}
#lanternWishes button[aria-pressed="true"] {
  background: #f2dfbd;
  border-color: #af8a56;
}
#lanternKeep {
  width: 100%;
  margin-top: 12px;
}
#lanternCard {
  position: fixed;
  z-index: 4;
  top: clamp(77px, 15vh, 130px);
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px 8px;
  width: max-content;
  max-width: calc(100vw - 26px);
  text-align: center;
  animation: lantern-card 4s both;
}
#lanternCardWish {
  margin: 5px 0;
  font-size: 16px;
}
#lanternCardColor {
  width: 13px;
  height: 13px;
  border: 1px solid #79684955;
  border-radius: 50%;
  flex: none;
}
#lanternCardAuthor {
  display: block;
  color: #6e604e;
  margin-top: 4px;
}
#lanternGlow {
  color: #624d2f;
  padding-inline: 12px;
  margin-top: 4px;
  font-size: 13px;
}
#lanternGlow:disabled {
  opacity: 0.67;
  cursor: default;
}
#lanternNotice {
  position: fixed;
  z-index: 4;
  right: 16px;
  bottom: 16px;
  padding: 10px 15px;
  font-size: 13px;
  animation: lantern-card 3.5s both;
}
#peerName {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 13px;
  animation: lantern-card 3s both;
}
@keyframes lantern-card {
  0%,
  100% {
    opacity: 0;
  }
  8%,
  87% {
    opacity: 1;
  }
}
#parkFarewell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #554839;
  background: #faf2e3;
  opacity: 0;
  text-align: center;
  transition: opacity 1s ease;
}
#parkFarewell[hidden] {
  display: none;
}
#parkFarewell.is-visible {
  opacity: 1;
}
#parkFarewell > div {
  width: min(100%, 490px);
}
#parkFarewell img {
  display: block;
  margin: 0 auto 28px;
  filter: brightness(0.42) sepia(0.32);
}
#parkFarewell h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 35px);
  font-weight: 530;
  letter-spacing: 0.055em;
}
#parkFarewell p {
  margin: 17px auto 29px;
  font-size: 15px;
  line-height: 1.9;
  max-width: 31em;
}
#parkFarewell button {
  min-height: 45px;
}
body.photo-mode .lantern-action,
body.photo-mode .lantern-paper,
body.photo-mode #leavePark {
  visibility: hidden;
}
@media (max-width: 700px) {
  .lantern-action {
    bottom: max(125px, calc(env(safe-area-inset-bottom) + 113px));
  }
  #lanternPicker {
    left: 12px;
    width: min(348px, calc(100vw - 24px));
    padding: 12px;
  }
  #lanternWishes button {
    min-height: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #lanternCard,
  #lanternNotice,
  #peerName {
    animation: none;
  }
}

/* Picnic actions stay clear of the walking controls. */
#teaBrew:not([hidden]), #teaRequest:not([hidden]) { display: grid; }
.tea-anchor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 4; }
#teaBrew {
  justify-items: center;
  gap: 6px;
  padding: 10px 13px;
  border-radius: 16px;
  background: #fff8e9ec;
  color: #574d3b;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 3px 12px #55473128;
}
#teaBrew i {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: conic-gradient(#9c7851 calc(var(--tea-fill, 0) * 1turn), #e7d8bd 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
}
#teaReturnBar { position: fixed; top: 150px; right: max(14px, env(safe-area-inset-right)); }
#teaReturn, #teaNearby, #teaRequest button, .picnic-card-actions button {
  min-height: 44px;
  padding: 7px 14px;
  border-radius: 12px;
  background: #fff6e6;
  color: #6c4c32;
  border: 1px solid #e5cdae;
  font-size: 13px;
}
#teaNearby {
  position: fixed;
  left: 50%;
  bottom: calc(160px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  white-space: nowrap;
  box-shadow: 0 5px 20px #51422b29;
}
#teaRequest {
  position: fixed;
  z-index: 6;
  top: max(118px, calc(env(safe-area-inset-top) + 84px));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 28px);
  gap: 6px;
  justify-items: center;
  padding: 10px 13px;
  border: 1px solid #ead7bb;
  color: #604730;
  background: #fff8ebf5;
  border-radius: 18px;
  box-shadow: 0 6px 22px #493d292d;
}
#teaRequest p { margin: 3px 0 5px; font-size: 13px; }
#teaRequest > div, .picnic-card-actions { display: flex; gap: 8px; }
#teaRequest [data-accept], .picnic-card-actions [data-save-card] {
  background: #536d47;
  color: #fff9ef;
  border-color: transparent;
}
.tea-heart {
  color: #ffdda8;
  background: #735043dc;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 19px;
}
#picnicCard {
  width: min(460px, calc(100vw - 20px));
  padding: 14px 18px;
  background: #fff8e9;
  border-color: #f4e4cb;
}
.picnic-card-heading h2 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.picnic-card-heading .close { top: 7px; right: 9px; width: 44px; height: 44px; }
#picnicCard canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(53dvh, 465px);
  aspect-ratio: 900 / 1120;
  object-fit: contain;
  margin: auto;
  border-radius: 3px;
}
#picnicCard label { display: grid; gap: 5px; margin: 10px 0; font-size: 12px; }
#picnicCard textarea {
  width: 100%;
  padding: 6px 9px;
  min-height: 37px;
  resize: none;
  border: 1px solid #ddcaab;
  border-radius: 9px;
  background: #fffdf5;
  color: #624631;
  font: inherit;
}
#picnicCard input { margin: 6px 0 0; }
#picnicCard [hidden], #teaNearby[hidden], #teaReturn[hidden] { display: none; }
@media (pointer: coarse) {
  #teaReturnBar { top: max(112px, calc(96px + env(safe-area-inset-top))); }
  #teaNearby { bottom: calc(200px + env(safe-area-inset-bottom)); }
}

/* Global i18n picker, long-label resilience, postcard 2.0 & region compliance */
.lang-picker {
  position: relative;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 4px;
  padding: 8px;
  min-width: 244px;
  max-width: min(92vw, 290px);
  max-height: 60dvh;
  overflow-y: auto;
}
.lang-menu[hidden] {
  display: none;
}
.lang-menu button {
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: #4f4638;
  transition: background 0.16s ease;
}
.lang-menu button:hover {
  background: #f3e8d2;
}
.lang-menu button[aria-checked="true"] {
  background: #526b47;
  color: #fffaf0;
  font-weight: 600;
}
.side-nav button b {
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  padding-inline: 2px;
}
#contextActions button,
#lanternWishes button,
.map-destinations button,
#teaRequest p,
#houseGiftToast,
#walkStatus {
  max-width: min(92vw, 460px);
  white-space: normal;
  text-wrap: balance;
  line-height: 1.35;
}
#teaRequest > div,
.picnic-card-actions {
  flex-wrap: wrap;
  justify-content: center;
}
.card-memory-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px !important;
  cursor: pointer;
}
.card-memory-toggle input {
  width: auto !important;
  margin: 0 !important;
  accent-color: #526b47;
}
.card-wechat-preview {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px;
  margin: 8px 0;
  border-radius: 12px;
  background: #fffdf5;
  border: 1px solid #e6d4b7;
}
.card-wechat-preview[hidden] {
  display: none;
}
.card-wechat-preview img {
  display: block;
  max-width: 100%;
  max-height: 52dvh;
  border-radius: 4px;
}
.card-wechat-preview p {
  margin: 0;
  font-size: 12px;
  color: #7c5c40;
}
.farewell-footer {
  margin-top: 22px;
  display: grid;
  gap: 8px;
  justify-items: center;
  font-size: 12px;
  color: #82735f;
}
.farewell-support a,
.farewell-footer .text-link {
  color: #5c7450;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}
#privacyDialog {
  max-width: 440px;
}
.cn-compliance {
  position: fixed;
  left: 50%;
  bottom: max(4px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff9ed88;
  backdrop-filter: blur(6px);
  font-size: 10px;
  color: #6d6554;
  white-space: nowrap;
}
.cn-compliance[hidden] {
  display: none;
}
.cn-compliance a {
  color: inherit;
  text-decoration: none;
}
.cn-compliance a:hover {
  text-decoration: underline;
}
body.photo-mode .cn-compliance {
  visibility: hidden;
}
