:root {
  --ink: #08090c;
  --basalt: #121418;
  --panel: #191b20;
  --panel-soft: #21242a;
  --line: #3b3836;
  --line-strong: #605851;
  --text: #d8fff7;
  --muted: #a9cbc6;
  --soft: #897f73;
  --accent: #88d4c5;
  --accent-strong: #d2a84d;
  --danger: #b44a42;
  --moss: #74a06d;
  --moon: #f2ead8;
  --fur: #1b2028;
  --fur-dark: #050608;
  --stage-bg: #263432;
  --frame-color: #9ab5b6;
  --fur-color: #8fa7ad;
  --eye-color: #dff9ff;
  --aura-color: #b9d8d6;
  --mist-color: rgba(212, 232, 227, 0.45);
  --glow-color: rgba(195, 238, 236, 0.62);
  --overlay-color: rgba(180, 220, 218, 0.30);
  --shadow-color: rgba(7, 12, 15, 0.92);
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(3, 5, 8, 0.78), rgba(3, 5, 8, 0.88)),
    radial-gradient(circle at 24% 8%, rgba(125, 224, 202, 0.13), transparent 26%),
    radial-gradient(circle at 88% 22%, rgba(84, 55, 133, 0.16), transparent 30%),
    url("./bilder/Schattenwolfschmiede-Hintergrund.webp") center / cover no-repeat;
  opacity: 0.64;
}

body::after {
  z-index: 0;
  width: 190vw;
  left: -45vw;
  background:
    radial-gradient(ellipse at 18% 32%, rgba(158, 249, 229, 0.13), transparent 32%),
    radial-gradient(ellipse at 48% 66%, rgba(189, 154, 255, 0.10), transparent 34%),
    radial-gradient(ellipse at 82% 30%, rgba(116, 223, 201, 0.10), transparent 28%),
    linear-gradient(92deg, transparent 0%, rgba(210, 255, 246, 0.08) 42%, transparent 76%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 55% 100%;
  filter: blur(30px);
  opacity: 0.74;
  animation: mysticMist 34s ease-in-out infinite alternate;
}

@keyframes mysticMist {
  from {
    transform: translate3d(-4%, 0, 0) scale(1);
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  to {
    transform: translate3d(7%, -2%, 0) scale(1.04);
    background-position: 0 0, 0 0, 0 0, 100% 0;
  }
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 42px);
}

.workbench {
  width: min(1480px, 100%);
  margin: 0 auto;
  min-width: 0;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 4px 0 22px;
  border-bottom: 1px solid rgba(244, 238, 227, 0.14);
  min-width: 0;
}

.title-block {
  max-width: 820px;
  min-width: 0;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.54))
    drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 42%, transparent));
}

.eyebrow,
.question-count,
.result-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
  font-size: 3.7rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.6;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.tool-button,
.step-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(244, 238, 227, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.tool-button:hover,
.step-button:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 238, 227, 0.34);
  background: rgba(255, 255, 255, 0.10);
}

.tool-button.primary,
.step-button.primary {
  background: var(--accent);
  border-color: transparent;
  color: #07100f;
  font-weight: 800;
}

.tool-button.accent {
  background: var(--accent-strong);
  border-color: transparent;
  color: #171009;
  font-weight: 800;
}

.app-grid {
  display: grid;
  grid-template-columns: 220px minmax(360px, 1fr) minmax(380px, 520px);
  gap: 18px;
  align-items: start;
  margin-top: 22px;
  min-width: 0;
}

.question-tabs,
.question-panel,
.result-panel,
.history-band {
  border: 1px solid rgba(244, 238, 227, 0.13);
  border-radius: var(--radius);
  background: rgba(25, 27, 32, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  min-width: 0;
}

.site-footer {
  margin-top: 18px;
  padding: 16px 0 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.question-tabs {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.tab-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.tab-button[aria-current="true"] {
  border-color: color-mix(in srgb, var(--accent) 68%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--text);
}

.tab-index {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-strong);
  font-weight: 900;
}

.tab-label {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.question-panel {
  min-height: 640px;
  padding: clamp(18px, 2vw, 26px);
}

.question-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.question-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  line-height: 1.08;
}

.question-head p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(244, 238, 227, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
  min-width: 0;
}

.option-card > span {
  min-width: 0;
}

.option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 238, 227, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.option-card:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.04));
}

