:root {
    --paper: #fdfbf7;
    --paper-dark: #f0e6d2;
    --ink: #2c241b;
    --ink-light: #5d4e3c;
    --gold: #c5a059;
    --accent: #8b3a3a; /* Vintage Red */
    --success: #3a6b3a; /* Vintage Green */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: 'Lato', sans-serif; /* Body text */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Subtle paper noise texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Typography Overrides */
h1, h2, h3, .question-serif, .anecdote {
    font-family: 'Cormorant Garamond', serif;
}

.main-wrapper {
    width: 100%;
    max-width: 650px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Vintage Frame Container */
.container {
    background: rgba(253, 251, 247, 0.85);
    border: 1px solid var(--ink);
    padding: 40px 30px;
    box-shadow: 
        0 0 0 4px var(--paper), 
        0 0 0 5px var(--ink); /* Double border effect */
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Corner Ornaments (CSS only) */
.container::before, .container::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 1px solid var(--ink);
    transition: 0.3s;
}
.container::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.container::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* Language Switcher */
.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
    z-index: 10;
}
.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--ink-light);
    padding: 5px;
    transition: 0.3s;
}
.lang-btn.active { color: var(--accent); text-decoration: underline; }
.separator { color: var(--gold); }

/* Typography */
.title { font-size: 3.5rem; margin-bottom: 5px; letter-spacing: 2px; color: var(--ink); font-weight: 700; }
.subtitle { font-size: 1.2rem; color: var(--ink-light); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px;}
.ornament-line { height: 1px; background: var(--gold); width: 60px; margin: 10px auto; }
.ornament-small { font-size: 1.5rem; color: var(--gold); margin: 10px 0 20px; }

/* Anecdote Carousel */
.carousel-container {
    margin: 20px 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}
.carousel-content { width: 80%; }
.anecdote { font-style: italic; font-size: 1.3rem; color: var(--ink-light); line-height: 1.4; }
.nav-arrow {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gold);
    cursor: pointer;
    padding: 0 10px;
    transition: 0.2s;
}
.nav-arrow:hover { color: var(--accent); transform: scale(1.1); }

/* Inputs */
.input-group input {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 2px solid var(--ink-light);
    background: transparent;
    color: var(--ink);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    text-align: center;
    outline: none;
    transition: 0.3s;
}
.input-group input:focus { border-color: var(--accent); }
.input-group input::placeholder { color: var(--ink-light); opacity: 0.5; font-style: italic; }

/* Buttons */
.primary-btn {
    margin-top: 20px;
    padding: 12px 40px;
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}
.primary-btn:hover { background: var(--ink); color: var(--paper); }

/* Quiz UI */
.status-bar {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-serif { font-size: 1.8rem; line-height: 1.3; margin-bottom: 10px; font-weight: 600; }

.options-grid { display: flex; flex-direction: column; gap: 15px; }

.option-btn {
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: 'Cormorant Garamond', serif;
    transition: 0.3s;
    display: flex;
    align-items: center;
    position: relative;
}
.option-btn:hover { border-color: var(--gold); background: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.option-btn strong { margin-right: 10px; font-size: 1.3rem; color: var(--accent); }

/* Stamp Effect */
.stamp-mark {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    border: 3px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    transform: rotate(-5deg);
    opacity: 0; /* Hidden initially */
    mask-image: url("data:image/svg+xml,..."); /* Complex grunge mask could go here, simplified for now */
}

/* Responsive */
@media (max-width: 480px) {
    .container { padding: 20px; min-height: 100vh; border: none; box-shadow: none; justify-content: flex-start; padding-top: 60px;}
    .title { font-size: 2.8rem; }
    .anecdote { font-size: 1.1rem; }
}

.error-msg { color: var(--accent); font-style: italic; margin-top: 10px; }