/* ============================================================
   NPC.QUEST  --  RPG dialogue / pixel-art stylesheet
   Palette:
   #0f0f23 Midnight Dungeon  | #e0d8c0 Parchment Scroll
   #2d2d44 Stone Wall        | #ffd700 Gold Coin
   #ff6b6b HP Red            | #5dade2 Mana Blue
   #2ecc71 XP Green          | #8b7355 Wooden Frame
   ============================================================ */

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

html, body {
    background: #0f0f23;
    color: #e0d8c0;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 18px;
    line-height: 1.6;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    font-smooth: never;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
}

/* ---------- CRT scanlines overlay ---------- */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 2px,
        rgba(0, 0, 0, 0.06) 4px
    );
    mix-blend-mode: multiply;
}
.scanlines::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.35) 100%);
}

/* ---------- Starfield ---------- */
.starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #e0d8c0;
    box-shadow: 0 0 2px rgba(224, 216, 192, 0.6);
    animation: twinkle 3s infinite ease-in-out;
}
.star.tiny { width: 1px; height: 1px; }
.star.gold { background: #ffd700; }
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

/* =========================================================
   TITLE SCREEN
   ========================================================= */
.title-screen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
}

.title-wrap {
    width: 100%;
    max-width: 720px;
}

.game-title {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: clamp(1.5rem, 7vw, 3.5rem);
    font-weight: 400;
    color: #ffd700;
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-shadow:
        4px 4px 0 #8b7355,
        4px 0 0 #8b7355,
        0 4px 0 #8b7355,
        8px 8px 0 rgba(0,0,0,0.6);
    margin-bottom: 24px;
}
.title-letter {
    display: inline-block;
    animation: titleBob 2.4s infinite ease-in-out;
}
.title-letter:nth-child(2) { animation-delay: 0.1s; }
.title-letter:nth-child(3) { animation-delay: 0.2s; }
.title-letter:nth-child(5) { animation-delay: 0.3s; }
.title-letter:nth-child(6) { animation-delay: 0.4s; }
.title-letter:nth-child(7) { animation-delay: 0.5s; }
.title-letter:nth-child(8) { animation-delay: 0.6s; }
.title-letter:nth-child(9) { animation-delay: 0.7s; }
.title-dot {
    color: #ff6b6b;
    display: inline-block;
}
@keyframes titleBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.subtitle {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: #5dade2;
    letter-spacing: 0.15em;
    margin-bottom: 32px;
}

.diamond-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-bottom: 48px;
}
.diamond {
    width: 12px;
    height: 12px;
    background: #ffd700;
    transform: rotate(45deg);
    box-shadow: 0 0 8px #ffd700;
    animation: diamondPulse 1.5s infinite ease-in-out;
}
.diamond:nth-child(2) { animation-delay: 0.2s; }
.diamond:nth-child(3) { animation-delay: 0.4s; }
@keyframes diamondPulse {
    0%, 100% { opacity: 0.6; transform: rotate(45deg) scale(1); }
    50%      { opacity: 1;   transform: rotate(45deg) scale(1.2); }
}

.press-key {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: #e0d8c0;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 49%  { opacity: 1; }
    50%, 100%{ opacity: 0; }
}

.copyright {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: #8b7355;
    letter-spacing: 0.1em;
}

/* =========================================================
   QUEST LOG MAIN
   ========================================================= */
.quest-log {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    padding: 64px 24px 96px;
}

.log-header {
    text-align: center;
    margin-bottom: 56px;
}
.log-banner {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
}
.log-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #ffd700;
    letter-spacing: 0.1em;
    text-shadow: 3px 3px 0 #8b7355;
}
.quest-marker {
    width: 14px;
    height: 14px;
    background: #ffd700;
    transform: rotate(45deg);
    box-shadow: 0 0 8px #ffd700;
    animation: diamondPulse 1.8s infinite ease-in-out;
}
.log-meta {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #5dade2;
    letter-spacing: 0.1em;
}

