/* MangoMango public home — orange / green / white */

.page-home {
    --mm-orange: #f97316;
    --mm-orange-dark: #ea580c;
    --mm-green: #22c55e;
    --mm-green-dark: #16a34a;
    --mm-white: #ffffff;
    --mm-bg: #f8faf8;
    --mm-text: #1a2e1a;
    --mm-muted: #5c6b5c;
    --mm-border: #e2ebe2;
    --mm-shadow: 0 8px 24px rgba(26, 46, 26, 0.08);

    background: var(--mm-bg);
    color: var(--mm-text);
    min-height: 100vh;
}

.page-home a:not(.btn):not(.quest-slide-link) { color: var(--mm-orange-dark); }

.site-header {
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.site-header-banner {
    display: block;
    width: 100%;
    aspect-ratio: 100 / 34;
    background: url('/assets/images/logo5.png') center center / contain no-repeat;
    text-decoration: none;
}

.site-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--mm-muted);
    font-size: 0.85rem;
}

.home-section {
    margin-bottom: 1.75rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--mm-text);
}

.section-head--end {
    justify-content: flex-end;
}

.page-home .btn-outline.btn-sm {
    text-decoration: none;
    white-space: nowrap;
}

/* Account block */
.account-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "avatar info"
        "actions actions";
    gap: 1rem 1.25rem;
    background: var(--mm-white);
    border-radius: 20px;
    padding: 1.35rem;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
    position: relative;
}

.account-notifications {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    color: var(--mm-orange-dark);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.account-notifications--muted {
    opacity: 0.45;
}

.account-notifications--active {
    opacity: 1;
}

.account-notifications:hover {
    background: rgba(249, 115, 22, 0.08);
}

.account-notifications-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.account-notifications-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    box-shadow: 0 0 0 2px var(--mm-white);
}

.account-avatar-wrap {
    grid-area: avatar;
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
}

.account-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mm-green), var(--mm-orange));
    color: var(--mm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    overflow: hidden;
}

.account-avatar--photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
}

.account-avatar-upload {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--mm-white);
    border: 1px solid var(--mm-border);
    box-shadow: 0 2px 6px rgba(26, 46, 26, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.account-avatar-upload-icon {
    font-size: 1rem;
    line-height: 1;
    color: var(--mm-orange-dark);
    font-weight: 700;
}

.account-avatar-upload:hover {
    border-color: var(--mm-orange);
}

.account-avatar-guest {
    background: var(--mm-border);
    color: var(--mm-muted);
}

.account-card .account-avatar-wrap {
    width: 5.25rem;
    height: 5.25rem;
}

.account-card .account-avatar {
    width: 5.25rem;
    height: 5.25rem;
    font-size: 2.1rem;
}

.account-info { grid-area: info; }

.account-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.account-name {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
}

.account-email,
.account-hint {
    margin: 0.25rem 0 0;
    color: var(--mm-muted);
    font-size: 0.9rem;
}

.account-actions {
    grid-area: actions;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

/* Buttons */
.page-home .btn {
    border-radius: 12px;
    font-weight: 600;
    border: 2px solid transparent;
}

.page-home input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.page-home textarea,
.page-home select {
    background: var(--mm-white);
    border: 1px solid var(--mm-border);
    color: var(--mm-text);
    border-radius: 12px;
}

.page-home .btn-orange {
    background: var(--mm-orange);
    color: var(--mm-white);
}

.page-home .btn-orange:hover {
    background: var(--mm-orange-dark);
}

.page-home .btn-green {
    background: var(--mm-green);
    color: var(--mm-white);
}

.page-home .btn-green:hover {
    background: var(--mm-green-dark);
}

.page-home .btn-outline {
    background: var(--mm-white);
    color: var(--mm-text);
    border-color: var(--mm-border);
}

.page-home .btn-outline:hover {
    border-color: var(--mm-green);
    color: var(--mm-green-dark);
}

.page-home .btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

/* Quest slider — 80% текущий слайд; fade справа, слева только на последнем слайде */
.quests-slider-wrap {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 80%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 80%, transparent 100%);
}

.quests-slider-wrap.is-at-end:not(.is-at-start) {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 20%, #000 100%);
}

.quests-slider-wrap.is-single,
.quests-slider-wrap.is-at-start.is-at-end {
    -webkit-mask-image: none;
    mask-image: none;
}

.quests-slider {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quests-slider::-webkit-scrollbar {
    display: none;
}

.quest-slide {
    flex: 0 0 80%;
    min-width: 0;
}

.quests-slider-wrap.is-single .quest-slide {
    flex: 0 0 100%;
}

.quest-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.quest-slide-inner {
    position: relative;
    aspect-ratio: 4 / 3;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
    background-color: var(--mm-white);
}

.quest-cover-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quest-slide-inner--public:not(.has-cover) {
    background-image: linear-gradient(135deg, rgba(249, 115, 22, 0.85), rgba(34, 197, 94, 0.75));
}

.quest-slide-inner--team:not(.has-cover) {
    background-image: linear-gradient(135deg, rgba(34, 197, 94, 0.85), rgba(249, 115, 22, 0.75));
}

.quest-slide-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 3;
    display: inline-block;
    width: auto;
    max-width: max-content;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(26, 46, 26, 0.2);
}

.quest-slide-badge-public {
    background: rgba(255, 255, 255, 0.92);
    color: var(--mm-orange-dark);
}

.quest-slide-badge-team {
    background: rgba(255, 255, 255, 0.92);
    color: var(--mm-green-dark);
}

.quest-countdown {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 3;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(26, 46, 26, 0.78);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.quest-countdown.is-started {
    background: rgba(34, 197, 94, 0.9);
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quests-list-item {
    display: block;
}

.slider-controls {
    display: flex;
    gap: 0.35rem;
}

.slider-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 2px solid var(--mm-border);
    background: var(--mm-white);
    color: var(--mm-text);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.slider-btn:hover {
    border-color: var(--mm-orange);
    color: var(--mm-orange);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--mm-border);
    cursor: pointer;
}

.slider-dot.is-active {
    background: var(--mm-orange);
    transform: scale(1.2);
}

/* Quest detail page */
.quest-detail-hero {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
    background-color: var(--mm-white);
}

.quest-detail-hero--public:not(.has-cover) {
    background-image: linear-gradient(135deg, rgba(249, 115, 22, 0.9), rgba(34, 197, 94, 0.8));
}

.quest-detail-hero--team:not(.has-cover) {
    background-image: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(249, 115, 22, 0.8));
}

.quest-detail-hero .quest-cover-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quest-detail-hero .quest-slide-badge {
    top: 1rem;
    left: 1rem;
}

.quest-detail-hero-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 2.5rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(26, 46, 26, 0.82) 0%, rgba(26, 46, 26, 0.45) 55%, transparent 100%);
    pointer-events: none;
}

