
:root {
    --leather-deep: #1c130d;
    --leather: #2a1c13;
    --parchment: #ece0c4;
    --parchment-dim: #ddcfa8;
    --parchment-shadow: #c9b98c;
    --ink: #2c2115;
    --ink-soft: #4a3b28;
    --gold: #a9782f;
    --gold-bright: #c99a44;
    --gold-dim: #8a6526;
    --wine: #5c1f1f;
    --wine-bright: #7a2b2b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    background-color: var(--leather-deep);
    background-image:
        radial-gradient(ellipse at 20% 15%, rgba(90, 60, 30, 0.35), transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(70, 45, 20, 0.3), transparent 55%),
        radial-gradient(circle at center, var(--leather) 0%, var(--leather-deep) 100%);
    color: var(--parchment);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px 20px;
    margin: 0;
    min-height: 100vh;
}

header {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    margin-bottom: 28px;
    position: relative;
}

h1 {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-weight: 700;
    font-size: 2.6em;
    letter-spacing: 0.04em;
    color: var(--gold-bright);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 24px rgba(169, 120, 47, 0.25);
    margin: 0 0 14px;
}

header::before {
    content: "\2756";
    display: block;
    color: var(--gold-bright);
    font-size: 0.9em;
    margin-bottom: 6px;
}

header::after {
    content: "";
    display: block;
    width: 220px;
    height: 1px;
    margin: 14px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
}

.system-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.82em;
    letter-spacing: 0.03em;
}

.system-link {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--gold-dim);
    color: var(--parchment-shadow);
    text-decoration: none;
}

.system-link.active {
    background-color: var(--gold-dim);
    color: var(--leather-deep);
    border-color: var(--gold-bright);
}

.system-link.disabled {
    color: var(--parchment-shadow);
    font-style: italic;
    border-style: dashed;
    opacity: 0.7;
}

h3 {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto -2px;
    position: relative;
}

.tab-btn {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1em;
    letter-spacing: 0.04em;
    padding: 12px 30px 15px;
    background-color: var(--parchment-dim);
    color: var(--wine);
    border: 2px solid var(--gold-dim);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    position: relative;
    top: 3px;
    z-index: 1;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.3);
    transition: top 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
    color: var(--gold-bright);
}

.tab-btn.active {
    background-color: var(--parchment);
    color: var(--wine);
    border-color: var(--gold);
    top: 0;
    z-index: 3;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

main {
    z-index: 2;
    background-color: var(--parchment);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(150, 120, 70, 0.12), transparent 22%),
        radial-gradient(circle at 88% 12%, rgba(120, 90, 50, 0.10), transparent 25%),
        radial-gradient(circle at 25% 85%, rgba(140, 110, 65, 0.10), transparent 28%),
        radial-gradient(circle at 92% 90%, rgba(120, 90, 50, 0.12), transparent 24%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='2' y='2' width='12' height='12' fill='%23a9782f' transform='rotate(45 8 8)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='2' y='2' width='12' height='12' fill='%23a9782f' transform='rotate(45 8 8)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='2' y='2' width='12' height='12' fill='%23a9782f' transform='rotate(45 8 8)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='2' y='2' width='12' height='12' fill='%23a9782f' transform='rotate(45 8 8)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position:
        0 0, 0 0, 0 0, 0 0,
        14px 14px, right 14px top 14px, left 14px bottom 14px, right 14px bottom 14px;
    padding: 34px;
    border: 2px solid var(--gold);
    box-shadow:
        0 0 0 7px var(--parchment),
        0 0 0 9px var(--gold-dim),
        0 18px 50px rgba(0, 0, 0, 0.55);
    width: 95%;
    max-width: 1200px;
    text-align: center;
    color: var(--ink);
    position: relative;
}

.content-container {
    display: flex;
    gap: 24px;
}

.left-column {
    flex: 1.1;
    border-right: 3px double var(--gold);
    padding-right: 22px;
    text-align: left;
}

.right-column {
    flex: 1;
    text-align: left;
    padding-left: 4px;
    border-right: 3px double var(--gold);
    padding-right: 22px;
}

.visuals-column {
    flex: 1;
    text-align: left;
    padding-left: 4px;
}

.column-heading {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gold-dim);
}

.column-heading::before {
    content: "\2756  ";
    color: var(--gold);
    font-size: 0.7em;
}

.input-section {
    margin-bottom: 22px;
}