/* ---------- Quest Entry ---------- */
.quest-entry {
    margin-bottom: 56px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.quest-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.entry-tag {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #ffd700;
    letter-spacing: 0.1em;
}
.entry-status {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    padding: 4px 8px;
    letter-spacing: 0.1em;
}
.status-active {
    color: #0f0f23;
    background: #2ecc71;
    box-shadow:
        -2px 0 0 #2ecc71, 2px 0 0 #2ecc71,
        0 -2px 0 #2ecc71, 0 2px 0 #2ecc71,
        -2px -2px 0 #2ecc71, 2px -2px 0 #2ecc71,
        -2px 2px 0 #2ecc71, 2px 2px 0 #2ecc71;
    animation: statusGlow 2s infinite ease-in-out;
}
.status-found {
    color: #0f0f23;
    background: #5dade2;
    box-shadow:
        -2px 0 0 #5dade2, 2px 0 0 #5dade2,
        0 -2px 0 #5dade2, 0 2px 0 #5dade2,
        -2px -2px 0 #5dade2, 2px -2px 0 #5dade2,
        -2px 2px 0 #5dade2, 2px 2px 0 #5dade2;
}
.status-locked {
    color: #e0d8c0;
    background: #2d2d44;
    box-shadow:
        -2px 0 0 #2d2d44, 2px 0 0 #2d2d44,
        0 -2px 0 #2d2d44, 0 2px 0 #2d2d44,
        -2px -2px 0 #2d2d44, 2px -2px 0 #2d2d44,
        -2px 2px 0 #2d2d44, 2px 2px 0 #2d2d44;
}
.status-xp {
    color: #0f0f23;
    background: #ffd700;
    box-shadow:
        -2px 0 0 #ffd700, 2px 0 0 #ffd700,
        0 -2px 0 #ffd700, 0 2px 0 #ffd700,
        -2px -2px 0 #ffd700, 2px -2px 0 #ffd700,
        -2px 2px 0 #ffd700, 2px 2px 0 #ffd700;
}
@keyframes statusGlow {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.4); }
}

/* ---------- Dialogue Box (core motif) ---------- */
.dialogue-box {
    background: #e0d8c0;
    color: #0f0f23;
    padding: 20px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    align-items: start;
    position: relative;
    /* Stacked box-shadow pixel border */
    box-shadow:
        -4px 0 0 #8b7355, 4px 0 0 #8b7355,
        0 -4px 0 #8b7355, 0 4px 0 #8b7355,
        -4px -4px 0 #8b7355, 4px -4px 0 #8b7355,
        -4px 4px 0 #8b7355, 4px 4px 0 #8b7355,
        -8px 8px 0 rgba(0,0,0,0.5);
    margin: 4px;
}
.dialogue-box::before {
    content: "";
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border: 2px dashed rgba(139, 115, 85, 0.4);
    pointer-events: none;
}
.dialogue-locked {
    background: #2d2d44;
    color: #e0d8c0;
}
.dialogue-locked::before {
    border-color: rgba(255, 215, 0, 0.25);
}
.dialogue-lore {
    background: #ffd700;
    color: #0f0f23;
}
.dialogue-lore::before {
    border-color: rgba(15, 15, 35, 0.35);
}

