:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #5f6368;
  --line: #e5e7eb;
  --soft: #f7f7f8;
  --primary: #111111;
  --primary-hover: #2c2c2c;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.home-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero-card,
.panel {
  width: min(900px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 42px;
  background: #fff;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.06);
}

.hero-card {
  text-align: center;
}

.hero-card h1 {
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1;
  margin: 10px 0 20px;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.eyebrow,
.question-group {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.button-row.split {
  justify-content: space-between;
  margin-top: 28px;
}

.btn {
  border: 1px solid var(--primary);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  transition: 0.15s ease;
}

.btn.primary {
  background: var(--primary);
  color: white;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: white;
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--soft);
}

.page {
  min-height: 100vh;
  padding: 32px 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.panel.narrow {
  width: min(620px, 100%);
}

.back-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.small {
  font-size: 14px;
}

.question-card {
  display: none;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.question-card.active {
  display: block;
}

.question-progress {
  color: var(--muted);
  font-size: 14px;
}

.question-card h2 {
  margin-bottom: 10px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.question-text {
  font-size: 18px;
  line-height: 1.6;
}

.scale-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 26px 0 12px;
  color: var(--muted);
}

.scale-labels span:last-child {
  text-align: right;
}

.scale-labels strong {
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 10px;
}

input[type="range"] {
  width: 100%;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.option-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--soft);
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.option-box:hover {
  border-color: #111;
}

.instruction {
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.examples {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.examples div {
  border-left: 3px solid #111;
  padding: 10px 14px;
  background: var(--soft);
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  resize: vertical;
}

.code-box {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 6px;
  margin: 20px 0;
}

.code-box span {
  color: var(--muted);
}

.code-box strong {
  font-size: 24px;
}

.summary {
  font-size: 18px;
  line-height: 1.6;
}

.score-list {
  display: grid;
  gap: 16px;
}

.score-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bar {
  height: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #111;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
}

.scenario-result {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
}

pre {
  white-space: pre-wrap;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  line-height: 1.5;
}

.code-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.lookup-result,
.error-box {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: var(--soft);
}

@media (max-width: 640px) {
  .hero-card,
  .panel {
    padding: 24px;
  }

  .button-row.split {
    flex-direction: column;
  }

  .scale-labels {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .scale-labels span:last-child {
    text-align: left;
  }
}


/* Optional: Zusatzdesign für die Top-3-Karten auf der Ergebnis-Seite */
.top-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 16px 0 28px;
}

.top-card {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.top-rank {
  color: var(--muted);
  font-weight: 700;
}

.player-type-hero {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 14px;
  padding: 22px;
  margin: 24px 0;
}

.player-type-hero h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.04em;
}

.type-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.type-detail-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}

.type-detail-card h3 {
  margin-top: 0;
}

.score-label-with-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 75%;
}

.info-icon {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-weight: 800;
  cursor: help;
  line-height: 1;
}

.info-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 28px;
  z-index: 10;
  width: min(340px, 80vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  line-height: 1.5;
}

.score-label-with-info:hover .info-tooltip,
.score-label-with-info:focus-within .info-tooltip {
  display: block;
}

.scale-hint {
  min-width: min(280px, 100%);
  text-align: center;
}

.scenario-intro {
  border-left: 4px solid #111;
}

.examples-details {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.examples-details summary {
  cursor: pointer;
  padding: 14px;
  font-weight: 700;
  background: var(--soft);
}

.examples-details .examples {
  padding: 14px;
  margin: 0;
}

/* Phase 2: Account light / Ergebnis-Historie */
.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font: inherit;
}

.auth-switch a,
.instruction a {
  color: var(--text);
  font-weight: 700;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.profile-stats article {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 6px;
}

.profile-stats strong {
  font-size: 32px;
  line-height: 1;
}

.profile-stats span {
  color: var(--muted);
  font-size: 14px;
}

.profile-actions {
  justify-content: flex-start;
  margin: 22px 0 30px;
}

.history-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.history-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  background: #fff;
}

.history-card h3 {
  margin: 10px 0 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill.official {
  background: #111;
  border-color: #111;
  color: #fff;
}

.status-pill.repeat {
  background: var(--soft);
  color: var(--muted);
}

.btn.compact {
  width: fit-content;
  margin-top: 8px;
}

code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 6px;
}

@media (max-width: 720px) {
  .profile-header,
  .history-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .profile-header {
    align-items: stretch;
  }

  .history-card .btn {
    width: 100%;
  }
}

/* Fix: einheitliche Kopfzeile mit Account-Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.top-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.top-auth-link,
.top-auth-button {
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
}

.top-auth-link:hover,
.top-auth-button:hover {
  border-color: var(--primary);
  background: var(--soft);
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

/* Fix: Passwortfelder mit Anzeigen/Verbergen-Button */
.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 8px;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  min-width: 0;
}

.password-toggle {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--text);
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
}

.password-toggle:hover {
  border-color: var(--primary);
}

.password-match-hint {
  margin: -6px 0 0;
}

.password-match-hint.is-error {
  color: #b42318;
}

.password-match-hint.is-ok {
  color: #067647;
}

/* Fix: Test-Fragen sollen die Weiter/Zurück-Buttons immer erreichbar halten */
.test-panel {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.question-flow {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.question-card.active {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: calc(100vh - 260px);
}

.question-card.active .question-actions {
  margin-top: auto;
  position: sticky;
  bottom: 14px;
  z-index: 25;
  padding: 12px 0 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.75), #fff 35%);
}

.question-card.active textarea {
  min-height: 160px;
  max-height: 30vh;
}

/* Fix: Multiple-Choice-Karten und Buttons optisch einheitlicher */
.option-box {
  min-height: 66px;
  align-items: center;
}

.btn {
  min-width: 82px;
  line-height: 1;
}

.button-row.split .btn {
  min-height: 46px;
}

@media (max-width: 640px) {
  .top-nav {
    align-items: flex-start;
  }

  .top-auth {
    gap: 8px;
  }

  .top-auth-link,
  .top-auth-button {
    font-size: 13px;
    padding: 7px 10px;
  }

  .password-field {
    grid-template-columns: 1fr;
  }

  .question-card.active {
    min-height: auto;
  }

  .question-card.active .question-actions {
    bottom: 10px;
  }
}

/* Fix 2: Kompaktere Test-Fragen ohne riesige Leerflächen */
.test-panel {
  padding-top: 34px;
  padding-bottom: 24px;
}

.test-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 34px);
  letter-spacing: -0.035em;
}

.test-panel > .muted {
  margin: 0 0 18px;
  line-height: 1.45;
}

.test-panel > .instruction {
  margin: 0 0 22px;
  padding: 12px 14px;
  line-height: 1.25;
}

.question-card {
  margin-top: 20px;
  padding-top: 20px;
}

.question-card.active {
  min-height: calc(100vh - 230px);
}

.question-progress {
  margin: 0 0 10px;
  line-height: 1.2;
}

.question-group {
  display: block;
  margin: 0 0 26px;
  line-height: 1.1;
}

.question-card h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.2vw, 30px);
  line-height: 1.12;
}

