/* ══════════════════════════════════════════════════════════
   Terminal Quests — Quest cards, XP bar, rewards, lore
   ══════════════════════════════════════════════════════════ */

.quest-guest-notice {
    text-align: center;
    padding: 40px 20px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #6b5740;
    font-size: 0.95rem;
    line-height: 1.7;
}

.quest-guest-hint {
    font-style: italic;
    color: #8b7355;
    font-size: 0.85rem;
}

.quest-section {
    margin-bottom: 20px;
    background: rgba(201, 185, 154, 0.15);
    border: 1px solid #d4c9a8;
    border-radius: 6px;
    padding: 16px 18px;
}

.quest-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #c9b99a;
}

.quest-section-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #5a4a35;
    margin: 0;
}

.quest-section-count {
    font-size: 0.75rem;
    background: #d4c9a8;
    color: #6b5740;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.quest-empty {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.85rem;
    color: #8b7355;
    font-style: italic;
    padding: 12px 0;
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quest-item {
    background: #f0e8d2;
    border: 1px solid #c9b99a;
    border-radius: 4px;
    padding: 14px 16px;
}

.quest-item--active {
    border-left: 3px solid #8b7355;
}

.quest-item--available {
    border-left: 3px solid #6a8a5a;
}

.quest-item--completed {
    opacity: 0.7;
    border-left: 3px solid #a89279;
}

.quest-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quest-item-chevron {
    font-size: 0.7rem;
    color: #a89878;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: inline-block;
}

.quest-item--expanded > .quest-item-header .quest-item-chevron {
    transform: rotate(90deg);
}

.quest-item-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.quest-item-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Collapsible body */
.quest-item-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s ease;
}

.quest-item-body-inner {
    overflow: hidden;
}

.quest-item--expanded > .quest-item-body {
    grid-template-rows: 1fr;
}

.quest-item--expanded > .quest-item-body .quest-item-body-inner > *:first-child {
    margin-top: 8px;
}

.quest-item-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    background: #d4c9a8;
    color: #6b5740;
}

.quest-type--tutorial { background: #c8d8c0; color: #3a5a2a; }
.quest-type--main     { background: #d4c090; color: #5a4020; }
.quest-type--side     { background: #c8c8d8; color: #4a4a6a; }
.quest-type--daily    { background: #d8d0c0; color: #6a5a40; }

.quest-item-id {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.7rem;
    color: #a89878;
}

.quest-item-progress,
.quest-item-steps,
.quest-item-date {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.75rem;
    color: #8b7355;
}

.quest-item-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3a2e1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quest-item-desc {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.82rem;
    color: #6b5740;
    line-height: 1.5;
    margin-bottom: 6px;
}

.quest-item-step {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    margin: 6px 0;
    background: #e5dbc0;
    border-radius: 3px;
}

.quest-step-marker {
    color: #8b7355;
    font-size: 0.8rem;
    line-height: 1.4;
}

.quest-step-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.82rem;
    color: #5a4a35;
    line-height: 1.4;
}

.quest-item-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.quest-rewards {
    display: flex;
    gap: 6px;
}

.quest-reward {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 3px;
}

.quest-reward--xp {
    background: #dcd0b0;
    color: #6a5a30;
}

.quest-reward--delvs {
    background: #c0d0c0;
    color: #3a5a3a;
}

/* ── XP Summary Bar ──────────────────────────────────── */

.quest-xp-bar {
    background: #e5dbc0;
    border: 1px solid #c9b99a;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.quest-xp-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.quest-xp-level {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3a2e1e;
}

.quest-xp-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.8rem;
    font-style: italic;
    color: #6b5740;
}

.quest-xp-track {
    height: 6px;
    background: #d4c9a8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.quest-xp-fill {
    height: 100%;
    background: #8b7355;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quest-xp-numbers {
    display: flex;
    justify-content: space-between;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.72rem;
    color: #8b7355;
}

/* ── Quest Buttons ───────────────────────────────────── */

.quest-btn {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.75rem;
    padding: 4px 14px;
    border-radius: 3px;
    border: 1px solid;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.quest-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.quest-btn--accept {
    background: #6a8a5a;
    border-color: #5a7a4a;
    color: #f0edd8;
}

.quest-btn--accept:hover:not(:disabled) {
    background: #5a7a4a;
}

.quest-btn--abandon {
    background: transparent;
    border-color: #b09a7a;
    color: #8b7355;
}

.quest-btn--abandon:hover:not(:disabled) {
    background: #d4c9a8;
    color: #6b5740;
}

.quest-btn--reset {
    background: transparent;
    border-color: rgba(180, 85, 85, 0.3);
    color: #b05555;
    font-size: 0.68rem;
}

.quest-btn--reset:hover:not(:disabled) {
    background: rgba(180, 85, 85, 0.1);
    border-color: #b05555;
}

.quest-btn--reset .terminal-admin-chip {
    vertical-align: baseline;
}

.quest-btn--success {
    background: #5a8a5a;
    border-color: #4a7a4a;
    color: #f0edd8;
}

.quest-btn--error {
    background: #8a5a5a;
    border-color: #7a4a4a;
    color: #f0edd8;
}

/* ── Quest Lore ──────────────────────────────────────── */

.quest-item-lore {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.88rem;
    font-style: italic;
    color: #8b7355;
    line-height: 1.55;
    padding: 8px 12px;
    margin: 6px 0;
    border-left: 2px solid #c9b99a;
}
