/* ═══════════════════════════════════════════════
   VibeGraph v2.0 — Procedural Narrative State Engine
   Aesthetic: Warm obsidian + brass + amber glow
   ═══════════════════════════════════════════════ */

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

:root {
    --obsidian:    #0c0b09;
    --charcoal:    #16140f;
    --soot:        #1e1b15;
    --walnut:      #2a2520;
    --leather:     #3d352c;
    --brass:       #c9a24e;
    --brass-light: #e2c06e;
    --brass-dim:   #8a7333;
    --amber:       #d4882a;
    --ember:       #c45a20;
    --copper:      #b87333;
    --parchment:   #e8dcc8;
    --parchment-dim: #a89880;
    --verdant:     #6a9e5c;
    --ff-display:  'Playfair Display', Georgia, 'Times New Roman', serif;
    --ff-body:     'Inter', -apple-system, 'Segoe UI', sans-serif;
    --ff-mono:     'IBM Plex Mono', 'Courier New', monospace;
    --panel-width: 420px;
    --rail-height: 56px;
    --radius:      3px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-body);
    background: var(--obsidian);
    color: var(--parchment);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════
   SPECTRAL BACKGROUND
   ════════════════════════════════════ */
#spectral-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 162, 78, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(212, 136, 42, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(184, 115, 51, 0.02) 0%, transparent 60%),
        var(--obsidian);
    overflow: hidden;
}

.sweep-line {
    position: absolute;
    top: -10%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 78, 0.06), transparent);
    animation: sweep 12s linear infinite;
}

@keyframes sweep {
    0%   { top: -2%; }
    100% { top: 102%; }
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0,0,0,0.4) 100%);
}

/* ════════════════════════════════════
   TOP RAIL
   ════════════════════════════════════ */
.top-rail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--rail-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: rgba(12, 11, 9, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(201, 162, 78, 0.1);
}

.rail-brand {
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--parchment-dim);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(168, 152, 128, 0.15);
    border-radius: var(--radius);
    transition: color 0.2s, border-color 0.2s;
}

.rail-brand:hover {
    color: var(--brass);
    border-color: rgba(201, 162, 78, 0.3);
}

.rail-center {
    text-align: center;
}

.rail-title {
    font-family: var(--ff-display);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, var(--brass-light), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.rail-tagline {
    display: block;
    font-family: var(--ff-mono);
    font-size: 0.55rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    opacity: 0.6;
}

.rail-version {
    font-family: var(--ff-mono);
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--brass-dim);
    letter-spacing: 0.1em;
    vertical-align: middle;
    margin-left: 0.35em;
    opacity: 0.7;
    background: rgba(201, 162, 78, 0.08);
    border: 1px solid rgba(201, 162, 78, 0.15);
    border-radius: 2px;
    padding: 0.05em 0.35em;
    -webkit-text-fill-color: var(--brass-dim);
}

/* ════════════════════════════════════
   MAIN GRID
   ════════════════════════════════════ */
.main-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: var(--panel-width) 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--rail-height) + 2rem) 2rem 3rem;
    min-height: 100vh;
}

/* ════════════════════════════════════
   INPUT PANEL (LEFT)
   ════════════════════════════════════ */
.input-panel {
    position: sticky;
    top: calc(var(--rail-height) + 1rem);
    height: fit-content;
    max-height: calc(100vh - var(--rail-height) - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--leather) transparent;
}

.panel-heading {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
}

.panel-label {
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brass-dim);
    margin-bottom: 0.5rem;
}

.panel-line {
    height: 1px;
    background: linear-gradient(90deg, var(--brass-dim), transparent);
    opacity: 0.4;
}

/* Dial groups */
.dial-group {
    border: none;
    margin-bottom: 1.25rem;
    padding: 0;
}

.dial-label {
    font-family: var(--ff-mono);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    padding: 0 0 0.5rem;
    cursor: default;
}

.optional-tag {
    font-weight: 300;
    opacity: 0.5;
    font-style: italic;
    font-family: var(--ff-display);
    text-transform: none;
    letter-spacing: normal;
}

.dial-row {
    display: flex;
    gap: 0.5rem;
}

.dial-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 0 0 auto;
}

