/**
 * 口コミ投稿モーダル スタイルシート
 */

/* カラーパレット */
:root {
    --frs-primary: #022f7c;
    --frs-primary-light: #0449a6;
    --frs-primary-dark: #021e4f;
    --frs-primary-bg: #f0f9ff;
    --frs-primary-bg-dark: #e0f2fe;
    
    --frs-success: #10b981;
    --frs-warning: #f59e0b;
    --frs-error: #ef4444;
    --frs-star: #fbbf24;
    
    --frs-gray-50: #f9fafb;
    --frs-gray-100: #f3f4f6;
    --frs-gray-200: #e5e7eb;
    --frs-gray-300: #d1d5db;
    --frs-gray-400: #9ca3af;
    --frs-gray-500: #6b7280;
    --frs-gray-600: #4b5563;
    --frs-gray-700: #374151;
    --frs-gray-800: #1f2937;
    --frs-gray-900: #111827;
    
    --frs-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --frs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --frs-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --frs-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --frs-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --frs-radius-sm: 6px;
    --frs-radius-md: 8px;
    --frs-radius-lg: 12px;
    --frs-radius-xl: 16px;
}

/* 口コミを書くボタン */
.frs-write-review-button,
button.frs-write-review-button,
#frs-open-review-modal.frs-write-review-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 10px 12px !important;
    background: linear-gradient(135deg, var(--frs-primary) 0%, var(--frs-primary-light) 100%) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: var(--frs-font-sans) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 3px 8px rgba(2, 47, 124, 0.15) !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: unset !important;
    width: auto !important;
    max-width: fit-content !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
}

/* シャインエフェクトを削除してシンプルに */

.frs-write-review-button svg,
.frs-write-review-button .frs-w-4,
#frs-open-review-modal svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.frs-write-review-button:hover,
button.frs-write-review-button:hover,
#frs-open-review-modal.frs-write-review-button:hover {
    background: linear-gradient(135deg, var(--frs-primary-light) 0%, var(--frs-primary) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(2, 47, 124, 0.25) !important;
}

.frs-write-review-button:active,
button.frs-write-review-button:active,
#frs-open-review-modal.frs-write-review-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(2, 47, 124, 0.2) !important;
}

/* モーダル基本構造 */
.frs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.frs-modal.active {
    display: block;
}

.frs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.frs-modal-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.frs-modal-content {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* モーダルヘッダー */
.frs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, #022f7c 0%, #0449a6 100%);
    border-bottom: 2px solid #022f7c;
}

.frs-modal-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    font-family: var(--frs-font-sans) !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.frs-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    color: #ffffff;
    border-radius: 50%;
    transition: all 0.2s;
}

.frs-modal-close {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.frs-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.frs-modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* モーダルボディ */
.frs-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

/* プログレスバー */
.frs-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 24px;
    position: relative;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(2, 47, 124, 0.1);
    box-shadow: 0 4px 12px rgba(2, 47, 124, 0.08);
}

.frs-progress-bar::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, #e5e7eb 0%, #e5e7eb 100%);
    z-index: 0;
    border-radius: 2px;
}

.frs-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.frs-step-number {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    color: #9ca3af;
    margin-bottom: 10px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.frs-progress-step.active .frs-step-number {
    background: linear-gradient(135deg, #022f7c 0%, #0449a6 100%);
    border-color: #022f7c;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(2, 47, 124, 0.3);
}

.frs-progress-step.completed .frs-step-number {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.frs-progress-step.completed .frs-step-number::after {
    content: '✓';
    position: absolute;
    font-size: 20px;
}

.frs-progress-step.completed .frs-step-number {
    font-size: 0;
}

.frs-step-label {
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
    text-align: center;
}

/* フォームステップ */
.frs-form-step-content {
    margin-bottom: 32px;
    padding: 28px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.frs-step-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: var(--frs-font-sans) !important;
    color: var(--frs-primary) !important;
    margin-bottom: 28px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--frs-gray-200);
    position: relative;
    display: inline-block;
    width: 100%;
    letter-spacing: -0.025em;
}

.frs-step-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--frs-primary) 0%, var(--frs-primary-light) 100%);
    border-radius: 2px;
}

/* ナビゲーションボタン */
.frs-form-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    margin-top: 32px;
    border-top: 2px solid #e5e7eb;
    position: relative;
}

