/* ============================================================================
   🧙 ASK THE SAGE (website) — same look as the mobile app:
   FloatingActionButtons.js "Ask the Sage" pill → AskTheSageModal.js sheet →
   AskSageHubScreen.js → SageResponseScreen.js / CouncilResponseScreen.js
   Script: static/js/ask_the_sage.js
   ============================================================================ */

.aws-sage-fab,
.aws-sage-overlay {
    --sage-gold: #ffd700;
    --sage-gold-dim: rgba(255, 215, 0, 0.55);
    --sage-text: #e8efe6;
    --sage-muted: #94a292;
    --sage-border: rgba(255, 255, 255, 0.13);
    --sage-purple: #8B5CF6;
    --sage-purple-dark: #7C3AED;
    --sage-mono: 'Space Mono', 'Courier New', monospace;
    --sage-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------- floating pill */
/* App: #8B5CF6 pill, 1.5px #7C3AED border, radius 20, 🧙 above the label, gold shadow.
   Sits right above the floating Next button (the script aligns it to that button). */
.aws-sage-fab {
    position: fixed;
    right: 25px;
    bottom: 112px;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 6px 14px 7px;
    border: 1.5px solid var(--sage-purple-dark);
    border-radius: 20px;
    background: var(--sage-purple);
    color: #ffffff;
    font-family: var(--sage-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(255, 215, 0, 0.4);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.9s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Hidden while the galaxy / world map (immersive planetarium) is open, like the site's floating Next button */
body.at-immersive .aws-sage-fab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.aws-sage-fab:hover {
    background: #9B70F9;
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

.aws-sage-fab:active {
    transform: scale(0.9);
}

.aws-sage-fab:focus-visible {
    outline: 2px solid var(--sage-gold);
    outline-offset: 3px;
}

.aws-sage-fab-emoji {
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 768px) {
    .aws-sage-fab {
        right: 15px;
        bottom: 92px;
        padding: 5px 12px 6px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .aws-sage-fab {
        right: 10px;
        bottom: 76px;
    }
}

/* ---------------------------------------------------------------- sheet */
html.aws-sage-lock,
html.aws-sage-lock body {
    overflow: hidden !important;
}

.aws-sage-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050; /* above the site's modals (10000) and toasts (9999) */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(2, 5, 3, 0.86);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    font-family: var(--sage-sans);
    color: #ffffff;
}

.aws-sage-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

.aws-sage-sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    max-height: 92dvh;
    overflow: hidden;
    background: rgba(7, 12, 9, 0.94);
    border: 1px solid var(--sage-border);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.aws-sage-overlay.is-open .aws-sage-sheet {
    transform: translateY(0);
}

.aws-sage-sheet:focus {
    outline: none;
}

.aws-sage-sheet.is-answer {
    max-width: 760px;
    height: 92vh;
    height: 92dvh;
}

.aws-sage-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px 20px 18px;
}

.aws-sage-sheet.is-answer .aws-sage-scroll {
    padding: 4px 20px 24px;
}

.aws-sage-scroll::-webkit-scrollbar {
    width: 8px;
}

.aws-sage-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.25);
    border-radius: 8px;
}

/* ---------------------------------------------------------------- headers + sections (choice sheet + hub) */
.aws-sage-head {
    margin-bottom: 16px;
    text-align: center;
}

.aws-sage-head-icon {
    margin-bottom: 8px;
    font-size: 42px;
    line-height: 1;
}

.aws-sage-head-title {
    margin: 0 0 8px;
    color: var(--sage-gold);
    font-family: var(--sage-mono);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.aws-sage-head-sub {
    max-width: 420px;
    margin: 0 auto;
    color: var(--sage-muted);
    font-family: var(--sage-mono);
    font-size: 11px;
    line-height: 16px;
}

.aws-sage-section-title {
    margin: 6px 0 8px;
    color: var(--sage-gold);
    font-family: var(--sage-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

.aws-sage-section-sub {
    margin: -2px 0 10px;
    color: var(--sage-muted);
    font-size: 12px;
    line-height: 1.45;
}

.aws-sage-divider {
    height: 1px;
    margin: 18px 0 14px;
    border: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35), transparent);
}

/* ---------------------------------------------------------------- option cards */
.aws-sage-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 0 0 10px;
    padding: 12px;
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-family: var(--sage-sans);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.aws-sage-option:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.aws-sage-option:active {
    transform: scale(0.98);
}

.aws-sage-option:focus-visible {
    outline: 2px solid var(--sage-gold);
    outline-offset: 2px;
}

.aws-sage-option--explain { background: linear-gradient(135deg, #4C6FE0, #3B5BC7); }
.aws-sage-option--apply { background: linear-gradient(135deg, #10B981, #059669); }
.aws-sage-option--council-explain { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.aws-sage-option--council-apply { background: linear-gradient(135deg, #F59E0B, #D97706); }
.aws-sage-hub .aws-sage-option--council-explain { background: linear-gradient(135deg, #8B5CF6, #7C3AED, #6D28D9); }
.aws-sage-hub .aws-sage-option--council-apply { background: linear-gradient(135deg, #F59E0B, #D97706, #B45309); }

.aws-sage-option[disabled],
.aws-sage-hub .aws-sage-option[disabled] {
    background: linear-gradient(135deg, #555555, #444444, #333333);
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
    opacity: 0.85;
    transform: none;
}

.aws-sage-option-icon {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 24px;
}

.aws-sage-option-text {
    flex: 1;
    min-width: 0;
}

.aws-sage-option-title {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
}

.aws-sage-option-desc {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.35;
}

.aws-sage-option-arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

/* ---------------------------------------------------------------- pill buttons */
.aws-sage-pill-btn {
    display: block;
    width: 100%;
    margin: 4px 0 6px;
    padding: 12px 16px;
    border: 1px solid var(--sage-gold-dim);
    border-radius: 999px;
    background: rgba(7, 12, 9, 0.55);
    color: var(--sage-gold);
    font-family: var(--sage-mono);
    font-size: 11px;
    letter-spacing: 1.6px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.aws-sage-pill-btn:hover {
    border-color: var(--sage-gold);
    background: rgba(255, 215, 0, 0.08);
}

.aws-sage-pill-btn:focus-visible {
    outline: 2px solid var(--sage-gold);
    outline-offset: 2px;
}

.aws-sage-pill-btn--muted {
    padding: 14px 16px;
    border-color: var(--sage-border);
    color: var(--sage-text);
}

.aws-sage-pill-btn--muted:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

/* ---------------------------------------------------------------- hub */
.aws-sage-banner {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(255, 215, 0, 0.08));
    text-align: center;
}

.aws-sage-banner-title {
    margin: 0 0 6px;
    color: var(--sage-gold);
    font-size: 15px;
    font-weight: 800;
}

.aws-sage-banner-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12.5px;
    line-height: 1.45;
}

.aws-sage-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 92px;
    margin: 0 0 6px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-family: var(--sage-sans);
    font-size: 15px;
    line-height: 1.45;
    resize: vertical;
}

.aws-sage-input:focus {
    border-color: var(--sage-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.aws-sage-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.aws-sage-input-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    font-size: 12px;
}

.aws-sage-input-error {
    min-height: 16px;
    color: #FCA5A5;
}

.aws-sage-counter {
    color: var(--sage-muted);
    font-family: var(--sage-mono);
    white-space: nowrap;
}

.aws-sage-counter.is-over {
    color: #FCA5A5;
}

.aws-sage-guidelines {
    margin: 8px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--sage-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.aws-sage-guidelines-title {
    margin: 0 0 6px;
    color: var(--sage-gold);
    font-size: 13px;
    font-weight: 700;
}

.aws-sage-guidelines ul {
    margin: 0;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12.5px;
    line-height: 1.6;
}

/* ---------------------------------------------------------------- loading */
.aws-sage-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    padding: 30px 10px;
    text-align: center;
}

.aws-sage-loading-orb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin-bottom: 26px;
}

.aws-sage-loading-orb::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 215, 0, 0.15);
    border-top-color: var(--sage-gold);
    border-right-color: rgba(139, 92, 246, 0.85);
    border-radius: 50%;
    animation: aws-sage-spin 1.6s linear infinite;
}

.aws-sage-loading-orb::after {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35), rgba(255, 215, 0, 0.08) 60%, transparent 70%);
    animation: aws-sage-breathe 2.4s ease-in-out infinite;
}

.aws-sage-loading-emoji {
    position: relative;
    z-index: 1;
    font-size: 54px;
    animation: aws-sage-float 3s ease-in-out infinite;
}

.aws-sage-loading-title {
    margin: 0 0 8px;
    color: var(--sage-gold);
    font-size: 20px;
    font-weight: 800;
}

.aws-sage-loading-sub {
    max-width: 360px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}

.aws-sage-dots span {
    animation: aws-sage-blink 1.4s infinite both;
}

.aws-sage-dots span:nth-child(2) { animation-delay: 0.2s; }
.aws-sage-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aws-sage-spin { to { transform: rotate(360deg); } }
@keyframes aws-sage-breathe { 0%, 100% { opacity: 0.7; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes aws-sage-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes aws-sage-blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

/* ---------------------------------------------------------------- answer header + quote reference */
.aws-sage-answer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(7, 12, 9, 0.96);
}

.aws-sage-answer-icon {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    font-size: 28px;
}

.aws-sage-answer-titles {
    flex: 1;
    min-width: 0;
}

.aws-sage-answer-title {
    margin: 0 0 2px;
    color: #FFD700;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

.aws-sage-answer-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12.5px;
    line-height: 1.4;
}

.aws-sage-council .aws-sage-answer-sub {
    color: #AAAAAA;
    font-size: 13px;
}

.aws-sage-close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 36px;
    cursor: pointer;
}

.aws-sage-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.aws-sage-close--gold {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    font-weight: 700;
}

.aws-sage-close--gold:hover {
    background: rgba(255, 215, 0, 0.3);
}

.aws-sage-ref {
    margin: 14px 0 6px;
    padding: 16px;
    border-left: 4px solid #8B5CF6;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.aws-sage-ref-text {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.98);
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 0.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.aws-sage-ref-author {
    margin: 0;
    color: #FFD700;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.aws-sage-listen {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 7px 14px;
    border: 1px solid rgba(196, 181, 253, 0.45);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.3);
    color: #C4B5FD;
    font-family: var(--sage-sans);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
}

.aws-sage-listen.is-playing {
    border-color: rgba(196, 181, 253, 0.9);
    background: rgba(196, 181, 253, 0.16);
}

.aws-sage-listen--gold {
    border-color: rgba(255, 215, 0, 0.45);
    color: #FFD700;
}

.aws-sage-listen--gold.is-playing {
    border-color: rgba(255, 215, 0, 0.9);
    background: rgba(255, 215, 0, 0.16);
}

/* the narrator voice is preparing the next part */
.aws-sage-listen.is-loading .aws-sage-listen-icon {
    animation: aws-sage-listen-pulse 1s ease-in-out infinite;
}

@keyframes aws-sage-listen-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------------------------------------------------------------- Sage answer sections */
.aws-sage-section {
    margin: 22px 0 0;
}

.aws-sage-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.aws-sage-section-icon {
    font-size: 24px;
}

.aws-sage-section-name {
    flex: 1;
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.aws-sage-card {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.aws-sage-short {
    margin: 0 0 14px;
    color: #FFD700;
    font-size: 19px;
    font-weight: 800;
    line-height: 30px;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.aws-sage-md {
    color: rgba(255, 255, 255, 0.98);
    font-size: 17px;
    line-height: 28px;
    letter-spacing: 0.4px;
    overflow-wrap: anywhere;
}

.aws-sage-md-p { margin: 0 0 14px; }
.aws-sage-md-h { margin: 18px 0 10px; color: #FFD700; font-weight: 900; letter-spacing: 0.6px; }
.aws-sage-md-h1 { font-size: 22px; }
.aws-sage-md-h2 { font-size: 19px; }
.aws-sage-md-h3 { font-size: 17px; }
.aws-sage-md strong { color: #FFD700; font-weight: 800; }
.aws-sage-md em { font-style: italic; }
.aws-sage-md ul,
.aws-sage-md ol { margin: 0 0 14px; padding-left: 22px; }
.aws-sage-md li { margin: 0 0 6px; }
.aws-sage-md blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 3px solid rgba(255, 215, 0, 0.6); color: rgba(255, 255, 255, 0.85); font-style: italic; }
.aws-sage-md code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); font-family: var(--sage-mono); font-size: 0.9em; }
.aws-sage-md hr { height: 1px; margin: 16px 0; border: 0; background: rgba(255, 255, 255, 0.15); }
.aws-sage-md > :last-child { margin-bottom: 0; }

.aws-sage-practice {
    margin: 0 0 12px;
    padding: 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.1);
}

.aws-sage-practice-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.aws-sage-practice-num {
    display: flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8B5CF6;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.aws-sage-practice-title {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.aws-sage-practice-time {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 600;
}

.aws-sage-practice-desc {
    margin: 0;
    color: rgba(255, 255, 255, 0.98);
    font-size: 17px;
    line-height: 26px;
    letter-spacing: 0.4px;
}

.aws-sage-challenge {
    padding: 16px;
    border: 2px solid #FFD700;
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    font-size: 18px;
    font-weight: 800;
    line-height: 28px;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.aws-sage-prompt {
    display: flex;
    gap: 12px;
    margin: 0 0 10px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.aws-sage-prompt-bullet {
    color: #8B5CF6;
    font-size: 20px;
    line-height: 26px;
}

.aws-sage-prompt-text {
    flex: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.98);
    font-size: 17px;
    font-weight: 500;
    line-height: 26px;
    letter-spacing: 0.4px;
}

.aws-sage-footer {
    margin: 24px 0 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-align: center;
}

/* ---------------------------------------------------------------- Council of 5 */
.aws-sage-philosopher {
    margin: 16px 0 0;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.aws-sage-philosopher-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.aws-sage-philosopher-icon {
    font-size: 40px;
    line-height: 1;
}

.aws-sage-philosopher-name {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.aws-sage-philosopher-tradition {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.aws-sage-philosopher .aws-sage-md {
    color: #ffffff;
}

.aws-sage-philosopher .aws-sage-md strong,
.aws-sage-philosopher .aws-sage-md-h {
    color: #FFE680;
}

.aws-sage-council-footer {
    padding: 24px 12px 8px;
    color: #AAAAAA;
    font-size: 15px;
    font-style: italic;
    line-height: 22px;
    letter-spacing: 0.2px;
    text-align: center;
}

/* ---------------------------------------------------------------- Save + Done bar */
.aws-sage-actions {
    display: flex;
    gap: 12px;
    padding: 10px 20px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(4, 8, 6, 0.88);
}

.aws-sage-action {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border: none;
    border-radius: 16px;
    color: #1a1a2e;
    font-family: var(--sage-sans);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.aws-sage-action:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.aws-sage-action:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.aws-sage-action--save {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    box-shadow: 0 3px 8px rgba(139, 92, 246, 0.4);
}

.aws-sage-action--save.is-saved {
    background: linear-gradient(135deg, #4CAF50, #45A049);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
}

.aws-sage-action--done {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
    font-size: 17px;
    letter-spacing: 1px;
}

.aws-sage-action[disabled] {
    cursor: progress;
    opacity: 0.75;
    transform: none;
}

.aws-sage-notice {
    margin: 10px 20px 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.aws-sage-notice[hidden] {
    display: none;
}

.aws-sage-notice--info {
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.15);
    color: #E9D5FF;
}

.aws-sage-notice--error {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
}

.aws-sage-notice-link {
    margin-left: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #FFD700;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------------------------------------------------------------- error */
.aws-sage-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 10px;
    text-align: center;
}

.aws-sage-error-icon {
    margin-bottom: 12px;
    font-size: 48px;
}

.aws-sage-error-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
}

.aws-sage-error-text {
    max-width: 380px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}

.aws-sage-error .aws-sage-pill-btn {
    max-width: 320px;
}

/* ---------------------------------------------------------------- small screens + reduced motion */
@media (max-width: 480px) {
    .aws-sage-scroll { padding: 18px 16px 16px; }
    .aws-sage-sheet.is-answer .aws-sage-scroll { padding: 4px 16px 20px; }
    .aws-sage-answer-head { padding: 12px 14px 10px; }
    .aws-sage-actions { padding: 10px 16px 12px; }
    .aws-sage-section-name { font-size: 20px; }
    .aws-sage-philosopher { padding: 16px; }
    .aws-sage-philosopher-name { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .aws-sage-sheet,
    .aws-sage-overlay { transition: none; }
    .aws-sage-loading-orb::before,
    .aws-sage-loading-orb::after,
    .aws-sage-loading-emoji,
    .aws-sage-dots span,
    .aws-sage-listen.is-loading .aws-sage-listen-icon { animation: none; }
}