.quest-slide-inner .quest-detail-hero-overlay {
    padding: 2rem 0.85rem 0.85rem;
}

.quest-detail-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 4.5vw, 2rem);
    font-weight: 900;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.quest-slide-inner .quest-detail-title {
    font-size: clamp(1.2rem, 4vw, 1.55rem);
}

.quest-added-date {
    margin: 0.4rem 0 0;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.quest-slide-link,
.quest-slide-link:hover,
.quest-slide-link:focus,
.quest-slide-link:visited {
    color: #fff;
    text-decoration: none;
}

.quest-detail-hero-overlay .quest-detail-title,
.quest-detail-hero-overlay .quest-added-date {
    color: #fff;
}

.quest-detail-body {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--mm-white);
    border-radius: 20px;
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
}

.quest-detail-description {
    margin: 0 0 1rem;
    color: var(--mm-text);
    line-height: 1.55;
}

.quest-detail-meta {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--mm-green-dark);
    font-weight: 600;
}

.quest-detail-start {
    margin-top: 0.5rem;
}

.quest-team-modal-content {
    width: min(100%, 420px);
}

.quest-team-modal-content label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.quest-team-modal-content input[type="text"],
.quest-team-modal-content input[type="number"] {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
}

.quest-team-fieldset {
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.quest-team-fieldset legend {
    padding: 0 0.35rem;
    color: var(--mm-muted);
    font-size: 0.9rem;
}

.quest-team-modal-content .checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.quest-team-modal-content .checkbox input {
    width: auto;
    margin: 0;
}

.quest-team-add-form {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quest-team-add-form input[type="number"] {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.quest-team-add-form .btn {
    margin: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    line-height: 1.25;
    white-space: nowrap;
}

/* Modals on public pages */
.page-home .modal {
    background: rgba(248, 250, 248, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
}

.page-home .modal-content {
    background: var(--mm-white);
    color: var(--mm-text);
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
    border-radius: 20px;
}

.page-home .modal-title {
    color: var(--mm-text);
}

.page-home .modal-content .muted {
    color: var(--mm-muted);
}

.page-home .modal-content p {
    color: var(--mm-text);
}

.page-home .modal-content .alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.quest-detail-auth-hint {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    text-align: center;
}

/* News */
.news-grid {
    display: grid;
    gap: 1rem;
}

.news-card {
    background: var(--mm-white);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
}

.news-card h3 {
    margin: 0.35rem 0;
    font-size: 1.05rem;
}

.news-card h3 a {
    color: var(--mm-text);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--mm-orange);
}

.news-card p {
    margin: 0;
    color: var(--mm-muted);
    font-size: 0.9rem;
}

.news-date {
    font-size: 0.8rem;
    color: var(--mm-orange-dark);
    font-weight: 600;
}

.news-link {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.news-list {
    display: grid;
    gap: 1rem;
}

.news-article {
    background: var(--mm-white);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
}

.news-article h1 {
    margin: 0.5rem 0 1rem;
    font-size: 1.5rem;
}

.news-body {
    line-height: 1.7;
    color: var(--mm-text);
}

/* Auth & cabinet */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-page .section-head {
    width: 100%;
    max-width: 420px;
}

.auth-panel,
.cabinet-card {
    width: 100%;
    max-width: 420px;
    background: var(--mm-white);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
}

.auth-panel h1,
.cabinet-card h1 {
    margin: 0 0 0.35rem;
}

.auth-panel .muted {
    color: var(--mm-muted);
    margin-bottom: 1.25rem;
}

.auth-panel label {
    color: var(--mm-text);
}

.auth-panel input {
    color: var(--mm-text);
}

.auth-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--mm-muted);
}

.cabinet-card {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.cabinet-card .account-avatar-wrap {
    margin: 0 auto;
}

.cabinet-profile-avatar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.cabinet-avatar-btn {
    min-width: 9rem;
}

.cabinet-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.cabinet-card .account-avatar-wrap--cabinet {
    width: 9rem;
    height: 9rem;
}

.cabinet-card .account-avatar-wrap--cabinet .account-avatar {
    width: 9rem;
    height: 9rem;
    font-size: 3.5rem;
}

.cabinet-card .account-avatar {
    margin: 0 auto 1rem;
}

.cabinet-email {
    color: var(--mm-muted);
    margin: 0.25rem 0 0.35rem;
}

.cabinet-member-since {
    color: var(--mm-muted);
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

#btn-edit-profile {
    margin-top: 0.25rem;
}

.profile-edit-modal-content {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}

.profile-edit-modal-content label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--mm-text);
}

.profile-edit-modal-content input[type="text"],
.profile-edit-modal-content input[type="email"],
.profile-edit-modal-content input[type="password"] {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
}

.profile-edit-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--mm-border);
}

