/* All additions are scoped; the original visual system remains the reference. */
#admin-trigger { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; user-select: none; touch-action: manipulation; }
#admin-trigger:focus-visible, .cms-dialog :focus-visible, .cms-admin :focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; }
.cms-dialog { color: var(--text-primary); background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; width: min(94vw, 460px); max-height: 90vh; max-height: 90dvh; margin: auto; padding: 0; box-shadow: 0 8px 25px rgba(212,197,168,.12); font-family: var(--font-montserrat); overflow: auto; }
.cms-dialog::backdrop { background: rgba(0,0,0,.88); backdrop-filter: blur(10px); }
.cms-dialog.cms-wide { width: min(94vw, 900px); }
.cms-dialog-header { display: flex; gap: 20px; align-items: start; justify-content: space-between; padding: 24px; border-bottom: 1px solid var(--border-color); background: #000; }
.cms-dialog-header h2 { font-family: var(--font-bebas); font-size: 24px; letter-spacing: 2px; margin: 0; overflow-wrap: anywhere; }
.cms-close { border: 1px solid #333; border-radius: 8px; min-width: 44px; min-height: 44px; background: #1a1a1a; color: white; font-size: 28px; cursor: pointer; }
.cms-dialog-body { padding: 24px; }
.cms-dialog [hidden], .cms-admin [hidden] { display: none !important; }
.cms-subtitle { color: #ccc; margin-bottom: 12px; }
.cms-badge { display: inline-block; border: 1px solid #D4C5A8; border-radius: 20px; padding: 6px 12px; font-size: .8rem; color: #D4C5A8; margin-bottom: 20px; }
.cms-tabs { display: flex; gap: 8px; overflow: auto; border-bottom: 1px solid #333; margin: 0 0 24px; }
.cms-tabs button { padding: 14px; min-height: 44px; color: #ccc; background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font: inherit; white-space: nowrap; }
.cms-tabs button[aria-selected=true] { color: #D4C5A8; border-bottom-color: #D4C5A8; }
.cms-rich { font-size: .95rem; color: #ccc; line-height: 1.7; overflow-wrap: anywhere; }
.cms-rich p, .cms-rich ul, .cms-rich ol { margin: 0 0 16px; }
.cms-rich ul, .cms-rich ol { padding-left: 24px; }
.cms-rich strong, .cms-rich h4 { color: #fff; }
.cms-rich h3 { font-family: var(--font-bebas); font-size: 1.8rem; letter-spacing: 1px; color: #D4C5A8; margin: 0 0 20px; }
.cms-rich h4 { margin: 10px 0; }
.cms-rich-section + .cms-rich-section { margin-top: 32px; }
.cms-rich .distribution-grid, .cms-rich .concept-content { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 16px; }
.cms-rich .team-member, .cms-rich .concept-item, .cms-rich .stat-card { background: #1a1a1a; border: 1px solid #333; padding: 16px; border-radius: 8px; }
.cms-rich .timeline { border-left: 2px solid #D4C5A8; padding-left: 20px; }
.cms-rich .timeline-item { margin-bottom: 20px; }
.cms-rich .timeline-date { color: #D4C5A8; font-weight: 600; }
.cms-rich .edition-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.cms-rich .stat-card { text-align: center; }
.cms-rich .stat-number { display: block; color: #D4C5A8; font-family: var(--font-bebas); font-size: 2rem; }
.cms-rich .highlight-info span { display: block; color: #D4C5A8; }
.cms-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cms-buttons:empty { display: none; }
.cms-video { width: 100%; aspect-ratio: 16 / 9; max-height: 65vh; background: #000; border: 0; }
.cms-video-link { display: inline-block; color: #D4C5A8; padding-top: 16px; }
.cms-form { display: grid; gap: 20px; }
.cms-form label { display: grid; gap: 8px; color: #ccc; font-size: .9rem; }
.cms-form input, .cms-form textarea, .cms-form select { width: 100%; min-width: 0; background: #1a1a1a; border: 1px solid #555; border-radius: 6px; color: #fff; padding: 12px; font: inherit; }
.cms-form textarea { min-height: 100px; resize: vertical; }
.cms-form input[type=checkbox] { width: 20px; height: 20px; }
.cms-form .cms-check { display: flex; align-items: center; }
.cms-message { color: var(--primary-color); line-height: 1.6; overflow-wrap: anywhere; }
.cms-form button:disabled, .cms-admin button:disabled { opacity: .5; cursor: wait; }
.cms-empty { padding: 24px; color: #ccc; }
.carousel-nav[hidden], .carousel-indicators[hidden] { display: none; }
.card-actions, .action-buttons { flex-wrap: wrap; }
.card-btn, .action-btn { overflow-wrap: anywhere; white-space: normal; }
.card-content h3, .action-content h3, .card-description, .action-description, .card-meta, .action-meta { overflow-wrap: anywhere; }
.cms-admin { background: #000; color: #fff; font-family: var(--font-montserrat); padding: 32px max(20px, calc((100vw - 1200px)/2)); min-height: 100vh; }
.cms-admin h1, .cms-admin h2, .cms-admin h3, .cms-admin legend { font-family: var(--font-bebas); letter-spacing: 1.5px; }
.cms-admin h1 { font-size: clamp(2rem,5vw,3.5rem); }
.cms-admin h2 { font-size: 2rem; }
.cms-admin a { color: #D4C5A8; }
.cms-admin, .cms-dialog { color-scheme: dark; }
.cms-admin-header, .cms-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.cms-admin-intro { color: #ccc; line-height: 1.7; margin-bottom: 28px; }
.cms-admin-grid { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 32px; align-items: start; }
.cms-tile-list { display: grid; gap: 12px; }
.cms-tile-select { padding: 16px; border: 1px solid #333; background: #0a0a0a; border-radius: 8px; text-align: left; color: #fff; cursor: pointer; font: inherit; width: 100%; overflow-wrap: anywhere; }
.cms-tile-select[aria-current=true] { border-color: #D4C5A8; }
.cms-tile-select small { display: block; color: #ccc; margin-top: 6px; }
.cms-editor { background: #0a0a0a; border: 1px solid #333; border-radius: 12px; padding: 24px; min-width: 0; }
.cms-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cms-form fieldset { border: 1px solid #333; border-radius: 8px; padding: 16px; min-width: 0; }
.cms-form legend { color: #D4C5A8; padding: 0 8px; font-size: 1.35rem; max-width: 100%; overflow-wrap: anywhere; }
.cms-stack { display: grid; gap: 16px; }
.cms-button-editor { border-left: 2px solid #D4C5A8; padding: 16px; background: #111; min-width: 0; }
.cms-small { background: transparent; border: 1px solid #555; color: #eee; padding: 10px 12px; min-height: 44px; border-radius: 6px; cursor: pointer; font: inherit; max-width: 100%; overflow-wrap: anywhere; }
.cms-danger { color: #ffa9b2; border-color: #a74650; }
.cms-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.cms-admin .cms-tools > .card-btn { flex: 0 1 auto; min-width: 150px; }
.cms-editable { min-height: 150px; max-height: 450px; overflow: auto; border: 1px solid #555; border-radius: 6px; padding: 16px; background: #1a1a1a; }
.cms-editable:focus { outline: 2px solid #D4C5A8; }
.cms-help { color: #aaa; font-size: .85rem; line-height: 1.6; margin: 8px 0; }
.cms-preview-image { width: 100%; max-height: 180px; object-fit: contain; margin: 12px 0; }
.cms-preview .spectacle-card { min-width: 0; width: 100%; max-width: 420px; margin: auto; }
.cms-preview .action-card { max-width: 420px; margin: auto; }
.cms-preview .card-image, .cms-preview .festival-image { width: 100%; }
.cms-install { max-width: 620px; margin: auto; }
@media (max-width: 768px) {
  .cms-admin-grid, .cms-fields { grid-template-columns: 1fr; }
  .cms-admin { padding: 24px 16px 48px; }
  .cms-editor, .cms-dialog-body, .cms-dialog-header { padding: 20px; }
  .cms-dialog { width: 96vw; }
  .cms-rich .edition-stats { grid-template-columns: repeat(2,1fr); }
  .cms-form .cms-button-editor { padding: 12px 8px; }
  .cms-button-editor fieldset { padding: 8px; border-left: 0; border-right: 0; }
  .cms-buttons { flex-direction: column; }
}
