html, body {
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at top, #fff8ef 0%, #f7efe4 42%, #efe4d4 100%);
    color: #4d3b2f;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
}

.page-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 20px 60px;
}

.main-card {
    background: rgba(255, 252, 247, 0.94);
    border: 1px solid #eadcc7;
    border-radius: 22px;
    box-shadow: 0 12px 40px rgba(104, 78, 53, 0.10);
    padding: 34px 28px 30px;
}

.hero {
    text-align: center;
    margin-bottom: 28px;
}

.hero h1 {
    margin: 0 0 10px;
    color: #5b4030;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.7rem;
    font-weight: normal;
    line-height: 1.2;
}

.tagline {
    margin: 0;
    color: #7b6350;
    font-size: 1.02rem;
}

.hero-user-row {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(255, 248, 239, 0.72);
    border: 1px solid #ead7b8;
    border-radius: 14px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.hero-user-text {
    color: #8a6e57;
    font-size: 0.94rem;
}

.hero-user-text strong {
    color: #6b4a32;
}

.hero-user-email {
    color: #9b8068;
    font-size: 0.9rem;
}

.logout-inline {
    margin-top: 4px;
}

.logout-link {
    background: none;
    border: none;
    color: #a07c4f;
    cursor: pointer;
    font-size: 0.92rem;
    padding: 0;
    text-decoration: underline;
}

.logout-link:hover {
    color: #7a5a3a;
}

.ask-form {
    margin-bottom: 26px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.question-stack {
    display: block;
}

.question-label {
    display: block;
    margin: 0 0 8px;
    color: #6a5241;
    font-size: 0.95rem;
    font-weight: bold;
}

.question-stack textarea,
.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="email"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row select,
.stacked-row input[type="text"],
.stacked-row input[type="password"],
.stacked-row input[type="email"],
.stacked-row input[type="date"],
.stacked-row input[type="time"],
.stacked-row select {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: #fffdf9;
    border: 1px solid #dbc7aa;
    border-radius: 14px;
    color: #4d3b2f;
    font-size: 1rem;
    padding: 15px 16px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.question-stack textarea {
    min-height: 170px;
    resize: vertical;
    line-height: 1.6;
}


.stacked-row select,
.form-row select {
    appearance: auto;
}

.question-stack textarea:focus,
.form-row input[type="text"]:focus,
.form-row input[type="password"]:focus,
.form-row input[type="email"]:focus,
.form-row input[type="date"]:focus,
.form-row input[type="time"]:focus,
.form-row select:focus,
.stacked-row input[type="text"]:focus,
.stacked-row input[type="password"]:focus,
.stacked-row input[type="email"]:focus,
.stacked-row input[type="date"]:focus,
.stacked-row input[type="time"]:focus,
.stacked-row select:focus {
    border-color: #caa35d;
    box-shadow: 0 0 0 4px rgba(202, 163, 93, 0.15);
}

.question-note {
    margin-top: 8px;
    color: #8d725f;
    font-size: 0.88rem;
}

.question-actions {
    margin-top: 14px;
}

.form-row button,
.question-actions button,
.full-button,
.auth-switch-button {
    background: linear-gradient(180deg, #d8ba73 0%, #caa35d 100%);
    border: none;
    border-radius: 14px;
    color: #fffdf8;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 15px 22px;
    box-shadow: 0 6px 16px rgba(150, 112, 43, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.form-row button:hover,
.question-actions button:hover,
.full-button:hover,
.auth-switch-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(150, 112, 43, 0.22);
}

.form-row button:active,
.question-actions button:active,
.full-button:active,
.auth-switch-button:active {
    transform: translateY(0);
}

.response-card,
.error-card {
    margin-top: 24px;
    border-radius: 18px;
    padding: 24px 22px;
}

.response-card {
    background: linear-gradient(180deg, #fffaf4 0%, #fff6ed 100%);
    border: 1px solid #ecd9bd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.response-card h2 {
    margin: 0 0 16px;
    color: #7a5a3a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: normal;
    line-height: 1.3;
}

.response-text {
    color: #4c3b31;
    font-size: 1.04rem;
    white-space: normal;
}

.response-text p {
    margin: 0 0 14px;
}

.response-text p:last-child {
    margin-bottom: 0;
}

.angel-section-heading {
    margin: 18px 0 10px;
    color: #6d523f;
    font-size: 1rem;
    font-weight: bold;
}

.response-text strong {
    color: #614432;
    font-weight: bold;
}

.access-card {
    text-align: center;
}

.access-text {
    margin: 0 0 18px;
    color: #6f5a49;
}

.auth-switcher {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-switch-form {
    margin: 0;
}

.auth-switch-button {
    min-width: 150px;
    padding: 12px 18px;
}

.auth-switch-button.is-active {
    background: linear-gradient(180deg, #c89d4f 0%, #b4873a 100%);
}

.stacked-form {
    max-width: 540px;
    margin: 0 auto;
    text-align: left;
}

.stacked-row {
    margin-bottom: 16px;
}

.stacked-row label {
    display: block;
    margin-bottom: 6px;
    color: #6a5241;
    font-size: 0.95rem;
    font-weight: bold;
}

.form-divider {
    position: relative;
    margin: 26px 0 18px;
    text-align: center;
}

.form-divider:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #e8d8c3;
}

.form-divider span {
    position: relative;
    display: inline-block;
    padding: 0 14px;
    background: #fff8f1;
    color: #92735a;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.02em;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #7a634f;
    font-size: 0.93rem;
    font-weight: normal !important;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #c89d4f;
}

.full-button {
    display: block;
    width: 100%;
}

.inline-error,
.inline-success {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
}

.inline-error {
    background: #fff1ee;
    border: 1px solid #e4b1a8;
    color: #8a3f35;
}

.inline-success {
    background: #eef8ef;
    border: 1px solid #bfd9c0;
    color: #46664a;
}

.error-card {
    background: #fff4f1;
    border: 1px solid #e7b9ae;
}

.error-card h2 {
    margin: 0 0 12px;
    color: #8a3f35;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: normal;
}

.error-card pre {
    margin: 0;
    color: #6b342d;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.version-tag {
    margin-top: 24px;
    text-align: center;
    font-size: 0.75rem;
    color: #b9a48c;
    opacity: 0.7;
}

.tarot-card {
    background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
    border: 1px solid #ead1dd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tarot-kicker {
    margin-bottom: 10px;
    color: #9a6a84;
    font-size: 0.84rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tarot-text {
    color: #563d48;
}

@media (max-width: 700px) {
    .page-wrap {
        padding: 24px 14px 36px;
    }

    .main-card {
        padding: 24px 18px 22px;
        border-radius: 18px;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .form-row,
    .auth-switcher {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row button,
    .auth-switch-button,
    .question-actions button {
        width: 100%;
    }
}

/* ---------- ASTROLOGY ---------- */

.astrology-card {
    background: linear-gradient(180deg, #f8f5ff 0%, #f1ecff 100%);
    border: 1px solid #d8c9ee;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.astrology-card h2 {
    color: #6f5a97;
}

.astrology-kicker {
    margin-bottom: 8px;
    color: #8b76ad;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.astrology-text strong {
    color: #6f5a97;
}

/* ---------- Tarot Card Images ---------- */
.tarot-card-reading {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin: 22px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(232, 200, 216, 0.72);
    border-radius: 18px;
}

.tarot-card-image-wrap {
    display: flex;
    justify-content: center;
}

.tarot-card-image {
    width: 112px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(120, 82, 99, 0.22);
    box-shadow: 0 10px 24px rgba(95, 61, 78, 0.18);
    background: #fffaf4;
}

.tarot-card-meaning .angel-section-heading {
    margin-top: 0;
    color: #8a5370;
}

.tarot-card-meaning p:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .tarot-card-reading {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .tarot-card-image {
        width: 140px;
    }
}


.logout-inline {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.profile-link,
.logout-link {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

/* ---------- Password Reset ---------- */
.auth-small-link {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.94rem;
}

.auth-small-link a {
    color: #a07c4f;
    text-decoration: underline;
}

.auth-small-link a:hover {
    color: #7a5a3a;
}

/* ---------- Profile Link ---------- */
.hero-user-actions {
    margin-top: 8px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    align-items: center;
    line-height: 1.2;
}

.hero-action-separator {
    color: #b9a48c;
    font-size: 0.95rem;
    line-height: 1;
}

.profile-link {
    color: #a07c4f;
    font-size: 0.92rem;
    text-decoration: underline;
}

.profile-link:hover {
    color: #7a5a3a;
}

.profile-card {
    text-align: center;
}

/* Thinking / submit feedback */
.thinking-banner {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 13px 15px;
    background: #fff8ef;
    border: 1px solid #ead7b8;
    border-radius: 14px;
    color: #7a5a3a;
    font-size: 0.98rem;
}

.thinking-banner.is-visible {
    display: flex;
}

.thinking-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: #caa35d;
    border-radius: 50%;
    opacity: 0.45;
    animation: pamPulse 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.18s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes pamPulse {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

body.is-waiting,
body.is-waiting * {
    cursor: wait !important;
}

#pamAskButton:disabled {
    opacity: 0.78;
    cursor: wait;
}