.dial-cell-wide { flex: 1 1 auto; }

.dial-sublabel {
    font-family: var(--ff-mono);
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brass-dim);
    opacity: 0.7;
}

/* Custom selects */
.dial-select {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 0.7rem;
    font-family: var(--ff-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--parchment);
    background: var(--soot);
    border: 1px solid var(--leather);
    border-radius: var(--radius);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a89880' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dial-select:hover { border-color: var(--brass-dim); }

.dial-select:focus {
    border-color: var(--brass);
    box-shadow: 0 0 0 2px rgba(201, 162, 78, 0.12);
}

.dial-select option {
    background: var(--charcoal);
    color: var(--parchment);
    padding: 0.3rem;
}

.dial-select-full { width: 100%; }

/* Number input */
.dial-number {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-family: var(--ff-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--brass-light);
    background: var(--soot);
    border: 1px solid var(--leather);
    border-radius: var(--radius);
    outline: none;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dial-number:focus {
    border-color: var(--brass);
    box-shadow: 0 0 0 2px rgba(201, 162, 78, 0.12);
}

.dial-number::-webkit-inner-spin-button,
.dial-number::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.dial-number { -moz-appearance: textfield; }

/* Tempo gauge */
.tempo-gauge {
    margin-top: 0.5rem;
    padding-left: 0.25rem;
}

.gauge-track {
    height: 3px;
    background: var(--leather);
    border-radius: 2px;
    position: relative;
    overflow: visible;
}

.gauge-needle {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 11px;
    background: var(--brass);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(201, 162, 78, 0.4);
    transition: left 0.3s ease;
    left: 50%;
    transform: translateX(-50%);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-family: var(--ff-mono);
    font-size: 0.45rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    opacity: 0.4;
}

/* ════════════════════════════════════
   GENERATE BUTTON
   ════════════════════════════════════ */
.submit-area { margin-top: 1.5rem; }

.generate-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: var(--ff-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--obsidian);
    background: linear-gradient(135deg, var(--brass), var(--amber));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.3s;
}

.generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brass-light), var(--copper));
    opacity: 0;
    transition: opacity 0.3s;
}

.generate-btn:hover::before { opacity: 1; }
.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(201, 162, 78, 0.25);
}
.generate-btn:active { transform: translateY(0); }

.btn-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(12, 11, 9, 0.15);
    border-radius: var(--radius);
    pointer-events: none;
}

.btn-icon {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    line-height: 1;
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* ════════════════════════════════════
   OUTPUT PANEL (RIGHT)
   ════════════════════════════════════ */
.output-panel { min-height: 70vh; }
.hidden { display: none !important; }

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 0.75rem;
}

.empty-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--brass-dim);
    opacity: 0.25;
    margin-bottom: 1rem;
    font-family: var(--ff-mono);
    letter-spacing: 0.1em;
}

.empty-text {
    font-family: var(--ff-display);
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    color: var(--parchment-dim);
    max-width: 480px;
    line-height: 1.7;
}

.empty-text strong {
    color: var(--brass);
    font-weight: 700;
    font-style: normal;
}

.empty-hint {
    font-family: var(--ff-mono);
    font-size: 0.7rem;
    color: var(--parchment-dim);
    opacity: 0.4;
    max-width: 400px;
    line-height: 1.7;
}

.empty-ghosts {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    font-family: var(--ff-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    opacity: 0.2;
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1.5rem;
}

.loading-oscilloscope {
    width: 320px;
    height: 80px;
    border: 1px solid rgba(201, 162, 78, 0.15);
    border-radius: var(--radius);
    background: var(--soot);
    overflow: hidden;
}

#scope-canvas {
    width: 100%;
    height: 100%;
}

