/* ═══════════════════════════════════════════════════════════════════════════
   Bored? The pinball machine: a cabinet in the site's ink, cream and gold
   ═══════════════════════════════════════════════════════════════════════════ */


.arc {
  --cream: #efe8dc; --gold: #c9b38a; --ink: #14110e;
  position: fixed; inset: 0; z-index: 96; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(28px, 5vw, 96px);
  padding: 24px clamp(20px, 6vw, 112px); color: var(--cream); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: radial-gradient(60% 90% at 72% 50%, #2c2219, #0c0907 72%);
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.arc[hidden] { display: none; }
.arc.on { opacity: 1; }
.arc::before { content: ""; position: fixed; inset: -50%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.06; pointer-events: none; animation: hgrain 0.6s steps(3) infinite; }

/* the side: what it is, the score, how to play */
.arc__side { position: relative; max-width: 440px; opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease) 0.15s, transform 1s var(--ease) 0.15s; }
.arc.on .arc__side { opacity: 1; transform: none; }
.arc__k { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.arc__k i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); animation: recBlink 1.2s steps(1) infinite; }
@keyframes recBlink { 50% { opacity: 0.15; } }
.arc__h { margin-top: 18px; font-family: Italiana, "Didot", Georgia, serif; font-weight: 400; font-size: clamp(54px, 6.6vw, 118px); line-height: 0.92; text-transform: uppercase; letter-spacing: 0.01em; }
.arc__h em { font-style: normal; color: var(--gold); }
.arc__score { margin-top: clamp(22px, 4vh, 44px); display: grid; gap: 4px; }
.arc__score span, .arc__row dt { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(239, 232, 220, 0.5); }
.arc__score b { font-family: Italiana, "Didot", Georgia, serif; font-weight: 400; font-size: clamp(64px, 7.4vw, 128px); line-height: 0.95; transition: color 0.4s, text-shadow 0.4s; }
.arc.is-hype .arc__score b { color: var(--gold); text-shadow: 0 0 40px rgba(201, 179, 138, 0.45); }
.arc__row { display: flex; gap: 30px; margin-top: 18px; }
.arc__row dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; }
.arc__lanes { display: flex; gap: 10px; margin-top: clamp(20px, 3.4vh, 34px); }
.arc__lanes span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(239, 232, 220, 0.25); font-family: var(--mono); font-weight: 700; color: rgba(239, 232, 220, 0.55); transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s; }
.arc__lanes span.on { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 0 22px rgba(201, 179, 138, 0.6); }
.arc__hint { margin-top: 14px; font-size: 14.5px; line-height: 1.55; color: rgba(239, 232, 220, 0.7); }
.arc__keys { margin-top: clamp(18px, 3vh, 30px); display: grid; gap: 10px; font-size: 14px; color: rgba(239, 232, 220, 0.7); }
.arc__tip { margin-top: clamp(18px, 3vh, 30px); font-size: 14px; line-height: 1.55; color: rgba(239, 232, 220, 0.7); }
.arc__tip b { color: var(--cream); }
.arc__keys kbd { display: inline-block; min-width: 26px; margin-right: 4px; padding: 3px 7px; border-radius: 6px; border: 1px solid rgba(239, 232, 220, 0.22); background: rgba(255, 255, 255, 0.05); font-family: var(--mono); font-size: 11px; text-align: center; color: var(--cream); }