.question-text {
  margin: 0 0 12px;
  line-height: 1.35;
}

.question-card .muted.small {
  margin: 8px 0 10px;
  line-height: 1.3;
}

.option-grid {
  margin-top: 10px;
  gap: 10px;
}

.option-box {
  min-height: 58px;
  padding: 12px 14px;
  line-height: 1.15;
}

.scale-labels {
  margin: 18px 0 10px;
}

.question-card .instruction {
  margin: 10px 0;
  padding: 12px 14px;
  line-height: 1.25;
}

.examples-details {
  margin: 10px 0 12px;
}

.examples-details summary {
  padding: 12px 14px;
}

.question-card.active textarea {
  min-height: 130px;
  max-height: 24vh;
}

.question-card.active .question-actions {
  padding-top: 10px;
}

@media (max-width: 640px) {
  .test-panel {
    padding-top: 24px;
    padding-bottom: 18px;
  }

  .question-group {
    margin-bottom: 18px;
  }

  .question-card h2 {
    font-size: 25px;
  }

  .option-box {
    min-height: 52px;
  }
}

/* Fix 3: Szenario-Fragen noch kompakter, damit auch sie ohne unnötiges Scrollen passen */
.question-card[data-type="scenario"].active {
  min-height: calc(100vh - 220px);
}

.question-card[data-type="scenario"] .question-progress {
  margin-bottom: 6px;
}

.question-card[data-type="scenario"] .question-group {
  margin-bottom: 14px;
}

.question-card[data-type="scenario"] h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 28px);
}

.question-card[data-type="scenario"] .question-text {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.25;
}

.question-card[data-type="scenario"] .instruction {
  margin: 8px 0;
  padding: 10px 12px;
  line-height: 1.2;
}

