:root {
  color-scheme: light;
  --ink: #544455;
  --muted: #927f91;
  --pink: #e883ad;
  --pink-dark: #c75f91;
  --lavender: #b4a0df;
  --line: #f3dce8;
  --paper: rgba(255, 255, 255, 0.88);
  --ambient-wash: linear-gradient(115deg, rgba(255, 246, 250, 0.55), rgba(245, 240, 255, 0.62));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #fff6fa;
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: 'Trebuchet MS', 'Noto Sans JP', 'Yu Gothic', sans-serif;
}

.intro-screen {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  opacity: 1;
}

.intro-screen[hidden] {
  display: none;
}

.intro-screen.is-leaving {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

.intro-screen-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  transform-origin: top left;
  white-space: nowrap;
}

.intro-pending .page-shell {
  visibility: hidden;
  opacity: 0;
  transform: translateY(18px);
}

.intro-pending .page-header > .eyebrow {
  opacity: 0;
  transform: translateY(8px);
}

.intro-revealing .page-shell {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 750ms ease, transform 750ms ease;
}

body.intro-pending.intro-revealing .page-shell {
  opacity: 0;
  transform: translateY(18px);
}

body.intro-pending .ambient-background {
  opacity: 0;
}

.ambient-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #fff6fa;
  cursor: zoom-in;
  transition: opacity 1000ms ease;
}

.ambient-background::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255, 205, 230, 0.3), transparent 54%),
    radial-gradient(ellipse at 88% 88%, rgba(195, 177, 242, 0.3), transparent 52%),
    var(--ambient-wash);
  content: "";
}

.ambient-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}

.ambient-image.visible {
  opacity: 1;
}

body.intro-sequence-active .page-shell {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: none;
}

body.intro-sequence-active .ambient-background {
  transition-duration: 700ms;
}

body.intro-sequence-active .page-header > .eyebrow {
  opacity: 0;
  transform: translateY(8px);
}

body.intro-sequence-active .content-grid,
body.intro-sequence-active .page-footer {
  visibility: hidden;
  opacity: 0;
  transform: translateY(18px);
}

body.intro-profile-revealing .content-grid,
body.intro-profile-revealing .page-footer {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 450ms ease, transform 450ms ease;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  pointer-events: none;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 45px 0 24px;
  transition: opacity 750ms ease, transform 750ms ease;
}

.card,
.language-button,
.page-footer {
  pointer-events: auto;
}

.language-button {
  cursor: pointer;
}

.page-header {
  position: relative;
  padding: 9px 0 34px;
  text-align: center;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 9px;
  place-items: center;
  border: 1px solid #f4c6da;
  border-radius: 17px;
  color: var(--pink-dark);
  background: #fff;
  box-shadow: 0 7px 20px #d784aa24;
  font-size: 1.55rem;
  transform: rotate(-8deg);
}