.frs-form-nav::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #022f7c 0%, transparent 100%);
}

.frs-btn-prev,
.frs-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.frs-btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.frs-btn-prev:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.frs-btn-next,
.frs-btn-primary {
    background: linear-gradient(135deg, #022f7c 0%, #0449a6 100%);
    color: #ffffff;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(2, 47, 124, 0.2);
}

.frs-btn-next:hover,
.frs-btn-primary:hover {
    background: linear-gradient(135deg, #0449a6 0%, #022f7c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 47, 124, 0.3);
    color: #ffffff;
}

.frs-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.frs-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.frs-btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* 評価コンテナ（モーダル用） */
.frs-rating-container-modal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* 確認画面 */
.frs-confirm-content {
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
}

.frs-confirm-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #022f7c !important;
    margin-bottom: 24px !important;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border: 1px solid #bfdbfe;
}

.frs-review-preview {
    background: linear-gradient(135deg, #fafbfc 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.frs-preview-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e5e7eb;
}

.frs-preview-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.frs-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.frs-preview-value {
    font-size: 14px;
    color: #111827;
    line-height: 1.6;
}

.frs-preview-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.frs-preview-stars {
    display: flex;
    gap: 2px;
}

.frs-confirm-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* 完了画面 */
.frs-complete-content {
    text-align: center;
    padding: 40px 20px;
}

.frs-complete-icon {
    margin-bottom: 20px;
}

.frs-complete-icon svg {
    color: #10b981;
}

.frs-complete-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #022f7c !important;
    margin-bottom: 16px !important;
    background: linear-gradient(135deg, #022f7c, #0449a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.frs-complete-message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* レスポンシブ対応 */
/* フォーカス時のアニメーション */
@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 47, 124, 0);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(2, 47, 124, 0.1);
    }
}

@keyframes inputShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

.frs-form-input:focus,
.frs-form-select:focus,
.frs-form-textarea:focus {
    animation: inputFocus 0.3s ease;
}

.frs-form-input.error,
.frs-form-select.error,
.frs-form-textarea.error {
    animation: inputShake 0.4s ease;
}

/* 星評価のアニメーション */
@keyframes starPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
}

@keyframes starFill {
    from {
        fill: transparent;
        stroke: #d1d5db;
    }
    to {
        fill: #fbbf24;
        stroke: #fbbf24;
    }
}

@keyframes starSparkle {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
    }
    100% {
        filter: brightness(1);
    }
}

