/* The two faces share a physical corner at the bottom right of the page. */
@font-face {
  font-family: 'Ura Dot'; src: url(/media/after-hours/game-dot-v1.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Ura Arcade'; src: url(/media/after-hours/game-start-v1.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Ura Reggae'; src: url(/media/after-hours/school-reggae-v1.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Ura Block'; src: url(/media/after-hours/school-dela-v1.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Ura Brush'; src: url(/media/after-hours/school-yuji-v1.woff2) format('woff2'); font-display: swap;
}
footer { position: relative; }
.ura-door { position: absolute; right: 0; bottom: 0; z-index: 1; }
.ura-key {
  display: block; position: relative; width: 108px; height: 56px;
  list-style: none; cursor: grab; touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
}
.ura-key::-webkit-details-marker { display: none; }
.ura-key:focus-visible { outline: 2px solid #295c93; outline-offset: -3px; }
.ura-word {
  position: absolute; bottom: 12px; right: 30px; z-index: 2;
  font: 500 12px/1.4 var(--serif); letter-spacing: .17em; color: #535f69;
  transition: transform .25s ease;
}
.ura-corner { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ura-corner canvas, .ura-sample { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.ura-sample {
  background: #152c38 url(/media/after-hours/room-peek-v1.webp) right bottom / 85px 58px no-repeat;
  clip-path: polygon(100% 67%, 100% 100%, 79% 100%);
}
.ura-key:not([data-curled]) .ura-corner::after {
  content: ""; position: absolute; right: 8px; bottom: 8px; width: 23px; height: 19px;
  background: linear-gradient(140deg, #faf8f1 15%, #c4c3be 53%, #fbfaf5 67%);
  clip-path: polygon(100% 0, 0 100%, 0 14%);
}
.ura-key[data-peek] .ura-word { transform: translate(-22px, -4px); }
@media (min-width: 861px) {
  body.ura-at-foot .live { right: max(124px, calc(env(safe-area-inset-right) + 124px)); }
}
.ura-fallback {
  position: absolute; bottom: 54px; right: 10px; min-width: 195px;
  padding: 10px 16px; background: #111823; box-shadow: 0 4px 18px #0004;
}
.ura-fallback a { display: block; color: #fff; padding: 6px 0; margin: 0; }
.ura-fallback summary { color: #fff; cursor: pointer; min-height: 44px; line-height: 44px; }

.ura-room:not([open]) { display: none; }
.ura-room[open] {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh;
  max-height: none; box-sizing: border-box; margin: 0; padding: 0; border: 0;
  background: transparent; color: #fff7dc; overflow: hidden; overscroll-behavior: contain;
  font-family: var(--sans); line-height: 1.3;
}
.ura-room::backdrop { background: transparent; }
html.ura-lock { overflow: hidden; }
.ura-inside {
  position: absolute; inset: 0; overflow: hidden; isolation: isolate; background: #10141e;
  clip-path: polygon(100% 100%,100% 100%,100% 100%);
}
.ura-set {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%) translate(var(--pan-x, 0px),var(--pan-y, 0px)) scale(var(--zoom, 1));
  width: max(100%, 150vh); width: max(100%, 150dvh); aspect-ratio: 3/2;
  background: radial-gradient(ellipse at 20% 44%, #10414e, transparent 27%),
    radial-gradient(ellipse at 69% 47%, #663e25, transparent 38%), #10141e;
}
.ura-set picture, .ura-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.ura-photo { object-fit: cover; }
.ura-inside::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #05080e99, transparent 25%, transparent 84%, #08090d65);
}
.ura-heading {
  position: absolute; z-index: 2; left: max(5vw, env(safe-area-inset-left)); top: max(6%, 25px);
  pointer-events: none; transform: rotate(-5deg); text-shadow: 0 2px 8px #0008;
}
.ura-heading h2 {
  position: relative; display: inline-block; font: 800 clamp(15px, 1.65vw, 24px)/1.08 var(--sans);
  letter-spacing: .1em; color: #f6edd6;
}
.ura-heading h2 span {
  display: block; margin: .06em 0 0 -.05em; font-size: clamp(35px, 4.2vw, 72px);
  line-height: 1.04; font-weight: 900; letter-spacing: -.08em;
}
.ura-heading h2::after {
  content: ""; display: block; height: .24em; margin: .26em 0 0 14%;
  background: #ff626b; transform: rotate(-3deg);
  clip-path: polygon(0 28%, 96% 0, 100% 25%, 81% 63%, 6% 100%);
}
.ura-return {
  position: absolute; z-index: 7; top: max(16px, env(safe-area-inset-top));
  right: max(17px, env(safe-area-inset-right)); display: flex; gap: 8px; align-items: center;
  min-height: 44px; padding: 7px 15px; color: #f5f1e6; background: #101219de;
  border: 1px solid #c3c0b280; border-radius: 2px; font: 600 13px/1.25 var(--sans);
  cursor: pointer;
}
.ura-return span { display: inline-block; font: 22px/1 Georgia, serif; }
.ura-return:hover { background: #2d2b2b; }
.ura-room:not([data-stage="3"]) .ura-return {
  color: #35404a; background: #faf9f1f2; border-color: #9fa4a7; font-weight: 500;
}
.ura-next {
  position: absolute; z-index: 3; inset: 0; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent; color: #fdf7e3; cursor: pointer; touch-action: none;
}
.ura-next-mark {
  display: flex; gap: 6px; align-items: center; justify-content: center; position: absolute;
  right: max(4px, env(safe-area-inset-right)); bottom: max(2px, env(safe-area-inset-bottom)); min-height: 45px;
  padding: 0 10px; background: #0b0d10d9; border-top: 1px solid #f9edc66b;
  color: #fff8dc; font: 600 12px/1.3 var(--sans); letter-spacing: .02em;
}
.ura-next-mark i { font: 20px/1 Georgia,serif; }
.ura-next:focus-visible { outline: 0; }
.ura-next:focus-visible .ura-next-mark { outline: 3px solid #fff3a1; outline-offset: -3px; }
.ura-status { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.ura-room [hidden] { display: none !important; }
.ura-object {
  position: absolute; z-index: 2; display: flex; align-items: flex-end; justify-content: center;
  min-width: 44px; min-height: 44px; color: #181917; text-decoration: none; outline-offset: 5px;
  -webkit-tap-highlight-color: transparent;
}
.ura-game { left: 6.4%; top: 25%; width: 28%; height: 38%; --tilt: -2deg; }
.ura-school { left: 54%; top: 36%; width: 27%; height: 25%; --tilt: 3deg; }
.ura-tag {
  position: absolute; top: 47%; left: 50%; display: block; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(var(--tilt)); transition: transform .18s ease;
}

/* The CRT uses the game room's start key and its two arcade typefaces. */
.ura-game .ura-tag {
  padding: 8px 13px 10px; border: 2px solid #fff; background: #16112d; color: #fff;
  box-shadow: 4px 4px 0 #ff2bd6; text-align: center; font-family: 'Ura Dot', monospace;
}
.ura-game small { display: block; font-size: clamp(11px, 1.1vw, 16px); line-height: 1.25; font-weight: 400; }
.ura-game strong {
  display: flex; justify-content: center; align-items: center; gap: .45em; margin-top: .24em;
  font: 400 clamp(15px, 1.75vw, 28px)/1.2 'Ura Arcade', monospace; letter-spacing: 0;
}
.ura-game strong span { color: #b6ff3b; font: 400 .78em/1 'Ura Dot', monospace; }

/* Paper, ink and angles repeat the seven pieces of the /buchiage cover. */
.ura-school .ura-tag { --blue: #1f4fb4; --ink: #0d0d0d; text-align: left; }
.ura-school strong:not(.ura-cutout) {
  display: block; padding: .1em .24em; color: #fff; background: var(--ink); border: 1px solid #fff;
}
.ura-school small {
  display: table; margin: 0 0 .26em .15em; padding: .25em .57em .29em;
  color: #fff; background: var(--blue); box-shadow: 2px 2px 0 var(--ink); transform: rotate(-3deg);
  font: 400 clamp(12px, 1.1vw, 16px)/1.15 'Ura Reggae', var(--sans);
}
.ura-cutout {
  display: inline-flex; align-items: center; gap: .04em; color: var(--ink);
  font: 700 clamp(18px, 2.05vw, 34px)/1.12 'Ura Reggae', var(--sans);
}
.ura-cutout i {
  display: block; padding: .02em .10em .07em; border: 0; box-shadow: .075em .1em 0 #000a;
  font-style: normal; letter-spacing: 0;
}
.ura-cutout i:nth-child(2) { margin-right: .2em; }
.ura-cutout .cut-cream { background: #f1e7c9; transform: rotate(5deg) translateY(.08em); }
.ura-cutout .cut-black {
  color: #fff; background: var(--ink); outline: .065em solid #fff; outline-offset: -.065em; transform: rotate(3deg);
}
.ura-cutout .cut-blue { background: var(--blue); color: #fff; font-family: 'Ura Brush', serif; transform: rotate(-2deg); }
.ura-cutout .cut-block { background: #fff; font-family: 'Ura Block', sans-serif; transform: rotate(-4deg); }
.ura-cutout .cut-brush { background: #fff; color: var(--blue); font-family: 'Ura Brush', serif; transform: rotate(-6deg) translateY(-.05em); }

.ura-return:focus-visible { outline: 3px solid #fff4a3; }
.ura-object:focus-visible { outline: none; }
.ura-object:focus-visible .ura-tag {
  outline: 3px solid #fff; outline-offset: 5px; transform: translate(-50%, -55%) rotate(0deg);
}
@media (hover: hover) {
  .ura-game:hover .ura-tag { background: #32224a; transform: translate(-50%, -54%) rotate(0deg); }
  .ura-school:hover .ura-tag { transform: translate(-50%, -56%) rotate(0deg) scale(1.035); }
}
.ura-game:active .ura-tag { transform: translate(calc(-50% + 2px), calc(-50% + 2px)) rotate(var(--tilt)); box-shadow: 2px 2px 0 #ff2bd6; }
.ura-school:active .ura-tag { transform: translate(-50%, -49%) rotate(1deg); }
.ura-curl { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.ura-curl[hidden] { display: none; }
.ura-room[data-turning] .ura-object { pointer-events: none; }
@media (max-aspect-ratio: 1/1) {
  .ura-set { width: max(100%, 66.6667vh); width: max(100%, 66.6667dvh); aspect-ratio: 2/3; }
  .ura-game { left: 12%; width: 29%; top: 44%; height: 17%; }
  .ura-school { left: 55%; width: 26%; top: 49%; height: 11.5%; }
  .ura-game .ura-tag { padding: 5px 6px 7px; box-shadow: 3px 3px 0 #ff2bd6; }
  .ura-game strong { font-size: clamp(14px, 3.65vw, 24px); }
  .ura-school .ura-cutout { font-size: clamp(16px, 4.45vw, 24px); }
  .ura-heading { top: max(8%, calc(env(safe-area-inset-top) + 22px)); left: max(6%, env(safe-area-inset-left)); }
}
@media (prefers-reduced-motion: reduce) {
  .ura-key .ura-word, .ura-object .ura-tag { transition: none; }
}
@media (max-aspect-ratio: 4/9) {
  .ura-game { left: 16.5%; }
  .ura-school { left: 52.5%; }
}

.ura-tube, .ura-lamplight { position: absolute; pointer-events: none; }
.ura-lamplight {
  inset: 0; opacity: 0;
  --desk: 68% 53%;
  --desk-size: 24% 15%;
  --wall: 72% 37%;
  --wall-size: 13% 17%;
  --pool: 65% 58.5%;
  --spill-size: 27% 5%;
  --bulb-left: 66.7%; --bulb-top: 30.25%; --bulb-width: 9.1%; --bulb-height: 3.35%;
  background:
    radial-gradient(ellipse var(--desk-size) at var(--desk), #0c1220d6 0%, #1117249c 27%, #10152270 52%, transparent 100%),
    radial-gradient(ellipse var(--spill-size) at var(--pool), #1b192a8c 0%, #15182748 55%, transparent 100%),
    radial-gradient(ellipse var(--wall-size) at var(--wall), #281c238c 0%, #191c2b94 32%, transparent 100%);
}
.ura-lamplight::after {
  content: ""; position: absolute; left: var(--bulb-left); top: var(--bulb-top);
  width: var(--bulb-width); height: var(--bulb-height); border-radius: 50%;
  transform: rotate(-13deg); filter: blur(1.3px);
  background: radial-gradient(ellipse, #421d0bfa 0%, #57280cf2 54%, #aa6325b3 76%, transparent 100%);
}
.ura-school .ura-tag { filter: brightness(var(--paper-brightness, 1)); }
.ura-game .ura-tag::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #7edafe0b 2px 3px);
}
@media (max-aspect-ratio: 1/1) {
  .ura-lamplight {
    --desk: 71% 55.4%; --desk-size: 27% 8.5%;
    --pool: 65% 60%; --spill-size: 30% 3.5%;
    --wall: 74% 48.5%; --wall-size: 16% 9%;
    --bulb-left: 67.4%; --bulb-top: 46.15%; --bulb-width: 9.8%; --bulb-height: 1.65%;
  }
}

.ura-heading .ura-die { width:.84em; height:.87em; margin-left:.14em; vertical-align:.015em; transform:rotate(9deg); overflow:visible; }

.ura-motion-toggle {
  position: absolute; z-index: 4; right: max(17px, env(safe-area-inset-right)); bottom: max(15px, env(safe-area-inset-bottom));
  min-height: 44px; padding: 6px 12px; border: 1px solid #c3c0b280; border-radius: 2px;
  background: #101219de; color: #f5f1e6; font: 600 12px/1.3 var(--sans); cursor: pointer;
}
.ura-motion-toggle:focus-visible { outline: 3px solid #fff4a3; }
