/* Game surfaces: a quiet journal, compact spoken memories, physical reading objects. */
[hidden] {
  display: none !important;
}
#app {
  --ui-edge: 24px;
}
.ui {
  padding: 20px 24px;
  font-weight: 600;
}
.memory-count {
  font-size: 12px;
  border: 0;
  background: #3e303f85;
  color: #fff4e6;
  min-height: 34px;
}
.ui-button {
  background: #3e303fbd;
  border: 1px solid #e9c9d755;
  font-weight: 600;
}
.welcome {
  place-items: center;
  padding: 24px;
  background: linear-gradient(90deg, #29203744, #29203711);
  pointer-events: auto;
}
.welcome-copy {
  background: #3c2e408c;
  padding: 26px 30px;
  border: 1px solid #efd9d433;
  border-radius: 24px;
  backdrop-filter: blur(5px);
  max-width: 390px;
}
.welcome-kicker {
  font-size: 28px;
}
.welcome-line {
  font-size: 17px;
  line-height: 1.5;
}
.welcome-hint {
  color: #f8d9ba;
  margin: 7px 0;
}
.welcome-skip {
  font: inherit;
  background: #f5ced7;
  color: #503e4d;
  border: 0;
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 700;
  box-shadow: 0 4px 0 #b78297;
}
.reticle {
  width: 5px;
  height: 5px;
  background: #fff4df;
  box-shadow: 0 0 3px #322735;
}
.reticle.is-hot {
  width: 10px;
  height: 10px;
  background: #f5bccb;
}
#pause-controls {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: #2f253321;
}
#pause-controls button,
#dialogue-next {
  border: 1px solid #edd2cd80;
  border-radius: 12px;
  color: #fff4e5;
  background: #4d3a50e8;
  padding: 12px 20px;
  cursor: pointer;
  min-height: 44px;
}
#pause-controls span {
  color: #fff4e5;
  font-size: 12px;
  text-shadow: 0 1px 4px #000;
}
#dialogue {
  position: absolute;
  z-index: 15;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: min(480px, calc(100% - 32px));
  color: #fff7ed;
  text-align: center;
}
#dialogue-text {
  padding: 16px 24px;
  border-radius: 20px;
  background: #392d42db;
  box-shadow: 0 12px 40px #20172933;
  backdrop-filter: blur(6px);
}
#dialogue-text p {
  margin: 10px 0;
  font-size: 17px;
  line-height: 1.5;
}
#dialogue.fading {
  opacity: 0;
  transition: opacity 0.22s ease;
}
#dialogue-text small {
  display: block;
  font-size: 11px;
  color: #f3bbce;
  margin-bottom: 4px;
}
#dialogue-next {
  margin-top: 12px;
  font-size: 13px;
}
#dialogue.quiet {
  bottom: 22%;
}
#dialogue.quiet #dialogue-text {
  background: #302b4080;
}
#dialogue .always {
  color: #f4c1ce;
  font-size: 23px;
}
.giggle {
  display: inline-block;
  animation: little-giggle 0.45s ease 2;
}
@keyframes little-giggle {
  50% {
    transform: rotate(-4deg) translateY(-3px);
  }
}
.panel-layer {
  place-items: center;
  padding: 28px;
  background: #29233238;
}
.inspect-panel {
  max-height: 88svh;
  width: min(620px, 100%);
  border-radius: 13px;
  padding: 25px;
  box-shadow: 0 20px 60px #20162788;
}
.panel-kicker {
  font-size: 11px;
  color: #926177;
  letter-spacing: 0.04em;
}
.inspect-panel p {
  color: #645562;
}
.inspect-panel h2 {
  margin-right: 36px;
}
.panel-layer[data-kind="computer"] .inspect-panel {
  background: #e1ddcd;
  border: 12px solid #f3e7d7;
  border-bottom-width: 25px;
  border-radius: 22px;
}
.panel-layer[data-kind="computer"] .panel-kicker {
  color: #686a74;
}
.panel-layer[data-kind="computer"] .inspect-panel > #panel-content > p {
  display: none;
}
.science-machine {
  background: #4c5a65;
  border: 0;
  box-shadow: inset 0 2px 12px #26353b80;
  border-radius: 8px;
}
.science-ready { color:#ffd8b4; font-size:12px; padding:10px 12px; border-bottom:1px solid #f5d4c333; }
.metric {
  background: #596a75;
  border-radius: 4px;
  padding: 13px;
}
.metric small,
.metric em {
  color: #f0dfe2;
}
.metric strong {
  color: #ffd3a9;
  font-size: 14px;
  line-height: 1.35;
}
.science-output {
  color: #ffd3bd !important;
}
.science-machine.complete .science-meter i {
  width: 100%;
}
.panel-layer[data-kind="note"] .inspect-panel {
  max-width: 540px;
  background: #fffaef;
  border: 0;
  transform: rotate(-1deg);
}
.letter-sheet {
  padding: 10px 18px 10px 26px;
}
.letter-sheet p,
.letter-sheet .list {
  color: #5b4955;
}
.panel-layer[data-kind="calendar"] .inspect-panel {
  max-width: 560px;
  padding-top: 32px;
  border-top: 16px solid #d994a7;
}
.calendar-sheet {
  border: 0;
  padding: 12px;
}
.object-menu {
  right: 24px;
  width: 300px;
  max-height: calc(100svh - 90px);
  overflow: auto;
  background: #47374bef;
  padding: 17px;
}
.check-item {
  min-height: 38px;
  padding: 6px;
  font-size: 13px;
  line-height: 1.35;
}
.check-item.is-found {
  color: #ffd3dc;
}
#hint-button,
#accessible-mode {
  display: block;
  min-height: 42px;
  border: 0;
  padding: 8px 4px;
  color: #f6d8b9;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
#accessible-mode {
  font-size: 11px;
  color: #dcc7df;
  text-decoration: underline;
}
#journal-hint {
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}
.finale-stage {
  width: min(700px, 100%);
}
.finale-heart {
  width: min(70vw, 480px);
  max-height: 43svh;
}
.finale-message {
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.16;
}
.finale-actions {
  flex-wrap: wrap;
  justify-content: center;
}
.finale-actions button {
  min-height: 44px;
}
.finale-overlay {
  overflow: auto;
  background: #352837b8;
}
.toast {
  bottom: calc(18px + var(--safe-bottom));
  font-weight: 600;
  font-size: 13px;
}
#touch-controls {
  display: none;
}
button:focus-visible,
canvas:focus-visible {
  outline: 3px solid #e395b3;
  outline-offset: 4px;
}
#app[data-state="FINALE"] .ui,
#app[data-state="INTRO"] .memory-count {
  visibility: hidden;
}
@media (pointer: coarse), (max-width: 600px) {
  #touch-controls {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 7;
  }
  #move-stick {
    position: absolute;
    left: 22px;
    bottom: calc(28px + var(--safe-bottom));
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 1px solid #fff0e74d;
    background: #4a3a4f55;
    display: grid;
    place-items: center;
    pointer-events: auto;
    touch-action: none;
  }
  #stick-knob {
    width: 44px;
    height: 44px;
    border: 1px solid #ffe9e78c;
    background: #efd1da66;
    border-radius: 50%;
  }
  #touch-interact {
    position: absolute;
    right: 24px;
    bottom: calc(54px + var(--safe-bottom));
    min-height: 52px;
    border-radius: 50%;
    border: 1px solid #f7e2dc80;
    background: #654962cc;
    color: #fff4e5;
    padding: 12px;
    pointer-events: auto;
  }
  #app:not([data-state="EXPLORE"]) #touch-controls {
    display: none;
  }
  .interact-hint {
    display: none;
  }
}
@media (max-width: 600px) {
  .ui {
    padding: 12px;
  }
  .memory-count {
    font-size: 10px;
    max-width: 130px;
    line-height: 1.4;
  }
  .object-menu {
    right: 12px;
    width: min(300px, calc(100% - 24px));
  }
  .panel-layer {
    padding: 12px;
  }
  .inspect-panel {
    max-height: 85svh;
    padding: 20px 16px;
  }
  .science-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .metric {
    padding: 9px;
  }
  .metric small {
    font-size: 9px;
  }
  .metric strong {
    font-size: 11px;
  }
  .metric em {
    font-size: 10px;
  }
  #dialogue {
    bottom: 12%;
  }
  #dialogue-text p {
    font-size: 16px;
  }
  .letter-sheet p {
    font-size: 14px;
  }
  .letter-sheet .list {
    font-size: 14px;
  }
  .finale-heart {
    width: 85vw;
  }
  .finale-message {
    font-size: 34px;
  }
}
