.advent-layout {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: flex-start;
    justify-content: center;
}

/* A .card középre záró alapból szűkíti a gyerekét: tartalomhoz igazodó
   szélességnél a fa fent/balra állapota váltakozik, ezért itt rögzítjük. */
.content-area.advent-mode {
    width: 100%;
}

.advent-side {
    flex: 1 1 300px;
    min-width: 0;
}

.advent-title {
    text-align: center;
    margin: 0 0 .2rem;
}

.advent-count {
    text-align: center;
    margin: 0;
    color: #666;
}

.advent-tree {
    position: relative;
    flex: 0 0 auto;
    width: min(280px, 62vw);
    margin-top: 1.5rem; /* a csúcsdísz hegyének fölötte kell elférnie */
}

.advent-foliage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, #35a75b, #177245);
    clip-path: polygon(50% 0%, 64% 22%, 57% 22%, 76% 48%, 67% 48%, 92% 76%, 78% 76%, 100% 96%, 0% 96%, 22% 76%, 8% 76%, 33% 48%, 24% 48%, 43% 22%, 36% 22%); /* a díszek helyét adó treeHalfWidth() ugyanezt a kontúrt számolja */
}

.advent-trunk {
    width: 16%;
    height: 34px;
    margin: -6px auto 0;
    background: #8a5a2b;
    border-radius: 0 0 6px 6px;
}

.advent-ornament {
    position: absolute;
    z-index: 0;
    width: clamp(18px, 5.5vw, 24px);
    height: clamp(18px, 5.5vw, 24px);
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #ffe0b0, #e8590c 62%, #b8420a);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    font-size: clamp(9px, 3vw, 11px);
    font-weight: 800;
    line-height: 1;
    color: #3a3a3a;
}

/* biliárdgolyó: a szín csak a szegély marad, a szám a fehér középen ül */
.advent-ornament::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 14%;
    border-radius: 50%;
    background: #FFFDF8;
}

.advent-ornament.ornament-2 {
    background: radial-gradient(circle at 32% 30%, #ffe9a8, #d99a06 62%, #9c6d05);
}

.advent-ornament.ornament-3 {
    background: radial-gradient(circle at 32% 30%, #cfe4ff, #2563eb 62%, #1a4bb8);
}

/* a 24. ablak csúcsdíszje: arany csillag a fa tetején */
.advent-star {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -45%);
    width: clamp(32px, 9vw, 46px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: radial-gradient(circle at 35% 30%, #fff6d8, #f0b429 55%, #c98a08);
    font-size: clamp(10px, 3.2vw, 14px);
    font-weight: 800;
    line-height: 1;
    color: #6b4400;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
}

.advent-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .45rem;
    margin-top: .7rem;
}

.advent-window {
    aspect-ratio: 1;
    padding: 0;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #e6cfa4;
    border-radius: 10px;
    background: #fff6e6;
    color: #8a6a3a;
    cursor: pointer;
}

.advent-window:hover {
    transform: translateY(-1px);
}

.advent-window.future {
    background: #f1efe9;
    border-color: #ddd8cc;
    color: #9a958a;
    opacity: .55;
}

.advent-window.done {
    background: #e7f6ec;
    border-color: #35a75b;
    color: #177245;
}

.advent-window.selected {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.advent-detail {
    margin-top: .9rem;
    padding: .8rem;
    min-height: 7.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: #fdf8ee;
    border: 1px dashed #e0cfae;
    border-radius: 12px;
}

.advent-detail-date {
    margin: 0;
    font-weight: 700;
    color: #8a6a3a;
    text-transform: capitalize;
}

.advent-detail-lesson {
    margin: .3rem 0 .6rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.advent-detail-note {
    margin: .3rem 0 0;
    color: #666;
}
