:root {
  --bg: #f7f8fc;
  --panel: #ffffff;
  --panel-soft: #f6f8fd;
  --text: #24304a;
  --muted: #63708a;
  --border: #dde4f0;
  --accent: #5f5ce6;
  --accent-soft: #eef2ff;
  --success: #2d8a5f;
  --shadow: 0 12px 32px rgba(44, 62, 110, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 860px;
}

* {
  box-sizing: border-box;
}

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

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 18px 56px;
}




.share-wrap {
  margin: 28px auto 40px;
  text-align: center;
}

.share-panel[hidden] {
  display: none !important;
}

.share-panel-icons {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-icon-btn,
.share-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #f1f3f7;
  color: #1f2430;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #f1f3f7;
  color: #1f2430;
  font-weight: 700;
  cursor: pointer;
}

.share-feedback {
  margin-top: 10px;
  font-size: 14px;
  color: #5b6475;
}







/* hero */
.hero {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: block;
  margin-bottom: 22px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.05;
  color: #1f2937;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #667085;
  max-width: 620px;
}

.hero-stats,
.stat-card,
.stat-value,
.stat-label,
.eyebrow {
  display: none;
}

/* search toolbar */
.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 auto 24px;
  align-items: center;
}

.search-input,
.select-input,
.ghost-btn,
.primary-btn,
.choice-btn,
.nav-btn,
.category-btn,
.scenario-link {
  font: inherit;
}

.search-input,
.select-input {
  width: 100%;
  border: 1px solid #d9dee8;
  background: #ffffff;
  border-radius: 18px;
  min-height: 56px;
  padding: 0 18px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.select-input:focus {
  border-color: #c8d4ff;
  box-shadow: 0 0 0 4px rgba(95, 92, 230, 0.08);
}

.ghost-btn,
.primary-btn,
.nav-btn {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 16px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.ghost-btn,
.nav-btn {
  background: #fff;
  color: var(--text);
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(95, 92, 230, 0.18);
}

.ghost-btn:hover,
.primary-btn:hover,
.nav-btn:hover,
.choice-btn:hover,
.category-btn:hover,
.scenario-link:hover {
  transform: translateY(-1px);
}

/* two-tone main content section */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  background: #f4f7fb;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 34px 0 70px;
}

/* category section */
.sidebar,
.scenario-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: none;
}

.sidebar {
  padding: 22px 18px 20px;
  position: static;
  max-width: 1040px;
  width: calc(100% - 36px);
  margin: 0 auto;
}

.sidebar-title {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  color: #1f2937;
}

.sidebar-subtitle {
  margin: 10px auto 0;
  color: #667085;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  max-width: 520px;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-item {
  margin: 0;
  flex: 0 0 auto;
}

.category-btn,
.scenario-link {
  border: 1.5px solid #d9dee8;
  background: #ffffff;
  color: #475467;
  border-radius: 999px;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-btn {
  width: auto;
  min-height: 46px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.category-btn:hover,
.scenario-link:hover {
  transform: translateY(-1px);
  border-color: #cfd6e4;
  background: #fbfcfe;
}

.category-btn.active,
.scenario-link.active {
  background: linear-gradient(135deg, #5b5ce9, #4f46e5);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.18);
}

.category-name {
  display: block;
  margin: 0;
}

.category-count,
.scenario-preview {
  display: none;
}

/* scenario area */
.scenario-panel {
  padding: 22px 18px 24px;
  max-width: 1040px;
  width: calc(100% - 36px);
  margin: 0 auto;
}

.loading-state,
.empty-state,
.error-state {
  padding: 20px 16px;
  text-align: center;
  border-radius: 18px;
  margin-bottom: 18px;
}

.loading-state,
.empty-state {
  color: var(--muted);
  border: 1px dashed #d4ddeb;
  background: #fbfcff;
}

.error-state {
  color: #9b2d2d;
  border: 1px dashed #efc2c2;
  background: #fff7f7;
}

.scenario-card {
  max-width: 560px;
  margin: 0 auto 18px;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 30px;
  padding: 28px 22px 20px;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.06);
}

.scenario-header {
  display: block;
  margin-bottom: 14px;
  text-align: center;
}

.scenario-header h2,
.result-card h3,
.list-title {
  margin: 0;
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1f2937;
}

.scenario-meta,
.result-caption,
.mini-note {
  color: #667085;
  font-size: 0.92rem;
  line-height: 1.5;
}

.pill {
  display: none;
}

.scenario-situation {
  background: #f6f8fd;
  border: 1px solid #e5eaf6;
  border-radius: 18px;
  padding: 16px;
  line-height: 1.65;
  font-size: 1rem;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text);
}

.choices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.choice-btn {
  width: 100%;
  min-height: 62px;
  border-radius: 20px;
  border: 1.5px solid #e4e7ec;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  text-align: center;
  padding: 14px 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.choice-btn strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.choice-btn span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.choice-btn:hover {
  transform: translateY(-1px);
  border-color: #d5dbe6;
  background: #fbfcff;
}

.choice-btn.selected {
  background: #eef2ff;
  border-color: #818cf8;
  color: #3730a3;
  box-shadow: 0 10px 24px rgba(95, 92, 230, 0.12);
}

.choice-btn.dimmed {
  opacity: 0.58;
}

.result-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbe6dc;
  background: #f6fcf7;
  display: none;
  text-align: center;
}

.result-card.show {
  display: block;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  border: 1px solid #cfe5d7;
  background: #ecf8f0;
  color: var(--success);
}

.scenario-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#resetBtn {
  display: none;
}

.list-card {
  max-width: 620px;
  margin: 18px auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

@media (max-width: 900px) {
  .main-layout {
    padding: 28px 0 54px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 28px 12px 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .sidebar,
  .scenario-panel {
    width: calc(100% - 24px);
    border-radius: 24px;
  }

  .scenario-card {
    padding: 22px 16px 18px;
    border-radius: 24px;
  }

  .scenario-header h2 {
    font-size: 1.3rem;
  }

  .scenario-situation {
    font-size: 0.95rem;
    padding: 14px;
  }

  .choice-btn {
    min-height: 58px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .footer-actions,
  .scenario-footer {
    flex-direction: column;
  }

  .ghost-btn,
  .primary-btn,
  .nav-btn {
    width: 100%;
  }

  .category-list {
    justify-content: flex-start;
  }
}