.cs-toolbar { display: flex; justify-content: space-between; }
.cs-document { --cs-ink: #302124; --cs-muted: #695b52; --cs-rule: #aa9275; color: var(--cs-ink); background: #e9dfc7; border: 1px solid #b69a73; outline: 1px solid #9b7a5159; outline-offset: 5px; padding: 30px 32px; box-shadow: 0 20px 70px #0005; font-family: Georgia, 'Times New Roman', serif; }
.cs-header { text-align: center; }
.cs-game-title { font-size: 35px; text-transform: uppercase; letter-spacing: .15em; line-height: 1.1; }
.cs-game-subtitle { text-transform: uppercase; letter-spacing: .3em; font-size: 11px; margin: 6px 0 20px; }
.cs-document .cs-header h1 { color: var(--cs-ink); font: 30px/1.2 Georgia, serif; margin-bottom: 25px; }
.cs-identity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: left; gap: 14px 24px; }
.cs-detail { min-width: 0; border-bottom: 1px solid var(--cs-rule); padding-bottom: 5px; }
.cs-detail dt { text-transform: uppercase; font-size: 9px; letter-spacing: .08em; color: var(--cs-muted); margin-bottom: 4px; }
.cs-detail dd { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.cs-section { min-width: 0; margin-top: 26px; break-inside: avoid; }
.cs-section-title { display: flex; align-items: center; gap: 12px; justify-content: center; font: 22px/1.2 Georgia, serif; text-align: center; margin: 0 0 14px; }
.cs-section-title::before, .cs-section-title::after { content: ''; height: 3px; border-block: 1px solid var(--cs-ink); flex: 1; }
.cs-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
.cs-column { min-width: 0; }
.cs-document h3 { font: small-caps 17px/1.3 Georgia, serif; text-align: center; margin: 0 0 9px; }
.cs-trait { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 26px; padding: 4px 0; border-bottom: 1px dotted #aa927577; }
.cs-trait-name { font-size: 13px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.cs-specialty { display: block; font-size: 10px; color: var(--cs-muted); font-style: italic; margin-top: 3px; }
.cs-pips { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.cs-pip { display: block; width: 10px; height: 10px; border-radius: 50%; border: 1.2px solid var(--cs-ink); background: transparent; }
.cs-pip.is-filled { background: var(--cs-ink); }
.cs-pips--squares .cs-pip { border-radius: 0; width: 9px; height: 9px; }
.cs-resource .cs-section-title { font-size: 20px; margin-bottom: 10px; }
.cs-resource-row { display: flex; flex-direction: column; align-items: center; gap: 5px; margin: 9px 0; }
.cs-resource-row > span:first-child { font-size: 10px; color: var(--cs-muted); }
.cs-resource-row .cs-pips { gap: 5px; }
.cs-health-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; align-items: center; gap: 9px; min-height: 25px; font-size: 13px; }
.cs-health-box { width: 11px; height: 11px; border: 1px solid var(--cs-ink); }
.cs-health-row small { font-size: 11px; }
.cs-native-health { min-width: 0; margin-block: 8px 14px; }
.cs-health-heading { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.5; }
.cs-health-bar { display: flex; gap: 3px; width: 100%; margin-block: 8px 5px; padding: 3px; min-height: 23px; border: 1px solid var(--cs-rule); border-radius: 3px; background: #30212412; }
.cs-health-segment { flex: 1; min-width: 0; border: 1px solid var(--cs-rule); background: transparent; }
.cs-health-segment.is-available { background: #67573b; border-color: #67573b; }
.cs-health-source { margin: 5px 0 10px; font: 10px/1.5 system-ui, sans-serif; letter-spacing: .025em; color: var(--cs-muted); }
.cs-health-levels { border-block: 1px dotted var(--cs-rule); }
.cs-health-levels summary { cursor: pointer; padding-block: 13px; min-height: 44px; font-size: 12px; line-height: 1.5; }
.cs-health-levels summary:focus-visible { outline: 2px solid #673b47; outline-offset: 2px; }
.cs-health-levels .cs-health-row { font-size: 12px; padding-block: 4px; }
.cs-health-levels .cs-health-penalty { font-size: 10px; color: var(--cs-muted); }
.cs-health-types { font-style: italic; }
.cs-health-availability { border-left: 2px solid var(--cs-rule); padding-left: 8px; }
.cs-empty, .cs-small { color: var(--cs-muted); font-size: 11px; line-height: 1.6; }
.cs-experience { text-align: center; border: 1px solid var(--cs-ink); padding: 7px; font-size: 24px; }
.cs-form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin: 14px 0; }
.cs-powers { padding: 0; list-style: none; }
.cs-powers li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--cs-rule); font-size: 13px; }
.cs-powers small { color: var(--cs-muted); font-size: 10px; flex-shrink: 0; }
.cs-story h3 { text-align: left; }
.cs-story p { font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 18px; }
.cs-proof { margin-top: 28px; }.cs-proof summary { cursor: pointer; min-height: 44px; padding-top: 12px; color: var(--muted); font-size: 12px; }
.cs-delete { border-top: 1px solid var(--border); padding-top: 15px; margin-top: 20px; }
.cs-delete .text-button, .character-library-entry > .text-button { min-height: 44px; }
.danger-text { color: #e3a3a3; }.danger-text:disabled { opacity: .4; }
.management-note { font-size: 11px; margin-top: 16px; color: var(--muted); line-height: 1.7; }
.character-library-entry { min-width: 0; display: grid; gap: 4px; }.character-library-entry .character-card { width: 100%; }.character-library-entry > .text-button { justify-self: end; font-size: 11px; }
.character-delete-panel { max-width: 630px; margin-inline: auto; }.character-delete-panel h1 { overflow-wrap: anywhere; }.character-delete-panel .delete-warning { border: 1px solid #8c4954; padding: 18px; background: #59273330; font-size: 13px; line-height: 1.8; margin: 22px 0; }.character-delete-panel .delete-warning strong { display: block; color: #f2c6bf; }.character-delete-panel .delete-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }.character-delete-panel #delete-submit { background: #6b2c3a; border-color: #ae6a76; }
@media (max-width: 760px) { .cs-document { padding: 24px 21px; }.cs-columns { gap: 16px; }.cs-pip { width: 8px; height: 8px; }.cs-pips { gap: 2px; }.cs-trait-name { font-size: 12px; }.cs-resource-row .cs-pips { gap: 3px; } }
@media (max-width: 600px) { .cs-document { padding: 22px 18px; outline-offset: 3px; }.cs-identity { grid-template-columns: 1fr 1fr; gap: 12px; }.cs-columns { grid-template-columns: 1fr; gap: 21px; }.cs-form-columns { grid-template-columns: 1fr; gap: 22px; }.cs-lower { gap: 0; }.cs-column h3 { text-align: left; font-size: 19px; }.cs-trait { min-height: 32px; }.cs-trait-name { font-size: 14px; }.cs-pip { width: 12px; height: 12px; }.cs-pips { gap: 5px; }.cs-resource-row .cs-pips { gap: 8px; }.cs-resource-row { margin: 14px 0; }.cs-game-title { font-size: 31px; }.cs-document .cs-header h1 { font-size: 27px; } }
@media print {
  @page { margin: 12mm; }
  body, #main { color: #000; background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .site-header, .site-footer, .cs-toolbar, .sheet-status, .sheet-actions, .cs-proof, .cs-delete, #app-error, #app-status, #update-notice { display: none !important; }
  .character-sheet-page { margin: 0 !important; max-width: none !important; }
  .cs-document { padding: 0; background: #fff; box-shadow: none; border: 0; outline: 0; color: #000; --cs-ink: #000; --cs-muted: #333; --cs-rule: #777; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .cs-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }.cs-identity { grid-template-columns: repeat(3, minmax(0, 1fr)); }.cs-trait { min-height: 21px; padding: 2px 0; }.cs-trait-name { font-size: 11px; }.cs-pip { width: 8px; height: 8px; }.cs-pips, .cs-resource-row .cs-pips { gap: 3px; }.cs-section { margin-top: 18px; }.cs-column h3 { text-align: center; font-size: 15px; }.cs-form { break-before: page; }.cs-section-title { font-size: 20px; }
}

/* Reference controls remain separate from player-entered values and pip tracks. */
.cs-name-heading { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 25px; min-width: 0; }
.cs-document .cs-name-heading h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cs-detail dt { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 44px; }
.cs-primary-lore-summary { margin: 0 0 12px; padding: 8px 10px; border: 1px solid #77585d; border-left: 4px solid #673b47; color: #542d39; background: #c6ad9461; font-size: 12px; font-weight: 700; line-height: 1.45; }
.cs-trait[data-primary="true"] { border-left: 3px solid #673b47; padding-inline: 8px 5px; background: #c6ad943d; }
.cs-primary-lore-badge { display: block; width: fit-content; padding: 3px 6px; margin-top: 4px; border: 1px solid #77585d; color: #542d39; font-size: 10px; line-height: 1.3; font-weight: 700; letter-spacing: .03em; }
@media print { .cs-name-heading { margin-bottom: 15px; }.cs-detail dt { min-height: 0; }.cs-primary-lore-summary, .cs-primary-lore-badge { color: #000; border-color: #000; background: transparent; }.cs-trait[data-primary="true"] { border-left-color: #000; background: transparent; } }
