:root {
  --bg: #15131c;
  --bg-panel: #201b2a;
  --bg-panel-soft: rgba(32, 27, 42, 0.8);
  --line: #4c4463;
  --line-strong: #726592;
  --text: #d9d1f7;
  --text-strong: #f1ecff;
  --muted: #a69bbc;
  --accent: #8c73ff;
  --accent-soft: #c8bcff;
  --link: #b2a5ff;
  --reply: #c4b4ff;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(140, 115, 255, 0.11), transparent 22%),
    linear-gradient(180deg, #1a1622, #14111b 45%, #110f17 100%);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.35;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

p,
li,
input,
textarea,
button {
  font: inherit;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.22;
}

.page-shell {
  width: min(100%, 780px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 28px 40px;
  border-inline: 1px solid var(--line);
  background: rgba(23, 19, 31, 0.92);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  align-items: baseline;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.topbar__link,
.topbar__sep,
h1,
h2,
.eyebrow,
.primary-button,
.hero-copy {
  font-family: "IBM Plex Mono", monospace;
}

.topbar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.topbar__link {
  color: var(--muted);
  text-decoration: none;
  transition: color 220ms ease, opacity 220ms ease;
}

.topbar__sep {
  color: var(--muted);
}

.topbar__link:hover,
.topbar__link.is-active {
  color: var(--text-strong);
  background: none;
}

.content-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-block,
.card-block,
.mini-stat {
  padding: 0;
  border: 0;
  background: none;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--text-strong);
  font-size: 1.05rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0 0 14px;
  line-height: 1.1;
}

h1 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  color: var(--text-strong);
}

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2rem);
  color: var(--text-strong);
}

.hero-copy {
  max-width: 100%;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
}

.hero-copy strong {
  font-weight: 700;
  color: var(--text-strong);
}

.hero-followup {
  color: var(--muted);
}

.fun-hint {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 24px));
  transform: translate(-50%, 10px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fun-hint.is-visible {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.fun-hint.is-below {
  transform: translate(-50%, -10px) scale(0.98);
}

.fun-hint.is-below.is-visible {
  transform: translate(-50%, 0) scale(1);
}

.fun-hint__inner {
  border: 1px solid rgba(140, 115, 255, 0.36);
  border-radius: 18px;
  background: rgba(20, 17, 27, 0.98);
  color: var(--text-strong);
  padding: 10px 14px 11px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(8, 6, 12, 0.35);
  font-family: "IBM Plex Mono", "SF Pro Text", "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", monospace;
  line-height: 1.35;
  backdrop-filter: blur(10px);
}

.muted {
  color: var(--muted);
}

.info-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(0, 180px) 1fr;
  gap: 6px 18px;
  align-items: start;
}

.info-row__label {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--text-strong);
  font-weight: 700;
  white-space: nowrap;
}

.label-note {
  display: inline-block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  vertical-align: baseline;
}

.info-row__value {
  color: var(--text-strong);
  min-width: 0;
}

.fact-token {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  transition: opacity 240ms ease, color 240ms ease, filter 240ms ease;
}

.fact-token:hover {
  opacity: 0.72;
  filter: brightness(1.05);
}

.fact-token:focus-visible {
  outline: 1px dashed var(--accent);
  outline-offset: 2px;
}

.fun-color-swatch {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.45rem;
  vertical-align: -0.12rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--swatch);
}

.fun-flag {
  width: 0.96rem;
  height: 0.96rem;
  margin-right: 0.48rem;
  vertical-align: -0.12rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.stacked-fact {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.3;
}

.stacked-fact__lead {
  color: var(--muted);
  margin-right: 0.42rem;
}

.info-subtle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.mono-wrap {
  word-break: break-word;
}

.section-copy {
  margin-bottom: 16px;
}

.guestbook-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--bg-panel-soft);
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 137, 161, 0.7) rgba(255, 255, 255, 0.04);
}

.guestbook-panel::-webkit-scrollbar {
  width: 10px;
}

.guestbook-panel::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.guestbook-panel::-webkit-scrollbar-button:single-button,
.guestbook-panel::-webkit-scrollbar-button:start,
.guestbook-panel::-webkit-scrollbar-button:end,
.guestbook-panel::-webkit-scrollbar-button:increment,
.guestbook-panel::-webkit-scrollbar-button:decrement {
  display: none;
  width: 0;
  height: 0;
}

