* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Icelandic landscape palette */
    --color-bg-deep: #0a1018;
    --color-bg-panel: rgba(12, 20, 32, 0.72);
    --color-bg-panel-border: rgba(148, 163, 184, 0.22);
    --color-text: #e8edf2;
    --color-text-muted: #94a3b8;
    --color-accent: #5eead4;
    --color-accent-warm: #d4a574;
    --color-accent-magic: #a78bfa;
    --color-primary-btn: #3b82f6;
    --color-scrim: rgba(8, 14, 24, 0.62);
    --panel-blur: 12px;
    --panel-radius: 16px;
}

.home-button {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.45);
}

html {
    min-height: 100%;
    background-color: var(--color-bg-deep);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Fixed photo slideshow — Ken Burns motion + crossfades between layers */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-bg__slide {
    position: absolute;
    inset: -5%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    will-change: opacity, transform;
    animation:
        bgSlideFade var(--ambient-cycle, 270s) linear infinite,
        bgKenBurnsZoomIn var(--ambient-cycle, 270s) linear infinite;
}

.ambient-bg__slide[data-motion="zoom-in"] {
    animation-name: bgSlideFade, bgKenBurnsZoomIn;
}

.ambient-bg__slide[data-motion="zoom-out"] {
    animation-name: bgSlideFade, bgKenBurnsZoomOut;
}

.ambient-bg__slide[data-motion="pan-left"] {
    animation-name: bgSlideFade, bgKenBurnsPanLeft;
}

.ambient-bg__slide[data-motion="pan-right"] {
    animation-name: bgSlideFade, bgKenBurnsPanRight;
}

.ambient-bg__slide[data-motion="rise"] {
    animation-name: bgSlideFade, bgKenBurnsRise;
}

.ambient-bg__slide[data-motion="descend"] {
    animation-name: bgSlideFade, bgKenBurnsDescend;
}

.ambient-bg__slide[data-motion="diagonal"] {
    animation-name: bgSlideFade, bgKenBurnsDiagonal;
}

/* Static scrim for text readability */
.ambient-bg__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(8, 14, 24, 0.5) 0%,
        rgba(8, 14, 24, 0.28) 45%,
        rgba(8, 14, 24, 0.52) 100%
    );
}

@keyframes bgSlideFade {
    0% { opacity: 0; }
    0.7% { opacity: 0.74; }
    5.8% { opacity: 0.74; }
    6.5% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes bgKenBurnsZoomIn {
    0%, 6.5%, 100% { transform: scale(1.06) translate(0, 0); }
    0.7% { transform: scale(1.06) translate(0, 0); }
    5.8% { transform: scale(1.15) translate(-1.5%, -1%); }
}

@keyframes bgKenBurnsZoomOut {
    0%, 6.5%, 100% { transform: scale(1.18) translate(-1%, -0.5%); }
    0.7% { transform: scale(1.18) translate(-1%, -0.5%); }
    5.8% { transform: scale(1.07) translate(0.5%, 0.5%); }
}

@keyframes bgKenBurnsPanLeft {
    0%, 6.5%, 100% { transform: scale(1.12) translate(2.2%, 0); }
    0.7% { transform: scale(1.12) translate(2.2%, 0); }
    5.8% { transform: scale(1.12) translate(-2.2%, -0.4%); }
}

@keyframes bgKenBurnsPanRight {
    0%, 6.5%, 100% { transform: scale(1.12) translate(-2.2%, 0); }
    0.7% { transform: scale(1.12) translate(-2.2%, 0); }
    5.8% { transform: scale(1.12) translate(2.2%, -0.4%); }
}

@keyframes bgKenBurnsRise {
    0%, 6.5%, 100% { transform: scale(1.1) translate(0, 2%); }
    0.7% { transform: scale(1.1) translate(0, 2%); }
    5.8% { transform: scale(1.14) translate(-0.5%, -2.2%); }
}

@keyframes bgKenBurnsDescend {
    0%, 6.5%, 100% { transform: scale(1.12) translate(0, -1.8%); }
    0.7% { transform: scale(1.12) translate(0, -1.8%); }
    5.8% { transform: scale(1.1) translate(0.5%, 2%); }
}

@keyframes bgKenBurnsDiagonal {
    0%, 6.5%, 100% { transform: scale(1.08) translate(2%, 1.2%); }
    0.7% { transform: scale(1.08) translate(2%, 1.2%); }
    5.8% { transform: scale(1.15) translate(-1.8%, -1.6%); }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-bg__slide {
        animation: bgSlideFade var(--ambient-cycle, 270s) linear infinite;
        inset: 0;
    }

    .ambient-bg__slide:first-of-type {
        opacity: 0.74;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--color-bg-panel);
    border-radius: var(--panel-radius);
    backdrop-filter: blur(var(--panel-blur));
    border: 1px solid var(--color-bg-panel-border);
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
}

.app-header__brand {
    flex: 1 1 280px;
    text-align: center;
}

.app-header__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

@media (min-width: 769px) {
    .app-header__brand {
        text-align: left;
    }

    .app-header__toolbar {
        width: auto;
        justify-content: flex-end;
    }
}

.toolbar-btn {
    font-size: 0.9rem;
}

.help-panel {
    margin-bottom: 20px;
    background: var(--color-bg-panel);
    border-radius: var(--panel-radius);
    border: 1px solid var(--color-bg-panel-border);
    padding: 16px;
    backdrop-filter: blur(var(--panel-blur));
}

.help-panel__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 900px) {
    .help-panel__inner {
        grid-template-columns: 1fr 1fr;
    }
}

