:root {
  color-scheme: dark;
  --bg: #050505;
  --text: rgba(248, 248, 248, 0.95);
  --muted: rgba(248, 248, 248, 0.58);
  --faint: rgba(248, 248, 248, 0.16);
  --line: rgba(248, 248, 248, 0.13);
  --line-strong: rgba(248, 248, 248, 0.28);
  --accent: #cfe7e6;
  --intro-start-y: -4vh;
  --profile-final-y: -15vh;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.scene {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  isolation: isolate;
  padding: clamp(24px, 6vw, 72px);
}

.backdrop,
.backdrop img,
.smoke,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: -2;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(245, 245, 245, 0.05), transparent 42%),
    radial-gradient(ellipse at 50% 58%, rgba(255, 255, 255, 0.06), transparent 36%),
    #050505;
}

.backdrop::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  content: "";
  pointer-events: none;
}

.backdrop::before {
  background:
    radial-gradient(ellipse at 50% 46%, transparent 0 28%, rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent 22%, transparent 70%, rgba(0, 0, 0, 0.28));
}

.background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 360ms ease, filter 360ms ease, transform 360ms ease;
  will-change: transform;
}

.smoke-bg {
  opacity: 0.62;
  filter: grayscale(1) contrast(1.18) brightness(0.62) blur(12px);
  transform: scale(1.1);
  animation: backgroundDrift 22s ease-in-out infinite alternate;
}

.forest-bg {
  opacity: 0;
  filter: grayscale(1) contrast(1.2) brightness(0.44) blur(2px);
  transform: scale(1.04);
  animation: backgroundDrift 26s ease-in-out infinite alternate;
}

html.bg-forest .smoke-bg {
  opacity: 0;
}

html.bg-smoke .smoke-bg {
  opacity: 0.62;
}

html.bg-smoke .forest-bg {
  opacity: 0;
}

html.bg-forest .forest-bg {
  opacity: 0.72;
  transform: scale(1.07);
}

html.bg-forest .backdrop {
  background:
    radial-gradient(ellipse at 50% 43%, rgba(0, 0, 0, 0.12), transparent 30%),
    linear-gradient(90deg, rgba(245, 245, 245, 0.03), transparent 36%),
    #030303;
}

.smoke {
  mix-blend-mode: screen;
  opacity: 0.42;
  filter: blur(34px);
  transform: translate3d(0, 0, 0);
}

.smoke-a {
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.33), transparent 42%);
  animation: driftA 16s ease-in-out infinite alternate;
}

.smoke-b {
  background: radial-gradient(ellipse at 35% 70%, rgba(255, 255, 255, 0.2), transparent 38%);
  animation: driftB 20s ease-in-out infinite alternate;
}

.smoke-c {
  background: linear-gradient(18deg, transparent 16%, rgba(255, 255, 255, 0.1) 50%, transparent 74%);
  opacity: 0.22;
  animation: driftC 24s ease-in-out infinite alternate;
}

.grain {
  z-index: 1;
  opacity: 0.25;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.58) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 38%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1px),
    radial-gradient(circle at 42% 82%, rgba(0, 0, 0, 0.7) 0 1px, transparent 1px);
  background-size: 17px 17px, 23px 23px, 29px 29px;
  animation: grainShift 0.7s steps(2) infinite;
}

.profile {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  text-align: center;
  transform: translateY(var(--profile-final-y));
}

.corner-button,
.panel-close,
.music-control {
  display: grid;
  padding: 0;
  place-items: center;
  color: rgba(248, 248, 248, 0.78);
  border: 1px solid rgba(248, 248, 248, 0.16);
  border-radius: 8px;
  background: rgba(4, 4, 4, 0.34);
  font: inherit;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.corner-button:hover,
.panel-close:hover,
.music-control:hover {
  color: #fff;
  border-color: rgba(248, 248, 248, 0.3);
  background: rgba(255, 255, 255, 0.07);
}

.corner-button:focus-visible,
.panel-close:focus-visible,
.music-control:focus-visible {
  outline: 1px solid rgba(248, 248, 248, 0.42);
  outline-offset: 3px;
}

.love-toggle {
  position: fixed;
  top: calc(17px + env(safe-area-inset-top));
  left: calc(17px + env(safe-area-inset-left));
  z-index: 5;
  width: 34px;
  height: 34px;
  color: rgba(248, 248, 248, 0.74);
  border: 0;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
  backdrop-filter: none;
}

body.is-love-open .love-toggle {
  color: #fff;
  background: transparent;
}

.love-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: transparent;
  transform: translateY(-1px);
}