.option-card input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.option-title {
  display: block;
  color: var(--text);
  font-weight: 800;
  line-height: 1.3;
}

.option-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
}

.result-panel {
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.result-panel.is-revealed {
  animation: resultPanelMist 720ms ease both;
}

.wolf-stage {
  position: relative;
  min-height: clamp(360px, 38vw, 480px);
  border-bottom: 1px solid rgba(244, 238, 227, 0.12);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, var(--glow-color), transparent 28%),
    radial-gradient(circle at 18% 82%, var(--overlay-color), transparent 34%),
    linear-gradient(145deg, var(--stage-bg), var(--shadow-color) 72%),
    #0c0d10;
}

.stage-ambient,
.wolf-portrait,
.wolf-halo,
.seal-mark {
  position: absolute;
}

.stage-ambient {
  inset: 0;
  pointer-events: none;
}

.ambient-line {
  position: absolute;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--aura-color), transparent);
  opacity: 0.36;
  transform: rotate(-18deg);
}

.line-one {
  top: 22%;
  left: -8%;
  width: 66%;
}

.line-two {
  right: -12%;
  bottom: 22%;
  width: 78%;
  transform: rotate(14deg);
}

.mist {
  position: absolute;
  width: 52%;
  height: 16%;
  border-radius: 999px;
  background: var(--mist-color);
  filter: blur(22px);
  opacity: 0.48;
}

.mist-one {
  left: -10%;
  top: 48%;
}

.mist-two {
  right: -12%;
  bottom: 8%;
}

.wolf-portrait {
  inset: 24px 18px 44px;
  display: grid;
  place-items: center;
  margin: 0;
}

.wolf-halo {
  top: 50%;
  left: 50%;
  width: min(82%, 420px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--frame-color) 44%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 22%),
    radial-gradient(circle, var(--glow-color), transparent 58%);
  box-shadow:
    0 0 46px var(--glow-color),
    inset 0 0 46px rgba(255, 255, 255, 0.06);
  opacity: 0.78;
  transform: translate(-50%, -50%);
}

.wolf-halo::after {
  content: "";
  position: absolute;
  top: 46%;
  left: 50%;
  width: 82px;
  height: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 50%, var(--eye-color), transparent 20%),
    radial-gradient(circle at 64% 50%, var(--eye-color), transparent 20%);
  filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, -50%);
}

.wolf-image {
  position: relative;
  z-index: 2;
  display: block;
  width: min(92%, 455px);
  height: auto;
  max-height: calc(clamp(360px, 38vw, 480px) - 56px);
  object-fit: contain;
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.variant-caption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--frame-color) 54%, transparent);
  border-radius: var(--radius);
  background: rgba(8, 9, 12, 0.48);
  color: var(--muted);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.variant-caption span:first-child {
  color: var(--accent);
}

.seal-mark {
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 170px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--frame-color) 58%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 42px rgba(0, 0, 0, 0.6),
    inset 0 0 22px color-mix(in srgb, var(--frame-color) 22%, transparent);
  transform: translate(-50%, -50%);
  transition:
    opacity 520ms ease,
    transform 700ms ease;
}

.seal-mark span {
  position: absolute;
  inset: 50% 16px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--frame-color), transparent);
  transform-origin: center;
  opacity: 0.82;
}

.seal-mark span:nth-child(1) {
  transform: rotate(0deg);
}

.seal-mark span:nth-child(2) {
  transform: rotate(60deg);
}

.seal-mark span:nth-child(3) {
  transform: rotate(120deg);
}

.result-panel.is-sealed .wolf-stage {
  background:
    radial-gradient(circle at 50% 35%, rgba(170, 190, 190, 0.12), transparent 22%),
    linear-gradient(145deg, #111417, #050607 78%);
}

.result-panel.is-sealed .wolf-image {
  opacity: 0.16;
  filter:
    grayscale(1)
    brightness(0.42)
    contrast(1.36)
    blur(7px)
    drop-shadow(0 20px 28px rgba(0, 0, 0, 0.86));
  transform: scale(0.96);
}

.result-panel.is-sealed .wolf-halo {
  opacity: 0.24;
}

.result-panel.is-revealed .seal-mark {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.28) rotate(14deg);
  pointer-events: none;
}

.result-panel.is-revealed .wolf-image {
  animation: revealWolf 620ms ease both;
}

.result-panel.is-revealed .wolf-halo::after {
  animation: auraEyePulse 3.8s ease-in-out 2;
}

