/* Character of the Day - page-specific pieces not covered by styles.css. */

/* These sections are toggled via the `hidden` attribute in JS, but each also
   carries a class (.signature-intro, .signature-showcase, .signature-strip,
   .draft-grid) that sets its own `display` value. Class selectors and the
   browser's built-in `[hidden] { display: none }` rule have equal
   specificity, so without this the class rule can win the tie and the
   section stays visible. Pin these IDs to `display: none` whenever hidden
   is present, regardless of load order. */
#signatureIntro[hidden],
#signatureShowcase[hidden],
#signatureStrip[hidden],
#draftSection[hidden] {
  display: none !important;
}

.signature-intro {
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 520px;
  margin: 32px auto 0;
  padding: 36px 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--surface-3) 55%, transparent), var(--surface-2) 55%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.signature-lock {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.signature-lock svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signature-date {
  margin: 0;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.signature-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
}

.signature-intro p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.signature-showcase {
  display: grid;
  gap: 18px;
  justify-items: center;
  max-width: 520px;
  margin: 28px auto 0;
  text-align: center;
}

.signature-showcase .signature-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signature-showcase .character-card {
  width: 100%;
  cursor: default;
}

.signature-showcase .character-card:hover {
  transform: none;
}

.signature-choice-prompt {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.signature-role-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.signature-role-button {
  min-width: 0;
}

.signature-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 6px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 12%, transparent), transparent 60%), var(--surface-2);
}

.signature-strip-badge {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent, var(--amber));
  border-radius: 50%;
  color: var(--text);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent, var(--amber)) 20%, #1a2420), #0f1714 72%);
  font-weight: 900;
  font-size: 0.78rem;
}

.signature-strip-main {
  min-width: 0;
}

.signature-strip-label {
  margin: 0;
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.signature-strip-name {
  margin: 2px 0 0;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
}

.signature-strip-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.slot-signature-tag {
  margin-top: 2px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.results-signature-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.results-signature-note strong {
  color: var(--text);
}

.results-best-possible {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.results-best-possible strong {
  color: var(--teal);
}

.results-best-possible-pending {
  font-style: italic;
}

.results-row.is-signature {
  box-shadow: 0 0 0 1px rgba(240, 184, 75, 0.55) inset;
}

.results-row-signature-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber);
  color: #201606;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

@media (max-width: 760px) {
  .signature-intro,
  .signature-showcase {
    margin-left: 8px;
    margin-right: 8px;
  }

  .signature-strip {
    flex-wrap: wrap;
  }
}

/* .results-actions (styles.css) is a 2-column grid built for the Gauntlet's
   Share + Play Again pair. This page only ever shows one button (Share -
   there's no replay once today's attempt is used), so left in the shared
   grid it sits pinned to the left column instead of centered. */
#resultPanel .results-actions {
  display: flex;
  justify-content: center;
}