.question-card[data-type="scenario"] .scenario-intro {
  border-left-width: 4px;
}

.question-card[data-type="scenario"] .examples-details {
  margin: 8px 0 10px;
}

.question-card[data-type="scenario"] .examples-details summary {
  padding: 10px 12px;
}

.question-card[data-type="scenario"] .examples-details .examples {
  padding: 10px 12px;
  gap: 8px;
}

.question-card[data-type="scenario"] .examples div {
  padding: 8px 10px;
}

.question-card[data-type="scenario"].active textarea {
  min-height: 92px;
  max-height: 18vh;
  padding: 12px;
}

.question-card[data-type="scenario"].active .question-actions {
  padding-top: 8px;
}

@media (max-width: 640px) {
  .question-card[data-type="scenario"] .question-group {
    margin-bottom: 10px;
  }

  .question-card[data-type="scenario"] h2 {
    font-size: 23px;
  }

  .question-card[data-type="scenario"].active textarea {
    min-height: 84px;
  }
}

/* Phase 3: PDF-Download und E-Mail-Versand auf der Ergebnis-Seite */
.result-export-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  padding: 20px;
  margin: 22px 0;
  display: grid;
  gap: 18px;
}

.result-export-box h2 {
  margin: 4px 0 8px;
}

.result-export-actions {
  display: grid;
  gap: 14px;
}

.privacy-default-hint {
  border-left: 3px solid #111;
  padding-left: 12px;
  margin-top: 10px;
}

.email-result-form {
  display: grid;
  gap: 10px;
}

.email-result-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.email-result-form input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.email-result-form input[type="email"]:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.email-status {
  min-height: 20px;
  margin: 0;
}

.email-status.is-error {
  color: #b42318;
}

.email-status.is-ok {
  color: #067647;
}

.email-result-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (min-width: 760px) {
  .result-export-box {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: start;
  }
}

/* Phase 4: Profil-Browser / Such- und Statistikseite */
.profile-browser-panel {
  width: min(1120px, 100%);
}

.text-link {
  color: var(--text);
  font-weight: 800;
}

.browser-search-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 24px 0;
  background: var(--soft);
  display: grid;
  gap: 16px;
}