.loading-text {
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    color: var(--brass-dim);
    letter-spacing: 0.1em;
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loading-stages {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.loading-stages .stage {
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: var(--parchment-dim);
    opacity: 0.25;
    transition: opacity 0.4s, color 0.4s;
}

.loading-stages .stage.active {
    opacity: 1;
    color: var(--brass);
}

/* Output state */
.output-state {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Summary strip */
.input-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--soot);
    border: 1px solid var(--leather);
    border-radius: var(--radius);
    margin-bottom: 0;
}

.summary-chip {
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    background: rgba(201, 162, 78, 0.08);
    border: 1px solid rgba(201, 162, 78, 0.15);
    border-radius: 2px;
    color: var(--brass);
}

.summary-chip .chip-label {
    color: var(--parchment-dim);
    opacity: 0.6;
    margin-right: 0.3rem;
}

/* ════════════════════════════════════
   NARRATIVE OUTPUT
   ════════════════════════════════════ */
.output-content {
    font-family: var(--ff-body);
    line-height: 1.75;
}

.output-content h2 {
    font-family: var(--ff-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brass);
    border-bottom: 1px solid rgba(201, 162, 78, 0.15);
    padding-bottom: 0.5rem;
    margin: 2rem 0 1rem;
}

.output-content h3 {
    font-family: var(--ff-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--parchment);
    margin: 1.5rem 0 0.5rem;
}

.output-content h4 {
    font-family: var(--ff-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brass-light);
    margin: 1.25rem 0 0.5rem;
}

.output-content p {
    color: var(--parchment);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.output-content em {
    color: var(--brass-light);
    font-style: italic;
    font-family: var(--ff-display);
}

.output-content strong {
    color: var(--parchment);
    font-weight: 600;
}

.output-content blockquote {
    border-left: 2px solid var(--brass-dim);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: rgba(201, 162, 78, 0.03);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.output-content blockquote p {
    color: var(--parchment);
    opacity: 0.85;
    margin: 0;
}

.output-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.output-content ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    color: var(--parchment);
    font-size: 0.92rem;
}

.output-content ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--brass-dim);
    font-size: 0.5rem;
    top: 0.55em;
}

.output-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--leather), transparent);
    margin: 1.5rem 0;
}

.output-content pre {
    background: var(--soot);
    border: 1px solid var(--leather);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.output-content code {
    font-family: var(--ff-mono);
    font-size: 0.85rem;
}

/* ════════════════════════════════════
   ACTION BAR
   ════════════════════════════════════ */
.action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(201, 162, 78, 0.08);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    font-family: var(--ff-mono);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    background: transparent;
    border: 1px solid var(--leather);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.action-btn:hover {
    color: var(--brass);
    border-color: var(--brass-dim);
    background: rgba(201, 162, 78, 0.05);
}

.action-btn-accent {
    color: var(--brass);
    border-color: rgba(201, 162, 78, 0.25);
}

.action-btn-accent:hover {
    background: rgba(201, 162, 78, 0.1);
}

.action-btn-sound {
    color: var(--verdant);
    border-color: rgba(106, 158, 92, 0.25);
}

.action-btn-sound:hover {
    color: var(--verdant);
    border-color: rgba(106, 158, 92, 0.5);
    background: rgba(106, 158, 92, 0.08);
}

.action-btn-sound.playing {
    color: var(--ember);
    border-color: rgba(196, 90, 32, 0.3);
}

.action-btn-sound.playing:hover {
    color: var(--ember);
    border-color: rgba(196, 90, 32, 0.6);
    background: rgba(196, 90, 32, 0.08);
}

/* Loop badge inside sound button */
.loop-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.35em;
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0.05em 0.3em;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, background 0.15s ease;
    background: rgba(135, 163, 76, 0.15);
    color: var(--verdant);
    border: 1px solid rgba(135, 163, 76, 0.25);
    user-select: none;
}

.loop-badge:hover {
    opacity: 1;
    background: rgba(135, 163, 76, 0.25);
}

.action-btn-sound.playing .loop-badge {
    background: rgba(196, 90, 32, 0.15);
    color: var(--ember);
    border-color: rgba(196, 90, 32, 0.25);
}

.action-btn-sound.playing .loop-badge:hover {
    background: rgba(196, 90, 32, 0.25);
}

.action-btn-sound.playing:hover {
    color: var(--ember);
    border-color: rgba(196, 90, 32, 0.6);
    background: rgba(196, 90, 32, 0.08);
}

#vg-analyser {
    display: block;
    margin-top: 0.2rem;
    border-radius: 2px;
}

