/* The welcome screen belongs to the visitor edition. */
.visitor-welcome {
  position: fixed;
  z-index: 1210;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at center, #182c234d 15%, #11231dd9 100%),
    #796641 url("assets/loading-papiro-v065.png") center / cover no-repeat;
}

.visitor-welcome:has(+ #loading.failed) { display: none; }
.visitor-welcome:not([hidden]) + #loading #loading-treasure { display: none !important; }
html:has(.visitor-welcome:not([hidden]) + #loading:not(.failed)) :is(.topbar, #viewport) {
  visibility: hidden;
}

.visitor-card {
  width: min(100%, 456px);
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid #cbb78475;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 0%, #365139de, #102e24d4 78%);
  backdrop-filter: blur(1.5px);
  box-shadow: 0 20px 72px #0b1815a0, inset 0 0 0 5px #dec78b0b;
  color: #f4e8c9;
  text-align: center;
}
.visitor-card > svg {
  display: block;
  width: 35px;
  height: 35px;
  margin: 0 auto 12px;
  color: #d8bc7b;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.visitor-card > svg .compass-light { fill: currentColor; stroke: none; }
.visitor-kicker {
  margin: 0 0 9px;
  color: #e4cd96;
  font: 700 11px/1.4 Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.visitor-card h1 {
  margin: 0;
  font: 700 clamp(21px, 5vw, 33px)/1.15 Georgia, serif;
  letter-spacing: .065em;
  text-shadow: 0 2px 10px #0b1c15bf;
  text-transform: uppercase;
}
.visitor-card .visitor-play {
  display: block;
  width: min(100%, 226px);
  min-height: 49px;
  margin: 23px auto 9px;
  border: 1px solid #f0dba3;
  border-radius: 7px;
  background: linear-gradient(#f2dda6, #d6ba7e);
  box-shadow: 0 5px 16px #07191166, inset 0 1px #fff2cb;
  color: #193127;
  font: 700 15px/1.25 Georgia, serif;
  letter-spacing: .13em;
}
.visitor-card .visitor-play:not(:disabled):hover {
  background: linear-gradient(#fae8b8, #dec488);
}
.visitor-card .visitor-play:not(:disabled):active {
  background: linear-gradient(#d6ba7e, #e4c98b);
  box-shadow: inset 0 2px 4px #694e3333;
}
.visitor-card .visitor-play:focus-visible {
  outline: 2px solid #f6e4b9;
  outline-offset: 4px;
}
.visitor-card .visitor-play:disabled { opacity: .58; cursor: wait; }
.visitor-duration {
  margin: 0 0 16px;
  color: #e0d5b6;
  font: 500 12px/1.35 Arial, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.visitor-features {
  display: grid;
  gap: 4px;
  padding: 12px 3px 0;
  border-top: 1px solid #cbb78440;
  color: #d7d4ba;
  font: 500 11px/1.35 Arial, sans-serif;
}
.visitor-features strong {
  color: #e4cd96;
  font: 700 10px/1.35 Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
@media (max-height: 440px) and (orientation: landscape) {
  .visitor-card { padding-block: 13px; }
  .visitor-card > svg { width: 26px; height: 26px; margin-bottom: 7px; }
  .visitor-card .visitor-play { margin-block: 16px 6px; }
  .visitor-duration { margin-bottom: 10px; }
  .visitor-features { padding-top: 8px; }
}

.visitor-end {
  box-sizing: border-box;
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(23px, 6vw, 38px);
  overflow: auto;
  border: 1px solid #cfb6818a;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 0%, #38543f 0%, transparent 72%),
    linear-gradient(155deg, #203b30, #10291f);
  box-shadow: 0 22px 70px #07130fd9, inset 0 0 0 5px #dec78b0d;
  color: #f4e8c9;
  text-align: center;
}
.visitor-end::backdrop {
  background: #10201ac2;
  backdrop-filter: blur(3px);
}
.visitor-end-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 15px;
  place-items: center;
  border: 1px solid #cbb37b65;
  border-radius: 50%;
  background: #1a3528a0;
  color: #e3c78b;
}
.visitor-end-mark svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.visitor-end-mark .compass-light { fill: currentColor; stroke: none; }
.visitor-end h2 {
  margin: 0;
  color: #f4e8c9;
  font: 700 clamp(28px, 6vw, 38px)/1.1 Georgia, serif;
  letter-spacing: .015em;
}
#visitor-end-description {
  margin: 12px 0 24px;
  color: #e3dbc3;
  font: 400 15px/1.55 Arial, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}
#visitor-end-description strong { color: #f3dca4; }
.visitor-end-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 19px;
  border-top: 1px solid #cbb78440;
}
.visitor-end-actions :is(button, a) {
  display: grid;
  box-sizing: border-box;
  min-height: 49px;
  padding: 10px 12px;
  place-items: center;
  border: 1px solid #bea67391;
  border-radius: 7px;
  background: #1a3528;
  color: #f0dfb9;
  font: 700 13px/1.2 Georgia, serif;
  letter-spacing: .02em;
  text-decoration: none;
}
.visitor-end-actions .visitor-end-primary {
  border-color: #f0dba3;
  background: linear-gradient(#f2dda6, #d6ba7e);
  box-shadow: inset 0 1px #fff2cb;
  color: #193127;
}
.visitor-end-actions a:hover { background: #294637; }
.visitor-end-actions .visitor-end-primary:hover { background: linear-gradient(#fae8b8, #dec488); }
.visitor-end-actions :is(button, a):focus-visible { outline: 2px solid #f6e4b9; outline-offset: 3px; }
@media (max-width: 480px) {
  .visitor-end-actions { grid-template-columns: 1fr; }
}
@media (max-height: 410px) {
  .visitor-end { padding-block: 18px; }
  .visitor-end-mark { width: 43px; height: 43px; margin-bottom: 8px; }
  .visitor-end-mark svg { width: 28px; height: 28px; }
  #visitor-end-description { margin-block: 8px 13px; }
  .visitor-end-actions { padding-top: 12px; }
}