.browser-search-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.browser-search-form input[type="search"],
.browser-search-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.browser-search-form input[type="search"]:focus,
.browser-search-form select:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.browser-search-main input[type="search"] {
  font-size: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.browser-form-actions {
  justify-content: flex-start;
}

.browser-stat-note {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0 28px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.browser-stat-note strong {
  font-size: 34px;
  line-height: 1;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 22px 0 14px;
}

.section-heading-row h2 {
  margin: 4px 0 0;
}

.carousel-buttons {
  display: inline-flex;
  gap: 8px;
}

.carousel-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.carousel-button:hover {
  border-color: var(--primary);
  background: var(--soft);
}

.type-carousel {
  overflow: hidden;
  padding: 6px 0 12px;
  scroll-behavior: smooth;
}

.type-carousel-track {
  display: flex;
  gap: 16px;
  padding: 0 52px;
}

.type-carousel-card {
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.type-carousel-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.type-carousel-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.type-carousel-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.type-code {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tip-rotator {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  padding: 18px;
  margin: 22px 0 30px;
  min-height: 120px;
}

.rotating-tip {
  display: none;
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.rotating-tip.is-active {
  display: block;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.public-profile-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  display: grid;
  gap: 10px;
}

.public-profile-card h3 {
  margin: 0;
  font-size: 24px;
}

.public-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.mini-axis-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-axis-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 800;
}

.card-actions {
  justify-content: flex-start;
  margin-top: 4px;
}

.public-visibility-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  padding: 20px;
  margin: 22px 0;
  display: grid;
  gap: 16px;
}

.public-visibility-box h2 {
  margin: 4px 0 8px;
}

.visibility-form {
  display: grid;
  gap: 8px;
}

.visibility-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.visibility-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.visibility-status {
  min-height: 20px;
  margin: 0;
}

.visibility-status.is-error {
  color: #b42318;
}

.visibility-status.is-ok {
  color: #067647;
}

.type-detail-page {
  width: min(960px, 100%);
}

.clean-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  line-height: 1.55;
}

.related-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-type-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  display: grid;
  gap: 8px;
}

.related-type-card:hover {
  border-color: var(--primary);
  background: var(--soft);
}

.related-type-card span {
  color: var(--muted);
  line-height: 1.4;
}

@media (min-width: 760px) {
  .public-visibility-box {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    align-items: center;
  }
}

@media (max-width: 780px) {
  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .type-carousel-track {
    padding: 0 18px;
  }

  .type-carousel-card {
    flex-basis: 82%;
  }
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .top-nav-left {
    align-items: flex-start;
  }
}

.quick-test-notice,
.quick-test-warning,
.quick-result-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.quick-test-notice {
  padding: 14px 16px;
}

.quick-test-warning {
  padding: 12px 14px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.quick-result-box {
  padding: 18px;
  margin: 18px 0;
}

.quick-result-box h2 {
  margin: 4px 0 8px;
}

.quick-result-box p {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 20px 18px;
}

.site-footer-inner {
  width: min(1000px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer-brand {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.legal-page {
  line-height: 1.6;
}

.legal-page section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-page h2 {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.legal-warning,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  padding: 16px;
}

.placeholder-line {
  border: 1px dashed #c9ccd2;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--soft);
}

.legal-page code {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 2px 6px;
  font-size: 0.95em;
}

@media (max-width: 640px) {
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Phase 7: Mobile Design, Struktur und optischer Feinschliff */
:root {
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-warm: #fbfbf8;
  --ink-soft: #34363b;
  --shadow-soft: 0 18px 55px rgba(17, 24, 39, 0.08);
  --shadow-tiny: 0 8px 26px rgba(17, 24, 39, 0.06);
}

body {
  background:
    radial-gradient(circle at top left, rgba(17,17,17,0.035), transparent 34vw),
    linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.panel,
.hero-card {
  box-shadow: var(--shadow-soft);
}

.home-layout-v2 {
  align-items: center;
}

.home-hero-card {
  width: min(1080px, 100%);
  text-align: left;
  overflow: hidden;
  position: relative;
}

.home-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.035);
  transform: translate(38%, -42%);
  pointer-events: none;
}

.home-hero-card h1,
.home-hero-card .hero-text,
.home-hero-card .account-note {
  position: relative;
  max-width: 760px;
  margin-left: 0;
  margin-right: 0;
}

.home-action-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 18px;
}

.home-action-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  padding: 20px;
  display: grid;
  gap: 10px;
  min-height: 170px;
  box-shadow: var(--shadow-tiny);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.home-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--surface-warm);
}

.home-action-card strong {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.04em;
}

.home-action-card span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.home-action-card.primary-action {
  background: #111;
  color: #fff;
  border-color: #111;
}

.home-action-card.primary-action span:last-child,
.home-action-card.primary-action .action-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.action-kicker,
.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.home-secondary-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.content-block,
.result-section-card,
.browser-hero,
.type-detail-header {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 22px;
  margin: 22px 0;
  box-shadow: var(--shadow-tiny);
}

.content-block > :first-child,
.type-detail-card > :first-child,
.public-profile-card > :first-child {
  margin-top: 0;
}

.compact-heading {
  margin-top: 0;
}

.boxed-grid .type-detail-card,
.emphasized-card {
  background: var(--surface-soft);
  border-radius: 16px;
}

.result-panel {
  width: min(1080px, 100%);
}

.result-page-header,
.browser-hero,
.type-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.result-page-header h1,
.browser-hero h1,
.type-detail-header h1 {
  margin: 6px 0 8px;
  letter-spacing: -0.045em;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
}

.result-status-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: stretch;
  margin: 22px 0;
}

.result-main-card,
.result-side-card {
  margin: 0;
  height: 100%;
}

.result-side-stack {
  display: grid;
  gap: 14px;
}

.system-box {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 16px;
}

.compact-tags {
  gap: 6px;
}

.system-tag {
  background: #111;
  color: #fff;
  border-color: #111;
}

.result-summary-text {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.score-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.score-list {
  gap: 12px;
}

.scenario-result {
  background: #fff;
  box-shadow: var(--shadow-tiny);
}

.scenario-result pre {
  max-height: 280px;
  overflow: auto;
}

.browser-hero {
  background: linear-gradient(135deg, #fff 0%, #f7f7f8 100%);
}

.browser-hero-stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #111;
  color: #fff;
  padding: 18px;
  min-width: 170px;
  display: grid;
  gap: 4px;
  text-align: center;
}

.browser-hero-stat strong {
  font-size: 38px;
  line-height: 1;
}

.browser-hero-stat span {
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-weight: 800;
}

.refined-search-form {
  background: #fff;
  box-shadow: var(--shadow-tiny);
}

.filter-details {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-soft);
}

.filter-details summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
}