/* the cabinet */
.arc__cab {
  --padh: 0px; --ch: min(calc(100vh - 48px), 1000px);
  position: relative; display: flex; flex-direction: column; height: var(--ch); width: calc((var(--ch) - 72px - var(--padh)) * 0.6 + 28px); max-width: calc(100vw - 24px); padding: 14px; border-radius: 34px 34px 20px 20px;
  background: linear-gradient(180deg, #2e251d, #17120e); box-shadow: inset 0 0 0 1px rgba(239, 232, 220, 0.12), inset 0 2px 0 rgba(255, 255, 255, 0.06), 0 70px 120px -40px #000, 0 0 0 6px #0f0c0a, 0 0 0 7px rgba(201, 179, 138, 0.35);
  transform: translateY(50px) scale(0.96); transition: transform 1.1s var(--ease);
}
.arc.on .arc__cab { transform: none; }
.arc__marq { display: flex; align-items: center; gap: 14px; white-space: nowrap; overflow: hidden; height: 44px; padding: 0 10px 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(239, 232, 220, 0.75); }
.arc__marq i { flex: 1; min-width: 8px; height: 1px; background: linear-gradient(90deg, rgba(239, 232, 220, 0.3), rgba(239, 232, 220, 0)); }
.arc__marq span:last-child { color: var(--gold); font-size: 15px; letter-spacing: 0.18em; text-shadow: 0 0 10px rgba(201, 179, 138, 0.6); }
.arc__glass { position: relative; flex: 1 1 0; min-height: 0; display: grid; place-items: center; border-radius: 16px; overflow: hidden; background: var(--ink); box-shadow: inset 0 0 0 1px rgba(239, 232, 220, 0.14); touch-action: none; user-select: none; -webkit-user-select: none; }
.arc__glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 38%), radial-gradient(120% 80% at 50% 110%, rgba(0, 0, 0, 0.35), transparent 60%); }
.arc__cv { display: block; }

/* insert coin / game over */
.arc__msg { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; background: rgba(12, 10, 8, 0.74); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: opacity 0.45s var(--ease); }
.arc__msg.off { opacity: 0; pointer-events: none; }
.arc__msg-k { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); animation: recBlink 1.4s steps(1) infinite; }
.arc__msg-h { font-family: Italiana, "Didot", Georgia, serif; font-size: clamp(52px, 7vh, 84px); line-height: 1; text-transform: uppercase; }
.arc__choice { display: grid; gap: 10px; margin-top: 14px; }
.arc__go { white-space: nowrap; position: relative; height: 54px; padding: 0 26px; background: var(--cream); color: var(--ink); font-size: 13.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; overflow: hidden; isolation: isolate; }
.arc__go::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.55s var(--ease); }
.arc__go:hover::before, .arc__go:focus-visible::before { transform: scaleX(1); transform-origin: left; }
.arc__go--q { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(239, 232, 220, 0.4); }
.arc__go--q::before { background: rgba(239, 232, 220, 0.12); }
.arc__msg-s { margin-top: 6px; font-size: 13px; color: rgba(239, 232, 220, 0.6); }
.arc__launch { position: absolute; right: 10px; bottom: 12px; z-index: 1; width: 66px; height: 66px; border-radius: 50%; background: var(--gold); color: var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.7), inset 0 -3px 0 rgba(0, 0, 0, 0.2); touch-action: none; }
.arc__launch:active { transform: scale(0.94); }

/* music and close */
.arc__top { margin-top: clamp(18px, 3vh, 30px); display: flex; gap: 10px; }
.arc__snd { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(239, 232, 220, 0.2); background: rgba(255, 255, 255, 0.05); color: var(--cream); font-size: 14px; font-weight: 600; }
.arc__snd i { width: 15px; height: 13px; background:
  linear-gradient(currentColor, currentColor) 0 100% / 3px 40% no-repeat,
  linear-gradient(currentColor, currentColor) 6px 100% / 3px 90% no-repeat,
  linear-gradient(currentColor, currentColor) 12px 100% / 3px 60% no-repeat; animation: eq 0.9s ease-in-out infinite alternate; }