/* Info button in top rail */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 0.75rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--parchment-dim);
    background: transparent;
    border: 1px solid rgba(168, 152, 128, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    line-height: 1;
}

.info-btn:hover {
    color: var(--brass);
    border-color: rgba(201, 162, 78, 0.4);
    background: rgba(201, 162, 78, 0.06);
}

/* ════════════════════════════════════
   INFO MODAL
   ════════════════════════════════════ */
.info-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.info-modal.open {
    display: flex;
}

.info-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 3, 2, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.info-modal-content {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--charcoal);
    border: 1px solid rgba(201, 162, 78, 0.15);
    border-radius: 4px;
    padding: 2rem 2rem 1.5rem;
    animation: modalSlideIn 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--leather) transparent;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.info-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--parchment-dim);
    background: transparent;
    border: 1px solid rgba(168, 152, 128, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    line-height: 1;
}

.info-close:hover {
    color: var(--brass);
    border-color: var(--brass-dim);
}

.info-modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(201, 162, 78, 0.12);
}

.info-modal-title {
    font-family: var(--ff-display);
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, var(--brass-light), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.info-modal-subtitle {
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    opacity: 0.6;
}

.info-modal-body {
    font-family: var(--ff-body);
    color: var(--parchment);
    line-height: 1.75;
    font-size: 0.9rem;
}

.info-modal-body p {
    margin-bottom: 1rem;
}

.info-modal-body h3 {
    font-family: var(--ff-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brass);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(201, 162, 78, 0.1);
}

.info-modal-body h4 {
    font-family: var(--ff-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--parchment);
    margin: 1.25rem 0 0.5rem;
}

.info-modal-body strong {
    color: var(--parchment);
    font-weight: 600;
}

.info-modal-body em {
    color: var(--brass-light);
    font-family: var(--ff-display);
    font-style: italic;
}

.info-modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.info-modal-body ul li {
    position: relative;
    padding-left: 1.15rem;
    margin-bottom: 0.35rem;
    color: var(--parchment);
    font-size: 0.88rem;
}

.info-modal-body ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--brass-dim);
    font-size: 0.45rem;
    top: 0.6em;
}

.info-modal-body .modal-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--leather), transparent);
    margin: 1.5rem 0;
}

.info-modal-body footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(201, 162, 78, 0.08);
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    color: var(--parchment-dim);
    opacity: 0.4;
    letter-spacing: 0.1em;
    text-align: center;
}

.info-modal-body footer a {
    color: var(--brass-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.info-modal-body footer a:hover {
    color: var(--brass);
}

/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
.vibe-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1rem;
    font-family: var(--ff-mono);
    font-size: 0.6rem;
    color: var(--parchment-dim);
    opacity: 0.4;
    letter-spacing: 0.1em;
    border-top: 1px solid rgba(201, 162, 78, 0.06);
}

.vibe-footer a {
    color: var(--brass-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.vibe-footer a:hover { color: var(--brass); }

/* ════════════════════════════════════
   TOAST
   ════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.6rem 1.2rem;
    font-family: var(--ff-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--obsidian);
    background: var(--brass);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 900px) {
    :root { --panel-width: 100%; }

    .main-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: calc(var(--rail-height) + 1rem) 1rem 2rem;
    }

    .input-panel {
        position: static;
        max-height: none;
    }

    .rail-tagline { display: none; }
}

@media (max-width: 600px) {
    .top-rail { padding: 0 1rem; }
    .rail-title { font-size: 0.95rem; }

    .dial-row {
        flex-direction: column;
        gap: 0.4rem;
    }

    .dial-cell { flex: 1 1 auto; }

    .generate-btn {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }

    .input-summary {
        padding: 0.5rem;
        gap: 0.35rem;
    }

    .summary-chip { font-size: 0.5rem; }
    .output-content h3 { font-size: 1rem; }
    .loading-oscilloscope { width: 100%; max-width: 320px; }

    .info-modal {
        padding: 1rem;
        align-items: flex-end;
    }

    .info-modal-content {
        max-height: 90vh;
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 4px 4px 0 0;
    }

    .info-modal-title { font-size: 1.3rem; }
}

/* Ensure modal is above everything */
.info-modal {
    z-index: 9999;
}
