/* ============================================
   Meta広告 × AI クリエイティブ生成ツール
   スタイルシート（Course1ブランド：青×白×赤）
   ============================================ */

/* ---------- リセット ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3f2fd 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ---------- コンテナ ---------- */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(30, 136, 229, 0.15);
    overflow: hidden;
}

/* ---------- ヘッダー ---------- */
.header {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: #ffffff;
    padding: 50px 30px;
    text-align: center;
}

.title {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.subtitle {
    font-size: clamp(14px, 3vw, 18px);
    opacity: 0.95;
    margin-bottom: 16px;
}

.catch {
    font-size: clamp(12px, 2.5vw, 14px);
    opacity: 0.85;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 16px;
    margin-top: 8px;
}

/* ---------- プランバッジ ---------- */
.plan-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

.plan-badge.plan-lite {
    background: #f7f705;
    color: #1a1a1a;
}

.plan-badge.plan-premium {
    background: linear-gradient(135deg,
        #EBC75A 0%,
        #F0CE4F 15%,
        #FFD93D 30%,
        #E8BC3E 45%,
        #E5BA42 50%,
        #E8BC3E 55%,
        #FFD93D 70%,
        #F0CE4F 85%,
        #EBC75A 100%
    );
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
                inset 0 -1px 0 rgba(140, 105, 25, 0.3),
                0 2px 12px rgba(212, 175, 55, 0.45);
    border-top: 1px solid #FFE680;
    border-bottom: 1px solid #A8801F;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.plan-name {
    font-size: 14px;
}

.usage-count {
    font-size: 14px;
}

.usage-count strong {
    font-size: 20px;
    color: #1a1a1a;
    margin: 0 4px;
}

/* ---------- セクション共通 ---------- */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 5px solid #D32F2F;
    color: #1E88E5;
}

/* ---------- フォーム ---------- */
.form-section {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.label-text {
    font-size: 15px;
}

.label-required {
    background: #D32F2F;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #1E88E5;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ---------- 生成ボタン ---------- */
.generate-btn {
    width: 100%;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    background: #f7f705;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(247, 247, 5, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(247, 247, 5, 0.7);
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 22px;
}

/* ---------- ローディング ---------- */
.loading {
    padding: 60px 30px;
    text-align: center;
}

.spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border: 6px solid #e3f2fd;
    border-top: 6px solid #1E88E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #1E88E5;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: #757575;
}

/* ---------- 結果表示 ---------- */
.results-section {
    padding: 40px 30px;
    border-top: 1px solid #e0e0e0;
}

.result-card {
    background: #f8fbff;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.result-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1E88E5;
}

.result-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 15px;
}

/* ---------- ボタン共通 ---------- */
.copy-btn,
.download-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    color: #1E88E5;
    border: 2px solid #1E88E5;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.copy-btn:hover,
.download-btn:hover {
    background: #1E88E5;
    color: #ffffff;
}

/* ---------- 狭いコンテナ（ログイン・パスワード設定用） ---------- */
.container-narrow {
    max-width: 480px;
}

/* ---------- ログイン状態バー ---------- */
.auth-bar {
    padding: 14px 30px;
    background: #fafbfd;
    border-bottom: 1px solid #e0e0e0;
}

.auth-guest,
.auth-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-text,
.auth-welcome {
    font-size: 13px;
    color: #616161;
    font-weight: 600;
}

.auth-welcome {
    color: #1E88E5;
}

.auth-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.auth-btn-login {
    background: #1E88E5;
    color: #ffffff;
}

.auth-btn-login:hover {
    background: #1565C0;
    transform: translateY(-1px);
}

.auth-btn-logout {
    background: #ffffff;
    color: #616161;
    border: 1px solid #bdbdbd;
}

.auth-btn-logout:hover {
    background: #f5f5f5;
}

/* ---------- ログイン・パスワード設定共通 ---------- */
.alert {
    padding: 12px 16px;
    background: #fff3e0;
    border-left: 4px solid #FFA000;
    border-radius: 4px;
    font-size: 14px;
    color: #5d4037;
    margin-bottom: 16px;
    line-height: 1.6;
}

.alert.alert-success {
    background: #e8f5e9;
    border-left-color: #43A047;
    color: #2e7d32;
}