.profile-edit-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-edit-section-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--mm-text);
}

.profile-edit-avatar-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.profile-edit-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.page-home .modal-content .alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cabinet-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.cabinet-player-id {
    color: var(--mm-orange-dark);
    font-weight: 600;
    margin: 0.35rem 0;
}

.account-id {
    color: var(--mm-orange-dark);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.cabinet-block .card {
    background: var(--mm-white);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
}

.cabinet-quest-card h3 {
    margin-top: 0;
}

.squad-members-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.squad-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--mm-border);
}

.squad-member-row:last-child {
    border-bottom: none;
}

.squad-member-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.squad-member-avatar {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mm-green), var(--mm-orange));
    color: var(--mm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    overflow: hidden;
}

.squad-member-avatar--photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
}

.squad-member-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.squad-member-name {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.squad-member-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    background: rgba(249, 115, 22, 0.12);
    color: var(--mm-orange-dark);
    border: 1px solid rgba(249, 115, 22, 0.28);
    vertical-align: middle;
}

.squad-member-id {
    color: var(--mm-muted);
    font-size: 0.85rem;
}

.squad-member-actions {
    flex-shrink: 0;
}

.squad-member-action {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--mm-border);
    border-radius: 50%;
    background: var(--mm-white);
    color: var(--mm-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.squad-member-action svg {
    width: 1rem;
    height: 1rem;
}

.squad-member-action:hover {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.06);
}

.invitation-card {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mm-border);
}

.invitation-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.invitation-card p {
    margin: 0 0 0.5rem;
}

.squad-member-checkbox {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}

.squad-member-checkbox span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cabinet-footer-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0 2rem;
}

#quest-members-fieldset {
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

#quest-members-fieldset legend {
    padding: 0 0.35rem;
    color: var(--mm-muted);
    font-size: 0.9rem;
}

.empty-state {
    background: var(--mm-white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: var(--mm-muted);
    border: 1px dashed var(--mm-border);
}

.page-home .alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.page-home .alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--mm-green-dark);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.code-input {
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    text-align: center;
    font-weight: 700;
}

@media (min-width: 640px) {
    .account-card {
        grid-template-areas: "avatar info actions";
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .account-actions {
        justify-content: flex-end;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}
