.oshi-inner {
    width: 100%;
}


.oshi-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 3%;
}

.oshi-page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}


.oshi-add-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    background: var(--theme-color);
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 300;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.oshi-add-icon {
    font-size: 20px;
    line-height: 1;
}


.oshi-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 28px;
}

.oshi-card {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 130px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: none;
    border-radius: 14px;
    background: var(--oshi-card-color, var(--theme-color));
    color: #ffffff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: var(--oshi-card-color, var(--theme-color));
    color: var(--oshi-card-text-color, #FFFFFF);
}


.oshi-card-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #eeeeee;


    background-color: #eeeeee;
    background-image: url("../image/icons/sample.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.oshi-card-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


.oshi-card-content {
    flex: 1;
    min-width: 0;
    margin-right: 24px;
}

.oshi-add-content *,
.oshi-add-content *::before,
.oshi-add-content *::after {
    box-sizing: border-box;
}

.oshi-card-name {
    margin: 0;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;

    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
}

.oshi-card-name-text {
    display: inline-block;
    white-space: nowrap;
    will-change: transform, opacity;
}

.oshi-card-name::-webkit-scrollbar {
    display: none;
}

.oshi-card-genre {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 300;
}

.oshi-card-days {
    margin: 17px 0 0;
    font-size: 14px;
    font-weight: 200;
}


/* 選択中 */

.oshi-selected-badge {
    position: absolute;
    top: 16px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--theme-color);
    font-size: 11px;
    font-weight: 500;
}

.oshi-selected-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-color);
}


.oshi-card-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 38px;
    font-weight: 100;
    line-height: 1;
}

/* Bottom Sheet */
/* モーダル全体 */
.oshi-add-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow-y: scroll;
    overflow-x: hidden;
    overscroll-behavior: none;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.oshi-add-modal.is-opening {
    scroll-snap-type: none;
}

.oshi-add-modal.is-closing {
    scroll-snap-type: none;
}

/* 開く準備中はシートを非表示にする */
.oshi-add-modal.is-preparing .oshi-add-sheet {
    visibility: hidden;
}

.oshi-add-modal::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    scroll-snap-align: end;
    pointer-events: none;
}

/* 背景 */
.oshi-add-modal::backdrop {
    background: rgba(0, 0, 0, var(--backdrop-opacity, 0.55));
    animation: oshi-backdrop-fade 0.3s ease;
}

@keyframes oshi-backdrop-fade {
    from {
        background: rgba(0, 0, 0, 0);
    }

    to {
        background: rgba(0, 0, 0, 0.55);
    }
}

.oshi-add-modal.is-closing::backdrop {
    animation: oshi-backdrop-out 0.3s ease forwards;
}

@keyframes oshi-backdrop-out {
    from {
        background: rgba(0, 0, 0, 0.55);
    }

    to {
        background: rgba(0, 0, 0, 0);
    }
}

/* Bottom Sheet本体 */
.oshi-add-sheet {
    display: flex;
    flex-direction: column;
    width: calc(100% - 32px);
    max-width: 361px;
    height: calc(100svh - 50px);
    margin: 0 auto 8px;
    border-radius: 24px;
    background: #ffffff;
    overflow: hidden;
    scroll-snap-align: end;
}

.oshi-add-top {
    flex-shrink: 0;
    padding: 20px 24px 0;
    background: #ffffff;
    z-index: 2;
}

/* 上部ハンドル */
.oshi-add-handle {
    width: 40px;
    height: 5px;
    margin: 0 auto 24px;
    border-radius: 999px;
    background: #d1d1d6;
    cursor: grab;
}

.oshi-add-content {
    flex: 1;
    min-height: 0;
    padding: 0 24px 80px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

/* ヘッダー */

.oshi-add-header {
    position: relative;
    padding-bottom: 24px;
}

.oshi-add-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
}

.oshi-add-description {
    margin: 4px 0 0;
    color: #aaaaaa;
    font-size: 13px;
    font-weight: 400;
}


/* 閉じるボタン */
.oshi-add-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #555555;
    font-family: inherit;
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.oshi-add-close:focus {
    outline: none;
}

.oshi-add-close:focus-visible {
    outline: none;
}


/* ==============================
   アイコン
============================== */

.oshi-icon-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

/* アイコンとポップオーバーの基準位置 */
.oshi-icon-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
}

/* ポップオーバー */
.oshi-icon-popover {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);

    width: 220px;
    padding: 8px;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

    z-index: 10;
}

/* 非表示を優先 */
.oshi-icon-popover[hidden] {
    display: none;
}

/* メニュー内のボタン */
.oshi-icon-popover button {
    display: block;
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 8px;
    background: transparent;

    color: #333333;
    font-family: inherit;
    font-size: 14px;
    text-align: left;

    cursor: pointer;
}

/* マウス操作時の反応 */
@media (hover: hover) {
    .oshi-icon-popover button:hover {
        background: #f0f0f5;
    }
}

/* 2つのボタンの区切り線 */
.oshi-icon-select {
    border-bottom: 1px solid #eeeeee !important;
    border-radius: 0 !important;
}

