:root {
  --theme-text: #241b19;
  --theme-muted: #746560;
  --theme-background: #f7f1e7;
  --theme-background-deep: #eee2d0;
  --theme-background-glow: #fff8e9;
  --theme-panel: rgba(255, 253, 248, .92);
  --theme-panel-alt: #f4e8d4;
  --theme-accent: #6d2637;
  --theme-accent-strong: #461924;
  --theme-highlight: #b9883c;
  --theme-border: #dacbb8;
  --theme-success: #46664f;
  --theme-danger: #9a3040;
  --theme-topbar-start: #461924;
  --theme-topbar-end: #6d2637;
  --theme-on-accent: #ffffff;
  --theme-shadow: rgba(61, 39, 29, .12);
  --layout-character-workspace-max: 1200px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--theme-text);
  background: var(--theme-background);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--theme-text); background: radial-gradient(circle at 70% 0, var(--theme-background-glow) 0, var(--theme-background) 36rem); transition: color .2s ease, background .2s ease; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ddaa54; outline-offset: 2px; }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 50; background: white; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; color: #fff; background: linear-gradient(115deg, var(--theme-topbar-start), var(--theme-topbar-end)); box-shadow: 0 4px 16px var(--theme-shadow); }
.brand { display: inline-flex; gap: .8rem; align-items: center; text-decoration: none; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font-family: Georgia, serif; font-size: 1.45rem; }
.brand span:last-child { display: grid; }
.brand small { opacity: .72; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; }
.user-menu { display: flex; align-items: center; gap: 1rem; }
.user-menu form { margin: 0; }
.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.sidebar { padding: 2rem 1.2rem; border-right: 1px solid var(--theme-border); background: color-mix(in srgb, var(--theme-background-deep) 78%, transparent); }
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 .55rem 1rem; color: var(--theme-muted); text-transform: uppercase; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.sidebar-heading a { font-size: 1.35rem; text-decoration: none; color: var(--theme-accent); }
.preview-control { display: grid; gap: .55rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--theme-border); }.preview-control label { color: var(--theme-highlight); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }.preview-control select { width: 100%; min-width: 0; }.persistent-preview-banner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding: .85rem 1rem; border: 2px solid var(--theme-highlight); border-radius: 12px; color: var(--theme-text); background: var(--theme-panel-alt); box-shadow: 0 8px 24px var(--theme-shadow); }.persistent-preview-banner div { display: grid; gap: .15rem; }.persistent-preview-banner p { margin: 0; }.persistent-preview-banner span { color: var(--theme-muted); font-size: .86rem; }
.campaign-link { display: block; padding: .75rem .8rem; border-radius: 9px; text-decoration: none; font-weight: 650; }
.campaign-link:hover { background: var(--theme-panel); }
.dm-mail-link { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; border: 1px solid var(--theme-border); background: var(--theme-panel-alt); }.dm-mail-link strong, .dm-mail-count { display: inline-grid; place-items: center; min-width: 1.7rem; min-height: 1.7rem; padding: .2rem .5rem; border-radius: 999px; color: var(--theme-on-accent); background: var(--theme-accent); font-size: .75rem; }.dm-mail-list { display: grid; gap: .8rem; }.dm-mail-entry { padding: 1.1rem; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-panel); box-shadow: 0 10px 28px var(--theme-shadow); }.dm-mail-entry.unread { border-left: 5px solid var(--theme-highlight); }.dm-mail-entry.failed { border-color: var(--theme-danger, #a33); }.dm-mail-entry > header, .dm-mail-entry > header > div, .dm-mail-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }.dm-mail-entry > header time { color: var(--theme-muted); font-size: .78rem; }.dm-mail-result { display: flex; align-items: center; gap: 1rem; }.dm-mail-result code { padding: .35rem .5rem; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-panel-alt); }.dm-mail-result strong { color: var(--theme-accent); font: 2rem Georgia, serif; }.dm-mail-context { display: flex; flex-wrap: wrap; gap: .5rem; }.dm-mail-context div { display: flex; gap: .35rem; padding: .4rem .55rem; border: 1px solid var(--theme-border); border-radius: 7px; }.dm-mail-context dt { color: var(--theme-muted); }.dm-mail-context dd { margin: 0; }.dm-mail-audit ol { display: grid; gap: .35rem; }.dm-mail-audit li { display: flex; flex-wrap: wrap; gap: .5rem; }.dm-mail-audit time, .dm-mail-audit span { color: var(--theme-muted); }.dm-mail-actions { justify-content: flex-end; }.dm-mail-actions form { margin: 0; }
.main-content { min-width: 0; padding: clamp(1.5rem, 4vw, 3.5rem); max-width: 1500px; width: 100%; }
.main-content.centered { grid-column: 1 / -1; display: grid; place-items: center; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
h1 { margin: .2rem 0 .7rem; font-size: clamp(2.1rem, 4vw, 3.7rem); font-weight: 500; }
h2 { margin: .35rem 0 .6rem; font-size: 1.45rem; }
p { line-height: 1.62; }
.eyebrow { margin: 0; color: var(--theme-accent); text-transform: uppercase; letter-spacing: .16em; font-weight: 850; font-size: .72rem; }
.lede { color: var(--theme-muted); max-width: 65ch; font-size: 1.06rem; }
.muted { color: var(--theme-muted); }.small { font-size: .85rem; }
.page-header, .campaign-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.2rem; }
.campaign-hero-actions { display: flex; align-items: center; gap: .7rem; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 8px; padding: .72rem 1rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.primary { border-color: var(--theme-action-primary-border, transparent); color: var(--theme-action-primary-foreground, var(--theme-on-accent)); background: var(--theme-action-primary-background, var(--theme-accent)); box-shadow: 0 4px 10px var(--theme-shadow); }
.button.primary:not(:disabled):hover { border-color: var(--theme-action-primary-hover-border, transparent); color: var(--theme-action-primary-hover-foreground, var(--theme-on-accent)); background: var(--theme-action-primary-hover-background, var(--theme-accent-strong)); }
.button.primary:not(:disabled):active { border-color: var(--theme-action-primary-active-border, transparent); color: var(--theme-action-primary-active-foreground, var(--theme-on-accent)); background: var(--theme-action-primary-active-background, var(--theme-accent)); }
.button.ghost { border-color: var(--theme-action-secondary-border, currentColor); color: var(--theme-action-secondary-foreground, inherit); background: var(--theme-action-secondary-background, transparent); }
.button.ghost:not(:disabled):hover { border-color: var(--theme-action-secondary-hover-border, currentColor); color: var(--theme-action-secondary-hover-foreground, inherit); background: var(--theme-action-secondary-hover-background, transparent); }
.button.ghost:not(:disabled):active { border-color: var(--theme-action-secondary-active-border, currentColor); color: var(--theme-action-secondary-active-foreground, inherit); background: var(--theme-action-secondary-active-background, transparent); }
.button.danger { border-color: var(--theme-action-destructive-border, var(--theme-danger)); color: var(--theme-action-destructive-foreground, var(--theme-on-accent)); background: var(--theme-action-destructive-background, var(--theme-danger)); }
.button.danger:not(:disabled):hover { border-color: var(--theme-action-destructive-hover-border, var(--theme-danger)); color: var(--theme-action-destructive-hover-foreground, var(--theme-on-accent)); background: var(--theme-action-destructive-hover-background, var(--theme-danger)); }
.button.danger:not(:disabled):active { border-color: var(--theme-action-destructive-active-border, var(--theme-danger)); color: var(--theme-action-destructive-active-foreground, var(--theme-on-accent)); background: var(--theme-action-destructive-active-background, var(--theme-danger)); }
.button:focus-visible { outline-color: var(--theme-action-focus, #ddaa54); }
.button:disabled { opacity: var(--theme-action-disabled-opacity, .55); cursor: not-allowed; }
.button.primary:disabled { border-color: var(--theme-action-disabled-border, transparent); color: var(--theme-action-disabled-foreground, var(--theme-on-accent)); background: var(--theme-action-disabled-background, var(--theme-accent)); }
.button.ghost:disabled { border-color: var(--theme-action-disabled-border, currentColor); color: var(--theme-action-disabled-foreground, inherit); background: var(--theme-action-disabled-background, transparent); }
.button.danger:disabled, .button.ghost.danger:disabled { border-color: var(--theme-action-disabled-border, var(--theme-danger)); color: var(--theme-action-disabled-foreground, var(--theme-on-accent)); background: var(--theme-action-disabled-background, var(--theme-danger)); }
.editor-dark-surface { color: var(--theme-text); background: var(--theme-panel-alt); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; }
.campaign-card, .workspace-card, .panel, .auth-card, .empty-state { border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); box-shadow: 0 16px 40px var(--theme-shadow); }
.campaign-card { padding: 1.5rem; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.campaign-card:hover { transform: translateY(-2px); box-shadow: 0 18px 45px rgba(61,39,29,.16); }
.card-icon { color: var(--theme-highlight); font-size: 1.8rem; }
.card-action { color: var(--theme-accent); font-weight: 750; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; }
.empty-icon { display: block; color: var(--theme-highlight); font-size: 3rem; }
.narrow-page { max-width: 760px; margin: 0 auto; }
.panel { padding: clamp(1.25rem, 3vw, 2rem); margin-top: 2rem; }
.stacked-form { display: grid; gap: .8rem; }
.field { display: grid; align-content: start; gap: .4rem; }
label { font-weight: 780; }
input, select, textarea { width: 100%; padding: .78rem .85rem; border: 1px solid var(--theme-border); border-radius: 8px; color: var(--theme-text); background: var(--theme-panel-alt); }
input:not([type="file"]), select { height: 2.8rem; }
textarea { resize: vertical; }
.help { margin: 0; color: var(--theme-muted); font-size: .82rem; }
.field-error, .form-error { color: #8b1f31; font-weight: 700; }
.attunement-unresolved { color: #8b1f31; font-weight: 800; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: .6rem; }
.auth-card { width: min(480px, calc(100vw - 2rem)); padding: clamp(1.5rem, 5vw, 3rem); }
.messages { margin-bottom: 1rem; }.message { border-left: 4px solid var(--theme-success); padding: .8rem 1rem; color: var(--theme-text); background: var(--theme-panel-alt); }
.mode-switcher { display: flex; gap: .3rem; padding: .3rem; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-panel); }
.mode-switcher button { border: 0; padding: .6rem .8rem; border-radius: 7px; color: var(--theme-muted); background: transparent; }
.mode-switcher button.active { color: var(--theme-on-accent); background: var(--theme-accent); }
.ruleset-strip { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.3rem; padding: 1rem 1.2rem; border-block: 1px solid var(--theme-border); color: var(--theme-muted); }
.ruleset-strip > span { text-transform: uppercase; font-size: .68rem; letter-spacing: .13em; font-weight: 800; }
.ruleset-strip strong { color: var(--theme-text); }.ruleset-strip small { color: var(--theme-muted); font-weight: 500; }
.workspace-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.workspace-card { padding: 1.4rem; }
.workspace-link { color: inherit; text-decoration: none; }
.workspace-link:hover { border-color: var(--theme-highlight); transform: translateY(-2px); }
.status-chip { display: inline-block; padding: .25rem .55rem; border: 1px solid var(--theme-success); border-radius: 999px; color: var(--theme-success); background: var(--theme-panel-alt); font-size: .75rem; font-weight: 800; }
.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.library-search { display: grid; gap: .45rem; margin: 0 0 1.4rem; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-panel-alt); }.library-search > label { font-weight: 800; }.library-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .55rem; }.library-search-row input { min-width: 0; }.library-search p { margin: 0; }
.record-card { padding: 1.4rem; border: 1px solid var(--theme-border); border-radius: 13px; color: inherit; background: var(--theme-panel); box-shadow: 0 12px 30px var(--theme-shadow); text-decoration: none; }
.record-card:hover { border-color: var(--theme-highlight); transform: translateY(-2px); }
.record-type, .visibility-chip { display: inline-block; color: var(--theme-highlight); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.library-group + .library-group { margin-top: 2.5rem; }
.section-heading { margin: 0 0 1rem; }
.section-heading h2 { margin-bottom: .2rem; }
.section-heading p { margin: 0; color: var(--theme-muted); }
.record-card-details { display: grid; gap: .25rem; margin: .8rem 0; color: var(--theme-muted); font-size: .9rem; }
.visibility-chip { padding: .24rem .5rem; border: 1px solid var(--theme-border); border-radius: 999px; color: var(--theme-muted); letter-spacing: .04em; text-transform: none; }
.record-editor { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 1.3rem; }
.editor-fields { display: grid; gap: 1rem; }
.editor-section { margin: 0; padding: clamp(1.1rem, 2.5vw, 1.8rem); border: 1px solid var(--theme-border); border-radius: 14px; color: var(--theme-text); background: var(--theme-panel); box-shadow: 0 10px 28px var(--theme-shadow); }
.section-heading { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.2rem; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading p { color: var(--theme-muted); }
.section-number { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border: 1px solid var(--theme-highlight); border-radius: 50%; color: var(--theme-highlight); font-weight: 850; }
.field-grid { display: grid; gap: 1rem; }.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }.field-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.disclosure > summary { display: flex; gap: .9rem; align-items: center; cursor: pointer; list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary span:last-child { display: grid; gap: .2rem; }
.disclosure > summary strong { font-family: Georgia, serif; font-size: 1.35rem; }
.disclosure > summary small { color: var(--theme-muted); }
.disclosure[open] > summary { margin-bottom: 1.3rem; }
.campaign-disclosure { color: var(--theme-disclosure-foreground, var(--theme-text)); border: 1px solid var(--theme-disclosure-border, var(--theme-border)); border-radius: 11px; background: var(--theme-disclosure-background, var(--theme-panel)); }
.campaign-disclosure > summary { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.campaign-disclosure > summary::-webkit-details-marker { display: none; }
.campaign-disclosure > summary strong { font-family: Georgia, serif; font-size: 1.15rem; }
.campaign-disclosure > summary .eyebrow { color: var(--theme-disclosure-accent, var(--theme-accent)); }
.campaign-disclosure > summary:focus-visible { outline: 3px solid var(--theme-disclosure-focus, var(--theme-action-focus, #ddaa54)); outline-offset: 3px; }
.campaign-disclosure[open] > summary { border-bottom: 1px solid var(--theme-disclosure-border, var(--theme-border)); }
.campaign-disclosure > :not(summary) { padding-inline: 1rem; color: var(--theme-disclosure-expanded, var(--theme-disclosure-foreground, var(--theme-text))); }
.campaign-disclosure a { color: var(--theme-disclosure-link, var(--theme-accent)); }
.campaign-disclosure a:hover { color: var(--theme-disclosure-link-hover, var(--theme-accent-strong)); }
.campaign-disclosure small, .campaign-disclosure .muted { color: var(--theme-disclosure-muted, var(--theme-muted)); }
.current-portrait { width: 96px; height: 96px; margin-bottom: 1rem; border: 1px solid var(--theme-border); border-radius: 12px; object-fit: cover; }
.image-editor { display: grid; gap: .8rem; }.image-editor-preview { display: grid; width: min(100%, 520px); aspect-ratio: var(--image-editor-aspect); place-items: center; overflow: hidden; border: 1px dashed var(--theme-border); border-radius: 12px; color: var(--theme-muted); background: var(--theme-background-deep); text-align: center; cursor: copy; }.image-editor-preview:focus { outline: 3px solid var(--theme-highlight); outline-offset: 2px; }.image-editor-preview img { width: 100%; height: 100%; object-fit: cover; }.image-editor[data-image-aspect="auto"] .image-editor-preview { min-height: 260px; aspect-ratio: auto; }.image-editor[data-image-aspect="auto"] .image-editor-preview img { height: auto; max-height: 520px; object-fit: contain; }.image-editor-preview p { max-width: 32ch; padding: 1rem; }.image-editor-placeholder { color: var(--theme-highlight); font-size: 3rem; }.image-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }.image-editor-actions span { color: var(--theme-muted); font-size: .82rem; }.image-crop-tools { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 11px; background: var(--theme-panel-alt); }.image-crop-canvas { display: grid; width: min(100%, 520px); aspect-ratio: var(--image-editor-aspect); place-items: center; overflow: hidden; border: 2px solid var(--theme-highlight); border-radius: 10px; background: var(--theme-background-deep); }.image-crop-canvas canvas { display: block; width: 100%; height: 100%; object-fit: contain; }.image-crop-sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }.image-crop-sliders label { display: grid; gap: .35rem; color: var(--theme-muted); font-size: .78rem; }.image-crop-sliders input { padding: 0; }
.image-role-badge { justify-self: start; padding: .3rem .55rem; border-radius: 999px; color: var(--theme-on-accent); background: var(--theme-accent); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.gallery-section-heading { margin: 1.5rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--theme-border); }.gallery-section-heading h3, .gallery-section-heading p { margin: 0; }.gallery-section-heading p { margin-top: .25rem; color: var(--theme-muted); }
.gallery-editor, .gallery-editor-items { display: grid; gap: 1rem; min-width: 0; }.gallery-editor-item { display: grid; gap: .9rem; min-width: 0; padding: 1rem; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-surface); }.gallery-editor-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }.gallery-editor-item-heading > div:first-child { display: grid; min-width: 0; }.gallery-editor-item-heading small { overflow-wrap: anywhere; color: var(--theme-muted); font-size: .7rem; }.gallery-editor-order-actions { display: flex; flex-wrap: wrap; gap: .4rem; }.gallery-remove-control { display: flex; align-items: center; gap: .5rem; width: fit-content; color: var(--theme-muted); font-size: .82rem; }.gallery-remove-control input { width: auto; }.gallery-editor-item-removed { opacity: .55; border-style: dashed; }.gallery-retained-note { margin: 0; padding: .6rem .75rem; border-left: 4px solid var(--theme-success); color: var(--theme-muted); background: var(--theme-panel-alt); font-size: .8rem; }
.record-gallery { display: grid; gap: 1rem; min-width: 0; padding: 1.2rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); }.record-gallery-heading h2, .record-gallery-heading p { margin: 0; }.record-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; min-width: 0; }.record-gallery-grid figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-background-deep); }.record-gallery-grid img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: contain; }.record-gallery-grid figcaption { padding: .65rem .75rem; overflow-wrap: anywhere; color: var(--theme-muted); font-size: .82rem; }
.live-preview { position: sticky; top: 1.2rem; padding: 1.4rem; border: 1px solid var(--theme-border); border-radius: 14px; background: linear-gradient(155deg, var(--theme-panel), var(--theme-panel-alt)); box-shadow: 0 16px 38px var(--theme-shadow); }
.preview-portrait { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; margin: 1rem 0; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 11px; color: var(--theme-highlight); background: var(--theme-background-deep); font-size: 4rem; }
.preview-portrait img { width: 100%; height: 100%; object-fit: cover; }
.preview-byline { color: var(--theme-muted); }.preview-description { min-height: 5rem; white-space: pre-wrap; }
.preview-private { margin-top: 1rem; padding: .7rem; border: 1px dashed var(--theme-border); border-radius: 8px; color: var(--theme-muted); font-size: .76rem; }
.sticky-save { position: sticky; bottom: .8rem; display: flex; justify-content: space-between; align-items: center; z-index: 2; padding: .8rem 1rem; border: 1px solid var(--theme-border); border-radius: 11px; background: var(--theme-panel); box-shadow: 0 8px 30px var(--theme-shadow); }
.save-state { color: var(--theme-muted); font-size: .82rem; font-weight: 750; }
.header-actions { display: flex; gap: .6rem; }.header-actions form { margin: 0; }
.campaign-time-heading { display: flex; justify-content: flex-end; margin: 1rem 0; }.campaign-time-panel { margin: .9rem 0 1.4rem; }.campaign-time-panel .section-heading { margin-bottom: .65rem; }.campaign-clock-grid, .campaign-clock-management { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .7rem; }.campaign-clock-card { display: grid; min-width: 0; gap: .38rem; padding: .65rem .75rem; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-panel); }.campaign-clock-card-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem; }.campaign-clock-card h3 { margin: 0; font-size: 1rem; }.campaign-clock-summary, .live-clock-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .75rem; }.campaign-clock-summary strong, .live-clock-summary strong { font-size: 1.05rem; }.campaign-clock-summary span, .live-clock-summary span { color: var(--theme-muted); font-size: .8rem; }.campaign-clock-pressure { margin: .05rem 0 0; color: var(--theme-muted); font-size: .8rem; line-height: 1.35; }.countdown-clock { --clock-start: hsl(32 14% 66%); --clock-urgency: var(--clock-start); --clock-gradient: linear-gradient(90deg, var(--clock-start) 0%, color-mix(in srgb, var(--clock-start) 55%, var(--clock-urgency)) 55%, var(--clock-urgency) 100%); }.countdown-progress { display: block; width: 100%; height: .32rem; overflow: hidden; border: 0; border-radius: 999px; accent-color: var(--clock-urgency); background: color-mix(in srgb, var(--clock-urgency) 14%, var(--theme-background-deep)); }.countdown-progress::-webkit-progress-bar { border-radius: 999px; background: color-mix(in srgb, var(--clock-urgency) 14%, var(--theme-background-deep)); }.countdown-progress::-webkit-progress-value { border-radius: 999px; background: var(--clock-gradient); }.countdown-progress::-moz-progress-bar { border-radius: 999px; background: var(--clock-gradient); }.campaign-clock-editor { margin: 1rem 0; }.clock-actions { display: flex; flex-wrap: wrap; gap: .5rem; }.clock-history { display: grid; gap: .7rem; padding-left: 1.3rem; }.clock-history p { margin: .2rem 0 0; }
.character-library-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 850px) { .character-library-actions { justify-content: flex-start; } }
.record-detail { display: grid; gap: 1rem; }
.record-public { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 2rem; padding: 1.5rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); }
.detail-portrait { margin: 0; }.detail-portrait img { width: 100%; aspect-ratio: 4 / 5; border-radius: 11px; object-fit: cover; }.detail-portrait figcaption { margin-top: .4rem; color: var(--theme-muted); font-size: .8rem; }
.fact-row { display: flex; flex-wrap: wrap; gap: .4rem; }.fact-row span { padding: .3rem .6rem; border: 1px solid var(--theme-border); border-radius: 999px; color: var(--theme-muted); font-size: .78rem; }
.record-prose { line-height: 1.7; white-space: pre-wrap; }
.detail-panel, .gm-panel { padding: 1.5rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); }
.gm-panel { border-left: 5px solid var(--theme-highlight); }
.relationship-list { display: flex; flex-wrap: wrap; gap: .6rem; }.relationship-list a { padding: .5rem .7rem; border-radius: 8px; color: var(--theme-on-accent); background: var(--theme-accent); text-decoration: none; }
.private-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }.private-facts div { padding: .8rem; border: 1px solid var(--theme-border); border-radius: 8px; }.private-facts dt { color: var(--theme-highlight); font-weight: 800; }.private-facts dd { margin: .3rem 0 0; white-space: pre-wrap; }
.combat-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1rem; padding: .8rem; border: 1px solid var(--theme-border); border-radius: 8px; }.combat-summary span { color: var(--theme-muted); }
.npc-statblock-editor { display: grid; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--theme-border); }.npc-statblock-editor[hidden] { display: none; }.statblock-form-fields { display: grid; gap: 1rem; }.statblock-field-group { padding: 1rem; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-panel-alt); }.statblock-field-group > h3 { margin-top: 0; color: var(--theme-accent); }.embedded-statblock-preview { position: static; max-height: none; font-family: Georgia, serif; }.npc-combat-profile { padding: 1rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel-alt); }
.ruleset-section { border-left: 5px solid var(--theme-highlight); }.rune-card { border-left: 5px solid var(--theme-highlight); }.rune-identity { display: flex; align-items: center; gap: 1rem; }.rune-identity > span { color: var(--theme-highlight); font-size: 4rem; line-height: 1; }.rune-identity h2, .rune-identity p { margin: 0; }.resource-ready { color: var(--theme-success); }.resource-spent { color: var(--theme-muted); }
.character-ability-editor { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }.character-save-editor, .character-skill-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem 1rem; margin-top: 1rem; }.spell-slot-editor { display: grid; gap: .35rem; margin: 1rem 0; }.spell-slot-heading, .spell-slot-row { display: grid; grid-template-columns: minmax(90px, 1fr) repeat(2, minmax(90px, .7fr)); gap: .6rem; align-items: center; }.spell-slot-heading { color: var(--theme-muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.spell-slot-row { padding: .45rem .6rem; border: 1px solid var(--theme-border); border-radius: 8px; }.spell-slot-row input { min-width: 0; }
.provider-collection { display: grid; gap: .8rem; min-width: 0; }.provider-collection-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }.provider-collection-heading h3, .provider-collection-heading p { margin: 0; }.provider-collection-heading p { margin-top: .25rem; color: var(--theme-muted); }.provider-collection-rows { display: grid; gap: .8rem; }.provider-collection-row { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 10px; }.provider-collection-row-header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem .7rem; border-bottom: 1px solid var(--theme-border); background: color-mix(in srgb, var(--theme-background-deep) 72%, transparent); }.provider-collection-row-title { min-width: 0; overflow-wrap: anywhere; color: var(--theme-text); font-weight: 800; }.provider-collection-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .7rem; padding: .75rem; }.provider-collection-field { display: grid; align-content: start; gap: .3rem; min-width: 0; color: var(--theme-text); font-size: .78rem; font-weight: 800; }.provider-collection-field input, .provider-collection-field select, .provider-collection-field textarea { min-width: 0; width: 100%; }.provider-collection-field small { color: var(--theme-muted); font-weight: 400; }.provider-collection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }.button.compact { min-height: 2.2rem; padding: .35rem .65rem; font-size: .75rem; }.button.ghost.danger { border-color: var(--theme-action-destructive-border, var(--theme-danger)); color: var(--theme-action-destructive-foreground, var(--theme-danger)); background: var(--theme-action-destructive-background, transparent); }.button.ghost.danger:not(:disabled):hover { border-color: var(--theme-action-destructive-hover-border, var(--theme-danger)); color: var(--theme-action-destructive-hover-foreground, var(--theme-danger)); background: var(--theme-action-destructive-hover-background, transparent); }.button.ghost.danger:not(:disabled):active { border-color: var(--theme-action-destructive-active-border, var(--theme-danger)); color: var(--theme-action-destructive-active-foreground, var(--theme-danger)); background: var(--theme-action-destructive-active-background, transparent); }.token-color-chip { display: inline-flex !important; align-items: center; gap: .35rem; }.token-color-chip i { width: .8rem; height: .8rem; border: 1px solid var(--theme-border); border-radius: 50%; background: var(--token-color); }
.compact-character-card { display: flex; flex-wrap: wrap; gap: .4rem; padding-left: .7rem; border-left: 5px solid var(--token-color, var(--theme-highlight)); }.compact-character-card span { padding: .25rem .45rem; border: 1px solid var(--theme-border); border-radius: 999px; background: var(--theme-panel-alt); font-size: .75rem; font-weight: 800; }
.live-character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}
.live-character-card {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-panel-alt);
}
.live-character-card.is-owned {
  border-color: var(--theme-highlight);
  box-shadow: inset 4px 0 0 var(--theme-highlight);
}
.live-character-card-heading {
  min-width: 0;
}
.live-character-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  line-height: 1.25;
}
.live-character-player {
  display: inline-flex;
  margin-top: .35rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  color: var(--theme-on-accent);
  background: var(--theme-accent);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.25;
}
.live-character-card > p {
  margin: .3rem 0 .7rem;
  color: var(--theme-muted);
  font-size: .9rem;
  line-height: 1.35;
}
.live-character-stats {
  display: grid;
  gap: .15rem;
  padding: .55rem 0 .25rem;
  border-top: 1px solid var(--theme-border);
}
.live-character-stats > span,
.live-character-resources > .live-resource-stepper {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(3.2rem, auto) auto;
  align-items: center;
  gap: .4rem;
  width: 100%;
  min-height: 2.2rem;
  padding: .18rem 0;
  border: 0;
  border-radius: 0;
  font-size: .82rem;
  line-height: 1.25;
}
.live-character-stats > span > strong,
.live-character-resources > .live-resource-stepper > strong {
  min-width: 3.2rem;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.live-character-stats > .live-resource-stepper.is-read-only,
.live-character-resources > .live-resource-stepper.is-read-only {
  grid-template-columns: minmax(0, 1fr) minmax(3.2rem, auto);
}
.live-character-resources {
  display: grid;
  align-content: start;
  gap: .15rem;
  margin-top: .5rem;
  padding-top: .7rem;
  border-top: 1px solid var(--theme-border);
}
.live-character-resources > strong:first-child {
  margin-bottom: .15rem;
  color: var(--theme-accent);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.resource-step {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 1px solid var(--theme-highlight);
  border-radius: 8px;
  color: var(--theme-accent);
  background: var(--theme-panel);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.resource-step:hover {
  color: var(--theme-on-accent);
  background: var(--theme-accent);
}
.resource-step:focus-visible {
  outline: 3px solid var(--theme-highlight);
  outline-offset: 2px;
}
.live-rune-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .7rem;
  margin-top: .5rem;
  padding-top: .75rem;
  border-top: 1px solid var(--theme-border);
}
.live-rune-control > span { color: var(--theme-highlight); font-size: 2rem; }
.live-rune-control > div { display: grid; gap: .35rem; }
.live-rune-control small { color: var(--theme-muted); line-height: 1.35; }
.live-rune-control .button { width: 100%; }
@media (max-width: 650px) {
  .live-character-grid { grid-template-columns: 1fr; }
}
.live-clock-grid, .live-reward-grid { display: grid; gap: .65rem; margin-top: 1rem; }.live-clock-card, .live-reward-card { display: grid; gap: .5rem; padding: .75rem; border: 1px solid var(--theme-border); border-radius: 9px; background: var(--theme-panel-alt); }.live-clock-card.countdown-clock { gap: .38rem; padding: .6rem .7rem; }.live-clock-card.complete { border-color: var(--theme-success); }.live-clock-heading, .live-reward-heading { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }.live-clock-heading h3, .live-reward-heading h3 { margin: 0; }.live-clock-card.countdown-clock .live-clock-heading h3 { font-size: 1rem; }.clock-track { display: grid; grid-template-columns: repeat(var(--clock-maximum), minmax(8px, 1fr)); gap: .25rem; }.clock-segment { height: .65rem; border: 1px solid var(--theme-border); border-radius: 999px; background: var(--theme-panel); }.clock-segment.filled { border-color: var(--theme-accent); background: var(--theme-accent); }.clock-actions, .reward-actions { display: flex; align-items: center; gap: .4rem; }.clock-actions .button { min-width: 2.2rem; padding-inline: .55rem; }.live-reward-card.awarded { border-color: var(--theme-success); }.live-reward-card small { color: var(--theme-muted); }.reward-actions select { min-width: 0; }
.revision-note { color: var(--theme-muted); font-size: .76rem; }
.catalog-notice { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid var(--theme-highlight); border-radius: 10px; color: var(--theme-text); background: var(--theme-panel-alt); }
.catalog-notice span { color: var(--theme-muted); }
.catalog-filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(130px, 1fr) minmax(160px, 1fr) 100px auto; align-items: end; gap: .8rem; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 13px; background: var(--theme-panel); box-shadow: 0 10px 28px var(--theme-shadow); }
.result-count { color: var(--theme-muted); font-size: .8rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: .8rem; }
.catalog-card { display: flex; justify-content: space-between; gap: 1rem; min-height: 150px; padding: 1.1rem; border: 1px solid var(--theme-border); border-radius: 12px; color: inherit; background: var(--theme-panel); text-decoration: none; }
.catalog-card:hover { border-color: var(--theme-highlight); transform: translateY(-2px); }
.catalog-card h2 { margin-top: .7rem; }.catalog-card p { margin: 0; color: var(--theme-muted); }
.catalog-card dl { display: grid; align-content: start; gap: .35rem; min-width: 80px; margin: 0; }.catalog-card dl div { display: flex; justify-content: space-between; gap: .6rem; }.catalog-card dt { color: var(--theme-muted); font-size: .72rem; }.catalog-card dd { margin: 0; font-weight: 800; font-size: .82rem; }
.source-chip, .edition-badge { display: inline-block; padding: .25rem .5rem; border: 1px solid var(--theme-highlight); border-radius: 999px; color: var(--theme-accent); background: var(--theme-panel-alt); font-size: .7rem; font-weight: 850; letter-spacing: .04em; }
.source-provenance { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem; }.source-provenance div { display: grid; gap: .25rem; padding: .8rem; border: 1px solid var(--theme-border); border-radius: 9px; background: var(--theme-panel); }.source-provenance span { color: var(--theme-muted); text-transform: uppercase; letter-spacing: .08em; font-size: .65rem; }
.statblock-wrap { max-width: 850px; margin: 0 auto; }
.statblock { padding: clamp(1.2rem, 3vw, 2.2rem); border: 1px solid var(--theme-highlight); border-radius: 5px 5px 18px 5px; color: var(--theme-text); background: var(--theme-panel); box-shadow: 0 18px 50px var(--theme-shadow); }
.statblock-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }.statblock-header h2 { margin-bottom: .2rem; color: var(--theme-accent); font-size: clamp(2rem, 4vw, 3rem); }.statblock-byline { margin: 0; color: var(--theme-muted); font-style: italic; }
.statblock-rule { height: 7px; margin: .8rem 0; background: linear-gradient(90deg, var(--theme-accent), var(--theme-highlight)); clip-path: polygon(0 0, 100% 0, 99% 100%, 0 100%); }.statblock-rule.thin { height: 3px; }
.statblock-core, .statblock-details { display: grid; gap: .25rem; margin: 0; }.statblock-core div, .statblock-details div { display: flex; gap: .45rem; }.statblock-core dt, .statblock-details dt { color: var(--theme-accent); font-weight: 850; }.statblock-core dd, .statblock-details dd { margin: 0; }
.ability-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; text-align: center; }.ability-grid > div { display: grid; position: relative; gap: .15rem; }.ability-grid strong { color: var(--theme-accent); }.ability-grid span { font-size: .86rem; }.ability-grid.compact { margin: 1rem 0; padding-block: .7rem; border-block: 2px solid var(--theme-highlight); }.ability-roll-trigger { display: grid; gap: .15rem; width: 100%; min-height: 48px; padding: .35rem .2rem; border: 1px solid var(--theme-border); border-radius: 7px; color: var(--theme-text); background: var(--theme-panel-alt); font: inherit; cursor: pointer; }.ability-roll-trigger:hover, .ability-roll-trigger:focus-visible, .ability-roll-trigger[aria-expanded="true"] { border-color: var(--theme-highlight); background: var(--theme-background-deep); }.ability-roll-menu { position: absolute; top: 100%; left: 50%; display: grid; z-index: 4; width: max-content; min-width: 170px; padding: .4rem; border: 1px solid var(--theme-highlight); border-radius: 9px; background: var(--theme-panel); box-shadow: 0 10px 28px var(--theme-shadow); transform: translateX(-50%); }.ability-roll-menu[hidden] { display: none; }.ability-roll-menu .inline-roll { display: flex; justify-content: space-between; gap: .8rem; padding: .45rem .55rem; border: 0; border-radius: 6px; text-align: left; }.ability-roll-menu .inline-roll span { color: var(--theme-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }.roll-history { display: grid; gap: .35rem; margin: 0; padding-left: 1.3rem; }.roll-history li { line-height: 1.45; }
.statblock-section h3, .preview-action h3 { margin: 1rem 0 .4rem; border-bottom: 2px solid var(--theme-highlight); color: var(--theme-accent); font-family: Georgia, serif; font-size: 1.55rem; }.statblock-entry { margin: 0 0 .7rem; line-height: 1.55; }
.inline-roll { display: inline; margin: 0 .08rem; padding: .02rem .2rem; border: 0; border-bottom: 1px dashed currentColor; color: var(--theme-accent); background: color-mix(in srgb, var(--theme-highlight) 15%, transparent); font-weight: 800; cursor: pointer; }.inline-roll:hover { color: var(--theme-on-accent); background: var(--theme-accent); }.roll-target { color: var(--theme-accent); font-weight: 800; }.roll-output { margin-top: 1rem; padding: .65rem .8rem; border: 1px dashed var(--theme-border); border-radius: 7px; color: var(--theme-muted); font-size: .8rem; }.roll-output.rolled { border-style: solid; border-color: var(--theme-highlight); color: var(--theme-text); background: var(--theme-panel-alt); }
.creature-detail-layout { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 850px); justify-content: center; align-items: start; gap: 1rem; }.creature-detail-layout > .statblock-wrap:only-child { grid-column: 1 / -1; width: min(850px, 100%); }.creature-art { position: sticky; top: 1rem; margin: 0; }.creature-art img { width: 100%; max-height: 70vh; border: 1px solid var(--theme-border); border-radius: 14px; object-fit: cover; }.creature-art figcaption { color: var(--theme-muted); font-size: .8rem; }
.creature-editor { grid-template-columns: minmax(0, 1fr) 390px; }.ability-fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; }.creature-live-preview { font-family: Georgia, serif; }.creature-live-preview > h2 { color: var(--theme-accent); font-size: 2rem; }.preview-action p { max-height: 13rem; overflow: auto; white-space: pre-wrap; font-family: Inter, sans-serif; font-size: .82rem; }
.statblock-paste { border-left: 5px solid var(--theme-highlight); }.statblock-paste textarea { min-height: 11rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }.statblock-paste-actions { display: flex; align-items: center; gap: .8rem; margin-top: .7rem; }.statblock-paste-actions span { color: var(--theme-muted); font-size: .8rem; }.parse-notices { margin: .8rem 0 0; padding: .75rem .75rem .75rem 2rem; border: 1px solid var(--theme-border); border-radius: 8px; color: var(--theme-muted); background: var(--theme-panel-alt); font-size: .82rem; }
.rich-source { display: none; }.rich-field { overflow: hidden; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-panel-alt); }.rich-field:focus-within { outline: 3px solid var(--theme-highlight); outline-offset: 2px; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem; border-bottom: 1px solid var(--theme-border); background: var(--theme-background-deep); }.rich-toolbar button { min-height: 2rem; padding: .3rem .55rem; border: 1px solid var(--theme-border); border-radius: 5px; color: var(--theme-text); background: var(--theme-panel); cursor: pointer; }.rich-toolbar button:hover, .rich-toolbar button.active { color: var(--theme-on-accent); background: var(--theme-accent); }
.rich-editor { min-height: 16rem; padding: 1rem; line-height: 1.65; outline: 0; }.rich-editor:empty::before { color: var(--theme-muted); content: "Paste or begin writing…"; pointer-events: none; }.gm-editor-section { border-left: 5px solid var(--theme-highlight); }.rich-editor table, .content-prose table, .preview-rich table { width: 100%; border-collapse: collapse; }.rich-editor th, .rich-editor td, .content-prose th, .content-prose td, .preview-rich th, .preview-rich td { padding: .45rem; border: 1px solid var(--theme-border); text-align: left; }.rich-editor img, .content-prose img, .preview-rich img { max-width: 100%; height: auto; }
.content-editor-form { grid-template-columns: minmax(0, 1fr) 360px; }.content-live-preview { max-height: calc(100vh - 2.4rem); overflow: auto; }.content-live-preview h2 { color: var(--theme-accent); font-size: 2rem; }.preview-summary { color: var(--theme-muted); font-style: italic; }.preview-rich { padding-top: .8rem; border-top: 3px solid var(--theme-highlight); line-height: 1.6; }.current-featured-image { display: grid; width: min(100%, 420px); min-height: 92px; max-height: 250px; margin-bottom: 1rem; place-items: center; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 12px; color: var(--theme-muted); background: var(--theme-surface); }.current-featured-image img { width: 100%; max-height: 250px; object-fit: cover; }.type-fields-heading { display: flex; gap: .5rem 1rem; align-items: baseline; margin: 1rem 0 .7rem; color: var(--theme-accent); }.type-fields-heading span { color: var(--theme-muted); font-size: .85rem; }.current-attachment, .attachment-card { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-surface); }.record-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 0; }.record-facts div { padding: .8rem; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-surface); }.record-facts dt { color: var(--theme-muted); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }.record-facts dd { margin: .25rem 0 0; }
.content-editor-form.document-editor { grid-template-columns: minmax(0, 1050px); justify-content: center; }.content-detail { display: grid; gap: 1rem; max-width: 1050px; margin: 0 auto; }.content-hero { margin: 0; }.content-hero img { width: 100%; max-height: 520px; border: 1px solid var(--theme-border); border-radius: 16px; object-fit: cover; }.content-hero figcaption { margin-top: .4rem; color: var(--theme-muted); font-size: .8rem; }.content-prose { padding: clamp(1.2rem, 4vw, 2.5rem); border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); line-height: 1.75; }.content-prose > :first-child { margin-top: 0; }.content-prose > :last-child { margin-bottom: 0; }
.revision-history, .revision-changes { display: grid; gap: 1rem; }.revision-card { padding: 1.2rem; border: 1px solid var(--theme-border); border-radius: 13px; background: var(--theme-panel); box-shadow: 0 12px 32px var(--theme-shadow); }.revision-card > header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }.revision-card > header h2 { margin: .2rem 0 0; }.revision-card > header > p { color: var(--theme-muted); font-size: .8rem; }.revision-change { padding: .9rem; border: 1px solid var(--theme-border); border-radius: 9px; background: var(--theme-panel-alt); }.revision-change h3 { margin: 0 0 .65rem; color: var(--theme-accent); }.revision-change > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }.revision-change span { color: var(--theme-muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.revision-change pre { min-height: 2.7rem; margin: .25rem 0 0; padding: .65rem; overflow: auto; border: 1px solid var(--theme-border); border-radius: 7px; white-space: pre-wrap; word-break: break-word; background: var(--theme-background-deep); font: .82rem/1.45 ui-monospace, monospace; }
.map-editor-form { grid-template-columns: minmax(0, 1fr) 380px; }.map-upload-preview { display: grid; place-items: center; min-height: 260px; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 10px; color: var(--theme-highlight); background: var(--theme-background-deep); text-align: center; }.map-upload-preview > span { font-size: 3rem; }.map-upload-preview img { width: 100%; max-height: 520px; object-fit: contain; }.current-map-image { width: 100%; max-height: 440px; margin-bottom: 1rem; border: 1px solid var(--theme-border); border-radius: 12px; object-fit: contain; background: var(--theme-background-deep); }
.map-note-editor { display: grid; grid-template-columns: minmax(420px, 1.25fr) minmax(420px, 1fr); align-items: start; gap: 1rem; }.map-placement-panel { position: sticky; top: 1rem; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); box-shadow: 0 12px 36px var(--theme-shadow); }.map-placement { position: relative; overflow: hidden; min-height: 360px; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-background-deep); cursor: crosshair; }.map-placement img { display: block; width: 100%; height: auto; }
.map-pin { position: absolute; z-index: 2; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 2px solid var(--theme-on-accent); border-radius: 50% 50% 50% 0; color: var(--theme-on-accent); background: var(--theme-accent); box-shadow: 0 3px 10px rgba(0,0,0,.45); font-weight: 900; transform: translate(-50%, -100%) rotate(-45deg); cursor: pointer; }.map-pin > span { transform: rotate(45deg); }.map-pin.preview-pin { pointer-events: none; }.map-pin.marker-person { background: var(--theme-highlight); }.map-pin.marker-danger { background: var(--theme-danger); }.map-pin.marker-secret { background: var(--theme-accent-strong); }.map-pin.marker-objective { background: var(--theme-success); }.map-pin[aria-pressed="true"] { outline: 4px solid var(--theme-highlight); outline-offset: 3px; }
.player-preview-banner, .view-as-panel { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid var(--theme-highlight); border-radius: 11px; color: var(--theme-text); background: var(--theme-panel-alt); }.player-preview-banner div, .view-as-panel div { display: grid; gap: .2rem; }.view-as-panel span { color: var(--theme-muted); font-size: .82rem; }.view-as-panel select { width: min(360px, 100%); }
.map-description { margin-bottom: 1rem; padding: 1rem 1.2rem; border-left: 4px solid var(--theme-highlight); background: var(--theme-panel); }.map-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 1rem; }.map-surface { position: relative; min-height: 420px; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-background-deep); box-shadow: 0 16px 45px var(--theme-shadow); }.map-surface > img { display: block; width: 100%; height: auto; }.map-missing { display: grid; place-items: center; min-height: 420px; color: var(--theme-muted); }.map-note-drawer { position: sticky; top: 1rem; min-height: 260px; padding: 1.2rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); box-shadow: 0 12px 36px var(--theme-shadow); }.map-note-card:focus { outline: 0; }.map-note-card h2 { color: var(--theme-accent); }.map-note-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: 1rem; }.map-note-links strong { width: 100%; }.map-note-links a { padding: .25rem .45rem; border: 1px solid var(--theme-border); border-radius: 6px; text-decoration: none; }.map-note-secret { margin: 1rem 0; padding: .8rem; border-left: 4px solid var(--theme-highlight); background: var(--theme-panel-alt); }.preview-locked { display: grid; place-items: center; min-height: 440px; padding: 2rem; border: 1px dashed var(--theme-border); border-radius: 14px; color: var(--theme-muted); background: var(--theme-panel); text-align: center; }.preview-locked > span { color: var(--theme-highlight); font-size: 3rem; }.empty-state.compact { padding: 2rem 1rem; box-shadow: none; }
.preparation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }.preparation-column { padding: 1.3rem; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); }.prep-card-list, .preparation-editor, .preparation-detail, .reference-board { display: grid; gap: 1rem; }.prep-card { display: block; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 10px; color: inherit; background: var(--theme-panel-alt); text-decoration: none; }.prep-card:hover { border-color: var(--theme-highlight); transform: translateY(-1px); }.prep-card h3 { margin: .45rem 0; font-family: Georgia, serif; font-size: 1.3rem; }.prep-card p { margin: 0 0 .8rem; color: var(--theme-muted); }.preparation-editor { max-width: 1050px; margin: 0 auto; }.reference-board { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }.reference-group { padding: 1.2rem; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-panel); }.reference-group.featured-reference { border-color: var(--theme-highlight); }.reference-group h2 a { color: var(--theme-accent); }.relationship-list a { display: inline-flex; align-items: center; gap: .35rem; }.relationship-list small { opacity: .7; font-size: .68rem; text-transform: uppercase; }.session-opening, .session-goals { margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-panel-alt); }.session-opening p, .session-goals p { margin-bottom: 0; white-space: pre-wrap; }.session-beats { display: grid; gap: .55rem; padding-left: 1.7rem; }.session-beats li { padding: .55rem .7rem; border-left: 3px solid var(--theme-highlight); background: var(--theme-panel-alt); }
.launch-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }.launch-card form { flex: 0 0 auto; }.live-app { max-width: 1550px; margin: 0 auto; }.live-header, .live-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }.live-header { margin-bottom: 1rem; }.live-header [data-live-plan] { max-width: 40ch; overflow-wrap: anywhere; font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.2; }.live-scene-copy { margin: 0; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.5; }.live-header-actions { display: flex; align-items: center; gap: .7rem; }.connection-chip { padding: .35rem .6rem; border: 1px solid var(--theme-success); border-radius: 999px; color: var(--theme-success); background: var(--theme-panel); font-size: .75rem; font-weight: 800; }.live-error { margin-bottom: 1rem; padding: .8rem 1rem; border-left: 4px solid var(--theme-danger); color: var(--theme-text); background: var(--theme-panel-alt); }.live-status-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; border: 1px solid var(--theme-border); border-radius: 12px; overflow: hidden; background: var(--theme-panel); }.live-status-strip > div { display: grid; gap: .2rem; padding: .8rem 1rem; border-right: 1px solid var(--theme-border); }.live-status-strip > div:last-child { border-right: 0; }.live-status-strip span { color: var(--theme-muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }.live-status-strip a { color: var(--theme-accent); }.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 1rem; }.live-center, .live-tools { display: grid; gap: 1rem; }.live-tools { position: sticky; top: 1rem; }.live-panel { padding: 1.2rem; border: 1px solid var(--theme-border); border-radius: 13px; background: var(--theme-panel); box-shadow: 0 12px 32px var(--theme-shadow); }.live-panel form { display: grid; gap: .55rem; margin-top: 1rem; }.inline-form { display: flex; gap: .5rem; }.inline-form input, .inline-form select { min-width: 0; }.chat-stream { display: grid; gap: .5rem; max-height: 290px; overflow: auto; }.chat-message { padding: .55rem .65rem; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-panel-alt); }.chat-message p { margin: .25rem 0; white-space: pre-wrap; }.compact-check { display: flex; align-items: center; gap: .45rem; color: var(--theme-muted); font-size: .78rem; }.compact-check input { width: auto; height: auto; }.roll-stream, .reveal-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; }.roll-card, .reveal-card { display: grid; gap: .25rem; padding: .75rem; border: 1px solid var(--theme-border); border-radius: 9px; background: var(--theme-panel-alt); }.roll-card > strong { color: var(--theme-accent); font: 2rem Georgia, serif; }.roll-card small { color: var(--theme-muted); }.reveal-card h3 { margin: .25rem 0; font-family: Georgia, serif; }.session-recap { border-left: 5px solid var(--theme-highlight); }.recap-block { margin-top: .8rem; padding: .8rem; border: 1px solid var(--theme-border); border-radius: 9px; background: var(--theme-panel-alt); }.recap-block h3 { color: var(--theme-accent); }.recap-block p { margin-bottom: 0; line-height: 1.6; }.recap-private { border-style: dashed; }.session-close-capture { display: grid; gap: .55rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--theme-border); }.session-close-capture summary { color: var(--theme-accent); cursor: pointer; font-weight: 800; }.session-close-capture label { display: grid; gap: .1rem; margin-top: .5rem; }.session-close-capture label small { color: var(--theme-muted); font-weight: 400; }.history-heading { margin-top: 1.3rem; }.event-timeline { display: grid; gap: .4rem; padding: 0; list-style: none; }.event-timeline li { display: flex; gap: .7rem; align-items: center; padding: .55rem; border-left: 3px solid var(--theme-border); background: var(--theme-panel-alt); }.event-timeline li > span { display: grid; place-items: center; flex: 0 0 1.7rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: var(--theme-on-accent); background: var(--theme-accent); font-size: .7rem; font-weight: 800; }.event-timeline li > div { display: grid; }.event-timeline small { color: var(--theme-muted); }.gm-live-controls { border-left: 5px solid var(--theme-highlight); }.gm-live-controls .button.danger { margin-top: 1rem; }.table-display .topbar, .table-display .sidebar { display: none; }.table-display .app-shell { grid-template-columns: 1fr; min-height: 100vh; }.table-display .main-content { max-width: none; }.table-display .dice-panel, .table-display [data-chat-form], .table-display .gm-live-controls { display: none !important; }
.live-chat-actions { display: grid; grid-template-columns: 1fr; gap: .55rem; }.live-chat-actions.has-clear { grid-template-columns: repeat(2, minmax(0, 1fr)); }.live-chat-actions .button { width: 100%; }
.live-roll-feedback { margin: .75rem 0 0; color: var(--theme-success); font-size: .82rem; font-weight: 800; }.live-roll-feedback.error { color: var(--theme-danger); }.live-recent-roll { display: grid; gap: .55rem; margin-top: .8rem; padding: .8rem; border: 2px solid var(--theme-highlight); border-radius: 10px; background: var(--theme-panel-alt); }.live-recent-roll .eyebrow, .live-recent-roll p { margin: 0; }.live-recent-roll dl { display: grid; gap: .35rem; margin: 0; }.live-recent-roll dl > div { display: flex; justify-content: space-between; gap: .8rem; }.live-recent-roll dt { color: var(--theme-muted); }.live-recent-roll dd { margin: 0; font-weight: 800; }.live-roll-total { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; padding-top: .45rem; border-top: 1px solid var(--theme-border); }.live-roll-total strong { color: var(--theme-accent); font: 2rem Georgia, serif; }.live-roll-natural { font-weight: 900; }.live-recent-roll.natural-20 { border-color: var(--theme-success); }.live-recent-roll.natural-20 .live-roll-natural { color: var(--theme-success); }.live-recent-roll.natural-1 { border-color: var(--theme-danger); }.live-recent-roll.natural-1 .live-roll-natural { color: var(--theme-danger); }
.live-player-workspace { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .85fr); align-items: start; gap: 1rem; min-width: 0; }.live-player-support { display: grid; align-content: start; gap: 1rem; min-width: 0; }.live-layout-player .live-character-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
@media (max-width: 1250px) { .creature-editor, .content-editor-form, .map-editor-form { grid-template-columns: 1fr; }.creature-live-preview, .content-live-preview, .map-live-preview { position: static; grid-row: 1; max-height: none; }.map-note-editor { grid-template-columns: 1fr; }.map-placement-panel { position: static; } }
@media (max-width: 850px) { .app-shell { grid-template-columns: 1fr; }.sidebar { display: none; }.workspace-grid { grid-template-columns: 1fr; }.page-header, .campaign-hero { align-items: flex-start; flex-direction: column; }.campaign-hero-actions { width: 100%; align-items: stretch; flex-direction: column; }.mode-switcher { width: 100%; overflow-x: auto; }.topbar { padding: 0 1rem; }.user-menu > span { display: none; } }
@media (max-width: 650px) { .library-search-row { grid-template-columns: 1fr; }.library-search-row .button { width: 100%; } }
@media (max-width: 1050px) { .record-editor, .preparation-grid, .live-layout { grid-template-columns: 1fr; }.live-preview { position: static; grid-row: 1; }.live-tools { position: static; }.field-grid.three, .field-grid.four, .field-grid.five, .character-save-editor, .character-skill-editor { grid-template-columns: 1fr 1fr; }.catalog-filters { grid-template-columns: 1fr 1fr; }.source-provenance { grid-template-columns: 1fr 1fr; }.creature-detail-layout, .map-workspace { grid-template-columns: 1fr; }.creature-art, .map-note-drawer { position: static; }.creature-art { max-width: 450px; margin: 0 auto; }.creature-detail-layout > .statblock-wrap { width: 100%; } }
@media (max-width: 1050px) { .live-layout-player { display: flex; flex-direction: column; }.live-layout-player > .live-center, .live-layout-player .live-player-workspace, .live-layout-player .live-player-support { display: contents; }.live-layout-player .live-character-panel { order: 1; }.live-layout-player > .live-tools { order: 2; }.live-layout-player .live-clock-panel { order: 3; }.live-layout-player .live-reward-panel { order: 4; }.live-layout-player .live-records-panel { order: 5; }.live-layout-player .session-recap { order: 6; }.live-layout-player .live-history-panel { order: 7; }.live-layout-player .live-panel, .live-layout-player > .live-tools { min-width: 0; width: 100%; } }
@media (max-width: 650px) { .main-content { overflow-x: clip; }.field-grid.two, .field-grid.three, .field-grid.four, .field-grid.five, .record-public, .catalog-filters, .source-provenance, .live-status-strip, .image-crop-sliders, .revision-change > div, .character-save-editor, .character-skill-editor { grid-template-columns: 1fr; }.sticky-save { bottom: .35rem; }.ability-grid, .ability-fields, .character-ability-editor { grid-template-columns: repeat(3, 1fr); }.ability-roll-menu { position: fixed; top: auto; right: .75rem; bottom: .75rem; left: .75rem; width: auto; transform: none; }.ability-roll-menu .inline-roll { min-height: 44px; align-items: center; }.catalog-notice, .live-header, .launch-card, .persistent-preview-banner, .revision-card > header, .provider-collection-heading, .provider-collection-row-header, .gallery-editor-item-heading { align-items: stretch; flex-direction: column; }.provider-collection-heading .button { width: 100%; }.provider-collection-actions .button, .gallery-editor-order-actions .button { flex: 1 1 8rem; min-height: 44px; }.statblock-header { flex-direction: column-reverse; }.resource-step { min-width: 2.75rem; min-height: 2.75rem; } }
@media (max-width: 650px) { .live-header-actions { width: 100%; flex-wrap: wrap; }.live-header-actions .button { flex: 1 1 10rem; }.live-layout-player .inline-form { min-width: 0; } }
.topbar-dm-mail { display: none; }
.spell-filter-disclosure { margin-bottom: 1rem; padding: 0; overflow: hidden; }
.spell-filter-disclosure > summary { display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .9rem 1rem; cursor: pointer; list-style: none; }
.spell-filter-disclosure > summary::-webkit-details-marker { display: none; }
.spell-filter-disclosure > summary::after { margin-left: auto; color: var(--theme-accent); content: "▾"; font-size: 1.1rem; transition: transform .16s ease; }
.spell-filter-disclosure[open] > summary::after { transform: rotate(180deg); }
.spell-filter-disclosure > summary:hover { background: var(--theme-panel-alt); }
.spell-filter-disclosure > summary:focus-visible { outline: 3px solid var(--theme-highlight); outline-offset: -3px; }
.spell-filter-disclosure[open] > summary { border-bottom: 1px solid var(--theme-border); }
.spell-filter-summary-copy { display: grid; gap: .1rem; }
.spell-filter-summary-copy small { color: var(--theme-muted); font-weight: 400; }
.spell-filter-active { flex: 0 0 auto; }
.spell-filters { margin: 0; padding: 1rem; }
.spell-list { display: grid; gap: .75rem; }
.spell-list article { padding: 1rem 1.15rem; border: 1px solid var(--theme-border); border-radius: 11px; background: var(--theme-panel); }
.spell-list article h2 { margin: 0 0 .35rem; }
.spell-list article p { margin: .35rem 0; color: var(--theme-muted); }
.spell-list article .status-badge { margin-right: .35rem; }
.spell-detail { max-width: 850px; margin: 0 auto; padding: clamp(1.2rem, 4vw, 2.4rem); border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-panel); box-shadow: 0 16px 45px var(--theme-shadow); }
.spell-detail > header { position: relative; padding-bottom: .8rem; border-bottom: 5px double var(--theme-highlight); }
.spell-detail > header h1 { margin: .2rem 0; color: var(--theme-accent); font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.2rem); }
.spell-detail > section { line-height: 1.65; }
.spell-detail > section h2 { margin-top: 1.4rem; border-bottom: 2px solid var(--theme-highlight); color: var(--theme-accent); font-family: Georgia, serif; }
.spell-detail > footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--theme-border); color: var(--theme-muted); overflow-wrap: anywhere; }
.spell-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: 1rem 0; }
.spell-summary div { display: flex; gap: .45rem; }
.spell-summary dt { color: var(--theme-accent); font-weight: 850; }
.spell-summary dd { margin: 0; }
@media (max-width: 850px) { .topbar-dm-mail { display: flex; align-items: center; gap: .4rem; color: var(--theme-text); font-size: .78rem; font-weight: 800; text-decoration: none; }.topbar-dm-mail strong { display: inline-grid; place-items: center; min-width: 1.7rem; min-height: 1.7rem; padding: .2rem .5rem; border-radius: 999px; color: var(--theme-on-accent); background: var(--theme-accent); font-size: .75rem; } }
@media (max-width: 650px) { .dm-mail-entry > header { align-items: stretch; flex-direction: column; }.dm-mail-actions { flex-wrap: wrap; justify-content: flex-start; } }
.mode-switcher a { padding: .55rem .8rem; border: 0; color: var(--theme-muted); background: transparent; font: inherit; text-decoration: none; }.mode-switcher a:hover, .mode-switcher a:focus-visible { color: var(--theme-text); background: var(--theme-panel-alt); }
.ruling-list { display: grid; gap: .8rem; }.ruling-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--theme-border); border-radius: 11px; color: inherit; background: var(--theme-panel-alt); text-decoration: none; }.ruling-card h3 { margin: .45rem 0; }.ruling-card p { margin: 0 0 .55rem; color: var(--theme-muted); }.ruling-card small { margin-left: .45rem; color: var(--theme-muted); }.ruling-source-body { margin-top: 1rem; }.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }.tag-list code { padding: .35rem .5rem; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-panel-alt); }.page-header.compact { margin-bottom: 1rem; }
.session-log-index { display: grid; gap: 1rem; }.session-log-card { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 1.1rem; align-items: center; padding: 1.15rem; border: 1px solid var(--theme-border); border-radius: 14px; color: var(--theme-text); background: var(--theme-panel); box-shadow: 0 12px 32px var(--theme-shadow); text-decoration: none; }.session-log-card.draft { border-style: dashed; }.session-log-marker { display: grid; place-items: center; min-height: 78px; padding: .65rem; border-radius: 12px; color: var(--theme-on-accent); background: var(--theme-accent); text-align: center; }.session-log-marker span { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.session-log-marker strong { overflow-wrap: anywhere; font-size: 1.5rem; }.session-log-summary h2 { margin: .35rem 0; }.session-card-recap { color: var(--theme-muted); }
.markdown-field { display: grid; gap: .45rem; margin-bottom: 1.1rem; }.markdown-toolbar { display: flex; flex-wrap: wrap; gap: .35rem; padding: .45rem; border: 1px solid var(--theme-border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--theme-panel-alt); }.markdown-toolbar button { min-height: 36px; padding: .35rem .65rem; border: 1px solid var(--theme-border); border-radius: 7px; color: var(--theme-text); background: var(--theme-panel); cursor: pointer; }.markdown-toolbar button:hover, .markdown-toolbar button:focus-visible { color: var(--theme-on-accent); background: var(--theme-accent); }.markdown-source { min-height: 10rem; border-radius: 0 0 10px 10px; font: .95rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }.session-log-preview { display: grid; gap: 1rem; }.session-log-preview section { padding-bottom: 1rem; border-bottom: 1px solid var(--theme-border); }.session-log-preview .preview-private { padding: 1rem; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-panel-alt); }.markdown-rendered table, .session-log-preview table { width: 100%; border-collapse: collapse; }.markdown-rendered th, .markdown-rendered td, .session-log-preview th, .session-log-preview td { padding: .55rem; border: 1px solid var(--theme-border); text-align: left; }.markdown-rendered blockquote, .session-log-preview blockquote { margin-left: 0; padding-left: 1rem; border-left: 4px solid var(--theme-highlight); color: var(--theme-muted); }
@media (max-width: 650px) { .session-log-card { grid-template-columns: 1fr; }.session-log-marker { min-height: auto; }.session-log-card > .button { justify-self: stretch; text-align: center; } }
@media (max-width: 650px) { .spell-summary { grid-template-columns: 1fr; }.spell-detail { padding: 1rem; }.spell-list article { padding: .9rem; }.spell-filter-disclosure > summary { flex-wrap: wrap; }.spell-filter-disclosure > summary::after { align-self: center; }.spell-filter-active { order: 2; }.spell-filter-disclosure > summary::after { order: 3; } }
.long-rest-preview { white-space: pre-wrap; margin: .75rem 0; padding: .75rem 1rem; border-left: 3px solid var(--theme-accent); background: var(--theme-panel-alt); line-height: 1.6; }

