:root {
  --platform-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --platform-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --side-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --side-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
}
html,
body.stage {
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.stage {
  position: fixed;
  top: 0;
  left: 0;
}
#cafe-sound {
  top: 12px;
  left: 12px;
  top: calc(var(--platform-top) + 12px);
}
#cafe-sound .music-credit {
  left: 0;
  right: auto;
  overflow-wrap: break-word;
}
#title {
  top: 28px;
  top: max(calc(var(--platform-top) + 8px), 4.5vh);
}
#intro {
  width: 90vw;
  max-width: 440px;
  bottom: 28px;
  bottom: max(28px, 6vh, env(safe-area-inset-bottom));
}
#loading .glow-title {
  font-family: 'Princess Sofia', cursive;
  font-size: 8vw;
  font-size: clamp(36px, 8vw, 72px);
}
.ov {
  top: var(--visible-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  height: 100%;
  height: var(--visible-height, 100%);
  padding: 10px;
  padding: calc(var(--platform-top) + 10px) calc(var(--side-right) + 10px) calc(var(--platform-bottom) + 10px)
    calc(var(--side-left) + 10px);
  overflow: hidden;
  overscroll-behavior: none;
}
.ov-panel {
  width: 100%;
  max-width: 640px;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.ov-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 56px;
  margin-top: 11px;
  padding: 0 18px;
}
.ov-header .ov-close {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  min-height: 40px;
}
.ov-header .ov-kicker {
  margin: 0;
  line-height: 1.4;
}
.ov-body {
  min-height: 0;
  min-width: 0;
  padding: 0 24px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ov-panel > .fx {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.coupon {
  width: 82vw;
  max-width: 420px;
}
.note-full .card {
  width: 100%;
  min-width: 0;
}
.paper {
  width: 100%;
  max-width: 520px;
}
.wall {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
@media (max-width: 340px) {
  .wall {
    grid-template-columns: 1fr;
  }
}
@media (max-aspect-ratio: 9/10) {
  #title {
    top: 8vh;
    top: max(calc(var(--platform-top) + 48px), 8vh);
  }
}
#simple-room {
  position: fixed;
  inset: 0;
  z-index: 14;
  padding: 30px 18px;
  padding-top: calc(var(--platform-top) + 24px);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 30%, #352145, #100c17 76%);
}
#simple-room[hidden] {
  display: none;
}
#simple-room h1 {
  margin: auto 0 0;
  font:
    44px 'Princess Sofia',
    cursive;
  color: #f0dcfc;
}
#simple-room p {
  margin: 5px auto 15px;
  color: #d8c1e7;
  font: 15px var(--writing);
}
#station-switches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  padding-bottom: 10px;
}
#station-switches .tag {
  display: block;
  position: relative;
  transform: none;
  margin: 6px;
  min-width: 76px;
  padding: 7px;
  border-radius: 5px;
}
.flat-mode #intro,
.flat-mode #title,
.flat-mode #tags,
.flat-mode #hint,
.flat-mode #gl {
  display: none;
}
@supports not (gap: 1px) {
  .act .btn,
  .acts .btn {
    margin: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .grain,
  .tag.next {
    animation: none;
  }
}
.guest-prints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.guest-prints img {
  display: block;
  width: 42px;
  height: auto;
  margin: 2px;
  box-shadow: 0 2px 6px #58473550;
}
#simple-room.lit h1 {
  color: #694a80;
  text-shadow:
    0 0 9px white,
    0 0 20px #b577e7;
}
@media (max-aspect-ratio: 9/10) {
  #tags [data-station='film'] {
    margin-top: -4px;
  }
  #tags [data-station='echo'] {
    margin-top: 4px;
  }
}
@media (pointer: coarse), (max-width: 640px) {
  .grain {
    inset: 0;
    animation: none;
    opacity: 0.1;
    mix-blend-mode: normal;
  }
  #tags .tag {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  #tags .tag.next {
    animation: none;
  }
  .ov-bg {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(60, 40, 30, 0.32);
  }
  .ov-panel {
    border-width: 4px;
    border-radius: 19px;
  }
  .ov-header {
    justify-content: space-between;
    padding: 1px 13px 0 8px;
    min-height: 45px;
  }
  .ov-header .ov-close {
    position: static;
    transform: none;
    flex: none;
  }
  .ov-header .ov-kicker {
    font-size: 14px;
    text-align: right;
  }
  .ov-body {
    padding: 1px 14px 18px;
  }
  .st-line {
    font-size: 21px;
    line-height: 1.45;
    overflow-wrap: break-word;
  }
  .st-sub,
  .btn {
    overflow-wrap: break-word;
  }
  .st-actions {
    margin-top: 9px;
  }
  .btn {
    max-width: 100%;
    padding: 9px 17px;
  }
  .btn,
  .chips button {
    min-height: 40px;
  }
  .btn:active {
    transform: none;
  }
  #title {
    width: calc(100% - 24px);
  }
  #hint.hint {
    width: max-content;
    max-width: calc(100% - 28px);
    white-space: pre-line;
    text-align: center;
    bottom: 12px;
    bottom: calc(var(--platform-bottom) + 10px);
    line-height: 1.5;
    letter-spacing: 0.035em;
  }
  #intro {
    bottom: 16px;
    bottom: calc(var(--platform-bottom) + 14px);
  }
  .music-credit {
    max-width: calc(100vw - 36px);
  }
  .booth3,
  .booth3 > div {
    width: 100%;
    min-width: 0;
  }
  .camera3 {
    margin: 12px auto 0;
    max-width: 100%;
  }
  .vf {
    width: 100%;
    height: auto;
  }
  .vf::before {
    content: '';
    display: block;
    padding-top: 100%;
  }
  .booth3 .chips,
  .booth3 .acts {
    justify-content: center;
  }
  .out3 {
    min-height: 0;
  }
  .out3 .slot {
    max-width: 95%;
  }
  .out3 .empty-hint {
    margin: 12px 0 0;
  }
  .out3 .pola3:not(.out) {
    position: absolute;
    top: 10px;
    visibility: hidden;
    pointer-events: none;
  }
  .out3 .pola3 {
    max-width: 96%;
  }
  .pola3 .shot {
    max-width: 100%;
  }
  .envelope {
    width: 90%;
    max-width: 300px;
    margin-left: 0;
    transform: translateX(-50%);
  }
  .envelope.gone {
    transform: translate(-50%, 100px) scale(0.9);
  }
  .letter-stage {
    min-height: 270px;
  }
  .envelope {
    top: 38px;
  }
  .paper {
    padding: 19px 16px;
  }
  .paper p {
    font-size: 16px;
  }
  .film-cap:empty,
  .st-actions:empty {
    min-height: 0;
    margin: 0;
  }
}