.arc__snd.off i { animation: none; opacity: 0.45; background-size: 3px 20%, 3px 20%, 3px 20%; }
@keyframes eq { 0% { background-size: 3px 30%, 3px 100%, 3px 50%; } 50% { background-size: 3px 90%, 3px 40%, 3px 100%; } 100% { background-size: 3px 60%, 3px 70%, 3px 30%; } }
.arc__x { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(239, 232, 220, 0.2); color: var(--cream); transition: transform 0.5s var(--spring); }
.arc__x svg { width: 22px; height: 22px; }
.arc__x:hover { transform: rotate(90deg); }

/* touch controls under the table: shown on touch screens and in small windows */
.arc__pads { display: none; grid-template-columns: 1fr 84px 1fr; gap: 10px; padding-top: 10px; }
.arc__pads button { height: 64px; border-radius: 18px; border: 1px solid rgba(239, 232, 220, 0.18); background: rgba(255, 255, 255, 0.05); color: var(--cream); font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 12px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.arc__pads button:active { background: rgba(201, 179, 138, 0.25); border-color: var(--gold); }
.arc__pads span { color: var(--gold); }
.arc__pads .arc__launch { position: static; width: auto; height: 64px; border-radius: 18px; border: 0; background: var(--gold); color: var(--ink); font-size: 10px; letter-spacing: 0.1em; box-shadow: none; }
.arc__tip { display: none; }
@media (pointer: coarse), (max-width: 900px) {
  .arc__pads { display: grid; }
  .arc__cab { --padh: 74px; }
  .arc__tip { display: block; }
}
@media (pointer: coarse) { .arc__keys { display: none; } }
/* short windows: the side says less, and everything can scroll */
@media (max-height: 760px) and (min-width: 901px) {
  .arc__h { font-size: clamp(40px, min(5vw, 10vh), 90px); margin-top: 10px; }
  .arc__score { margin-top: 14px; }
  .arc__score b { font-size: clamp(48px, min(6vw, 11vh), 100px); }
  .arc__lanes { margin-top: 14px; }
  .arc__lanes span { width: 32px; height: 32px; }
  .arc__hint { display: none; }
  .arc__keys { margin-top: 14px; gap: 6px; font-size: 13px; }
}
@media (max-width: 900px) {
  .arc { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; align-content: start; align-items: start; justify-items: center; gap: 16px; padding: 18px 12px 12px; }
  .arc__side { width: 100%; max-width: none; display: flex; align-items: flex-end; gap: 20px; padding-right: 150px; min-height: 50px; }
  .arc__k, .arc__h, .arc__lanes, .arc__hint, .arc__keys, .arc__tip { display: none; }
  .arc__score { margin: 0; }
  .arc__score b { font-size: 42px; }
  .arc__row { margin: 0 0 4px; gap: 16px; }
  .arc__row dd { font-size: 16px; }
  .arc__row div:last-child { display: none; }
  .arc__top { position: absolute; top: 0; right: 0; margin: 0; }
  .arc__snd { height: 44px; padding: 0 14px; }
  .arc__snd span { display: none; }
  .arc__x { width: 44px; height: 44px; }
  .arc__cab { --ch: min(calc(100svh - 112px), calc((100vw - 40px) / 0.6 + 46px + var(--padh))); width: calc((var(--ch) - 46px - var(--padh)) * 0.6 + 16px); padding: 8px; border-radius: 22px 22px 16px 16px; }
  .arc__marq { height: 30px; font-size: 9.5px; padding-bottom: 6px; }
  .arc__marq span:last-child { font-size: 12px; }
}

/* while the machine is open, the page behind it doesn't scroll or show its scrollbar */
html.arc-open, html.arc-open body { overflow: hidden; }
@media (max-height: 760px) and (min-width: 901px) {
  .arc { padding-block: 16px; }
  .arc__cab { --ch: calc(100vh - 32px); }
  .arc__row { margin-top: 10px; }
  .arc__keys { gap: 4px; }
  .arc__top { margin-top: 14px; }
}
/* in a narrow cabinet the title gives way, never the score */
.arc__marq span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.arc__marq span:last-child { flex: none; }
