/* Styles the static character pages under /characters/.
   Copied verbatim from index.html's inline block so a saved character renders
   identically to a freshly generated one. Kept as a file (not inlined) because
   every character page needs the same rules. */

.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tab-btn { background: transparent; color: var(--text-3); border: none; border-bottom: 2px solid transparent; padding: 9px 22px; font-family: var(--ff-ui); font-size: 16px; font-weight: 500; cursor: pointer; margin-bottom: -1px; transition: color 0.15s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.appearance-result { margin-top: 2rem; }
.appearance-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.appearance-result-grid .section { padding: 1.5rem 0; }
.appearance-result-grid .section-label { margin-bottom: 0.75rem; }
.appearance-result-grid .spectrum-row { border-bottom: 1px solid var(--border); padding: 5px 0; }
.appearance-result-grid .spectrum-row:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .tab-btn { flex: 1 1 0; padding: 9px 4px; font-size: 14px; white-space: nowrap; }
  .appearance-result-grid { grid-template-columns: 1fr; }
}

/* Portrait sits above the tabs. Capped by height rather than width so a 2:3
   image never pushes the profile below the fold on a laptop. */
/* Someone arriving from a pin wants the tool, not a scroll to find it. The
   link to the generator sits above everything else on the page. */
.page-top { text-align: center; margin: 0 0 1.5rem; }

.character-portrait { margin: 0 0 2rem; text-align: center; }
.character-portrait img { max-width: 100%; height: auto; max-height: 70vh; width: auto; border-radius: 6px; border: 1px solid var(--border); }

/* The /characters/ index. A grid of portraits, so someone who liked one
   character has somewhere to go next instead of leaving. */
.character-index-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.character-card { display: block; text-decoration: none; color: inherit; }
.character-card img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--border); }
.character-card-name { display: block; font-family: var(--ff-ui); font-weight: 600; margin-top: 0.6rem; }
.character-card:hover img { filter: brightness(1.06); }

@media (max-width: 720px) {
  .character-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}

/* Export bar. Copied verbatim from index.html's inline block so the menu on a
   character page looks and behaves exactly like the generator's own. */
.doc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2.25rem; padding-bottom: 1rem; border-bottom: 2px solid var(--border-strong); }
.doc-name { font-size: 1.2rem; font-weight: 600; color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-3); border: 1px solid var(--border-strong); border-radius: 5px; padding: 7px 16px; font-size: 16px; cursor: pointer; font-family: inherit; }
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.export-menu { position: relative; flex: 0 0 auto; }
.export-trigger { display: flex; align-items: center; gap: 8px; background: #fff; }
.export-trigger::after { content: '⌄'; color: var(--text-3); font-size: 13px; transition: transform 0.15s ease; }
.export-menu.open .export-trigger::after { transform: rotate(180deg); }
.export-popover { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 310px; padding: 7px; background: #fff; border: 1px solid var(--border-strong); border-radius: 7px; box-shadow: 0 14px 36px rgba(20,14,40,0.22); }
.export-popover[hidden] { display: none; }
.export-popover-title { padding: 7px 9px 5px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.export-option { width: 100%; display: block; text-align: left; padding: 9px; border: 0; border-radius: 4px; background: transparent; color: var(--text); font-family: inherit; cursor: pointer; text-decoration: none; }
.export-option:hover, .export-option:focus-visible { background: var(--surface); outline: none; }
.export-option-name { display: block; font-size: 15px; font-weight: 600; }
.export-option-hint { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; line-height: 1.4; font-weight: 400; }
