:root {
    --bg-main: #0c0a15;
    --nav-bg: #130f1e;
    --card-bg: #1c1333;
    --card-bg-2: #2a1f42;
    --sheet-bg: #190c2e;

    --btn-yellow: #eab308;
    --gold: #facc15;
    --btn-pink: #d946ef;
    --btn-magenta-grad: linear-gradient(to right, #7e22ce, #db2777);
    --green: #10b981;
    --green-light: #4ade80;
    --orange: #f97316;
    --red: #ef4444;
    --red-light: #f87171;
    --sky: #38bdf8;

    --text-main: #ffffff;
    --text-soft: #e2e8f0;
    --text-muted: #9ca3af;

    --nav-height: 70px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base e sensação de app nativo ---------- */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    touch-action: pan-y;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html {
    overflow-x: hidden;
    background: var(--bg-main);
}

body {
    overflow-x: hidden;
    overflow-x: clip;
    min-height: 100dvh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
    font-family: inherit;
}

button, a, .nav-item {
    touch-action: manipulation;
}

button {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
}

[hidden] { display: none !important; }

/* ---------- Splash ---------- */

.splash {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: var(--bg-main);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash.hide {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.splash-title {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 2px;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
    animation: fadeIn 1s ease both;
}

.splash-sub {
    font-family: 'Playfair Display', serif;
    color: #a1a1aa;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    margin: 0 0 50px 0.5em;
    animation: fadeIn 1.5s ease both;
}

.splash-bar {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.splash-bar > div {
    width: 100%;
    height: 100%;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    transform-origin: left;
    animation: splashLoad 2.5s ease-in-out forwards;
}

/* ---------- Estrutura ---------- */

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
    opacity: 0;
    visibility: hidden;
    filter: blur(10px);
    transition: opacity 0.7s ease, filter 0.7s ease;
}

/* filter: none no fim — qualquer outro valor prende a barra fixa dentro do container */
.app-container.ready {
    opacity: 1;
    visibility: visible;
    filter: none;
}

.app-header {
    padding: calc(16px + var(--safe-top)) 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.header-content {
    min-width: 0;
    flex: 1;
}

.header-content .greeting {
    display: block;
    font-size: 1rem;
    font-weight: 400;
}

.header-content h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.header-back {
    display: flex;
    align-items: center;
    gap: 14px;
    animation: fadeIn 0.3s ease;
}

.icon-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
}

.icon-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.12);
}

.icon-btn svg { width: 22px; height: 22px; }

.header-back-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-back h1 {
    font-size: 1.2rem;
    line-height: 1.2;
}

.header-badge {
    flex-shrink: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.5);
    padding: 8px 14px;
    border-radius: 22px;
    color: var(--orange);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    animation: pulseTopBonus 1.5s infinite;
}

.header-badge svg { width: 16px; height: 16px; }

#app-main {
    padding: 0 20px calc(90px + var(--safe-bottom));
}

/* ---------- Barra inferior ---------- */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    transition: transform 0.15s, color 0.2s;
}

.nav-item:active { transform: scale(0.9); }
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: var(--btn-yellow); }
.nav-item.nav-bonus span { font-weight: 800; }
.nav-item.nav-bonus:not(.active) svg,
.nav-item.nav-bonus:not(.active) span { animation: blinkOrange 1.5s infinite; }

/* ---------- Botões ---------- */

.btn-menu {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
}

.btn-menu:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}

.btn-menu:disabled {
    opacity: 0.7;
    pointer-events: none;
}

.btn-menu svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.btn-lg {
    min-height: 62px;
    font-size: 1.05rem;
}

.btn-yellow {
    background-color: var(--btn-yellow);
    color: #000;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.35);
}

.btn-green {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-pink {
    background-color: var(--btn-pink);
    color: #fff;
}

.btn-gradient {
    background: var(--btn-magenta-grad);
    color: #fff;
}

.btn-purple {
    background: linear-gradient(135deg, #d946ef, #9333ea);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    animation: pulsePurple 2s infinite;
}

.btn-outline-red {
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
    box-shadow: none;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-install {
    background: rgba(250, 204, 21, 0.1);
    color: var(--gold);
    border: 1px solid rgba(250, 204, 21, 0.5);
    box-shadow: none;
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

/* Só aparece em localhost: botão cujo link ainda não foi preenchido */
.btn-pending {
    position: relative;
    opacity: 0.6;
    outline: 2px dashed rgba(255, 255, 255, 0.6);
    outline-offset: -5px;
    flex-wrap: wrap;
}

.btn-pending::after {
    content: attr(data-pending);
    flex-basis: 100%;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

/* ---------- Início ---------- */

.home-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 4px 0 20px;
    font-style: italic;
}

.progress-circle-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.progress-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid #2d1b4e;
    border-top-color: var(--btn-pink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: pulseRing 2.5s infinite alternate;
}

.circle-title {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
}

.circle-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.status-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    min-width: 0;
}

.status-card > svg {
    width: 24px;
    height: 24px;
    margin-bottom: 15px;
}

.status-card.is-editable {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.1), var(--card-bg));
    border: 1px solid rgba(219, 39, 119, 0.3);
    transition: transform 0.2s;
    color: inherit;
    font: inherit;
    width: 100%;
}

.status-card.is-editable:active { transform: scale(0.95); }

.status-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--btn-pink);
    opacity: 0.8;
}