header::before {
    content: '᚛ ᚑ ᚒ ᚓ ᚔ ᚕ ᚖ ᚗ ᚘ ᚙ ᚚ ᚜';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 5px 20px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #c0392b;
    border: 2px solid rgba(192, 192, 192, 0.3);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--color-accent-warm), var(--color-accent), #93c5fd, var(--color-accent-warm));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: magicalGlow 4s ease-in-out infinite alternate;
    font-family: 'Times New Roman', serif;
    letter-spacing: 2px;
}

@keyframes magicalGlow {
    0% { 
        background-position: 0% 50%;
        filter: brightness(1);
    }
    100% { 
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

header p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* @tweakable attribution styling for author credit */
.attribution {
    margin-top: 10px;
    text-align: center;
}

.attribution a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-style: italic;
    opacity: 0.8;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(149, 165, 166, 0.3);
}

.attribution a:hover {
    color: #bdc3c7;
    opacity: 1;
    text-shadow: 0 0 12px rgba(189, 195, 199, 0.6);
    transform: translateY(-1px);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.right-panel,
.studio-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

@media (min-width: 901px) {
    .studio-panel {
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

.primary-controls-panel {
    background: var(--color-bg-panel);
    border-radius: var(--panel-radius);
    padding: 14px 16px;
    backdrop-filter: blur(var(--panel-blur));
    border: 1px solid var(--color-bg-panel-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.panel-label {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.primary-controls-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .primary-controls-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (min-width: 900px) {
    .primary-controls-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.saga-sound-panel {
    margin-top: 0;
}

.saga-sound-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.saga-sound-header .panel-label {
    margin-bottom: 0;
}

.saga-sound-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--color-accent-gold, #d4af37);
    white-space: nowrap;
}

.saga-sound-badge--active {
    animation: saga-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes saga-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

.saga-sound-toast {
    font-size: 0.82rem;
    color: var(--color-accent-gold, #d4af37);
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.08);
    border-left: 3px solid rgba(212, 175, 55, 0.45);
}

.saga-sound-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: end;
}

.saga-sound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.saga-sound-actions .control-btn {
    flex: 1 1 auto;
    min-height: 38px;
    font-size: 0.85rem;
}

@media (min-width: 600px) {
    .saga-sound-controls {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .saga-sound-actions .control-btn {
        flex: 0 1 auto;
    }
}

.saga-sound-apply {
    width: auto;
    min-height: 38px;
    font-size: 0.85rem;
}

@media (min-width: 600px) {
    .saga-sound-apply {
        width: auto;
        align-self: auto;
        margin-bottom: 0;
    }
}

.control-hint {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.effects-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.effects-panel {
    background: var(--color-bg-panel);
    border-radius: var(--panel-radius);
    border: 1px solid var(--color-bg-panel-border);
    padding: 0 14px;
    backdrop-filter: blur(var(--panel-blur));
}

.effects-panel .controls-header {
    padding: 12px 0;
}

.effects-panel__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.expandable-content.expanded {
    max-height: 520px;
    padding-bottom: 14px;
}

.transport-bar {
    background: var(--color-bg-panel);
    border-radius: var(--panel-radius);
    border: 1px solid var(--color-bg-panel-border);
    padding: 10px 12px;
    backdrop-filter: blur(var(--panel-blur));
}

.sequence-section {
    flex-shrink: 0;
}

.sequence-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 88px;
    max-height: min(360px, 42vh);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(127, 140, 141, 0.1) 0%, rgba(149, 165, 166, 0.15) 100%),
        rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 2px dashed rgba(192, 192, 192, 0.4);
    box-shadow: inset 0 0 20px rgba(192, 192, 192, 0.1);
}

.sequence-display--has-items {
    min-height: 120px;
}

.sequence-display .empty-message {
    margin: 24px 0;
    text-align: center;
    color: #bdc3c7;
    font-style: italic;
}

.visualization-scrying {
    padding: 12px 14px !important;
}

.visualization-scrying .scrying-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.visualization-scrying canvas,
#waveform-canvas {
    display: block;
    width: 100%;
    height: 168px !important;
    min-height: 140px;
    max-height: 200px;
    border-radius: 8px;
    background:
        radial-gradient(ellipse at center, rgba(127, 140, 141, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(127, 140, 141, 0.2) 100%),
        rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: inset 0 0 20px rgba(192, 192, 192, 0.1);
}

.saga-templates-compact {
    margin-bottom: 0 !important;
    padding: 14px 16px !important;
}

.saga-templates-compact .saga-mode h3 {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.saga-templates-compact .saga-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.saga-templates-compact .saga-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-height: auto;
}

.saga-more-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.saga-more-select {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 200px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--color-bg-panel-border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-text);
    font-size: 0.85rem;
}

.saga-more-select:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.controls-header:hover {
    text-shadow: 0 0 15px rgba(192, 57, 43, 0.8);
}

.toggle-indicator {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #bdc3c7;
}

.toggle-indicator.rotated {
    transform: rotate(180deg);
}

.advanced-controls-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.advanced-controls-content.expanded {
    max-height: 520px;
    padding-bottom: 14px;
}

.control-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px 0;
}

.control-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(192, 192, 192, 0.1);
}

.control-category h4 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

.category-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.input-section, .sequence-section, .visualization-section {
    background: var(--color-bg-panel);
    border-radius: var(--panel-radius);
    padding: 25px;
    backdrop-filter: blur(var(--panel-blur));
    border: 1px solid var(--color-bg-panel-border);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.input-section::before, .sequence-section::before, .visualization-section::before {
    content: '⟨⟩';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #c0392b;
    border: 1px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.8);
}

.sequence-section {
    min-height: 0;
}

.sequence-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    margin-bottom: 12px;
}

.sequence-section-header h2 {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.shared-saga-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(94, 234, 212, 0.12);
    border: 1px solid rgba(94, 234, 212, 0.4);
    color: var(--color-accent, #5eead4);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.shared-saga-dismiss {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(127, 140, 141, 0.35);
    color: #ecf0f1;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
}

.shared-saga-dismiss:hover,
.shared-saga-dismiss:focus {
    opacity: 1;
}

.visualization-section {
    min-height: 350px;
}

h2 {
    color: #c0392b;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    font-family: 'Times New Roman', serif;
    letter-spacing: 1px;
    text-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 30px rgba(192, 57, 43, 0.4);
    position: relative;
}

h2::before, h2::after {
    content: '⟦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(192, 192, 192, 0.6);
    font-size: 1.2rem;
}

h2::before {
    left: -30px;
}

h2::after {
    content: '⟧';
    right: -30px;
}

h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-family: 'Times New Roman', serif;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
    letter-spacing: 0.5px;
}

.rune-categories {
    margin-bottom: 30px;
    /* @tweakable grid layout for side-by-side rune categories */
    display: grid;
    /* @tweakable equal column sizing for rune categories */
    grid-template-columns: 1fr 1fr;
    /* @tweakable gap between rune categories */
    gap: 30px;
}

.category {
    /* @tweakable remove bottom margin when categories are side by side */
    margin-bottom: 0;
}

.rune-grid, .stave-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.rune-item, .stave-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.15) 0%, rgba(149, 165, 166, 0.2) 100%),
        rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(192, 192, 192, 0.3);
    min-height: 72px;
    position: relative;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 15px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
}