.archive-toggle {
  position: fixed;
  top: calc(17px + env(safe-area-inset-top));
  right: calc(17px + env(safe-area-inset-right));
  z-index: 5;
  width: 34px;
  height: 34px;
  color: rgba(248, 248, 248, 0.62);
  border: 0;
  background: transparent;
  font-size: 1.08rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
  backdrop-filter: none;
}

body.is-archive-open .archive-toggle,
.archive-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: transparent;
  transform: translateY(-1px);
}

.music-toggle {
  position: fixed;
  bottom: calc(17px + env(safe-area-inset-bottom));
  left: calc(17px + env(safe-area-inset-left));
  z-index: 5;
  width: 34px;
  height: 34px;
  color: rgba(248, 248, 248, 0.62);
  border: 0;
  background: transparent;
  font-size: 1.02rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
  backdrop-filter: none;
}

body.is-music-open .music-toggle,
.music-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: transparent;
  transform: translateY(-1px);
}

.friends-toggle {
  position: fixed;
  right: calc(17px + env(safe-area-inset-right));
  bottom: calc(17px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 34px;
  height: 34px;
  color: rgba(248, 248, 248, 0.62);
  border: 0;
  background: transparent;
  font-size: 0.92rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
  backdrop-filter: none;
}

body.is-friends-open .friends-toggle,
.friends-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: transparent;
  transform: translateY(-1px);
}

.love-panel,
.archive-panel,
.music-panel,
.friends-panel {
  position: fixed;
  top: calc(61px + env(safe-area-inset-top));
  z-index: 4;
  width: min(340px, calc(100vw - 34px));
  max-height: min(430px, calc(100svh - 92px));
  padding: 14px;
  overflow: auto;
  color: rgba(248, 248, 248, 0.84);
  border: 1px solid rgba(248, 248, 248, 0.13);
  border-radius: 8px;
  background: rgba(6, 6, 6, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 80px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-12px, -8px, 0);
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

.love-panel {
  left: calc(17px + env(safe-area-inset-left));
  width: min(392px, calc(100vw - 34px));
  max-height: min(470px, calc(100svh - 92px));
  transform: translate3d(-12px, -8px, 0);
}

.archive-panel {
  right: calc(17px + env(safe-area-inset-right));
  width: min(392px, calc(100vw - 34px));
  transform: translate3d(12px, -8px, 0);
}

.music-panel {
  top: auto;
  bottom: calc(61px + env(safe-area-inset-bottom));
  left: calc(17px + env(safe-area-inset-left));
  width: min(282px, calc(100vw - 34px));
  max-height: min(338px, calc(100svh - 92px));
  transform: translate3d(-12px, 8px, 0);
}

.friends-panel {
  top: auto;
  right: calc(17px + env(safe-area-inset-right));
  bottom: calc(61px + env(safe-area-inset-bottom));
  width: min(392px, calc(100vw - 34px));
  max-height: min(470px, calc(100svh - 92px));
  transform: translate3d(12px, 8px, 0);
}

body.is-love-open .love-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

body.is-archive-open .archive-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

body.is-music-open .music-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

body.is-friends-open .friends-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

.love-panel::-webkit-scrollbar,
.archive-panel::-webkit-scrollbar,
.music-panel::-webkit-scrollbar,
.friends-panel::-webkit-scrollbar {
  width: 7px;
}

.love-panel::-webkit-scrollbar-track,
.archive-panel::-webkit-scrollbar-track,
.music-panel::-webkit-scrollbar-track,
.friends-panel::-webkit-scrollbar-track {
  background: transparent;
}

.love-panel::-webkit-scrollbar-thumb,
.archive-panel::-webkit-scrollbar-thumb,
.music-panel::-webkit-scrollbar-thumb,
.friends-panel::-webkit-scrollbar-thumb {
  background: rgba(248, 248, 248, 0.16);
  border-radius: 999px;
}

.panel-head {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 9px;
}

.message-back,
.archive-back,
.friend-back,
.message-toggle,
.love-intro,
.love-message,
.archive-title,
.archive-intro,
.music-title,
.music-now p,
.music-status,
.friends-title,
.friends-intro,
.friend-name,
.friend-note p,
.clip-card,
.clip-card strong,
.clip-card small,
.clip-viewer-kicker,
.clip-viewer-title,
.memory-item p,
.news-note p,
.archive-item p {
  margin: 0;
}

.message-back,
.archive-back,
.friend-back {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  color: rgba(248, 248, 248, 0.64);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  transition: color 180ms ease, transform 180ms ease;
}

.message-back:hover,
.archive-back:hover,
.friend-back:hover {
  color: #fff;
  transform: translateX(-2px);
}

.message-back:focus-visible,
.archive-back:focus-visible,
.friend-back:focus-visible {
  outline: 1px solid rgba(248, 248, 248, 0.38);
  outline-offset: 3px;
}

.message-toggle {
  padding: 0;
  color: rgba(248, 248, 248, 0.92);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.message-toggle:hover,
.message-toggle[aria-expanded="true"] {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.14);
}

.message-toggle:focus-visible {
  outline: 1px solid rgba(248, 248, 248, 0.38);
  outline-offset: 4px;
}

.panel-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  color: rgba(248, 248, 248, 0.58);
  font-size: 1rem;
  line-height: 1;
}

