:root {
  --ink: #f8f8ff;
  --muted: #c3c5d5;
  --card: rgba(77, 79, 139, .72);
  --card-hover: rgba(94, 97, 160, .82);
  --line: rgba(248, 248, 255, .28);
  --control: rgba(248, 248, 255, .1);
  --control-icon: #202238;
  --pill: rgba(32, 34, 56, .42);
  --content-width: 720px;
}

* { box-sizing: border-box; }

html { background: #303349; scroll-behavior: smooth; }

body {
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: transparent;
  font: 400 16px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  min-height: 100dvh;
  background: linear-gradient(
    to bottom,
    #68696d 0%,
    #66676c 10%,
    #60626a 20%,
    #565968 32%,
    #484c61 45%,
    #393d55 58%,
    #2a2e45 73%,
    #1b1c30 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-attachment: scroll;
}

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.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;
}

[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  z-index: 10;
  top: -5rem;
  left: 1rem;
  padding: .75rem 1rem;
  border-radius: .4rem;
  color: #202238;
  background: #f8f8ff;
  font-weight: 700;
}

.skip-link:focus { top: 1rem; }

.page-content {
  position: relative;
  z-index: 0;
  width: min(100%, var(--content-width));
  min-height: 100dvh;
  margin-inline: auto;
  padding: 0 12px 140px;
}

.profile-hero {
  position: relative;
  width: 100%;
}

.hero-portrait {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  -webkit-mask-image: radial-gradient(
    ellipse 60% 76% at 50% 30%,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, .92) 36%,
    rgba(0, 0, 0, .68) 45%,
    rgba(0, 0, 0, .38) 54%,
    rgba(0, 0, 0, .12) 62%,
    transparent 70%
  );
  mask-image: radial-gradient(
    ellipse 60% 76% at 50% 30%,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, .92) 36%,
    rgba(0, 0, 0, .68) 45%,
    rgba(0, 0, 0, .38) 54%,
    rgba(0, 0, 0, .12) 62%,
    transparent 70%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.hero-actions {
  position: absolute;
  z-index: 2;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-action,
.share-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 34, 56, .55);
  border-radius: 50%;
  color: var(--control-icon);
  background: var(--control);
  box-shadow: 0 2px 10px rgba(32, 34, 56, .12);
}

.profile-action { text-decoration: none; }

.profile-action svg,
.share-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-button {
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.profile-action:hover,
.share-button:hover { background: rgba(248, 248, 255, .9); }

.site-header {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.share-status {
  position: absolute;
  top: 50px;
  right: 0;
  width: min(280px, 80vw);
  margin: 0;
  color: #f8f8ff;
  text-align: right;
  text-shadow: 0 1px 4px rgba(32, 34, 56, .9);
  font-size: .8rem;
}

.share-fallback {
  position: absolute;
  z-index: 4;
  top: 3.5rem;
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #3e3f75;
  box-shadow: 0 8px 22px rgba(32, 34, 56, .24);
}

.share-fallback label {
  display: block;
  margin-bottom: .4rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.share-fallback-controls { min-width: 0; display: flex; gap: .5rem; }

.share-fallback input {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  color: var(--ink);
  background: rgba(32, 34, 56, .24);
  font: inherit;
  font-size: .78rem;
}

.share-fallback-copy {
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid rgba(32, 34, 56, .35);
  border-radius: .3rem;
  color: #202238;
  background: #f8f8ff;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}

.share-fallback p { margin: .55rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.35; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: -5.5rem auto 0;
  padding: 0 12px;
  text-align: center;
}

.profile-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.6rem, 14vw, 5rem);
  font-weight: 850;
  line-height: .96;
  letter-spacing: -.06em;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(32, 34, 56, .2);
}

.profile-description {
  max-width: 30ch;
  margin: .75rem auto 1rem;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  font-size: clamp(.95rem, 3.7vw, 1.08rem);
  font-weight: 650;
  line-height: 1.42;
  text-shadow: 0 2px 8px rgba(32, 34, 56, .48);
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.1;
}

.live-dot {
  width: .7rem;
  height: .7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 2px rgba(229, 72, 77, .18);
}

.social-list {
  display: flex;
  justify-content: center;
  gap: clamp(.8rem, 5vw, 1.35rem);
}

.social-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, opacity .18s ease;
}

.social-link svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-link:hover { transform: translateY(-2px); opacity: .76; }

.follower-count {
  width: fit-content;
  margin: .45rem auto 0;
  padding: .2rem .7rem;
  border-radius: 999px;
  color: var(--muted);
  background: var(--pill);
  font-size: .72rem;
  line-height: 1.35;
}

.twitch-link-card { position: relative; }

.link-card.twitch-collapsible {
  display: block;
  padding: .7rem .9rem;
}

.link-card.twitch-regular { display: none; }

.link-card-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
}

