/* === フォント定義 === */
@font-face {
    font-family: 'Tensyo';
    src: url('../fonts/tensyo.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Insou';
    src: url('../fonts/insou.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Koin';
    src: url('../fonts/koin.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Kai';
    src: url('../fonts/kai.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Gyo';
    src: url('../fonts/gyo.ttf') format('truetype');
    font-display: swap;
}

/* === 共通プレビュー用 === */
.fps-container {
    margin: 1em 0;
}

.fps-label {
    font-weight: bold;
    margin-right: 0.5em;
}

.fps-select {
    margin: 0.5em 0;
    padding: 0.5em;
    font-size: 1em;
    appearance: auto;
    -webkit-appearance: menulist-button;
    background: #fff;
}

.fps-input {
    margin: 0.5em 0;
    padding: 0.5em;
    font-size: 1em;
    width: calc(100% - 1em);
    box-sizing: border-box;
}

.fps-preview {
    margin-top: 1em;
    padding: 0.5em 0;
    font-size: 64px;
    line-height: 1;
    white-space: nowrap;
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    background: transparent;
    box-sizing: border-box;
}

/* === モーダルを開くリンク（控えめなボタン風） === */
#fps-modal-open {
    display: inline-block;
    margin: 0.5em 0;
    padding: 0.4em 0.8em;
    font-size: 14px;
    color: #0073aa;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

#fps-modal-open:hover,
#fps-modal-open:focus {
    background-color: #e6f0f7;
    color: #005177;
    text-decoration: none;
}

/* === モーダルの基本レイアウト === */
.fps-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.fps-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-sizing: border-box;
}

/* === モーダルの × ボタン（見やすく・自然） === */
.fps-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    z-index: 1001;
}

.fps-modal-close:hover,
.fps-modal-close:focus {
    color: #000;
    outline: none;
}

/* === モーダル内テキストとUI === */
.fps-modal-instruction {
    margin: 0 0 12px;
    font-size: 14px;
    color: #333;
}

.fps-modal-note {
    margin: 16px 0 0;
    font-size: 12px;
    color: #666;
}

.fps-modal .fps-select {
    width: 100%;
}

.fps-modal .fps-input {
    margin: 0.5em 0;
    padding: 0.75em;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}

.fps-modal .fps-preview {
    padding: 8px 0;
    font-size: 48px;
    line-height: 1;
    white-space: nowrap;
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}

/* === モバイル対応（小さめデバイス） === */
@media (max-width: 480px) {
    .fps-modal-content {
        padding: 16px;
        width: 95%;
    }

    .fps-modal-close {
        top: 8px;
        right: 8px;
        font-size: 28px;
    }

    .fps-modal-instruction {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .fps-modal-note {
        font-size: 11px;
        margin-top: 12px;
    }

    .fps-modal .fps-input {
        padding: 0.5em;
    }

    .fps-modal .fps-preview {
        font-size: 40px;
        padding: 6px 0;
    }
}