.guestbook-panel::-webkit-scrollbar-track {
  margin: 12px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.guestbook-panel::-webkit-scrollbar-thumb {
  border: 2px solid rgba(35, 27, 33, 0.72);
  border-radius: 999px;
  background: rgba(157, 137, 161, 0.75);
}

.guestbook-entry {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(123, 93, 112, 0.36);
}

.guestbook-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guestbook-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.guestbook-entry__meta strong {
  color: var(--text-strong);
}

.guestbook-entry__body,
.guestbook-entry__reply {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

.guestbook-entry__reply {
  margin-top: 8px;
  color: var(--reply);
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.guestbook-form__controls,
.guestbook-form__footer,
.guestbook-form__actions,
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.guestbook-compose {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(35, 27, 33, 0.9);
  overflow: hidden;
}

.guestbook-form textarea {
  width: 100%;
  min-height: 148px;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  padding: 18px 20px 12px;
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 1.25;
}

.guestbook-form__footer {
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid rgba(123, 93, 112, 0.36);
  background: rgba(255, 255, 255, 0.02);
}

.guestbook-compose:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(183, 118, 246, 0.18);
}

.guestbook-form textarea:focus {
  outline: 0;
}

.primary-button {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  padding: 8px 16px;
  transition: background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
  background: rgba(183, 118, 246, 0.16);
  color: var(--text-strong);
}

.primary-button:hover {
  background: rgba(183, 118, 246, 0.28);
}

.form-feedback {
  min-height: 1.2rem;
  color: var(--link);
  font-size: 0.92rem;
}

.checkbox-row input[type="checkbox"] {
  accent-color: var(--line-strong);
}

.accent-card {
  padding: 16px;
  border: 1px solid rgba(183, 118, 246, 0.32);
  border-radius: 18px;
  background: rgba(72, 45, 90, 0.12);
}

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.7;
}

.spotify-card {
  display: grid;
  grid-template-columns: minmax(0, 132px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--bg-panel-soft);
}

.spotify-card__status,
.spotify-empty,
.spotify-recent p {
  color: var(--muted);
}

.spotify-empty,
.spotify-card__status {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  white-space: pre-wrap;
  line-height: 1.45;
  padding: 18px;
  margin: 0;
}

.spotify-track {
  display: contents;
}

.spotify-track__cover {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.spotify-track__cover.is-fallback {
  display: grid;
  place-items: center;
}

.spotify-track__cover.is-fallback::after {
  content: 'no cover';
  color: var(--muted);
  font-size: 0.82rem;
}

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

.spotify-track__details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spotify-track__name {
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  color: var(--text-strong);
}

.spotify-track__meta {
  color: var(--muted);
}

.spotify-track__progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.spotify-track__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--text), var(--accent));
  will-change: width;
  transition: none;
}

.spotify-track__times {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.spotify-recent {
  display: grid;
  gap: 12px;
}

.spotify-recent__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(123, 93, 112, 0.36);
  border-radius: 18px;
  background: rgba(35, 27, 33, 0.72);
  text-decoration: none;
}

.spotify-recent__item img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.spotify-recent__item-name {
  color: var(--text-strong);
}

.spotify-recent__item-artists {
  color: var(--muted);
  font-size: 0.9rem;
}

.links-grid {
  display: grid;
  gap: 14px;
}

.link-card {
  padding: 16px;
  border: 1px solid rgba(114, 101, 146, 0.42);
  border-radius: 18px;
  background: rgba(32, 27, 42, 0.65);
}

.link-card.is-disabled {
  opacity: 0.88;
}

.link-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.donate-list {
  display: grid;
  gap: 14px;
}

.donate-item {
  display: grid;
  gap: 8px;
}

.donate-item__label {
  color: var(--text-strong);
  font-weight: 700;
}

.donate-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(123, 93, 112, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-strong);
  padding: 6px 10px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, background-color 220ms ease, opacity 220ms ease;
}

.copy-chip:hover {
  border-color: var(--accent);
  color: var(--text-strong);
}

.copy-chip__value {
  max-width: min(44ch, 68vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-chip__hint {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: lowercase;
}

.copy-chip__icon {
  font-size: 0.92rem;
  line-height: 1;
}

.copy-chip--link {
  color: var(--muted);
}

.site-footer {
  margin-top: 26px;
  padding-top: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.site-footer__chip {
  padding: 4px 10px;
  color: var(--muted);
}

.site-footer span {
  color: inherit;
}

.site-footer__line {
  width: 100%;
  height: 1px;
  margin-bottom: 14px;
  background: rgba(123, 93, 112, 0.5);
}

@media (max-width: 760px) {
  .page-shell {
    padding: 22px 18px 32px;
  }

  .info-row,
  .spotify-card {
    grid-template-columns: 1fr;
  }

  .topbar {
    justify-content: flex-start;
  }

  .guestbook-form__footer {
    align-items: stretch;
  }

  .guestbook-form__actions {
    width: 100%;
    justify-content: space-between;
  }

  .copy-chip__value {
    max-width: 60vw;
  }

}
