html {
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-color: #0d1117;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-active: #ffffff;
    --text-muted: #8b949e;
    --good-color: #ffd700;
    --bad-color: #ff4d4d;
    --good-glow: rgba(255, 215, 0, 0.5);
    --bad-glow: rgba(255, 77, 77, 0.5);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-active);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 4.5rem 0 3rem;
    min-height: 100vh;
    min-height: 100dvh;
    /* Add a subtle background gradient */
    background: radial-gradient(circle at top right, #1a202c, #0d1117);
}

.container {
    display: flex;
    gap: 3rem;
    width: 90%;
    max-width: 900px;
}

/* Glassmorphism Card Style */
.portion {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    isolation: isolate;
}

.portion:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.portion-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-active);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.stars-container {
    display: flex;
    gap: 3rem;
}

/* Star Button & Animations */
.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.star-icon {
    width: 80px;
    height: 80px;
    transition: filter 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Good Star Styling */
.star-good {
    color: var(--text-muted);
}

.star-good:hover .star-icon {
    color: var(--good-color);
    transform: scale(1.2);
    filter: drop-shadow(0 0 25px var(--good-glow));
}

/* Bad Star Styling */
.star-bad {
    color: var(--text-muted);
}

.star-bad:hover .star-icon {
    color: var(--good-color);
    transform: scale(1.2);
    filter: drop-shadow(0 0 25px var(--good-glow));
}

/* Deed Count Styling */
.deed-count {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: -2px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.star-good:hover .deed-count {
    color: var(--good-color);
    text-shadow: 0 0 15px var(--good-glow);
    transform: scale(1.1);
}

.star-bad:hover .deed-count {
    color: var(--good-color);
    text-shadow: 0 0 15px var(--good-glow);
    transform: scale(1.1);
}

/* Star Label (Replaces Tooltip) */
.star-btn {
    flex-direction: column;
    gap: 8px;
}

.star-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.star-good:hover .star-label {
    color: var(--good-color);
}

.star-bad:hover .star-label {
    color: var(--good-color);
}

/* Container Approval State */
.container {
    display: none;
    /* Hidden by default until JS confirms approval */
    gap: 1.75rem;
    width: 90%;
    max-width: 1100px;
}

.container.approved {
    /* Shown when JS adds this class */
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    justify-items: stretch;
}

#portions-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( 320px, 1fr ) );
    gap: 1.75rem;
    align-items: stretch;
}

/* View-only banner */
.view-only-banner {
    flex-basis: 100%;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: #93c5fd;
    text-align: center;
}

/* Disable all action buttons in view-only mode */
.container.view-only .star-btn,
.container.view-only .ra-undo-btn,
.container.view-only .ra-redo-btn {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}

/* Previous Month Banner */
.prev-month-banner {
    flex-basis: 100%;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.25rem 2rem;
}

.prev-month-banner.visible {
    display: flex;
}

.pmb-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex-shrink: 0;
}

.pmb-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.pmb-month {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-active);
}

.pmb-scores {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.pmb-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.pmb-name {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.pmb-breakdown {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.pmb-net {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-muted);
}

.pmb-score.pmb-winner .pmb-name,
.pmb-score.pmb-winner .pmb-net {
    color: var(--good-color);
    text-shadow: 0 0 10px var(--good-glow);
}

.pmb-vs {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.4;
}

.pmb-result {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.pmb-result.pmb-result-gold {
    color: var(--good-color);
    text-shadow: 0 0 10px var(--good-glow);
}


/* Recent Activity */
.recent-activity {
    flex-basis: 100%;
    display: none;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
}

.recent-activity.visible {
    display: block;
}

.ra-header {
    padding: 1.1rem 1.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ra-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.ra-item:last-child {
    border-bottom: none;
}

.ra-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ra-icon {
    font-size: 1rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.ra-details {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-active);
}

.ra-portion {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.ra-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.ra-undo-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}

.ra-undo-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-active);
    border-color: rgba(255, 255, 255, 0.25);
}

.ra-undo-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ra-redo-btn {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--good-color);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}

.ra-redo-btn:hover {
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.4);
}