.input-section h3 {
    margin-bottom: 2px;
    font-size: 1.15em;
}

.input-section h3::before {
    content: "\2756  ";
    color: var(--gold);
    font-size: 0.7em;
}

.input-section > p {
    margin-top: 4px;
    color: var(--ink-soft);
    font-style: italic;
}

.dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    font-family: 'EB Garamond', Georgia, serif;
    padding: 10px 34px 10px 12px;
    border: 1px solid var(--ink-soft);
    border-radius: 2px;
    width: 100%;
    background-color: var(--parchment-dim);
    color: var(--ink);
    font-size: 1.05em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0 L5 6 L10 0 Z' fill='%235c1f1f'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 2px rgba(92, 31, 31, 0.25);
}

.questions-section {
    min-height: 100px;
    border-top: 3px double var(--gold);
    padding-top: 20px;
}

.question-group {
    margin-bottom: 18px;
}

.question-group h3 {
    margin-bottom: 5px;
    font-size: 1.2em;
    color: var(--wine);
}

.question-group p {
    color: var(--ink-soft);
    font-style: italic;
    margin: 4px 0 6px;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ink-soft);
    border-radius: 2px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05em;
    background-color: var(--parchment-dim);
    color: var(--ink);
    box-shadow: inset 0 1px 3px rgba(44, 33, 21, 0.2);
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: inset 0 1px 3px rgba(44, 33, 21, 0.2), 0 0 0 2px rgba(92, 31, 31, 0.2);
}

#character-name-input {
    display: block;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    font-family: 'Cinzel', Georgia, serif;
    padding: 14px;
    margin: 0 auto 32px;
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    background-color: var(--parchment-dim);
    color: var(--ink);
    font-size: 1.35em;
    letter-spacing: 0.03em;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(44, 33, 21, 0.15);
}

#character-name-input:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 2px rgba(92, 31, 31, 0.2);
}

.output-section {
    margin-top: 0;
    text-align: center;
}

#download-btn {
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 0.03em;
    padding: 13px 20px;
    background: linear-gradient(180deg, var(--wine-bright), var(--wine));
    color: var(--parchment);
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    cursor: pointer;
    font-size: 1.05em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    margin-bottom: 20px;
    display: block;
    width: 100%;
    text-align: center;
}

#download-btn:hover {
    background: linear-gradient(180deg, #8a3737, var(--wine-bright));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 12px rgba(169, 120, 47, 0.5);
}

#download-btn:active {
    transform: translateY(1px);
}

#character-output {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05em;
    line-height: 1.65;
    text-align: left;
    color: var(--ink);
}

#character-output strong {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 600;
    color: var(--wine);
}

.load-section {
    margin-top: 26px;
    text-align: center;
}

.load-section hr {
    border: none;
    border-top: 3px double var(--gold);
    margin: 26px 0;
}

.load-section input[type="file"] {
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--ink-soft);
}

.coming-soon {
    padding: 60px 34px;
}

.coming-soon h3 {
    font-size: 1.6em;
    margin-bottom: 14px;
}

.coming-soon p {
    max-width: 560px;
    margin: 0 auto 28px;
    color: var(--ink-soft);
    font-style: italic;
}

.cta-btn {
    display: inline-block;
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 0.03em;
    padding: 13px 28px;
    background: linear-gradient(180deg, var(--wine-bright), var(--wine));
    color: var(--parchment);
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
    background: linear-gradient(180deg, #8a3737, var(--wine-bright));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 12px rgba(169, 120, 47, 0.5);
}

.attribution {
    text-align: center;
    max-width: 700px;
    margin: 24px auto 0;
    color: var(--parchment-shadow);
    font-style: italic;
    font-size: 0.9em;
    padding-top: 16px;
    border-top: 1px solid var(--gold-dim);
}

.attribution h3 {
    color: var(--gold-bright);
    font-style: normal;
}

@media (max-width: 1024px) {
    .content-container {
        flex-direction: column;
    }
    .left-column {
        border-right: none;
        border-bottom: 3px double var(--gold);
        padding-right: 0;
        padding-bottom: 20px;
    }
    .right-column {
        padding-left: 0;
        padding-top: 20px;
        border-right: none;
        border-bottom: 3px double var(--gold);
        padding-right: 0;
        padding-bottom: 20px;
    }
    .visuals-column {
        padding-left: 0;
        padding-top: 20px;
    }
}