/* Optional elder dialogue and compact reference. Both themes inherit the existing palette. */
.elder-card-art {
    display: block;
    width: min(160px, 100%);
    height: auto;
    margin: 0 auto 12px;
}
#elderDialog {
    width: min(560px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
}
#elderDialog.elder-first-meeting {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: clamp(16px, 4vw, 32px);
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
}
body.elder-first-meeting-open > #gameHeader,
body.elder-first-meeting-open > #main,
body.elder-first-meeting-open > #chat {
    display: none;
}
.elder-scene {
    position: relative;
    width: min(100%, 300px, 28vh);
    margin: 0 auto;
}
.elder-body,
.elder-hand {
    width: 100%;
    display: block;
}
.elder-hand {
    position: absolute;
    inset: 0;
    clip-path: inset(15% 55% 75% 26%);
    transform-origin: 35% 20%;
}
.elder-glass-ring {
    position: absolute;
    left: 35%;
    top: 20%;
    width: 8%;
    aspect-ratio: 1;
    border: 2px solid var(--muted);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.elder-opening .elder-hand {
    animation: elder-knock 1.2s ease-in-out 3;
}
.elder-opening .elder-glass-ring {
    animation: elder-glass 1.2s ease-out 3;
}
.elder-call {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    text-align: center;
}
@keyframes elder-knock {
    0%,
    35%,
    100% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.14);
    }
    23% {
        transform: scale(1.05);
    }
}
@keyframes elder-glass {
    0%,
    14%,
    65%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    18% {
        opacity: 0.7;
    }
    60% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(4);
    }
}
@media (prefers-reduced-motion: reduce) {
    .elder-opening .elder-hand,
    .elder-opening .elder-glass-ring {
        animation: none;
    }
}
#elderDialog nav,
#elderDialog footer,
.elder-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#elderDialog nav button,
.elder-topics button {
    flex: 1 1 140px;
    white-space: normal;
}
#elderDialog [data-elder-search] {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}
#elderDialog input {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
}
#elderDialog [data-elder-answer] {
    margin: 16px 0;
}
#elderDialog [data-elder-answer] > button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
}
.elder-choice {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin: 12px 0;
}
.elder-choice h4 {
    margin: 0;
}
.elder-card p {
    margin: 8px 0;
}