.frs-star {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.frs-star:active svg {
    animation: starPulse 0.3s ease;
}

.frs-star.active svg {
    animation: starFill 0.3s ease-out forwards, starSparkle 0.6s ease;
}

/* レスポンシブデザイン */

/* タブレット表示 (768px以下) */
@media (max-width: 768px) {
    .frs-modal-content {
        max-width: calc(100% - 40px);
        max-height: calc(100vh - 40px);
        margin: 20px;
    }
    
    .frs-modal-header {
        padding: 20px 24px;
    }
    
    .frs-modal-title {
        font-size: 20px !important;
    }
    
    .frs-modal-body {
        padding: 24px;
    }
    
    .frs-form-step-content {
        padding: 20px;
    }
    
    .frs-progress-bar {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .frs-step-label {
        font-size: 11px;
    }
    
    .frs-step-number {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    /* フォームレイアウト */
    .frs-form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .frs-col-half {
        width: 100%;
    }
    
    /* 星評価 */
    .frs-rating-container-modal {
        gap: 16px;
        padding: 16px;
    }
    
    .frs-rating-item {
        padding: 14px 16px;
    }
}

/* スマートフォン表示 (640px以下) */
@media (max-width: 640px) {
    .frs-modal-content {
        max-width: calc(100% - 30px);
        max-height: 85vh;
        height: auto;
        border-radius: 12px;
        margin: 0;
        display: flex;
        flex-direction: column;
        position: relative;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .frs-modal-container {
        padding: 0;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
    }
    
    .frs-modal-header {
        padding: 16px 20px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .frs-modal-title {
        font-size: 18px !important;
    }
    
    .frs-modal-close {
        width: 32px;
        height: 32px;
    }
    
    .frs-modal-body {
        padding: 20px;
        flex: 1;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }
    
    .frs-form-step-content {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    /* プログレスバー */
    .frs-progress-bar {
        padding: 12px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .frs-progress-bar::before {
        display: none;
    }
    
    .frs-step-label {
        font-size: 10px;
    }
    
    .frs-step-number {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    /* フォーム要素 */
    .frs-form-label {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .frs-form-input,
    .frs-form-select,
    .frs-form-textarea {
        padding: 10px 14px;
        font-size: 16px; /* iOSのzoom防止 */
    }
    
    .frs-form-textarea {
        min-height: 100px;
    }
    
    /* ラジオボタン */
    .frs-radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .frs-radio-label {
        padding: 10px 14px;
    }
    
    /* 星評価 */
    .frs-rating-container-modal {
        gap: 12px;
        padding: 12px;
    }
    
    .frs-rating-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    
    .frs-rating-label {
        min-width: auto;
        font-size: 13px;
    }
    
    .frs-star-rating {
        justify-content: center;
    }
    
    .frs-star {
        width: 24px;
        height: 24px;
    }
    
    .frs-star svg {
        width: 24px;
        height: 24px;
    }
    
    .frs-overall-rating .frs-star {
        width: 28px;
        height: 28px;
    }
    
    .frs-overall-rating .frs-star svg {
        width: 28px;
        height: 28px;
    }
    
    .frs-rating-value {
        font-size: 13px;
        padding: 3px 6px;
    }
    
    /* ナビゲーションボタン */
    .frs-form-nav {
        padding-top: 16px;
        margin-top: 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .frs-btn-prev,
    .frs-btn-next,
    .frs-btn-primary,
    .frs-btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .frs-btn-next,
    .frs-btn-primary {
        margin-left: 0;
        flex: 1;
    }
    
    /* 確認画面 */
    .frs-confirm-content {
        padding: 20px;
    }
    
    .frs-confirm-title {
        font-size: 18px !important;
        padding: 10px;
        margin-bottom: 16px !important;
    }
    
    .frs-review-preview {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .frs-preview-section {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .frs-preview-label {
        font-size: 11px;
    }
    
    .frs-preview-value {
        font-size: 13px;
    }
    
    .frs-confirm-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .frs-btn-secondary,
    .frs-btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    /* 完了画面 */
    .frs-complete-content {
        padding: 30px 20px;
    }
    
    .frs-complete-title {
        font-size: 22px !important;
        margin-bottom: 12px !important;
    }
    
    .frs-complete-message {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    /* 口コミを書くボタン */
    .frs-write-review-button,
    button.frs-write-review-button,
    #frs-open-review-modal.frs-write-review-button {
        padding: 9px 11px !important;
        font-size: 11px !important;
        min-width: unset !important;
        gap: 3px !important;
    }
    
    .frs-write-review-button svg {
        width: 12px !important;
        height: 12px !important;
    }
    
    .frs-write-review-button svg {
        width: 16px;
        height: 16px;
    }
}

/* 小型スマートフォン (480px以下) */
@media (max-width: 480px) {
    .frs-step-title {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
    
    .frs-form-group {
        margin-bottom: 16px;
    }
    
    /* チェックボックス */
    .frs-checkbox-label {
        padding: 10px;
    }
    
    .frs-checkbox-label span {
        font-size: 12px;
    }
    
    /* 文字数カウンター */
    .frs-char-count {
        font-size: 11px;
    }
    
    /* 口コミを書くボタン */
    .frs-write-review-button,
    button.frs-write-review-button,
    #frs-open-review-modal.frs-write-review-button {
        width: 100% !important;
        padding: 10px 14px !important;
        font-size: 12px !important;
    }
}

/* iPhone SEなどの小さいデバイス (375px以下) */
@media (max-width: 375px) {
    .frs-progress-step {
        transform: scale(0.9);
    }
    
    .frs-star {
        width: 22px;
        height: 22px;
    }
    
    .frs-star svg {
        width: 22px;
        height: 22px;
    }
    
    .frs-overall-rating .frs-star {
        width: 26px;
        height: 26px;
    }
    
    .frs-overall-rating .frs-star svg {
        width: 26px;
        height: 26px;
    }
}

/* 大画面デバイス向け調整 (1024px以上) */
@media (min-width: 1024px) {
    .frs-modal-content {
        max-width: 800px;
    }
    
    .frs-write-review-button,
    button.frs-write-review-button,
    #frs-open-review-modal.frs-write-review-button {
        padding: 11px 14px !important;
        font-size: 13px !important;
    }
}

/* アニメーション */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(2px);
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes progressPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 47, 124, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(2, 47, 124, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(2, 47, 124, 0);
    }
}

@keyframes checkmarkDraw {
    from {
        stroke-dashoffset: 100;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes buttonPress {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
}

.frs-modal {
    transition: visibility 0s linear 0.3s;
}

.frs-modal.active {
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: visibility 0s linear 0s;
}

.frs-modal.active .frs-modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* プログレスステップのアニメーション */
.frs-progress-step {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.frs-progress-step.active .frs-step-number {
    animation: progressPulse 2s infinite;
}

.frs-progress-step.completed .frs-step-number::after {
    animation: checkmarkDraw 0.3s ease-out;
}

/* ボタンのアニメーション */
.frs-btn-prev:active,
.frs-btn-next:active,
.frs-btn-primary:active,
.frs-btn-secondary:active {
    animation: buttonPress 0.2s ease-out;
}

/* フォーム基本スタイル */
.frs-form-group {
    margin-bottom: 24px;
}

.frs-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.frs-col-half {
    flex: 1;
}

/* フォームラベル */
.frs-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--frs-font-sans);
    color: var(--frs-gray-700);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
    text-transform: none;
    line-height: 1.4;
}

.frs-form-label.required::after {
    content: '*';
    color: var(--frs-error);
    margin-left: 4px;
    font-weight: 700;
    font-size: 14px;
}

/* テキスト入力フィールド */
.frs-form-input,
.frs-form-select,
.frs-form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.frs-form-input:focus,
.frs-form-select:focus,
.frs-form-textarea:focus {
    border-color: #022f7c;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(2, 47, 124, 0.1);
}

.frs-form-input:hover,
.frs-form-select:hover,
.frs-form-textarea:hover {
    border-color: #9ca3af;
}

.frs-form-input::placeholder,
.frs-form-textarea::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

/* セレクトボックス */
.frs-form-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L2 5h8z' fill='%23374151'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.frs-form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L2 5h8z' fill='%23022f7c'/%3E%3C/svg%3E");
}

/* テキストエリア */
.frs-form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* インプットグループ（単位付き） */
.frs-input-group {
    display: flex;
    align-items: stretch;
    position: relative;
}

.frs-input-group .frs-form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-right: 12px;
}

.frs-input-addon {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    min-width: 40px;
    justify-content: center;
}

.frs-input-group:focus-within .frs-input-addon {
    border-color: #022f7c;
    background: #e0f2fe;
    color: #022f7c;
}

/* ラジオボタン */
.frs-radio-group {
    display: flex;
    gap: 16px;
    padding: 4px 0;
}

.frs-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    background: #ffffff;
    flex: 1;
}

.frs-radio-label:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.frs-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #022f7c;
    cursor: pointer;
}

.frs-radio-label:has(input:checked) {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #022f7c;
    box-shadow: 0 0 0 3px rgba(2, 47, 124, 0.1);
}

.frs-radio-label span {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.frs-radio-label:has(input:checked) span {
    color: #022f7c;
    font-weight: 600;
}

/* チェックボックス */
.frs-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.frs-checkbox-label:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.frs-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    accent-color: #022f7c;
    cursor: pointer;
    flex-shrink: 0;
}

.frs-checkbox-label span {
    font-size: 13px;
    line-height: 1.6;
    color: #4b5563;
}

.frs-checkbox-label span a {
    color: #022f7c;
    text-decoration: underline;
    font-weight: 600;
}

.frs-checkbox-label span a:hover {
    color: #0449a6;
}

/* 文字数カウンター */
.frs-char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    font-weight: 500;
}

.frs-char-count.warning {
    color: #f59e0b;
}

.frs-char-count.error {
    color: #ef4444;
    font-weight: 600;
}

/* 星評価システム */
.frs-rating-container-modal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.frs-rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.frs-rating-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.frs-rating-item.frs-overall-rating {
    background: linear-gradient(135deg, #022f7c 0%, #0449a6 100%);
    border: none;
    padding: 20px 24px;
    box-shadow: 0 4px 12px rgba(2, 47, 124, 0.2);
}

.frs-rating-item.frs-overall-rating .frs-rating-label {
    color: #ffffff;
    font-size: 16px;
}

.frs-rating-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    min-width: 140px;
}

.frs-star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

.frs-star {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: all 0.2s;
}

.frs-star-container {
    position: relative;
    display: inline-block;
}

.frs-star-left,
.frs-star-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    z-index: 2;
}

.frs-star-left {
    left: 0;
}

.frs-star-right {
    right: 0;
}

.frs-star svg {
    width: 28px;
    height: 28px;
    stroke: #d1d5db;
    stroke-width: 2;
    fill: none;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}

.frs-star-background {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.frs-star-foreground {
    position: relative;
    z-index: 1;
}

.frs-star:hover svg {
    stroke: #fbbf24;
    transform: scale(1.15);
}

.frs-star.filled svg {
    fill: #fbbf24;
    stroke: #fbbf24;
}

.frs-star.half-filled .frs-star-background svg {
    fill: #fbbf24;
    stroke: #fbbf24;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.frs-star.hover svg {
    fill: #fed7aa;
    stroke: #fbbf24;
}

.frs-star-left:hover ~ .frs-star-foreground svg {
    fill: #fed7aa;
    stroke: #fbbf24;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.frs-star-right:hover ~ .frs-star-foreground svg {
    fill: #fed7aa;
    stroke: #fbbf24;
}

/* 総合評価の星 */
.frs-overall-rating .frs-star {
    width: 32px;
    height: 32px;
}

.frs-overall-rating .frs-star svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255, 255, 255, 0.5);
}

.frs-overall-rating .frs-star:hover svg {
    stroke: #fbbf24;
}

.frs-overall-rating .frs-star.filled svg,
.frs-overall-rating .frs-star.half-filled .frs-star-background svg {
    fill: #fbbf24;
    stroke: #fbbf24;
}

/* 評価値表示 */
.frs-rating-value {
    margin-left: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    min-width: 30px;
    text-align: center;
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 6px;
}

.frs-rating-value.frs-large {
    font-size: 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
}

/* エラー状態 */
.frs-form-input.error,
.frs-form-select.error,
.frs-form-textarea.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.frs-form-input.error:focus,
.frs-form-select.error:focus,
.frs-form-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.frs-error-message {
    display: block;
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
    font-weight: 500;
}

/* ローディングスピナー */
.frs-button-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.frs-spinner {
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 成功アニメーション */
@keyframes successBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.frs-complete-icon {
    animation: successBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* =================================================================
   UX最適化スタイル - UX心理学原則に基づく改善
   ================================================================= */

/* プログレスラッパー */
.frs-progress-wrapper {
    margin-bottom: 24px;
}

/* 目標勾配効果：残りステップメッセージ */
.frs-progress-message {
    text-align: center;
    margin-top: 16px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    animation: fadeInUp 0.3s ease;
}

.frs-progress-text {
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

.frs-progress-text strong {
    font-weight: 700;
    color: #15803d;
}

/* 完了間近のメッセージ */
.frs-progress-message.frs-almost-done {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.frs-progress-message.frs-almost-done .frs-progress-text {
    color: #92400e;
}

.frs-progress-message.frs-almost-done .frs-progress-text strong {
    color: #b45309;
}

/* 自動保存インジケーター（損失回避） */
.frs-autosave-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #93c5fd;
    border-radius: 6px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.frs-autosave-icon {
    color: #2563eb;
    flex-shrink: 0;
}

.frs-autosave-text {
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
}

/* コンフェッティキャンバス */
.frs-confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* 完了画面の強化（ピーク・エンドの法則） */
.frs-complete-celebration {
    margin-bottom: 24px;
}

.frs-complete-icon-wrapper {
    position: relative;
    display: inline-block;
}

.frs-complete-icon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    border: 3px solid #10b981;
    border-radius: 50%;
    animation: ringExpand 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes ringExpand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 1;
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

.frs-complete-content .frs-complete-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    animation: iconPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes iconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.frs-complete-content .frs-complete-icon svg {
    color: #ffffff;
    animation: checkDraw 0.4s ease-out 0.3s forwards;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

@keyframes checkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.frs-complete-content .frs-complete-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 24px 0 16px !important;
    animation: fadeInUp 0.4s ease 0.2s forwards;
    opacity: 0;
}

.frs-complete-message-box {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease 0.3s forwards;
    opacity: 0;
}

.frs-complete-content .frs-complete-message {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.8;
    margin: 0;
}

.frs-complete-content .frs-complete-message strong {
    color: #022f7c;
    font-weight: 600;
}

.frs-complete-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    animation: fadeInUp 0.4s ease 0.4s forwards;
    opacity: 0;
}

.frs-complete-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.frs-complete-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #022f7c;
}

.frs-complete-stat-text {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.frs-btn-complete {
    animation: fadeInUp 0.4s ease 0.5s forwards;
    opacity: 0;
    min-width: 160px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* インラインバリデーション */
.frs-field-valid {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

.frs-field-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.frs-validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.frs-form-group.valid .frs-validation-icon.valid-icon {
    display: block;
    color: #10b981;
}

.frs-form-group.invalid .frs-validation-icon.invalid-icon {
    display: block;
    color: #ef4444;
}

.frs-inline-error {
    display: none;
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    padding-left: 4px;
    animation: shakeError 0.4s ease;
}

.frs-form-group.invalid .frs-inline-error {
    display: block;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* 成功フィードバック */
.frs-inline-success {
    display: none;
    font-size: 12px;
    color: #10b981;
    margin-top: 4px;
    padding-left: 4px;
}

.frs-form-group.valid .frs-inline-success {
    display: block;
}

/* モバイルUX最適化 */
@media (max-width: 640px) {
    /* タップターゲットサイズの拡大（Apple推奨44px） */
    .frs-star {
        width: 44px !important;
        height: 44px !important;
        padding: 8px;
    }

    .frs-star svg {
        width: 28px !important;
        height: 28px !important;
    }

    .frs-radio-label {
        min-height: 44px;
        padding: 12px 16px;
    }

    .frs-checkbox-label {
        min-height: 44px;
        padding: 12px 16px;
    }

    /* プログレスメッセージ */
    .frs-progress-message {
        padding: 8px 12px;
    }

    .frs-progress-text {
        font-size: 12px;
    }

    /* 完了画面 */
    .frs-complete-content .frs-complete-icon {
        width: 64px;
        height: 64px;
    }

    .frs-complete-content .frs-complete-icon svg {
        width: 32px;
        height: 32px;
    }

    .frs-complete-content .frs-complete-title {
        font-size: 20px !important;
    }

    .frs-complete-message-box {
        padding: 16px;
    }

    .frs-complete-stats {
        flex-direction: column;
        gap: 12px;
    }

    .frs-complete-stat {
        justify-content: center;
    }
}

/* 離脱防止モーダル */
.frs-exit-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.frs-exit-confirm-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

.frs-exit-confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #fef3c7;
    border-radius: 50%;
    margin: 0 auto 16px;
}

.frs-exit-confirm-icon svg {
    color: #d97706;
}

.frs-exit-confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.frs-exit-confirm-message {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

.frs-exit-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.frs-exit-confirm-stay {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #022f7c 0%, #0449a6 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.frs-exit-confirm-stay:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 47, 124, 0.3);
}

.frs-exit-confirm-leave {
    flex: 1;
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.frs-exit-confirm-leave:hover {
    background: #e5e7eb;
}

/* フォーカス状態のハイライト */
.frs-form-input:focus,
.frs-form-select:focus,
.frs-form-textarea:focus {
    outline: none;
    border-color: #022f7c;
    box-shadow: 0 0 0 3px rgba(2, 47, 124, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ボタンのリップルエフェクト */
.frs-btn-primary::after,
.frs-btn-next::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.frs-btn-primary:active::after,
.frs-btn-next:active::after {
    width: 200%;
    height: 200%;
}

/* スムーズスクロール */
.frs-modal-body {
    scroll-behavior: smooth;
}

/* ローディングスケルトン */
.frs-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 送信中のプログレス表示 */
.frs-submit-progress {
    display: none;
    margin-top: 16px;
}

.frs-submit-progress.active {
    display: block;
}

.frs-submit-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.frs-submit-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #022f7c 0%, #0449a6 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.frs-submit-progress-text {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
}

/* ソーシャルプルーフ */
.frs-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.frs-social-proof-icon {
    display: flex;
    align-items: center;
    color: #022f7c;
}

.frs-social-proof-text {
    font-size: 13px;
    color: #374151;
}

.frs-social-proof-count {
    font-weight: 700;
    color: #022f7c;
}