/* ---------- Portrait (CSS only) ---------- */
.portrait {
    width: 64px;
    height: 64px;
    background: #2d2d44;
    position: relative;
    box-shadow:
        -2px 0 0 #8b7355, 2px 0 0 #8b7355,
        0 -2px 0 #8b7355, 0 2px 0 #8b7355,
        inset 0 0 0 2px #0f0f23;
    margin: 4px 0 0 4px;
}
.portrait-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: #8b7355;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* SAGE -- yellow hood + closed eyes + small mouth */
.portrait-sage {
    background: linear-gradient(180deg, #2d2d44 0 30%, #ffd700 30% 55%, #e0d8c0 55%);
}
.portrait-sage::before {
    content: "";
    position: absolute;
    top: 28px; left: 14px;
    width: 8px; height: 4px;
    background: #0f0f23;
    box-shadow: 22px 0 0 #0f0f23;
}
.portrait-sage::after {
    content: "";
    position: absolute;
    bottom: 14px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 4px;
    background: #8b7355;
}

/* BLACKSMITH -- bald, mustache */
.portrait-blacksmith {
    background: #8b7355;
}
.portrait-blacksmith::before {
    content: "";
    position: absolute;
    top: 18px; left: 12px;
    width: 8px; height: 8px;
    background: #0f0f23;
    border-radius: 50%;
    box-shadow: 24px 0 0 #0f0f23;
}
.portrait-blacksmith::after {
    content: "";
    position: absolute;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 6px;
    background: #2d2d44;
    box-shadow: 0 -4px 0 #2d2d44;
}

/* WITCH -- pointy hat, green skin, eye */
.portrait-witch {
    background: #2ecc71;
    overflow: hidden;
}
.portrait-witch::before {
    content: "";
    position: absolute;
    top: -8px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 28px solid transparent;
    border-right: 28px solid transparent;
    border-bottom: 36px solid #0f0f23;
}
.portrait-witch::after {
    content: "";
    position: absolute;
    top: 32px; left: 16px;
    width: 6px; height: 6px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 22px 0 0 #ffd700, 9px 14px 0 -1px #0f0f23;
}

/* GUARD -- helmet visor */
.portrait-guard {
    background: #5dade2;
}
.portrait-guard::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 22px;
    background: #8b7355;
    border-bottom: 2px solid #0f0f23;
}
.portrait-guard::after {
    content: "";
    position: absolute;
    top: 28px; left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 8px;
    background: #0f0f23;
    box-shadow: 0 14px 0 -2px #2d2d44;
}

/* MYSTERY -- ??? */
.portrait-mystery {
    background: #2d2d44;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portrait-mystery::before {
    content: "?";
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    color: #ffd700;
    text-shadow: 2px 2px 0 #0f0f23;
    animation: mysteryFlicker 1.2s infinite;
}
@keyframes mysteryFlicker {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* TOME */
.portrait-tome {
    background: #ff6b6b;
}
.portrait-tome::before {
    content: "";
    position: absolute;
    top: 12px; left: 12px; right: 12px; bottom: 12px;
    background: #e0d8c0;
    box-shadow: inset 0 0 0 2px #8b7355;
}
.portrait-tome::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 4px; height: 28px;
    background: #8b7355;
    transform: translate(-50%, -50%);
}