.login-help {
    margin-top: 24px;
    padding: 16px;
    background: #f8fbff;
    border-radius: 8px;
    font-size: 13px;
    color: #616161;
    line-height: 1.7;
}

.login-help p {
    margin: 4px 0;
}

.back-to-lite {
    margin-top: 20px;
    text-align: center;
}

.back-to-lite a {
    color: #1E88E5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.back-to-lite a:hover {
    text-decoration: underline;
}

/* ---------- パスワード設定 ---------- */
.member-info {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.8;
}

.member-info p {
    margin: 0;
    color: #1a1a1a;
}

.member-info strong {
    color: #1565C0;
    margin-right: 6px;
}

.complete-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

.complete-btn {
    display: inline-flex;
    text-decoration: none;
    margin-top: 24px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- ナビゲーション（タブ） ---------- */
.tool-nav {
    display: flex;
    background: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.nav-link {
    flex: 1;
    text-align: center;
    padding: 16px 20px;
    color: #757575;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: max-content;
}

.nav-link:hover {
    background: #f8fbff;
    color: #1E88E5;
}

.nav-link-active {
    color: #1E88E5;
    border-bottom-color: #1E88E5;
    background: #f8fbff;
}

/* ---------- コンシェルジュ：廉価版案内 ---------- */
.lite-notice {
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-top: 4px solid #FFA000;
}

.lite-notice-content {
    max-width: 500px;
    margin: 0 auto;
}

.lite-notice-title {
    font-size: 22px;
    font-weight: 700;
    color: #E65100;
    margin-bottom: 16px;
}

.lite-notice-content p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: #424242;
}

.lite-notice-back {
    margin-top: 24px;
    font-size: 14px;
}

.lite-notice-back a {
    color: #1E88E5;
    text-decoration: none;
}

/* ---------- コンシェルジュ：フォーム ---------- */
.section-intro {
    margin-bottom: 24px;
    color: #616161;
    line-height: 1.7;
    font-size: 14px;
}

.concierge-step {
    background: #f8fbff;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.concierge-step-title {
    font-size: 17px;
    font-weight: 700;
    color: #1E88E5;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #bbdefb;
}

.step-required {
    background: #D32F2F;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 8px;
}

.step-optional {
    color: #757575;
    font-size: 13px;
    font-weight: 500;
    margin-left: 8px;
}

.concierge-step-hint {
    font-size: 13px;
    color: #616161;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fff8e1;
    border-left: 3px solid #FFB300;
    border-radius: 4px;
}

/* ---------- スクショアップロード ---------- */
.screenshot-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #1E88E5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.screenshot-title {
    font-size: 16px;
    font-weight: 700;
    color: #1565C0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.screenshot-icon {
    font-size: 24px;
}

.screenshot-desc {
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 16px;
}

.upload-area {
    background: #ffffff;
    border: 2px dashed #1E88E5;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    background: #f8fbff;
    border-color: #1565C0;
}

.upload-area.drag-over {
    background: #e3f2fd;
    border-color: #0D47A1;
    border-style: solid;
    transform: scale(1.02);
}