.filter-details .filter-grid {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.public-profile-card.improved-public-card {
  gap: 14px;
  box-shadow: var(--shadow-tiny);
}

.card-meta-block,
.history-meta-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-soft);
  display: grid;
  gap: 8px;
}

.history-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  margin: 12px 0;
}

.enhanced-history-card {
  align-items: stretch;
}

.type-detail-page .player-type-hero {
  margin: 22px 0;
}

.big-type-code {
  font-size: 18px;
  padding: 12px 16px;
  background: #111;
  color: #fff;
  border-color: #111;
}

.separated-list {
  padding-left: 0;
  list-style: none;
}

.separated-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

/* Phase 7: Slider-Achse ohne sichtbare Zahlen, mobil vertikal lesbar */
.scale-control {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "left hint right"
    "slider slider slider";
  gap: 14px 16px;
  align-items: center;
  margin: 20px 0 12px;
}

.scale-left { grid-area: left; }
.scale-right { grid-area: right; text-align: right; }
.scale-hint { grid-area: hint; }
.scale-control input[type="range"] { grid-area: slider; }
.scale-label {
  color: var(--muted);
  line-height: 1.35;
}

.scale-control .scale-hint {
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  white-space: nowrap;
}

input[type="range"] {
  accent-color: #111;
}

@media (max-width: 860px) {
  .home-action-grid,
  .result-overview-grid,
  .history-meta-grid {
    grid-template-columns: 1fr;
  }

  .result-page-header,
  .browser-hero,
  .type-detail-header {
    flex-direction: column;
  }

  .browser-hero-stat {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .page,
  .home-layout {
    padding: 14px;
  }

  .hero-card,
  .panel {
    padding: 20px;
    border-radius: 18px;
  }

  .home-hero-card h1 {
    font-size: clamp(36px, 14vw, 52px);
  }

  .hero-text,
  .question-text,
  .summary,
  .rotating-tip {
    font-size: 16px;
  }

  .button-row,
  .home-secondary-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .btn,
  .home-secondary-row .btn {
    width: 100%;
  }

  .top-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .top-auth {
    justify-content: flex-start;
  }

  .content-block,
  .browser-hero,
  .type-detail-header,
  .result-export-box,
  .public-visibility-box,
  .browser-search-form {
    padding: 16px;
    border-radius: 16px;
  }

  .scale-control {
    grid-template-columns: 1fr;
    grid-template-areas:
      "right"
      "slider"
      "left"
      "hint";
    gap: 10px;
    margin: 16px 0;
  }

  .scale-left,
  .scale-right {
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--surface-soft);
    font-weight: 800;
  }

  .scale-control .scale-hint {
    text-align: center;
    white-space: normal;
  }

  .scale-control input[type="range"] {
    min-height: 38px;
  }

  .question-card h2 {
    font-size: clamp(24px, 8vw, 30px);
  }

  .option-grid,
  .filter-grid,
  .profile-card-grid,
  .related-type-grid {
    grid-template-columns: 1fr;
  }

  .public-card-topline {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .type-carousel-card {
    flex-basis: 88%;
  }

  .type-carousel-track {
    padding: 0 8px;
  }

  .score-top {
    gap: 10px;
    align-items: flex-start;
  }

  .score-label-with-info {
    max-width: 100%;
  }
}

/* Phase 7.1: Sichtbarere, aber weiterhin dezente Abschnittstrennung */
:root {
  --line: #d1d7e0;
  --line-strong: #c2cad6;
  --surface-soft: #f5f7fa;
}

.content-block,
.result-section-card,
.browser-hero,
.type-detail-header,
.public-visibility-box {
  border: 1.5px solid var(--line-strong);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 10px 34px rgba(17, 24, 39, 0.075);
}

.boxed-grid .type-detail-card,
.emphasized-card,
.system-box,
.score-row,
.scenario-result,
.filter-details,
.public-profile-card,
.home-action-card,
.result-main-card,
.result-side-card {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.content-block + .content-block,
.result-section-card + .result-section-card,
.public-visibility-box + .content-block {
  margin-top: 28px;
}

.section-heading-row,
.compact-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(194, 202, 214, 0.75);
  margin-bottom: 16px;
}

.result-summary-text {
  border-top-color: rgba(194, 202, 214, 0.95);
}