.rune-item::before, .stave-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(127, 140, 141, 0.05) 0px,
            rgba(127, 140, 141, 0.05) 1px,
            transparent 1px,
            transparent 10px
        );
    border-radius: 8px;
    pointer-events: none;
}

.rune-item:hover, .stave-item:hover {
    background: 
        linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(52, 152, 219, 0.3) 100%),
        rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(46, 204, 113, 0.3),
        0 0 20px rgba(46, 204, 113, 0.2),
        inset 0 0 20px rgba(127, 140, 141, 0.1);
}

.rune-item.selected, .stave-item.selected {
    background: 
        linear-gradient(135deg, rgba(46, 204, 113, 0.4) 0%, rgba(142, 68, 173, 0.5) 100%),
        rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
    transform: scale(1.05);
    box-shadow: 
        0 0 40px rgba(46, 204, 113, 0.6),
        inset 0 0 25px rgba(46, 204, 113, 0.2);
}

.rune-symbol, .stave-symbol {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #c0392b;
    text-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 30px rgba(192, 57, 43, 0.4),
        0 0 45px rgba(192, 57, 43, 0.2);
    font-family: 'Courier New', 'Lucida Console', monospace;
    line-height: 1.2;
    text-align: center;
    white-space: pre-line;
    animation: symbolGlow 2s ease-in-out infinite alternate;
}