.result-panel.is-revealed .result-content {
  animation: resultContentRise 680ms ease both;
}

.result-panel.is-revealed #wolfName {
  animation: nameGlow 1.8s ease both;
}

.result-panel.is-revealed .ability-item {
  animation: abilityFade 520ms ease both;
}

.result-panel.is-revealed .ability-item:nth-child(2) {
  animation-delay: 90ms;
}

.result-panel.is-revealed .ability-item:nth-child(3) {
  animation-delay: 180ms;
}

@keyframes resultPanelMist {
  from {
    opacity: 0.86;
    transform: translateY(14px);
    box-shadow:
      0 18px 60px rgba(0, 0, 0, 0.30),
      0 0 0 rgba(255, 255, 255, 0);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    box-shadow: var(--shadow);
  }
}

@keyframes revealWolf {
  from {
    opacity: 0.36;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes resultContentRise {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes nameGlow {
  0% {
    text-shadow: 0 0 0 transparent;
  }

  48% {
    text-shadow:
      0 0 18px color-mix(in srgb, var(--accent) 58%, transparent),
      0 0 34px color-mix(in srgb, var(--eye-color) 36%, transparent);
  }

  100% {
    text-shadow: 0 0 0 transparent;
  }
}

@keyframes auraEyePulse {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
  }

  45% {
    opacity: 0.58;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes abilityFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-content {
  padding: 20px;
}

.result-content h2 {
  margin: 0;
  font-size: clamp(2rem, 3.3vw, 3.2rem);
  line-height: 0.98;
}

.wolf-title {
  margin: 8px 0 0;
  color: var(--accent-strong);
  font-size: 1.05rem;
  font-weight: 900;
}

.result-copy {
  margin: 18px 0;
  color: var(--muted);
  line-height: 1.55;
}

.wolf-whisper {
  position: relative;
  margin: 18px 0;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, transparent), transparent 72%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--glow-color) 12%, transparent);
  overflow: hidden;
}

.wolf-whisper::before {
  content: "";
  position: absolute;
  inset: auto -12% -28% 18%;
  height: 58px;
  border-radius: 999px;
  background: var(--mist-color);
  filter: blur(22px);
  opacity: 0.22;
  pointer-events: none;
}

.whisper-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#wolfWhisperText {
  position: relative;
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item,
.ability-item,
.history-item {
  border: 1px solid rgba(244, 238, 227, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.detail-item {
  min-height: 74px;
  padding: 12px;
}

.detail-label,
.ability-type {
  display: block;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-value {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-weight: 760;
  line-height: 1.35;
}

.ability-strip {
  margin-top: 18px;
}

.ability-strip h3,
.history-band h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

#abilityList {
  display: grid;
  gap: 9px;
}

.ability-item {
  padding: 12px;
}

.ability-name {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-weight: 900;
}

.ability-description {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.43;
}

.history-band {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
  padding: 18px;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.history-item {
  min-height: 110px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item strong {
  font-size: 1.05rem;
}

.history-item span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.empty-history {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(244, 238, 227, 0.18);
  border-radius: var(--radius);
  background: rgba(18, 20, 24, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}

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

@media (max-width: 1180px) {
  .app-grid {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .result-panel {
    position: relative;
    top: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 12px;
  }

  .masthead,
  .history-band {
    grid-template-columns: 1fr;
  }

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

  .brand-lockup {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
  }

  .brand-logo {
    width: 78px;
    height: 78px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .question-tabs {
    position: relative;
    top: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab-button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 56px;
    text-align: center;
  }

  .tab-label {
    display: none;
  }

  .question-panel {
    min-height: 0;
  }

  .history-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 12px 18px 12px 12px;
  }

  .workbench {
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  h1 {
    font-size: 2rem;
    line-height: 1.04;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .lead,
  .question-head p:last-child {
    font-size: 0.96rem;
  }

  .toolbar,
  .question-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-button,
  .step-button {
    width: 100%;
    padding-inline: 10px;
    line-height: 1.15;
  }

  .question-tabs {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    gap: 6px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .result-panel.is-revealed,
  .result-panel.is-revealed .result-content,
  .result-panel.is-revealed #wolfName,
  .result-panel.is-revealed .ability-item {
    animation-duration: 420ms;
  }

  .result-panel.is-revealed .wolf-halo::after {
    animation-duration: 2.8s;
  }
}
