@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Noto+Sans+JP:wght@500;700;900&family=Shippori+Mincho+B1:wght@700;800&display=swap");

/* ========== 基本リセット ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
body {
    font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", sans-serif;
    color: #222;
    background: #f6f4ee;
    -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ========================================================
   PC レイアウト：デザイン基準 1920 x (1080 + 1080)
   レスポンシブ：vw を基準に全要素をスケール
======================================================== */

.pc-stage {
    display: block;
    width: 100%;
    background: #f5f1e8;
}
.sp-stage { display: none; }

/* ----- 上半分（背景＋キャラ＋カウンター） ----- */
.pc-top {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1a2530;
    display: flex;
    justify-content: center;
}
.pc-top__bg {
    position: absolute; inset: 0;
    background: url("../assets/pc/bg_top.webp") center/cover no-repeat;
    z-index: 0;
}
/* 内側ステージ：1920x1080 基準、最大幅 1080px。全要素は % で配置 */
.pc-top__stage {
    position: relative;
    width: 100%;
    max-width: 1920px;
    aspect-ratio: 1920 / 1080;
    z-index: 1;
}

.pc-top__va {
    position: absolute;
    top: 1.6%;
    left: 1.5%;
    width: 13.3%;     /* 255/1920 */
    height: auto;
    z-index: 5;
}

.pc-top__release {
    position: absolute;
    top: 1.5%;
    right: 1%;
    z-index: 5;
    width: 11%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4vw;
}
.pc-top__koushou {
    width: 95%;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.9));
    margin-bottom: 0.2vw;
}
.pc-top__store {
    display: inline-block;
    width: 100%;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.pc-top__store img { width: 100%; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.pc-top__store:hover { transform: translateY(-1px); opacity: 0.92; }

.pc-top__char-l {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30.8%;     /* 592/1920 */
    height: auto;
    z-index: 3;
}
.pc-top__char-r {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42.6%;     /* 818/1920 */
    height: auto;
    z-index: 3;
}

.pc-top__game-title {
    position: absolute;
    top: 3.5%;
    left: 50%;
    transform: translateX(-50%);
    width: 33%;       /* 634/1920 */
    height: auto;
    z-index: 6;
    filter: drop-shadow(0 3px 12px rgba(255,255,255,0.55));
}
.pc-top__title {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 46%;       /* 883/1920 */
    height: auto;
    z-index: 6;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.55));
}

/* カウンター */
.counter {
    position: absolute;
    left: 50%;
    bottom: 4%;
    transform: translateX(-50%);
    width: 55%;       /* 1053/1920 ≒ 54.8% */
    z-index: 8;
}
.counter__bg {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1;
}
.counter__text {
    position: absolute;
    left: 50%;
    bottom: 16%;
    transform: translateX(-50%);
    width: 78%;
    height: auto;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.2s ease;
}
.counter__text--registered { opacity: 0; }
.counter.is-registered .counter__text--unregistered { opacity: 0; }
.counter.is-registered .counter__text--registered   { opacity: 1; }
.counter__number {
    position: absolute;
    top: 30%;
    left: 9%;
    right: 9%;
    height: 18%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Shippori Mincho B1", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    font-weight: 800;
    font-size: 2.5vw;
    letter-spacing: 0.05em;
    color: #2a2826;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.counter__actions {
    position: absolute;
    top: 56%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 3%;
    z-index: 3;
}
.counter__btn {
    width: 27%;
    transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.counter__btn img { width: 100%; height: auto; }
.counter__btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
}
.counter__btn:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.95);
}
.counter__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.pc-top__aeca {
    position: absolute;
    right: 0.5%;
    bottom: 7%;
    width: 11%;
    height: auto;
    z-index: 4;
    opacity: 0.95;
}

/* ----- 下半分（Special Event） ----- */
.pc-bottom {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #cfd8dc;
    display: flex;
    justify-content: center;
}
.pc-bottom__bg {
    position: absolute; inset: 0;
    background: url("../assets/pc/bg_bottom.webp") center/cover no-repeat;
    z-index: 0;
}
.pc-bottom__stage {
    position: relative;
    width: 100%;
    max-width: 1920px;
    aspect-ratio: 1920 / 1080;
    z-index: 1;
}