@keyframes symbolGlow {
    0% { 
        text-shadow: 
            0 0 15px rgba(192, 57, 43, 0.8),
            0 0 30px rgba(192, 57, 43, 0.4);
    }
    100% { 
        text-shadow: 
            0 0 20px rgba(192, 57, 43, 1),
            0 0 40px rgba(192, 57, 43, 0.6),
            0 0 60px rgba(192, 57, 43, 0.3);
    }
}

.rune-name, .stave-name {
    font-size: 0.9rem;
    text-align: center;
    color: #bdc3c7;
    font-weight: 500;
}

/* @tweakable saga templates section styling when positioned under header */
.saga-templates-section {
    margin-bottom: 30px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
    position: relative;
}

/* @tweakable decorative element for saga templates section */
.saga-templates-section::before {
    content: '⟨⟩';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #c0392b;
    border: 1px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.8);
}

.saga-mode {
    /* @tweakable remove top margin when saga mode is in its own section */
    margin-top: 0;
}

.saga-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.saga-btn {
    padding: 12px 18px;
    background: 
        linear-gradient(45deg, rgba(127, 140, 141, 0.3) 0%, rgba(52, 152, 219, 0.4) 50%, rgba(46, 204, 113, 0.8) 100%),
        linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 
        0 4px 15px rgba(192, 57, 43, 0.8),
        0 0 25px rgba(52, 152, 219, 0.4),
        inset 0 0 8px rgba(127, 140, 141, 0.3);
    border: 1px solid rgba(192, 192, 192, 0.3);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.saga-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(52, 152, 219, 0.5),
        0 0 25px rgba(46, 204, 113, 0.4),
        inset 0 0 15px rgba(127, 140, 141, 0.3);
}

.saga-clear-btn {
    padding: 12px 18px;
    /* @tweakable clear button background gradient - distinct red theme */
    background: 
        linear-gradient(45deg, rgba(231, 76, 60, 0.8) 0%, rgba(192, 57, 43, 0.9) 50%, rgba(155, 89, 182, 0.8) 100%),
        linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    /* @tweakable clear button shadow effects - red/warning theme */
    box-shadow: 
        0 4px 15px rgba(231, 76, 60, 0.6),
        0 0 25px rgba(192, 57, 43, 0.4),
        inset 0 0 8px rgba(127, 140, 141, 0.3);
    /* @tweakable clear button border styling */
    border: 1px solid rgba(231, 76, 60, 0.5);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    /* @tweakable clear button positioning - spans two columns in grid */
    grid-column: span 2;
    /* @tweakable clear button alignment within its grid area */
    justify-self: center;
    /* @tweakable clear button maximum width to prevent over-stretching */
    max-width: 200px;
}