/* Journey to Ragnarok density. The shared shell and other campaigns retain their sizes. */
body[data-campaign-theme="journey-to-ragnarok"] {
  --jtr-page-title: clamp(2rem, 3vw, 2.85rem);
  --jtr-section-title: 1.32rem;
  --jtr-card-title: 1.14rem;
  --jtr-control-text: .9rem;
  --jtr-content-inset: clamp(1.2rem, 2.5vw, 2.25rem);
  --jtr-panel-inset: clamp(.95rem, 1.7vw, 1.4rem);
  --jtr-card-inset: 1.05rem;
  --jtr-grid-gap: .8rem;
  --jtr-section-gap: 1.35rem;
}
body[data-campaign-theme="journey-to-ragnarok"] .main-content { padding: var(--jtr-content-inset); }
body[data-campaign-theme="journey-to-ragnarok"] h1 { font-size: var(--jtr-page-title); }
body[data-campaign-theme="journey-to-ragnarok"] h2 { font-size: var(--jtr-section-title); }
body[data-campaign-theme="journey-to-ragnarok"] .workspace-card h2,
body[data-campaign-theme="journey-to-ragnarok"] .record-card h2,
body[data-campaign-theme="journey-to-ragnarok"] .prep-card h2,
body[data-campaign-theme="journey-to-ragnarok"] .prep-card h3,
body[data-campaign-theme="journey-to-ragnarok"] .session-log-card h2 { font-size: var(--jtr-card-title); }
body[data-campaign-theme="journey-to-ragnarok"] .page-header,
body[data-campaign-theme="journey-to-ragnarok"] .campaign-hero { gap: 1.2rem; margin-bottom: var(--jtr-section-gap); }
body[data-campaign-theme="journey-to-ragnarok"] .lede { font-size: 1rem; }
body[data-campaign-theme="journey-to-ragnarok"] .button { min-height: 2.5rem; padding: .47rem .76rem; font-size: var(--jtr-control-text); line-height: 1.2; }
body[data-campaign-theme="journey-to-ragnarok"] .mode-switcher button,
body[data-campaign-theme="journey-to-ragnarok"] .mode-switcher a { min-height: 2.5rem; padding: .46rem .68rem; font-size: var(--jtr-control-text); }
body[data-campaign-theme="journey-to-ragnarok"] .header-actions,
body[data-campaign-theme="journey-to-ragnarok"] .campaign-hero-actions { gap: .5rem; }
body[data-campaign-theme="journey-to-ragnarok"] .sidebar { padding: 1.35rem 1rem; }
body[data-campaign-theme="journey-to-ragnarok"] .sidebar-heading { margin-bottom: .65rem; }
body[data-campaign-theme="journey-to-ragnarok"] .campaign-link { padding: .58rem .7rem; font-size: .93rem; }
body[data-campaign-theme="journey-to-ragnarok"] .preview-control { gap: .42rem; margin-top: .95rem; padding-top: .8rem; }
body[data-campaign-theme="journey-to-ragnarok"] input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]),
body[data-campaign-theme="journey-to-ragnarok"] select { min-height: 2.6rem; height: auto; }
body[data-campaign-theme="journey-to-ragnarok"] input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]),
body[data-campaign-theme="journey-to-ragnarok"] select,
body[data-campaign-theme="journey-to-ragnarok"] textarea { padding: .58rem .7rem; }
body[data-campaign-theme="journey-to-ragnarok"] input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  padding: 0;
  accent-color: var(--theme-highlight);
  flex: 0 0 auto;
}
body[data-campaign-theme="journey-to-ragnarok"] label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.5rem;
  padding: .25rem .4rem;
  cursor: pointer;
}
body[data-campaign-theme="journey-to-ragnarok"] .field,
body[data-campaign-theme="journey-to-ragnarok"] .stacked-form { gap: .55rem; }
body[data-campaign-theme="journey-to-ragnarok"] .field-grid,
body[data-campaign-theme="journey-to-ragnarok"] .editor-fields,
body[data-campaign-theme="journey-to-ragnarok"] .preparation-editor,
body[data-campaign-theme="journey-to-ragnarok"] .preparation-detail { gap: .8rem; }
body[data-campaign-theme="journey-to-ragnarok"] .section-heading { margin-bottom: .8rem; }
body[data-campaign-theme="journey-to-ragnarok"] .panel { padding: var(--jtr-panel-inset); margin-top: var(--jtr-section-gap); }
body[data-campaign-theme="journey-to-ragnarok"] .editor-section { padding: var(--jtr-panel-inset); }
body[data-campaign-theme="journey-to-ragnarok"] .workspace-grid { gap: var(--jtr-grid-gap); margin-top: var(--jtr-section-gap); }
body[data-campaign-theme="journey-to-ragnarok"] .workspace-card,
body[data-campaign-theme="journey-to-ragnarok"] .campaign-card,
body[data-campaign-theme="journey-to-ragnarok"] .record-card,
body[data-campaign-theme="journey-to-ragnarok"] .preparation-column,
body[data-campaign-theme="journey-to-ragnarok"] .reference-group { padding: var(--jtr-card-inset); }
body[data-campaign-theme="journey-to-ragnarok"] .card-grid,
body[data-campaign-theme="journey-to-ragnarok"] .record-grid,
body[data-campaign-theme="journey-to-ragnarok"] .preparation-grid,
body[data-campaign-theme="journey-to-ragnarok"] .prep-card-list,
body[data-campaign-theme="journey-to-ragnarok"] .reference-board { gap: var(--jtr-grid-gap); }
body[data-campaign-theme="journey-to-ragnarok"] .ruleset-strip { gap: .55rem 1rem; padding: .7rem .85rem; }
body[data-campaign-theme="journey-to-ragnarok"] .library-search,
body[data-campaign-theme="journey-to-ragnarok"] .prep-card,
body[data-campaign-theme="journey-to-ragnarok"] .live-panel,
body[data-campaign-theme="journey-to-ragnarok"] .session-log-card { padding: var(--jtr-card-inset); }
body[data-campaign-theme="journey-to-ragnarok"] .library-group + .library-group { margin-top: 1.7rem; }
body[data-campaign-theme="journey-to-ragnarok"] .record-card-details { margin: .5rem 0; }
body[data-campaign-theme="journey-to-ragnarok"] .live-header { margin-bottom: .7rem; }
body[data-campaign-theme="journey-to-ragnarok"] .live-header [data-live-plan] { font-size: clamp(1.4rem, 2vw, 1.8rem); }
body[data-campaign-theme="journey-to-ragnarok"] .live-status-strip { margin-bottom: .7rem; }
body[data-campaign-theme="journey-to-ragnarok"] .live-status-strip > div { padding: .6rem .75rem; }
body[data-campaign-theme="journey-to-ragnarok"] .live-layout,
body[data-campaign-theme="journey-to-ragnarok"] .live-center,
body[data-campaign-theme="journey-to-ragnarok"] .live-tools { gap: var(--jtr-grid-gap); }
body[data-campaign-theme="journey-to-ragnarok"] .session-log-index { gap: var(--jtr-grid-gap); }
body[data-campaign-theme="journey-to-ragnarok"] .session-log-marker { min-height: 4.3rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-toolbar,
body[data-campaign-theme="journey-to-ragnarok"] .character-action-policy { margin-bottom: .6rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-action-policy { padding: .55rem .8rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-summary { grid-template-columns: 96px minmax(0, 1fr); gap: .8rem; padding: .75rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-summary-portrait { width: 96px; }
body[data-campaign-theme="journey-to-ragnarok"] .character-summary-main h1 { font-size: clamp(1.5rem, 2.3vw, 2.1rem); }
body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-tabs button { min-height: 2.5rem; padding: .4rem .68rem; font-size: .7rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-panels { padding: .75rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-panel { gap: .55rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-section { padding: .72rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-section-heading { margin-bottom: .55rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-section-heading h2,
body[data-campaign-theme="journey-to-ragnarok"] .character-disclosure > summary strong { font-size: 1.18rem; }
body[data-campaign-theme="journey-to-ragnarok"] .character-fact-grid > div { padding: .45rem .55rem; }
body[data-campaign-theme="journey-to-ragnarok"] .map-description { padding: .72rem .9rem; margin-bottom: .7rem; }
body[data-campaign-theme="journey-to-ragnarok"] .map-note-drawer,
body[data-campaign-theme="journey-to-ragnarok"] .map-placement-panel { padding: var(--jtr-card-inset); }
body[data-campaign-theme="journey-to-ragnarok"] .battle-app .battle-status > div { padding: .5rem .65rem; }
body[data-campaign-theme="journey-to-ragnarok"] .battle-app .battle-panel,
body[data-campaign-theme="journey-to-ragnarok"] .battle-app .battle-action { padding: var(--jtr-card-inset); }
@media (pointer: coarse) {
  body[data-campaign-theme="journey-to-ragnarok"] .button,
  body[data-campaign-theme="journey-to-ragnarok"] .campaign-link,
  body[data-campaign-theme="journey-to-ragnarok"] .mode-switcher button,
  body[data-campaign-theme="journey-to-ragnarok"] .mode-switcher a,
  body[data-campaign-theme="journey-to-ragnarok"] .character-workspace-tabs button { min-height: 44px; }
  body[data-campaign-theme="journey-to-ragnarok"] label:has(> input[type="checkbox"]) { min-height: 44px; }
}

.record-media-assignments, .record-media-picker { display: grid; gap: 1rem; }
.record-media-picker { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.record-media-assignment, .record-media-choice { min-width: 0; padding: .8rem; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-panel); }
.record-media-assignment { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1rem; }
.record-media-assignment img, .record-media-choice img { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 7px; background: rgba(0,0,0,.08); }
.record-media-choice img { height: 150px; }
.record-media-assignment small, .record-media-choice small { display: block; overflow-wrap: anywhere; }
.record-media-assignment form, .record-media-choice form { margin-top: .7rem; }
.record-media-choice strong { display: block; overflow-wrap: anywhere; }
.record-card-thumb { float: right; width: 72px; height: 72px; margin: 0 0 .4rem .7rem; object-fit: cover; border-radius: 7px; }
.record-media-hero { max-height: 340px; overflow: hidden; border-radius: 10px; }
.record-media-hero img { display: block; width: 100%; max-height: 340px; object-fit: cover; }
.record-media-hero figcaption { padding: .35rem .6rem; }
@media (max-width: 600px) { .record-media-assignment { grid-template-columns: 1fr; }.record-media-assignment img { width: 120px; }.record-media-picker { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); } }
.transcript-raw { max-height: 28rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.transcript-review-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.transcript-proposal { padding: 1rem 0; border-top: 1px solid var(--theme-border); }
.transcript-proposal blockquote { margin: .6rem 0; padding: .6rem 1rem; border-left: 3px solid var(--theme-accent); background: var(--theme-panel-alt); white-space: pre-wrap; overflow-wrap: anywhere; }
.transcript-proposal pre, .transcript-proposal-group pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 18rem; overflow: auto; }
