:root {
  color-scheme: dark;
  --bg: #060914;
  --panel: #101727;
  --panel-soft: #121a2e;
  --line: rgba(153, 204, 255, 0.18);
  --text: #edf6ff;
  --muted: #a7b4c8;
  --blue: #67b7ff;
  --blue-strong: #2f8fff;
  --shadow-dark: rgba(0, 0, 0, 0.55);
  --shadow-light: rgba(110, 178, 255, 0.13);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(47, 143, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 80% 5%, rgba(129, 206, 255, 0.10), transparent 28rem),
    linear-gradient(180deg, #050812 0%, #0a1020 44%, #05070e 100%);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.75;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

.stars,
.stars::before,
.stars::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(103,183,255,.55) 0 1px, transparent 1.3px);
  background-size: 220px 220px, 380px 380px;
  opacity: .22;
  animation: drift 42s linear infinite;
}

.stars::before,
.stars::after {
  content: "";
  opacity: .4;
}

.stars::before {
  background-size: 300px 300px, 520px 520px;
  animation-duration: 66s;
}

.stars::after {
  background-size: 170px 170px, 460px 460px;
  animation-duration: 90s;
  animation-direction: reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-80px, 120px, 0); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(6, 9, 20, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.nav-toggle {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}

.site-nav a {
  padding: 12px 13px;
}

.site-nav a:hover,
.site-nav a.is-active,
.lang-link {
  color: var(--text);
  border-color: var(--line);
  background: rgba(18, 26, 46, 0.74);
}

.nav-toggle {
  display: none;
  padding: 12px 14px;
  background: var(--panel);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 64px));
  overflow: hidden;
  display: grid;
  align-items: end;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 18, .86) 0%, rgba(5, 8, 18, .52) 46%, rgba(5, 8, 18, .20) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 34%);
}

.hero-content {
  position: relative;
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 120px 0 88px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 76px);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 38px);
}

p {
  margin: 0;
  color: var(--muted);
}

.hero-content p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin-top: 18px;
  font-size: clamp(15px, 1.7vw, 18px);
}

.hero-actions,
.footer-links,
.link-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(145deg, var(--blue-strong), #65c7ff);
  color: #031020;
  box-shadow: 0 14px 34px rgba(47, 143, 255, .25);
}

.button.ghost {
  background: rgba(15, 23, 41, .76);
  color: var(--text);
  box-shadow: 8px 8px 18px var(--shadow-dark), -5px -5px 16px var(--shadow-light);
}

.section,
.page-hero {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.section {
  padding: 74px 0;
}

.page-hero {
  padding: 92px 0 42px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.split > img:first-child {
  order: 0;
}

.feature-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 20px 20px 46px rgba(0, 0, 0, .38), -10px -10px 34px rgba(80, 153, 255, .08);
}

.feature-image.portrait {
  aspect-ratio: 3 / 4;
}

.profile-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.profile-images .feature-image {
  aspect-ratio: 16 / 10;
}

.profile-images .feature-image:first-child {
  aspect-ratio: 3 / 4;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--blue);
  font-weight: 700;
}

dd {
  margin: 0;
  color: var(--text);
}

.link-grid,
.two-column,
.activity-grid {
  display: grid;
  gap: 18px;
}

.link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.soft-card,
.soft-panel,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(19, 28, 48, .92), rgba(8, 13, 25, .92));
  box-shadow: 14px 14px 30px rgba(0, 0, 0, .32), -8px -8px 24px rgba(90, 155, 255, .07);
}

.soft-card {
  min-height: 132px;
  padding: 24px;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}

.soft-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 183, 255, .46);
}

.soft-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.soft-card small {
  color: var(--muted);
}

.soft-panel,
.notice {
  padding: clamp(22px, 3vw, 34px);
}

.soft-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.timeline li {
  position: relative;
  padding-left: 24px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 16px rgba(142, 216, 255, .8);
}

.trust-timeline {
  position: relative;
  align-items: stretch;
  gap: 0;
  padding-left: 18px;
}

.trust-timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 1px;
  height: calc(100% - 22px);
  background: linear-gradient(180deg, rgba(142, 216, 255, .95), rgba(182, 108, 255, .85));
  box-shadow: 0 0 16px rgba(142, 216, 255, .45);
  transform: scaleY(0);
  transform-origin: top;
  animation: trustLineDraw 1.4s cubic-bezier(.2, .8, .2, 1) .25s forwards;
}

.trust-timeline li {
  display: grid;
  grid-template-columns: minmax(6.4em, max-content) minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
  align-items: center;
  min-height: 56px;
  padding-left: 0;
  opacity: 0;
  transform: translateX(-10px);
  animation: trustItemIn .65s cubic-bezier(.2, .8, .2, 1) forwards;
}

.trust-timeline li:nth-child(1) {
  animation-delay: .28s;
}

.trust-timeline li:nth-child(2) {
  animation-delay: .42s;
}

.trust-timeline li:nth-child(3) {
  animation-delay: .56s;
}

.trust-timeline li:nth-child(4) {
  animation-delay: .70s;
}

.trust-timeline li:nth-child(5) {
  animation-delay: .84s;
}

.trust-timeline li::before {
  left: -18px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  background: var(--trust-color, var(--sky));
  box-shadow: 0 0 16px color-mix(in srgb, var(--trust-color, var(--sky)) 72%, transparent);
}

.trust-date {
  display: inline-flex;
  flex-direction: row;
  gap: 4px;
  white-space: nowrap;
  color: rgba(211, 230, 242, .72);
  font-family: "Inter", sans-serif;
  font-size: .82em;
  font-weight: 700;
  line-height: 1;
}

.trust-rank {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  color: var(--trust-color, var(--sky));
  font-family: "Inter", sans-serif;
  font-size: clamp(16px, 1.9vw, 24px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 18px color-mix(in srgb, var(--trust-color, var(--sky)) 64%, transparent);
}

.trust-rank-visitor {
  --trust-color: #b8c0c8;
}

.trust-rank-new-user {
  --trust-color: #28d8ff;
}

.trust-rank-user {
  --trust-color: #2bcf5a;
}

.trust-rank-known-user {
  --trust-color: #ff8f22;
}

.trust-rank-trusted-user {
  --trust-color: #b66cff;
}

@keyframes trustLineDraw {
  to {
    transform: scaleY(1);
  }
}

@keyframes trustItemIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
}

.friend-card {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: stretch;
  min-height: 320px;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 0 0, rgba(103, 183, 255, .16), transparent 16rem),
    rgba(9, 15, 30, .74);
}

.friend-card > img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.friend-card h2 {
  position: relative;
  margin-bottom: 10px;
  color: var(--white);
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.05;
}

.friend-styled-name {
  width: max-content;
  max-width: 100%;
  cursor: help;
}

.friend-styled-name::after {
  content: attr(data-code);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 4;
  width: max-content;
  max-width: min(520px, 82vw);
  padding: 10px 12px;
  border: 1px solid rgba(142, 216, 255, .28);
  background: rgba(2, 5, 20, .96);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.friend-styled-name:hover::after,
.friend-styled-name:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.friend-vrc-id {
  margin: 0 0 8px;
  color: var(--sky);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.friend-vrc-id a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(142, 216, 255, .55);
}

.friend-vrc-id a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

.friend-card .pill-list {
  margin-top: 18px;
}

.friend-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.friend-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 9px 12px;
  border: 1px solid rgba(142, 216, 255, .28);
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.friend-social-link img {
  width: 15px;
  height: 15px;
}

.friend-social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 216, 255, .64);
  background: rgba(142, 216, 255, .12);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .35s ease;
}

.gallery-item:hover img {
  transform: scale(1.045);
}

.gallery-item span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: rgba(5, 8, 18, .7);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 12, .88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: 82vh;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.lightbox p {
  margin-top: 12px;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: var(--blue);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(3, 6, 14, .8);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
}

textarea {
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.form-status {
  padding: 12px 14px;
  border-radius: var(--radius);
}

.form-status.success {
  background: rgba(103, 183, 255, .12);
  color: var(--text);
}

.form-status.error {
  background: rgba(255, 120, 120, .13);
  color: #ffd1d1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 36px));
  margin: 40px auto 0;
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-top: 6px;
  font-size: 13px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 76px;
    right: 18px;
    display: none;
    width: min(280px, calc(100vw - 36px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 12, 24, .96);
    box-shadow: 0 20px 44px rgba(0,0,0,.38);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 14px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(5,8,18,.70) 54%, rgba(5,8,18,.25) 100%);
  }

  .split,
  .two-column,
  .activity-grid,
  .friends-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .friend-card {
    grid-template-columns: 1fr;
  }
}

/* Larger home sections and stronger scroll staging */
.page-home .section {
  min-height: min(860px, 92vh);
  display: grid;
  align-content: center;
  padding-block: clamp(110px, 13vw, 180px);
  opacity: var(--section-fade, 1);
}

.page-home .section > * {
  transform: translate3d(var(--section-shift, 0), 0, 0);
  transition: transform .18s linear;
}

.page-home h2 {
  font-size: clamp(42px, 6vw, 86px);
}

.page-home main p {
  font-size: clamp(16px, 1.8vw, 20px);
}

.page-home .section-heading {
  margin-bottom: clamp(24px, 4vw, 42px);
}

.page-home .section-heading span {
  font-size: clamp(70px, 10vw, 150px);
}

.comment-block {
  max-width: 980px;
  gap: 24px;
  padding: clamp(34px, 6vw, 72px);
}

.comment-block p {
  max-width: 820px;
  font-size: clamp(18px, 2.15vw, 26px);
  line-height: 1.9;
}

.topic-grid {
  gap: clamp(22px, 4vw, 44px);
}

.topic-card {
  min-height: clamp(280px, 32vw, 420px);
  display: grid;
  align-content: space-between;
  padding: clamp(34px, 5vw, 68px);
}

.topic-card small {
  font-size: clamp(13px, 1.4vw, 16px);
}

.topic-card strong {
  font-size: clamp(46px, 7vw, 104px);
  line-height: .95;
}

.page-home .soft-panel {
  min-height: 520px;
  padding: clamp(34px, 5vw, 64px);
}

.page-home .profile-list div {
  padding-block: 18px;
}

.page-home .profile-list dt,
.page-home .profile-list dd,
.page-home .timeline li {
  font-size: clamp(15px, 1.55vw, 18px);
}

.timeline.compact {
  gap: 16px 24px;
}

.avatar-home .feature-image {
  aspect-ratio: 3 / 4;
}

.preview-strip {
  gap: clamp(14px, 2vw, 24px);
}

.preview-strip a {
  min-height: clamp(240px, 28vw, 440px);
}

.link-grid {
  gap: clamp(18px, 2.6vw, 30px);
}

.soft-card {
  min-height: clamp(190px, 18vw, 280px);
  padding: clamp(28px, 4vw, 48px);
}

.soft-card span {
  font-size: clamp(34px, 4.2vw, 62px);
}

.soft-card small {
  font-size: clamp(13px, 1.4vw, 16px);
}

.page-home .split {
  gap: clamp(44px, 7vw, 96px);
}

.page-home .feature-image {
  min-height: 420px;
}

@media (max-width: 860px) {
  .page-home .section {
    min-height: auto;
    padding-block: 86px;
  }

  .page-home .section > * {
    transform: none;
  }

  .topic-card,
  .page-home .soft-panel,
  .page-home .feature-image {
    min-height: auto;
  }

  .topic-card {
    min-height: 260px;
  }
}

/* Category scenes */
.page-home {
  scroll-snap-type: y proximity;
}

.scene-panel {
  position: relative;
  width: 100%;
  max-width: none;
  padding-inline: max(18px, calc((100vw - var(--max)) / 2));
  scroll-snap-align: start;
  overflow: hidden;
}

.scene-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.scene-panel > * {
  position: relative;
  z-index: 1;
}

.scene-about {
  background:
    linear-gradient(90deg, rgba(3, 7, 22, .98), rgba(3, 7, 22, .72) 48%, transparent),
    radial-gradient(circle at 78% 30%, rgba(142, 216, 255, .18), transparent 24rem);
}

.scene-about::after {
  background:
    linear-gradient(90deg, rgba(247, 251, 255, .08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 251, 255, .05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 72%, transparent);
}

.scene-about .feature-image {
  border-radius: 0;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  min-height: 0;
  height: clamp(460px, 54vw, 700px);
  align-self: center;
}

.scene-comment {
  background:
    radial-gradient(circle at 16% 22%, rgba(154, 140, 255, .20), transparent 24rem),
    linear-gradient(180deg, rgba(7, 18, 40, .92), rgba(3, 6, 21, .98));
}

.scene-comment .comment-block {
  margin-inline: auto 0;
  border-left: 4px solid var(--sky);
}

.scene-comment .comment-block::before {
  content: "MESSAGE";
  display: block;
  margin-bottom: 12px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 251, 255, .22);
  font-size: clamp(54px, 9vw, 132px);
  font-weight: 900;
  line-height: .8;
}

.scene-topix {
  background:
    repeating-linear-gradient(90deg, rgba(142, 216, 255, .10) 0 1px, transparent 1px 25%),
    radial-gradient(circle at 24% 18%, rgba(142, 216, 255, .18), transparent 24rem),
    linear-gradient(180deg, #071228, #030615);
  color: var(--white);
}

.scene-topix::before {
  opacity: 0;
}

.topics-stage {
  position: relative;
  min-height: min(820px, 92vh);
  width: min(100%, 1460px);
  margin: 0 auto;
}

.topics-title {
  position: absolute;
  left: 0;
  top: clamp(8px, 3vw, 34px);
  z-index: 4;
  margin: 0;
  color: var(--sky);
  font-size: clamp(82px, 13vw, 190px);
  font-weight: 500;
  line-height: .78;
  letter-spacing: 0;
}

.scene-topix .scene-number {
  position: absolute;
  top: clamp(44px, 7vw, 110px);
  right: clamp(18px, 5vw, 86px);
  z-index: 5;
  color: transparent;
  -webkit-text-stroke: 1px rgba(142, 216, 255, .55);
  font-size: clamp(88px, 13vw, 190px);
  font-weight: 900;
  line-height: .75;
}

.topics-panel {
  position: absolute;
  z-index: 3;
  display: grid;
  align-content: start;
  gap: clamp(22px, 3vw, 46px);
  padding: clamp(36px, 5vw, 70px);
  border: 1px solid rgba(247, 251, 255, .18);
  background:
    linear-gradient(180deg, rgba(247, 251, 255, .08), rgba(247, 251, 255, .025)),
    rgba(3, 7, 22, .90);
  color: var(--white);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(142, 216, 255, .08);
}

.topics-panel-news {
  top: clamp(34px, 4vw, 58px);
  right: clamp(0px, 3vw, 48px);
  width: min(50vw, 690px);
  min-height: min(430px, 42vh);
}

.topics-panel-event {
  left: clamp(110px, 13vw, 230px);
  bottom: clamp(0px, 4vw, 44px);
  width: min(52vw, 720px);
  min-height: min(430px, 42vh);
}

.topics-label {
  margin: 0;
  color: #ffff4a;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topics-panel article {
  display: grid;
  gap: 12px;
}

.topics-panel article + article {
  margin-top: 28px;
}

.topics-panel strong {
  color: var(--white);
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.05;
}

.topics-panel span {
  color: rgba(247, 251, 255, .78);
  font-size: clamp(13px, 1.3vw, 16px);
}

.scene-vrchat {
  background:
    linear-gradient(180deg, rgba(2, 5, 20, .96), rgba(3, 11, 26, .96)),
    repeating-linear-gradient(90deg, rgba(142, 216, 255, .10) 0 1px, transparent 1px 72px);
}

.scene-vrchat .soft-panel {
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(142, 216, 255, .10), rgba(247, 251, 255, .03)),
    rgba(1, 5, 15, .86);
}

.scene-vrchat .timeline li {
  padding-block: 5px;
  border-bottom: 0;
}

.profile-section {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-block: clamp(56px, 7vh, 86px);
}

.profile-combined {
  width: min(100%, 960px);
  min-height: auto;
  padding: clamp(26px, 3.5vw, 46px);
}

.profile-combined .section-heading {
  border-bottom: 0;
}

.profile-combined-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}

.profile-combined-head h2 {
  justify-self: center;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(44px, 6vw, 84px);
  line-height: .95;
}

.profile-combined-head p {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(247, 251, 255, .76);
  text-align: center;
  font-size: clamp(15px, 1.5vw, 18px);
}

.profile-combined-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
}

.scene-vrchat .trust-timeline.compact {
  grid-template-columns: 1fr;
}

.scene-vrchat .trust-rank {
  justify-self: start;
}