.oshi-icon-button {
    position: relative;
    width: 96px;
    height: 96px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.oshi-icon-placeholder {
    display: block;

    width: 100%;
    height: 100%;

    border-radius: 50%;
    background: #f0f0f5;
}

.oshi-icon-preview {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.oshi-icon-preview[hidden] {
    display: none;
}

.oshi-icon-plus {
    position: absolute;
    right: -2px;
    bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--theme-color);
    color: #ffffff;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}

.oshi-icon-label {
    margin: 8px 0 0;
    color: #c8cad4;
    font-size: 14px;
    font-weight: 500;
}

/* フォーム共通部分 */
.oshi-form-field {
    width: 100%;
    min-width: 0;
    margin: 24px 0 0;
    padding: 0;
    border: none;
}

.oshi-form-label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    color: #111111;
    font-size: 16px;
    font-weight: 600;
}


/* 名前 */
.oshi-name-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #aaaaaa;
    border-radius: 16px;
    outline: none;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 16px;
}

.oshi-name-input::placeholder {
    color: #c8cad4;
}

.oshi-name-input:focus {
    border-color: var(--theme-color);
}

.oshi-name-count {
    margin: 6px 0 0;
    color: #c8cad4;
    font-size: 14px;
    text-align: right;
}


/* 性別 */
.oshi-gender-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* 活動ジャンル */
.oshi-genre-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}


/* 活動ジャンル共通 */
.oshi-option {
    display: block;
    cursor: pointer;
}

.oshi-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.oshi-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #f5f5fa;
    color: #8e94aa;
    font-size: 14px;
    font-weight: 500;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


/* 選択されている項目 */
.oshi-option input:checked+span {
    background: var(--theme-color);
    color: #ffffff;
}


/* ジャンルの未選択ボタンは枠線あり */
.oshi-genre-options .oshi-option span {
    border-color: #aaaaaa;
    background: #ffffff;
}

.oshi-genre-options .oshi-option input:checked+span {
    border-color: var(--theme-color);
    background: var(--theme-color);
    color: #ffffff;
}


/* 推し色 */
.oshi-color-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.oshi-color-option {
    position: relative;
    display: block;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.oshi-color-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.oshi-color-circle {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--oshi-color);
}

.oshi-color-option input:checked+.oshi-color-circle {
    outline: 3px solid var(--oshi-color);
    outline-offset: 3px;
}



/* カスタムカラー */
.oshi-color-custom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px dashed #d9dce8;
    border-radius: 50%;
    background: transparent;
    color: var(--theme-color);
    font-family: inherit;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}


/* 推し始めた日 */
.oshi-date-input {
    display: block;
    width: -webkit-fill-available;
    max-width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #aaaaaa;
    border-radius: 16px;
    outline: none;
    background: #ffffff;
    color: #8e94aa;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}

.oshi-date-input::-webkit-date-and-time-value {
    margin: 0;
    min-height: 100%;
    display: flex;
    align-items: center;
    text-align: left;
}


/* 追加するボタン */
.oshi-submit-button {
    width: 100%;
    height: 56px;
    margin-top: 50px;
    border: none;
    border-radius: 999px;
    background: var(--theme-color);
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* カラーピッカー本体は非表示 */
.oshi-color-picker {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

/* カスタムカラー選択中 */
.oshi-color-custom.is-selected {
    border: none;
    outline: 3px solid currentColor;
    outline-offset: 3px;
    color: var(--selected-custom-color);
}



/* 推し登録完了ダイアログ */
.oshi-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 表示中 */
.oshi-success-overlay.is-visible {
    opacity: 1;
}

/* hidden属性を優先する */
.oshi-success-overlay[hidden] {
    display: none;
}

.oshi-success-dialog {
    width: 353px;
    max-width: 100%;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: 20px;
    background: #fff;
}

.oshi-success-icon {
    font-size: 40px;
    line-height: 1;
}

.oshi-success-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.oshi-success-button {
    width: 180px;
    height: 50px;
    flex-shrink: 0;
    border: none;
    border-radius: 25px;
    background: var(--theme-color);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}


/* ========================================
   アイコントリミング画面
======================================== */

.oshi-crop-modal {
    position: fixed;
    inset: 0;
    width: calc(100% - 32px);
    max-width: 400px;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 24px;
    background: #ffffff;
    color: #222222;
    overflow: hidden;
}

.oshi-crop-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.oshi-crop-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

/* ヘッダー */
.oshi-crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.oshi-crop-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.oshi-crop-close {
    border: none;
    background: transparent;
    color: #666666;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

/* 画像編集エリア */
.oshi-crop-area {
    width: 100%;
    height: 280px;
    background: #20212b;
    overflow: hidden;
}

.oshi-crop-image {
    display: block;
    max-width: 100%;
}

/* 拡大率 */
.oshi-crop-zoom {
    display: flex;
    align-items: center;
    gap: 16px;
}

.oshi-crop-zoom span {
    font-size: 22px;
    color: #777777;
}

.oshi-crop-slider {
    flex: 1;
    min-width: 0;
    accent-color: var(--theme-color);
}

/* 操作ボタン */
.oshi-crop-actions {
    display: flex;
    gap: 12px;
}

.oshi-crop-actions button {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.oshi-crop-cancel {
    background: #f0f0f5;
    color: #555555;
}

.oshi-crop-confirm {
    background: var(--theme-color);
    color: #ffffff;
}