/* AO3 Wrapppped — Dashboard Styles (Light Theme) */

/* Override .screen.active flex centering for the dashboard */
#dashboard.active {
  display: block;
  min-height: 100vh;
}

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-row-1 {
  display: grid;
  grid-template-columns: 9fr 11fr;
  align-items: stretch;
  gap: 20px;
}

.dashboard-row-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: stretch;
  gap: 20px;
}

.dash-card {
  background: #fff;
  border: 1px solid #D5D0C0;
  border-radius: 16px;
  padding: 28px 24px 14px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.dash-card--timeline {
  overflow-y: auto;
}

/* --- Hero Card (merged identity + timeline, left card in row 1) --- */
.dash-card--hero {
}

.hero-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #D5D0C0;
}

.hero-section--timeline {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Section 1: dice grid left-aligned, identity text beside it — no bottom ruler */
.hero-section--identity {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  border-bottom: none;
  padding-bottom: 0;
}

.hero-section--identity .card-grid {
  justify-content: start;
  margin-bottom: 0;
  flex-shrink: 0;
}

.hero-identity-text {
  padding-top: 20px;
}

.hero-identity-text .card-oneliner {
  margin-bottom: 0;
}

/* Section 2: stats */

.hero-counts-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.hero-counts-row .card-stat {
  align-items: flex-start;
  max-width: none;
}

.hero-counts-row .card-stat:last-child {
  flex: 1;
  min-width: 0;
}

.hero-fandom-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.wrapup-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid #D5D0C0;
}

.wrapup-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #2A2A2A;
}

.wrapup-logo {
  max-width: 100px;
  height: auto;
}

@media (max-width: 900px) {
  .dashboard-grid {
    padding: 16px;
  }
  .dashboard-row-1,
  .dashboard-row-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Share Card (inside dash-card--share) --- */
.share-card-inner {
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: 72px 72px;
  grid-template-rows: 72px 72px;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.card-grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 26px;
}

.card-archetype {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
  color: #2A2A2A;
}

.card-oneliner {
  color: #6B6B5E;
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

.card-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-stats-row--center {
  margin-bottom: 24px;
}

.card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 140px;
}

.card-stat-number {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  color: #2A2A2A;
}

.card-stat-number--fandom {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  text-align: center;
}

.card-stat-label {
  color: #6B6B5E;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.card-footer-logo {
  max-width: 80px;
  height: auto;
}

.card-branding {
  color: #B0AC9A;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  display: block;
  text-align: center;
}

/* Icon sizing in grid cells and dimension rows */
.card-grid-cell img.dice-icon,
.dimension-icon img.dice-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Dimension rows */
.dimension-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #D5D0C0;
}

.dimension-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.dimension-text h3 {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2A2A2A;
}

.dimension-text p {
  color: #6B6B5E;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Stat sections */
.stat-section {
  padding: 28px 0;
  border-bottom: 1px solid #D5D0C0;
}

/* Remove border on the last row before branding footer */
.dimension-row:has(+ .card-footer) { border-bottom: none; }
.stat-section:has(+ .card-footer)  { border-bottom: none; }

.dash-card > .stat-section:first-child {
  padding-top: 0;
}

.section-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #2A2A2A;
}

/* Bar charts (fandoms) */
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: grid;
  grid-template-columns: 1fr 120px 70px;
  gap: 12px;
  align-items: center;
}

.bar-label {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  height: 8px;
  background: #D5D0C0;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--ao3-red, #9B1C1C);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.bar-pct {
  font-size: 0.85rem;
  color: #6B6B5E;
  text-align: right;
  white-space: nowrap;
}

/* --- Horizontal Timeline --- */
.timeline-horizontal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 50px 1fr 60px;
  gap: 12px;
  align-items: center;
}

.timeline-row.hidden-row {
  display: none;
}

.timeline-row.hidden-row.shown {
  display: grid;
}

.timeline-year {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: #2A2A2A;
}

.timeline-count {
  font-size: 0.85rem;
  color: #6B6B5E;
  text-align: right;
  font-weight: 600;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
}

.see-more-btn {
  background: none;
  border: none;
  color: var(--ao3-red, #9B1C1C);
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 12px 0 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.see-more-btn:hover {
  opacity: 0.8;
}

/* --- Truth & Dare --- */
.truth-dare-section {
}

.td-subsection {
  padding: 12px 0;
}

.td-subsection:first-of-type {
  border-bottom: 1px solid #D5D0C0;
}

/* More top space between truth/dare ruler and DARE label; bottom space matches wrapup padding-top */
.td-subsection:last-of-type {
  padding-top: 20px;
  padding-bottom: 16px;
}

.td-label {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #2A2A2A;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Honesty Slider */
.honesty-prompt {
  color: #6B6B5E;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.honesty-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 14px;
  margin-bottom: 14px;
}

.honesty-label {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  color: #6B6B5E;
}

.honesty-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  background: #D5D0C0;
  border-radius: 3px;
  outline: none;
}

.honesty-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ao3-red, #9B1C1C);
  cursor: pointer;
}

.honesty-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ao3-red, #9B1C1C);
  cursor: pointer;
  border: none;
}

.honesty-result {
  font-size: 1rem;
  color: #6B6B5E;
  margin-bottom: 8px;
}

.honesty-result strong {
  color: #2A2A2A;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
}

.lotr-comparison {
  font-size: 0.9rem;
  color: #6B6B5E;
  font-style: italic;
}

/* Dare */
.dare-text {
  color: #6B6B5E;
  font-size: 0.95rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.copy-link-btn {
  background: none;
  border: none;
  color: var(--ao3-red, #9B1C1C);
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-link-btn:hover {
  opacity: 0.8;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .card-archetype { font-size: 1.5rem; }
  .card-stats-row { gap: 16px; }
  .bar-item { grid-template-columns: 1fr 80px 60px; }
  .timeline-row { grid-template-columns: 45px 1fr 50px; }
}