/* ---------- Dialogue text ---------- */
.dialogue-content {
    padding-right: 8px;
}
.speaker-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #8b7355;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dialogue-locked .speaker-name { color: #ffd700; }
.dialogue-lore .speaker-name   { color: #0f0f23; }

.hp-bar {
    display: inline-block;
    width: 60px;
    height: 6px;
    background: #2d2d44;
    border: 1px solid #0f0f23;
    position: relative;
}
.hp-bar i {
    display: block;
    height: 100%;
    width: 70%;
    background: #ff6b6b;
    animation: hpPulse 2s infinite ease-in-out;
}
@keyframes hpPulse {
    0%, 100% { width: 70%; }
    50%      { width: 64%; }
}

.dialogue-text {
    font-family: 'VT323', monospace;
    font-size: 1.25rem;
    line-height: 1.5;
    min-height: 3em;
    word-break: break-word;
}
.dialogue-text::after {
    content: "_";
    color: inherit;
    opacity: 0;
}
.dialogue-text.typing::after {
    opacity: 1;
    animation: blink 0.8s infinite;
}

.dialogue-arrow {
    display: inline-block;
    margin-top: 8px;
    color: #8b7355;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.dialogue-locked .dialogue-arrow { color: #ffd700; }
.dialogue-lore .dialogue-arrow   { color: #0f0f23; }
.dialogue-text.done + .dialogue-arrow {
    opacity: 1;
    animation: arrowBlink 1s infinite ease-in-out;
}
@keyframes arrowBlink {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%      { transform: translateY(3px); opacity: 0.5; }
}

.lock-icon {
    font-size: 0.9rem;
}

/* ---------- Stat row ---------- */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding: 0 8px;
}
.stat-chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    background: #2d2d44;
    padding: 6px 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    box-shadow:
        -2px 0 0 #8b7355, 2px 0 0 #8b7355,
        0 -2px 0 #8b7355, 0 2px 0 #8b7355;
}
.stat-key { color: #5dade2; }
.stat-val { color: #ffd700; }

/* =========================================================
   INVENTORY SECTION
   ========================================================= */
.inventory-section {
    margin-top: 80px;
    text-align: center;
}
.inventory-banner {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
}
.inventory-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: #ffd700;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 0 #8b7355;
}
.inventory-meta {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: #5dade2;
    letter-spacing: 0.1em;
    margin-bottom: 28px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(6, 48px);
    gap: 12px;
    justify-content: center;
    padding: 16px;
    background: #2d2d44;
    box-shadow:
        -4px 0 0 #8b7355, 4px 0 0 #8b7355,
        0 -4px 0 #8b7355, 0 4px 0 #8b7355,
        -4px -4px 0 #8b7355, 4px -4px 0 #8b7355,
        -4px 4px 0 #8b7355, 4px 4px 0 #8b7355,
        -8px 8px 0 rgba(0,0,0,0.5);
    width: max-content;
    margin: 0 auto;
    position: relative;
}

.inv-slot {
    width: 48px;
    height: 48px;
    background: #0f0f23;
    box-shadow: inset 0 0 0 2px #8b7355, inset 2px 2px 0 rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    position: relative;
}
.inv-slot:hover {
    background: #2d2d44;
    transform: scale(1.08);
    z-index: 5;
}
.inv-slot:hover::after {
    content: attr(data-item);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #ffd700;
    background: #0f0f23;
    padding: 4px 6px;
    white-space: nowrap;
    margin-bottom: 6px;
    box-shadow:
        -2px 0 0 #8b7355, 2px 0 0 #8b7355,
        0 -2px 0 #8b7355, 0 2px 0 #8b7355;
    z-index: 10;
}
.inv-empty {
    background: rgba(15, 15, 35, 0.7);
}

/* ---------- Pixel icons ---------- */
.icon { width: 24px; height: 24px; position: relative; }

.icon-sword {
    background: linear-gradient(180deg, transparent 0 10%, #5dade2 10% 70%, #8b7355 70% 90%, #ffd700 90%);
    width: 6px; height: 24px; margin: auto;
}
.icon-sword::before {
    content: "";
    position: absolute;
    top: 60%; left: -8px;
    width: 22px; height: 4px;
    background: #8b7355;
}

.icon-shield {
    width: 18px; height: 22px;
    background: #5dade2;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    box-shadow: inset 0 0 0 2px #ffd700;
}
.icon-shield::before {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 10px;
    background: #ffd700;
}

.icon-potion {
    width: 14px; height: 18px;
    background: #ff6b6b;
    margin: auto;
    box-shadow: 0 -4px 0 #8b7355, 0 -8px 0 #ff6b6b;
    border-radius: 0 0 4px 4px;
    position: relative;
    top: 4px;
}

.icon-map {
    width: 22px; height: 18px;
    background: #e0d8c0;
    margin: auto;
}
.icon-map::before, .icon-map::after {
    content: "";
    position: absolute;
    background: #8b7355;
}
.icon-map::before {
    top: 4px; left: 4px;
    width: 14px; height: 2px;
    box-shadow: 0 4px 0 #8b7355, 0 8px 0 #8b7355;
}
.icon-map::after {
    top: 6px; left: 50%;
    width: 4px; height: 4px;
    background: #ff6b6b;
    border-radius: 50%;
}

.icon-coin {
    width: 18px; height: 18px;
    background: #ffd700;
    border-radius: 50%;
    margin: auto;
    box-shadow: inset -2px -2px 0 #8b7355;
    animation: coinSpin 2.5s infinite ease-in-out;
}
@keyframes coinSpin {
    0%, 100% { transform: scaleX(1); }
    50%      { transform: scaleX(0.3); }
}

.icon-gem {
    width: 14px; height: 14px;
    background: #2ecc71;
    transform: rotate(45deg);
    margin: auto;
    box-shadow: inset -2px -2px 0 #2d2d44, 0 0 6px #2ecc71;
}

.icon-key {
    width: 22px; height: 8px;
    background: #ffd700;
    margin: auto;
    position: relative;
    top: 8px;
}
.icon-key::before {
    content: "";
    position: absolute;
    left: -6px; top: -2px;
    width: 10px; height: 12px;
    border: 2px solid #ffd700;
    border-radius: 50%;
    background: transparent;
}
.icon-key::after {
    content: "";
    position: absolute;
    right: 0; top: 8px;
    width: 6px; height: 4px;
    background: #ffd700;
    box-shadow: -8px 0 0 #ffd700;
}

.icon-book {
    width: 18px; height: 22px;
    background: #ff6b6b;
    margin: auto;
    box-shadow: inset 0 0 0 2px #8b7355;
}
.icon-book::before {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 8px; height: 8px;
    background: #ffd700;
    border-radius: 50%;
}

.icon-bread {
    width: 22px; height: 14px;
    background: #8b7355;
    border-radius: 50% 50% 30% 30%;
    margin: auto;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.3);
}

.icon-heart {
    width: 18px;
    height: 18px;
    margin: auto;
    position: relative;
    transform: rotate(-45deg);
    background: #ff6b6b;
}
.icon-heart::before, .icon-heart::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: #ff6b6b;
    border-radius: 50%;
}
.icon-heart::before { top: -9px; left: 0; }
.icon-heart::after  { left: 9px; top: 0; }

/* =========================================================
   STATUS BAR / FOOTER
   ========================================================= */
.status-bar {
    margin-top: 80px;
    background: #2d2d44;
    padding: 20px;
    box-shadow:
        -4px 0 0 #8b7355, 4px 0 0 #8b7355,
        0 -4px 0 #8b7355, 0 4px 0 #8b7355,
        -4px -4px 0 #8b7355, 4px -4px 0 #8b7355,
        -4px 4px 0 #8b7355, 4px 4px 0 #8b7355;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.status-block {
    display: grid;
    grid-template-columns: 32px 1fr 80px;
    gap: 12px;
    align-items: center;
}
.status-key {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    color: #ffd700;
    letter-spacing: 0.05em;
}
.bar {
    display: block;
    height: 12px;
    background: #0f0f23;
    box-shadow: inset 0 0 0 2px #8b7355;
    overflow: hidden;
    position: relative;
}
.bar i {
    display: block;
    height: 100%;
    transition: width 0.6s ease-out;
}
.bar-hp i { background: linear-gradient(90deg, #ff6b6b, #ffd700); }
.bar-mp i { background: linear-gradient(90deg, #5dade2, #e0d8c0); }
.bar-xp i { background: linear-gradient(90deg, #2ecc71, #ffd700); }
.status-val {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: #e0d8c0;
    letter-spacing: 0.05em;
    text-align: right;
}
.footer-tag {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: #8b7355;
    letter-spacing: 0.1em;
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed #8b7355;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
    body { font-size: 16px; }
    .quest-log { padding: 40px 16px 64px; }
    .dialogue-box {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .portrait { margin: 0 auto; }
    .portrait-label { bottom: -18px; }
    .speaker-name { justify-content: center; }
    .dialogue-content { text-align: center; padding-right: 0; }
    .stat-row { justify-content: center; }
    .inventory-grid {
        grid-template-columns: repeat(4, 48px);
    }
    .status-block {
        grid-template-columns: 28px 1fr 72px;
        gap: 8px;
    }
    .game-title { letter-spacing: 0; }
}

@media (max-width: 380px) {
    .inventory-grid { grid-template-columns: repeat(3, 48px); }
    .entry-header { flex-direction: column; align-items: flex-start; }
}
