/* The house after hours. The original tactile hallway remains underneath. */

body::before {
  position: absolute;
}

.door-gallery::before {
  content: "OPEN AFTER HOURS";
}

.hallway {
  padding-bottom: 84px;
}

.hallway__copy {
  position: relative;
}

.entry-ticket {
  position: relative;
  width: min(410px, 88%);
  margin: 38px 0 0 10px;
  padding: 24px 29px 23px 86px;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 50%, transparent 0 8px, var(--paper) 9px),
    radial-gradient(circle at 100% 50%, transparent 0 8px, var(--paper) 9px),
    var(--paper);
  box-shadow: 0 18px 46px rgba(3, 8, 19, 0.28), inset 0 0 35px rgba(141, 103, 41, 0.11);
  transform: rotate(-1.15deg);
}

.entry-ticket::before {
  content: "ADMIT ONE";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  width: 46px;
  place-items: center;
  border-right: 2px dashed rgba(141, 103, 41, 0.48);
  color: var(--coral-dark);
  font-family: var(--utility);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.entry-ticket p,
.entry-ticket small {
  display: block;
  margin: 0;
}

.entry-ticket__stamp {
  margin-bottom: 6px !important;
  color: var(--coral-dark);
  font-family: var(--utility);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.entry-ticket p:not(.entry-ticket__stamp) {
  font-family: var(--display);
  font-size: 1.42rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.entry-ticket small {
  margin-top: 4px;
  color: #74674e;
  font-size: 0.76rem;
}

.door-side {
  min-width: 0;
}

.door-gallery__after {
  display: flex;
  min-height: 62px;
  padding: 17px 3px 0;
  gap: 18px;
  align-items: center;
  justify-content: center;
  color: #8fa0ae;
  font-family: var(--display);
  font-size: 0.86rem;
  font-style: italic;
}

.door-gallery__after p {
  margin: 0;
}

.surprise-button {
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid rgba(215, 169, 79, 0.7);
  color: #d6c79f;
  background: transparent;
  font-family: var(--utility);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.surprise-button:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.035);
}

.workroom[data-door="cabinet"] .prompt-card {
  --card-accent: var(--teal);
}

.workroom[data-door="roof"] .prompt-card {
  --card-accent: var(--ochre);
}

.prompt-card {
  min-height: 540px;
}

.prompt-card__instruction {
  margin-bottom: 22px;
}

.prompt-card__afterline {
  max-width: 520px;
  margin: 0 0 0 22px;
  color: #725f44;
  font-family: var(--display);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.45;
}

.presence-panel {
  display: flex;
  min-width: 0;
  padding: 24px 7px;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.wick-button {
  display: flex;
  min-width: 118px;
  min-height: 150px;
  padding: 6px;
  border: 0;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
}

.wick-moth {
  position: relative;
  display: block;
  width: 108px;
  height: 92px;
  filter: drop-shadow(0 16px 13px rgba(0, 0, 0, 0.36));
}

.wick-moth::before,
.wick-moth::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 17px;
  width: 25px;
  height: 1px;
  background: #9b7b43;
  transform-origin: center;
}

.wick-moth::before {
  left: 34px;
  transform: rotate(-54deg);
}

.wick-moth::after {
  right: 34px;
  transform: rotate(54deg);
}

.wick-moth__wing {
  position: absolute;
  z-index: 1;
  top: 22px;
  width: 52px;
  height: 59px;
  border: 2px solid rgba(224, 192, 116, 0.58);
  background:
    radial-gradient(circle at 52% 38%, rgba(17, 42, 58, 0.84) 0 8px, transparent 9px),
    radial-gradient(circle at 52% 38%, rgba(215, 169, 79, 0.7) 0 12px, transparent 13px),
    linear-gradient(145deg, #c6ae79, #6d674f 62%, #323d3f);
  box-shadow: inset 0 0 20px rgba(18, 28, 32, 0.45);
}

.wick-moth__wing--left {
  left: 6px;
  border-radius: 76% 28% 68% 32%;
  transform: rotate(-14deg);
  transform-origin: right center;
}

.wick-moth__wing--right {
  right: 6px;
  border-radius: 28% 76% 32% 68%;
  transform: rotate(14deg);
  transform-origin: left center;
}

.wick-moth__body {
  position: absolute;
  z-index: 3;
  top: 25px;
  left: calc(50% - 9px);
  width: 18px;
  height: 52px;
  border: 2px solid #6f5329;
  border-radius: 48% 48% 38% 38%;
  background: linear-gradient(90deg, #8e672d, #d0a54e 50%, #775225);
}

.wick-moth__head {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: calc(50% - 11px);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b88c3f;
  box-shadow: inset -5px -4px 0 #765326;
}

.wick-moth__coat {
  position: absolute;
  z-index: 6;
  top: 43px;
  left: calc(50% - 12px);
  width: 24px;
  height: 28px;
  border-radius: 3px 3px 11px 11px;
  background: linear-gradient(90deg, #173b43 0 46%, #d5b45f 47% 53%, #173b43 54% 100%);
  clip-path: polygon(0 0, 42% 10%, 50% 25%, 58% 10%, 100% 0, 88% 100%, 12% 100%);
}

.wick-button:hover .wick-moth__wing--left,
.wick-button:focus-visible .wick-moth__wing--left {
  animation: wick-left 340ms ease-in-out 2;
}

.wick-button:hover .wick-moth__wing--right,
.wick-button:focus-visible .wick-moth__wing--right {
  animation: wick-right 340ms ease-in-out 2;
}

.wick-button__label {
  margin-top: 6px;
  font-family: var(--utility);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

.presence-panel__name {
  margin: 2px 0 8px;
  color: var(--brass);
  font-family: var(--utility);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.presence-panel__aside {
  margin: 0;
  color: #aab9c3;
  font-family: var(--display);
  font-size: 0.84rem;
  line-height: 1.45;
}

.choice-panel {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.choice-panel__label {
  margin: 0 0 8px;
  color: var(--brass);
  font-family: var(--utility);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.choice-panel h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.45rem, 3.6vw, 3.8rem);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.choice-panel__lead,
.choice-panel__outcome-text {
  margin: 14px 0 22px;
  color: #b8c6cf;
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.55;
}

.choice-panel__buttons {
  display: grid;
  gap: 10px;
}

.story-choice {
  position: relative;
  width: 100%;
  min-height: 56px;
  padding: 13px 44px 13px 17px;
  border: 1px solid rgba(215, 169, 79, 0.28);
  border-radius: 2px;
  color: #e5ded0;
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.story-choice::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 17px;
  color: var(--brass);
  font-family: var(--body);
  transform: translateY(-50%);
}

.story-choice:hover {
  border-color: rgba(215, 169, 79, 0.72);
  background: rgba(215, 169, 79, 0.08);
  transform: translateX(4px);
}

.choice-panel__leave {
  min-height: 40px;
  margin: 15px 0 0;
  padding: 8px 2px;
  border: 0;
  color: #8192a0;
  background: transparent;
  font-family: var(--utility);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
  cursor: pointer;
}

.choice-panel__leave:hover {
  color: var(--paper);
}

.choice-panel__outcome-text {
  margin-bottom: 26px;
  font-size: 1.08rem;
}

.choice-panel__actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.choice-panel__actions .primary-action,
.choice-panel__actions .secondary-action {
  flex: 1;
}

.forget-button {
  min-height: 44px;
  margin-top: 14px;
  padding: 8px 0;
  color: #b8c6cf;
  font-family: var(--utility);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

@keyframes wick-left {
  0%, 100% { transform: rotate(-14deg); }
  50% { transform: rotate(-34deg); }
}

@keyframes wick-right {
  0%, 100% { transform: rotate(14deg); }
  50% { transform: rotate(34deg); }
}

@media (max-width: 1080px) {
  .choice-panel {
    min-height: 420px;
  }
}

@media (max-width: 800px) {
  .entry-ticket {
    width: min(430px, 90%);
  }

  .prompt-card {
    min-height: 480px;
  }
}

@media (max-width: 560px) {
  #aboutHouseButton span:first-child {
    display: none;
  }

  .hallway {
    gap: 48px;
  }

  .entry-ticket {
    width: calc(100% - 10px);
    margin-top: 30px;
    margin-left: 4px;
    padding: 20px 20px 20px 70px;
  }

  .entry-ticket::before {
    left: 14px;
    width: 38px;
  }

  .entry-ticket p:not(.entry-ticket__stamp) {
    font-size: 1.22rem;
  }

  .door-gallery__after {
    min-height: 78px;
    padding-top: 13px;
    gap: 6px;
    flex-direction: column;
  }

  .door-gallery__after p {
    font-size: 0.76rem;
  }

  .surprise-button {
    min-height: 44px;
  }

  .prompt-card {
    min-height: 500px;
  }

  .prompt-card__afterline {
    margin-left: 12px;
    font-size: 0.82rem;
  }

  .presence-panel {
    display: grid;
    width: 100%;
    padding: 5px 10px 13px;
    grid-template-columns: 118px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    text-align: left;
  }

  .wick-button {
    min-width: 110px;
    min-height: 126px;
    grid-row: 1 / 3;
  }

  .wick-moth {
    transform: scale(0.84);
  }

  .presence-panel__name {
    align-self: end;
    margin-bottom: 5px;
  }

  .presence-panel__aside {
    align-self: start;
    font-size: 0.8rem;
  }

  .choice-panel {
    min-height: 0;
    padding: 26px 20px 28px;
  }

  .choice-panel h3 {
    font-size: clamp(2.45rem, 12vw, 3.45rem);
  }

  .story-choice {
    min-height: 54px;
  }

  .choice-panel__actions {
    flex-direction: column;
  }
}