.ra-redo-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ra-item-undone {
    opacity: 0.5;
}

.ra-item-undone .ra-icon {
    filter: grayscale(1);
}

.ra-undone-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    font-style: italic;
}

/* Loading shimmer on deed counts */
.deed-count.loading {
    animation: count-shimmer 1s ease-in-out infinite;
}

@keyframes count-shimmer {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

/* Click effect animation class */
.pulse-click {
    animation: pulse 0.4s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 3000;
}

.toast {
    background: rgba(30, 35, 45, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-good {
    border-left: 4px solid var(--good-color);
}

.toast-bad {
    border-left: 4px solid var(--bad-color);
}

.toast-error {
    border-left: 4px solid var(--bad-color);
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

/* Auth Styling */
.auth-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--text-active);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.star-good .star-icon  { color: #22c55e; }
.star-good .deed-count { color: #22c55e; }
.star-bad  .star-icon  { color: #ff4d4d; }
.star-bad  .deed-count { color: #ff4d4d; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
      align-items: flex-start;
      overflow-y: auto;
    }

    .container {
        flex-direction: column;
        gap: 1.5rem;
        width: 92%;
    }

    #portions-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Compact horizontal card layout */
    .portion {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 1rem;
        padding: 0.875rem 1.25rem;
        border-radius: 16px;
        align-items: center;
    }

    .portion-title {
        grid-column: 1;
        grid-row: 1;
        font-size: 1.4rem;
        letter-spacing: 2px;
        margin: 0;
        text-align: left;
        align-self: center;
    }

    /* Stars stacked vertically, right-aligned */
    .stars-container {
        grid-column: 2;
        grid-row: 1 / 3;
        flex-direction: column;
        gap: 0.35rem;
        align-self: center;
        align-items: flex-end;
        justify-content: center;
        padding-top: 0;
    }

    /* Each button: count + star icon in a row, large tap target */
    .star-btn {
        flex-direction: row;
        gap: 0.4rem;
        padding: 0.5rem 0.4rem;
        align-items: center;
    }

    .deed-count {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0;
        color: var(--text-active);
    }

    .star-icon {
        width: 30px;
        height: 30px;
    }


    /* Labels removed on mobile */
    .star-label {
        display: none;
    }

    .net-score-bar {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        margin-top: 0.25rem;
        padding-top: 0.5rem;
        border-top: none !important;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .email-input {
        font-size: 1rem; /* prevents iOS auto-zoom (triggers below 16px) */
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    }

    .toast {
        min-width: unset;
        width: 100%;
        transform: translateY(120%);
    }

    .toast.show {
        transform: translateY(0);
    }

    .user-profile {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .prev-month-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }

    .pmb-scores {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.75rem 1rem;
    }

    .pmb-score {
        min-width: 0;
    }

    .pmb-vs {
        display: none;
    }

    .pmb-result {
        width: 100%;
        white-space: normal;
        text-align: left;
    }

    .pmb-label { font-size: 0.7rem; }
    .pmb-month { font-size: 1rem; }
    .pmb-name  { font-size: 0.78rem; }
    .pmb-breakdown { font-size: 0.78rem; }
    .pmb-net   { font-size: 1.2rem; }
    .pmb-result { font-size: 0.9rem; }
}

/* Small phones */
@media (max-width: 480px) {
    .portion {
        padding: 0.75rem 1rem;
    }

    .portion-title {
        font-size: 1.2rem;
        letter-spacing: 1.5px;
    }

    .star-icon {
        width: 20px;
        height: 20px;
    }

    .deed-count {
        font-size: 0.95rem;
    }
}

/* Touch devices: active states replace hover */
@media (hover: none) {
    .star-good:active .star-icon {
        color: var(--good-color);
        transform: scale(1.15);
        filter: drop-shadow(0 0 20px var(--good-glow));
    }

    .star-bad:active .star-icon {
        color: var(--good-color);
        transform: scale(1.15);
        filter: drop-shadow(0 0 20px var(--good-glow));
    }

    .star-good:active .deed-count,
    .star-good:active .star-label {
        color: var(--good-color);
    }

    .star-bad:active .deed-count,
    .star-bad:active .star-label {
        color: var(--good-color);
    }
}

/* Authentication Overlay & Modals */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 17, 23, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.login-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-active);
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.email-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.email-input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(13, 17, 23, 0.8);
    color: var(--text-active);
    font-family: inherit;
    font-size: 0.9rem;
}

.email-input::placeholder {
    color: var(--text-muted);
}

.email-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* User Profile Button */
.user-profile {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Toast Additions for Undo */
.toast {
    justify-content: space-between;
    min-width: 320px;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.undo-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-active);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 1rem;
}

.undo-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.undo-btn:active {
    transform: translateY(1px);
}

.undo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Net Score Progress Bar */
.net-score-bar {
    width: 100%;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.net-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.net-score-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.net-score-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.net-score-value.leading {
    color: var(--good-color);
    text-shadow: 0 0 10px var(--good-glow);
}

.net-score-value.trailing {
    color: var(--bad-color);
    text-shadow: 0 0 10px var(--bad-glow);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.progress-fill.leading {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
}

.net-score-status {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.4rem;
    min-height: 1em;
    transition: color 0.3s ease;
}

.net-score-status.leading {
    color: var(--good-color);
}


/* Action Confirmation Dialog */
.action-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 4000;
}

.action-dialog-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.action-dialog-sheet {
    width: min(92vw, 440px);
    background: rgba(18, 25, 35, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.25s ease;
}

.action-dialog-backdrop.open .action-dialog-sheet {
    transform: translateY(0) scale(1);
}

.action-dialog-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.action-dialog-message {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

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

.action-dialog-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-active);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
}

.action-dialog-stars {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fde68a;
}

.action-dialog-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.2rem;
    width: 100%;
    box-sizing: border-box;
}

.action-dialog-category-option {
    position: relative;
    display: flex;
    cursor: pointer;
    user-select: none;
    min-width: 0;
}

/* Last item: if it's the only one on its row in a 3-col grid, center it */
.action-dialog-category-option:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(33.333% - 0.3rem);
}

.action-dialog-category-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.action-dialog-category-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    padding: 0.5rem 0.25rem 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.28rem;
    width: 100%;
    min-height: 3.8rem;
    box-sizing: border-box;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.action-dialog-category-option input:checked + .action-dialog-category-card {
    border-color: rgba(59, 130, 246, 0.75);
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.action-dialog-category-stars {
    font-size: 0.78rem;
    line-height: 1;
    color: #fde68a;
    text-shadow: 0 0 10px rgba(253, 230, 138, 0.3);
    letter-spacing: -0.5px;
}

.action-dialog-category-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-active);
    text-align: center;
    line-height: 1.2;
    padding: 0 0.1rem;
    word-break: break-word;
    hyphens: auto;
}

.action-dialog-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 0.4rem;
}

.action-dialog-cancel,
.action-dialog-confirm {
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.68rem 0.8rem;
    font-weight: 700;
    color: var(--text-active);
    cursor: pointer;
}

.action-dialog-cancel {
    background: rgba(255, 255, 255, 0.08);
}

.action-dialog-confirm {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.55);
}

@media (max-width: 768px) {
    .action-dialog-backdrop {
        align-items: flex-end;
    }

    .action-dialog-sheet {
        width: 100%;
        max-width: none;
        max-height: 85vh;
        overflow-y: auto;
        border-radius: 18px 18px 0 0;
        padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
        transform: translateY(100%);
    }

    .action-dialog-backdrop.open .action-dialog-sheet {
        transform: translateY(0);
    }
}
