/* ============================================================
   ガチャ詳細ページ（外装）
   common.css の共通ヘッダー分の上部余白は layout/base.twig 側の
   既存ルールに準拠。ページ全体は .gacha-page でラップ。
============================================================ */

.gacha-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 19px 16px 40px;
}

.gacha-alert {
    background: #fff0f0;
    border: 1px solid #ffb3b3;
    color: #cc0000;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

/* ============================================================
   バナー（お願い / 天井・ステップアップ）
============================================================ */
.gacha-banners {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.gacha-banner-item {
    flex: 1;
    min-width: 0;
}

.gacha-banner-item__visual {
    position: relative;
    container-type: inline-size;
}

.gacha-banner-item__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* バナー画像の空白部分に重ねる回数表示。
   画像の余白位置に合わせた %指定なので、画像を差し替えた場合はズレる可能性あり。 */
.gacha-banner-item__stage-num,
.gacha-banner-item__ceiling-num {
    position: absolute;
    bottom: 5px;
    font-weight: 900;
    font-size: 9cqw;
    line-height: 1;
    color: #ffffff;
    -webkit-text-stroke: 1.5px #7a3d00;
    text-shadow:
        1px 1px 0 #7a3d00,
        -1px 1px 0 #7a3d00,
        1px -1px 0 #7a3d00,
        -1px -1px 0 #7a3d00;
    transform: translateX(-50%);
}

.gacha-banner-item__stage-num--sr  { left: 14%; }
.gacha-banner-item__stage-num--ssr { left: 46%; }
.gacha-banner-item__stage-num--ur  { left: 85%; }

.gacha-banner-item__stage-num--clear {
    font-size: 5.5cqw;
    color: #ffffff;
    background: #007c99;
    border-radius: 4px;
    padding: 1px 6px;
    -webkit-text-stroke: 0;
    text-shadow: none;
}

.gacha-banner-item__ceiling-num {
    left: 23%;
    color: #5a3800;
    -webkit-text-stroke: 0;
    text-shadow: none;
}

.gacha-banner-item__caption {
    font-size: 11px;
    color: var(--color-text, #555);
    text-align: center;
    margin-top: 4px;
    line-height: 1.4;
}

.gacha-banner-item__caption--red {
    color: #e60012;
    font-weight: 700;
}

.gacha-banner-item__caption--gold {
    color: #d98c00;
    font-weight: 700;
}

.gacha-banner-item__caption--small {
    color: #d98c00;
    font-weight: 700;
    font-size: 11px;
}

.gacha-banner-item__caption--emphasis,
.gacha-banner-item__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    box-sizing: border-box;
    margin-top: 6px;
    background: linear-gradient(180deg, #ffe08a, #ffb300);
    border: 1px solid #d98c00;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 3px rgba(0,0,0,0.15);
    color: #5a3800;
    font-weight: 900;
    font-size: 13px;
    border-radius: 20px;
    padding: 0 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gacha-banner-item__cta {
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.gacha-banner-item__cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.gacha-banner-item__num-highlight {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    background: #ffffff;
    color: #007c99;
    font-size: 15px;
    font-weight: 900;
    border-radius: 50%;
    margin: 0 3px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.gacha-banner-item__form {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.gacha-banner-item__form[hidden] {
    display: none;
}

.gacha-banner-item__select {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid var(--color-border, #ddd);
    padding: 4px 6px;
}

.gacha-banner-item__submit {
    font-size: 11px;
    font-weight: 900;
    background: var(--color-primary, #ff6a00);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
}

/* ============================================================
   メインエリア（ガチャ画像 ＋ 情報）
============================================================ */
.gacha-main {
    display: flex;
    gap: 16px;
    background: #ffffff;
    border: 1px solid var(--color-border, #eee);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ---- 左カラム：ガチャ画像＋いいねバー ---- */
.gacha-main__left {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gacha-main__visual {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light, #f7f7f7);
    border-radius: 10px;
    overflow: hidden;
}

.gacha-main__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.gacha-main__ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    height: 90px;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.gacha-main__ribbon span {
    position: absolute;
    top: 16px;
    left: -28px;
    width: 120px;
    transform: rotate(-45deg);
    background: var(--color-primary, #ff6a00);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    padding: 3px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gacha-main__like {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #ff3355;
    cursor: pointer;
    z-index: 1;
    padding: 0;
}

.gacha-main__like-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.15s ease;
}

.gacha-main__like.is-liked .gacha-main__like-icon {
    fill: currentColor;
}

.gacha-main__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gacha-main__likebar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--color-border, #eee);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

.gacha-main__share {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid var(--color-border, #eee);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--color-text, #555);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gacha-main__share:hover {
    background: #f2f2f2;
    border-color: #ccc;
}

.gacha-main__share-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.gacha-main__share-label {
    font-size: 12px;
    font-weight: 700;
}

.gacha-main__follow {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid var(--color-gold, #ffcc44);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--color-gold, #d98c00);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gacha-main__follow:hover {
    background: #fff7e0;
}

.gacha-main__follow.is-following {
    background: var(--color-gold, #ffcc44);
    color: #5a3800;
}

.gacha-main__follow-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.gacha-main__follow-icon-check {
    display: none;
}

.gacha-main__follow.is-following .gacha-main__follow-icon-plus {
    display: none;
}

.gacha-main__follow.is-following .gacha-main__follow-icon-check {
    display: block;
}

.gacha-main__follow-label {
    font-size: 12px;
    font-weight: 700;
}

.gacha-main__likebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #1877f2;
    color: #ffffff;
    border-radius: 4px;
    font-size: 11px;
}

.gacha-main__likebar-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text, #333);
}

.gacha-main__likebar-count {
    font-size: 12px;
    font-weight: 900;
    color: #1877f2;
}

/* ---- 右カラム：情報 ---- */
.gacha-main__info {
    flex: 1;
    min-width: 0;
}

.gacha-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.gacha-highlight-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff7e0, #ffe9a8);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.gacha-highlight-row:hover,
.gacha-highlight-row:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    filter: brightness(1.05);
}

.gacha-highlight-row--ssr {
    background: linear-gradient(135deg, #f0f0ff, #d8d8ff);
}

.gacha-highlight-row--sr {
    background: linear-gradient(135deg, #e0f4ff, #b8e6ff);
}

.gacha-highlight-row--r {
    background: linear-gradient(135deg, #e8ffe0, #c8f5b8);
}

.gacha-highlight-row--n {
    background: linear-gradient(135deg, #f2f2f2, #e0e0e0);
}

.gacha-icon-rarities {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.gacha-icon-rarities__icon {
    width: 32px;
    height: auto;
}

.gacha-highlight-row__badge {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    max-width: 56px;
    max-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gacha-highlight-row__badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gacha-highlight-row__thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    max-width: 56px;
    max-height: 56px;
    background: var(--color-bg-light, #f7f7f7);
    border-radius: 6px;
    overflow: hidden;
}

.gacha-highlight-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gacha-highlight-row__text {
    flex: 1;
    min-width: 0;
}

.gacha-highlight-row__name {
    font-size: 12px;
    font-weight: 900;
    color: var(--color-text, #333);
    overflow-wrap: break-word;
    word-break: break-word;
}

.gacha-highlight-row__desc {
    font-size: 10px;
    color: var(--color-text-light, #888);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

.gacha-main__buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.gacha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 12px;
    padding: 8px 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.gacha-btn--outline {
    flex: 1;
    background: #f2f2f2;
    color: var(--color-text, #555);
    border: 1px solid var(--color-border, #ddd);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gacha-btn--outline:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.gacha-btn__q {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #3399ff;
    color: #ffffff;
    font-size: 10px;
}

.gacha-btn--img {
    position: relative;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.gacha-btn--img:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.gacha-btn--img img {
    width: 100%;
    height: auto;
    display: block;
}

.gacha-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gacha-main__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.gacha-main__meta-left {
    min-width: 0;
}

.gacha-main__meta-right {
    flex-shrink: 0;
    text-align: right;
}

.gacha-main__title {
    font-size: 16px;
    font-weight: 900;
    color: var(--color-text, #333);
    margin: 0 0 4px;
}

.gacha-main__meta-item {
    font-size: 11px;
    color: var(--color-text-light, #888);
}

.gacha-main__meta-item--period {
    font-size: 13px;
    font-weight: 700;
    color: #0066cc;
}

.gacha-main__shipping {
    font-size: 12px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 2px;
}

/* 2026-09-07追加：特殊配送に該当する景品を含むガチャの注意喚起（すずきP指示） */
.gacha-special-shipping-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    background: #fff4e0;
    color: #b05e00;
    vertical-align: middle;
}
.gacha-special-shipping-notice {
    margin: 12px 0;
    padding: 10px 14px;
    background: #fff4e0;
    color: #b05e00;
    border: 1px solid #f0c987;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

/* 2026-09-15追加：海外発送対応（要件4・7） */
.gacha-international-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    background: #e6f4ff;
    color: #0066cc;
    vertical-align: middle;
}
.gacha-international-notice {
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff0f0;
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    color: #cc0000;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.gacha-main__price {
    font-size: 22px;
    color: var(--color-text, #333);
}

.gacha-main__price strong {
    font-size: 40px;
    color: var(--color-primary, #ff6a00);
}

.gacha-main__divider {
    border: none;
    border-top: 1px solid var(--color-border, #eee);
    margin: 0 0 10px;
}

.gacha-main__spin {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.gacha-main__spin-form {
    flex: 1;
    position: relative;
}

.gacha-main__countdown {
    font-size: 12px;
    color: #cc2200;
    font-weight: 700;
    text-align: center;
}

/* ============================================================
   シェアポップアップ
============================================================ */
.gacha-share-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gacha-share-modal[hidden] {
    display: none;
}

.gacha-share-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.gacha-share-modal__box {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.gacha-share-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--color-text-light, #888);
    cursor: pointer;
}

.gacha-share-modal__title {
    font-size: 16px;
    font-weight: 900;
    color: var(--color-text, #333);
    text-align: center;
    margin-bottom: 14px;
}

.gacha-share-modal__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gacha-share-modal__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 900;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.gacha-share-modal__item--x {
    background: #000000;
    color: #ffffff;
}

.gacha-share-modal__item--line {
    background: #06c755;
    color: #ffffff;
}

.gacha-share-modal__item--copy {
    background: #f2f2f2;
    color: var(--color-text, #333);
    border: 1px solid var(--color-border, #ddd);
}

/* ============================================================
   確率詳細ポップアップ
============================================================ */
.gacha-prob-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gacha-prob-modal[hidden] {
    display: none;
}

.gacha-prob-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.gacha-prob-modal__box {
    position: relative;
    width: 100%;
    max-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.gacha-prob-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--color-text-light, #888);
    cursor: pointer;
}

.gacha-prob-modal__title {
    font-size: 16px;
    font-weight: 900;
    color: var(--color-text, #333);
    text-align: center;
    margin-bottom: 14px;
}

.gacha-prob-modal__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gacha-prob-modal__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: var(--color-bg-light, #f7f7f7);
    border-radius: 8px;
}

.gacha-prob-modal__icon {
    width: 40px;
    height: auto;
    flex: 0 0 40px;
}

.gacha-prob-modal__percent {
    font-size: 15px;
    font-weight: 900;
    color: var(--color-text, #333);
}

/* ============================================================
   景品一覧
============================================================ */
.gacha-section-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--color-text, #333);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-gold, #ffcc44);
}

.gacha-prizes {
    margin-bottom: 24px;
}

.gacha-prize-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border, #eee);
}

.gacha-prize-row__rarity {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gacha-prize-row__rarity img {
    width: 100%;
    height: auto;
    display: block;
}

.gacha-prize-row__items {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.gacha-prize-item {
    width: 104px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.gacha-prize-item:hover,
.gacha-prize-item:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.gacha-prize-item__img-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    background: var(--color-bg-light, #f7f7f7);
    border-radius: 8px;
    overflow: hidden;
}

.gacha-prize-item__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.gacha-prize-item__sold {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gacha-prize-item__name {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text, #333);
    margin-top: 4px;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ---------- アダルト商品：景品画像プレースホルダ（2026-08-23追加） ----------
   is_adult_only のガチャは、景品画像を直接表示せずADULT表記のプレースホルダを出す。
   親要素（.gacha-highlight-row__thumb / .gacha-prize-item__img-wrap）はクリックで
   詳細ポップアップ（実画像）を開く js-item-popup-trigger のため、実画像はクリック後のみ表示される。 */
.gacha-adult-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #1a1a1a;
    color: #ffffff;
    cursor: pointer;
}
.gacha-adult-placeholder span {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
}
.gacha-adult-placeholder small {
    font-size: 8px;
    color: #cccccc;
}
.gacha-highlight-row__thumb .gacha-adult-placeholder span {
    font-size: 10px;
}
.gacha-highlight-row__thumb .gacha-adult-placeholder small {
    display: none;
}

.gacha-prize-item__stock {
    font-size: 11px;
    font-weight: 900;
    color: #1877f2;
}

/* ============================================================
   このテナントのガチャ
============================================================ */
.gacha-others__scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.gacha-others__card {
    flex: 0 0 140px;
    background: #ffffff;
    border: 1px solid var(--color-border, #eee);
    border-radius: 10px;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gacha-others__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.gacha-others__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: var(--color-bg-light, #f7f7f7);
    border-radius: 8px;
}

.gacha-others__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text, #333);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gacha-others__price {
    font-size: 10px;
    color: var(--color-primary, #ff6a00);
}

/* ============================================================
   SP対応（768px以下）
============================================================ */
@media (max-width: 768px) {
    .gacha-main {
        flex-direction: column;
    }

    .gacha-main__left {
        flex: 0 0 auto;
    }

    .gacha-main__visual {
        width: 100%;
        aspect-ratio: 1 / 1;
    }

    .gacha-banners {
        flex-direction: column;
        gap: 8px;
    }

    .gacha-banner-item--off {
        display: none;
    }

    .gacha-highlight-row__badge {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
    }

    .gacha-highlight-row__thumb {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
    }

    .gacha-highlights {
        margin-bottom: 8px;
    }

    .gacha-main__buttons {
        margin-bottom: 8px;
    }

    .gacha-main__title {
        font-size: 14px;
        margin: 0 0 2px;
    }

    .gacha-main__meta-row {
        margin-bottom: 6px;
    }

    .gacha-main__price strong {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .gacha-page {
        padding: 17px 12px 32px;
    }

    .gacha-main__meta-row {
        flex-direction: column;
        gap: 2px;
    }

    .gacha-main__meta-right {
        text-align: left;
    }

    .gacha-prize-item {
        width: 88px;
    }

    .gacha-prize-item__img-wrap {
        width: 88px;
        height: 88px;
    }
}

/* ============================================================
   景品詳細ポップアップ
============================================================ */
.gacha-item-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gacha-item-modal[hidden] {
    display: none;
}

.gacha-item-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.gacha-item-modal__box {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.gacha-item-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--color-text-light, #888);
    cursor: pointer;
}

.gacha-item-modal__rarity {
    width: 72px;
    margin: 0 auto 10px;
}

.gacha-item-modal__rarity img {
    width: 100%;
    height: auto;
    display: block;
}

.gacha-item-modal__img-wrap {
    width: 280px;
    height: 280px;
    max-width: 100%;
    margin: 0 auto 12px;
    background: var(--color-bg-light, #f7f7f7);
    border-radius: 10px;
    overflow: hidden;
}

.gacha-item-modal__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gacha-item-modal__thumbs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 auto 14px;
}

.gacha-item-modal__thumbs[hidden] {
    display: none;
}

.gacha-item-modal__thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    background: var(--color-bg-light, #f7f7f7);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.gacha-item-modal__thumb:hover {
    transform: translateY(-1px);
}

.gacha-item-modal__thumb.is-active {
    border-color: #007c99;
}

.gacha-item-modal__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gacha-item-modal__name {
    font-size: 16px;
    font-weight: 900;
    color: var(--color-text, #333);
    margin-bottom: 6px;
}

.gacha-item-modal__desc {
    max-height: 120px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--color-text-light, #666);
    line-height: 1.6;
    text-align: left;
}

/* ============================================================
   ガチャを回す確認ポップアップ
============================================================ */
.gacha-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gacha-confirm-modal[hidden] {
    display: none;
}

.gacha-confirm-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.gacha-confirm-modal__box {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.gacha-confirm-modal__message {
    font-size: 14px;
    color: var(--color-text, #333);
    line-height: 1.7;
    margin-bottom: 18px;
}

.gacha-confirm-modal__message strong {
    font-size: 17px;
    color: #d98c00;
}

/* 2026-09-15追加：日本専用ガチャの海外会員向け確認モーダル（日英併記、要件5） */
.gacha-confirm-modal__message-ja {
    margin: 0 0 8px;
}
.gacha-confirm-modal__message-en {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-light, #777);
}

.gacha-confirm-modal__buttons {
    display: flex;
    gap: 10px;
}

.gacha-confirm-modal__btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 20px;
    font-weight: 900;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.gacha-confirm-modal__btn--cancel {
    background: #f2f2f2;
    color: var(--color-text, #555);
    border: 1px solid var(--color-border, #ddd);
}

.gacha-confirm-modal__btn--cancel:hover {
    background: #e8e8e8;
}

.gacha-confirm-modal__btn--ok {
    background: linear-gradient(180deg, #ffe08a, #ffb300);
    border: 1px solid #d98c00;
    color: #5a3800;
}

.gacha-confirm-modal__btn--ok:hover {
    filter: brightness(1.05);
}

/* ============================================================
   コイン不足ポップアップ
============================================================ */
.gacha-coin-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gacha-coin-modal[hidden] {
    display: none;
}

.gacha-coin-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.gacha-coin-modal__box {
    position: relative;
    width: 100%;
    max-width: 360px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.gacha-coin-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--color-text-light, #888);
    cursor: pointer;
}

.gacha-coin-modal__title {
    font-size: 17px;
    font-weight: 900;
    color: #ff3355;
    margin-bottom: 8px;
}

.gacha-coin-modal__info {
    font-size: 13px;
    color: var(--color-text, #555);
    line-height: 1.7;
    margin-bottom: 16px;
}

.gacha-coin-modal__info strong {
    color: var(--color-text, #333);
    font-size: 15px;
}

.gacha-coin-modal__packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.gacha-coin-modal__package {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 10px;
    background: #f8f8f8;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.gacha-coin-modal__package:hover {
    transform: translateY(-1px);
    background: #f0f0f0;
}

.gacha-coin-modal__package.is-recommended {
    border-color: #ffb300;
    background: linear-gradient(180deg, #fff7e0, #ffe9a8);
}

.gacha-coin-modal__package-coins {
    font-size: 14px;
    font-weight: 900;
    color: var(--color-text, #333);
}

.gacha-coin-modal__package-coins small {
    font-size: 10px;
    font-weight: 700;
    margin-left: 2px;
}

.gacha-coin-modal__package-price {
    font-size: 12px;
    font-weight: 700;
    color: #d98c00;
}

.gacha-coin-modal__package:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   抽選結果画面（演出動画＋景品一覧）2026-08-24追加
============================================================ */
.gacha-result-page {
    min-height: 100vh;
    padding: calc(var(--header-height, 60px) + 16px) 16px 40px;
    background: #f7f7f7;
}

/* ---------- 演出動画オーバーレイ ---------- */
.gacha-effect-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gacha-effect-overlay__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.gacha-effect-overlay__skip {
    position: absolute;
    top: calc(var(--header-height, 60px) + 12px);
    right: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.85);
    color: #333;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.gacha-effect-overlay__unmute {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- 結果一覧 ---------- */
.gacha-result[hidden] {
    display: none;
}

.gacha-result__error {
    color: #d32f2f;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 24px 0;
}

.gacha-result__title {
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    color: var(--color-text, #333);
    margin: 0 0 16px;
}

.gacha-result__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}

.gacha-result__item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--color-border, #e0e0e0);
    padding: 6px;
    text-align: center;
}

.gacha-result__item-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 26px;
    height: 26px;
    z-index: 1;
}

.gacha-result__item-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gacha-result__item-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f2f2f2;
}

.gacha-result__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gacha-result__item-name {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text, #333);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gacha-result__summary {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-light, #777);
    margin: 20px 0 0;
}

.gacha-result__actions {
    text-align: center;
    margin-top: 24px;
}

.gacha-result__back-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffe08a, #ffb300);
    border: 1px solid #d98c00;
    color: #5a3800;
    font-weight: 900;
    font-size: 14px;
    text-decoration: none;
}