.pc-bottom__ribbon {
    position: absolute;
    top: 0;
    left: 3%;
    width: 9.5%;       /* 182/1920 */
    height: auto;
    z-index: 4;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.pc-bottom__reward {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 57.5%;       /* 1105/1920 */
    height: auto;
    z-index: 3;
}

.pc-bottom__once {
    position: absolute;
    top: 14%;
    right: 4%;
    width: 14%;        /* 340/1920 */
    height: auto;
    z-index: 5;
    animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(6deg); }
    50%      { transform: translateY(-6px) rotate(6deg); }
}

/* ========== 事前登録ページのアニメーション ========== */
@keyframes prereg-slide-in-left {
    0%   { opacity: 0; transform: translateX(-12%); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes prereg-slide-in-right {
    0%   { opacity: 0; transform: translateX(12%); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes prereg-fade-up {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* 中央寄せ要素（translateX(-50%) を維持したまま下からフェードイン）用 */
@keyframes prereg-fade-up-cx {
    0%   { opacity: 0; transform: translate(-50%, 20px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes prereg-fade {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes prereg-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@keyframes prereg-bob-x {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -8px); }
}
@keyframes prereg-glow {
    0%, 100% { filter: drop-shadow(0 3px 8px rgba(255,255,255,0.35)) drop-shadow(0 0 12px rgba(255,255,255,0.18)); }
    50%      { filter: drop-shadow(0 3px 12px rgba(255,210,120,0.65)) drop-shadow(0 0 22px rgba(255,210,120,0.45)); }
}
@keyframes prereg-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* PC：キャラと中央要素の入場 + 揺れ（is-loaded 付与後に再生） */
body.is-loaded .pc-top__char-l { animation: prereg-slide-in-left 0.9s ease-out 0.1s both; }
body.is-loaded .pc-top__char-r { animation: prereg-slide-in-right 0.9s ease-out 0.1s both; }
body.is-loaded .pc-top__va,
body.is-loaded .pc-top__aeca,
body.is-loaded .pc-top__release,
body.is-loaded .pc-top__koushou { animation: prereg-fade 0.7s ease-out 0.4s both; }
body.is-loaded .pc-top__game-title { animation: prereg-fade-up-cx 0.8s ease-out 0.5s both; }
body.is-loaded .pc-top__title       { animation: prereg-fade-up-cx 0.8s ease-out 0.7s both; }
body.is-loaded .counter             { animation: prereg-fade-up-cx 0.7s ease-out 0.9s both; }
body.is-loaded .counter__btn        { animation: prereg-pulse 2.6s ease-in-out infinite; transform-origin: center; }
body.is-loaded .counter__btn:hover  { animation-play-state: paused; }

/* SP：キャラと中央要素の入場 + 揺れ（is-loaded 付与後に再生） */
body.is-loaded .sp-top__char-l  { animation: prereg-slide-in-left 0.9s ease-out 0.1s both; }
body.is-loaded .sp-top__char-r  { animation: prereg-slide-in-right 0.9s ease-out 0.1s both; }
body.is-loaded .sp-top__va,
body.is-loaded .sp-top__aeca    { animation: prereg-fade 0.7s ease-out 0.4s both; }
body.is-loaded .sp-top__title   { animation: prereg-fade-up-cx 0.8s ease-out 0.6s both; }
body.is-loaded .sp-top__prereg  { animation: prereg-fade-up-cx 0.8s ease-out 0.8s both, prereg-bob-x 3.2s ease-in-out 1.6s infinite; }
body.is-loaded .sp-top__stores  { animation: prereg-fade-up-cx 0.7s ease-out 1.0s both; }
body.is-loaded .sp-counter      { animation: prereg-fade-up 0.7s ease-out 1.1s both; }
body.is-loaded .sp-counter__btn { animation: prereg-pulse 2.6s ease-in-out infinite; transform-origin: center; }
body.is-loaded .sp-counter__btn:hover { animation-play-state: paused; }

/* 既存の :active トランジションと競合しないように、押下時はアニメ停止 */
.counter__btn:active,
.sp-counter__btn:active { animation: none; }

/* ローディング前は中央寄せ要素・キャラ・ロゴ類を完全に隠す（パッと出ないように） */
body:not(.is-loaded) .pc-top__char-l,
body:not(.is-loaded) .pc-top__char-r,
body:not(.is-loaded) .pc-top__va,
body:not(.is-loaded) .pc-top__aeca,
body:not(.is-loaded) .pc-top__release,
body:not(.is-loaded) .pc-top__koushou,
body:not(.is-loaded) .pc-top__game-title,
body:not(.is-loaded) .pc-top__title,
body:not(.is-loaded) .counter,
body:not(.is-loaded) .sp-top__char-l,
body:not(.is-loaded) .sp-top__char-r,
body:not(.is-loaded) .sp-top__va,
body:not(.is-loaded) .sp-top__aeca,
body:not(.is-loaded) .sp-top__title,
body:not(.is-loaded) .sp-top__prereg,
body:not(.is-loaded) .sp-top__stores,
body:not(.is-loaded) .sp-counter { opacity: 0; }

/* ========== ローディング画面 ========== */
.preloader {
    position: fixed; inset: 0;
    background: #1a1f29;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4vmin;
    transition: opacity 0.5s ease;
}
.preloader.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.preloader__logo {
    width: auto;
    height: clamp(56px, 8vw, 96px);
    max-width: 70vw;
    animation: preloader-pulse 1.6s ease-in-out infinite;
}
@keyframes preloader-pulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

/* 登録カウンターの数字が更新された瞬間のハイライト */
.counter__number.is-flash,
.sp-counter__number.is-flash {
    animation: count-flash 0.9s ease-out;
}
@keyframes count-flash {
    0%   { transform: scale(1);    color: #2a2826; text-shadow: 0 0 0 rgba(255,180,40,0); }
    30%  { transform: scale(1.18); color: #c8741a; text-shadow: 0 0 14px rgba(255,180,40,0.85); }
    100% { transform: scale(1);    color: #2a2826; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
}

/* アクセシビリティ：動きを減らす設定の人向けに無効化 */
@media (prefers-reduced-motion: reduce) {
    .pc-top__char-l, .pc-top__char-r,
    .pc-top__va, .pc-top__aeca, .pc-top__release, .pc-top__koushou,
    .pc-top__game-title, .pc-top__title,
    .counter, .counter__btn,
    .sp-top__char-l, .sp-top__char-r,
    .sp-top__va, .sp-top__aeca,
    .sp-top__title, .sp-top__prereg, .sp-top__stores,
    .sp-counter, .sp-counter__btn {
        animation: none !important;
    }
}

.pc-bottom__detail {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    width: 63.6%;      /* 1222/1920 */
    height: auto;
    z-index: 3;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.pc-bottom__sd-l {
    position: absolute;
    left: 8%;
    bottom: 11%;
    width: 14%;        /* 310/1920 */
    height: auto;
    z-index: 4;
}
.pc-bottom__sd-r {
    position: absolute;
    right: 6%;
    bottom: 11%;
    width: 17%;        /* 377/1920 */
    height: auto;
    z-index: 4;
}

/* ========================================================
   SP レイアウト
   デザイン基準 1125 幅
   切替：縦長 or 狭い画面で SP 表示
======================================================== */

@media screen and (max-width: 768px), screen and (max-aspect-ratio: 1/1) {
    .pc-stage { display: none; }
    .sp-stage { display: block; }
}

.sp-top {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 12vw;
}
.sp-top__bg {
    position: absolute; inset: 0;
    background: url("../assets/pc/bg_top.webp") top center / cover no-repeat, #cad7df;
    z-index: 0;
}

/* ヒーロー本体：デザイン画 1075x1521 をベースにしたアスペクト比固定 */
.sp-top__hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1075 / 1521;
    z-index: 2;
    overflow: hidden;
}
/* メインロゴ中央 (≈60%) からヒーロー下端にかけて白フェード（キャラの上、タイトルの下） */
.sp-top__hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 60%;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    z-index: 4;
}

.sp-top__va {
    position: absolute;
    top: 2.5%;
    left: 3%;
    width: 30%;
    height: auto;
    z-index: 6;
}
.sp-top__aeca {
    position: absolute;
    top: 2.5%;
    right: 3%;
    width: 18%;
    height: auto;
    z-index: 6;
}

.sp-top__char-l,
.sp-top__char-r {
    position: absolute;
    top: 0;
    height: auto;
    z-index: 3;
}
.sp-top__char-l {
    left: 0;
    width: 80%;
}
.sp-top__char-r {
    right: 0;
    width: 100%;
    z-index: 4;
}

.sp-top__title {
    position: absolute;
    bottom: 23%;
    left: 50%;
    transform: translateX(-50%);
    width: 78%;
    z-index: 5;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.55));
}
.sp-top__prereg {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    z-index: 5;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.5));
}

.sp-top__stores {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3%;
    width: 80%;
    justify-content: center;
    align-items: center;
    z-index: 5;
}
.sp-top__store {
    flex: 1 1 0;
    max-width: 46%;
    aspect-ratio: 415 / 152;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-top__store img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* SP カウンター */
.sp-counter {
    position: relative;
    width: 93vw;
    margin: 8vw auto 0;
    z-index: 7;
}
.sp-counter__bg {
    position: relative;
    width: 100%;
    z-index: 1;
}
.sp-counter__text {
    position: absolute;
    left: 50%;
    bottom: 13.5%;
    transform: translateX(-50%);
    width: 50%;
    height: auto;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.2s ease;
}
.sp-counter__text--registered { opacity: 0; }
.sp-counter.is-registered .sp-counter__text--unregistered { opacity: 0; }
.sp-counter.is-registered .sp-counter__text--registered   { opacity: 1; }
.sp-counter__number {
    position: absolute;
    top: 30%;
    left: 7%;
    right: 7%;
    height: 22%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Shippori Mincho B1", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    font-weight: 800;
    font-size: 6.2vw;
    letter-spacing: 0.04em;
    color: #2a2826;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
}
.sp-counter__actions {
    position: absolute;
    bottom: 29%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4%;
    z-index: 3;
}
.sp-counter__btn {
    width: 38%;
    transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.sp-counter__btn img { width: 100%; height: auto; }
.sp-counter__btn:active:not(:disabled) {
    transform: translateY(1px);
    filter: brightness(0.92);
}
.sp-counter__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* SP 下部：Special Event */
.sp-bottom {
    position: relative;
    width: 100%;
    padding: 4vw 0 8vw;
    background: url("../assets/sp/bg.webp") top center / cover no-repeat, #cad7df;
}
.sp-bottom__ribbon {
    position: absolute;
    top: -2vw;
    left: 3%;
    width: 18%;
    z-index: 4;
}
.sp-bottom__reward {
    display: block;
    margin: 10vw auto 0;
    width: 84%;
}
.sp-bottom__once {
    position: absolute;
    top: calc(13% - 1.2vw);
    right: -1%;
    width: 28%;
    z-index: 5;
    animation: bob 2.4s ease-in-out infinite;
}
.sp-bottom__detail {
    display: block;
    margin: 4vw auto 0;
    width: 86%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.sp-bottom__sd-l {
    position: absolute;
    left: 1%;
    top: 35%;
    width: 22%;
    z-index: 4;
}
.sp-bottom__sd-r {
    position: absolute;
    right: 1%;
    top: 66%;
    width: 26%;
    z-index: 4;
}

/* ========================================================
   フッター
======================================================== */
.footer {
    position: relative;
    z-index: 60;
    background: #4a5b67;
    color: #fff;
    padding: 24px 16px 32px;
    text-align: center;
}
.footer__info { margin-bottom: 16px; }
.footer__info-inner {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.footer__icon img {
    width: 64px; height: 64px;
    border-radius: 12px;
    background: #fff;
}
.footer__meta { display: flex; gap: 20px; flex-wrap: wrap; text-align: left; }
.footer__meta-col { display: flex; flex-direction: column; }
.footer__meta-row { margin: 2px 0; font-size: 12px; line-height: 1.5; }
.footer__title { font-weight: 700; font-size: 14px; }
.footer__credit { max-width: 880px; margin: 0 auto; }
.footer__trademark { font-size: 10px; line-height: 1.7; opacity: 0.85; margin: 8px 0; }
.footer__guideline a {
    font-size: 11px;
    text-decoration: underline;
    opacity: 0.9;
}
.footer__copyright { font-size: 10px; opacity: 0.7; margin: 8px 0 0; }

/* SP フッタ：縦並びレイアウト + 上下で背景色を分ける */
@media screen and (max-width: 768px), screen and (max-aspect-ratio: 1/1) {
    .footer {
        padding: 0;
        background: transparent;
    }
    .footer__info {
        background: #4a5b67;
        padding: 8vw 4vw 7vw;
        margin: 0;
    }
    .footer__info-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4vw;
        max-width: none;
    }
    .footer__icon img {
        width: 28vw;
        height: 28vw;
        max-width: 128px;
        max-height: 128px;
        border-radius: 18%;
    }
    .footer__meta {
        display: flex;
        flex-direction: column;
        gap: 0;
        text-align: center;
        align-items: center;
        width: 100%;
    }
    .footer__meta-col {
        align-items: center;
        width: 100%;
    }
    .footer__meta-row {
        font-size: 14px;
        line-height: 1.7;
        margin: 0.4vw 0;
    }
    .footer__title { font-size: 15px; }

    .footer__credit {
        background: #000;
        color: #fff;
        max-width: none;
        margin: 0;
        padding: 6vw 4vw 5vw;
        text-align: center;
    }
    .footer__trademark {
        font-size: 11px;
        line-height: 1.8;
        opacity: 1;
        margin: 0 0 4vw;
    }
    .footer__guideline {
        margin: 0 0 4vw;
    }
    .footer__guideline a {
        color: #d4a047;
        font-size: 13px;
        text-decoration: underline;
        opacity: 1;
    }
    .footer__copyright {
        font-size: 12px;
        opacity: 1;
        margin: 0;
    }
}

/* ========================================================
   ダイアログ
======================================================== */
.dialog {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vw;
    animation: dialog-fade 0.18s ease both;
}
.dialog[hidden] { display: none; }
@keyframes dialog-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.dialog__box {
    position: relative;
    width: min(720px, 92vw);
    aspect-ratio: 806 / 336;
}
.dialog__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.dialog__bg { z-index: 0; }
.dialog__bg--sp { display: none; }
.dialog__text {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: auto;
    pointer-events: none;
    z-index: 3;
}
.dialog__text--sp { display: none; }
.dialog__subtext { display: none; }
#prereg-dialog .dialog__text--pc {
    top: 6%;
    width: 80%;
}
.dialog__close {
    position: absolute;
    top: -6%;
    right: -2%;
    width: 8%;
    aspect-ratio: 1;
    width: 7%;
    z-index: 2;
    transition: transform 0.12s ease, opacity 0.12s ease;
}
.dialog__close img { width: 100%; }
.dialog__close:hover { transform: scale(1.08); }
.dialog__stores {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4%;
    width: 76%;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.dialog__store {
    flex: 0 0 38%;
    aspect-ratio: 246 / 90;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dialog__store img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 確認ダイアログの選択ボタン（+1 / +7） */
.dialog__choices {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6%;
    width: 76%;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.dialog__choice {
    flex: 0 0 40%;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.dialog__choice img { width: 100%; height: auto; display: block; }
.dialog__choice:hover { transform: scale(1.04); }
.dialog__choice:active { transform: translateY(1px); filter: brightness(0.92); }
.dialog__choice:focus,
.dialog__choice:focus-visible { outline: none; box-shadow: none; }
.dialog__choice::-moz-focus-inner { border: 0; }

@media screen and (max-width: 768px), screen and (max-aspect-ratio: 1/1) {
    .dialog__box {
        width: 88vw;
        aspect-ratio: 1079 / 861;
    }
    .dialog__bg--pc { display: none; }
    .dialog__bg--sp { display: block; }
    .dialog__text--pc { display: none; }
    .dialog__text--sp { display: block; }
    #prereg-dialog .dialog__text--sp {
        top: 8.5%;
    }
    #prereg-confirm-dialog .dialog__text--sp {
        top: 8%;
        width: 10%;
    }
    #prereg-confirm-dialog .dialog__subtext--sp,
    #prereg-dialog .dialog__subtext--sp {
        display: block;
        position: absolute;
        top: 27%;
        left: 49%;
        transform: translateX(-50%);
        width: 59%;
        height: auto;
        pointer-events: none;
        z-index: 3;
    }
    .dialog__close {
        top: -2%;
        right: 10%;
        width: 9%;
    }
    .dialog__stores {
        top: 44%;
        flex-direction: column;
        align-items: center;
        gap: 1.6%;
        width: 44%;
    }
    .dialog__store { flex: 0 0 auto; width: 100%; }
    .dialog__choices {
        top: 45%;
        flex-direction: column;
        gap: 2vw;
        width: 40%;
    }
    .dialog__choice { flex: 0 0 auto; width: 100%; }
}
