/* ═══════════════════════════════════════════════════════════════════════
   Quick Actions (updated for 4 items)
   ═══════════════════════════════════════════════════════════════════════ */
.db-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1.25rem 0;
}


/* ═══════════════════════════════════════════════════════════════════════
   Crystal Totem
   ═══════════════════════════════════════════════════════════════════════ */
.db-card--totem {
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.9) 0%, rgba(30, 20, 50, 0.85) 100%);
    border: 1px solid rgba(212, 175, 55, 0.12);
    overflow: visible;
}

.totem__subtitle {
    font-size: 0.95rem;
    color: var(--color-text-3);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ── Crystal grid ── */
.totem__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 1024px) {
    .totem__grid { grid-template-columns: repeat(2, 1fr); }
}

.totem__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.totem__item:hover, .totem__item:active {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 8px 30px rgba(var(--crystal-color-rgb, 107, 76, 154), 0.15),
                0 0 20px var(--crystal-color, rgba(107, 76, 154, 0.2));
}

/* ── Crystal image ── */
.totem__img-wrap {
    width: 100px;
    height: 100px;
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.totem__img-wrap::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--crystal-color, rgba(107, 76, 154, 0.15)) 0%, transparent 70%);
    opacity: 0.4;
    z-index: 0;
    animation: totemGlow 4s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}
.totem__crystal-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    animation: totemFloat 5s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes totemFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes totemGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* ── Labels ── */
.totem__role {
    font-family: var(--font-display);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.25rem;
}
.totem__name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.15rem;
    line-height: 1.3;
}
.totem__role-desc {
    font-size: 0.75rem;
    color: var(--color-text-3);
    line-height: 1.3;
}

/* ── Daily crystal focus ── */
.totem__daily {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}
.totem__daily-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.totem__daily-icon-img {
    width: 22px; height: 22px; object-fit: contain; border-radius: 50%;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.3));
}
.totem__daily-label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
}
.totem__daily-crystal {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}
.totem__daily-msg {
    font-size: 0.9rem;
    color: var(--color-text-2);
    line-height: 1.55;
}

/* ── Empty state ── */
.totem__empty {
    text-align: center;
    padding: 1rem 0;
}
.totem__empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}
.totem__empty h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}
.totem__empty p {
    font-size: 0.95rem;
    color: var(--color-text-3);
    line-height: 1.55;
}


/* ═══════════════════════════════════════════════════════════════════════
   Crystal Totem Modal
   ═══════════════════════════════════════════════════════════════════════ */
.totem-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1.25rem;
}
.totem-modal--open { opacity: 1; }

.totem-modal__content {
    background: linear-gradient(160deg, rgba(25, 20, 45, 0.98) 0%, rgba(15, 12, 30, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.totem-modal--open .totem-modal__content {
    transform: translateY(0) scale(1);
}

.totem-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    color: var(--color-text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s, color 0.2s;
}
.totem-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.totem-modal__img-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.totem-modal__img-wrap .totem__crystal-img {
    width: 150px;
    height: 150px;
}

.totem-modal__role {
    font-family: var(--font-display);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.25rem;
}
.totem-modal__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.totem-modal__role-desc {
    font-size: 0.8rem;
    color: var(--color-text-3);
    margin-bottom: 1rem;
}
.totem-modal__desc {
    font-size: 1rem;
    color: var(--color-text-2);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.totem-modal__guidance {
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: var(--radius-sm);
    padding: 1rem;
}
.totem-modal__guidance-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.4rem;
}
.totem-modal__guidance p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.55;
    font-style: italic;
}


