@font-face {
  font-family: Fell;
  src: url("/assets/im_fell_english_sc.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --paper: #f4dfbc;
  --ink: #2b152b;
  --cream: #fff1c9;
  --gold: #ffd98a;
  --pink: #ff547a;
  --cyan: #6ee3df;
  color: var(--ink);
  background: #ebcf9e;
  font: 100%/1.52 system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 70% 8%, #fff3d6 0, transparent 45%),
    radial-gradient(ellipse at 8% 52%, #ca657163, transparent 44%),
    repeating-linear-gradient(96deg, #43251509 0 1px, transparent 1px 5px),
    repeating-linear-gradient(6deg, #aa592e10 0 1px, transparent 1px 4px);
}
h1, h2, .wordmark, .margin-note { font-family: Fell, Georgia, serif; font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.masthead {
  min-height: 4.1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem 1.25rem;
  margin: 0 clamp(1rem, 5vw, 5rem);
  border-bottom: 1px solid #834b42;
}
.wordmark { font-size: 1.85rem; line-height: 1; text-decoration: none; }
.navigation { display: flex; gap: clamp(.15rem, 2vw, 1.8rem); }
.navigation a, .language {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  padding: .25rem .4rem;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: .28em;
}
.navigation a:hover, .language:hover, .navigation a[aria-current="page"] { text-decoration: underline; }
.language { justify-self: end; color: #72324c; }
.cover { padding: clamp(1.6rem, 5vw, 4rem) clamp(1rem, 6vw, 7rem) 1.6rem; }

.sheet {
  isolation: isolate;
  position: relative;
  width: min(100%, 88rem);
  min-height: clamp(31rem, 76svh, 48rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .9fr 1fr;
  color: var(--cream);
  --magic: #e787da;
  --magic-alt: #4edfd3;
}
.sheet.enchanted { --magic: #f9a441; --magic-alt: #ff419a; }
.ink-blots {
  position: absolute;
  z-index: -4;
  inset: -1.3rem -.8rem -.9rem -.8rem;
  background:
    radial-gradient(ellipse 1.7rem .75rem at 95% 2.5%, #7c274e 22%, #7c274e98 70%, transparent 77%),
    radial-gradient(ellipse .38rem .22rem at 99% 1.2%, #7c274e 62%, transparent 80%),
    radial-gradient(ellipse .24rem .35rem at 93% 0%, #482646 55%, transparent 82%),
    radial-gradient(ellipse 1.8rem 1.05rem at 3.6% 97%, #601342 45%, #60134295 73%, transparent 81%),
    radial-gradient(circle .22rem at 11% 99%, #8c3e50 56%, transparent 81%),
    radial-gradient(ellipse .18rem .26rem at 1.6% 93%, #6b2648 52%, transparent 84%);
  pointer-events: none;
}
.torn-paper {
  position: absolute;
  inset: -.72rem -.38rem .8rem -.4rem;
  z-index: -3;
  transform: rotate(-1.25deg);
  background:
    repeating-linear-gradient(102deg, #5f1e2d18 0 1px, transparent 1px 6px),
    linear-gradient(114deg, #b54052, #f1bc75 43%, #e27c9c 91%);
  clip-path: polygon(0 3%, 9% 3.4%, 13% 1%, 31% 2.7%, 38% 0, 51% 2%, 65% 1%, 79% 2%, 100% 0, 99% 14%, 100% 26%, 98% 45%, 100% 67%, 98.5% 87%, 100% 98%, 96% 99%, 82% 97.4%, 63% 100%, 48% 98%, 36% 100%, 21% 98.6%, 7% 100%, 1% 98%, 2% 72%, 0 55%, 1.5% 24%);
}
.ink-field {
  position: absolute;
  z-index: -2;
  inset: -.2rem -.15rem .22rem -.15rem;
  clip-path: polygon(0 1.5%, 5% 2%, 7% 1.2%, 16% 2.1%, 26% 0, 38% 2%, 43% 1%, 49% 2%, 56% 1.2%, 65% 2%, 86% .5%, 91% 2%, 100% 1%, 99% 18%, 100% 23%, 98.5% 34%, 99.8% 41%, 98% 59%, 99.6% 74%, 99% 87%, 100% 98%, 90% 97.5%, 81% 99%, 76% 98%, 66% 100%, 58% 98.3%, 52% 99.3%, 42% 97.5%, 29% 99%, 23% 97.9%, 20% 99.5%, 15% 97.5%, 10% 99.5%, 5% 98%, 0 99%, 1.3% 84%, 0 77%, 1.6% 66%, .3% 56%, 1.1% 40%, 0 28%, 1.5% 17%);
  background:
    repeating-linear-gradient(116deg, #fff2c00a 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 87% 25%, #008997bf 0, #13565e68 32%, transparent 58%),
    radial-gradient(ellipse at 77% 80%, #bc0f6c 0, #6a1c62 26%, transparent 64%),
    radial-gradient(ellipse at 31% 20%, #58315f, transparent 57%),
    #23162f;
}
.sheet::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: .95rem 1.25rem 1.1rem;
  border: 1px solid #ffd98a6e;
  transform: rotate(.25deg);
  pointer-events: none;
}
.sheet::after {
  content: "✦";
  position: absolute;
  left: .9rem;
  top: .15rem;
  color: var(--gold);
  font-size: 1.27rem;
  pointer-events: none;
}
.spell-dust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.cover-copy { position: relative; z-index: 2; align-self: center; min-width: 0; padding: 4rem 0 4.8rem clamp(1.65rem, 6vw, 7rem); }
.edition {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem .8rem;
  color: var(--gold);
  font-size: .86rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .13em;
}
.edition span + span { padding-left: .78rem; border-left: 1px solid #eec08c78; }
h1 {
  width: max-content;
  max-width: 100%;
  font-size: clamp(3.4rem, 8.35vw, 9rem);
  line-height: .8;
  margin: .24em 0 .21em;
  color: #ffedbb;
  text-shadow: .035em .055em #7a2145, 0 0 .3em #eb547d82;
}
.entry {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 3.05rem;
  margin-top: 1.6rem;
  padding: .5rem 1.25rem;
  background: linear-gradient(110deg, #ffe696, #ffad6e 78%, #f99080);
  box-shadow: inset 0 0 0 1px #ffefb1, 0 0 0 1px #a8505b, 0 0 1.35rem #f4158380;
  outline: 1px solid #ffd790;
  outline-offset: 4px;
  color: #3e1929;
  font-weight: 820;
  text-decoration: none;
}
.entry:hover { background: #fff1b6; }
.entry:focus-visible { outline: 2px solid #fff4c9; outline-offset: 5px; }

.portrait { margin: 0; position: relative; display: grid; min-width: 0; }
.artwork { position: relative; align-self: stretch; }
.artwork img {
  position: absolute;
  z-index: 2;
  top: 37%;
  left: 54%;
  display: block;
  width: min(clamp(38rem, 77vw, 68rem), 92svh);
  max-width: none;
  height: auto;
  transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
  transition: transform .35s cubic-bezier(.18,.62,.22,1);
  filter: drop-shadow(.7rem 1rem .7rem #250c32d9) drop-shadow(-.12rem -.14rem .45rem #76e4e0ad);
  pointer-events: none;
}
.orbit {
  position: absolute;
  z-index: 1;
  width: min(90%, 37rem);
  aspect-ratio: 1;
  top: 42%;
  left: 52%;
  translate: -50% -50%;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--magic);
  background:
    repeating-conic-gradient(from 27deg, #fff0ac8a 0 .55deg, transparent .55deg 12deg),
    radial-gradient(circle, #552b62 0, #0d6875 47%, #e341894d 66%, transparent 71%);
  box-shadow: 0 0 3rem #bc69ca8c, inset 0 0 2.2rem #fff0ae4d;
  transform: translate(calc(var(--dx, 0px) * -.62), calc(var(--dy, 0px) * -.62));
  transition: transform .43s ease, box-shadow .43s ease;
}
.orbit::before, .orbit::after { content: ""; position: absolute; inset: 5%; border-radius: 50%; border: 1px solid #ffe4a2ac; }
.orbit::after { inset: 13%; background: radial-gradient(circle, #452352 2%, #306277 60%, #220d3288); }
.orbit span { position: absolute; z-index: 1; width: .67rem; aspect-ratio: 1; rotate: 45deg; background: var(--gold); box-shadow: 0 0 1rem .2rem var(--magic); }
.orbit span:nth-child(1) { top: 6%; left: 23%; }
.orbit span:nth-child(2) { top: 26%; right: 4%; }
.orbit span:nth-child(3) { bottom: 12%; right: 13%; }
.spell-flare {
  position: absolute;
  inset: 2% -6% 10% -12%;
  background: radial-gradient(ellipse at 48% 56%, transparent 24%, var(--magic) 49%, transparent 68%);
  filter: blur(1.1rem);
  opacity: .28;
  transition: opacity .4s ease;
  pointer-events: none;
}
.enchanted .spell-flare { opacity: .75; }
.enchanted .orbit { box-shadow: 0 0 3.5rem var(--magic-alt), inset 0 0 3rem var(--gold); }
.spell-seal {
  z-index: 3;
  position: absolute;
  display: grid;
  width: 2.85rem;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  right: clamp(.8rem, 4vw, 4rem);
  bottom: 11%;
  border: 1px solid #ffdc92;
  border-radius: 50%;
  background: #371d45;
  color: var(--gold);
  font: 1.5rem/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 0 1.4rem #f34a95ad;
}
.spell-seal[hidden] { display: none; }
.spell-seal:hover, .spell-seal[aria-pressed="true"] { background: #873152; }
.margin-note {
  position: absolute;
  z-index: 3;
  left: -.42rem;
  bottom: -.8rem;
  color: #562137;
  background: #ead08f;
  background: repeating-linear-gradient(105deg, #8e422409 0 2px, transparent 2px 5px), #f4d89c;
  border: 1px solid #61a198;
  padding: .15rem .75rem;
  transform: rotate(-4deg);
  font-size: 1.15rem;
  box-shadow: .15rem .18rem 0 #4c19385e;
}
.art-credit, .site-footer {
  width: min(calc(100% - 2.5rem), 88rem);
  margin: 0 auto 1.25rem;
  color: #493447;
  text-align: end;
  font-size: .75rem;
}
.art-credit summary { cursor: pointer; }
.art-credit details p { margin-top: .35rem; }
.art-credit a, .site-footer a { text-underline-offset: .18em; }

.inner-page { padding: clamp(1.35rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem); }
.registration, .downloads, .account-panel {
  margin: 0 auto;
  color: var(--ink);
  background: #fff0d6;
  border: 1px solid #8d4660;
  padding: clamp(1.25rem, 5vw, 2.75rem);
  box-shadow: .4rem .4rem 0 #32182e70;
}
.registration { width: min(100%, 33rem); }
.downloads { width: min(100%, 43rem); }
.cookie-details {
  display: grid;
  gap: .25rem;
  margin: 1.2rem 0;
}
.cookie-details dt { font-weight: 700; }
.cookie-details dd { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.inner-page h1 { color: var(--ink); margin-top: 0; width: auto; font-size: clamp(2.6rem, 7vw, 4.65rem); line-height: 1; text-shadow: none; }
.inner-page h2 { font-size: 2rem; line-height: 1.05; }
.inner-page p { margin: .8rem 0 1.15rem; }
.platforms { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.platforms li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 12.5rem);
  align-items: center;
  gap: .85rem 1.4rem;
  border-top: 1px solid #a56b69;
  padding: 1.1rem 0;
}
.platforms li:last-child { border-bottom: 1px solid #a56b69; }
.platforms span { display: block; margin-top: .22rem; font: 650 .88rem/1.2 system-ui, sans-serif; }
.platforms .entry { justify-content: center; text-align: center; margin: 0; }
.download-guide { margin-top: 1.3rem; }
.download-guide summary { width: fit-content; padding-block: .35rem; cursor: pointer; font-weight: 700; }
.download-guide dl { display: grid; gap: .2rem; margin: .6rem 0 0; }
.download-guide dt { font-weight: 700; }
.download-guide dd { margin: 0 0 .65rem; }

form { display: grid; }
label { font-size: .925rem; font-weight: 650; }
input {
  width: 100%;
  min-height: 2.55rem;
  margin: .22rem 0 .3rem;
  padding: .4rem .55rem;
  border: 0;
  border-bottom: 1px solid #83715b;
  border-radius: 0;
  background: #f8eedc;
  color: var(--ink);
  font: inherit;
}
small { margin-bottom: .85rem; font-size: .875rem; color: #574a3f; }
.submit {
  width: fit-content;
  margin-top: .85rem;
  min-height: 2.8rem;
  padding: .5rem 1rem;
  border: 1px solid #733e32;
  border-radius: 0;
  background: #773350;
  color: #fff6df;
  font-weight: 700;
  cursor: pointer;
}
.submit:hover { background: #673b2e; }
.submit:disabled { opacity: .75; cursor: wait; }
.form-status { margin: .7rem 0 0; font-weight: 650; }
.form-status[data-error] { color: #6f3122; }
.registration .form-switch { margin: 1.2rem 0 0; }
.form-switch a { color: #773350; text-underline-offset: .18em; }

.account-panel {
  display: grid;
  grid-template-columns: minmax(10.5rem, 14rem) minmax(0, 1fr);
  column-gap: clamp(1.25rem, 4vw, 3rem);
  row-gap: 1.65rem;
  width: min(100%, 62rem);
}
.account-panel h1 { grid-column: 1 / -1; }
.account-menu {
  align-self: start;
  background: #f5e3c6;
  border: 1px solid #b7987f;
  padding: .5rem;
}
.account-menu ul {
  display: grid;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.account-menu a, .account-menu button {
  display: block;
  padding: .6rem .7rem;
  border: 0;
  background: transparent;
  color: #6c2d49;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  text-align: start;
  cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: #e9cbaa; }
.account-menu a[aria-current="page"] { background: #773350; color: #fff6df; }
.account-menu button:disabled { opacity: .75; cursor: wait; }
.account-menu .signout { border-top: 1px solid #b7987f; margin-top: .5rem; padding-top: .3rem; }
.account-menu .form-status { margin: .35rem .7rem; font-size: .875rem; }
.account-content .entry { margin: 0; }
.password-form { max-width: 28rem; }

@media (max-width: 720px) {
  .cover { padding: 1.45rem 1.25rem 1rem; }
  .sheet { grid-template-columns: 1fr; grid-template-rows: auto auto; min-height: 0; }
  .portrait { grid-row: 1; }
  .artwork { min-height: clamp(18rem, 64vw, 28rem); }
  .cover-copy { grid-row: 2; padding: .45rem 1.55rem 3rem; }
  h1 { font-size: clamp(3.15rem, 12vw, 6.3rem); }
  .artwork img { top: 47%; left: 53%; width: clamp(24rem, 97vw, 39rem); }
  .orbit { top: 48%; width: min(67%, 24rem); }
  .spell-seal { bottom: 4%; right: 7%; }
}
@media (max-width: 580px) {
  .account-panel { grid-template-columns: minmax(0, 1fr); }
  .account-menu { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .25rem; }
  .account-menu ul { display: flex; flex-wrap: wrap; }
  .account-menu .signout { border-top: 0; margin: 0; padding: 0; }
}
@media (max-width: 500px) {
  .masthead { grid-template-columns: 1fr auto; gap: 0 .5rem; padding-top: .4rem; }
  .wordmark { grid-column: 1; grid-row: 1; }
  .language { grid-column: 2; grid-row: 1; }
  .navigation { grid-column: 1 / -1; grid-row: 2; gap: 1rem; }
  .platforms li { grid-template-columns: 1fr; }
  .platforms .entry { width: min(100%, 13rem); }
}
@media (prefers-reduced-motion: reduce) {
  .artwork img, .orbit, .spell-flare { transition: none; }
}