.upload-icon-big {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-main-text {
    font-size: 15px;
    font-weight: 600;
    color: #1565C0;
    line-height: 1.7;
    margin-bottom: 8px;
}

.upload-sub-text {
    font-size: 12px;
    color: #616161;
}

.upload-preview {
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
}

.upload-filename {
    font-size: 12px;
    color: #424242;
    word-break: break-all;
}

.upload-status {
    margin-top: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.status-loading {
    color: #1565C0;
}

.status-success {
    color: #2e7d32;
}

.status-error {
    color: #c62828;
}

.parse-screenshot-btn {
    margin-top: 12px;
    width: 100%;
    padding: 12px 20px;
    background: #1E88E5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.parse-screenshot-btn:hover:not(:disabled) {
    background: #1565C0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.parse-screenshot-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.manual-input-divider {
    text-align: center;
    margin: 24px 0 16px;
    position: relative;
    color: #757575;
    font-size: 13px;
}

.manual-input-divider::before,
.manual-input-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: #e0e0e0;
}

.manual-input-divider::before {
    left: 0;
}

.manual-input-divider::after {
    right: 0;
}

.manual-input-divider span {
    background: #f8fbff;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

/* AI自動入力時のフラッシュ効果 */
@keyframes autoFillFlash {
    0% { background-color: #c8e6c9; }
    100% { background-color: #ffffff; }
}

.metric-input.auto-filled {
    animation: autoFillFlash 2s ease-out;
}

/* ---------- 期間選択 ---------- */
.period-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.period-option {
    flex: 1;
    min-width: 120px;
    padding: 14px 16px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.period-option:hover {
    border-color: #1E88E5;
}

.period-option input[type="radio"] {
    margin: 0;
}

.period-option input[type="radio"]:checked + span {
    color: #1E88E5;
}

/* ---------- KPIグリッド ---------- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.metric-group {
    margin-bottom: 0;
}

.metric-input {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ---------- 診断結果：総合判定 ---------- */
.overall-card {
    border-width: 3px !important;
}

.overall-card.status-good {
    border-color: #43A047 !important;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.overall-card.status-warning {
    border-color: #FFA000 !important;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.overall-card.status-critical {
    border-color: #c62828 !important;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.overall-judgment {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.status-icon {
    font-size: 28px;
    margin-right: 8px;
}

.overall-summary {
    font-size: 15px;
    line-height: 1.8;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.7);
    padding: 14px 18px;
    border-radius: 8px;
}

/* ---------- KPI評価グリッド ---------- */
.kpi-evaluation {
    background: #ffffff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.kpi-item {
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #f8fbff;
}

.kpi-item.kpi-good {
    border-color: #43A047;
    background: #e8f5e9;
}

.kpi-item.kpi-warning {
    border-color: #FFA000;
    background: #fff3e0;
}

.kpi-item.kpi-critical {
    border-color: #c62828;
    background: #ffebee;
}

.kpi-label {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.kpi-comment {
    font-size: 13px;
    color: #424242;
    line-height: 1.5;
}

/* ---------- セカンダリボタン ---------- */
.secondary-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #1E88E5;
    background: #ffffff;
    border: 2px solid #1E88E5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.secondary-btn:hover {
    background: #1E88E5;
    color: #ffffff;
}

/* ---------- フォームヒント ---------- */
.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #616161;
    line-height: 1.6;
}

.form-hint strong {
    color: #D32F2F;
    font-weight: 700;
}

/* ---------- Meta規約コンプライアンス警告 ---------- */
.compliance-alert {
    margin-bottom: 24px;
    border-radius: 10px;
    overflow: hidden;
}

.compliance-ok {
    background: #e8f5e9;
    border-left: 6px solid #43A047;
    padding: 16px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.compliance-icon {
    font-size: 24px;
    line-height: 1.2;
}

.compliance-content {
    flex: 1;
}

.compliance-content strong {
    display: block;
    color: #2e7d32;
    font-size: 15px;
    margin-bottom: 4px;
}

.compliance-content p {
    font-size: 13px;
    color: #5d4037;
    line-height: 1.7;
    margin: 0;
}

.compliance-high,
.compliance-medium,
.compliance-low {
    padding: 18px 22px;
    border-radius: 10px;
}

.compliance-high {
    background: #ffebee;
    border-left: 6px solid #c62828;
}

.compliance-medium {
    background: #fff3e0;
    border-left: 6px solid #FFA000;
}

.compliance-low {
    background: #f8fbff;
    border-left: 6px solid #1E88E5;
}

.compliance-header {
    margin-bottom: 8px;
}

.compliance-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.compliance-high .compliance-title { color: #c62828; }
.compliance-medium .compliance-title { color: #ef6c00; }
.compliance-low .compliance-title { color: #1565C0; }

.compliance-msg {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
    color: #424242;
}

.compliance-issues {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compliance-issues li {
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.issue-level {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}

.issue-location {
    color: #1565C0;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.issue-category {
    font-weight: 600;
    color: #424242;
}

.issue-reason {
    color: #616161;
    font-size: 12px;
    display: inline-block;
    margin-top: 2px;
}

.compliance-footnote {
    font-size: 12px;
    color: #424242;
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.compliance-retry-note {
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #1565C0;
    margin: 8px 0;
    border-left: 3px solid #1E88E5;
}

/* ---------- パターンブロック ---------- */
.pattern-card-wrap {
    background: #ffffff;
}

.pattern-block {
    background: #f8fbff;
    border: 2px solid #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.pattern-block:last-of-type {
    margin-bottom: 0;
}

.pattern-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.pattern-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pattern-icon {
    font-size: 24px;
}

.pattern-name {
    font-size: 16px;
    font-weight: 700;
    color: #1E88E5;
}

.pattern-main-badge {
    background: #D32F2F;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.pattern-desc {
    font-size: 13px;
    color: #616161;
    margin-bottom: 12px;
    line-height: 1.6;
}

.pattern-prompt {
    font-size: 14px !important;
    line-height: 1.7 !important;
}

.pattern-copy-btn {
    font-size: 12px;
    padding: 6px 12px;
}

.pattern-empty {
    text-align: center;
    color: #757575;
    padding: 20px;
}

/* ---------- 画像プロンプト関連 ---------- */
.image-prompt-ja-details {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8fbff;
    border: 1px dashed #90caf9;
    border-radius: 8px;
}

.image-prompt-ja-details summary {
    cursor: pointer;
    color: #1E88E5;
    font-weight: 600;
    padding: 4px 0;
    user-select: none;
    font-size: 14px;
}

.image-prompt-ja-details[open] summary {
    margin-bottom: 12px;
}

.prompt-ja {
    background: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: #424242;
}

/* ---------- 推奨ツール ---------- */
.tool-recommend {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
    border: 2px solid #f7f705;
    border-radius: 12px;
}

.tool-recommend-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.tool-recommend-note {
    font-size: 14px;
    color: #424242;
    margin-bottom: 16px;
    line-height: 1.7;
}

.tool-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.tool-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.tool-link:hover {
    transform: translateY(-2px);
    border-color: #1E88E5;
    box-shadow: 0 6px 16px rgba(30, 136, 229, 0.2);
}

.tool-link-recommend {
    border-color: #D32F2F;
    background: linear-gradient(135deg, #ffffff 0%, #ffebee 100%);
}

.tool-link-recommend:hover {
    border-color: #D32F2F;
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.25);
}

.tool-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: #D32F2F;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.tool-name {
    font-size: 15px;
    font-weight: 700;
    color: #1E88E5;
}

.tool-link-recommend .tool-name {
    color: #D32F2F;
}

.tool-desc {
    font-size: 12px;
    color: #616161;
}

.tool-recommend-tip {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #1E88E5;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.7;
    color: #1a1a1a;
}

/* ---------- 完全版CTA ---------- */
.premium-cta {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 3px solid #FFA000;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
}

.premium-cta h3 {
    font-size: 20px;
    font-weight: 700;
    color: #E65100;
    margin-bottom: 16px;
}

.premium-benefits {
    list-style: none;
    text-align: left;
    margin: 20px auto;
    max-width: 500px;
}

.premium-benefits li {
    padding: 8px 0;
    font-size: 15px;
    color: #1a1a1a;
}

.premium-message {
    margin: 16px 0;
    font-size: 14px;
    color: #5d4037;
}

.premium-btn,
.premium-btn-large {
    display: inline-block;
    padding: 16px 32px;
    background: #f7f705;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(247, 247, 5, 0.5);
}

.premium-btn:hover,
.premium-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(247, 247, 5, 0.7);
}

.premium-btn-large {
    padding: 24px 48px;
    font-size: 18px;
    line-height: 1.5;
}

.premium-btn-large .small {
    display: block;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    margin-top: 4px;
}

/* ---------- 利用上限到達 ---------- */
.limit-reached {
    padding: 60px 30px;
    text-align: center;
    background: #fff3e0;
    border-top: 4px solid #D32F2F;
}

.limit-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.limit-reached h2 {
    font-size: 24px;
    font-weight: 700;
    color: #D32F2F;
    margin-bottom: 16px;
}

.limit-message {
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.8;
}

/* ---------- フッター ---------- */
.footer {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: #ffffff;
    text-align: center;
    padding: 24px 30px;
}

.footer p {
    font-size: 14px;
    margin: 4px 0;
}

.footer-small {
    font-size: 12px;
    opacity: 0.7;
}

/* ---------- トースト ---------- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

/* ---------- ユーティリティ ---------- */
.hidden {
    display: none !important;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .container {
        border-radius: 0;
        box-shadow: none;
    }

    .header {
        padding: 30px 20px;
    }

    .form-section,
    .results-section {
        padding: 30px 20px;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .premium-btn-large {
        padding: 20px 30px;
        font-size: 16px;
    }
}
