:root {
  color-scheme: dark;
  --ink: #fffafc;
  --muted: #aaa0b3;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #d7ff66;
  --pink: #ff70b7;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 45%, rgba(106, 51, 97, 0.42) 0, rgba(29, 22, 43, 0.32) 37%, transparent 70%),
    radial-gradient(circle at 12% 18%, rgba(255, 112, 183, 0.09), transparent 25%),
    #11101a;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.19'/%3E%3C/svg%3E");
}

.page {
  min-height: 100svh;
  overflow-x: clip;
  padding: 30px 5.2vw 25px;
  display: flex;
  flex-direction: column;
}

header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header {
  min-height: 38px;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.brand-mark {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pink);
  border-radius: 50%;
  color: var(--pink);
  font-size: 11px;
}

.edition {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #85ff9b; box-shadow: 0 0 12px rgba(133,255,155,.75); animation: liveBlink 1.3s ease-in-out infinite alternate; }
@keyframes liveBlink { to { opacity: .45; transform: scale(.78); } }

main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 640px) 1fr;
  align-items: center;
}

.side-note {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

.side-note span { display: block; margin-bottom: 8px; color: var(--pink); font-size: 9px; }

.side-note.left {
  justify-self: start;
  transform: rotate(180deg);
}

.side-note.right {
  justify-self: end;
}

.hero {
  padding: 25px 0 31px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--pink);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.eyebrow-icon { color: var(--accent); margin-right: 5px; }

h1 {
  margin: 0;
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: 0 5px 35px rgba(255, 112, 183, 0.15);
}

.title-highlight { color: var(--accent); }

.subtitle {
  margin: 13px 0 0;
  color: #a2a4aa;
  font-size: 13px;
  letter-spacing: 0.18em;
}

.status-pill { width: fit-content; margin: 19px auto -11px; padding: 8px 13px; border: 1px solid rgba(133,255,155,.2); border-radius: 999px; color: #c9e8cf; background: rgba(66,119,77,.13); font-size: 10px; letter-spacing: .08em; }

.portrait-stage {
  position: relative;
  width: min(60vw, 410px);
  margin: 27px auto 25px;
}

.art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
}

.art-wrap:focus-visible .disc { box-shadow: 0 0 0 3px var(--accent), 0 0 70px rgba(255,112,183,.28); }

.art-wrap::before,
.art-wrap::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.art-wrap::before {
  inset: 2%;
}

.art-wrap::after {
  inset: -7%;
  border-color: rgba(255, 255, 255, 0.045);
}

.orbit {
  position: absolute;
  inset: -2%;
  border: 1px solid transparent;
  border-top-color: rgba(255, 112, 183, 0.72);
  border-radius: 50%;
  transform: rotate(-28deg);
}

.orbit::after {
  position: absolute;
  top: 8%;
  right: 15%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 14px var(--pink);
  content: "";
}

.disc {
  position: relative;
  width: 83%;
  height: 83%;
  overflow: hidden;
  border-radius: 50%;
  background: #27202b;
  box-shadow: 0 0 70px rgba(255, 112, 183, 0.2);
  animation: rotate 36s linear infinite, pulse 2.5s linear infinite alternate;
}

.disc.photo {
  overflow: hidden;
  background: url("../images/portrait.jpeg") center / cover no-repeat;
  box-shadow: 0 0 70px rgba(255,112,183,.22), 0 0 0 5px rgba(255,255,255,.08), 0 0 0 6px rgba(255,112,183,.55);
  transition: box-shadow .25s ease;
}

.art-wrap:hover .disc.photo { box-shadow: 0 0 88px rgba(255,112,183,.38), 0 0 0 5px rgba(255,255,255,.1), 0 0 0 6px var(--pink); }
.photo-badge { position: absolute; z-index: 3; top: 13%; right: 1%; padding: 8px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: #27202b; background: var(--accent); box-shadow: 0 7px 25px rgba(0,0,0,.25); font-size: 9px; line-height: 1.5; transform: rotate(7deg); }
.photo-badge strong { font-size: 11px; }
.tap-hint { position: absolute; right: 3%; bottom: 9%; color: rgba(255,255,255,.8); font-size: 10px; text-shadow: 0 1px 5px #000; transform: rotate(-7deg); }
.celebrate { animation: celebrate .8s ease; }
@keyframes celebrate { 35% { transform: rotate(-5deg) scale(1.08); } 70% { transform: rotate(4deg) scale(1.04); } }

.breathing-companion {
  position: absolute;
  z-index: 4;
  left: -118px;
  bottom: 12px;
  width: 138px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: #e4b5a1;
}
.companion-touch {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.companion-touch:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.companion-svg { display: block; width: 100%; height: auto; overflow: visible; }

@media (min-width: 651px) and (max-width: 1000px) {
  .breathing-companion { left: -65px; width: 118px; bottom: 0; }
}

@keyframes rotate {
  to {
    rotate: 360deg;
  }
}

@keyframes pulse {
  from {
    scale: 1;
  }

  to {
    scale: 1.08;
  }
}

.caption {
  color: #fff1f8;
  font-family: "PingFang SC", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.caption span { color: var(--accent); }
.caption-star { color: var(--pink) !important; font-size: 12px; }
.sub-caption { margin-top: 9px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.sub-caption strong { color: var(--accent); font-size: 13px; }
.sub-caption span { opacity: .78; }

.controls {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.control-btn {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.control-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 112, 183, 0.12);
}

.prank-button { margin-top: 20px; padding: 9px 15px; border: 1px dashed rgba(255,255,255,.28); border-radius: 999px; color: #d0c6d4; background: rgba(255,255,255,.035); font: inherit; font-size: 10px; letter-spacing: .1em; cursor: pointer; transition: transform .18s ease, background .2s ease, color .2s ease; }
.prank-button span { color: var(--pink); }
.prank-button:hover { color: white; background: rgba(255,112,183,.13); }

.control-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.speed {
  min-width: 82px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.speed strong {
  color: var(--ink);
  font-weight: 500;
}

.paused .disc {
  animation-play-state: paused;
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  color: #777b84;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

footer .location {
  color: #a2a4aa;
}

.toast { position: fixed; z-index: 10; left: 50%; bottom: 42px; max-width: min(90vw, 430px); padding: 12px 18px; border: 1px solid rgba(255,112,183,.35); border-radius: 999px; color: white; background: rgba(32,23,39,.94); box-shadow: 0 10px 40px rgba(0,0,0,.3); font-size: 12px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%,12px) scale(.97); transition: opacity .25s ease, transform .25s ease; }
.toast.visible { opacity: 1; transform: translate(-50%,0) scale(1); }
.float-emoji { position: fixed; z-index: 9; font-size: 24px; pointer-events: none; animation: floatUp 1.15s ease-out forwards; }
@keyframes floatUp { to { opacity: 0; transform: translateY(-85px) rotate(18deg) scale(1.4); } }

.sound {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sound-bars {
  height: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sound-bars i {
  width: 1px;
  height: 5px;
  background: var(--accent);
  opacity: 0.75;
}

.sound-bars i:nth-child(2) { height: 10px; }
.sound-bars i:nth-child(3) { height: 7px; }
.sound-bars i:nth-child(4) { height: 11px; }
.sound-bars i:nth-child(5) { height: 4px; }

@media (max-width: 650px) {
  body { overflow-y: auto; }
  .page {
    padding: 22px 22px 20px;
  }

  .edition,
  .side-note {
    display: none;
  }

  main {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 23px 0 28px;
  }

  .portrait-stage {
    width: min(76vw, 350px);
    margin-top: 27px;
    margin-bottom: 34px;
  }

  .status-pill { margin-bottom: -10px; }
  .photo-badge { right: -1%; }
  .breathing-companion {
    position: relative;
    left: auto;
    bottom: auto;
    width: 104px;
    margin: 12px auto 0;
  }

  footer {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .location {
    display: none;
  }

  footer { gap: 10px; }
  .sound { text-align: right; }
  .toast { bottom: 24px; border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .disc {
    animation: none;
  }
  .celebrate, .live-dot, .float-emoji { animation: none; }
}