.saga-clear-btn:hover {
    transform: translateY(-2px);
    /* @tweakable clear button hover shadow effects */
    box-shadow: 
        0 8px 20px rgba(231, 76, 60, 0.7),
        0 0 25px rgba(192, 57, 43, 0.5),
        inset 0 0 15px rgba(127, 140, 141, 0.3);
    /* @tweakable clear button hover background adjustment */
    background: 
        linear-gradient(45deg, rgba(231, 76, 60, 0.9) 0%, rgba(192, 57, 43, 1) 50%, rgba(155, 89, 182, 0.9) 100%),
        linear-gradient(45deg, #e74c3c, #c0392b);
}

.sequence-duration-hint {
    flex-shrink: 0;
    margin: 0;
    padding: 6px 10px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--color-accent-gold, #d4af37);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 6px;
}

.sequence-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 2px;
}

.sequence-list::-webkit-scrollbar {
    width: 6px;
}

.sequence-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.35);
    border-radius: 3px;
}

.sequence-item {
    display: grid;
    grid-template-columns: 1.4rem 1rem 1.75rem minmax(0, 1fr) minmax(5.5rem, 6.5rem) 2.2rem 1.75rem;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(127, 140, 141, 0.12);
    border-radius: 8px;
    border: 1px solid rgba(192, 192, 192, 0.35);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sequence-move-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.sequence-move-btn {
    width: 1.35rem;
    height: 1.05rem;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: rgba(52, 152, 219, 0.25);
    color: #ecf0f1;
    font-size: 0.65rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
}

.sequence-item:hover .sequence-move-btn,
.sequence-move-btn:focus {
    opacity: 1;
}

.sequence-move-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

#undo-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.sequence-section-tag {
    font-size: 0.62rem;
    line-height: 1;
    text-align: center;
    color: var(--color-accent-warm, #d4a574);
    opacity: 0.85;
}

.sequence-section-tag--empty {
    opacity: 0;
    pointer-events: none;
}

.sequence-item[data-section="climax"].playing {
    border-color: rgba(255, 107, 53, 0.75);
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.35);
}

.sequence-item[data-section="opening"].playing,
.sequence-item[data-section="resolution"].playing {
    border-color: rgba(94, 234, 212, 0.55);
    box-shadow: 0 0 10px rgba(94, 234, 212, 0.2);
}

.sequence-item[data-section="rising"].playing {
    border-color: rgba(212, 175, 55, 0.65);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.sequence-item:hover {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.45);
}

.sequence-item--stave .sequence-symbol {
    color: #9b59b6;
}

.sequence-index {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-text-muted, #95a5a6);
    text-align: center;
}

.sequence-symbol {
    font-size: 1.15rem;
    line-height: 1;
    text-align: center;
    font-family: serif;
}

.sequence-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ecf0f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sequence-item .duration-select {
    width: 100%;
    padding: 4px 6px;
    border-radius: 5px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: #ecf0f1;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.sequence-item .duration-select:focus {
    outline: 2px solid rgba(212, 175, 55, 0.65);
    outline-offset: 1px;
}

.sequence-remove-btn {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.85);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sequence-item:hover .sequence-remove-btn,
.sequence-remove-btn:focus {
    opacity: 1;
}

.sequence-remove-btn:hover {
    transform: scale(1.08);
}

.sequence-item--duration-focus {
    border-color: var(--color-accent-gold, #d4af37);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.45);
    animation: duration-focus-pulse 1.6s ease-in-out 3;
}

@keyframes duration-focus-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.45); }
    50% { box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.65); }
}

