.title {
  --hoop: min(520px, 70vw, 50dvh);
  position: fixed; inset: 0; z-index: 80;
  display: grid; justify-items: center; align-content: center; gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) 16px 24px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(216, 160, 58, .10), transparent 58%),
    radial-gradient(ellipse at 50% 120%, var(--felt-deep), transparent 70%),
    var(--linen), var(--felt) var(--grain);
  overflow: auto;
  color: var(--paper);
}
.titled .report-veil--centre { z-index: 90; }

.title__stage { position: relative; width: var(--hoop); height: var(--hoop); margin: calc(var(--hoop) * .1 + 26px) 0 calc(var(--hoop) * .1 + 30px); animation: title-settle .7s cubic-bezier(.2, .9, .3, 1) both; }

.title__hoop { position: absolute; inset: 0; }
.title__linen {
  position: absolute; inset: 4.6%; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(120, 96, 60, .07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 96, 60, .07) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 42% 38%, #F6EEDC, #E7D9BB 75%, #D9C7A2);
  box-shadow: inset 0 0 0 2px rgba(107, 74, 43, .25), inset 0 10px 30px rgba(42, 35, 32, .25);
}
.title__ghost { opacity: .2; mix-blend-mode: multiply; filter: saturate(.6); transform: rotate(-4deg) scale(.82); }
.title__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }

.title__name { position: absolute; left: 6%; right: 6%; top: 50%; transform: translateY(-50%); width: 88%; overflow: visible; }
.title__letters {
  font-family: var(--font-title); font-weight: 650; font-size: 92px; font-variation-settings: 'opsz' 144;
  letter-spacing: -.01em;
  fill: rgba(42, 35, 32, 0); stroke: var(--thread); stroke-width: 1.7; stroke-dasharray: 7 4.5; stroke-linecap: round;
  paint-order: stroke;
  animation: title-sew 1.7s .45s steps(34, end) both, title-ink .9s 1.9s ease-out forwards;
}
.title__letters--small { font-size: 48px; font-style: italic; font-weight: 500; stroke-width: 1.3; stroke-dasharray: 5 3.5; }
.title__seam { fill: none; stroke: var(--thread); stroke-width: 2.2; stroke-dasharray: 9 7; stroke-linecap: round; opacity: .85;
  animation: title-sew 1s 2.1s steps(18, end) both; }

.title__worlds { --r: calc(var(--hoop) * .6); position: absolute; inset: 0; pointer-events: none; }
.title__world {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; pointer-events: auto;
  transform:
    translate(-50%, -50%)
    translate(calc(var(--x) * var(--r) + var(--px, 0) * 28px * var(--depth)), calc(var(--y) * var(--r) + var(--py, 0) * 28px * var(--depth)))
    rotate(var(--tilt));
  transition: transform .5s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
}
.title__world canvas { display: block; width: 100%; height: 100%; }
.title__world--waiting { box-shadow: none; outline: 1.5px dashed rgba(214, 200, 169, .38); outline-offset: -1px; }
.title__world--waiting canvas { opacity: 0; }

.title__tagline { margin: 0; font-size: 23px; color: var(--paper); text-align: center; max-width: 40ch; animation: title-fade .6s 2.3s both; }
.title__lead { display: flex; align-items: center; gap: 4px; animation: title-fade .5s .5s both; }
.title__needle { width: 170px; height: 46px; overflow: visible; }
.title__thread { fill: none; stroke: var(--thread); stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linecap: round; }
.title__go { font-size: 21px; padding: 15px 30px; }
.title__journey { margin: 0; font-size: 15px; color: var(--paper-edge); text-align: center; max-width: 46ch; animation: title-fade .5s .7s both; }
.title__foot { min-height: 44px; animation: title-fade .5s .9s both; }
.title__over { color: var(--paper-edge); font-size: 18px; min-height: 44px; }

.title--leaving { animation: title-out .65s ease-in forwards; pointer-events: none; }
.title--leaving .title__stage { animation: none; transform: scale(2.6); opacity: 0; transition: transform .65s cubic-bezier(.6, 0, .8, .4), opacity .5s .15s; }

@keyframes title-sew { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes title-ink { to { fill: var(--ink); } }
@keyframes title-settle { from { opacity: 0; transform: scale(.94) rotate(-2deg); } }
@keyframes title-fade { from { opacity: 0; transform: translateY(6px); } }
@keyframes title-out { 60% { background-color: var(--felt); } to { opacity: 0; } }

@media (max-width: 700px) {
  .title { --hoop: min(68vw, 46dvh); gap: 10px; }
  .title__worlds { --r: calc(var(--hoop) * .62); }
  .title__world { width: 32px; height: 32px; }
  .title__stage { margin: calc(var(--hoop) * .12 + 18px) 0 calc(var(--hoop) * .12 + 20px); }
  .title__tagline { font-size: 20px; }
  .title__needle { width: 70px; }
  .title__go { font-size: 19px; padding: 13px 22px; }
}
.title--still *, .title--still { animation: none !important; transition: none !important; }
.title--still .title__letters { fill: var(--ink); }
.title__player { display: grid; justify-items: center; gap: 4px; animation: title-fade .5s .45s both; color: var(--paper-light, #F3EBDA); }
.title__player > span:first-child { font-size: 13px; opacity: .8; }
.title__player input { width: min(260px, 80vw); padding: 7px 12px; font: 400 20px var(--font-title); text-align: center; color: var(--ink);
  background: var(--paper, #F3EBDA); border: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(42, 35, 32, .2), 0 2px 6px rgba(0, 0, 0, .35); }
.title__player input:focus-visible { outline: 2px dashed var(--thread); outline-offset: 3px; }
.title__playerhint { min-height: 16px; font-size: 12px; color: #f0a0c0; }
.title__go[aria-disabled='true'] { opacity: .55; }