.profile-trust {
  display: grid;
  gap: 12px;
  justify-self: start;
  width: min(100%, 420px);
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.profile-trust .eyebrow {
  margin: 0;
}

.profile-trust .trust-rank {
  font-size: clamp(16px, 1.8vw, 24px);
  width: auto;
  white-space: normal;
}

.profile-section .profile-list div {
  padding-block: 10px;
}

.profile-section .trust-timeline li {
  min-height: 42px;
}

.scene-avatar {
  background:
    radial-gradient(circle at 20% 20%, rgba(142, 216, 255, .22), transparent 24rem),
    radial-gradient(circle at 90% 70%, rgba(154, 140, 255, .20), transparent 26rem),
    #030615;
}

.avatar-selector {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.avatar-tabs {
  display: grid;
  align-content: start;
  gap: 10px;
}

.avatar-tab {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(142, 216, 255, .18);
  background: rgba(3, 7, 22, .54);
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease, transform .22s ease;
}

.avatar-tab span {
  color: var(--sky);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
}

.avatar-tab strong {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.avatar-tab small {
  color: var(--muted);
  font-size: 12px;
}

.avatar-tab:hover,
.avatar-tab.is-active {
  border-color: rgba(142, 216, 255, .55);
  background: rgba(142, 216, 255, .13);
  transform: translateX(6px);
}

.avatar-panels {
  min-width: 0;
}

.avatar-card {
  display: grid;
  grid-template-columns: minmax(240px, .78fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(247, 251, 255, .16);
  background:
    linear-gradient(135deg, rgba(142, 216, 255, .12), transparent 38%),
    rgba(3, 7, 22, .66);
}

.avatar-card[hidden] {
  display: none;
}

.avatar-card img {
  width: 100%;
  height: min(520px, 58vh);
  object-fit: cover;
  border-radius: 0;
}

.avatar-card h2 {
  color: var(--white);
  -webkit-text-stroke: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.avatar-card .profile-list {
  max-width: 520px;
}

.scene-gallery {
  background:
    linear-gradient(180deg, #020514, #071228 48%, #020514);
}

.scene-gallery .preview-strip {
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  transform: translateX(calc(var(--section-shift, 0) * -2));
}

.scene-gallery .preview-strip a {
  min-height: min(560px, 58vh);
}

.scene-gallery .preview-strip a:nth-child(2n) {
  transform: translateY(44px);
}

.scene-sitemap {
  background:
    radial-gradient(circle at 50% 0%, rgba(142, 216, 255, .20), transparent 28rem),
    linear-gradient(180deg, rgba(3, 6, 21, .96), #02030a);
}

.scene-sitemap .link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scene-sitemap .soft-card {
  min-height: 300px;
}

@media (max-width: 860px) {
  .page-home {
    scroll-snap-type: none;
  }

  .scene-panel {
    padding-inline: 18px;
  }

  .scene-about .feature-image {
    clip-path: none;
  }

  .scene-gallery .preview-strip a:nth-child(2n) {
    transform: none;
  }

  .topics-stage {
    display: grid;
    gap: 18px;
    min-height: auto;
  }

  .topics-title,
  .topics-panel,
  .topics-panel-news,
  .topics-panel-event {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .topics-title {
    font-size: clamp(64px, 22vw, 120px);
  }

  .topics-panel {
    min-height: 240px;
  }

  .scene-gallery .preview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: none;
  }

  .scene-sitemap .link-grid {
    grid-template-columns: 1fr;
  }
}

/* Home information blocks */
.home-digest {
  padding-bottom: 28px;
}

.digest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.digest-card {
  position: relative;
  min-height: 190px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(247, 251, 255, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(247, 251, 255, .10), rgba(247, 251, 255, .03)),
    rgba(3, 7, 22, .76);
  overflow: hidden;
}

.digest-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(142, 216, 255, .28);
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(142, 216, 255, .10);
}

.digest-card small {
  display: block;
  color: var(--sky);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.digest-card strong {
  display: block;
  margin: 14px 0 10px;
  color: var(--white);
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 900;
  line-height: 1.05;
}

.home-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.section-heading.mini {
  margin-bottom: 18px;
}

.section-heading.mini span {
  font-size: clamp(38px, 5vw, 72px);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 10px 14px;
  border: 1px solid rgba(247, 251, 255, .22);
  border-radius: 999px;
  background: rgba(247, 251, 255, .08);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--sky);
  border-bottom: 2px solid var(--sky);
  transform: rotate(-45deg);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.comment-block {
  display: grid;
  gap: 18px;
  max-width: 860px;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(247, 251, 255, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(142, 216, 255, .10), transparent 34%),
    rgba(3, 7, 22, .72);
}

.comment-block p {
  font-size: clamp(15px, 1.6vw, 18px);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.topic-card {
  position: relative;
  min-height: 190px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(247, 251, 255, .18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 216, 255, .18), transparent 14rem),
    rgba(3, 7, 22, .76);
  overflow: hidden;
}

.topic-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sky), var(--violet));
}

.topic-card small {
  color: var(--sky);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topic-card strong {
  display: block;
  margin-top: 24px;
  color: var(--white);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 900;
  line-height: 1.08;
}

.timeline.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.preview-strip {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 12px;
}

.preview-strip a {
  display: block;
  overflow: hidden;
  min-height: 180px;
  border: 1px solid rgba(247, 251, 255, .18);
  border-radius: var(--radius);
  background: #050914;
}

.preview-strip img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.preview-strip a:first-child img {
  aspect-ratio: 16 / 9;
}

.preview-strip a:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

@media (max-width: 860px) {
  .digest-grid,
  .avatar-card,
  .avatar-selector,
  .home-columns,
  .profile-combined-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .preview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-strip a:first-child {
    grid-column: span 2;
  }

  .profile-section {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .timeline.compact,
  .preview-strip {
    grid-template-columns: 1fr;
  }

  .preview-strip a:first-child {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand small {
    display: none;
  }

  .hero-content,
  .section,
  .page-hero,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .hero-content {
    padding-bottom: 62px;
  }

  h1 {
    font-size: 38px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .profile-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Hoshimachi-inspired night editorial layer */
:root {
  --ink: #020514;
  --white: #f7fbff;
  --sky: #8ed8ff;
  --violet: #9a8cff;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(142, 216, 255, .22), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(154, 140, 255, .16), transparent 26rem),
    linear-gradient(180deg, #030615 0%, #071228 38%, #03040a 100%);
}

.site-header {
  padding-block: 14px;
  background: rgba(2, 5, 20, .82);
  border-bottom: 1px solid rgba(247, 251, 255, .18);
}

.site-nav a:hover,
.site-nav a.is-active,
.lang-link {
  background: var(--white);
  color: #06142c;
}

.hero {
  min-height: min(820px, calc(100vh - 58px));
  border-bottom: 1px solid rgba(247, 251, 255, .16);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgba(3, 6, 21, .92));
  pointer-events: none;
}

.hero img {
  filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 5, 20, .92) 0%, rgba(2, 5, 20, .55) 52%, rgba(2, 5, 20, .10) 100%),
    radial-gradient(circle at 72% 18%, rgba(142, 216, 255, .24), transparent 22rem),
    linear-gradient(0deg, rgba(3, 6, 21, .96) 0%, transparent 45%);
}

.hero-titlemark {
  position: absolute;
  left: clamp(16px, 4vw, 56px);
  right: 0;
  bottom: clamp(20px, 8vw, 92px);
  z-index: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 251, 255, .22);
  font-size: clamp(84px, 19vw, 260px);
  font-weight: 900;
  line-height: .75;
  letter-spacing: .02em;
  white-space: nowrap;
}

.hero-content {
  z-index: 2;
  padding-bottom: clamp(92px, 11vw, 148px);
}

.hero-content h1,
.page-hero h1 {
  max-width: 920px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-content h1 {
  font-size: clamp(42px, 6.7vw, 92px);
}

.hero-content p:not(.eyebrow) {
  max-width: 650px;
  border-left: 3px solid var(--sky);
  padding-left: 18px;
  color: rgba(247, 251, 255, .82);
}

.eyebrow {
  color: var(--sky);
  letter-spacing: .18em;
}

.button {
  border-color: rgba(247, 251, 255, .34);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.button.primary {
  background: var(--white);
  color: #06142c;
  box-shadow: 0 20px 48px rgba(142, 216, 255, .25);
}

.button.ghost {
  background: rgba(2, 5, 20, .46);
  box-shadow: inset 0 0 0 1px rgba(142, 216, 255, .14);
}

.ticker {
  overflow: hidden;
  border-block: 1px solid rgba(247, 251, 255, .18);
  background: rgba(247, 251, 255, .95);
  color: #06142c;
}

.ticker div {
  display: flex;
  width: max-content;
  animation: marquee 104s linear infinite;
}

.ticker span {
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  white-space: nowrap;
}

.ticker span::after {
  content: " /";
  color: #2f8fff;
  margin-left: 22px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 116px);
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 216, 255, .45), transparent);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(247, 251, 255, .18);
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(142, 216, 255, .55);
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 900;
  line-height: .8;
}

h2 {
  font-size: clamp(30px, 4.8vw, 64px);
  font-weight: 900;
}

.split {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 480px);
}

.feature-image {
  border-color: rgba(247, 251, 255, .22);
  background: #06142c;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, .42),
    0 0 0 8px rgba(247, 251, 255, .03);
}

.profile-list div {
  border-bottom-color: rgba(247, 251, 255, .18);
}

.soft-card,
.soft-panel,
.notice {
  background:
    linear-gradient(180deg, rgba(247, 251, 255, .08), rgba(247, 251, 255, .025)),
    rgba(3, 7, 22, .74);
  border-color: rgba(247, 251, 255, .18);
  box-shadow: none;
}

.soft-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

.soft-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sky), var(--violet));
}

.soft-card span {
  font-size: clamp(24px, 2.7vw, 36px);
  font-weight: 900;
}

.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-item {
  border-color: rgba(247, 251, 255, .18);
  background: #050914;
}

.gallery-item:nth-child(4n + 1) {
  grid-column: span 2;
}

.gallery-item img {
  aspect-ratio: 4 / 5;
}

.gallery-item:nth-child(4n + 1) img {
  aspect-ratio: 16 / 9;
}

.gallery-item span {
  background: rgba(247, 251, 255, .92);
  color: #06142c;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-hero {
  position: relative;
  width: 100%;
  padding: clamp(98px, 13vw, 154px) max(18px, calc((100vw - var(--max)) / 2)) 58px;
  overflow: hidden;
  border-bottom: 1px solid rgba(247, 251, 255, .16);
}

.page-hero::before {
  content: attr(data-title);
}

.page-hero::after {
  content: "H4RUK1";
  position: absolute;
  right: clamp(16px, 5vw, 72px);
  bottom: -8px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 251, 255, .13);
  font-size: clamp(82px, 16vw, 220px);
  font-weight: 900;
  line-height: .8;
  z-index: -1;
}

@media (max-width: 860px) {
  .hero-titlemark {
    font-size: clamp(68px, 22vw, 142px);
    bottom: 48px;
  }

  .ticker span {
    padding-inline: 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-item:nth-child(4n + 1) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 700px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .section-heading span {
    font-size: 52px;
  }

  .gallery-grid,
  .gallery-item:nth-child(4n + 1) {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}

/* Detailed header */
.site-header {
  isolation: isolate;
  min-height: 74px;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(142, 216, 255, .20), transparent 18rem),
    linear-gradient(90deg, rgba(247, 251, 255, .08), transparent 28%, rgba(154, 140, 255, .08));
  opacity: .9;
}

.site-header::after {
  content: "";
  position: absolute;
  left: clamp(18px, 4vw, 48px);
  right: clamp(18px, 4vw, 48px);
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sky), var(--violet), transparent);
  box-shadow: 0 0 18px rgba(142, 216, 255, .45);
}

.brand {
  min-width: 190px;
}

.brand strong {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .04em;
}

.brand small {
  margin-top: 1px;
  color: rgba(247, 251, 255, .62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav {
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(247, 251, 255, .14);
  border-radius: 999px;
  background: rgba(2, 5, 20, .45);
  box-shadow: inset 0 0 0 1px rgba(142, 216, 255, .05);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 10px 13px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-nav a::before {
  content: "";
  position: absolute;
  inset: auto 12px 6px 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.site-nav a:hover::before,
.site-nav a.is-active::before {
  transform: scaleX(1);
}

.site-nav a span {
  color: var(--sky);
  font-size: 10px;
  font-weight: 900;
}

.nav-label {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: max-content;
  font: inherit;
}

.nav-label::after {
  content: attr(data-label-ja);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  white-space: nowrap;
}

html[lang="ja"] .site-nav a:hover .nav-label,
html[lang="ja"] .site-nav a:focus-visible .nav-label {
  color: transparent;
}

html[lang="ja"] .site-nav a:hover .nav-label::after,
html[lang="ja"] .site-nav a:focus-visible .nav-label::after {
  opacity: 1;
  transform: translateY(0);
  color: #06142c;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(247, 251, 255, .96);
  color: #06142c;
}

.site-nav a:hover span,
.site-nav a.is-active span {
  color: #2f8fff;
}

.site-nav .lang-link {
  min-width: 42px;
  justify-content: center;
  background: rgba(247, 251, 255, .10);
  color: var(--white);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(247, 251, 255, .28);
  border-radius: 999px;
  background: var(--white);
  color: #06142c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(142, 216, 255, .18);
}

.header-cta::after {
  content: "->";
  margin-left: 8px;
  font-size: 13px;
}

.nav-toggle {
  min-height: 44px;
  border-color: rgba(247, 251, 255, .24);
  border-radius: 999px;
  background: rgba(247, 251, 255, .08);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  .header-cta {
    display: none;
  }

  .brand {
    min-width: 170px;
  }

  .site-nav a {
    padding-inline: 10px;
  }
}

@media (max-width: 860px) {
  .site-header {
    min-height: 70px;
  }

  .brand {
    min-width: auto;
  }

  .site-nav {
    top: 78px;
    right: 14px;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background:
      radial-gradient(circle at 100% 0%, rgba(142, 216, 255, .20), transparent 12rem),
      rgba(2, 5, 20, .96);
  }

  .site-nav a {
    justify-content: space-between;
    width: 100%;
    border-radius: 12px;
    padding: 15px 14px;
  }

  .site-nav a span {
    order: 2;
  }
}

@media (max-width: 560px) {
  .brand strong {
    font-size: 14px;
  }

  .nav-toggle {
    min-height: 40px;
    padding-inline: 12px;
  }
}

/* Scroll interactions */
:root {
  --scroll-progress: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: calc(var(--scroll-progress) * 100%);
  height: 3px;
  background: linear-gradient(90deg, var(--sky), var(--violet), var(--white));
  box-shadow: 0 0 18px rgba(142, 216, 255, .7);
  pointer-events: none;
}

.site-header {
  transition: min-height .28s ease, padding .28s ease, background .28s ease, box-shadow .28s ease;
}

body.is-scrolled .site-header {
  min-height: 62px;
  padding-block: 10px;
  background: rgba(2, 5, 20, .92);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .24);
}

body.is-scrolled .brand small {
  opacity: .62;
}

body.is-scrolled .site-nav {
  background: rgba(2, 5, 20, .64);
}

.hero img,
.hero-titlemark {
  will-change: transform;
  transition: transform .08s linear;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 44px, 0);
  filter: blur(8px);
  transition:
    opacity .78s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms),
    transform .78s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms),
    filter .78s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms);
}

.split .reveal:nth-child(2),
.home-columns .reveal:nth-child(2),
.digest-grid .reveal:nth-child(2n) {
  transform: translate3d(34px, 28px, 0);
}

.gallery-item.reveal,
.preview-strip a.reveal {
  transform: translate3d(0, 34px, 0) scale(.96);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.section-heading span {
  transition: transform .8s cubic-bezier(.2, .8, .2, 1), opacity .8s ease;
}

.section.is-visible .section-heading span {
  animation: number-rise .9s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes number-rise {
  from {
    opacity: .18;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.soft-card:hover,
.digest-card:hover,
.preview-strip a:hover,
.gallery-item:hover {
  transform: translateY(-5px);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero img,
  .hero-titlemark {
    transform: none !important;
  }
}

/* Admin */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-toolbar form {
  margin: 0;
}

.button.small {
  min-height: 0;
  padding: 6px 12px;
  font-size: 13px;
}

.contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(3, 6, 14, .8);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-message header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.admin-message time {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.admin-message p {
  overflow-wrap: anywhere;
}

.admin-friend-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-friend-list li {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius);
}

.admin-friend-list li::before {
  content: none;
}

.admin-friend-list li.is-editing {
  background: rgba(103, 183, 255, .12);
}

.admin-friend-list img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.admin-friend-list form {
  margin: 0;
}

.topics-panel article a {
  display: inline-block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 13px;
}

/* Hero signature */
.hero-content h1.hero-signature {
  margin: 0;
  line-height: 0;
}

.hero-signature .signature-draw {
  display: block;
  width: clamp(260px, 44vw, 600px);
  max-width: 100%;
  height: auto;
  overflow: visible;
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, .95))
    drop-shadow(0 0 6px rgba(142, 216, 255, .9))
    drop-shadow(0 0 18px rgba(103, 183, 255, .65));
}

@keyframes signature-glow {
  0%, 100% {
    filter:
      drop-shadow(0 0 1px rgba(255, 255, 255, .95))
      drop-shadow(0 0 6px rgba(142, 216, 255, .9))
      drop-shadow(0 0 18px rgba(103, 183, 255, .65));
  }
  50% {
    filter:
      drop-shadow(0 0 2px rgba(255, 255, 255, 1))
      drop-shadow(0 0 10px rgba(142, 216, 255, 1))
      drop-shadow(0 0 28px rgba(103, 183, 255, .8));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-signature .signature-draw {
    animation: signature-glow 4.8s ease-in-out var(--sig-end) infinite;
  }
}

/* Header icon links */
.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(247, 251, 255, .28);
  border-radius: 50%;
  background: rgba(2, 5, 20, .45);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.icon-link img {
  display: block;
  width: 18px;
  height: 18px;
}

.icon-link-vr img {
  width: 24px;
  height: auto;
}

.event-link .vrchat-logo {
  width: 20px;
  height: auto;
}

.event-dialog-link .vrchat-logo {
  width: 20px;
  height: auto;
}

.icon-link:hover,
.icon-link:focus-visible {
  border-color: rgba(142, 216, 255, .9);
  box-shadow: 0 0 18px rgba(103, 183, 255, .55);
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .header-icons {
    gap: 6px;
  }

  .icon-link {
    width: 40px;
    height: 40px;
  }
}

/* About button under the profile card */
.profile-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.fancy-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 10px 10px 10px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(rgba(6, 12, 30, .92), rgba(6, 12, 30, .92)) padding-box,
    linear-gradient(120deg, #8ed8ff, #a99bff 50%, #67b7ff) border-box;
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 30px rgba(2, 5, 20, .45), 0 0 0 rgba(142, 216, 255, 0);
  transition: box-shadow .35s ease, transform .35s ease;
}

.fancy-link::before {
  content: "";
  position: absolute;
  inset: -2px auto -2px -40%;
  width: 34%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(142, 216, 255, .28), transparent);
  transform: skewX(-20deg) translateX(-120%);
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.fancy-link-text {
  display: grid;
  gap: 3px;
  text-align: left;
}

.fancy-link-label {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.fancy-link-sub {
  color: rgba(247, 251, 255, .62);
  font-size: 12px;
  letter-spacing: .06em;
}

.fancy-link-arrow {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  color: #06142c;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, background .35s ease;
}

.fancy-link-arrow svg {
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.fancy-link:hover,
.fancy-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(2, 5, 20, .5), 0 0 26px rgba(142, 216, 255, .35);
}

.fancy-link:hover::before,
.fancy-link:focus-visible::before {
  transform: skewX(-20deg) translateX(520%);
}

.fancy-link:hover .fancy-link-arrow,
.fancy-link:focus-visible .fancy-link-arrow {
  background: #8ed8ff;
  box-shadow: 0 0 18px rgba(142, 216, 255, .7);
}

.fancy-link:hover .fancy-link-arrow svg,
.fancy-link:focus-visible .fancy-link-arrow svg {
  transform: translateX(3px);
}

.fancy-link:focus-visible {
  outline: 2px solid #8ed8ff;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .fancy-link,
  .fancy-link::before,
  .fancy-link-arrow,
  .fancy-link-arrow svg {
    transition: none;
  }
}

/* Avatar auto rotation */
.avatar-tab {
  position: relative;
  overflow: hidden;
}

.avatar-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #8ed8ff, #a99bff);
  box-shadow: 0 0 10px rgba(142, 216, 255, .7);
  transform: scaleX(0);
  transform-origin: left;
}

.is-cycling .avatar-tab.is-active::after {
  animation: avatar-progress var(--avatar-interval, 4500ms) linear forwards;
}

@keyframes avatar-progress {
  to {
    transform: scaleX(1);
  }
}

.avatar-card.is-active {
  animation: avatar-in .6s cubic-bezier(.2, .8, .2, 1);
}

.avatar-card.is-active img {
  animation: avatar-img-in .9s cubic-bezier(.2, .8, .2, 1);
}

@keyframes avatar-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes avatar-img-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-card.is-active,
  .avatar-card.is-active img {
    animation: none;
  }
}

/* Events I joined */
.scene-events {
  background:
    radial-gradient(circle at 82% 12%, rgba(169, 155, 255, .14), transparent 26rem),
    linear-gradient(180deg, #030615, #071228 60%, #030615);
  color: var(--white);
}

.events-empty {
  display: grid;
  gap: 6px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px dashed rgba(142, 216, 255, .32);
  background: rgba(3, 7, 22, .5);
}

.events-empty strong {
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: .08em;
}

.events-empty p {
  margin: 0;
  color: var(--muted);
}

.event-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(247, 251, 255, .14);
}

.event-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 0 8px 0 0;
  border-bottom: 1px solid rgba(247, 251, 255, .14);
  transition: background .25s ease;
}

.event-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  width: 100%;
  padding: 18px 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.event-item.has-date .event-open {
  grid-template-columns: 120px minmax(0, 1fr);
}

.event-open:focus-visible {
  outline: 2px solid #8ed8ff;
  outline-offset: -2px;
}

.event-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 0 4px 0 6px;
  border: 0;
  background: none;
  color: rgba(247, 251, 255, .55);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}

