/* The gate in front of the valley: the same hide and stone as the other windows, over the park the game already paints. */
#gate {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  overflow: auto;
  touch-action: auto;
  background: radial-gradient(ellipse at center, rgba(127, 166, 74, 0.04), rgba(43, 29, 16, 0.42) 72%);
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
}
#gate[hidden] {
  display: none;
}
/* Author `display` rules beat the hidden attribute, so a closed fold would still show. */
#gate [hidden] {
  display: none !important;
}
/* The first lesson covers the whole screen, and its “Now” line sits in the corner of the valley.
   Both wait until the chief has gone through this door. */
body.gateOn #coach,
body.gateOn #nowChip {
  visibility: hidden !important;
}
/* Someone else's park is a picture: the bars that change a park are gone, one return stays. The top bar stays too, with that
   player's level, guests and mood (the park's own numbers, js/ui/hud.js) and their name; no shells, no events. */
body.visiting .sideBtns,
body.visiting .goalStrip,
body.visiting .evPop,
body.visiting .boons,
body.visiting .cmdbar,
body.visiting #qsheet,
body.visiting #buildMenu,
body.visiting .dock,
body.visiting #panel:not([data-kind='report']),
body.visiting .side,
body.visiting #placeBar,
body.visiting #toolChip,
body.visiting #trackBar,
body.visiting #legacy,
body.visiting #dev,
body.visiting .alerts,
body.visiting .hint,
body.visiting #plotTip {
  display: none !important;
}
body.visiting .hud,
body.visiting .hud .rpill {
  pointer-events: none;
}
body.visiting .rpill [data-it='money'],
body.visiting #resChip,
body.visiting #devbadge {
  display: none !important;
}
#visitWho {
  display: none;
}
body.visiting #visitWho:not([hidden]) {
  display: block;
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
}
#visitBackBar {
  display: none;
}
body.visiting #visitBackBar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  pointer-events: none;
}
body.visiting #visitBackBar .btn {
  pointer-events: auto;
  min-height: 48px;
  font-size: 18px;
}
body.visiting #visitBack {
  min-width: 220px;
}
body.visiting #visitPrank img {
  width: 46px;
  height: 22px;
  object-fit: contain;
  margin: -4px 6px -4px -2px;
  vertical-align: middle;
}
body.visiting #toast {
  z-index: 360;
}
#toast {
  z-index: 360;
}
/* a field cut into the hide: a wooden rim, a shadow inside the top edge, warm parchment; the rim glows when it has the focus */
.sheetIn {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 14px;
  border: 3px solid var(--wood);
  border-radius: 14px;
  background: linear-gradient(#f1e3c5, #fbf1da 55%);
  box-shadow: inset 0 3px 0 rgba(74, 45, 22, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 2px 0 rgba(255, 255, 255, 0.45);
  color: var(--ink);
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
.sheetIn::placeholder {
  color: var(--muted);
  font-weight: 500;
}
.sheetIn:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: inset 0 3px 0 rgba(74, 45, 22, 0.3), 0 0 0 3px rgba(224, 103, 43, 0.3);
}
.findRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding-right: 10px;
}
.findRow .btn {
  flex: none;
}
/* a friend or a found park: the nick on one line, the park's name under it (two lines at most), the button clear of the edge */
#panel[data-kind='friends'] .slot,
.fRow {
  gap: 10px;
  padding-right: 10px;
}
.fWho {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fWho b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.parkN {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.parkN:empty {
  display: none;
}
.panel h4.sheetH {
  margin: 14px 0 2px;
  font-size: 15px;
  color: #2b1a0c;
}
#panel[data-kind='friends'] .slot .acts .btn,
#panel[data-kind='transfer'] .slot .acts .btn {
  flex: 0 0 auto;
}
#visitGift[hidden],
#visitReport[hidden],
#visitPrank[hidden],
#palClear[hidden] {
  display: none !important;
}
#palClear {
  position: absolute;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  max-width: calc(100% - 24px);
}
.gateCard {
  width: min(440px, 100%);
  box-sizing: border-box;
  border: 18px solid transparent;
  border-image: var(--hide-panel);
  padding: 4px 12px 14px;
  text-align: center;
  filter: drop-shadow(0 8px 0 rgba(36, 21, 9, 0.28)) drop-shadow(0 16px 18px rgba(0, 0, 0, 0.28));
}
.gateArt {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 6px;
}
.gateArt img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #dfeccf;
  border-radius: 12px;
  border: 2px solid #6b4a2a;
}
.gateCard h1 {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
  color: #2b1a0c;
  text-shadow: 0 1px 0 rgba(255, 250, 235, 0.7);
}
.gateSub,
.gateWho,
.gateNote,
.gateHint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.gateWho {
  color: #2b1a0c;
  font-weight: 700;
}
.gateActs,
.gateForm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  text-align: left;
}
.gateCard .btn {
  min-height: 42px;
  font-size: 16px;
  width: 100%;
}
.gateCard label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #2b1a0c;
  font-weight: 700;
}
.gateCard input,
.gateCard select {
  font: inherit;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
  padding: 8px 10px;
  border: 2px solid #6b4a2a;
  border-radius: 10px;
  background: #fffaf0;
  color: var(--ink);
}
.gateHint.ok {
  color: var(--leaf);
}
/* the terms' box at signup: the box at the left of its words, the links underlined */
.gateCard label.gateAgree {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
}
.gateCard label.gateAgree input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
.gateCard label.gateAgree[hidden] {
  display: none;
}
.gateCard a {
  color: #2b1a0c;
  text-decoration: underline;
}
.gateCard .btn:disabled {
  opacity: 0.55;
}
.gateLegal {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
/* a row's Report or block: the warning sign only */
.btn.repBtn {
  padding: 0 6px;
  min-width: 40px;
}
.btn.repBtn img {
  margin: 0;
}
body.visiting #visitReport {
  min-height: 48px;
}
.gateHint.bad {
  color: var(--bad);
}
.gateHits {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gateHits p {
  margin: 0;
  padding: 6px 8px;
  background: #fffaf0;
  border-radius: 10px;
  border: 2px solid #6b4a2a;
}
@media (max-width: 700px) {
  .gateArt img {
    width: 52px;
    height: 52px;
  }
  .gateCard h1 {
    font-size: 24px;
  }
}
body.visiting #visitLike img {
  width: 28px;
  height: 28px;
  margin: -4px 6px -4px -2px;
  vertical-align: middle;
}
body.visiting #visitLike .likeN {
  color: #fff;
  text-shadow: 0 1px 0 rgba(43, 23, 11, 0.8);
}
body.visiting #visitLike.pop img {
  animation: likePop 0.45s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes likePop {
  40% {
    transform: scale(1.6) rotate(-10deg);
  }
}
/* the report sheet over a visited park: the command bar is gone (its --cmdH reads as the whole screen), the visit bar
   stays under the sheet */
body.visiting #panel[data-kind='report'] {
  max-height: calc(100% - var(--hudB, 64px) - 200px - env(safe-area-inset-bottom, 0px));
}