.status-edit svg { width: 14px; height: 14px; }

.status-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 4px;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.status-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Instalação */
.install-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.4);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.install-card .install-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--gold);
    margin-top: 1px;
}

.install-card p { flex: 1; min-width: 0; }

.install-card .icon-btn {
    width: 44px;
    height: 44px;
    margin: -10px -10px -10px 0;
    background: none;
    border: none;
    color: var(--text-muted);
}

.install-card .icon-btn svg { width: 18px; height: 18px; }

.install-light {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
    text-align: left;
    margin-bottom: 18px;
}

.install-light .install-icon { color: #b45309; }

/* Linha do tempo */
.timeline-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
    scroll-margin-top: 10px;
}

.timeline-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    text-align: center;
}

.timeline-intro strong {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px rgba(250, 204, 21, 0.5);
}

.timeline-intro .scroll-hand {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.6));
    animation: swipeGestureCentral 2s infinite ease-in-out;
}

.timeline-tip {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin: -5px 0 5px;
}

.phase {
    --phase-color: var(--green-light);
    --phase-glow: rgba(74, 222, 128, 0.4);
    --phase-band: rgba(74, 222, 128, 0.3);
    text-align: center;
    margin: 30px 0 10px;
}

.phase-1 {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.phase-2 {
    --phase-color: var(--orange);
    --phase-glow: rgba(249, 115, 22, 0.4);
    --phase-band: rgba(249, 115, 22, 0.4);
}

.phase-3 {
    --phase-color: var(--gold);
    --phase-glow: rgba(250, 204, 21, 0.4);
    --phase-band: rgba(217, 70, 239, 0.4);
}

.phase-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--phase-color);
}

.phase-title svg {
    width: 24px;
    height: 24px;
    fill: var(--phase-color);
}

.phase-title h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    line-height: 1.1;
    text-shadow: 0 0 15px var(--phase-glow);
}

.phase-band {
    display: inline-block;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(90deg, transparent, var(--phase-band), transparent);
    padding: 5px 20px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.phase-text {
    color: #cbd5e1;
    font-size: 0.88rem;
    margin-top: 12px;
    padding: 0 6px;
    line-height: 1.55;
}

.phase-text strong { color: #fff; }

.phase-tip {
    margin-top: 15px;
    padding: 12px;
    background: rgba(250, 204, 21, 0.1);
    border-left: 3px solid var(--gold);
    text-align: left;
    border-radius: 0 8px 8px 0;
}

.phase-tip h4 {
    color: var(--gold);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.phase-tip p {
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.5;
}

.day-card {
    border-radius: 16px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    transition: background 0.3s, border-color 0.3s, opacity 0.3s;
}

.day-card.is-current {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.15), var(--card-bg));
    border: 1px solid rgba(219, 39, 119, 0.7);
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.25);
}