.love-intro {
  margin-top: 10px;
  color: rgba(248, 248, 248, 0.68);
  font-size: 0.78rem;
  line-height: 1.6;
}

.archive-title,
.music-title,
.friends-title {
  color: rgba(248, 248, 248, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.archive-intro,
.friends-intro {
  margin-top: 10px;
  color: rgba(248, 248, 248, 0.62);
  font-size: 0.76rem;
  line-height: 1.55;
}

.archive-intro {
  font-size: 0.72rem;
  white-space: nowrap;
}

.music-now {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(248, 248, 248, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.music-now span,
.volume-row span,
.music-status {
  color: rgba(248, 248, 248, 0.42);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.music-now p {
  margin-top: 7px;
  color: rgba(248, 248, 248, 0.86);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.music-controls {
  display: flex;
  margin-top: 11px;
  align-items: center;
  gap: 7px;
}

.music-control {
  width: 34px;
  height: 30px;
  color: rgba(248, 248, 248, 0.68);
  font-size: 0.92rem;
  line-height: 1;
}

.volume-row {
  display: grid;
  margin-top: 12px;
  align-items: center;
  gap: 8px;
  grid-template-columns: auto 1fr;
}

.volume-row input {
  width: 100%;
  accent-color: rgba(248, 248, 248, 0.78);
}

.music-status {
  margin-top: 10px;
  color: rgba(248, 248, 248, 0.34);
}

.love-message {
  margin-top: 14px;
  padding: 12px;
  color: rgba(248, 248, 248, 0.72);
  border: 1px solid rgba(248, 248, 248, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.78rem;
  line-height: 1.6;
}

.love-panel.is-message-view .love-intro,
.love-panel.is-message-view .love-tabs,
.love-panel.is-message-view .love-tab-panel {
  display: none;
}

.love-panel.is-message-view .love-message {
  min-height: 178px;
}

.love-panel.is-clip-view .love-clip-viewer {
  display: grid;
}

.archive-panel.is-edit-view .edit-viewer {
  display: grid;
}

.friends-panel.is-detail-view .friends-intro,
.friends-panel.is-detail-view .friends-tabs,
.friends-panel.is-detail-view .friends-tab-panel {
  display: none;
}

.friends-panel.is-detail-view .friend-detail {
  display: grid;
}

.friends-panel.is-clip-view .clip-viewer {
  display: grid;
}

.love-tabs {
  display: flex;
  margin-top: 15px;
  gap: 7px;
}

.friends-tabs,
.friend-detail-tabs {
  display: flex;
  margin-top: 15px;
  gap: 7px;
}

.archive-tabs {
  display: grid;
  margin-top: 15px;
  gap: 7px;
  grid-template-columns: repeat(4, 1fr);
}

.music-tabs {
  display: flex;
  margin-top: -3px;
  gap: 4px;
  overflow-x: auto;
  padding: 0 0 3px;
}

.love-tab,
.archive-tab,
.friends-tab,
.friend-detail-tab {
  min-height: 30px;
  padding: 0 11px;
  color: rgba(248, 248, 248, 0.5);
  border: 1px solid rgba(248, 248, 248, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  font: inherit;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.music-tab {
  min-height: 21px;
  padding: 0 7px;
  flex: 0 0 auto;
  color: rgba(248, 248, 248, 0.42);
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-size: 0.58rem;
  line-height: 1;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.love-tab:hover,
.love-tab.is-active,
.archive-tab:hover,
.archive-tab.is-active,
.friends-tab:hover,
.friends-tab.is-active,
.friend-detail-tab:hover,
.friend-detail-tab.is-active {
  color: rgba(248, 248, 248, 0.9);
  border-color: rgba(248, 248, 248, 0.22);
  background: rgba(255, 255, 255, 0.055);
}

.music-tab:hover,
.music-tab.is-active {
  color: rgba(248, 248, 248, 0.86);
  background: rgba(255, 255, 255, 0.04);
}

.love-tab:focus-visible,
.archive-tab:focus-visible,
.friends-tab:focus-visible,
.friend-detail-tab:focus-visible,
.music-tab:focus-visible {
  outline: 1px solid rgba(248, 248, 248, 0.38);
  outline-offset: 3px;
}

.love-tab-panel,
.archive-tab-panel,
.music-tab-panel,
.friends-tab-panel,
.friend-detail-panel {
  margin-top: 11px;
}

.memory-list,
.archive-list,
.people-list,
.friend-detail,
.clip-list,
.clip-viewer {
  display: grid;
  gap: 8px;
}

.memory-item,
.news-note,
.archive-item,
.person-entry,
.people-list > span,
.friend-note,
.clip-card {
  min-height: 52px;
  padding: 10px;
  border: 1px solid rgba(248, 248, 248, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

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

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

.love-clip-list {
  margin-top: 9px;
}

.edit-list {
  margin-top: 2px;
}

.person-entry,
.people-list > span,
.clip-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(248, 248, 248, 0.72);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: left;
}

.person-entry,
.clip-card {
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.person-entry:hover,
.clip-card:hover {
  color: rgba(248, 248, 248, 0.94);
  border-color: rgba(248, 248, 248, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.person-entry:focus-visible,
.clip-card:focus-visible {
  outline: 1px solid rgba(248, 248, 248, 0.38);
  outline-offset: 3px;
}

.clip-card {
  position: relative;
  min-height: 74px;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 74px 10px 10px;
}

.clip-thumb {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 56px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(248, 248, 248, 0.14);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 48%),
    rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.035);
}

.clip-thumb video,
.clip-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12);
  opacity: 0.72;
}

.clip-card > span:not(.clip-thumb) {
  color: rgba(248, 248, 248, 0.36);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.clip-card strong {
  display: block;
  width: 100%;
  overflow: hidden;
  color: rgba(248, 248, 248, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-card small {
  width: max-content;
  max-width: 100%;
  padding: 2px 5px;
  color: rgba(248, 248, 248, 0.38);
  border: 1px solid rgba(248, 248, 248, 0.1);
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.person-entry-featured {
  min-height: 58px;
  grid-column: 1 / -1;
  color: rgba(248, 248, 248, 0.92);
  border-color: rgba(248, 248, 248, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.person-entry small {
  color: rgba(248, 248, 248, 0.42);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.friend-detail {
  margin-top: 13px;
}

.friend-detail-panel {
  display: grid;
  gap: 8px;
}

.jaklic-clip-list {
  margin-top: 0;
}

.friend-name {
  color: rgba(248, 248, 248, 0.94);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.friend-note span,
.clip-viewer-kicker {
  color: rgba(248, 248, 248, 0.42);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.friend-note p {
  margin-top: 7px;
  color: rgba(248, 248, 248, 0.74);
  font-size: 0.76rem;
  line-height: 1.5;
}

.clip-viewer {
  position: relative;
  margin-top: 13px;
}

.clip-list > .clip-viewer {
  grid-column: 1 / -1;
}

.friends-panel .clip-viewer[hidden] {
  display: none;
}

.clip-close {
  position: absolute;
  top: 18px;
  right: 0;
  z-index: 2;
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: rgba(248, 248, 248, 0.58);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  transition:
    color 180ms ease,
    text-shadow 180ms ease,
    transform 180ms ease;
}

.clip-close:hover,
.clip-close:focus-visible {
  color: rgba(248, 248, 248, 0.92);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.clip-close:focus-visible {
  outline: 1px solid rgba(248, 248, 248, 0.38);
  outline-offset: 3px;
}

.clip-viewer-title {
  margin-top: 7px;
  padding-right: 30px;
  overflow-wrap: anywhere;
  color: rgba(248, 248, 248, 0.88);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.clip-frame {
  display: grid;
  min-height: 236px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(248, 248, 248, 0.12);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.5);
}

.clip-frame video,
.clip-frame img {
  display: block;
  width: 100%;
  max-height: min(318px, calc(100svh - 186px));
  object-fit: contain;
}

.clip-frame video[hidden],
.clip-frame img[hidden] {
  display: none;
}

.archive-item-strong {
  border-color: rgba(248, 248, 248, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.latest-edit-card {
  display: grid;
  gap: 9px;
  border-style: dashed;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 42%),
    rgba(0, 0, 0, 0.16);
}

.latest-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.latest-edit-head small {
  color: rgba(248, 248, 248, 0.34);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.latest-edit-link {
  display: grid;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr);
  color: inherit;
  text-decoration: none;
}

.latest-edit-link[aria-disabled="true"] {
  pointer-events: none;
}

.latest-edit-thumb {
  display: block;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(248, 248, 248, 0.11);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.32);
  background-position: center;
  background-size: cover;
  filter: grayscale(1) contrast(1.08);
}

.latest-edit-card.has-edit .latest-edit-thumb {
  opacity: 0.86;
}

.latest-edit-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.latest-edit-copy strong {
  overflow: hidden;
  color: rgba(248, 248, 248, 0.82);
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-edit-copy small {
  color: rgba(248, 248, 248, 0.4);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.psych-diary-note {
  border-style: dashed;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 38%),
    rgba(0, 0, 0, 0.16);
}

.memory-item span,
.news-note span,
.archive-item span {
  display: block;
  color: rgba(248, 248, 248, 0.38);
  font-size: 0.64rem;
  line-height: 1;
  text-transform: uppercase;
}

.memory-item p,
.news-note p,
.archive-item p {
  margin-top: 7px;
  color: rgba(248, 248, 248, 0.74);
  font-size: 0.76rem;
  line-height: 1.35;
}

.news-note p {
  line-height: 1.5;
}

.archive-item a {
  color: rgba(248, 248, 248, 0.82);
  border-bottom: 1px solid rgba(248, 248, 248, 0.18);
  transition: color 180ms ease, border-color 180ms ease;
}

.archive-item a:hover {
  color: #fff;
  border-color: rgba(248, 248, 248, 0.58);
}

.archive-chip-list {
  display: flex;
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 6px;
}

.archive-chip-list span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 5px 7px 4px;
  color: rgba(248, 248, 248, 0.68);
  border: 1px solid rgba(248, 248, 248, 0.09);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.64rem;
  line-height: 1.15;
  text-transform: none;
}

.archive-chip-list-vertical {
  display: grid;
}

.archive-chip-list-vertical span {
  justify-content: flex-start;
}

.psych-case-file {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045), transparent 34%),
    rgba(255, 255, 255, 0.025);
}

.psych-note-list {
  display: grid;
  margin-top: 10px;
  gap: 7px;
}

.psych-note-list p {
  display: grid;
  margin: 0;
  padding: 7px 8px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  color: rgba(248, 248, 248, 0.7);
  border-left: 1px solid rgba(248, 248, 248, 0.13);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.68rem;
  line-height: 1.45;
}

.psych-note-list p span {
  color: rgba(248, 248, 248, 0.36);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.profile-name,
.profile-linkline,
.profile-bio {
  margin: 0;
  text-wrap: balance;
}

.profile-name {
  position: relative;
  display: grid;
  min-height: clamp(2.15rem, 8vw, 3.1rem);
  place-items: center;
  font-size: clamp(2.15rem, 8vw, 3.1rem);
  font-weight: 800;
  line-height: 0.95;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.2);
}

.profile-name span {
  grid-area: 1 / 1;
}

.intro-name {
  color: rgba(248, 248, 248, 0.78);
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.12),
    0 0 34px rgba(255, 255, 255, 0.06);
  visibility: hidden;
}

.final-name {
  opacity: 1;
}

.profile-stack {
  display: grid;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  justify-items: center;
}

.profile-linkline {
  margin-top: 7px;
  color: rgba(248, 248, 248, 0.86);
  font-size: clamp(1.02rem, 3.2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.45;
}

.profile-linkline a {
  border-bottom: 1px solid rgba(248, 248, 248, 0.22);
  transition: color 180ms ease, border-color 180ms ease;
}

.profile-linkline a:hover {
  color: #fff;
  border-color: rgba(248, 248, 248, 0.62);
}

.profile-bio {
  margin-top: 6px;
  color: var(--muted);
  font-size: clamp(0.76rem, 2.6vw, 0.93rem);
  line-height: 1.5;
}

.now-playing {
  position: relative;
  display: grid;
  width: min(100%, 270px);
  min-height: 61px;
  margin: 13px auto 0;
  place-items: center;
  padding: 14px 16px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.now-playing::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-120%);
  animation: sheen 4s ease-in-out infinite;
}

.now-label,
.track {
  position: relative;
  max-width: 100%;
}

.now-label {
  color: rgba(248, 248, 248, 0.42);
  font-size: 0.7rem;
  line-height: 1;
}

.track {
  margin-top: 7px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.socials {
  display: flex;
  width: min(100%, 212px);
  margin: 15px auto 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.social-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: rgba(248, 248, 248, 0.82);
  border-radius: 8px;
  transition:
    color 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 1px solid var(--line-strong);
  outline-offset: 3px;
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.view-counter {
  display: inline-flex;
  min-height: 18px;
  margin-top: 2px;
  align-items: center;
  gap: 5px;
  color: rgba(248, 248, 248, 0.42);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.view-counter svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  opacity: 0.9;
}

.site-credit {
  position: absolute;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 2;
  margin: 0;
  color: rgba(248, 248, 248, 0.34);
  font-size: clamp(0.62rem, 1.8vw, 0.74rem);
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483647;
  width: 24px;
  height: 24px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  opacity: 0;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.62),
    0 0 18px rgba(255, 255, 255, 0.2);
  transform: translate3d(-999px, -999px, 0) translate3d(-50%, -50%, 0);
  transition:
    width 140ms ease,
    height 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 220ms ease;
  will-change: transform;
}

.cursor::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  content: "";
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
}

.cursor.is-visible {
  opacity: 1;
}

.cursor.is-active {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.76),
    0 0 26px rgba(255, 255, 255, 0.3);
}

.cursor.is-heart {
  width: 22px;
  height: 22px;
  color: #ff9bc8;
  border-color: transparent;
  box-shadow: none;
}

.cursor.is-heart::after {
  width: 20px;
  height: 20px;
  content: "";
  background: transparent;
  background-image: url("assets/love-heart-pink.png?v=2");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 0 5px rgba(255, 145, 196, 0.58));
}

html.js body.is-intro .profile {
  animation: introLift 1.86s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .intro-name {
  visibility: visible;
  animation: introIm 0.9s ease-in-out forwards;
}

html.js body.is-intro .final-name {
  animation: introEvade 0.86s 0.9s ease-out both;
}

html.js body.is-intro .profile-linkline,
html.js body.is-intro .profile-bio,
html.js body.is-intro .now-playing,
html.js body.is-intro .socials,
html.js body.is-intro .view-counter,
html.js body.is-intro .love-toggle,
html.js body.is-intro .archive-toggle,
html.js body.is-intro .music-toggle,
html.js body.is-intro .friends-toggle,
html.js body.is-intro .site-credit {
  opacity: 0;
  transform: translateY(-20px);
}

html.js body.is-intro .profile-linkline {
  animation: fallIn 0.52s 1.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .profile-bio {
  animation: fallIn 0.52s 1.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .now-playing {
  animation: fallIn 0.56s 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .socials {
  animation: fallIn 0.56s 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .view-counter {
  animation: fallIn 0.56s 1.58s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .site-credit {
  animation: fallIn 0.56s 1.68s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .love-toggle {
  animation: fallIn 0.52s 1.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .archive-toggle {
  animation: fallIn 0.52s 1.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .music-toggle {
  animation: fallIn 0.52s 1.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.js body.is-intro .friends-toggle {
  animation: fallIn 0.52s 1.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes introLift {
  0%,
  48% {
    transform: translateY(var(--intro-start-y));
  }
  100% {
    transform: translateY(var(--profile-final-y));
  }
}

@keyframes introIm {
  0% {
    opacity: 0;
    filter: blur(0.8px);
    transform: translateY(0) scale(0.995);
  }
  34%,
  58% {
    opacity: 0.9;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(0.6px);
    transform: translateY(0) scale(0.998);
  }
}

@keyframes introEvade {
  0% {
    opacity: 0;
    filter: blur(0.7px);
    transform: scale(0.998);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes fallIn {
  0% {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(-12px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes driftA {
  from {
    transform: translate3d(-1.8%, -1.2%, 0) scale(1.03);
  }
  to {
    transform: translate3d(2.5%, 1.8%, 0) scale(1.08);
  }
}

@keyframes driftB {
  from {
    transform: translate3d(1%, 2%, 0) scale(1);
  }
  to {
    transform: translate3d(-2.5%, -1%, 0) scale(1.1);
  }
}

@keyframes driftC {
  from {
    transform: translate3d(-2%, 2%, 0) rotate(-2deg);
  }
  to {
    transform: translate3d(2%, -1%, 0) rotate(2deg);
  }
}

@keyframes backgroundDrift {
  from {
    transform: scale(1.07) translate3d(-0.7%, -0.5%, 0);
  }
  to {
    transform: scale(1.1) translate3d(0.7%, 0.6%, 0);
  }
}

@keyframes grainShift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(2px, -3px, 0);
  }
}

@keyframes sheen {
  0%,
  45% {
    transform: translateX(-120%);
  }
  75%,
  100% {
    transform: translateX(120%);
  }
}

html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none;
}

html.is-native-video-fullscreen,
html.is-native-video-fullscreen *,
html.is-native-video-fullscreen video:fullscreen,
html.is-native-video-fullscreen video:-webkit-full-screen {
  cursor: auto !important;
}

html.is-native-video-fullscreen .cursor {
  display: none;
}

@media (any-pointer: coarse) {
  html:not(.has-custom-cursor) .cursor {
    display: none;
  }
}

@media (max-width: 520px) {
  :root {
    --intro-start-y: -3vh;
    --profile-final-y: -12vh;
  }

  body {
    overflow: auto;
  }

  .scene {
    min-height: 100dvh;
    padding: 28px 20px;
  }

  .smoke-bg {
    opacity: 0.58;
    transform: scale(1.15);
  }

  html.bg-forest .forest-bg {
    opacity: 0.72;
    transform: scale(1.16);
  }

  .site-credit {
    right: 72px;
    bottom: calc(54px + env(safe-area-inset-bottom));
    left: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    transition: none;
  }
}