.link-card-summary::-webkit-details-marker { display: none; }

.twitch-title-link {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  color: inherit;
  text-decoration: none;
}

.dropdown-indicator {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}

.dropdown-indicator svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  overflow: visible;
}

.dropdown-indicator .menu-line {
  transform-origin: 12px 12px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.twitch-collapsible[open] .menu-line-top {
  transform: translateY(5px) rotate(45deg);
}

.twitch-collapsible[open] .menu-line-middle {
  opacity: 0;
}

.twitch-collapsible[open] .menu-line-bottom {
  transform: translateY(-5px) rotate(-45deg);
}

.twitch-collapsible .twitch-player-stage { margin-top: .75rem; }

.twitch-player-stage {
  aspect-ratio: 16 / 9;
  margin-top: 0;
}

.twitch-handoff {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 .85rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(32, 34, 56, .24);
}

.twitch-embed-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(248, 248, 255, .18);
  border-radius: .75rem;
  background: #202238;
}

.twitch-embed-container iframe { width: 100%; height: 100%; display: block; border: 0; }

.twitch-direct-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}

.twitch-direct-link span { color: var(--ink); font-size: 1.1rem; }

.link-list {
  display: grid;
  gap: .875rem;
  margin-top: 1.5rem;
}

.profile-links { display: grid; gap: .875rem; }

