@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Be+Vietnam+Pro:wght@400;500;600&display=swap');

:root {
    --ink: #14171f;
    --ink-soft: #1d222d;
    --parchment: #efe7d8;
    --parchment-dim: #ded3bd;
    --cinnabar: #b23a2e;
    --brass: #b08d57;
    --jade: #5b8267;
    --muted-red: #9a5148;
    --line: rgba(239, 231, 216, 0.14);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--ink);
    color: var(--parchment);
    font-family: 'Be Vietnam Pro', sans-serif;
    line-height: 1.55;
}

body {
    padding: 48px 20px 80px;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    margin: 0 0 6px;
}

.eyebrow {
    color: var(--brass);
    font-size: 0.92rem;
    margin: 0 0 18px;
}

h1 {
    font-size: 2rem;
    line-height: 1.25;
}

.subtitle {
    color: var(--parchment-dim);
    margin: 10px 0 36px;
    max-width: 52ch;
}

form {
    display: grid;
    gap: 22px;
}

label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--parchment);
}

.hint {
    display: block;
    color: var(--parchment-dim);
    font-size: 0.83rem;
    margin-top: 6px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    background: var(--ink-soft);
    border: 1px solid var(--line);
    color: var(--parchment);
    padding: 12px 14px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 1rem;
}

textarea { resize: vertical; min-height: 80px; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

button {
    justify-self: start;
    background: var(--cinnabar);
    color: var(--parchment);
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 8px;
}

button:hover { background: #c74538; }

/* ---- Kết quả (đa góc nhìn) ---- */

.question-line {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: 1.15rem;
    margin: 4px 0 6px;
}

.meta-line {
    color: var(--parchment-dim);
    font-size: 0.88rem;
    margin: 0 0 24px;
}

.tally-strip {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tally-item {
    flex: 1;
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 10px;
    text-align: center;
}

.tally-item span:last-child {
    display: block;
    font-size: 0.8rem;
    color: var(--parchment-dim);
    margin-top: 2px;
}

.tally-num {
    font-family: 'Source Serif 4', serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.tally-thuan .tally-num { color: var(--jade); }
.tally-trung .tally-num { color: var(--brass); }
.tally-can .tally-num { color: var(--muted-red); }

.tally-note {
    color: var(--parchment-dim);
    font-size: 0.85rem;
    margin: 0 0 30px;
}

.divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 28px 0;
}

.model-block h2 {
    font-size: 1.15rem;
}

.model-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.lean-tag {
    flex: none;
    font-size: 0.82rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid currentColor;
    white-space: nowrap;
}

.lean-thuan { color: var(--jade); }
.lean-trung-binh { color: var(--brass); }
.lean-can-tro { color: var(--muted-red); }

.hex-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px;
}

.hexglyph {
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--brass);
    flex: none;
    line-height: 1;
    margin-top: 2px;
}

.hex-name {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    margin: 0 0 4px;
}

.hex-essence {
    margin: 0 0 6px;
    color: var(--parchment);
}

.hex-advice {
    margin: 0;
    color: var(--parchment-dim);
    font-size: 0.92rem;
}

.model-note {
    margin: 12px 0 0;
    color: var(--parchment-dim);
    font-size: 0.92rem;
}

.model-note-small {
    margin: 10px 0 0;
    color: var(--parchment-dim);
    font-size: 0.78rem;
    font-style: italic;
}

.tarot-cards {
    display: grid;
    gap: 12px;
}

.tarot-card {
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px 14px;
}

.tarot-pos {
    margin: 0 0 2px;
    color: var(--brass);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tarot-name {
    margin: 0 0 4px;
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
}

.tarot-meaning {
    margin: 0;
    color: var(--parchment-dim);
    font-size: 0.9rem;
}

.back-link {
    display: inline-block;
    margin-top: 34px;
    color: var(--brass);
    text-decoration: none;
    border-bottom: 1px solid var(--brass);
}

.footnote {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--parchment-dim);
    font-size: 0.82rem;
}

@media (max-width: 480px) {
    .grid-2 { grid-template-columns: 1fr; }
    .tally-strip { flex-direction: column; }
}
