/* ==========================================================================
   Festive — maroon and gold wedding-card treatment. Ornaments are all drawn
   in CSS: toran bunting, a turning mandala, and diya flames for pending games.
   ========================================================================== */

:root {
    --maroon: #59091d;
    --maroon-2: #3d0413;
    --gold: #d9a441;
    --gold-2: #f3d489;
    --cream: #fdf6e6;
    --cream-2: #f6ead0;
    --ink: #34120c;
    --dim: #8b6b52;
    --wa: #128c4b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background:
        radial-gradient(120% 70% at 50% 0%, #6b0f26 0%, var(--maroon) 42%, var(--maroon-2) 100%);
    background-attachment: fixed;
    color: var(--cream);
    font-family: "Georgia", "Times New Roman", "Noto Serif Devanagari", serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-2); text-decoration: none; }
.wrap { max-width: 940px; margin: 0 auto; padding: 0 16px 40px; }

/* --------------------------------------------------------------- toran */

/* Bunting: each span is a hanging drop on a gold thread. */
.toran {
    display: flex;
    justify-content: center;
    gap: 10px;
    height: 26px;
    border-top: 3px solid var(--gold);
    overflow: hidden;
}

.toran span {
    width: 14px;
    height: 20px;
    background: linear-gradient(180deg, var(--gold-2), #c2410c);
    border-radius: 0 0 50% 50%;
    transform-origin: top center;
    animation: sway 3.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * -180ms);
}