.link-card,
.tool-link {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: .7rem;
  padding: .7rem .9rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  color: var(--ink);
  background: var(--card);
  box-shadow: none;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tool-link { grid-template-columns: 38px minmax(0, 1fr) 24px; }

.tool-link.coming-soon {
  color: var(--ink);
  background: var(--card);
  border-color: rgba(255, 255, 255, .14);
  filter: none;
}

.tool-link.coming-soon .tool-icon,
.tool-link.coming-soon .card-arrow {
  color: var(--ink);
}

.tool-link.coming-soon .tool-copy small {
  color: var(--muted);
}

.tool-link.coming-soon .tool-status {
  color: #ff8a90;
  font-size: .72em;
  font-weight: 800;
  letter-spacing: .04em;
}

.link-card:hover,
.tool-link:hover {
  border-color: rgba(255, 255, 255, .24);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.tool-link.coming-soon:hover {
  background: var(--card-hover);
  border-color: rgba(248, 248, 255, .24);
}

.link-card:focus,
.tool-link:focus,
.link-card-summary:focus {
  outline: none;
}

.link-card:focus-visible,
.tool-link:focus-visible {
  outline: 2px solid rgba(245, 245, 255, .9);
  outline-offset: 3px;
  border-color: rgba(245, 245, 255, .48);
  box-shadow: 0 0 0 5px rgba(179, 183, 255, .18);
}

.link-card:active,
.tool-link:active {
  transform: translateY(0);
  background: rgba(66, 68, 123, .86);
}

.card-icon,
.tool-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.twitch-collapsible:has(> .link-card-summary:focus-visible) {
  outline: 2px solid rgba(245, 245, 255, .9);
  outline-offset: 3px;
  border-color: rgba(245, 245, 255, .48);
  box-shadow: 0 0 0 5px rgba(179, 183, 255, .18);
}

.card-icon svg,
.tool-icon svg { width: 22px; height: 22px; fill: currentColor; }

.card-copy,
.tool-copy { min-width: 0; display: grid; gap: .1rem; }

.card-copy strong,
.tool-copy strong { overflow-wrap: anywhere; font-size: .94rem; line-height: 1.25; }

.card-copy small,
.tool-copy small { overflow-wrap: anywhere; color: var(--muted); font-size: .76rem; line-height: 1.35; }

.card-menu {
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
}

.tools-section {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(248, 248, 255, .22);
}

.tools-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: none;
}

.tools-description { margin: .35rem 0 1rem; color: var(--muted); font-size: .88rem; }

.tools-list { display: grid; gap: .875rem; }

.card-arrow { color: var(--muted); font-size: 1.25rem; text-align: center; }

footer { padding-top: 2rem; color: var(--muted); font-size: .75rem; text-align: center; }
footer p { margin: 0; }

/* The tool routes share the same typography and slate-indigo color field. */
.tool-page-shell {
  min-height: 100dvh;
}
.tool-header { padding-top: max(16px, env(safe-area-inset-top)); }
.tool-back-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; }
.tool-page-main { width: min(100% - 32px, 620px); margin-inline: auto; padding-top: clamp(8rem, 22vh, 13rem); }
.tool-page-main h1 { max-width: 12ch; margin: 0; font-size: clamp(2.6rem, 10vw, 4.45rem); line-height: .97; letter-spacing: -.055em; }
.tool-purpose { max-width: 42ch; margin: 1rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.tool-about { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(248, 248, 255, .22); }
.tool-about h2 { margin: 0; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.tool-about p { max-width: 48ch; margin: .75rem 0 0; color: var(--muted); line-height: 1.6; }
.tool-page-footer { margin-top: auto; padding: 2rem 0 max(30px, env(safe-area-inset-bottom)); color: var(--muted); font-size: .75rem; }
.tool-page-footer p { margin: 0; }

.coming-soon-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 32px, 620px);
  margin-inline: auto;
  padding-top: clamp(2rem, 8vh, 6rem);
  text-align: center;
}

.coming-soon-portrait-link {
  display: block;
  width: min(100%, 34rem);
  border-radius: 1.25rem;
}

.coming-soon-portrait {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  box-shadow: 0 18px 45px rgba(24, 25, 43, .28);
}

.coming-soon-tool {
  margin: 1.5rem 0 .35rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.coming-soon-main h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.6rem, 11vw, 5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.coming-soon-back {
  margin: 1.35rem 0 0;
}

.coming-soon-back a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: .2em;
}

.minimal-coming-soon-page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100% - 32px, 620px);
  margin-inline: auto;
  padding: 2rem 0;
  gap: 1.5rem;
  text-align: center;
}

.coming-soon-portrait-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: min(330px, 72vw);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
  text-decoration: none;
}

.minimal-coming-soon-page .coming-soon-portrait {
  display: block;
  width: min(330px, 72vw);
  height: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  mix-blend-mode: normal;
  opacity: 1;
}

.minimal-coming-soon-page h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.6rem, 11vw, 5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.back-to-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.back-to-main:hover {
  background: rgba(255, 255, 255, .18);
  transform: translateY(-1px);
}

.back-to-main:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 360px) {
  .hero-actions { right: 12px; left: 12px; }
  .hero-content { margin-top: -4.75rem; padding-inline: 4px; }
  .social-list { gap: .55rem; }
  .link-card { grid-template-columns: 36px minmax(0, 1fr) 20px; gap: .55rem; padding-inline: .65rem; }
  .tool-link { grid-template-columns: 36px minmax(0, 1fr) 20px; gap: .55rem; padding-inline: .65rem; }
}

@media (max-width: 423px) {
  .link-card.twitch-collapsible { display: none; }
  .link-card.twitch-regular { display: grid; }
}

@media (min-width: 700px) {
  .page-content { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
  .hero-actions { right: 24px; left: 24px; }
  .hero-content { margin-top: -8rem; }
  .profile-copy h1 { font-size: clamp(3.4rem, 8vw, 5rem); }
  .twitch-player-stage { min-height: 0; }
}

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