@font-face {
  font-family: "Marks";
  src: url("icons.woff2") format("woff2"), url("icons.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bright";
  src: url("bright.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --ghost: #fbf7ff;
  --antique: #ffeedd;
  --peach: #ffd8be;
  --peri: #b8b8ff;
  --soft: #9381ff;
  --ink: #2f2748;
  --muted: #6f678c;
  --line: rgba(47, 39, 72, 0.12);
  --font: "Avenir Next", "Nunito Sans", "Trebuchet MS", sans-serif;
  --script: "Bright", "Avenir Next", "Nunito Sans", cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background-color: #efeaff;
  background-image:
    radial-gradient(rgba(47, 39, 72, 0.05) 0.7px, transparent 0.8px),
    radial-gradient(90% 42% at 100% 0%, #d5d0ff 0%, transparent 58%),
    radial-gradient(80% 36% at 0% 100%, #ffd8be 0%, transparent 52%),
    linear-gradient(180deg, #e7e2ff 0%, #fbf7ff 42%, #fff3e8 100%);
  background-size: 4px 4px, auto, auto, auto;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.hidden { display: none !important; }
.icon.tap, .round.tap, .chip.tap, .wide.tap, .last.tap {
  animation: tap 0.22s ease;
}
.item.tap { animation: row 0.28s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.app {
  position: relative;
  width: min(440px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 18px 108px;
}

.top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 6px;
}
.screen-title {
  margin: 0;
  min-height: 34px;
  text-align: center;
  font-family: var(--script);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
}
.icon, .round {
  display: grid;
  place-items: center;
  color: var(--ink);
}
.icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--ghost);
  border: 1px solid var(--line);
}
.icon.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.ico {
  font-family: "Marks", sans-serif;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  font-size: 20px;
  display: inline-block;
}

.cover-wrap { display: grid; place-items: center; margin: 8px 0 16px; }
.cover {
  width: min(74vw, 280px);
  background: var(--ghost);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 10px;
  box-shadow: 7px 8px 0 rgba(147, 129, 255, 0.45);
}
.cover.landed {
  animation: stamp 0.4s ease;
}
.plate {
  position: relative;
  height: min(62vw, 230px);
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(160deg, #ddd8ff 0%, var(--peri) 46%, #ffd8be 100%);
}
.ring {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  border: 1.5px dashed rgba(251, 247, 255, 0.75);
}
.ring::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(251, 247, 255, 0.55);
}
.plate .ico.big {
  position: relative;
  font-size: 54px;
  color: #fffaf6;
}
.mono {
  position: absolute;
  left: 14px;
  bottom: 8px;
  font-family: var(--script);
  font-size: 42px;
  line-height: 1;
  color: #fffaf6;
}
.spine {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 6px 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}
.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.titles { min-width: 0; }
h1, h2 {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  letter-spacing: 0;
}
h1 {
  min-height: 70px;
  font-size: 36px;
  line-height: 0.95;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
h2 { font-size: 34px; line-height: 1; }
.artist { margin: 4px 0 0; min-height: 20px; color: var(--muted); font-size: 15px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
  margin-top: 12px;
}
.facts span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--antique);
  color: var(--ink);
  font-size: 12px;
}

.wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.wave i {
  display: block;
  flex: 1;
  width: 2px;
  border-radius: 1px;
  background: #ddd6f3;
  height: var(--h);
  transform-origin: center;
}
.wave i.on { background: var(--soft); }
.wave.live i.on { animation: pulse 0.9s ease-in-out infinite alternate; }
.wave.live { position: relative; }
.wave.live::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 0;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(251, 247, 255, 0.85), transparent);
  animation: sweep 1.6s linear infinite;
}

.times, .hint, .note, .empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.times {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.note { margin: 8px 0 0; }
.note.bad { color: #8a4b6a; }

.transport {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.round {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--antique);
  border: 1px solid rgba(47, 39, 72, 0.06);
}
.round .ico { font-size: 18px; }
.round.ghostish {
  background: transparent;
  border-color: transparent;
  color: var(--soft);
}
.round.play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  border: 0;
  box-shadow: 4px 4px 0 var(--peri);
}
.round.play .ico { font-size: 26px; color: #fff; }
.round.play.busy .ico { animation: spin 1s linear infinite; }
.round:disabled { opacity: 0.55; }

.last {
  width: 100%;
  margin-top: 16px;
  display: grid;
  grid-template-columns: 36px 1fr 22px;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--ghost);
  border: 1px solid var(--line);
}
.last .mark {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--soft);
}
.last b {
  display: block;
  font-family: var(--script);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
.last small { color: var(--muted); }
.last .ico { color: var(--soft); font-size: 16px; }

.field { display: grid; gap: 8px; margin-top: 16px; }
.field span { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--ghost);
  padding: 15px 14px;
  outline: none;
}
input:focus { border-color: var(--soft); }
.actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 10px; }
.chip, .wide {
  border-radius: 16px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.chip .ico, .wide .ico { font-size: 16px; }
.wide .ico { color: #fff; }
.chip {
  padding: 14px 16px;
  background: var(--peach);
  color: var(--ink);
}
.wide {
  padding: 14px 16px;
  color: #fff;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--peri);
}
.wide:disabled, .chip:disabled { opacity: 0.6; }
.hint { margin: 14px 2px 0; }

.steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--ghost);
  border: 1px solid var(--line);
}
.steps li:nth-child(2) { background: var(--antique); }
.steps li:nth-child(3) { background: #e4e0ff; }
.view.arrive.from-right { animation: slide-right 0.32s ease both; }
.view.arrive.from-left { animation: slide-left 0.32s ease both; }
.steps b {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--soft);
}
.steps span { line-height: 1.35; }
.steps.tall li { align-items: start; padding: 14px 12px; }

.section { margin: 2px 0 12px; }
.list { display: grid; }
.item {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 28px 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.item .num { font-size: 12px; color: var(--soft); letter-spacing: 0.04em; }
.tile {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.tile .ico { font-size: 18px; color: #fffaf4; }
.tile.a { background: var(--peach); }
.tile.b { background: var(--antique); }
.tile.c { background: var(--peri); }
.tile.d { background: var(--soft); }
.tile.e { background: #ffcba4; }
.tile.b .ico, .tile.a .ico { color: var(--ink); }
.item b {
  display: block;
  font-family: var(--script);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
.item small { color: var(--muted); }
.when { font-size: 12px; color: var(--soft); }
.empty { margin: 8px 2px; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  width: min(400px, calc(100% - 32px));
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--ghost);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 4px 4px 0 var(--peri);
  z-index: 5;
  animation: toast-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 247, 255, 0.96);
  border-top: 1px solid var(--line);
}
.pill {
  position: absolute;
  z-index: 0;
  top: 12px;
  width: 46px;
  height: 28px;
  border-radius: 12px;
  background: var(--peri);
  pointer-events: none;
  left: calc(12.5% - 23px);
  transition: none;
}
.tab {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 4px 0 2px;
  color: var(--muted);
  font-size: 11px;
}
.tab .ico {
  width: 42px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.tab.on { color: var(--ink); }
.round.play.burst { animation: burst 0.55s ease; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { from { transform: scaleY(0.45); } to { transform: scaleY(1); } }
@keyframes stamp {
  0% { transform: scale(1); }
  40% { transform: scale(0.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes toast-in {
  from { transform: translateX(-50%) translateY(12px); opacity: 0; }
  to { transform: translateX(-50%); opacity: 1; }
}
@keyframes tap {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
@keyframes row {
  0% { background: transparent; }
  35% { background: var(--antique); }
  100% { background: transparent; }
}
@keyframes slide-right {
  from { transform: translateX(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes slide-left {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes burst {
  0% { box-shadow: 4px 4px 0 var(--peri); }
  45% { box-shadow: 0 0 0 10px rgba(184, 184, 255, 0); }
  100% { box-shadow: 4px 4px 0 var(--peri); }
}
@keyframes sweep { from { left: -20%; } to { left: 110%; } }