.event-more svg {
  transition: transform .2s ease;
}

.event-item:hover .event-more,
.event-more:focus-visible {
  color: #8ed8ff;
}

.event-item:hover .event-more svg,
.event-more:focus-visible svg {
  transform: translateX(3px);
}

.event-more:focus-visible {
  outline: 2px solid #8ed8ff;
  outline-offset: 2px;
}

.event-links {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 84px;
}

.event-link img {
  display: block;
}

.event-item:hover {
  background: rgba(142, 216, 255, .07);
}

.event-date {
  color: var(--sky);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
}

.event-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.event-body strong {
  font-size: clamp(16px, 1.8vw, 20px);
  overflow-wrap: anywhere;
}

.event-body span {
  color: var(--muted);
  font-size: 13px;
}

.event-link {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247, 251, 255, .28);
  border-radius: 50%;
  color: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.event-link:hover,
.event-link:focus-visible {
  border-color: #8ed8ff;
  color: #8ed8ff;
  box-shadow: 0 0 14px rgba(142, 216, 255, .5);
}

@media (max-width: 640px) {
  .event-item.has-date .event-open {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px 14px;
  }

  .event-date {
    grid-column: 1 / -1;
  }

  .event-more {
    font-size: 0;
    padding-left: 0;
  }
}

/* Event detail dialog */
.event-dialog {
  width: min(840px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background:
    linear-gradient(rgba(6, 12, 30, .97), rgba(6, 12, 30, .97)) padding-box,
    linear-gradient(130deg, #8ed8ff, #a99bff 55%, #67b7ff) border-box;
  color: var(--white);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 40px rgba(142, 216, 255, .18);
  overflow: auto;
}

.event-dialog::backdrop {
  background: rgba(2, 5, 20, .72);
  backdrop-filter: blur(6px);
}

.event-dialog[open] {
  animation: event-dialog-in .35s cubic-bezier(.2, .8, .2, 1);
}

@keyframes event-dialog-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.98);
  }
}

.event-dialog-inner {
  position: relative;
  padding: clamp(32px, 5vw, 60px) clamp(24px, 5.5vw, 64px) clamp(28px, 4.5vw, 52px);
}

.event-dialog h3,
.event-dialog-tagline,
.event-dialog-text,
.event-meta-value {
  word-break: auto-phrase;
  line-break: strict;
}

.event-dialog-close-form {
  position: absolute;
  top: 20px;
  right: 20px;
  margin: 0;
}

.event-dialog-close {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(247, 251, 255, .24);
  border-radius: 50%;
  background: rgba(247, 251, 255, .06);
  color: var(--white);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}

.event-dialog-close:hover,
.event-dialog-close:focus-visible {
  border-color: #8ed8ff;
  color: #8ed8ff;
}

.event-dialog-tagline {
  margin: 0 56px 8px 0;
  color: #b9c9ff;
  font-size: 14px;
  font-style: italic;
  letter-spacing: .06em;
}

.event-dialog h3 {
  margin: 0 56px 22px 0;
  font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.3;
  text-wrap: balance;
}

.event-dialog-text {
  max-width: 44em;
  margin: 0 0 22px;
  color: rgba(247, 251, 255, .82);
  font-size: 15px;
  line-height: 1.95;
  text-wrap: pretty;
}

.event-dialog-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 0 0 30px;
}

.event-meta {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 2px 0 2px 16px;
  border-left: 1px solid var(--ev-chip, #8ed8ff);
}

.event-meta-label {
  color: var(--ev-chip, #8ed8ff);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
}

.event-meta-value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.5;
}

.event-dialog-links {
  padding-top: 20px;
  border-top: 1px solid rgba(247, 251, 255, .14);
}

.event-dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-dialog-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(247, 251, 255, .26);
  border-radius: 999px;
  background: rgba(247, 251, 255, .05);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.event-dialog-link:hover,
.event-dialog-link:focus-visible {
  border-color: #8ed8ff;
  box-shadow: 0 0 16px rgba(142, 216, 255, .4);
}

body.has-dialog {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .event-dialog[open] {
    animation: none;
  }
}

/* Event themes ------------------------------------------------------- */
.event-item[data-theme] {
  position: relative;
  background: linear-gradient(90deg, var(--ev-tint, transparent), transparent 70%);
}

.event-item[data-theme]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--ev-accent), var(--ev-accent-2));
  box-shadow: 0 0 12px var(--ev-accent);
}

.event-item[data-theme] .event-open {
  padding-left: 22px;
}

.event-item[data-theme] .event-body > span {
  color: var(--ev-accent);
  opacity: .85;
}

.event-item[data-theme]:hover {
  background: linear-gradient(90deg, var(--ev-tint-strong, rgba(142, 216, 255, .07)), transparent 80%);
}

.event-item[data-theme]:hover .event-more,
.event-item[data-theme] .event-open:focus-visible .event-more {
  color: var(--ev-accent);
}

.event-item[data-theme="moon"] {
  --ev-accent: #c9b8ff;
  --ev-accent-2: #f6e7b8;
  --ev-tint: rgba(150, 120, 255, .10);
  --ev-tint-strong: rgba(150, 120, 255, .18);
}

.event-item[data-theme="cafe"] {
  --ev-accent: #a8d48f;
  --ev-accent-2: #e2c79a;
  --ev-tint: rgba(150, 200, 120, .08);
  --ev-tint-strong: rgba(150, 200, 120, .15);
}

