:root {
    --ink: #322b26;
    --muted: #8a7d72;
    --cream: #fffaf0;
    --paper: rgba(255, 255, 255, 0.82);
    --orange: #f28a3c;
    --orange-dark: #df6e21;
    --gold: #f5b83d;
    --line: rgba(82, 61, 45, 0.11);
    --shadow: 0 24px 60px rgba(122, 77, 32, 0.13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 5%, rgba(255, 221, 145, .42), transparent 28rem),
        linear-gradient(160deg, #fffdf7 0%, #fff8e9 45%, #fffdf8 100%);
    font-family: "Noto Sans JP", sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

.ambient { position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ambient-one { width: 20rem; height: 20rem; background: rgba(255, 194, 77, .12); right: -8rem; top: 15rem; }
.ambient-two { width: 14rem; height: 14rem; background: rgba(240, 121, 58, .08); left: -6rem; top: 50rem; }

.shell { width: min(960px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 72px; position: relative; }
.setup-error { display: grid; gap: 5px; margin: -45px auto 35px; padding: 14px 18px; max-width: 760px; color: #862f26; background: #fff0ed; border: 1px solid #efc2bb; border-radius: 12px; font-size: 13px; }
.setup-error span { color: #a34c42; font-size: 12px; }
.hero { text-align: center; margin-bottom: 46px; }
.eyebrow, .section-label { color: var(--orange-dark); font-weight: 800; font-size: 12px; letter-spacing: .22em; margin: 0 0 15px; }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 10px; }
.eyebrow span { width: 24px; height: 1px; background: var(--orange); }
.hero h1 { font-family: "Kaisei Decol", serif; font-size: clamp(40px, 7vw, 66px); line-height: 1.35; letter-spacing: .03em; margin: 0; font-weight: 700; }
.hero h1 em { color: var(--orange-dark); font-style: normal; }
.hero-copy { color: var(--muted); font-size: 14px; line-height: 2; margin: 22px 0 0; }

.bonus-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 28px;
    padding: 38px 44px 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.bonus-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(237, 155, 70, .14); pointer-events: none; }
.bonus-card.is-adblocked { display: none; }
.card-glow { position: absolute; z-index: -1; width: 350px; height: 350px; border-radius: 50%; background: rgba(255, 202, 99, .17); right: -110px; top: -220px; }
.bonus-heading, .ranking-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bonus-heading h2, .ranking-header h2, .modal h2 { font-family: "Kaisei Decol", serif; margin: 0; font-size: 23px; }
.status-badge { font-size: 12px; font-weight: 700; padding: 8px 13px; color: #996022; background: #fff4d9; border: 1px solid #f8dfaa; border-radius: 999px; }
.status-badge.done { color: #4f7a5f; background: #edf8ee; border-color: #d7ecd9; }
.point-display { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 35px 0 14px; color: var(--orange-dark); }
.point-display .point-icon { align-self: center; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(145deg, #ffd86a, #f2a624); color: white; font-weight: 800; box-shadow: inset 0 0 0 4px rgba(255,255,255,.3); }
.point-display strong { font-family: "Kaisei Decol", serif; font-size: clamp(54px, 9vw, 76px); line-height: 1; font-variant-numeric: tabular-nums; }
.point-display > span:last-child { font-weight: 700; font-size: 18px; }
.formula { text-align: center; color: var(--muted); font-size: 13px; }
.formula i { font-style: normal; padding: 0 9px; color: #c4b4a8; }
.formula b { color: var(--ink); }

button { font: inherit; }
.claim-button {
    position: relative; overflow: hidden; width: min(520px, 100%); margin: 30px auto 0; border: 0; border-radius: 15px; padding: 17px 22px;
    display: flex; justify-content: center; align-items: center; gap: 14px; color: white; font-weight: 800; cursor: pointer;
    background: linear-gradient(110deg, var(--orange-dark), #f4a348); box-shadow: 0 12px 24px rgba(223, 110, 33, .24); transition: transform .2s, box-shadow .2s, opacity .2s;
}
.claim-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(223, 110, 33, .32); }
.claim-button:disabled { cursor: default; background: #bcb4ad; box-shadow: none; opacity: .72; }
.button-shine { position: absolute; width: 70px; height: 200%; top: -50%; left: -100px; transform: rotate(20deg); background: rgba(255,255,255,.2); }
.claim-button:hover .button-shine { left: calc(100% + 80px); transition: left .7s ease; }
.arrow { font-size: 20px; }
.reset-note { text-align: center; margin: 14px 0 0; color: #afa197; font-size: 11px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 8px; }
.stats article { display: flex; align-items: center; gap: 15px; background: rgba(255,255,255,.62); border: 1px solid var(--line); padding: 22px; border-radius: 18px; }
.stat-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; font-weight: 800; }
.flame { color: #e46c40; background: #fff0e8; }
.calendar { color: #b78a32; background: #fff6d9; }
.calendar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.calendar svg .calendar-day { fill: currentColor; stroke: none; }
.coin { color: #d49522; background: #fff1be; border-radius: 50%; }
.stats p { margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.stats strong { font-family: "Kaisei Decol", serif; font-size: 28px; font-variant-numeric: tabular-nums; }
.stats article span { font-size: 11px; margin-left: 4px; color: var(--muted); }

.share-area { display: flex; justify-content: center; margin: 0 auto 42px; }
.x-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 18px;
    color: #514942;
    background: rgba(255, 255, 255, .58);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(82, 61, 45, .06);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.x-share-button svg { width: 14px; height: 14px; fill: currentColor; }
.x-share-button:hover {
    color: white;
    background: #24201d;
    border-color: #24201d;
    box-shadow: 0 10px 24px rgba(36, 32, 29, .18);
    transform: translateY(-1px);
}
.x-share-button:focus-visible { outline: 3px solid rgba(242, 138, 60, .25); outline-offset: 3px; }

.sponsor-area { width: min(760px, 100%); min-height: 90px; margin: -36px auto 64px; text-align: center; }
.sponsor-label { margin: 0 0 9px; color: #b9ada3; font-size: 8px; font-weight: 700; letter-spacing: .2em; }
.adblock-notice {
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 15px 20px;
    color: var(--muted);
    background: rgba(255, 255, 255, .46);
    border: 1px dashed rgba(183, 138, 50, .25);
    border-radius: 14px;
    text-align: left;
}
.adblock-notice:not([hidden]) { display: flex; }
.adblock-gate {
    min-height: 230px;
    padding: 38px;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(223, 110, 33, .2);
    border-radius: 28px;
    box-shadow: var(--shadow);
    text-align: center;
}
.adblock-gate:not([hidden]) { flex-direction: column; }
.adblock-gate .notice-coin { width: 48px; height: 48px; font-size: 17px; }
.adblock-gate strong { color: var(--ink); font-family: "Kaisei Decol", serif; font-size: 20px; }
.adblock-gate p { max-width: 520px; margin: 10px auto 0; font-size: 12px; line-height: 1.9; }
.sponsor-area.is-adblocked { display: none; }
.notice-coin { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; color: white; background: linear-gradient(145deg, #ffd86a, #eda12a); border-radius: 50%; font-size: 12px; font-weight: 800; }
.adblock-notice strong { display: block; color: #74675d; font-size: 11px; }
.adblock-notice p { margin: 3px 0 0; font-size: 10px; line-height: 1.65; }

.ranking-section { width: min(760px, 100%); margin: 0 auto; }
.ranking-header { margin: 18px; }
.join-button { color: var(--orange-dark); background: transparent; border: 1px solid rgba(223, 110, 33, .4); padding: 10px 17px; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .2s; }
.join-button:hover { color: white; background: var(--orange-dark); }
.ranking-card { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 14px 38px rgba(115, 81, 49, .07); }
.ranking-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.ranking-row:last-child { border-bottom: 0; }
.rank { color: #a89b91; font-family: "Kaisei Decol", serif; font-size: 17px; }
.ranking-row:nth-child(1) .rank { color: #d69a22; font-size: 22px; }
.ranking-row:nth-child(2) .rank { color: #8b9aa4; font-size: 20px; }
.ranking-row:nth-child(3) .rank { color: #b77d55; font-size: 19px; }
.player-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-meta { display: block; color: var(--muted); font-weight: 400; font-size: 10px; margin-top: 3px; }
.rank-points { color: var(--orange-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-points small { color: var(--muted); margin-left: 3px; font-size: 10px; }
.empty-ranking { text-align: center; color: var(--muted); padding: 46px 20px; margin: 0; }
.privacy-note { text-align: center; color: #afa197; font-size: 10px; margin-top: 13px; }

.site-footer {
    position: relative;
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0 0 38px;
    text-align: center;
}
.site-footer::before {
    content: "";
    display: block;
    width: min(760px, 100%);
    height: 1px;
    margin: 0 auto 31px;
    background: linear-gradient(90deg, transparent, rgba(223, 110, 33, .22), transparent);
}
.footer-inner { display: flex; flex-direction: column; align-items: center; }
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-family: "Kaisei Decol", serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease;
}
.footer-brand:hover { color: var(--orange-dark); }
.footer-coin {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, #ffd86a, #eda12a);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .34);
    font-family: "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-weight: 800;
}
.site-footer p { margin: 10px 0 7px; color: var(--muted); font-family: "Kaisei Decol", serif; font-size: 11px; letter-spacing: .08em; }
.site-footer small { color: #b5a99f; font-size: 9px; letter-spacing: .08em; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(48, 37, 28, .38); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(460px, 100%); padding: 36px; border-radius: 24px; background: #fffdf8; box-shadow: 0 30px 80px rgba(48, 37, 28, .24); animation: modal-in .2s ease-out; }
.modal-close { position: absolute; top: 16px; right: 18px; border: 0; background: transparent; color: #a29489; font-size: 24px; cursor: pointer; }
.modal > p:not(.section-label) { color: var(--muted); line-height: 1.8; font-size: 13px; }
.modal label { display: block; font-weight: 700; font-size: 12px; margin: 24px 0 8px; }
.modal input { width: 100%; border: 1px solid #ded4cb; border-radius: 11px; padding: 13px 14px; font: inherit; outline: 0; background: white; }
.modal input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 138, 60, .12); }
.form-error { color: #c64b3c; min-height: 20px; font-size: 11px; margin: 7px 0; }
.submit-button { width: 100%; border: 0; border-radius: 11px; background: var(--orange-dark); color: white; padding: 14px; font-weight: 800; cursor: pointer; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 26px; transform: translate(-50%, 24px); padding: 12px 19px; border-radius: 999px; background: #342d28; color: white; box-shadow: 0 10px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: .25s; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

@media (max-width: 680px) {
    .shell { width: min(100% - 24px, 960px); padding-top: 50px; }
    .hero h1 { font-size: 39px; }
    .bonus-card { padding: 28px 20px 24px; border-radius: 22px; }
    .adblock-gate { min-height: 210px; padding: 30px 22px; border-radius: 22px; }
    .bonus-heading { align-items: flex-start; }
    .bonus-heading h2 { font-size: 18px; }
    .stats { grid-template-columns: 1fr; gap: 8px; margin-bottom: 56px; }
    .stats article { padding: 15px 18px; }
    .share-area { margin-bottom: 36px; }
    .sponsor-area { min-height: 70px; margin: -28px auto 52px; }
    .adblock-notice { padding: 13px 14px; }
    .ranking-header { align-items: flex-end; }
    .ranking-header h2 { font-size: 20px; }
    .ranking-row { grid-template-columns: 38px minmax(0,1fr) auto; padding: 15px; gap: 7px; }
    .site-footer { width: calc(100% - 24px); padding-bottom: 28px; }
    .site-footer::before { margin-bottom: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.adsbygoogle {
    margin: 16px 0;
}