.toran span:nth-child(even) { background: linear-gradient(180deg, #fde68a, #16a34a); height: 15px; }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

/* ------------------------------------------------------------------- nav */

.nav { display: flex; align-items: center; gap: 12px; max-width: 940px; margin: 0 auto; padding: 14px 16px; }
.brand { font-size: 19px; font-weight: bold; letter-spacing: 1px; color: var(--gold-2); }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.links a { padding: 5px 13px; border: 1px solid rgba(217, 164, 65, .5); border-radius: 20px; color: var(--cream); font-size: 13px; }
.links a:hover, .links a.on { background: var(--gold); border-color: var(--gold); color: var(--maroon-2); }

/* ---------------------------------------------------------------- mast */

.mast { position: relative; padding: 34px 12px 26px; text-align: center; overflow: hidden; }

/* Mandala: two conic rings turning in opposite directions, kept faint. */
.mandala {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    background:
        repeating-conic-gradient(from 0deg, rgba(217, 164, 65, .16) 0deg 6deg, transparent 6deg 12deg);
    border-radius: 50%;
    animation: turn 60s linear infinite;
    pointer-events: none;
}

.mandala::after {
    content: "";
    position: absolute;
    inset: 46px;
    background: repeating-conic-gradient(from 0deg, rgba(217, 164, 65, .2) 0deg 9deg, transparent 9deg 18deg);
    border-radius: 50%;
    animation: turn 44s linear infinite reverse;
}

@keyframes turn { to { transform: rotate(360deg); } }

.mast .om { position: relative; display: block; font-size: 30px; color: var(--gold); }
.mast h1 { position: relative; margin-top: 4px; font-size: 34px; font-weight: bold; letter-spacing: 2px; color: var(--gold-2); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); word-break: break-word; }
.mast .date { position: relative; margin-top: 6px; color: #e9c9a0; font-size: 14px; }
.mast .tag { position: relative; margin-top: 8px; font-size: 16px; }

/* Divider: gold hairline, diamond, gold hairline. */
.rule { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px auto 0; max-width: 320px; }
.rule i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rule b { color: var(--gold); font-size: 14px; }

/* --------------------------------------------------------------- notice */

.notice { margin-top: 8px; padding: 11px 16px; background: rgba(217, 164, 65, .12); border: 1px dashed rgba(217, 164, 65, .55); border-radius: 6px; text-align: center; font-size: 14px; }

/* ---------------------------------------------------------------- arch */

/* Arched frame, like a temple door, around the headline result. */
.arch {
    position: relative;
    max-width: 460px;
    margin: 22px auto 0;
    padding: 30px 24px 26px;
    background: linear-gradient(180deg, var(--cream), var(--cream-2));
    border: 3px solid var(--gold);
    border-radius: 220px 220px 12px 12px;
    color: var(--ink);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
    text-align: center;
}

.arch .corner { position: absolute; width: 16px; height: 16px; border: 2px solid var(--gold); }
.arch .corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.arch .corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.arch .corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.arch .corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.arch .lbl { display: inline-block; padding: 3px 14px; background: var(--maroon); border-radius: 20px; color: var(--gold-2); font-size: 11px; letter-spacing: 2px; }
.arch h2 { margin-top: 10px; font-size: 22px; letter-spacing: 1px; }
.arch .num { margin: 6px 0; font-size: 74px; font-weight: bold; line-height: 1; color: var(--maroon); text-shadow: 0 2px 0 var(--gold-2); }
.arch .soon { color: var(--dim); font-size: 14px; }
.arch .prevline { margin-top: 8px; color: var(--dim); font-size: 14px; }
.arch .prevline b { color: var(--ink); }

/* ---------------------------------------------------------------- diya */

/* A lit lamp: clay pot below, flickering flame above. */
.diya-big, .diya { position: relative; display: inline-block; width: 60px; height: 62px; }
.diya { width: 42px; height: 46px; }

.diya-big .pot, .diya .pot {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, #a1521f, #6b3410);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    transform: translateX(-50%);
}

.diya-big .flame, .diya .flame {
    position: absolute;
    bottom: 36%;
    left: 50%;
    width: 40%;
    height: 62%;
    margin-left: -20%;
    background: radial-gradient(50% 60% at 50% 75%, #fff7d1, #fbbf24 45%, #ea580c 78%, rgba(234, 88, 12, 0) 100%);
    border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
    transform-origin: 50% 100%;
    animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { transform: scaleY(1) scaleX(1) rotate(-1.5deg); opacity: 1; }
    30%      { transform: scaleY(1.12) scaleX(.92) rotate(2deg); opacity: .92; }
    60%      { transform: scaleY(.94) scaleX(1.06) rotate(-2deg); opacity: 1; }
}

/* -------------------------------------------------------------- plaque */

.plaque { max-width: 460px; margin: 14px auto 0; padding: 9px 14px; background: rgba(0, 0, 0, .28); border-left: 3px solid var(--gold); border-right: 3px solid var(--gold); border-radius: 4px; text-align: center; font-size: 14px; }
.plaque b { color: var(--gold-2); }

/* --------------------------------------------------------------- cards */

.sec-h { margin: 34px 0 16px; text-align: center; }
.sec-h span { display: inline-block; padding: 0 18px; color: var(--gold-2); font-size: 17px; letter-spacing: 2px; }
.sec-h::after { content: "\2726"; display: block; margin-top: 4px; color: var(--gold); font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.card {
    padding: 3px;
    background: linear-gradient(150deg, var(--gold), #8a5a12 45%, var(--gold-2));
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
    opacity: 0;
    transform: translateY(14px);
    animation: rise .5s ease forwards;
    animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes rise { to { opacity: 1; transform: none; } }

.card-in { padding: 16px 14px 14px; background: linear-gradient(180deg, var(--cream), var(--cream-2)); border-radius: 8px; color: var(--ink); text-align: center; }
.cname { font-size: 19px; font-weight: bold; letter-spacing: 1px; word-break: break-word; }
.ctime { margin-top: 2px; color: var(--dim); font-size: 12px; letter-spacing: 1px; }

.cbody { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; min-height: 74px; }
.cbody .col { flex: 1; }
.cbody .col span { display: block; color: var(--dim); font-size: 11px; }
.cbody .divider { color: var(--gold); font-size: 12px; }
.cbody .old { font-size: 30px; font-weight: bold; color: var(--dim); }
.cbody .new { font-size: 38px; font-weight: bold; color: var(--maroon); }

.card.is-wait .card-in { background: linear-gradient(180deg, #fff9ea, #fdeecd); }

.clink { display: inline-block; margin-top: 10px; padding: 6px 16px; background: var(--maroon); border-radius: 20px; color: var(--gold-2); font-size: 12px; letter-spacing: 1px; }
.clink:hover { background: var(--maroon-2); }

/* -------------------------------------------------------------- invite */

.invite { position: relative; margin-top: 30px; padding: 26px 20px 22px; background: linear-gradient(180deg, var(--cream), var(--cream-2)); border: 2px solid var(--gold); border-radius: 10px; color: var(--ink); text-align: center; }
.invite::before { content: ""; position: absolute; inset: 7px; border: 1px dotted rgba(89, 9, 29, .35); border-radius: 6px; pointer-events: none; }
.invite .ico { color: var(--gold); font-size: 22px; }
.invite h3 { margin-top: 2px; font-size: 20px; letter-spacing: 1.5px; }
.invite .rate { margin-top: 4px; color: var(--maroon); font-size: 14px; font-weight: bold; }
.invite .note { margin-top: 12px; color: var(--dim); font-size: 13px; }

.plist { list-style: none; max-width: 360px; margin: 14px auto 0; }
.plist li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 15px; }
.plist li i { flex: 1; border-bottom: 1px dotted rgba(89, 9, 29, .35); }
.plist b { color: var(--maroon); }

.cta { margin-top: 14px; }
.btn { display: inline-block; margin: 4px; padding: 10px 24px; background: var(--wa); border-radius: 24px; color: #fff; font-size: 14px; font-weight: bold; }
.btn.tg { background: #1d6fa5; }

/* ---------------------------------------------------------- week table */

.rec-wrap { overflow-x: auto; background: linear-gradient(180deg, var(--cream), var(--cream-2)); border: 2px solid var(--gold); border-radius: 10px; }
.rec { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 14px; }
.rec th, .rec td { padding: 9px 10px; border-bottom: 1px solid rgba(89, 9, 29, .14); text-align: center; white-space: nowrap; }
.rec thead th { background: var(--maroon); color: var(--gold-2); font-size: 12px; letter-spacing: 1px; }
.rec tbody tr:last-child td { border-bottom: 0; }
.rt-date { color: var(--maroon); font-weight: bold; }
.rt-dash { color: #c9b596; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 26px; }
.step { padding: 18px 14px; background: rgba(253, 246, 230, .08); border: 1px solid rgba(217, 164, 65, .4); border-radius: 10px; text-align: center; }
.step-ico { display: block; font-size: 26px; }
.step b { display: block; margin: 6px 0 2px; color: var(--gold-2); font-size: 15px; }
.step span { color: #e2c9b0; font-size: 13px; }

/* ------------------------------------------------------------------- faq */

.faq-item { margin-bottom: 8px; background: rgba(253, 246, 230, .07); border: 1px solid rgba(217, 164, 65, .35); border-radius: 8px; overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 13px 15px; background: none; border: 0; color: var(--cream); font-family: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.faq-ico { color: var(--gold); font-size: 19px; font-style: normal; transition: transform .25s ease; }
.faq-item.open .faq-ico { transform: rotate(135deg); }
.faq-a { display: none; padding: 0 15px 13px; color: #e6cdb4; font-size: 14px; }
.faq-item.open .faq-a { display: block; }

/* --------------------------------------------------------------- article */

.article { margin-top: 14px; padding: 20px 18px; background: rgba(0, 0, 0, .18); border-left: 3px solid var(--gold); border-radius: 8px; }
.article h4 { margin-bottom: 8px; color: var(--gold-2); font-size: 18px; }
.article p { margin-bottom: 10px; color: #ecd9c6; font-size: 14.5px; }
.article p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- footer */

.foot { padding: 26px 16px 34px; border-top: 1px solid rgba(217, 164, 65, .35); text-align: center; }
.foot .fname { margin-top: 10px; color: var(--gold-2); font-size: 19px; letter-spacing: 3px; }
.foot p { max-width: 720px; margin: 8px auto 0; color: #d9bda3; font-size: 13px; word-break: break-word; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: var(--wa); border: 2px solid var(--gold-2); border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); color: #fff; }

/* ------------------------------------------------------------ chart page */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 14px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(217, 164, 65, .4); border-radius: 10px; }
.filters select, .filters input { padding: 9px 11px; background: var(--cream); border: 1px solid var(--gold); border-radius: 6px; color: var(--ink); font-family: inherit; font-size: 14px; }
.btn-sm { display: inline-block; padding: 9px 18px; background: var(--gold); border: 0; border-radius: 6px; color: var(--maroon-2); font-family: inherit; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-sm.ghost { background: none; border: 1px solid rgba(217, 164, 65, .55); color: var(--gold-2); }

@media (max-width: 640px) {
    .mast h1 { font-size: 26px; }
    .arch { border-radius: 160px 160px 12px 12px; padding: 26px 16px 22px; }
    .arch .num { font-size: 58px; }
    .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; }
    .card { opacity: 1; transform: none; }
}