/* Moon: night sky with a full moon and stars */
.event-dialog[data-theme="moon"] {
  background:
    radial-gradient(circle at 79% 14%, #fff8de 0 30px, rgba(255, 244, 205, .45) 32px, rgba(255, 244, 205, .12) 60px, transparent 120px) padding-box,
    radial-gradient(1px 1px at 12% 22%, #fff, transparent) padding-box,
    radial-gradient(1px 1px at 28% 68%, rgba(255, 255, 255, .8), transparent) padding-box,
    radial-gradient(1.5px 1.5px at 46% 14%, #fff, transparent) padding-box,
    radial-gradient(1px 1px at 63% 42%, rgba(255, 255, 255, .7), transparent) padding-box,
    radial-gradient(1.5px 1.5px at 74% 78%, #fff, transparent) padding-box,
    radial-gradient(1px 1px at 92% 58%, rgba(255, 255, 255, .8), transparent) padding-box,
    radial-gradient(1px 1px at 38% 90%, rgba(255, 255, 255, .6), transparent) padding-box,
    radial-gradient(circle at 10% 110%, rgba(140, 100, 255, .35), transparent 60%) padding-box,
    linear-gradient(170deg, #17113a 0%, #0c0a26 55%, #07061a 100%) padding-box,
    linear-gradient(140deg, #f6e7b8, #c9b8ff 45%, #7d6bff) border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 50px rgba(150, 120, 255, .28);
}

.event-dialog[data-theme="moon"] {
  --ev-chip: #c9b8ff;
}

.event-dialog[data-theme="moon"] .event-meta-value {
  color: #f6f1ff;
}

.event-dialog[data-theme="moon"] .event-dialog-links {
  border-color: rgba(201, 184, 255, .2);
}

.event-dialog[data-theme="moon"] .event-dialog-tagline {
  color: #f6e7b8;
  text-shadow: 0 0 14px rgba(246, 231, 184, .45);
}

.event-dialog[data-theme="moon"] h3 {
  text-shadow: 0 0 22px rgba(201, 184, 255, .45);
}

.event-dialog[data-theme="moon"] .event-dialog-link,
.event-dialog[data-theme="moon"] .event-dialog-close {
  border-color: rgba(201, 184, 255, .4);
  background: rgba(201, 184, 255, .08);
}

.event-dialog[data-theme="moon"] .event-dialog-link:hover,
.event-dialog[data-theme="moon"] .event-dialog-link:focus-visible,
.event-dialog[data-theme="moon"] .event-dialog-close:hover,
.event-dialog[data-theme="moon"] .event-dialog-close:focus-visible {
  border-color: #f6e7b8;
  color: #f6e7b8;
  box-shadow: 0 0 18px rgba(201, 184, 255, .5);
}

/* Cafe: warm paper, leaf green and coffee brown */
.event-dialog[data-theme="cafe"] {
  background:
    radial-gradient(circle at 100% 0%, rgba(126, 168, 98, .28), transparent 42%) padding-box,
    radial-gradient(circle at 0% 100%, rgba(176, 132, 84, .22), transparent 45%) padding-box,
    repeating-linear-gradient(0deg, rgba(90, 70, 40, .025) 0 2px, transparent 2px 5px) padding-box,
    url("../images/japan-map.svg") right -24px bottom -36px / auto 118% no-repeat padding-box,
    linear-gradient(160deg, #f8f1e2, #efe2c8) padding-box,
    linear-gradient(140deg, #6f9b57, #c8a674 55%, #8a6a45) border-box;
  color: #2f2a20;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 40px rgba(168, 212, 143, .2);
}

.event-dialog[data-theme="cafe"] {
  --ev-chip: #4f7d3a;
}

.event-dialog[data-theme="cafe"] .event-meta-value {
  color: #2d3b22;
}

.event-dialog[data-theme="cafe"] .event-dialog-links {
  border-color: rgba(79, 125, 58, .22);
}

.event-dialog[data-theme="cafe"] h3 {
  color: #2d3b22;
}

.event-dialog[data-theme="cafe"] .event-dialog-text {
  color: #4a3f2e;
}

.event-dialog[data-theme="cafe"] .event-dialog-link {
  border-color: #3f6a2d;
  background: #3f6a2d;
  color: #fdf8ec;
}

.event-dialog[data-theme="cafe"] .event-dialog-link:hover,
.event-dialog[data-theme="cafe"] .event-dialog-link:focus-visible {
  border-color: #2d4f1f;
  background: #2d4f1f;
  box-shadow: 0 6px 16px rgba(63, 106, 45, .35);
}

.event-dialog[data-theme="cafe"] .event-dialog-close {
  border-color: rgba(63, 106, 45, .4);
  background: rgba(255, 255, 255, .5);
  color: #3f6a2d;
}

.event-dialog[data-theme="cafe"] .event-dialog-close:hover,
.event-dialog[data-theme="cafe"] .event-dialog-close:focus-visible {
  border-color: #3f6a2d;
  color: #2d4f1f;
}

.event-dialog[data-theme="cafe"]::backdrop {
  background: rgba(20, 16, 8, .7);
}

/* Keep dialog typography independent from the page-level paragraph sizes */
.event-dialog .event-dialog-text {
  font-size: 17px;
}

.event-dialog .event-dialog-tagline {
  font-size: 14px;
}

.event-dialog p.event-meta {
  font-size: 17px;
}

/* TOPICS: news + upcoming shifts ------------------------------------ */
.topics-label small {
  margin-left: 12px;
  color: rgba(247, 251, 255, .6);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  vertical-align: middle;
}

.news-list,
.shift-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-item {
  display: grid;
  gap: 8px;
  padding-block: 18px;
  border-top: 1px solid rgba(247, 251, 255, .14);
}

.news-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.topics-panel .news-date {
  color: #8ed8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

.topics-panel .news-title {
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.35;
  word-break: auto-phrase;
}

.news-body {
  margin: 0;
  color: rgba(247, 251, 255, .78);
  font-size: 14px;
  line-height: 1.8;
  word-break: auto-phrase;
}

.news-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  color: #8ed8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
}

.news-more:hover,
.news-more:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.shift-item {
  --ev-accent: #8ed8ff;
  border-top: 1px solid rgba(247, 251, 255, .14);
}

.shift-item:first-child {
  border-top: 0;
}

.shift-item[data-theme="moon"] {
  --ev-accent: #c9b8ff;
}

.shift-item[data-theme="cafe"] {
  --ev-accent: #a8d48f;
}

.shift-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.shift-row {
  cursor: pointer;
  transition: background-color .2s ease;
}

button.shift-row:hover,
button.shift-row:focus-visible {
  background: rgba(247, 251, 255, .05);
}

button.shift-row:focus-visible {
  outline: 2px solid var(--ev-accent);
  outline-offset: 2px;
}

.shift-date {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--ev-accent);
}

.topics-panel .shift-day {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.topics-panel .shift-week {
  color: var(--ev-accent);
  font-size: 12px;
  font-weight: 700;
}

.shift-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.topics-panel .shift-name {
  color: var(--ev-accent);
  font-size: 17px;
  line-height: 1.3;
}

.topics-panel .shift-info {
  color: rgba(247, 251, 255, .72);
  font-size: 13px;
  letter-spacing: .04em;
  word-break: auto-phrase;
}

.shift-arrow {
  color: rgba(247, 251, 255, .4);
  transition: color .2s ease, transform .2s ease;
}

button.shift-row:hover .shift-arrow,
button.shift-row:focus-visible .shift-arrow {
  color: var(--ev-accent);
  transform: translateX(3px);
}

.shift-item.is-today .shift-name::after {
  content: "TODAY";
  margin-left: 10px;
  color: #ffff4a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

/* TOPICS: keep News and Schedule side by side so neither hides the other */
@media (min-width: 861px) {
  .topics-panel-news {
    top: clamp(34px, 4vw, 58px);
    right: 0;
    width: min(47%, 660px);
  }

  .topics-panel-event {
    top: clamp(190px, 16vw, 250px);
    bottom: auto;
    left: 0;
    width: min(49%, 690px);
  }
}

@media (max-width: 860px) {
  .topics-panel-news,
  .topics-panel-event {
    padding: 28px 22px;
  }

  .shift-row {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .topics-panel .shift-day {
    font-size: 19px;
  }

  .shift-date {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-left: 10px;
  }

  .topics-panel .shift-info {
    font-size: 12px;
  }
}

/* Shift admin -------------------------------------------------------- */
.shift-event-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.shift-event-choice legend {
  margin-bottom: 8px;
  color: var(--blue);
  font-weight: 700;
}

.shift-event-choice label {
  --ev-accent: #8ed8ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.shift-event-choice label[data-theme="moon"],
.admin-shift-list li[data-theme="moon"] {
  --ev-accent: #c9b8ff;
}

.shift-event-choice label[data-theme="cafe"],
.admin-shift-list li[data-theme="cafe"] {
  --ev-accent: #a8d48f;
}

.shift-event-choice label:has(input:checked) {
  border-color: var(--ev-accent);
  background: rgba(247, 251, 255, .06);
  box-shadow: inset 3px 0 0 var(--ev-accent);
}

.shift-event-choice input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--ev-accent);
}

.contact-form .shift-event-choice label {
  display: inline-flex;
}

.shift-event-choice b {
  color: var(--ev-accent);
}

.shift-dates {
  display: grid;
  gap: 8px;
}

.shift-dates > span {
  color: var(--blue);
  font-weight: 700;
}

.shift-dates .button {
  justify-self: start;
}

.shift-dates small {
  color: var(--muted, rgba(247, 251, 255, .6));
  font-size: 12px;
}

.contact-form input[type="date"] {
  color-scheme: dark;
}

.admin-shift-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-shift-list li {
  --ev-accent: #8ed8ff;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 12px;
  border-left: 2px solid var(--ev-accent);
  border-radius: 0;
}

.admin-shift-list li::before {
  content: none;
}

.admin-shift-list li.is-editing {
  background: rgba(103, 183, 255, .12);
}

.admin-shift-list time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-shift-list em {
  margin-left: 4px;
  color: #ffff4a;
  font-size: 11px;
  font-style: normal;
}

.admin-shift-list span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-shift-list b {
  color: var(--ev-accent);
}

.admin-shift-list small {
  color: rgba(247, 251, 255, .7);
}

.admin-shift-list form {
  margin: 0;
}

.admin-shift-past {
  margin-top: 24px;
  opacity: .75;
}

.admin-shift-past summary {
  cursor: pointer;
  font-weight: 700;
}

.admin-shift-past .admin-shift-list {
  margin: 12px 0;
}

@media (max-width: 640px) {
  .admin-shift-list li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .admin-shift-list time {
    grid-column: 1 / -1;
  }
}

/* Contact: X DM ------------------------------------------------------ */
.contact-dm-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 560px);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 52px) clamp(22px, 5vw, 48px);
  text-align: center;
}

.contact-dm-card h2,
.contact-dm-card p {
  margin: 0;
}

.contact-dm-icon {
  width: 40px;
  height: 40px;
}

.contact-dm-handle {
  color: #8ed8ff;
  font-weight: 700;
  letter-spacing: .06em;
}

.contact-dm-card .button {
  margin-top: 10px;
}

.contact-dm-card {
  width: min(100%, 640px);
}

.contact-dm-card h2 {
  font-size: clamp(26px, 4vw, 40px);
  word-break: auto-phrase;
  text-wrap: balance;
}

/* Gallery preview: 6 portrait cards */
.scene-gallery .preview-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Friend names stay on one line; site.js shrinks long ones to fit */
.friend-card h2 {
  white-space: nowrap;
}

.friends-order-note {
  margin: 0;
  color: rgba(247, 251, 255, .62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

/* Footer: no-reuse notice on its own line at the very bottom */
.site-footer {
  flex-wrap: wrap;
}

.site-footer .footer-notice {
  flex-basis: 100%;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

/* Activity: past activity + favorite worlds ---------------------------- */
.activity-history {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}

.activity-trust {
  padding: 22px 24px;
}

.activity-trust .eyebrow {
  margin-bottom: 10px;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.world-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(19, 28, 48, .92), rgba(8, 13, 25, .92));
}

.world-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.world-card-body {
  display: grid;
  gap: 8px;
  padding: 18px 20px 20px;
}

.world-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.world-author {
  margin: 0;
  color: #8ed8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.world-note {
  margin: 0;
  color: rgba(247, 251, 255, .78);
  font-size: 14px;
  line-height: 1.7;
}

.world-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  margin-top: 4px;
  color: #8ed8ff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.world-link:hover,
.world-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 760px) {
  .activity-history {
    grid-template-columns: 1fr;
  }
}

.activity-trust .trust-timeline.compact {
  grid-template-columns: 1fr;
}

.activity-trust .trust-timeline li {
  min-height: 40px;
}

.activity-trust .trust-rank {
  justify-self: start;
  font-size: 18px;
}

.activity-trust-label {
  color: rgba(247, 251, 255, .6);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

.tl-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tl-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #0b1224;
}

.tl-icon {
  border: 1px solid color-mix(in srgb, var(--tl-color) 55%, transparent);
  background: color-mix(in srgb, var(--tl-color) 16%, #0b1224);
  color: var(--tl-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--tl-color) 30%, transparent);
}

.tl-genre-start { --tl-color: #8ed8ff; }
.tl-genre-device { --tl-color: #ffc861; }
.tl-genre-trust { --tl-color: #b9a2ff; }
.tl-genre-birthday { --tl-color: #ff8a7a; }
.tl-genre-avatar { --tl-color: #ff9ecf; }
.tl-genre-event { --tl-color: #7ee0a1; }

.tl-thumb {
  overflow: hidden;
  border: 2px solid var(--tl-color);
}

.tl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.tl-event-art[data-theme="moon"] {
  background:
    radial-gradient(circle at 62% 38%, #fff8de 0 7px, rgba(255, 244, 205, .35) 9px, transparent 16px),
    radial-gradient(1px 1px at 22% 30%, #fff, transparent),
    radial-gradient(1px 1px at 30% 72%, #fff, transparent),
    linear-gradient(160deg, #17113a, #07061a);
}

.tl-event-art[data-theme="cafe"] {
  background:
    url("../images/japan-map.svg") 60% 55% / 130% auto no-repeat,
    linear-gradient(160deg, #f8f1e2, #e9d8b6);
}

/* Product photos (devices) in the activity timeline */
.tl-product {
  background: #f4f6f9;
}

.tl-product img {
  object-fit: contain;
  object-position: 50% 50%;
  padding: 3px;
}

.tl-product img[src$=".jpg"] {
  object-fit: cover;
  padding: 0;
}

.friend-name-en {
  margin: -4px 0 10px;
  color: rgba(247, 251, 255, .62);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* Activity timeline: no border around icons / thumbnails */
.tl-icon,
.tl-thumb {
  border: 0;
  box-shadow: none;
}

/* Friends without a photo: person icon */
.friend-photo-placeholder,
.admin-friend-noimage {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(142, 216, 255, .14), transparent 70%),
    rgba(255, 255, 255, .05);
  color: rgba(142, 216, 255, .55);
}

.friend-photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 260px;
}

.friend-photo-placeholder svg {
  width: 46%;
  max-width: 120px;
  fill: currentColor;
}

.admin-friend-noimage {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.admin-friend-noimage svg {
  width: 26px;
  fill: currentColor;
}

/* Activity: story timeline (center line, milestones left / avatars & gear right) */
.activity-history {
  display: grid;
  gap: clamp(56px, 8vw, 96px);
}

.story-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "no no"
    "year copy";
  align-items: center;
  column-gap: clamp(24px, 5vw, 64px);
  margin-bottom: clamp(28px, 5vw, 56px);
}

.story-no {
  grid-area: no;
  margin: 0 0 4px;
  color: var(--sky);
  font-family: "Inter", sans-serif;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: .04em;
}

.story-year {
  grid-area: year;
  font-family: "Inter", sans-serif;
  font-size: clamp(84px, 15vw, 180px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, #ffffff 30%, #8ed8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.story-copy {
  grid-area: copy;
  display: grid;
  gap: 8px;
}

.story-copy p {
  margin: 0;
  color: rgba(247, 251, 255, .72);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}

.story-copy h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.35;
}

.story-board {
  --story-gap: 96px;
  position: relative;
  isolation: isolate;
}

.story-ghost {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  font-family: "Inter", sans-serif;
  font-size: clamp(140px, 30vw, 380px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(142, 216, 255, .1);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.story-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.story-col-label {
  justify-self: center;
  padding: 7px 22px;
  border: 1px solid rgba(142, 216, 255, .45);
  border-radius: 999px;
  background: rgba(9, 15, 30, .7);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
}

.story-year-pill,
.story-month span {
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(135deg, #8ed8ff, #9a8cff);
  color: var(--ink);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 0 24px rgba(142, 216, 255, .28);
}

.story-year-pill {
  position: relative;
  z-index: 1;
  padding: 12px 34px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
}

.story-line {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 26px 0 8px;
  list-style: none;
}

.story-line::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(142, 216, 255, .7), rgba(154, 140, 255, .45) 85%, transparent);
}

.story-line > li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--story-gap) minmax(0, 1fr);
  align-items: center;
}

.story-line > li::before {
  content: none;
}

.story-month {
  margin: 10px 0 2px;
}

.story-month span {
  grid-column: 2;
  justify-self: center;
  position: relative;
  z-index: 1;
  min-width: 64px;
  padding: 6px 16px;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
}

.story-item.is-left .story-card { grid-column: 1; }
.story-item.is-right .story-card { grid-column: 3; }

/* dashed connector from card to the center line, with a dot on the line */
.story-item::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(var(--story-gap) / 2);
  border-top: 1px dashed rgba(142, 216, 255, .5);
}

.story-item.is-left::after { left: calc(50% - var(--story-gap) / 2); }
.story-item.is-right::after { left: 50%; }

.story-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 20px 14px 14px;
  border: 1px solid color-mix(in srgb, var(--tl-color, #8ed8ff) 30%, rgba(153, 204, 255, .18));
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--tl-color, #8ed8ff) 14%, transparent), transparent 12rem),
    rgba(9, 15, 30, .82);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.story-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tl-color, #8ed8ff);
  box-shadow: 0 0 10px var(--tl-color, #8ed8ff);
  transform: translateY(-50%);
}

.story-item.is-left .story-card::after { right: calc(var(--story-gap) / -2 - 4.5px); }
.story-item.is-right .story-card::after { left: calc(var(--story-gap) / -2 - 4.5px); }

.story-card .tl-marker {
  width: 48px;
  height: 48px;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.story-meta time {
  color: var(--tl-color, #8ed8ff);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
}

.story-side-tag {
  display: none;
  padding: 1px 8px;
  border: 1px solid rgba(142, 216, 255, .3);
  border-radius: 999px;
  color: rgba(247, 251, 255, .7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.story-text {
  margin: 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  word-break: auto-phrase;
}

.story-card.is-trust .story-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.story-card .trust-rank {
  font-size: 17px;
}

@media (max-width: 760px) {
  .story-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "no"
      "year"
      "copy";
    row-gap: 14px;
  }

  .story-board {
    --story-gap: 44px;
  }

  .story-ghost {
    top: 30%;
  }

  .story-cols {
    grid-template-columns: var(--story-gap) minmax(0, 1fr);
  }

  .story-col-label {
    display: none;
  }

  .story-year-pill {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 10px 24px;
  }

  .story-line::before {
    left: calc(var(--story-gap) / 2);
  }

  .story-line > li {
    grid-template-columns: var(--story-gap) minmax(0, 1fr);
  }

  .story-month span {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 0;
    margin-left: calc(var(--story-gap) / 2 - 28px);
    min-width: 56px;
  }

  .story-item.is-left .story-card,
  .story-item.is-right .story-card {
    grid-column: 2;
  }

  .story-item.is-left::after,
  .story-item.is-right::after {
    left: calc(var(--story-gap) / 2);
  }

  .story-item.is-left .story-card::after,
  .story-item.is-right .story-card::after {
    left: calc(var(--story-gap) / -2 - 4.5px);
    right: auto;
  }

  .story-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px 12px 12px;
  }

  .story-card .tl-marker {
    width: 44px;
    height: 44px;
  }

  .story-side-tag {
    display: inline-block;
  }

  .story-text {
    font-size: 15px;
  }
}

/* Friend self-introduction: keep line breaks */
.friend-comment {
  white-space: pre-line;
}

/* Friends: every photo (and the no-photo icon) uses the same 3:4 frame */
.friend-card > img,
.friend-card > .friend-photo-placeholder {
  align-self: start;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Friends: photo with icon links + tags underneath, text on the right */
.friend-card-body {
  min-width: 0;
}

.friend-media {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.friend-media > img,
.friend-media > .friend-photo-placeholder {
  display: grid;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.friend-link {
  --brand: #8ed8ff;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, rgba(153, 204, 255, .18));
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 14%, #0b1224);
  color: var(--brand);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.friend-link img,
.friend-link svg {
  width: 16px;
  height: 16px;
}

.friend-link-vrchat img {
  width: 22px;
  height: auto;
}

.friend-link-x { --brand: #f7fbff; background: #000; }
.friend-link-vrchat { --brand: #8ed8ff; }
.friend-link-booth { --brand: #ff8a7a; }
.friend-link-web { --brand: #7ee0a1; }

.friend-link:hover,
.friend-link:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 70%, transparent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 28%, transparent);
}

.friend-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend-tags li {
  --tone: #8ed8ff;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px 6px 3px 5px;
  border: 1px solid color-mix(in srgb, var(--tone) 38%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  color: color-mix(in srgb, var(--tone) 55%, #ffffff);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
}

.friend-tags li::before {
  content: "#";
  color: var(--tone);
  font-family: "Inter", sans-serif;
  font-weight: 900;
}

.friend-tags li[data-tone="violet"] { --tone: #b9a2ff; }
.friend-tags li[data-tone="mint"] { --tone: #7ee0a1; }
.friend-tags li[data-tone="pink"] { --tone: #ff9ecf; }
.friend-tags li[data-tone="gold"] { --tone: #ffc861; }

/* PC: every card the same height (tallest photo column); text is fitted by site.js */
@media (min-width: 861px) {
  .friends-grid {
    grid-auto-rows: 1fr;
  }

  .friend-card {
    min-height: 0;
  }

  .friend-card-body {
    contain: size;
    overflow: clip;
  }
}

@media (max-width: 860px) {
  .friend-card {
    grid-template-columns: minmax(124px, 40%) minmax(0, 1fr);
    gap: 16px;
  }
}

/* Friends: tags under the name */
.friend-card-body .friend-tags {
  margin: 2px 0 12px;
}

/* Styled-name code tooltip: only exists while shown, so it never widens the page */
.friend-styled-name::after {
  content: none;
}

.friend-styled-name:hover::after,
.friend-styled-name:focus-visible::after {
  content: attr(data-code);
  max-width: min(520px, calc(100vw - 48px));
}

/* BOOTH: official app icon fills the round button */
.friend-link-booth {
  overflow: hidden;
  border-color: rgba(252, 77, 80, .6);
  background: #fc4d50;
}

.friend-link-booth img {
  width: 100%;
  height: 100%;
}

/* Activity timeline cards: no border, soft white shadow behind */
.story-card {
  border: 0;
  box-shadow: 0 6px 22px rgba(255, 255, 255, .13);
}

/* Activity timeline: column labels as vertical rails on both edges, following the scroll */
.story-board {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  column-gap: clamp(12px, 2vw, 22px);
}

.story-main {
  min-width: 0;
}

.story-cols {
  display: flex;
  justify-content: center;
}

.story-rail {
  position: relative;
  padding-top: 96px;
}

.story-rail-label {
  position: sticky;
  top: calc(50vh - 70px);
  display: block;
  padding: 16px 7px;
  border: 1px solid rgba(142, 216, 255, .45);
  border-radius: 999px;
  background: rgba(9, 15, 30, .82);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1;
  writing-mode: vertical-rl;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(142, 216, 255, .12);
}

@media (max-width: 760px) {
  .story-board {
    display: block;
  }

  .story-rail {
    display: none;
  }

  .story-cols {
    justify-content: flex-start;
  }
}

/* Trust Rank entries: shield icon, dot and date use the rank's own color */
.story-item.tl-genre-trust,
.story-item.tl-genre-trust .tl-genre-trust {
  --tl-color: var(--trust-color, #b9a2ff);
}

/* Friend card easter egg: running "Read more" button + RPG battle ------------- */
.friend-card {
  position: relative;
}

.friend-rpg-zone {
  min-height: 40px;
  margin-top: 4px;
}

.friend-readmore {
  --rm-glow: rgba(255, 158, 207, .35);
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 9px 14px 9px 11px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #111a33, #0a0f22) padding-box,
    linear-gradient(120deg, #8ed8ff, #ff9ecf 45%, #b9a2ff 75%, #8ed8ff) border-box;
  background-size: 100% 100%, 220% 100%;
  color: var(--white);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--rm-glow), 0 8px 22px rgba(0, 0, 0, .35);
  animation: rm-border 4s linear infinite, rm-pulse 2.4s ease-in-out infinite;
  transition: left .32s cubic-bezier(.2, .9, .3, 1.25), top .32s cubic-bezier(.2, .9, .3, 1.25), transform .2s ease;
}

/* light sweeping across the button */
.friend-readmore::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: rm-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}

.friend-readmore-spark,
.friend-readmore-arrow {
  display: grid;
  place-items: center;
}

.friend-readmore-spark svg {
  width: 16px;
  height: 16px;
  fill: #ffd84d;
  filter: drop-shadow(0 0 4px rgba(255, 216, 77, .7));
  animation: rm-twinkle 1.8s ease-in-out infinite;
}

.friend-readmore-label {
  background: linear-gradient(90deg, #ffffff, #ffd3ea);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.friend-readmore-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #ff9ecf;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.friend-readmore:hover .friend-readmore-arrow svg,
.friend-readmore:focus-visible .friend-readmore-arrow svg {
  transform: translateX(3px);
}

.friend-readmore:focus-visible {
  outline: 2px solid #ffd84d;
  outline-offset: 3px;
}

.friend-readmore.is-running {
  position: absolute;
  z-index: 60;
}

.friend-readmore.is-hop {
  animation: rm-border 4s linear infinite, rm-hop .42s ease;
}

.friend-readmore.is-tired {
  --rm-glow: rgba(142, 216, 255, .2);
  background:
    linear-gradient(135deg, #111a33, #0a0f22) padding-box,
    linear-gradient(120deg, rgba(142, 216, 255, .5), rgba(185, 162, 255, .5)) border-box;
  animation: rm-pulse 2.4s ease-in-out infinite;
}

.friend-readmore.is-tired .friend-readmore-spark svg {
  fill: #8ed8ff;
  animation: none;
}

@keyframes rm-border {
  to { background-position: 0 0, 220% 0; }
}

@keyframes rm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--rm-glow), 0 8px 22px rgba(0, 0, 0, .35); }
  50% { box-shadow: 0 0 18px 2px var(--rm-glow), 0 8px 22px rgba(0, 0, 0, .35); }
}

@keyframes rm-shine {
  0%, 55% { transform: translateX(-120%); }
  85%, 100% { transform: translateX(120%); }
}

@keyframes rm-twinkle {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.18) rotate(18deg); }
}

@keyframes rm-hop {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.18, .82); }
  60% { transform: scale(.9, 1.12) translateY(-4px); }
  100% { transform: scale(1, 1); }
}

.rpg-dialog {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.rpg-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
}

.rpg-screen {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 3px solid #fff;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 0 0 3px #000, 0 0 0 6px rgba(255, 255, 255, .35);
  font-family: "DotGothic16", ui-monospace, monospace;
  letter-spacing: .04em;
}

.rpg-screen.is-hurt {
  animation: rpg-hurt .4s ease;
}

@keyframes rpg-hurt {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); background: #3a0000; }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-3px, 1px); }
}

.rpg-x {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.rpg-window {
  padding: 10px 14px;
  border: 3px solid #fff;
  border-radius: 8px;
  background: #000;
}

.rpg-enemy {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 8px;
}

.rpg-enemy img {
  width: 168px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  transition: opacity .8s ease, filter .8s ease, transform .8s ease;
}

.rpg-enemy.is-hit img {
  animation: rpg-hit .45s steps(2) 1;
}

.rpg-enemy.is-burn img {
  animation: rpg-burn .6s ease 1;
}

@keyframes rpg-hit {
  0%, 100% { transform: translateX(0); opacity: 1; }
  25% { transform: translateX(-8px); opacity: .2; }
  50% { transform: translateX(8px); opacity: 1; }
  75% { transform: translateX(-4px); opacity: .2; }
}

@keyframes rpg-burn {
  0%, 100% { filter: none; }
  30% { filter: sepia(1) saturate(6) hue-rotate(-30deg) brightness(1.3); }
}

.rpg-enemy.is-defeated img {
  opacity: .15;
  filter: grayscale(1);
  transform: scale(.92);
}

.rpg-enemy-hp {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
}

.rpg-bar {
  display: block;
  width: 140px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 3px;
}

.rpg-bar i {
  display: block;
  height: 100%;
  background: #ffd84d;
  transition: width .35s ease;
}

.rpg-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.rpg-status em {
  font-style: normal;
}

.rpg-message {
  min-height: 96px;
}

.rpg-message p {
  margin: 0;
  line-height: 1.7;
}

.rpg-commands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}

.rpg-commands button {
  padding: 6px 4px 6px 22px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.rpg-commands button:hover::before,
.rpg-commands button:focus-visible::before {
  content: "▶";
  position: absolute;
  left: 2px;
  font-size: 13px;
  top: 50%;
  transform: translateY(-50%);
  animation: rpg-blink 1s steps(2) infinite;
}

.rpg-commands button:disabled {
  opacity: .4;
  cursor: default;
}

.rpg-commands button:focus-visible {
  outline: none;
}

@keyframes rpg-blink {
  50% { opacity: 0; }
}

.rpg-reveal {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px;
  text-align: center;
  animation: rpg-reveal .7s cubic-bezier(.2, .9, .3, 1.3);
}

.rpg-potato {
  font-size: 44px;
  line-height: 1;
}

.rpg-reveal strong {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 400;
  color: #ffd84d;
}

@keyframes rpg-reveal {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .friend-readmore,
  .rpg-screen.is-hurt,
  .rpg-enemy.is-hit img,
  .rpg-enemy.is-burn img,
  .rpg-reveal {
    animation: none;
    transition: none;
  }
}

/* Read-more button: simpler, squarer look (no flowing gradient) */
.friend-readmore {
  padding: 9px 14px 9px 11px;
  border: 1.5px solid rgba(255, 158, 207, .7);
  border-radius: 8px;
  background: #111a33;
  animation: rm-pulse 2.4s ease-in-out infinite;
}

.friend-readmore.is-hop {
  animation: rm-hop .42s ease;
}

.friend-readmore-label {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--white);
}

.friend-readmore.is-tired {
  border-color: rgba(142, 216, 255, .5);
  background: #111a33;
}

/* Read-more button: no sparkle icon on the normal button */
.friend-readmore-spark {
  display: none;
}

.friend-readmore {
  padding-left: 14px;
}

/* "…もう にげない": pixel-art (RPG window) look */
.friend-readmore.is-tired {
  gap: 6px;
  margin: 3px;
  padding: 7px 14px 7px 10px;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .06em;
  /* stepped white frame with notched corners */
  box-shadow:
    0 -3px 0 0 #fff,
    0 3px 0 0 #fff,
    -3px 0 0 0 #fff,
    3px 0 0 0 #fff,
    0 0 0 3px #000 inset;
  animation: none;
  image-rendering: pixelated;
}

.friend-readmore.is-tired::after {
  content: none;
}

.friend-readmore.is-tired::before {
  content: "▶";
  font-size: 11px;
  animation: rpg-blink 1s steps(2) infinite;
}

.friend-readmore.is-tired .friend-readmore-arrow {
  display: none;
}

.friend-readmore.is-tired.is-hop {
  animation: rm-hop .42s steps(4);
}

/* RPG: hard-pixel dot font (16px grid + anti-aliasing removed by the #rpg-crisp filter) */
.rpg-screen,
.friend-readmore.is-tired {
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

.rpg-crisp,
.rpg-message p,
.rpg-commands button,
.rpg-status > *,
.friend-readmore.is-tired .friend-readmore-label {
  filter: url(#rpg-crisp);
}

.rpg-message p,
.rpg-commands button,
.rpg-status,
.rpg-enemy-hp {
  font-size: 16px;
}

.rpg-reveal strong {
  font-size: 32px;
  font-weight: 400;
}

.rpg-x {
  font-size: 32px;
  line-height: 1;
}

.rpg-commands button small {
  margin-left: 8px;
  font-size: 16px;
  opacity: .7;
}

.rpg-message {
  min-height: 84px;
}

/* magic effects */
.rpg-enemy.is-fire img {
  animation: rpg-burn .6s ease 1;
}

.rpg-enemy.is-ice img {
  animation: rpg-ice .7s ease 1;
}

.rpg-enemy.is-thunder img {
  animation: rpg-thunder .5s steps(2) 1;
}

.rpg-screen.is-heal {
  animation: rpg-heal .6s ease 1;
}

@keyframes rpg-ice {
  0%, 100% { filter: none; }
  30% { filter: hue-rotate(180deg) saturate(3) brightness(1.4); }
}

@keyframes rpg-thunder {
  0%, 100% { filter: none; }
  25%, 75% { filter: brightness(3) grayscale(1); }
  50% { filter: invert(1); }
}

@keyframes rpg-heal {
  0%, 100% { box-shadow: 0 0 0 3px #000, 0 0 0 6px rgba(255, 255, 255, .35); }
  40% { box-shadow: 0 0 0 3px #000, 0 0 0 6px #7ee0a1, 0 0 30px #7ee0a1; }
}

/* RPG: six main commands → three columns on wider screens */
@media (min-width: 520px) {
  .rpg-commands:has(> button:nth-child(6):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* RPG phase 2: the true form */
.rpg-enemy.is-transform img {
  animation: rpg-glitch 1.3s steps(10) 1;
}

@keyframes rpg-glitch {
  0% { transform: translate(0, 0); filter: none; clip-path: inset(0 0 0 0); }
  15% { transform: translate(-6px, 2px); filter: hue-rotate(90deg) saturate(3); clip-path: inset(10% 0 55% 0); }
  30% { transform: translate(6px, -3px); filter: invert(1); clip-path: inset(45% 0 20% 0); }
  45% { transform: translate(-3px, 0); filter: brightness(3); clip-path: inset(0 0 0 0); opacity: .3; }
  60% { transform: translate(5px, 2px); filter: hue-rotate(-90deg) saturate(4); clip-path: inset(30% 0 35% 0); opacity: 1; }
  80% { transform: translate(-2px, -2px); filter: contrast(2); clip-path: inset(0 0 70% 0); }
  100% { transform: translate(0, 0); filter: none; clip-path: inset(0 0 0 0); }
}

.rpg-dialog.is-phase2 .rpg-screen {
  border-color: #ff3df2;
  box-shadow: 0 0 0 3px #000, 0 0 0 6px rgba(255, 61, 242, .55), 0 0 36px rgba(255, 61, 242, .35);
}

.rpg-dialog.is-phase2 .rpg-bar i {
  background: #ff3df2;
}

.rpg-dialog.is-phase2 .rpg-enemy img {
  box-shadow: 0 0 18px rgba(255, 61, 242, .6);
}

.rpg-dialog.is-phase2 .rpg-enemy {
  animation: rpg-jitter 2.4s steps(2) infinite;
}

@keyframes rpg-jitter {
  0%, 92%, 100% { transform: translate(0, 0); }
  94% { transform: translate(-3px, 1px); }
  96% { transform: translate(3px, -1px); }
}

/* true form: show the whole wide picture */
.rpg-dialog.is-phase2 .rpg-enemy img {
  width: min(100%, 320px);
  aspect-ratio: 16 / 9;
}

/* Cat dating sim ---------------------------------------------------------- */
.friend-card.has-cat > .friend-media,
.friend-card.has-cat > .friend-card-body {
  filter: blur(3px) brightness(.7);
  pointer-events: none;
  user-select: none;
}

.friend-card > .friend-media,
.friend-card > .friend-card-body {
  transition: filter .8s ease;
}

/* the cat lying on the card */
.nyan-blocker {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.nyan-cat {
  width: min(62%, 240px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.nyan-cat svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .45));
  transform-origin: 50% 90%;
  animation: nyan-breathe 3.2s ease-in-out infinite;
}

.nyan-cat:hover svg,
.nyan-cat:focus-visible svg {
  filter: drop-shadow(0 0 14px rgba(255, 158, 207, .55)) drop-shadow(0 10px 16px rgba(0, 0, 0, .45));
}

.nyan-cat:focus-visible {
  outline: 2px dashed #ff9ecf;
  outline-offset: 6px;
  border-radius: 14px;
}

.nyan-call {
  position: absolute;
  top: 16%;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  color: #d4567f;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  animation: nyan-bob 2.4s ease-in-out infinite;
}

.nyan-blocker.is-leaving .nyan-cat {
  animation: nyan-leave 1.6s ease-in forwards;
}

.nyan-blocker.is-leaving .nyan-call {
  opacity: 0;
  transition: opacity .3s ease;
}

.calico-eyes-happy,
.calico-eyes-angry,
.calico-blush {
  display: none;
}

.calico.is-happy .calico-eyes-open,
.calico.is-angry .calico-eyes-open {
  display: none;
}

.calico.is-happy .calico-eyes-happy,
.calico.is-happy .calico-blush,
.calico.is-angry .calico-eyes-angry {
  display: inline;
}

.calico-tail {
  transform-origin: 178px 132px;
  animation: nyan-tail 2.4s ease-in-out infinite;
}

/* the date */
.nyan-dialog {
  width: min(520px, calc(100% - 24px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.nyan-dialog::backdrop {
  background: rgba(40, 10, 30, .72);
  backdrop-filter: blur(4px);
}

.nyan-stage {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 22px 20px 20px;
  border: 3px solid #fff;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .55), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(255, 214, 236, .8), transparent 45%),
    linear-gradient(180deg, #ffd6e8 0%, #ffc2dc 55%, #f7a8cb 100%);
  box-shadow: 0 0 0 4px rgba(255, 158, 207, .5), 0 24px 60px rgba(0, 0, 0, .45);
  color: #6b2a45;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
}

.nyan-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 22%, #fff, transparent),
    radial-gradient(2px 2px at 78% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 62% 40%, #fff, transparent),
    radial-gradient(2px 2px at 30% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 58%, #fff, transparent);
  animation: nyan-twinkle 3s ease-in-out infinite;
  pointer-events: none;
}

.nyan-x {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  color: #d4567f;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.nyan-heart-meter {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nyan-heart-meter i {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, .7);
  clip-path: path("M11 20 2 11a5.4 5.4 0 0 1 9-6.6A5.4 5.4 0 0 1 20 11z");
  transition: background .3s ease, transform .3s ease;
}

.nyan-heart-meter i.is-on {
  background: #ff4f8f;
  transform: scale(1.12);
}

.nyan-portrait {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 210px;
}

.nyan-portrait svg {
  width: 250px;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(150, 40, 90, .3));
  transform-origin: 50% 90%;
  animation: nyan-breathe 3.2s ease-in-out infinite;
}

.nyan-portrait.is-good svg { animation: nyan-hop .5s ease 1, nyan-breathe 3.2s ease-in-out .5s infinite; }
.nyan-portrait.is-bad svg { animation: nyan-shake .45s ease 1; }
.nyan-portrait.is-win svg { animation: nyan-hop .5s ease 3; }

.nyan-float {
  position: absolute;
  bottom: 40%;
  color: #ff4f8f;
  font-size: 22px;
  pointer-events: none;
  animation: nyan-float 1.6s ease-out forwards;
}

.nyan-textbox {
  position: relative;
  z-index: 1;
  min-height: 86px;
  padding: 22px 18px 14px;
  border: 3px solid #ff9ecf;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
}

.nyan-name {
  position: absolute;
  top: -15px;
  left: 16px;
  padding: 3px 16px;
  border-radius: 999px;
  background: #ff6fa3;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
}

.nyan-line {
  margin: 0;
  color: #6b2a45;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
}

.nyan-choices {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.nyan-choices button {
  padding: 11px 14px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: rgba(255, 111, 163, .85);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(180, 50, 100, .35);
  transition: transform .15s ease, background .15s ease;
}

.nyan-choices button:hover,
.nyan-choices button:focus-visible {
  background: #ff4f8f;
  transform: translateY(-2px);
  outline: none;
}

.nyan-choices button:disabled {
  opacity: .6;
  transform: none;
  cursor: default;
}

.nyan-stage.is-clear {
  box-shadow: 0 0 0 4px #fff, 0 0 40px rgba(255, 158, 207, .9), 0 24px 60px rgba(0, 0, 0, .45);
}

@keyframes nyan-breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.015, .985); }
}

@keyframes nyan-tail {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-12deg); }
}

@keyframes nyan-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes nyan-leave {
  0% { transform: translate(0, 0); }
  15% { transform: translate(0, -10px) scale(1.04, .96); }
  100% { transform: translate(160%, 6px) rotate(6deg); opacity: .9; }
}

@keyframes nyan-twinkle {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}

@keyframes nyan-hop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  30% { transform: translateY(4px) scale(1.06, .94); }
  60% { transform: translateY(-14px) scale(.97, 1.04); }
}

@keyframes nyan-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-3deg); }
  40% { transform: translateX(7px) rotate(3deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

@keyframes nyan-float {
  from { opacity: 1; transform: translateY(0) scale(.6); }
  to { opacity: 0; transform: translateY(-120px) scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .nyan-cat svg,
  .nyan-portrait svg,
  .calico-tail,
  .nyan-call,
  .nyan-sparkles {
    animation: none !important;
  }
}

/* date partner: real calico photo */
.nyan-portrait {
  height: 230px;
}

.nyan-photo {
  width: 230px;
  height: 230px;
  border: 5px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  object-position: 44% 46%;
  box-shadow: 0 0 0 4px rgba(255, 111, 163, .45), 0 12px 24px rgba(150, 40, 90, .3);
  transform-origin: 50% 90%;
  animation: nyan-breathe 3.2s ease-in-out infinite;
  transition: box-shadow .3s ease, filter .3s ease;
}

.nyan-portrait.is-good .nyan-photo { animation: nyan-hop .5s ease 1, nyan-breathe 3.2s ease-in-out .5s infinite; }
.nyan-portrait.is-bad .nyan-photo { animation: nyan-shake .45s ease 1; filter: saturate(.7) brightness(.92); }
.nyan-portrait.is-win .nyan-photo {
  animation: nyan-hop .5s ease 3;
  box-shadow: 0 0 0 4px #fff, 0 0 30px rgba(255, 79, 143, .8);
}

.nyan-credit {
  position: relative;
  z-index: 1;
  justify-self: end;
  margin-top: -4px;
  color: rgba(107, 42, 69, .6);
  font-size: 10px;
}

/* the cat on the card: big still side-view calico traced from a photo (pattern only, no face) */
.nyan-cat {
  width: min(80%, 390px);
}

.nyan-cat svg,
.nyan-call {
  animation: none;
}

.nyan-cat .walker {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}

.nyan-cat:hover .walker,
.nyan-cat:focus-visible .walker {
  filter: drop-shadow(0 0 10px rgba(255, 158, 207, .7)) drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}

/* after the date it simply fades away */
.nyan-blocker.is-leaving .nyan-cat {
  animation: none;
  opacity: 0;
  transition: opacity .8s ease;
}

/* Cat dating sim v2: top bar, turns, gifts, teaser mini-game, ending banner */
.nyan-topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
}

.nyan-topbar .nyan-x,
.nyan-sound {
  position: static;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  color: #d4567f;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.nyan-paws {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: -4px;
  font-size: 13px;
  font-style: normal;
}

.nyan-paws i {
  font-style: normal;
  filter: saturate(1.4);
  transition: opacity .3s ease, filter .3s ease;
}

.nyan-paws i.is-used {
  opacity: .25;
  filter: grayscale(1);
}

.nyan-banner {
  position: relative;
  z-index: 2;
  justify-self: center;
  margin: -6px 0 2px;
  padding: 6px 22px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6fa3, #ff9ecf);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: 0 6px 18px rgba(180, 50, 100, .35);
  animation: nyan-hop .6s ease 1;
}

.nyan-banner.is-true {
  background: linear-gradient(90deg, #ffb703, #ff6fa3, #b388ff);
}

.nyan-banner.is-lose {
  background: linear-gradient(90deg, #7a4b5c, #a3586f);
}

.nyan-banner.is-neutral,
.nyan-banner.is-friend {
  background: linear-gradient(90deg, #f4a0c0, #c9a7e8);
}

.nyan-gifts {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.nyan-gifts:empty {
  display: none;
}

.nyan-gifts button {
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: rgba(255, 255, 255, .7);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(180, 50, 100, .25);
  transition: transform .15s ease, background .15s ease;
}

.nyan-gifts button:hover:not(:disabled),
.nyan-gifts button:focus-visible {
  transform: translateY(-2px) rotate(-4deg);
  background: #fff;
  outline: none;
}

.nyan-gifts button:disabled {
  cursor: default;
  opacity: .55;
}

.nyan-gifts button.is-used {
  opacity: .2;
  filter: grayscale(1);
}

.nyan-teaser {
  position: relative;
  z-index: 1;
  height: 40px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  overflow: hidden;
}

.nyan-teaser-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(45deg, #ff8fb8 0 8px, #ffa9c9 8px 16px);
}

.nyan-teaser-mark {
  position: absolute;
  top: 50%;
  font-size: 24px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.nyan-teaser.is-hit {
  border-color: #ffd84d;
  box-shadow: 0 0 18px rgba(255, 216, 77, .9);
}

.nyan-teaser.is-miss {
  animation: nyan-shake .35s ease 1;
}

.nyan-portrait.is-surprise .nyan-photo {
  animation: nyan-hop .35s ease 2;
}

/* Cat dating sim: "turn on the music?" screen shown first */
.nyan-intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background: rgba(255, 214, 232, .82);
  backdrop-filter: blur(6px);
  text-align: center;
}

.nyan-intro-q {
  margin: 0;
  color: #6b2a45;
  font-size: 22px;
  font-weight: 700;
}

.nyan-intro-buttons {
  display: grid;
  gap: 10px;
  width: min(280px, 100%);
}

.nyan-intro-buttons button {
  padding: 12px 16px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: #ff6fa3;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(180, 50, 100, .35);
}

.nyan-intro-buttons .nyan-intro-off {
  background: rgba(255, 255, 255, .85);
  color: #d4567f;
}

.nyan-intro-buttons button:hover,
.nyan-intro-buttons button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

/* hidden sentence used to notice when a browser translator rewrites the page */
.nyan-canary {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

/* "?" hint button: "translate this page...?" */
.nyan-topbar {
  grid-template-columns: auto 1fr auto;
}

.nyan-topbar-left {
  display: flex;
  gap: 6px;
}

.nyan-help-btn {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  color: #d4567f;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.nyan-help-btn[aria-expanded="true"] {
  background: #ff6fa3;
  color: #fff;
}

.nyan-help {
  position: relative;
  z-index: 3;
  justify-self: start;
  margin: -4px 0 0;
  padding: 7px 14px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: #fff;
  color: #6b2a45;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(180, 50, 100, .25);
}

/* the card under the cat: blurred so strongly that nothing can be read */
.friend-card.has-cat > .friend-media,
.friend-card.has-cat > .friend-card-body {
  filter: blur(18px) brightness(.55) saturate(.6);
}

.friend-card.has-cat {
  overflow: hidden;
}

/* RPG: defeated enemy flashes, then sinks down and fades out slowly */
.rpg-enemy.is-defeated img {
  opacity: 0;
  filter: none;
  transform: none;
  animation: rpg-defeat 1.8s ease-in forwards;
}

@keyframes rpg-defeat {
  0% { opacity: 1; filter: brightness(1); transform: translateY(0); }
  8% { filter: brightness(3) saturate(0); }
  16% { filter: brightness(1); }
  24% { filter: brightness(3) saturate(0); }
  32% { opacity: 1; filter: brightness(1); transform: translateY(0); }
  100% { opacity: 0; filter: brightness(.6); transform: translateY(40px); }
}

/* RPG: player's HP bar */
.rpg-hp-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rpg-pbar {
  width: 110px;
}

.rpg-pbar i {
  background: #6ee7a0;
  transition: width .35s ease, background .3s ease;
}

.rpg-pbar[data-level="warn"] i { background: #ffd84d; }
.rpg-pbar[data-level="danger"] i { background: #ff5c7a; }

/* RPG: coloured names in the log */
.rpg-c-enemy { color: #ff7fa1; }
.rpg-c-item { color: #6ee7a0; }
.rpg-c-skill { color: #ffd84d; }

/* RPG bar colours: enemy purple (red when almost out), player green/yellow/red, MP blue */
.rpg-enemy-hp .rpg-bar i,
.rpg-dialog.is-phase2 .rpg-enemy-hp .rpg-bar i {
  background: #b388ff;
  transition: width .35s ease, background .3s ease;
}

.rpg-enemy-hp .rpg-bar[data-level="danger"] i,
.rpg-dialog.is-phase2 .rpg-enemy-hp .rpg-bar[data-level="danger"] i {
  background: #ff5c7a;
}

.rpg-dialog.is-phase2 .rpg-pbar i { background: #6ee7a0; }
.rpg-dialog.is-phase2 .rpg-pbar[data-level="warn"] i { background: #ffd84d; }
.rpg-dialog.is-phase2 .rpg-pbar[data-level="danger"] i { background: #ff5c7a; }


/* styled-name code: floating box (replaces the clipped ::after tooltip) */
.friend-styled-name::after,
.friend-styled-name:hover::after,
.friend-styled-name:focus-visible::after {
  content: none;
}

.code-tip {
  position: fixed;
  z-index: 70;
  margin: 0;
  max-width: calc(100vw - 24px);
  padding: 10px 14px;
  border: 1px solid rgba(142, 216, 255, .28);
  border-radius: 8px;
  background: rgba(2, 5, 20, .97);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}

/* Friend card: pachislot machine (self-introduction is paid out on a GOD line-up) */
.slot-dialog {
  width: min(430px, calc(100% - 20px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.slot-dialog::backdrop {
  background: radial-gradient(circle at 50% 40%, rgba(60, 10, 20, .7), rgba(5, 2, 0, .9));
}

.slot-cabinet {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  border-radius: 34px 34px 18px 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .08), transparent 18%, transparent 82%, rgba(255, 255, 255, .08)),
    linear-gradient(180deg, #5a0f1a 0%, #2a060c 55%, #14050a 100%);
  color: #ffe9a8;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  /* chrome frame */
  box-shadow:
    0 0 0 3px #f4f4f4,
    0 0 0 6px #9a9a9a,
    0 0 0 8px #e9e9e9,
    0 0 0 10px #5d5d5d,
    0 30px 70px rgba(0, 0, 0, .7);
}

.slot-x {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 2px solid #e9e9e9;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* crown with chasing bulbs and the GOD lamp */
.slot-crown {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0 -16px;
  padding: 14px 16px 10px;
  border-radius: 34px 34px 0 0;
  background: linear-gradient(180deg, #1a0306, #3b0810);
}

.slot-bulbs {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.slot-bulbs i,
.slot-side i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b4a12;
  animation: slot-chase 1.4s steps(1) infinite;
  animation-delay: calc(var(--i) * -.1s);
}

.slot-logo {
  padding: 6px 30px;
  border: 3px solid #c0c0c0;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f0f0f, #2b2b2b);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .8), 0 0 0 2px #444;
}

.slot-lamp {
  display: block;
  font-family: "Inter", "Arial Black", sans-serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .18em;
  color: #3b2a08;
  text-shadow: none;
  transition: color .2s ease;
}

.slot-lamp.is-on {
  background: linear-gradient(180deg, #fff6c8, #ffd84d 45%, #e0a400 55%, #9a6200);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px #ffd84d) drop-shadow(0 0 22px rgba(255, 216, 77, .7));
  animation: slot-blink .45s steps(2) infinite;
}

/* reel window */
.slot-face {
  display: grid;
  grid-template-columns: 14px 1fr 14px;
  align-items: center;
  gap: 8px;
}

.slot-side {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.slot-window {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: #050505;
  box-shadow: 0 0 0 3px #c0c0c0, 0 0 0 5px #4a4a4a, inset 0 0 0 1px #000;
}

.slot-reel {
  position: relative;
  height: 186px;
  overflow: hidden;
  border-radius: 4px;
  background: #fffaf0;
  box-shadow: inset 0 18px 18px -8px rgba(0, 0, 0, .55), inset 0 -18px 18px -8px rgba(0, 0, 0, .55);
}

.slot-strip {
  will-change: transform;
}

.slot-sym {
  display: grid;
  place-items: center;
  height: 62px;
  padding: 4px 6px;
}

.slot-sym svg {
  width: 100%;
  height: 100%;
}

.slot-line {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 2px;
  background: rgba(214, 40, 57, .8);
  box-shadow: 0 0 6px rgba(255, 60, 80, .9);
  pointer-events: none;
}

.slot-glass {
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: linear-gradient(115deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .06) 22%, transparent 23%, transparent 60%, rgba(255, 255, 255, .08) 61%, transparent 75%);
  pointer-events: none;
}

/* LED panel */
.slot-led {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #060202;
  box-shadow: inset 0 0 0 1px #2a0a0a, 0 0 0 2px #3a3a3a;
}

.slot-led > div {
  display: grid;
  justify-items: center;
}

.slot-led small {
  color: #a77;
  font-size: 9px;
  letter-spacing: .14em;
}

.slot-led b {
  min-width: 3.2ch;
  color: #ff3b3b;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 400;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 40, 40, .9);
}

.slot-msg {
  min-height: 1.4em;
  margin: 0;
  color: #ffd84d;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 200, 60, .6);
}

/* control deck: lever, MAX BET, stop buttons */
.slot-deck {
  display: grid;
  grid-template-columns: 62px auto 1fr;
  align-items: end;
  gap: 10px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2b2b2b, #0f0f0f);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 6px 0 #050505;
}

.slot-lever-wrap {
  position: relative;
  height: 74px;
}

.slot-lever {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54px;
  height: 74px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
}

/* pivot base */
.slot-lever::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 14px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #e9e9e9, #7a7a7a);
  transform: translateX(-50%);
  box-shadow: 0 2px 0 #333;
}

.slot-lever-stick {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 8px;
  height: 46px;
  margin-left: -4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8a8a8a, #fff 45%, #9a9a9a);
  transform-origin: 50% 100%;
  transform: rotate(-14deg);
  transition: transform .12s ease;
}

.slot-lever-ball {
  position: absolute;
  left: 50%;
  bottom: 48px;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, #d62839 45%, #5a0010);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .6);
  transform-origin: 50% 270%;
  transform: translateX(-11px) rotate(-14deg);
  transition: transform .12s ease;
}

.slot-lever.is-pulled .slot-lever-stick {
  animation: slot-lever-stick .38s ease;
}

.slot-lever.is-pulled .slot-lever-ball {
  animation: slot-lever-ball .38s ease;
}

.slot-lever:focus-visible {
  outline: 2px dashed #ffd84d;
  outline-offset: 2px;
  border-radius: 8px;
}

.slot-bet {
  align-self: center;
  width: 54px;
  height: 40px;
  border: 2px solid #9a9a9a;
  border-radius: 6px;
  background: linear-gradient(180deg, #3a3a3a, #161616);
  color: #8a8a8a;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  pointer-events: none;
}

.slot-bet.is-lit {
  background: linear-gradient(180deg, #ffe37a, #e0a400);
  color: #3b1d00;
  box-shadow: 0 0 12px rgba(255, 216, 77, .8);
}

.slot-stops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
}

.slot-stop {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* chrome bezel */
  background: linear-gradient(180deg, #ffffff, #7a7a7a);
  box-shadow: 0 4px 0 #222, 0 6px 8px rgba(0, 0, 0, .5);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .06s ease;
}

.slot-stop span {
  display: grid;
  place-items: center;
  width: 78%;
  height: 78%;
  margin: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #ff9b9b, #e01b2e 50%, #7a0010);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .45), 0 0 14px rgba(255, 60, 80, .8);
}

.slot-stop:disabled {
  cursor: default;
}

.slot-stop:disabled span {
  background: radial-gradient(circle at 40% 30%, #6b6b6b, #3a3a3a 55%, #1a1a1a);
  color: #888;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .45);
}

.slot-stop:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #222, 0 2px 4px rgba(0, 0, 0, .5);
}

.slot-borrow {
  justify-self: center;
  padding: 6px 16px;
  border: 1px solid #ffd84d;
  border-radius: 999px;
  background: rgba(255, 216, 77, .12);
  color: #ffd84d;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* medal tray where the self-introduction ticket comes out */
.slot-tray {
  position: relative;
  height: 34px;
  margin: 0 18px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #d9d9d9, #8a8a8a 60%, #5a5a5a);
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, .6);
}

.slot-ticket {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  width: min(300px, 86%);
  padding: 12px 14px 14px;
  background: #fffdf6;
  color: #2a1a10;
  text-align: center;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
  /* torn-ticket edges */
  -webkit-mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 14px 100%;
  mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 14px 100%;
  transform: translate(-50%, 110%);
  opacity: 0;
}

.slot-ticket.is-out {
  animation: slot-ticket 1.1s cubic-bezier(.2, .9, .3, 1.1) forwards;
}

.slot-ticket-head {
  display: block;
  margin-bottom: 6px;
  color: #c98a00;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2em;
}

.slot-ticket-text {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.slot-cabinet.is-god {
  animation: slot-god-flash .22s steps(2) 8;
}

.slot-cabinet.is-god .slot-bulbs i,
.slot-cabinet.is-god .slot-side i {
  animation-duration: .4s;
}

@keyframes slot-chase {
  0%, 60% { background: #6b4a12; box-shadow: none; }
  61%, 100% { background: #ffd84d; box-shadow: 0 0 8px #ffd84d; }
}

@keyframes slot-blink {
  50% { filter: drop-shadow(0 0 4px #ffd84d) brightness(1.5); }
}

@keyframes slot-god-flash {
  50% { filter: brightness(1.6) saturate(1.3); }
}

@keyframes slot-lever-stick {
  0% { transform: rotate(-14deg) scaleY(1); }
  45% { transform: rotate(-6deg) scaleY(.55); }
  100% { transform: rotate(-14deg) scaleY(1); }
}

@keyframes slot-lever-ball {
  0% { transform: translateX(-11px) rotate(-14deg) translateY(0); }
  45% { transform: translateX(-4px) rotate(-6deg) translateY(21px); }
  100% { transform: translateX(-11px) rotate(-14deg) translateY(0); }
}

@keyframes slot-ticket {
  0% { opacity: 1; transform: translate(-50%, 110%); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .slot-bulbs i,
  .slot-side i,
  .slot-lamp.is-on,
  .slot-cabinet.is-god {
    animation: none;
  }
}

.slot-ticket-text {
  color: #2a1a10;
}

.slot-lever:focus-visible {
  outline: none;
}

.slot-lever:focus-visible .slot-lever-ball {
  box-shadow: 0 0 0 3px rgba(255, 216, 77, .8), 0 3px 6px rgba(0, 0, 0, .6);
}

/* lever: the red ball sits on the tip of the stick and tilts with it */
.slot-lever-stick {
  height: 44px;
  transform: rotate(-14deg);
}

.slot-lever .slot-lever-ball {
  position: absolute;
  left: 50%;
  top: -20px;
  bottom: auto;
  margin-left: -13px;
  transform: none;
  transform-origin: center;
}

.slot-lever.is-pulled .slot-lever-ball {
  animation: none;
}

.slot-lever.is-pulled .slot-lever-stick {
  animation: slot-lever-pull .4s ease;
}

@keyframes slot-lever-pull {
  0% { transform: rotate(-14deg); }
  40% { transform: rotate(38deg); }
  100% { transform: rotate(-14deg); }
}

/* LED message in the middle of the panel looks like a dot-matrix display */
.slot-msg {
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .12em;
}

/* paylines: top / centre / bottom, lit when bet on */
.slot-line {
  opacity: .12;
  transition: opacity .2s ease;
}

.slot-line[data-row="-1"] { top: calc(8px + 31px); }
.slot-line[data-row="0"] { top: calc(8px + 93px); }
.slot-line[data-row="1"] { top: calc(8px + 155px); }

.slot-line.is-active {
  opacity: 1;
}

.slot-side-l {
  gap: 0;
  height: 186px;
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
}

.slot-side-l b {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3a1a06;
  color: #7a5a2a;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 900;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.slot-side-l b.is-active {
  background: #ff3b3b;
  color: #fff;
  box-shadow: 0 0 8px #ff3b3b;
}

.slot-face {
  grid-template-columns: 16px 1fr 14px;
}

.slot-bet {
  pointer-events: auto;
  cursor: pointer;
  color: #ffe9a8;
}

.slot-bet:hover:not(.is-lit) {
  border-color: #ffd84d;
}

/* STORY 01 label removed: the year heading has no top row */
.story-head {
  grid-template-areas: "year copy";
}

@media (max-width: 760px) {
  .story-head {
    grid-template-areas:
      "year"
      "copy";
  }
}

/* header: the signature's little character replaces the site name */
.brand > span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: block;
  width: auto;
  height: 40px;
  filter: drop-shadow(0 0 6px rgba(142, 216, 255, .35));
}

/* admin: passkeys */
.admin-passkey-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.admin-passkey-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-passkey-list li::before {
  content: none;
}

.admin-passkey-list small {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}

.admin-passkey-list button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.admin-passkey-add {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.admin-passkey-add label {
  flex: 1 1 220px;
}

.admin-password-login {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-credit {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.footer-credit a {
  color: inherit;
}

/* ticker showing announcements */
.ticker.is-news span {
  letter-spacing: .06em;
}

.ticker.is-news span::before {
  content: "NEWS";
  margin-right: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #2f8fff;
  color: #fff;
  font-size: 10px;
  letter-spacing: .12em;
}

.ticker.is-news span::after {
  content: "";
  margin-left: 0;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-check input {
  width: auto;
}

/* slot: sound prompt + toggle */
.slot-sound {
  position: absolute;
  top: -14px;
  left: -14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 2px solid #e9e9e9;
  border-radius: 50%;
  background: #1a1a1a;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.slot-ask {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  border-radius: 34px 34px 18px 18px;
  background: rgba(10, 2, 4, .86);
  backdrop-filter: blur(4px);
  text-align: center;
}

.slot-ask p {
  margin: 0;
  color: #ffe9a8;
  font-size: 20px;
  font-weight: 800;
}

.slot-ask div {
  display: grid;
  gap: 10px;
  width: 220px;
}

.slot-ask button {
  padding: 12px;
  border: 2px solid #5a3a10;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe37a, #e0a400);
  color: #3b1d00;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #6b3d00;
}

.slot-ask button[data-sound="0"] {
  background: linear-gradient(180deg, #4a4a4a, #222);
  color: #fff;
  box-shadow: 0 4px 0 #111;
}

/* Ayumu's running button stays under the fixed header */
.friend-readmore.is-running {
  z-index: 15;
}

/* Phones: the later two-column .split rule must not win over the one-column layout */
@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  /* slide in from below only, so nothing sticks out sideways (no horizontal scroll) */
  .split .reveal:nth-child(2):not(.is-visible),
  .home-columns .reveal:nth-child(2):not(.is-visible),
  .digest-grid .reveal:nth-child(2n):not(.is-visible) {
    transform: translate3d(0, 44px, 0);
  }

  .split .reveal:nth-child(2).is-visible,
  .home-columns .reveal:nth-child(2).is-visible,
  .digest-grid .reveal:nth-child(2n).is-visible {
    transform: none;
  }
}

/* X / VRChat / Discord: in the header on PC, inside the Menu on phones */
.nav-icons {
  display: none;
}

@media (max-width: 860px) {
  .header-icons {
    display: none;
  }

  .nav-toggle {
    margin-left: auto;
  }

  .site-nav .nav-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(247, 251, 255, .12);
  }

  .site-nav .nav-icons a {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    background: rgba(247, 251, 255, .06);
    color: inherit;
  }

  .site-nav .nav-icons a::before {
    content: none;
  }

  .site-nav .nav-icons a:hover,
  .site-nav .nav-icons a:focus-visible {
    background: rgba(247, 251, 255, .14);
  }
}

/* Phones: the open menu is solid (the scrolled-header style made it see-through) */
@media (max-width: 860px) {
  .site-nav,
  body.is-scrolled .site-nav {
    background:
      radial-gradient(circle at 100% 0%, rgba(142, 216, 255, .16), transparent 12rem),
      #050a1a;
    border-color: rgba(247, 251, 255, .18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  }
}

/* Labels under the X / VRChat / Discord icons: only inside the phone menu */
.icon-label {
  display: none;
}

/* Hamburger bars on the Menu button (turn into an X while the menu is open) */
.nav-toggle-bars {
  display: none;
}

@media (max-width: 860px) {
  .nav-toggle {
    gap: 10px;
    align-items: center;
    padding-inline: 14px 16px;
    border: 1px solid rgba(142, 216, 255, .35);
    background: linear-gradient(135deg, rgba(142, 216, 255, .16), rgba(167, 139, 250, .14));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 6px 18px rgba(0, 0, 0, .28);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
  }

  .nav-toggle[aria-expanded="true"] {
    border-color: rgba(247, 251, 255, .7);
    background: rgba(247, 251, 255, .14);
    box-shadow: 0 0 18px rgba(142, 216, 255, .35);
  }

  .nav-toggle-bars {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 12px;
  }

  .nav-toggle-bars i {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .25s ease, opacity .2s ease, top .25s ease;
  }

  .nav-toggle-bars i:nth-child(1) { top: 0; }
  .nav-toggle-bars i:nth-child(2) { top: 5px; }
  .nav-toggle-bars i:nth-child(3) { top: 10px; }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { top: 5px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

  /* SNS buttons in the menu: three labelled tiles */
  .site-nav .nav-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .site-nav .nav-icons a {
    display: grid;
    place-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: auto;
    text-transform: none;
    padding: 12px 4px 10px;
    border: 1px solid rgba(247, 251, 255, .16);
    border-radius: 14px;
    background: rgba(247, 251, 255, .07);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
  }

  .site-nav .nav-icons a img {
    width: 22px;
    height: 22px;
    object-fit: contain;
  }

  .site-nav .nav-icons .icon-link-vr img {
    width: 28px;
  }

  .site-nav .nav-icons .icon-label {
    display: block;
    color: rgba(247, 251, 255, .82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
  }

  .site-nav .nav-icons a:hover,
  .site-nav .nav-icons a:focus-visible,
  .site-nav .nav-icons a:active {
    border-color: rgba(142, 216, 255, .7);
    background: rgba(142, 216, 255, .14);
    transform: translateY(-1px);
  }

  .site-nav .nav-icons .icon-link-discord:hover,
  .site-nav .nav-icons .icon-link-discord:focus-visible,
  .site-nav .nav-icons .icon-link-discord:active {
    border-color: rgba(88, 101, 242, .9);
    background: rgba(88, 101, 242, .22);
  }
}

/* Phones: avatar picker = one swipeable row of names, the card right below it */
@media (max-width: 860px) {
  .avatar-selector {
    gap: 14px;
  }

  .avatar-tabs {
    position: relative;
    display: flex;
    gap: 8px;
    margin-inline: -4px;
    padding: 4px 28px 6px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }

  .avatar-tabs::-webkit-scrollbar {
    display: none;
  }

  .avatar-tab {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 16px;
    border-radius: 0;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .avatar-tab strong {
    font-size: 15px;
  }

  .avatar-tab small {
    display: none;
  }

  .avatar-tab:hover,
  .avatar-tab.is-active {
    transform: none;
  }

  .avatar-tab.is-active {
    border-color: rgba(142, 216, 255, .75);
    background: rgba(142, 216, 255, .16);
    color: var(--white);
  }

  .avatar-card {
    gap: 16px;
    padding: 14px;
    border-radius: 0;
  }

  .avatar-card img {
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: 62vh;
    object-position: 50% 15%;
    border-radius: 0;
  }

  .avatar-card h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .avatar-card .profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
    margin-top: 12px;
  }

  .avatar-card .profile-list div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 0;
  }

  /* Booth: a full-width button under Creator / Credit */
  .avatar-card .profile-list div:last-child {
    grid-column: 1 / -1;
    padding-top: 14px;
    border-bottom: 0;
  }

  .avatar-card .profile-list div:last-child dt {
    display: none;
  }

  .avatar-card .profile-list div:last-child a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid rgba(142, 216, 255, .45);
    border-radius: 0;
    background: rgba(142, 216, 255, .1);
    color: var(--white);
    font-weight: 800;
    text-decoration: none;
  }

  .avatar-card .profile-list div:last-child a::after {
    content: "↗";
    margin-left: 8px;
    color: var(--sky);
  }
}

/* Event one-line description: shown in the detail dialog only (it wrapped in the list on phones) */
.event-dialog h3:has(+ .event-dialog-note) {
  margin-bottom: 8px;
}

.event-dialog-note {
  margin: 0 0 20px;
  color: #b9e6ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
}

.event-dialog[data-theme="moon"] .event-dialog-note {
  color: #c9b8ff;
}

.event-dialog[data-theme="cafe"] .event-dialog-note {
  color: #4f7d3a;
}

/* Phones: the event's one-line description stays out of the list (it wrapped); PC keeps it */
@media (max-width: 860px) {
  .event-body .event-note {
    display: none;
  }
}

/* ===== Hidden quiz + secret look ===================================== */

/* signature pulses while it is being tapped (phones: 10 taps open the quiz) */
.hero-signature.is-tapped {
  animation: secret-tap .35s ease;
}

@keyframes secret-tap {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 216, 142, 0)); }
  40% { transform: scale(1.04); filter: drop-shadow(0 0 18px rgba(255, 216, 142, .8)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 216, 142, 0)); }
}

/* quiz dialog */
.secret-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  overflow: visible;
}

.secret-dialog::backdrop {
  background: radial-gradient(circle at 50% 40%, rgba(60, 30, 90, .55), rgba(2, 4, 14, .85));
  backdrop-filter: blur(4px);
}

.secret-quiz {
  position: relative;
  padding: 30px 26px 26px;
  border: 1px solid rgba(255, 216, 142, .45);
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 154, 213, .22), transparent 16rem),
    radial-gradient(circle at 0% 100%, rgba(255, 216, 142, .18), transparent 18rem),
    linear-gradient(160deg, #120b2c, #070b1f);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 216, 142, .14);
  animation: secret-pop .45s cubic-bezier(.2, .8, .2, 1);
}

@keyframes secret-pop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.secret-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
}

.secret-kicker {
  margin: 0 0 14px;
  color: #ffd88e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
}

.secret-body.is-in {
  animation: secret-in .4s ease;
}

.secret-body.is-shake {
  animation: secret-shake .4s ease;
}

@keyframes secret-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes secret-shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.secret-dialog .secret-big {
  margin: 0 0 10px;
  font-size: clamp(28px, 7vw, 40px);
  background: linear-gradient(90deg, #ffd88e, #ff9ad5, #b9a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.secret-dialog .secret-text {
  margin: 0 0 20px;
  color: rgba(247, 251, 255, .85);
  line-height: 1.8;
}

.secret-count {
  margin: 0 0 6px;
  color: #ff9ad5;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
}

.secret-dialog .secret-q {
  margin: 0 0 18px;
  font-size: clamp(19px, 5vw, 24px);
  line-height: 1.5;
}

.secret-choices {
  display: grid;
  gap: 10px;
}

.secret-choice,
.secret-submit,
.secret-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 216, 142, .5);
  background: rgba(255, 216, 142, .08);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.secret-choice:hover,
.secret-choice:focus-visible,
.secret-submit:hover,
.secret-go:hover,
.secret-go:focus-visible {
  border-color: #ffd88e;
  background: rgba(255, 216, 142, .2);
  transform: translateY(-1px);
}

.secret-choice:disabled,
.secret-submit:disabled {
  opacity: .6;
  cursor: default;
  transform: none;
}

.secret-go {
  width: 100%;
  background: linear-gradient(90deg, rgba(255, 216, 142, .28), rgba(255, 154, 213, .28));
}

.secret-row {
  display: flex;
  gap: 8px;
}

.secret-input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  font: inherit;
  font-size: 16px;
}

.secret-input:focus {
  outline: none;
  border-color: #ffd88e;
}

.secret-feedback {
  min-height: 1.6em;
  margin: 14px 0 0;
  font-weight: 800;
}

.secret-feedback.is-right { color: #9cf0b0; }
.secret-feedback.is-wrong { color: #ff9a9a; }

/* ---- the whole site after unlocking: gold & pink night with shooting stars ---- */
body.is-secret {
  --sky: #ffd88e;
  --violet: #ff9ad5;
  --blue: #ffc46b;
  --blue-strong: #ffb347;
  --line: rgba(255, 216, 142, .22);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 154, 213, .20), transparent 26rem),
    radial-gradient(circle at 85% 20%, rgba(255, 216, 142, .16), transparent 26rem),
    linear-gradient(180deg, #0f0726 0%, #150a33 40%, #05030d 100%);
}

body.is-secret .stars,
body.is-secret .stars::before,
body.is-secret .stars::after {
  background-image:
    radial-gradient(circle, rgba(255, 240, 200, .95) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 154, 213, .6) 0 1px, transparent 1.3px);
  opacity: .5;
}

/* shooting stars */
body.is-secret::after {
  content: "";
  position: fixed;
  top: -10vh;
  left: 70vw;
  z-index: 0;
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 240, 200, 0), rgba(255, 240, 200, .95));
  border-radius: 2px;
  filter: drop-shadow(0 0 6px rgba(255, 216, 142, .9));
  transform: rotate(-35deg);
  pointer-events: none;
  animation: secret-shoot 7s linear infinite;
}

@keyframes secret-shoot {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-35deg); }
  3% { opacity: 1; }
  14% { opacity: 0; transform: translate3d(-60vw, 45vh, 0) rotate(-35deg); }
  100% { opacity: 0; transform: translate3d(-60vw, 45vh, 0) rotate(-35deg); }
}

body.is-secret .scroll-progress {
  background: linear-gradient(90deg, #ffd88e, #ff9ad5, #fff);
}

body.is-secret .site-header {
  border-bottom-color: rgba(255, 216, 142, .3);
}

/* the moment it unlocks */
body.is-secret-flash::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 45%, rgba(255, 240, 200, .9), rgba(255, 154, 213, .35) 40%, transparent 70%);
  pointer-events: none;
  animation: secret-flash 1.6s ease forwards;
}

@keyframes secret-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ★ Secret in the menu */
.site-nav .nav-secret span {
  color: #ffd88e;
}

.site-nav .nav-secret:not(.is-active) {
  color: #ffe2a8;
}

/* ---- secret page ---- */
.secret-room {
  display: grid;
  gap: clamp(32px, 6vw, 56px);
}

.secret-message {
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(255, 216, 142, .35);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 154, 213, .16), transparent 18rem),
    rgba(10, 6, 28, .7);
}

.secret-message p:not(.eyebrow) {
  margin: 10px 0 0;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 2;
}

.secret-sign {
  display: block;
  margin-top: 18px;
  color: #ffd88e;
  font-weight: 800;
  text-align: right;
}

.secret-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.secret-photos figure {
  margin: 0;
}

.secret-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 216, 142, .25);
}

.secret-photos figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.secret-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.secret-link {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 216, 142, .4);
  background: rgba(255, 216, 142, .07);
  color: var(--white);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.secret-link strong::after {
  content: " ↗";
  color: #ffd88e;
}

.secret-link span {
  color: var(--muted);
  font-size: 13px;
}

.secret-link:hover,
.secret-link:focus-visible {
  border-color: #ffd88e;
  background: rgba(255, 216, 142, .16);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  body.is-secret::after { animation: none; opacity: 0; }
  .secret-quiz, .secret-body.is-in, .secret-body.is-shake, .hero-signature.is-tapped { animation: none; }
}

/* ---- quiz answer widgets: image / palette / date / slider / map ---- */
.secret-quiz {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}

.secret-q-image {
  display: block;
  width: min(220px, 60%);
  margin: 4px auto 12px;
  border-radius: 12px;
  background: #fff8ec;
  padding: 8px;
}

.secret-palette {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}

.secret-palette button {
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-radius: 3px;
  padding: 0;
  cursor: pointer;
}

.secret-palette button.is-on {
  outline: 3px solid #fff;
  outline-offset: 1px;
  box-shadow: 0 0 0 5px rgba(255, 216, 142, .8);
  position: relative;
  z-index: 1;
}

.secret-palette-row,
.secret-slider-row,
.secret-map-row {
  margin-top: 12px;
  justify-content: flex-end;
  align-items: center;
}

.secret-swatch {
  flex: 1;
  height: 40px;
  border: 1px dashed rgba(255, 255, 255, .3);
}

.secret-date .secret-select {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: #120b2c;
  color: var(--white);
  font: inherit;
  font-size: 16px;
}

.secret-decide:disabled {
  opacity: .45;
}

.secret-slider {
  display: grid;
  gap: 10px;
  padding: 14px 4px 4px;
}

.secret-slider-value {
  color: #ffd88e;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.secret-range {
  width: 100%;
  accent-color: #ff9ad5;
  height: 28px;
}

.secret-map-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.secret-map-regions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 216, 142, .4);
  background: rgba(255, 216, 142, .08);
  color: var(--white);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.secret-map-wrap {
  position: relative;
  height: min(52dvh, 420px);
  border: 1px solid rgba(255, 255, 255, .15);
  background: #0d2240;
  overflow: hidden;
}

.secret-map {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.secret-map .jp-pref {
  fill: #cfe3c4;
  stroke: #3d6b2c;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .15s ease;
}

.secret-map .jp-pref:hover {
  fill: #e8f3e1;
}

.secret-map .jp-pref.is-picked {
  fill: #ff9ad5;
}

.secret-map .jp-inset {
  fill: rgba(255, 255, 255, .04);
  stroke: rgba(255, 255, 255, .45);
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}

.secret-map .jp-inset.is-picked {
  fill: rgba(255, 154, 213, .18);
}

.secret-map-loading {
  margin: 0;
  padding: 20px;
  text-align: center;
}

.secret-map-picked {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: #ffd88e;
  font-weight: 800;
}

@media (max-width: 560px) {
  /* phones: region buttons in one swipeable row, map a bit shorter so "Answer" stays on screen */
  .secret-map-regions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -4px;
    padding: 0 4px 2px;
  }

  .secret-map-regions::-webkit-scrollbar {
    display: none;
  }

  .secret-map-regions button {
    flex: 0 0 auto;
  }

  .secret-map-wrap {
    height: min(46dvh, 380px);
  }

  .secret-quiz {
    padding: 24px 16px 18px;
  }
}

/* quiz choices with pictures (avatars etc.): tiles */
.secret-choices.has-images {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.secret-choices.has-images .secret-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 6px;
  min-height: 0;
  padding: 8px 8px 10px;
  text-align: center;
}

.secret-choices.has-images .secret-choice img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 20%;
  background: rgba(255, 255, 255, .06);
}

@media (max-width: 560px) {
  .secret-choices.has-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.secret-choices.has-images .secret-choice img.is-logo,
.secret-choice-emoji {
  object-fit: contain;
  padding: 22%;
  background: rgba(255, 255, 255, .06);
}

.secret-choice-emoji {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  font-size: 40px;
  line-height: 1;
}

/* ===== Roseliar: beer server ===================================== */
.friend-card.has-beer {
  overflow: hidden;
}

.friend-card.has-beer > .friend-media,
.friend-card.has-beer > .friend-card-body {
  filter: blur(5px) sepia(.6) saturate(1.4);
  pointer-events: none;
  user-select: none;
}

.friend-card > .friend-media,
.friend-card > .friend-card-body {
  transition: filter 2.6s ease;
}

/* the card is under beer: amber liquid with rising bubbles and a foam head */
.beer-blocker {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
}

.beer-open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.beer-flood {
  position: absolute;
  inset: 0;
  transition: transform 3.4s cubic-bezier(.55, 0, .45, 1);
}

.beer-flood-liquid {
  position: absolute;
  inset: 21% 0 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 214, 102, .9), rgba(242, 168, 35, .9) 45%, rgba(176, 98, 8, .94));
  box-shadow: inset 0 10px 18px rgba(255, 240, 190, .35);
}

.beer-flood-liquid i {
  position: absolute;
  bottom: -10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 250, 225, .65);
  animation: beer-flood-bubble 4s linear infinite;
}

.beer-flood-liquid i:nth-child(1) { left: 8%; animation-delay: 0s; }
.beer-flood-liquid i:nth-child(2) { left: 21%; width: 5px; height: 5px; animation-delay: 1.4s; animation-duration: 3.2s; }
.beer-flood-liquid i:nth-child(3) { left: 34%; animation-delay: .7s; animation-duration: 4.6s; }
.beer-flood-liquid i:nth-child(4) { left: 47%; width: 4px; height: 4px; animation-delay: 2.2s; }
.beer-flood-liquid i:nth-child(5) { left: 59%; animation-delay: 3s; animation-duration: 3.6s; }
.beer-flood-liquid i:nth-child(6) { left: 71%; width: 5px; height: 5px; animation-delay: .3s; }
.beer-flood-liquid i:nth-child(7) { left: 83%; animation-delay: 1.9s; animation-duration: 5s; }
.beer-flood-liquid i:nth-child(8) { left: 93%; width: 4px; height: 4px; animation-delay: 2.7s; }

@keyframes beer-flood-bubble {
  from { transform: translateY(0); opacity: .9; }
  to { transform: translateY(-260px); opacity: 0; }
}

.beer-flood-foam {
  position: absolute;
  top: 9%;
  left: -4%;
  right: -4%;
  height: calc(12% + 1px);
  background: linear-gradient(180deg, #fffdf8, #efe2c4);
  animation: beer-flood-sway 5s ease-in-out infinite;
}

/* bumpy foam top (a little gap is left above it); the line to the beer stays straight */
.beer-flood-foam::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 22px;
  margin-bottom: -1px;
  background:
    radial-gradient(circle at 50% 100%, #fffdf8 0 15px, transparent 16px) 0 100% / 37px 22px repeat-x,
    radial-gradient(circle at 50% 100%, #fffdf8 0 9px, transparent 10px) 15px 100% / 29px 22px repeat-x,
    radial-gradient(circle at 50% 100%, #fffdf8 0 19px, transparent 20px) 6px 100% / 61px 22px repeat-x;
}

/* foam / beer line: almost straight, with small irregular bumps (a 140px tile so it doesn't look repeated) */
.beer-flood-foam::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  margin-top: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='8' viewBox='0 0 140 8'%3E%3Cpath fill='%23efe2c4' d='M0 0H140V3C133 5 129 2 123 3.6C116 5.6 111 2.6 104 4C98 5.2 94 1.8 87 3.2C79 5 75 6.2 68 4.4C62 2.8 58 2 51 3.8C44 5.6 40 4.6 34 3.2C28 2 24 5.2 17 4.8C11 4.4 7 2.2 3 2.8C1.5 3 0.8 3.1 0 3Z'/%3E%3C/svg%3E") 0 0 / 140px 8px repeat-x;
}

@keyframes beer-flood-sway {
  50% { transform: translateX(2%); }
}

.beer-open:hover .beer-flood-liquid,
.beer-open:focus-visible .beer-flood-liquid {
  filter: brightness(1.08);
}

.beer-open:focus-visible {
  outline: 3px solid #ffd981;
  outline-offset: -3px;
}

/* cleared: the beer slowly drains out of the card */
.beer-blocker.is-draining .beer-flood {
  transform: translateY(105%);
}

.beer-blocker.is-draining {
  pointer-events: none;
}

.beer-dialog {
  width: min(480px, calc(100% - 20px));
  max-width: none;
  max-height: calc(100dvh - 20px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.beer-dialog::backdrop {
  background: radial-gradient(circle at 50% 35%, rgba(40, 44, 50, .7), rgba(4, 5, 7, .92));
  backdrop-filter: blur(3px);
}

.beer-stage {
  position: relative;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 214, 140, .45);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 210, 120, .14), transparent 60%),
    linear-gradient(180deg, #23272d, #121417);
  color: #fff3d6;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 230, 180, .25);
  animation: secret-pop .4s cubic-bezier(.2, .8, .2, 1);
}

.beer-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 243, 214, .35);
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
  color: #fff3d6;
  font-size: 18px;
  cursor: pointer;
}

.beer-head {
  text-align: center;
}

.beer-title {
  margin: 0;
  color: #ffd981;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 22px;
  letter-spacing: .28em;
  text-shadow: 0 0 10px rgba(255, 190, 80, .8), 0 0 22px rgba(255, 140, 30, .45);
}

.beer-sub {
  margin: 2px 0 0;
  color: rgba(255, 243, 214, .7);
  font-size: 11px;
  letter-spacing: .2em;
}

/* order slip (伝票) pinned under the title */
.beer-slip {
  position: relative;
  width: min(250px, 80%);
  margin: 10px auto 12px;
  padding: 10px 14px 9px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(180deg, transparent 0 21px, rgba(60, 90, 160, .14) 21px 22px),
    #fbf8ef;
  color: #2a2a2a;
  font-family: "Zen Maru Gothic", sans-serif;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45);
  transform: rotate(-1.5deg);
}

.beer-slip::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 46px;
  height: 14px;
  margin-left: -23px;
  background: rgba(255, 238, 180, .7);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  transform: rotate(2deg);
}

.beer-slip p {
  margin: 0;
  color: #2a2a2a;
}

.beer-slip .beer-slip-title {
  color: #c0392b;
}

.beer-slip-title {
  padding-bottom: 4px;
  border-bottom: 2px solid #c0392b;
  color: #c0392b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .4em;
  text-align: center;
}

.beer-slip-meta {
  display: flex;
  justify-content: space-between;
  padding: 5px 2px 3px;
  border-bottom: 1px dashed #b9b2a0;
  font-size: 11px;
  font-weight: 700;
}

.beer-slip-meta b {
  font-size: 14px;
}

.beer-slip-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 2px 0;
  font-size: 14px;
  font-weight: 900;
}

/* the example pour shown first */
.beer-scene {
  position: relative;
}

.beer-sample {
  position: absolute;
  left: 50%;
  bottom: 30%;
  z-index: 1;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
  animation: beer-sample 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes beer-sample {
  50% { transform: translateX(-50%) scale(1.08); }
}

.beer-stage:not(.is-example) .beer-sample {
  display: none;
}

.beer-scene {
  padding: 0;
}

.beer-svg {
  display: block;
  width: 100%;
  height: auto;
}

.beer-svg .bz-handle {
  transition: transform .18s ease;
}

.beer-svg .bz-stream {
  fill: #f6b33a;
  opacity: .92;
}

.beer-svg .bz-stream.is-foam {
  fill: #fffaf0;
}

.beer-svg .bz-stream.is-beer {
  animation: bz-flow .25s linear infinite;
}

@keyframes bz-flow {
  50% { opacity: .78; }
}

.beer-svg .bz-bubble {
  animation: bz-rise 2.2s linear infinite;
}

@keyframes bz-rise {
  from { transform: translateY(0); opacity: .95; }
  to { transform: translateY(-92px); opacity: 0; }
}

.beer-svg .bz-mark {
  stroke: rgba(255, 243, 214, .55);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.beer-stage.is-spill .beer-scene {
  animation: secret-shake .4s ease;
}

.beer-stage.is-win .beer-svg {
  filter: drop-shadow(0 0 18px rgba(255, 207, 85, .75));
}

.beer-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.beer-hold {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon name" "icon hint";
  align-items: center;
  column-gap: 10px;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 214, 140, .6);
  border-radius: 14px;
  background: linear-gradient(180deg, #f6c860, #c9861c);
  color: #2e1906;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 0 #7a4b0c, 0 10px 18px rgba(0, 0, 0, .4);
  transition: transform .08s ease, box-shadow .08s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.beer-hold[data-pour="foam"] {
  background: linear-gradient(180deg, #fffaf0, #e3d4b2);
  box-shadow: 0 5px 0 #9a8a66, 0 10px 18px rgba(0, 0, 0, .4);
}

.beer-hold-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .18);
  font-size: 18px;
  font-weight: 900;
}

.beer-hold b {
  grid-area: name;
  font-size: 18px;
}

.beer-hold small {
  grid-area: hint;
  font-size: 11px;
  opacity: .8;
}

.beer-hold.is-on {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #7a4b0c, 0 4px 10px rgba(0, 0, 0, .4);
}

.beer-hold[data-pour="foam"].is-on {
  box-shadow: 0 1px 0 #9a8a66, 0 4px 10px rgba(0, 0, 0, .4);
}

.beer-keys {
  margin: 8px 0 0;
  color: rgba(255, 243, 214, .5);
  font-size: 11px;
  text-align: center;
}

/* comments: the customer at table 7 talks from the right (round face + comic speech bubble) */
.beer-talk {
  position: absolute;
  top: 26%;
  right: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 12px);
  pointer-events: none;
}

.beer-talk[hidden] {
  display: none;
}

.beer-talker {
  display: grid;
  justify-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.beer-talker-face {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #f2a823 center / cover no-repeat;
  font-size: 28px;
  box-shadow: 0 0 0 2px #1b1b1b, 0 6px 14px rgba(0, 0, 0, .5);
}

.beer-talker small {
  padding: 1px 8px;
  border: 2px solid #1b1b1b;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.beer-bubble {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 230px;
  padding: 10px 14px 11px;
  border: 3px solid #1b1b1b;
  border-radius: 20px 20px 6px 20px;
  background: #fffdf5;
  color: #1b1b1b;
  box-shadow: 4px 4px 0 #1b1b1b;
  transform: rotate(-2deg);
}

/* tail pointing to the face (outline + fill) */
.beer-bubble::before,
.beer-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.beer-bubble::before {
  right: -17px;
  margin-top: -9px;
  border-left: 16px solid #1b1b1b;
}

.beer-bubble::after {
  right: -11px;
  margin-top: -6px;
  border-top-width: 6px;
  border-bottom-width: 6px;
  border-left: 11px solid #fffdf5;
}

.beer-bubble-ratio {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1b1b1b;
  color: #ffd981;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.beer-bubble-ratio[hidden] {
  display: none;
}

.beer-bubble-line {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}

/* success: beer-gold bubble, a happy bounce and sparkles */
.beer-talk.is-good .beer-bubble {
  background: #fff3b8;
}

.beer-talk.is-good .beer-bubble::after {
  border-left-color: #fff3b8;
}

.beer-talk.is-good .beer-bubble-line::after {
  content: " ✨";
}

.beer-talk.is-good.is-in .beer-bubble {
  animation: beer-talk-cheer .7s cubic-bezier(.2, .9, .3, 1.4);
}

/* miss: cooler bubble, a little droop and a sweat drop */
.beer-talk.is-bad .beer-bubble {
  background: #eef3ff;
}

.beer-talk.is-bad .beer-bubble::after {
  border-left-color: #eef3ff;
}

.beer-talk.is-bad .beer-talker-face::after {
  content: "💧";
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 16px;
}

.beer-talk.is-bad.is-in .beer-bubble {
  animation: beer-talk-sigh .6s ease;
}

.beer-talk.is-in {
  animation: beer-talk-in .38s cubic-bezier(.2, .9, .3, 1.25);
}

@keyframes beer-talk-in {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: none; }
}

@keyframes beer-talk-cheer {
  0% { transform: rotate(-2deg) scale(.6); }
  60% { transform: rotate(3deg) scale(1.08); }
  100% { transform: rotate(-2deg) scale(1); }
}

@keyframes beer-talk-sigh {
  0% { transform: rotate(-2deg) translateY(-6px); }
  50% { transform: rotate(-4deg) translateY(3px); }
  100% { transform: rotate(-2deg) translateY(0); }
}

@media (max-width: 560px) {
  .beer-talker-face {
    width: 44px;
    height: 44px;
  }

  .beer-bubble {
    max-width: 180px;
  }

  .beer-bubble-line {
    font-size: 14px;
  }
}

.beer-actions {
  display: grid;
  margin-top: 10px;
}

.beer-actions button {
  min-height: 44px;
  border: 1px solid rgba(255, 243, 214, .45);
  border-radius: 12px;
  background: rgba(0, 0, 0, .3);
  color: #fff3d6;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.beer-actions .beer-serve {
  border-color: #ffd981;
  background: linear-gradient(90deg, #ffd981, #f0a21c);
  color: #2e1906;
}

.beer-actions .beer-serve:disabled {
  opacity: .45;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .beer-svg .bz-bubble,
  .beer-svg .bz-stream.is-beer,
  .beer-flood-liquid i,
  .beer-flood-foam {
    animation: none;
  }
}

/* ===== Keroppi: play the frog song to drain the pond ============ */
.friend-card.has-frog {
  overflow: hidden;
}

.friend-card.has-frog > .friend-media,
.friend-card.has-frog > .friend-card-body {
  filter: blur(8px) hue-rotate(40deg) brightness(.55);
  pointer-events: none;
  user-select: none;
}

.frog-blocker {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
}

.frog-pond {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255, 255, 255, .18), transparent 40%),
    radial-gradient(ellipse at 70% 80%, rgba(20, 60, 50, .5), transparent 55%),
    linear-gradient(160deg, #2f8a83, #1d5f63 55%, #133f48);
  cursor: pointer;
  transition: transform 1.8s cubic-bezier(.6, 0, .3, 1), opacity 1.8s ease;
}

.frog-pad {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, #8bd36c, #4f9e3a 60%, #3a7d2a);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .3), inset 0 -3px 0 rgba(0, 0, 0, .12);
  /* the notch of a lily pad: a wedge from the rim to the centre */
  clip-path: polygon(50% 50%, 100% 38%, 100% 0, 0 0, 0 100%, 100% 100%, 100% 52%);
  animation: frog-float 6s ease-in-out infinite;
}

.frog-pad-3 {
  clip-path: polygon(50% 50%, 62% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 74% 100%);
}

.frog-pad-1 { top: 12%; left: 8%; width: 30%; aspect-ratio: 1; animation-delay: -1s; }
.frog-pad-2 { bottom: 10%; left: 32%; width: 22%; aspect-ratio: 1; animation-delay: -3s; }
.frog-pad-3 { top: 26%; right: 10%; width: 36%; aspect-ratio: 1; animation-delay: -2s; }

.frog-sit {
  position: absolute;
  top: 18%;
  left: 50%;
  z-index: 1;
  font-size: clamp(30px, 3.4vw, 42px);
  transform: translateX(-50%);
  animation: frog-sit 2.8s ease-in-out infinite;
}

@keyframes frog-float {
  50% { transform: translate(4px, -5px) rotate(6deg); }
}

@keyframes frog-sit {
  0%, 70%, 100% { transform: translate(-50%, 0); }
  80% { transform: translate(-50%, -8px); }
}

.frog-ripple {
  position: absolute;
  top: 58%;
  left: 18%;
  width: 60px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  animation: frog-ripple 3s ease-out infinite;
}

@keyframes frog-ripple {
  from { transform: scale(.4); opacity: .9; }
  to { transform: scale(2.2); opacity: 0; }
}

.frog-notes i {
  position: absolute;
  color: rgba(255, 255, 255, .8);
  font-size: 22px;
  font-style: normal;
  animation: frog-note 3.6s ease-in infinite;
}

.frog-notes i:nth-child(1) { left: 58%; bottom: 20%; }
.frog-notes i:nth-child(2) { left: 72%; bottom: 14%; animation-delay: 1.2s; }
.frog-notes i:nth-child(3) { left: 86%; bottom: 22%; animation-delay: 2.4s; }

@keyframes frog-note {
  from { transform: translateY(0) rotate(-10deg); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateY(-120px) rotate(14deg); opacity: 0; }
}

.frog-pond:hover .frog-sit,
.frog-pond:focus-visible .frog-sit {
  animation-duration: .9s;
}

.frog-pond:focus-visible {
  outline: 3px solid #ffd981;
  outline-offset: -3px;
}

/* cleared: the pond drains away downward */
.frog-blocker.is-clear {
  pointer-events: none;
}

.frog-blocker.is-clear .frog-pond {
  opacity: 0;
  transform: translateY(100%);
}

/* piano dialog */
.frog-dialog {
  width: min(480px, calc(100% - 20px));
  max-width: none;
  max-height: calc(100dvh - 20px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.frog-dialog::backdrop {
  background: radial-gradient(circle at 50% 35%, rgba(20, 70, 60, .7), rgba(3, 10, 9, .92));
  backdrop-filter: blur(3px);
}

.frog-stage {
  position: relative;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 18px 18px 16px;
  border: 1px solid rgba(160, 230, 170, .35);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(140, 220, 130, .18), transparent 60%),
    linear-gradient(180deg, #1d3b34, #0f201c);
  color: #effbef;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  animation: secret-pop .4s cubic-bezier(.2, .8, .2, 1);
}

.frog-stage.is-miss .frog-sheet {
  animation: secret-shake .4s ease;
}

.frog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.frog-head {
  text-align: center;
}

.frog-sub {
  margin: 0;
  color: #9fdca4;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .4em;
}

.frog-title {
  margin: 2px 0 12px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .12em;
}

/* the sheet: a treble-clef staff on paper */
.frog-sheet {
  padding: 8px 10px 4px;
  border-radius: 10px;
  background: #fbfaf2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 6px 14px rgba(0, 0, 0, .35);
}

.frog-staff {
  display: block;
  width: 100%;
  height: auto;
  color: #222;
}

.frog-staff .sn-line,
.frog-staff .sn-bar,
.frog-staff .sn-ledger {
  stroke: #333;
  stroke-width: 1;
}

.frog-staff .sn-end {
  fill: #333;
}

.frog-staff .sn-clef {
  fill: #222;
  font-family: "Noto Music", "Segoe UI Symbol", "Apple Symbols", serif;
  font-size: 46px;
}

.frog-staff .sn-title {
  fill: #222;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .12em;
}

.frog-staff .sn-credit {
  fill: #555;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 10px;
}

.frog-staff .sn-rest {
  fill: #222;
}

.frog-sn .sn-flag {
  fill: currentColor;
}

.frog-staff .sn-time {
  fill: #222;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 900;
}

.frog-sn {
  color: #222;
  transition: color .15s ease;
}

.frog-sn .sn-head {
  fill: currentColor;
}

.frog-sn .sn-hollow {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.frog-sn .sn-stem {
  stroke: currentColor;
  stroke-width: 1.4;
}

.frog-staff .sn-beam {
  fill: #222;
}

.frog-sn.is-done {
  color: #3f8f2e;
}

.frog-sn.is-now {
  color: #e08a00;
}

.frog-sn.is-now .sn-head,
.frog-sn.is-now .sn-hollow {
  filter: drop-shadow(0 0 3px rgba(224, 138, 0, .9));
}

/* frog comments: float over the title so nothing below moves */
.frog-head {
  position: relative;
}

.frog-head .frog-title {
  transition: opacity .15s ease;
}

.frog-head:has(.frog-talk:not([hidden])) .frog-title {
  opacity: 0;
}

.frog-talk {
  position: absolute;
  inset: auto 0 6px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.frog-talk[hidden] {
  display: none;
}

.frog-bubble {
  position: relative;
  margin: 0;
  padding: 5px 14px;
  border: 3px solid #1b1b1b;
  border-radius: 16px;
  background: #fff;
  color: #1b1b1b;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
  max-width: calc(100% - 96px);
  text-align: center;
  box-shadow: 3px 3px 0 #1b1b1b;
}

/* the tail points down at the sheet */
.frog-bubble::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 14px;
  height: 11px;
  background: #1b1b1b;
  clip-path: polygon(0 0, 100% 0, 30% 100%);
  transform: translateX(-50%);
}

.frog-talk.is-good .frog-bubble { background: #e3ffd8; }
.frog-talk.is-miss .frog-bubble { background: #eef3ff; }
.frog-talk.is-clear .frog-bubble { background: #fff3b8; }

.frog-talk.is-in {
  animation: frog-talk-in .35s cubic-bezier(.2, .9, .3, 1.4);
}

.frog-talk.is-clear .frog-bubble {
  animation: frog-hop .5s ease-in-out infinite alternate;
}

@keyframes frog-talk-in {
  from { opacity: 0; transform: translateY(6px) scale(.7); }
  to { opacity: 1; transform: none; }
}

@keyframes frog-hop {
  to { transform: translateY(-4px); }
}

/* the piano */
.frog-piano {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 150px;
  margin-top: 12px;
  padding: 10px 8px 8px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #1b1b1b, #000);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .12);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.frog-key {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin: 0 1px;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #f2f2f2, #ffffff 70%, #e6e6e6);
  color: #3a3a3a;
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 -6px 0 #d4d4d4, 0 2px 0 #000;
  transition: transform .05s ease, box-shadow .05s ease, background .1s ease;
}

.frog-key kbd {
  color: #9a9a9a;
  font-family: inherit;
  font-size: 9px;
}

.frog-key.is-down,
.frog-key:active {
  background: linear-gradient(180deg, #e3f7da, #c9f0b9);
  box-shadow: inset 0 -2px 0 #9ccc8a;
  transform: translateY(2px);
}

.frog-key.is-black {
  position: absolute;
  top: 10px;
  z-index: 1;
  width: 7.5%;
  height: 58%;
  margin: 0;
  padding: 0;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #3a3a3a, #111 70%, #000);
  box-shadow: inset 0 -5px 0 #2a2a2a, 0 3px 4px rgba(0, 0, 0, .6);
}

.frog-key.is-black.is-down,
.frog-key.is-black:active {
  background: linear-gradient(180deg, #2a2a2a, #000);
  box-shadow: inset 0 -2px 0 #2a2a2a;
}

.frog-hint {
  margin: 10px 0 0;
  color: rgba(239, 251, 239, .75);
  font-size: 12px;
  text-align: center;
}

.frog-hint small {
  color: rgba(239, 251, 239, .45);
  font-size: 10px;
}

.frog-listen {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(160, 230, 170, .5);
  border-radius: 12px;
  background: rgba(160, 230, 170, .12);
  color: #effbef;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.frog-stage.is-clear .frog-sheet {
  box-shadow: inset 0 0 0 2px #4f9e3a, 0 0 24px rgba(140, 220, 130, .6);
}

@media (max-width: 560px) {
  .frog-piano {
    height: 130px;
  }

  .frog-key kbd {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .frog-pad,
  .frog-sit,
  .frog-ripple,
  .frog-notes i {
    animation: none;
  }
}

.beer-mute {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 243, 214, .35);
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
  font-size: 15px;
  cursor: pointer;
}

/* ---- secret page: voice script form ---- */
.secret-voice {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(255, 216, 142, .35);
  background: rgba(10, 6, 28, .6);
}

.secret-voice h2 {
  margin: 6px 0 8px;
  font-size: clamp(20px, 3vw, 26px);
}

.secret-voice-lead {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.8;
}

.secret-voice-rules {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px dashed rgba(255, 216, 142, .35);
  list-style: none;
  font-size: 14px;
  line-height: 1.7;
}

.secret-voice-rules b {
  display: inline-block;
  min-width: 5.5em;
  margin-right: 8px;
  color: #ffd88e;
}

.secret-voice-form small {
  color: var(--muted);
  font-size: 12px;
}

.secret-voice-count {
  justify-self: end;
}

.secret-voice-count.is-near {
  color: #ffd88e;
}

.secret-voice-agree {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.secret-voice-agree input {
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: #ffd88e;
}

.secret-voice-agree span {
  color: var(--text) !important;
}

.secret-voice-form .button {
  justify-self: start;
}

/* admin: voice scripts */
.admin-voice-contact {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.admin-voice-badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 216, 142, .16);
  color: #ffd88e;
  font-size: 12px;
  font-weight: 800;
}

.admin-voice.is-done {
  opacity: .6;
}

.admin-voice.is-done .admin-voice-badge {
  background: rgba(103, 183, 255, .14);
  color: var(--blue);
}

.admin-voice-script {
  margin: 0 0 6px;
  white-space: normal;
  line-height: 1.8;
}

.admin-voice small {
  color: var(--muted);
}

.admin-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
