:root {
  --paper: #ECE6F6;   /* lavender night-light */
  --ink: #2B2142;     /* deep plum */
  --muted: #6E6385;
  --amber: #F0A92E;   /* cat-eye */
  --mint: #A8E8D4;    /* ghost glow, used once */
  --tile: #FFFFFF;
  --line: #D5CBE8;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
header.top { display: flex; align-items: center; gap: 10px; padding: 22px 0 0; }
.wordmark { font: 600 22px/1 var(--display); letter-spacing: .01em; text-decoration: none; }
.wordmark img { width: 34px; height: 37px; vertical-align: -9px; margin-right: 6px; }

.hero { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 56px 0 40px; }
.hero h1 { font: 600 clamp(40px, 7vw, 76px)/1.02 var(--display); margin: 0 0 16px; max-width: 12ch; }
.hero p { margin: 0; color: var(--muted); max-width: 46ch; font-size: 19px; }
.ghost { width: clamp(130px, 22vw, 210px); filter: drop-shadow(0 14px 14px rgba(124, 214, 186, .55)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .ghost { animation: none; } }

/* the shelf: Wii-channel tiles */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 18px; padding: 8px 0 56px; list-style: none; margin: 0; }
.tile { display: block; text-decoration: none; background: var(--tile); border-radius: 30px; padding: 12px 12px 16px; border: 2px solid var(--line);
  transition: transform .15s ease, border-color .15s ease; }
.tile:hover { transform: translateY(-3px); border-color: var(--ink); }
.tile .art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 22px; background: var(--tint, #eee); }
.tile .art img { width: 46%; height: auto; }
.tile .name { display: block; font: 600 21px/1.2 var(--display); margin: 12px 4px 2px; }
.tile .state { display: block; margin: 0 4px; color: var(--muted); font-size: 15px; }
.tile.soon .art { filter: grayscale(.7); opacity: .7; }

/* Hash targets preserve shareable app links and browser Back navigation. */
body.sheet-open { overflow: hidden; }
.sheet { display: none; position: fixed; inset: 0; background: rgba(43, 33, 66, .45); padding: 12px; z-index: 5; overflow-y: auto; }
.sheet:target { display: flex; align-items: center; justify-content: center; }
.sheet .card { background: var(--tile); border-radius: 32px; width: min(520px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; border: 2px solid var(--ink); }
.sheet-top { display: flex; justify-content: flex-end; flex: none; min-height: 54px; padding: 8px 14px 0; }
.sheet-body { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 26px 26px; overflow-wrap: anywhere; }
.sheet .card .art { display: grid; place-items: center; height: 150px; border-radius: 24px; background: var(--tint, #eee); margin-bottom: 18px; }
.sheet .card .art img { height: 96px; }
.sheet h2 { font: 600 32px/1.1 var(--display); margin: 0 0 8px; }
.sheet p { margin: 0 0 20px; }
.close { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; font: 600 28px/1 var(--display); text-decoration: none; color: var(--ink); }
.get { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; min-height: 48px; padding: 8px 20px; border-radius: 24px; font: 600 17px/1.2 var(--display);
  background: var(--amber); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); }
.btn small { font: 400 14px/1 var(--body); opacity: .8; }
.btn.off { background: transparent; border-style: dashed; color: var(--muted); border-color: var(--muted); cursor: default; }

footer { border-top: 2px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-size: 15px; }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .ghost { position: absolute; right: -4px; top: 6px; width: 92px; }
  .hero h1 { padding-right: 88px; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile { border-radius: 24px; padding: 8px 8px 12px; }
  .tile .name { font-size: 18px; }
}
@media (max-width: 220px) {
  .wrap { padding: 0 12px; }
  .wordmark { font-size: 16px; }
  .wordmark img { width: 28px; height: auto; }
  .hero h1 { padding-right: 0; overflow-wrap: anywhere; }
  .ghost { display: none; }
  .shelf { grid-template-columns: 1fr; }
  .sheet-body { padding: 0 14px 14px; }
  .btn { padding: 8px 12px; }
}

/* Generated app colors; CSP-safe external stylesheet. */
.tint-den { --tint: #E3DCFF; }
.tint-giflay { --tint: #FFD6E4; }
.tint-snag { --tint: #CDF3EC; }
.tint-tape { --tint: #E2E0EF; }
.tint-craft { --tint: #D5DCF2; }
.tint-reader { --tint: #D2F2DF; }
.tint-docs { --tint: #FFD9D5; }
.tint-notes { --tint: #FFF0C2; }
.tint-play { --tint: #FFE2CC; }
.tint-watch { --tint: #E6DCFF; }
.tint-gallery { --tint: #FFD9CC; }
.tint-depot { --tint: #FFE3CF; }
.tint-haul { --tint: #D7F0E8; }
.tint-mizzle { --tint: #D6E6FA; }
.tint-roost { --tint: #EBDDF2; }
.tint-headway { --tint: #D9E6FA; }
.tint-clipnotes { --tint: #FADCDA; }
.tint-orbix { --tint: #E4DEFA; }
.tint-voicenotes { --tint: #FBE0E1; }
.tint-scribe { --tint: #DCE8F2; }
.tint-porthole { --tint: #DCE9F7; }
.tint-snippets { --tint: #DCEFE6; }
.tint-zappy { --tint: #E6DEF7; }
.tint-rip { --tint: #E6DDF5; }
