:root,
[data-theme="light"] {
  --bg: #f3eee6;
  --surface: #fffbf6;
  --fg: #14110f;
  --muted: #7a736c;
  --magenta: #fe2495;
  --cyan: #00ebf6;
  --focus: #00ebf6;
  --border: rgba(20, 17, 15, 0.12);
  --sheet-dim: rgba(20, 17, 15, 0.28);
  --card: 380px;
  --radius: 16px;
  --action: 56px;
  --snap: 200ms;
  --font: "Inter", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #080808;
  --surface: #080808;
  --fg: #fff;
  --muted: #ffffff4d;
  --magenta: #fe2495;
  --cyan: #00ebf6;
  --focus: #00ebf6;
  --border: rgba(255, 255, 255, 0.1);
  --sheet-dim: rgba(8, 8, 8, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: -webkit-fill-available;
}

html.is-sheet-open,
html.is-sheet-open body {
  overflow: hidden;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.app {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overflow-x: hidden;
  max-width: 100%;
}

.chrome {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 0;
  gap: 16px;
}

.paint-drip {
  display: none;
  position: absolute;
  left: 30px;
  top: calc(12px + env(safe-area-inset-top) + 26px);
  width: 11px;
  height: 32px;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
  opacity: 0.72;
}

@media (max-width: 720px) {
  .paint-drip {
    display: block;
  }
}

.lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
}

.lockup-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
}

.lockup-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.lockup-wordmark {
  height: 13px;
  width: auto;
  display: block;
}

.lockup-name {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--fg);
  line-height: 1;
}

.chrome-end {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding-top: 2px;
}

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

.nav-link {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-link.is-active {
  color: var(--fg);
  border-bottom-color: var(--magenta);
}

.nav-link[hidden] {
  display: none;
}

.role-nav {
  gap: 12px;
}

.role-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--muted);
}

.role-nav .nav-link.is-active {
  color: var(--muted);
  border-bottom-color: transparent;
}

.role-nav .nav-link::after {
  content: "";
  width: 12px;
  height: 2px;
  margin-top: 4px;
  background: transparent;
}

.role-nav .nav-link.is-active::after {
  background: #fe2495;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.theme-sun,
.theme-moon {
  grid-area: 1 / 1;
}

[data-theme="light"] .theme-sun,
[data-theme="dark"] .theme-moon {
  display: none;
}

.stage {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0 8px;
  gap: 18px;
}

.intro {
  --door: #fff8f2;
  --door-line: rgba(20, 17, 15, 0.1);
  --door-title: #14110f;
  --door-sub: #7a736c;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

[data-theme="dark"] .intro {
  --door: #1a1a1a;
  --door-line: rgba(255, 255, 255, 0.1);
  --door-title: #fff;
  --door-sub: #ffffff4d;
}

.intro-headline {
  margin: 0;
  font-family: var(--font);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #14110f;
}

[data-theme="dark"] .intro-headline {
  color: #fff;
}

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

.path {
  width: 100%;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 0 20px;
  text-align: left;
  background: var(--door);
  border: 1px solid var(--door-line);
  border-radius: 8px;
  transition: border-color 200ms ease-out, transform 200ms ease-out;
}

.path-label {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--door-title);
}

.path-sub {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: var(--door-sub);
}

@media (hover: hover) {
  .path:hover {
    border-color: #fe2495;
    transform: translateY(-2px);
  }
}

.deck-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.intro[hidden],
.deck-stage[hidden],
.nav[hidden] {
  display: none;
}

.mock-line {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.mock-line a:hover {
  color: var(--fg);
}

.deck-wrap {
  position: relative;
  width: calc(100% - 32px);
  max-width: var(--card);
  aspect-ratio: 3 / 4;
}

.deck,
.ring,
.empty {
  position: absolute;
  inset: 0;
}

.deck {
  touch-action: none;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  user-select: none;
  will-change: transform;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.card.is-front {
  z-index: 3;
  cursor: grab;
}

.card.is-front:active {
  cursor: grabbing;
}

.card.is-ghost-1 {
  z-index: 2;
  transform: translateY(4px) rotate(2deg);
}

.card.is-ghost-2 {
  z-index: 1;
  transform: translateY(4px) rotate(4deg);
}

.card.is-snapping {
  transition: transform var(--snap) ease-out;
}

.scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  background: linear-gradient(
    to top,
    rgba(8, 8, 8, 0.66),
    rgba(8, 8, 8, 0.5) 40%,
    rgba(8, 8, 8, 0.16) 74%,
    transparent
  );
  pointer-events: none;
}

.card-source,
.card-artist,
.card-title,
.card-role {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.card-artist {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.card-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.76);
}

.card-role {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
}

.card-source {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.wash-keep {
  background: rgba(254, 36, 149, 0.08);
}

.wash-pass {
  background: rgba(0, 235, 246, 0.08);
}

.ring {
  border-radius: var(--radius);
  box-shadow: 0 0 0 2px var(--cyan);
  z-index: 4;
  pointer-events: none;
}

.empty {
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  z-index: 2;
}

.empty[hidden],
.ring[hidden],
.sheet[hidden] {
  display: none;
}

.talk-transcript {
  width: 100%;
  margin-top: 18px;
  resize: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 10px;
}

.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.sheet-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 28px;
}

.sheet-confirm,
.sheet-primary {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--magenta);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 16px;
}

.sheet-primary {
  min-height: 44px;
  padding: 0 18px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding-bottom: 12px;
}

.action {
  width: var(--action);
  height: var(--action);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}

.action-pass {
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--muted);
}

.action-keep {
  color: #fff;
  background: var(--magenta);
}

.footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  max-width: 100%;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--sheet-dim);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-width: min(420px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.sheet-kicker,
.sheet-artist,
.sheet-continue {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-kicker,
.sheet-title,
.sheet-artist {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sheet-artist a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sheet-title {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.sheet-artist {
  margin-top: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.sheet-continue {
  margin-top: 28px;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
}

.sheet-row .sheet-continue,
.sheet-stack .sheet-continue {
  margin-top: 0;
}

@media (min-width: 721px) {
  .paint-drip {
    display: none;
    opacity: 0;
  }

  .lockup-name {
    font-size: 22px;
  }

  .lockup-mark {
    width: 32px;
    height: 32px;
  }

  .lockup-wordmark {
    height: 15px;
  }

  .chrome {
    padding-top: calc(20px + env(safe-area-inset-top));
  }

  .chrome-end {
    padding-top: 6px;
  }

  .deck-wrap {
    width: var(--card);
  }

  .intro-headline {
    font-size: 36px;
  }
}