.eyebrow {
  margin: 0;
  color: var(--pink-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 7px 0 5px;
  color: #624c69;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.intro-pending .language-button {
  cursor: wait;
}

.language-button:disabled {
  opacity: 0.65;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.language-button {
  position: absolute;
  top: 10px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid #f1c9dc;
  border-radius: 999px;
  color: var(--pink-dark);
  background: #fff9fc;
  box-shadow: 0 4px 14px #d784aa1c;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.language-button:hover {
  background: #fff;
  transform: translateY(-2px);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.55fr);
  align-items: start;
  gap: 22px;
}

.right-column {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.card {
  border: 1px solid #fff;
  border-radius: 25px;
  background: var(--paper);
  box-shadow: 0 12px 35px #9d73931b, inset 0 0 0 1px #f7e9ef;
}

.profile-card {
  position: sticky;
  top: min(20px, calc(100vh - var(--profile-card-height, 0px) - 20px));
  padding: 22px;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
}

.heading-icon {
  color: var(--pink);
  font-size: 1.3rem;
}

.card-heading h2 {
  margin: 0;
  color: #644f68;
  font-size: 1.16rem;
  font-weight: 800;
}

.nameplate {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  overflow: hidden;
  border: 1px solid #f3d2e1;
  border-radius: 17px;
  background: linear-gradient(115deg, #fff1f7, #f5f0ff);
}

.nameplate-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.nameplate strong {
  margin-left: auto;
  color: #6e5682;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.nameplate-sparkle {
  margin-left: 9px;
  color: var(--pink);
}

.profile-details {
  margin: 12px 0 15px;
}

.detail-row {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 8px;
  padding: 9px 3px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.88rem;
}

.detail-row dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-row dd {
  margin: 0;
  font-weight: 700;
}

.social-links {
  display: grid;
  gap: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #f4e6ec;
  border-radius: 13px;
  color: #685568;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.social-link:hover {
  border-color: #e9b8ce;
  transform: translateX(2px);
}

.social-icon,
.social-letter {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
}

.social-icon {
  object-fit: contain;
}

.discord-icon {
  padding: 3px;
  border-radius: 7px;
  background: #7465a7;
}

.social-handle {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-mark {
  color: #c5a1b6;
}

.voice-card {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #f8f3ff;
}

.voice-heading {
  display: flex;
  justify-content: space-between;
  color: #76647f;
  font-size: 0.83rem;
  font-weight: 800;
}

.voice-value {
  color: var(--pink-dark);
}

.voice-track {
  height: 9px;
  margin: 9px 0 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7dff2;
}

.voice-meter {
  display: block;
  width: 3%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4a8c9, #baa4e8);
  transition: width 333ms ease;
}

.voice-meter.voice-language-transition {
  transition-duration: 333ms;
}

.voice-card p {
  margin: 0;
  color: #98879e;
  font-size: 0.73rem;
}

.status-list {
  display: grid;
  gap: 9px;
  margin: 18px 2px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #776779;
  font-size: 0.8rem;
  line-height: 1.45;
}

.status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #e6dce4;
}

.dot-blue { background: #77b8eb; }
.dot-green { background: #8acb9b; }
.dot-orange { background: #f2b86e; }
.dot-red { background: #e9829e; }

.friend-note {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 15px;
  color: #80637b;
  background: #fff2f7;
  font-size: 0.82rem;
  line-height: 1.65;
}

.friend-note-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
}

.boundaries {
  margin-top: 19px;
}

.boundaries h3 {
  margin: 0 0 9px;
  color: #806d82;
  font-size: 0.83rem;
}

.boundary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.boundary-chip,
.profile-tag {
  padding: 6px 9px;
  border: 1px solid #f1e2ec;
  border-radius: 999px;
  color: #816c83;
  background: #fffafd;
  font-size: 0.73rem;
  font-weight: 700;
}

.intro-card {
  position: relative;
  padding: 24px 27px;
  overflow: hidden;
}

.intro-card .card-heading,
.intro-text,
.tag-list {
  position: relative;
  z-index: 1;
}

.intro-card .card-heading {
  margin-bottom: 10px;
}

.intro-text {
  margin: 0;
  color: #76647a;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.9;
  white-space: pre-line;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.profile-tag {
  border-color: #f2d6e4;
  color: #ba6d93;
  background: #fff7fb;
}

.avatar-card {
  padding: 23px;
}

.avatar-heading {
  justify-content: space-between;
  margin-bottom: 15px;
}

.avatar-heading .eyebrow {
  margin-bottom: 3px;
  font-size: 0.63rem;
}

.avatar-count {
  color: var(--muted);
  font-size: 0.74rem;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.avatar-tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 17px;
  background: #f7e9f1;
  box-shadow: 0 3px 10px #8c60831e;
  cursor: zoom-in;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.avatar-tile:hover,
.avatar-tile:focus-visible {
  z-index: 1;
  outline: none;
  box-shadow: 0 7px 18px #bd779b3b;
  transform: translateY(-3px) rotate(1deg);
}

.avatar-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-footer {
  padding: 25px 0 0;
  color: #a68a9d;
  font-size: 0.8rem;
  text-align: center;
}

.image-dialog {
  position: fixed;
  max-width: min(90vw, 850px);
  max-height: 90vh;
  padding: 18px;
  border: 1px solid #fff;
  border-radius: 23px;
  background: #fff9fc;
  box-shadow: 0 18px 70px #30223366;
}

.image-dialog::backdrop {
  background: #302233bd;
}

.image-dialog img {
  display: block;
  max-width: min(82vw, 800px);
  max-height: 75vh;
  border-radius: 14px;
  object-fit: contain;
}

.dialog-caption {
  margin: 12px 30px 0;
  color: #725d75;
  font-weight: 800;
  text-align: center;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #8a6480;
  background: #f9e7f0;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.language-error {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  max-width: min(420px, calc(100% - 32px));
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  color: #8a3154;
  background: #fff0f4;
  box-shadow: 0 4px 18px #653a5426;
  font-size: 0.84rem;
  pointer-events: auto;
}

.language-error:empty {
  display: none;
}

body.background-expanded .ambient-background {
  z-index: 3;
  cursor: zoom-out;
}

body.background-expanded .ambient-background::after {
  background: rgba(20, 16, 25, 0.24);
}

body.background-expanded .ambient-image {
  background-color: #19151e;
  background-repeat: no-repeat;
  background-size: contain;
  transition: opacity 1s ease;
}

body.background-expanded .page-shell {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(600px, calc(100% - 28px));
    padding-top: 28px;
  }

  .page-header {
    padding-top: 48px;
  }

  .language-button {
    top: 0;
    right: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-card {
    position: static;
    top: auto;
  }

  .right-column {
    gap: 16px;
  }
}

@media (max-width: 430px) {
  .profile-card,
  .avatar-card {
    padding: 17px;
  }

  .intro-card {
    padding: 20px;
  }

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

  .avatar-tile {
    border-radius: 14px;
  }

  .avatar-count {
    max-width: 110px;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .ambient-image {
    transition-duration: 1s !important;
  }

  .page-shell,
  .intro-revealing .page-shell,
  .intro-screen,
  .intro-screen.is-leaving {
    transition: none;
  }

  .intro-revealing .page-shell {
    transform: none;
    transition: opacity 300ms ease;
  }

  .voice-meter {
    transition-duration: 650ms !important;
  }

  .voice-meter.voice-language-transition {
    transition-duration: 650ms !important;
  }

  .ambient-background {
    transition-duration: 300ms !important;
  }

  body.intro-profile-revealing .content-grid,
  body.intro-profile-revealing .page-footer {
    transition-duration: 300ms !important;
  }

  body.intro-sequence-active .ambient-background {
    transition-duration: 300ms !important;
  }

  .page-header > .eyebrow {
    transition-duration: 300ms !important;
  }
}

:root {
  color-scheme: dark;
  --ink: #e2faff;
  --muted: #9ab9c7;
  --pink: #ff4fd8;
  --pink-dark: #ff71df;
  --lavender: #71eaff;
  --line: #21475a;
  --paper: rgba(8, 20, 35, 0.9);
  --ambient-wash: linear-gradient(115deg, rgba(4, 14, 28, 0.72), rgba(8, 17, 39, 0.76));
}

html,
body {
  background: #07111f;
}

body {
  color: var(--ink);
}

.intro-screen-title {
  color: #dffcff;
  text-shadow: 0 0 10px #00d9ff, 0 0 30px #00d9ff99, 0 0 55px #ff4fd866;
}

.intro-screen.is-leaving {
  background: #000;
}

.ambient-background {
  background: #07111f;
}

.ambient-background::after {
  background:
    linear-gradient(rgba(2, 12, 25, 0.16), rgba(2, 12, 25, 0.52)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(91, 235, 255, 0.035) 4px),
    radial-gradient(ellipse at 12% 8%, rgba(0, 229, 255, 0.2), transparent 54%),
    radial-gradient(ellipse at 88% 88%, rgba(255, 41, 201, 0.18), transparent 52%),
    var(--ambient-wash);
}

.brand-mark {
  border: 1px solid #25dff7;
  border-radius: 13px 4px 13px 4px;
  background: rgba(6, 25, 42, 0.92);
  box-shadow: 0 0 15px #00d9ff55, inset 0 0 12px #00d9ff22;
  transform: rotate(45deg) scale(0.78);
}

.brand-mark span {
  width: 13px;
  height: 13px;
  border: 2px solid #ff4fd8;
  background: #1b2540;
  box-shadow: 0 0 12px #ff4fd8aa;
}

.eyebrow {
  color: #54eaff;
  text-shadow: 0 0 10px #00d9ff88;
}

.page-header h1,
.card-heading h2 {
  color: #e2faff;
  text-shadow: 0 0 16px #22dfff33;
}

.header-note {
  color: #a5c4d2;
}

.language-button {
  border-color: #1d9db6;
  border-radius: 8px;
  color: #82f2ff;
  background: rgba(7, 24, 40, 0.94);
  box-shadow: 0 0 13px #00d9ff33, inset 0 0 9px #00d9ff12;
}

.language-button:hover {
  background: #10344a;
  box-shadow: 0 0 18px #00d9ff66;
}

.card {
  border: 1px solid #1b7187;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 0 24px #00d9ff16, inset 0 0 18px #00d9ff0a;
}

.card-heading {
  border-bottom: 1px solid #1d5062;
  padding-bottom: 10px;
}

.heading-icon {
  color: #ff4fd8;
  text-shadow: 0 0 10px #ff4fd899;
}

.nameplate {
  border: 1px solid #218ca0;
  border-radius: 8px;
  background: linear-gradient(110deg, #0c2c3e, #171e3b);
  box-shadow: inset 0 0 16px #00d9ff12;
}

.nameplate-label,
.detail-row dt {
  color: #8fb5c5;
}

.nameplate strong {
  color: #78f2ff;
  text-shadow: 0 0 12px #00d9ff77;
}

.nameplate-sparkle {
  color: #ff4fd8;
}

.detail-row {
  border-color: #21475a;
}

.social-link {
  border: 1px solid #214d60;
  border-radius: 8px;
  color: #d3f7ff;
  background: rgba(7, 24, 39, 0.86);
}

.social-link:hover {
  border-color: #27dff7;
  background: #0d3043;
  box-shadow: 0 0 14px #00d9ff3b;
}

.social-link[href^="https://x.com"] .social-icon {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(145deg);
}

.social-link[href^="https://vrchat.com"] .social-icon {
  filter: brightness(0) invert(1);
}

.social-handle {
  color: #8aaebb;
}

.external-mark {
  color: #ff71df;
}

.discord-icon {
  background: #5550a3;
}

.voice-card {
  border: 1px solid #26546a;
  border-radius: 9px;
  background: #0b2539;
}

.voice-heading {
  color: #b4eaf3;
}

.voice-value {
  color: #ff71df;
  text-shadow: 0 0 9px #ff4fd866;
}

.voice-track {
  background: #17384d;
  box-shadow: inset 0 0 7px #030b14;
}

.voice-meter {
  background: linear-gradient(90deg, #11d9f5, #9a71ff 58%, #ff4fd8);
  box-shadow: 0 0 10px #00d9ff88;
  transition-duration: 650ms;
}

.voice-meter.voice-language-transition {
  transition-duration: 650ms;
}

.voice-card p,
.status-item {
  color: #a9c6d0;
}

.status-dot {
  border-color: #081522;
  box-shadow: 0 0 0 1px #377087, 0 0 8px currentColor;
}

.friend-note {
  border: 1px solid #623c76;
  border-radius: 9px;
  color: #e7ccf2;
  background: linear-gradient(100deg, #211c3b, #10283b);
}

.friend-note-icon {
  filter: drop-shadow(0 0 5px #ff4fd877);
}

.boundaries h3 {
  color: #b9dbe4;
}

.boundary-chip,
.profile-tag {
  border: 1px solid #26556a;
  border-radius: 5px;
  color: #bfeaf1;
  background: #0b2638;
}

.intro-text {
  color: #d1e9ef;
}

.profile-tag {
  border-color: #7b3476;
  color: #ff9ce8;
  background: #291b39;
}

.avatar-count {
  color: #a5c4d2;
}

.avatar-tile {
  border: 1px solid #27a4ba;
  border-radius: 8px;
  background: #0c2537;
  box-shadow: 0 0 11px #00d9ff22;
}

.avatar-tile:hover,
.avatar-tile:focus-visible {
  border-color: #ff4fd8;
  box-shadow: 0 0 18px #00d9ff66, 0 0 25px #ff4fd833;
}

.avatar-tile.top img {
  object-position: center top;
}

.avatar-tile.bottom img {
  object-position: center bottom;
}

.avatar-tile.left img {
  object-position: left center;
}

.avatar-tile.right img {
  object-position: right center;
}

.page-footer {
  color: #78b8c8;
}

.image-dialog {
  border: 1px solid #28cde4;
  border-radius: 12px;
  background: #081522;
  box-shadow: 0 0 40px #00d9ff55, 0 0 80px #000b;
}

.image-dialog::backdrop {
  background: rgba(1, 7, 16, 0.86);
}

.dialog-caption {
  color: #d4f8ff;
}

.dialog-close {
  border: 1px solid #925198;
  border-radius: 6px;
  color: #ffb2ee;
  background: #2a1a38;
}

.language-error {
  border: 1px solid #a74d97;
  border-radius: 8px;
  color: #ffe2fa;
  background: #301b38;
  box-shadow: 0 0 18px #ff4fd833;
}

body.background-expanded .ambient-background::after {
  background: rgba(1, 7, 16, 0.25);
}

body.background-expanded .ambient-image {
  background-color: #020812;
}