@media (max-width: 480px) {
    .sequence-item {
        grid-template-columns: 1.2rem 0.85rem 1.5rem minmax(0, 1fr) minmax(4.75rem, 5.5rem) 2rem 1.5rem;
        gap: 4px;
        padding: 4px 6px;
    }

    .sequence-name {
        font-size: 0.78rem;
    }
}

.sequence-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.export-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-format-select {
    padding: 10px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 88px;
    cursor: pointer;
}

.export-controls--video .control-btn {
    min-width: 108px;
}

.export-format-select:disabled,
.export-controls .control-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
}

.control-btn.primary {
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    color: white;
}

.control-btn:not(.primary) {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e6ed;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loop-btn.active {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

#waveform-canvas {
    width: 100%;
}

.music-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item label {
    color: #bdc3c7;
    font-weight: 500;
}

.info-item span {
    color: #c0392b;
    font-weight: bold;
}

.controls-panel {
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
    position: relative;
}

.controls-panel::before {
    content: '᚛ ᚏᚒᚅᚔᚉ ᚐᚏᚉᚐᚅᚐ ᚜';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 4px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #c0392b;
    border: 2px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

.parameter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    color: #bdc3c7;
    font-weight: 500;
    font-size: 0.9rem;
}

.control-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: 
        radial-gradient(circle, #c0392b 0%, #3498db 50%, #95a5a6 100%),
        linear-gradient(45deg, #c0392b, #3498db);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 25px rgba(52, 152, 219, 0.4),
        inset 0 0 8px rgba(127, 140, 141, 0.3);
    border: 2px solid rgba(192, 192, 192, 0.6);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: 
        radial-gradient(circle, #c0392b 0%, #3498db 50%, #95a5a6 100%),
        linear-gradient(45deg, #c0392b, #3498db);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(192, 192, 192, 0.6);
    box-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 25px rgba(52, 152, 219, 0.4);
}

.control-group select {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.9rem;
}

.control-group select option {
    background: #1e2a3a;
    color: #ecf0f1;
}

.control-group span {
    color: #c0392b;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: right;
}

.translation-controls {
    margin-top: 15px;
    text-align: center;
}

.translate-btn {
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.8) 0%, rgba(52, 152, 219, 0.9) 50%, rgba(155, 89, 182, 0.8) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(192, 192, 192, 0.4);
    box-shadow: 
        0 4px 15px rgba(46, 204, 113, 0.4),
        0 0 20px rgba(52, 152, 219, 0.3);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.translate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(46, 204, 113, 0.5),
        0 0 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.9) 0%, rgba(52, 152, 219, 1) 50%, rgba(155, 89, 182, 0.9) 100%);
}

.rune-item:focus-visible, .stave-item:focus-visible {
    outline: 2px solid #2ecc71;
    outline-offset: 3px;
}

/* Stage 2 — tooltips, composer, Elder Futhark */
.symbol-tooltip {
    position: absolute;
    z-index: 2000;
    max-width: 280px;
    padding: 12px 14px;
    background: rgba(10, 20, 40, 0.95);
    border: 1px solid rgba(52, 152, 219, 0.5);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    font-size: 0.9rem;
    line-height: 1.45;
    color: #ecf0f1;
    pointer-events: none;
}

.symbol-tooltip .tooltip-label {
    color: #3498db;
    font-weight: 600;
}

.symbol-tooltip .tooltip-lore {
    margin-top: 8px;
    font-style: italic;
    color: #bdc3c7;
}

.symbol-info-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.35);
    color: #ecf0f1;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rune-item, .stave-item {
    position: relative;
}

.rune-item:hover .symbol-info-btn,
.stave-item:hover .symbol-info-btn,
.rune-item:focus-within .symbol-info-btn,
.stave-item:focus-within .symbol-info-btn {
    opacity: 1;
}

.category-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.elder-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #bdc3c7;
    cursor: pointer;
}

.elder-toggle input {
    accent-color: #3498db;
}

.elder-symbol {
    font-size: 1.4rem;
    color: #95a5a6;
    opacity: 0.85;
    margin-top: 2px;
}

.stave-lore-panel {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: rgba(142, 68, 173, 0.15);
    border: 1px solid rgba(142, 68, 173, 0.35);
    border-radius: 10px;
}

