.ht-page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 5px 64px;
}

/* Annual Hero */
.ht-year-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 270px;
    padding: 38px 24px;
    border: 1px solid #e2dbf2;
    border-radius: 28px;
    background: linear-gradient(130deg, #7c399a 0%, #351a67 100%);
    box-shadow: 0 18px 50px rgb(86 48 164 / 10%);
    color: #ffffff;
    text-align: center;
}

.ht-year-hero-content {
    position: relative;
    z-index: 1;
}

.ht-year-title {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
}

.ht-year-gregorian {
    margin: 14px 0 0;
    color: #dbdbdb;
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 600;
    direction: rtl;
}

/* Year navigation */
.ht-year-nav {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #e2dbf2;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgb(86 48 164 / 10%);
}

.ht-year-nav-center {
    text-align: center;
}

.ht-year-nav-label {
    display: block;
    color: #616161;
    font-size: 0.88rem;
    font-weight: 600;
}

.ht-year-nav-current {
    display: block;
    margin-top: 2px;
    color: #27184a;
    font-size: 1.1rem;
    font-weight: 700;
}

.ht-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #e2dbf2;
    border-radius: 13px;
    background: #f1edff;
    color: #563492;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.ht-nav-button:hover {
    transform: translateY(-1px);
    border-color: rgb(135 53 224 / 55%);
    background: #f1edff;
}

/* 12 months */
.ht-year-calendar {
    margin-top: 28px;
}

.ht-months-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ht-year-month {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2dbf2;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgb(86 48 164 / 10%);
}

.ht-year-month-header {
    padding: 17px 14px 14px;
    text-align: center;
    border-bottom: 1px solid #e2dbf2;
    background: #f9f7ff;
}

.ht-year-month-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.ht-year-month-title a {
    color: #27184a;
    text-decoration: none;
}

.ht-year-month-title a:hover {
    color: #563492;
}

.ht-year-month-range {
    margin: 4px 0 0;
    color: #616161;
    font-size: 14px;
    direction: ltr;
}

.ht-mini-calendar {
    padding: 12px;
}

.ht-mini-weekdays,
.ht-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.ht-mini-weekdays {
    margin-bottom: 4px;
}

.ht-mini-weekday {
    padding: 5px 1px;
    color: #563492;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.ht-mini-day,
.ht-mini-empty {
    min-height: 47px;
}

.ht-mini-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 1px;
    border: 1px solid #f4f0fb;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.ht-mini-day--today {
    border-color: #e8c9ff;
    background: linear-gradient(180deg, #faf8ff 0%, #f2e8ff 100%);
    box-shadow: 0 4px 10px #b935e021;
}

.ht-mini-hijri {
    color: #27184a;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.ht-mini-gregorian {
    margin-top: 4px;
    color: #616161;
    font-size: 12px;
    line-height: 1;
    direction: ltr;
}

.ht-mini-empty {
    background: transparent;
}

.ht-month-link-wrap {
    padding: 0 12px 14px;
    text-align: center;
}

.ht-month-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #442172;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
}

.ht-today-link-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.ht-today-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #442172;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgb(119 53 224 / 22%);
}

@media (max-width: 900px) {
    .ht-months-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ht-page {
        width: min(100% - 20px, 1120px);
        padding-top: 20px;
    }

    .ht-year-hero {
        min-height: 220px;
        padding: 28px 18px;
        border-radius: 20px;
    }

    .ht-year-nav {
        grid-template-columns: 1fr 1fr;
        padding: 16px;
        border-radius: 20px;
    }

    .ht-year-nav-center {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .ht-nav-button {
        grid-row: 2;
    }
}

@media (max-width: 620px) {
    .ht-months-grid {
        grid-template-columns: 1fr;
    }

    .ht-year-month {
        border-radius: 18px;
    }

    .ht-mini-calendar {
        padding: 10px;
    }

    .ht-mini-day,
    .ht-mini-empty {
        min-height: 44px;
    }
}

@media (max-width: 380px) {
    .ht-page {
        width: min(100% - 16px, 1120px);
    }

    .ht-year-nav {
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .ht-nav-button {
        font-size: 0.84rem;
    }

    .ht-mini-calendar {
        padding-left: 7px;
        padding-right: 7px;
    }

    .ht-mini-weekdays,
    .ht-mini-grid {
        gap: 2px;
    }
}