.day-card.is-done {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.day-card.is-done .day-head { opacity: 0.8; }

.day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.day-id {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.day-num {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
}

.is-current .day-num { color: var(--btn-yellow); }

.day-id h4 {
    font-size: 1.1rem;
    line-height: 1.2;
}

.day-status {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.is-current .day-status { font-weight: 600; color: #f9a8d4; }
.is-done .day-status { color: #6ee7b7; }

.day-check {
    flex-shrink: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 0 16px;
    border-radius: 22px;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    transition: transform 0.15s;
}

.day-check:active { transform: scale(0.92); }
.day-check svg { width: 14px; height: 14px; }
.is-current .day-check { background: var(--btn-pink); color: #fff; box-shadow: 0 4px 10px rgba(217, 70, 239, 0.3); }
.is-done .day-check { background: var(--green); color: #fff; }

.day-recipes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.day-recipe {
    width: 100%;
    min-height: 52px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: transform 0.15s, background 0.15s;
}

.day-recipe:active {
    transform: scale(0.98);
    background: rgba(0, 0, 0, 0.45);
}

.day-recipe-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.day-recipe-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
}

.day-recipe-open {
    display: block;
    font-size: 0.7rem;
    color: var(--btn-yellow);
    font-weight: 600;
    margin-top: 2px;
}

.home-final {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

/* ---------- Recetas ---------- */

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    min-height: 48px;
    background: var(--card-bg-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    padding: 12px 15px 12px 44px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.search-input:focus { border-color: rgba(217, 70, 239, 0.6); }
.search-input::placeholder { color: #8b85a0; }

.category-chips-container {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    margin: 0 -20px 18px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}

.category-chips-container::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 22px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.25s, color 0.25s;
}

.category-chip.active {
    background: linear-gradient(135deg, hsl(340, 65%, 55%), hsl(350, 70%, 60%));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
}

.recipes-count {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-bottom: 20px;
}

@media (max-width: 339px) {
    .recipes-grid { grid-template-columns: 1fr; }
}

.recipe-card-new {
    background: var(--card-bg-2);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.recipe-card-new:active { transform: scale(0.96); }

.recipe-emoji-bg {
    height: 90px;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.4), rgba(126, 34, 206, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recipe-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.r-title {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.r-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.r-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.r-meta svg { width: 12px; height: 12px; }

.r-day {
    color: #f0abfc;
    font-weight: 700;
}

.empty-state {
    grid-column: 1 / -1;
    color: #a1a1aa;
    text-align: center;
    padding: 30px 0;
}

/* ---------- Painel da receita ---------- */

.sheet-overlay {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sheet-overlay.show {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90dvh;
    background: var(--sheet-bg);
    border-radius: 25px 25px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 22px 20px calc(24px + var(--safe-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.sheet-overlay.show .bottom-sheet { transform: translateY(0); }

.sheet-drag-handle {
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto 16px;
}

.sheet-back {
    position: absolute;
    top: 12px;
    left: 12px;
}

.sheet-emoji {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.sheet-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    line-height: 1.25;
    text-align: center;
    margin-bottom: 15px;
    overflow-wrap: anywhere;
}

.sheet-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge svg { width: 14px; height: 14px; }

.badge-day {
    background: linear-gradient(135deg, hsl(330, 80%, 55%), hsl(270, 91%, 65%));
    color: #fff;
    font-weight: 700;
}

.sheet-desc {
    color: #c4c4cf;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: center;
    margin-bottom: 20px;
}

.sheet-box {
    background: var(--card-bg-2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.box-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.sheet-box p,
.sheet-box li {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

.sheet-box ul,
.sheet-box ol {
    list-style: none;
}

.sheet-box ul li {
    position: relative;
    padding-left: 16px;
}

.sheet-box ul li::before {
    content: '•';
    position: absolute;
    left: 2px;
    color: inherit;
    opacity: 0.7;
}

.sheet-box ol li + li { margin-top: 6px; }

.box-schedule { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.4); }
.box-schedule .box-label { color: var(--green); }
.box-schedule p { font-weight: 600; }
.box-shopping { background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.4); }
.box-shopping .box-label { color: var(--sky); }
.label-pink { color: var(--btn-pink); }
.label-gold { color: var(--gold); }

.btn-boost {
    margin-top: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* ---------- Bonos ---------- */

.bonus-title {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #f97316 0%, #facc15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.bonus-lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.bonus-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

.bonus-card {
    --accent: var(--green-light);
    --accent-rgb: 74, 222, 128;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s;
}

.bonus-card:active { transform: scale(0.98); }

.bonus-card.red {
    --accent: var(--red-light);
    --accent-rgb: 248, 113, 113;
}

.bonus-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.bonus-card > svg {
    width: 36px;
    height: 36px;
    color: var(--accent);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.5));
}

.bonus-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.bonus-card p {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.45;
    margin-bottom: 20px;
}

.bonus-open {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.5);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bonus-open svg { width: 18px; height: 18px; }

.bonus-detail { padding-bottom: 20px; }

.bonus-detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.bonus-detail-head h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--accent);
}

.bonus-detail.green { --accent: var(--green-light); --accent-rgb: 74, 222, 128; }
.bonus-detail.red { --accent: var(--red-light); --accent-rgb: 248, 113, 113; }

.bonus-intro {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 25px;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.bonus-intro strong { color: #fff; }

.bonus-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    line-height: 1.25;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bonus-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.bonus-recipe {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bonus-recipe h3 {
    color: var(--accent);
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 8px;
}

.bonus-recipe > p {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.bonus-how {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
}

.bonus-how strong {
    color: var(--text-soft);
    font-size: 0.88rem;
    display: block;
    margin-bottom: 5px;
}

.bonus-how ul {
    color: #a3adbd;
    font-size: 0.88rem;
    line-height: 1.55;
    padding-left: 18px;
}

.bonus-how li + li { margin-top: 4px; }

.bonus-section-title.spaced { margin-top: 25px; }

.bonus-tip {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bonus-tip strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.bonus-tip p {
    color: #a3adbd;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ---------- Perfil ---------- */

.profile-header-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--btn-magenta-grad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
}

.profile-header-card h2 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.profile-header-card span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.profile-stat {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-stat span:first-child {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.profile-stat span:last-child {
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.logout-btn {
    width: 100%;
    min-height: 52px;
    background: rgba(239, 68, 68, 0.06);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--red);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    transition: transform 0.15s;
}

.logout-btn:active { transform: scale(0.98); }
.logout-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Janelas ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    margin: auto;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-light {
    background: #fff;
    color: #1f2937;
}

.modal-dark {
    background: var(--sheet-bg);
    border: 1px solid rgba(217, 70, 239, 0.25);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(217, 70, 239, 0.06);
    color: #fff;
}

.inst-title {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.inst-text {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.inst-highlight {
    background: #fef3c7;
    color: #92400e;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid #fde68a;
}

.quiz-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.field span {
    display: block;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 5px 4px;
}

.field input,
.dialog-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid rgba(234, 179, 8, 0.5);
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 600;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    -webkit-appearance: none;
    appearance: none;
}

.field input::placeholder,
.dialog-input::placeholder { color: rgba(15, 23, 42, 0.4); }

.field input:focus,
.dialog-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    animation: shake 0.35s ease;
}

.quiz-form .btn-menu {
    margin: 6px 0 0;
}

/* Janela genérica */
.dialog-emoji {
    font-size: 2.6rem;
    margin-bottom: 6px;
}

.dialog-title {
    color: var(--gold);
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 10px;
}

.dialog-text {
    color: #d4d4dc;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 18px;
}

.dialog-input {
    margin-bottom: 18px;
    text-align: center;
}

.dialog-actions .btn-menu:last-child { margin-bottom: 0; }

/* Carregamento */
.loading-overlay {
    background: var(--bg-main);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: 11000;
}

.loading-box {
    margin: auto;
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(250, 204, 21, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 10px;
}

.loading-subtext {
    color: #a1a1aa;
    font-size: 0.9rem;
}

.loading-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 30px;
    overflow: hidden;
}

#loading-bar {
    width: 0%;
    height: 100%;
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.final-access {
    margin-top: 35px;
    animation: fadeIn 0.8s ease-out both;
}

/* Aviso rápido */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-height) + var(--safe-bottom) + 14px);
    transform: translate(-50%, 20px);
    width: max-content;
    max-width: calc(100% - 32px);
    background: #2a1f42;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 30000;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Fundo estrelado ---------- */

.particles-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #150f24 0%, #0c0a15 100%);
}

.particle {
    position: absolute;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) ease-in-out infinite alternate;
}

/* ---------- Animações ---------- */

.view-animate > * {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.view-animate > *:nth-child(2) { animation-delay: 0.05s; }
.view-animate > *:nth-child(3) { animation-delay: 0.1s; }
.view-animate > *:nth-child(4) { animation-delay: 0.15s; }
.view-animate > *:nth-child(5) { animation-delay: 0.2s; }
.view-animate > *:nth-child(n+6) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes splashLoad {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@keyframes pulseRing {
    from { box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(217, 70, 239, 0.1); }
    to { box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(217, 70, 239, 0.4); }
}

@keyframes pulsePurple {
    0%, 100% { box-shadow: 0 0 10px rgba(217, 70, 239, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 25px rgba(217, 70, 239, 1); transform: scale(1.03); }
}

@keyframes pulseTopBonus {
    0%, 100% { transform: scale(1); box-shadow: 0 0 5px rgba(249, 115, 22, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px rgba(249, 115, 22, 0.8); }
}

@keyframes blinkOrange {
    0%, 100% { color: #f97316; filter: drop-shadow(0 0 2px rgba(249, 115, 22, 0.4)); }
    50% { color: #fed7aa; filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.9)); }
}

@keyframes swipeGestureCentral {
    0% { transform: translateY(-10px); opacity: 0; }
    30% { opacity: 1; }
    70% { transform: translateY(15px); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

@keyframes twinkle {
    0% { opacity: 0.1; transform: scale(0.5); }
    100% { opacity: 0.8; transform: scale(1.5); box-shadow: 0 0 10px #facc15, 0 0 20px #db2777; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* O botão roxo pulsa depois de entrar na tela */
.view-animate > .btn-purple {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both, pulsePurple 2s 0.6s infinite;
}