.stave-lore-panel h4 {
    color: #bb8fce;
    margin-bottom: 8px;
    font-size: 1rem;
}

.stave-lore-panel p {
    color: #bdc3c7;
    font-size: 0.92rem;
    line-height: 1.5;
}

.composer-section {
    background:
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    margin-bottom: 20px;
}

.composer-section h3 {
    margin-bottom: 14px;
    text-align: center;
}

.composer-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.composer-field:last-child {
    grid-column: 1 / -1;
}

.composer-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.composer-field label {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.composer-field input {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.95rem;
}

.composer-field input:focus {
    outline: 2px solid #3498db;
    outline-offset: 1px;
}

.saga-manuscript {
    text-align: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(192, 192, 192, 0.25);
}

.saga-display-title {
    color: #c0392b;
    font-family: 'Times New Roman', serif;
    font-size: 1.35rem;
    margin-bottom: 6px;
    text-shadow: 0 0 12px rgba(192, 57, 43, 0.5);
}

.saga-display-composer {
    color: #d4a574;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.saga-display-dedication {
    color: #bdc3c7;
    font-style: italic;
    font-size: 0.95rem;
}

@media (hover: none) {
    .symbol-info-btn {
        opacity: 0.75;
    }
}

@media (max-width: 768px) {
    .composer-fields {
        grid-template-columns: 1fr;
    }
}

.dropdown-header:focus-visible,
.controls-header:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::after {
        animation: none;
        opacity: 0.2;
    }

    body::before {
        animation: none;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .control-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 76px;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .studio-panel {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .transport-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
    }

    .transport-bar .sequence-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .transport-bar .control-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .home-button {
        top: auto;
        bottom: 88px;
        right: 12px;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .primary-controls-grid {
        grid-template-columns: 1fr;
    }
    
    .control-categories {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rune-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category {
        margin-bottom: 20px;
    }
    
    .category:last-child {
        margin-bottom: 0;
    }
    
    header h1 {
        font-size: 1.75rem;
    }

    .composer-fields {
        grid-template-columns: 1fr;
    }
}

/* Animation keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.05);
        box-shadow: 
            0 0 30px rgba(192, 57, 43, 0.6),
            0 0 50px rgba(52, 152, 219, 0.4);
    }
    100% { transform: scale(1); }
}

.playing {
    animation: pulse 0.5s ease-in-out infinite;
    box-shadow: 
        0 0 25px rgba(192, 57, 43, 0.8),
        0 0 45px rgba(52, 152, 219, 0.5);
}

/* Tweakable value indicators */
.tweakable {
    position: relative;
}

.tweakable::after {
    content: "⚡";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.info-dropdowns-section {
    margin-bottom: 30px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
    position: relative;
}

.info-dropdowns-section::before {
    content: '᚛ ᚏᚒᚅᚔᚉ ᚒᚔᚖᚄᚇᚑᚋ ᚜';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 4px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #c0392b;
    border: 2px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

.dropdown-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dropdown-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(192, 192, 192, 0.1);
    overflow: hidden;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-header:hover {
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 15px rgba(192, 57, 43, 0.8);
}

.dropdown-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

.dropdown-indicator {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #bdc3c7;
}

.dropdown-indicator.rotated {
    transform: rotate(180deg);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.dropdown-content.expanded {
    max-height: 800px;
    padding: 20px;
}

.dropdown-text {
    color: #ecf0f1;
    line-height: 1.6;
}

.dropdown-text h4 {
    color: #e67e22;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(230, 126, 34, 0.6);
}

.dropdown-text p {
    margin-bottom: 12px;
    color: #bdc3c7;
}

.dropdown-text ol, .dropdown-text ul {
    margin: 10px 0 15px 20px;
    color: #bdc3c7;
}

.dropdown-text li {
    margin-bottom: 8px;
}

.dropdown-text strong {
    color: #f39c12;
    text-shadow: 0 0 5px rgba(243, 156, 18, 0.4);
}

@media (max-width: 768px) {
    .dropdown-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dropdown-header h3 {
        font-size: 1rem;
    }
    
    .dropdown-content.expanded {
        max-height: 600px;
        padding: 15px;
    }
}