/* カラー変数定義 */
:root {
    --primary-color: #9C7863;
    --primary-light: #B8A193;
    --primary-dark: #7A5D4C;
    --accent-color: #D4C4B0;
    --text-primary: #2C1810;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: rgba(156, 120, 99, 0.2);
    --bg-light: #F8F6F3;
    --bg-white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --info: #3B82F6;
    --error: #EF4444;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(156, 120, 99, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #FFFFFF;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #FFFFFF;
}

/* グラスモーフィズム効果 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* 立体ボタンシステム */
.btn-3d {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
    border: none;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 0 #654935, 0 8px 25px rgba(156, 120, 99, 0.3);
    transform: translateY(0);
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #654935, 0 12px 30px rgba(156, 120, 99, 0.4);
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.btn-3d:hover::before {
    left: 100%;
}

.btn-3d.pressing {
    transform: translateY(6px) !important;
    box-shadow: 0 0 0 #654935, 0 2px 15px rgba(156, 120, 99, 0.4) !important;
    transition: all 0.15s ease-out !important;
}

.btn-3d.releasing {
    transform: translateY(0) !important;
    box-shadow: 0 6px 0 #654935, 0 8px 25px rgba(156, 120, 99, 0.3) !important;
    transition: all 0.2s ease-out !important;
}

/* ヘッダー */
.header {
    text-align: center;
    padding: 40px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px rgba(156, 120, 99, 0.1);
}


@media (max-width: 768px) {
    .header__title {
        font-size: 24px;
    }
}

/* フォームセクション */
.form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(156, 120, 99, 0.08);
}

.form-section__title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-label--required::after {
    content: " *";
    color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(156, 120, 99, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
}

/* 課題選択ボタン */
.challenge-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.challenge-button {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.challenge-button:hover {
    background: rgba(156, 120, 99, 0.1);
    border-color: var(--primary-light);
}

.challenge-button.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(156, 120, 99, 0.3);
}

.challenge-button.selected:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* スライダー式のスキル選択UI */
.skill-slider-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.skill-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.skill-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #E5E7EB;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.skill-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.skill-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.skill-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.skill-level-display {
    min-width: 80px;
    width: 80px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(156, 120, 99, 0.1);
}

.skill-level-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 8px;
}

.skill-level-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.skill-level-label:first-child {
    justify-content: flex-start;
}

.skill-level-label:nth-child(2) {
    justify-content: flex-start;
    padding-left: 50px;
}

.skill-level-label:nth-child(3) {
    justify-content: flex-start;
    padding-left: 65px;
}

.skill-level-label.active {
    color: var(--primary-color);
    font-weight: 600;
}

.level-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
    opacity: 0.3;
}

.level-indicator.active {
    background: var(--primary-color);
    opacity: 1;
    transform: scale(1.2);
}

.skill-transparent-box {
    background: rgba(255, 255, 255, 0.0);
    padding: 8px;
    margin-top: 8px;
    min-height: 20px;
}

.skill-level-info {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(156, 120, 99, 0.05);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.skill-level-info .level-description {
    margin: 4px 0;
}

.skill-level-info .level-description strong {
    color: var(--primary-dark);
}

/* エラーメッセージ */
.error-message {
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.08) 0%, rgba(156, 120, 99, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
    padding: 20px 24px;
    border-radius: 12px;
    margin: 24px 0;
    font-size: 14px;
    animation: slideDown 0.3s ease;
    box-shadow: 0 2px 8px rgba(156, 120, 99, 0.15);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message strong {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--primary-dark);
    font-weight: 600;
}

.error-message ul {
    margin: 8px 0 0 20px;
    list-style: none;
}

.error-message li {
    margin: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
}

.error-message li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

/* 診断ボタン */
.diagnose-button {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 40px auto;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 0 #654935, 0 8px 25px rgba(156, 120, 99, 0.3);
    transform: translateY(0);
    margin-bottom: 60px;
}

.diagnose-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #654935, 0 12px 30px rgba(156, 120, 99, 0.4);
}

.diagnose-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.diagnose-button:hover::before {
    left: 100%;
}

.diagnose-button.pressing {
    transform: translateY(6px) !important;
    box-shadow: 0 0 0 #654935, 0 2px 15px rgba(156, 120, 99, 0.4) !important;
    transition: all 0.15s ease-out !important;
}

.diagnose-button.releasing {
    transform: translateY(0) !important;
    box-shadow: 0 6px 0 #654935, 0 8px 25px rgba(156, 120, 99, 0.3) !important;
    transition: all 0.2s ease-out !important;
}

.diagnose-button:active {
    transform: translateY(0);
}

/* 結果セクション */
.results-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.results-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 入力条件サマリー */
.summary-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(252, 250, 248, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid rgba(156, 120, 99, 0.15);
    box-shadow: 
        0 8px 32px rgba(156, 120, 99, 0.15),
        0 2px 8px rgba(156, 120, 99, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-section:hover {
    box-shadow: 
        0 12px 40px rgba(156, 120, 99, 0.2),
        0 4px 12px rgba(156, 120, 99, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.summary-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, rgba(156, 120, 99, 0.3), rgba(212, 196, 176, 0.2), rgba(156, 120, 99, 0.3)) bottom / 100% 2px no-repeat;
}

.summary-section__title {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: 0.5px;
}

.edit-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(252, 250, 248, 0.9));
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(156, 120, 99, 0.15);
    letter-spacing: 0.3px;
}

.edit-button:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(156, 120, 99, 0.3);
    border-color: var(--primary-dark);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.summary-item {
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(252, 250, 248, 0.6) 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(156, 120, 99, 0.2);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(156, 120, 99, 0.08);
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(156, 120, 99, 0.15);
    border-color: rgba(156, 120, 99, 0.3);
}

.summary-item__label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.summary-item__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    word-break: break-word;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

/* 候補者セクション */
.candidates-section {
    margin-bottom: 70px;
}

.candidates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, rgba(156, 120, 99, 0.25), rgba(212, 196, 176, 0.15), rgba(156, 120, 99, 0.25)) bottom / 100% 2px no-repeat;
}

.candidates-title {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

/* アコーディオン */
.accordion {
    border-radius: 12px;
    overflow: visible;
}

.accordion__item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(252, 250, 248, 0.95) 100%);
    backdrop-filter: blur(20px);
    margin-bottom: 20px;
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(156, 120, 99, 0.12),
        0 1px 3px rgba(156, 120, 99, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
}

.accordion__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.3), rgba(212, 196, 176, 0.2), rgba(156, 120, 99, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.accordion__item:not(.top-rank):hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(156, 120, 99, 0.2),
        0 4px 12px rgba(156, 120, 99, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.accordion__item:not(.top-rank):hover::before {
    opacity: 1;
}

.accordion__header {
    padding: 28px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(252, 250, 248, 0.4) 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    gap: 20px;
    user-select: none;
}

.accordion__header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(156, 120, 99, 0.2), transparent);
}

.accordion__item:hover .accordion__header {
    background: linear-gradient(135deg, rgba(252, 250, 248, 0.8) 0%, rgba(156, 120, 99, 0.08) 100%);
    box-shadow: 0 2px 8px rgba(156, 120, 99, 0.15);
    transform: translateY(-1px);
}

/* 1位・2位・3位専用スタイル - ホバー時も枠線を維持 */
.accordion__item.top-rank {
    position: relative;
}

.accordion__item.top-rank--1 {
    border: 3px solid #D4AF37 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
    border-radius: 8px;
    overflow: hidden;
}

.accordion__item.top-rank--1:hover {
    border: 3px solid #D4AF37 !important;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4) !important;
    transform: translateY(-2px);
}

.accordion__item.top-rank--1 .accordion__header {
    background: linear-gradient(to bottom, #FFFEF7 0%, #FFFFFF 100%) !important;
    border: none !important;
}

.accordion__item.top-rank--1:hover .accordion__header {
    background: linear-gradient(to bottom, #FFFEF7 0%, #FFF9E6 100%) !important;
    border: none !important;
    border-top: none !important;
    transform: translateY(-1px);
}

.accordion__item.top-rank--2 {
    border: 2.5px solid #C0C0C0 !important;
    box-shadow: 0 3px 10px rgba(192, 192, 192, 0.25) !important;
    border-radius: 8px;
    overflow: hidden;
}

.accordion__item.top-rank--2:hover {
    border: 2.5px solid #C0C0C0 !important;
    box-shadow: 0 5px 14px rgba(192, 192, 192, 0.35) !important;
    transform: translateY(-2px);
}

.accordion__item.top-rank--2 .accordion__header {
    background: linear-gradient(to bottom, #FAFAFA 0%, #FFFFFF 100%) !important;
    border: none !important;
}

.accordion__item.top-rank--2:hover .accordion__header {
    background: linear-gradient(to bottom, #FAFAFA 0%, #F5F5F5 100%) !important;
    border: none !important;
    border-top: none !important;
    transform: translateY(-1px);
}

.accordion__item.top-rank--3 {
    border: 2px solid #CD7F32 !important;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.2) !important;
    border-radius: 8px;
    overflow: hidden;
}

.accordion__item.top-rank--3:hover {
    border: 2px solid #CD7F32 !important;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3) !important;
    transform: translateY(-2px);
}

.accordion__item.top-rank--3 .accordion__header {
    background: linear-gradient(to bottom, #FFF9F5 0%, #FFFFFF 100%) !important;
    border: none !important;
}

.accordion__item.top-rank--3:hover .accordion__header {
    background: linear-gradient(to bottom, #FFF9F5 0%, #FFF0E6 100%) !important;
    border: none !important;
    border-top: none !important;
    transform: translateY(-1px);
}


.accordion__header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.accordion__header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.rank-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 
        0 4px 12px rgba(156, 120, 99, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    flex-shrink: 0;
}

.rank-badge::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
}

.rank-badge--gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 
        0 4px 16px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
}

.rank-badge--silver {
    background: linear-gradient(135deg, #E8E8E8 0%, #B0B0B0 100%);
    box-shadow: 
        0 4px 16px rgba(192, 192, 192, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 20px rgba(192, 192, 192, 0.2);
}

.rank-badge--bronze {
    background: linear-gradient(135deg, #E5A05D 0%, #A0682A 100%);
    box-shadow: 
        0 4px 16px rgba(205, 127, 50, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(205, 127, 50, 0.2);
}

.candidate-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.candidate-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    line-height: 1.3;
    word-break: break-word;
}

.candidate-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.candidate-seniority {
    font-size: 12px;
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.15), rgba(212, 196, 176, 0.15));
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid rgba(156, 120, 99, 0.2);
    display: inline-block;
}

.candidate-details {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.candidate-match-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    letter-spacing: 0.4px;
}

.candidate-match-simple.match-tier-ss {
    background: linear-gradient(135deg, #f4fbff, #d6f0ff);
    color: #0f3c55;
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3), inset 0 0 8px rgba(255, 255, 255, 0.6);
}

.candidate-match-simple.match-tier-s {
    background: linear-gradient(135deg, #fff4cc, #f5c451);
    color: #7c3a02;
    border-color: rgba(212, 163, 54, 0.45);
}

.candidate-match-simple.match-tier-a {
    background: linear-gradient(135deg, #f4f6fb, #d1d6e0);
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.45);
}

.candidate-match-simple.match-tier-b {
    background: linear-gradient(135deg, #f7d3b0, #c47a3b);
    color: #6b2b05;
    border-color: rgba(180, 105, 45, 0.45);
}

.candidate-match-simple.match-tier-c {
    background: linear-gradient(135deg, #ede9fe, #c4b5fd);
    color: #5b21b6;
    border-color: rgba(139, 92, 246, 0.35);
}

.working-hours {
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.12), rgba(212, 196, 176, 0.08));
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(156, 120, 99, 0.25);
    box-shadow: 0 2px 6px rgba(156, 120, 99, 0.08);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.monthly-range {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 
        0 4px 12px rgba(156, 120, 99, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.monthly-range::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.accordion__item:hover .monthly-range::before {
    left: 100%;
}

.accordion__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 700;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.1), rgba(212, 196, 176, 0.08));
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(156, 120, 99, 0.2);
    box-shadow: 0 2px 6px rgba(156, 120, 99, 0.08);
    letter-spacing: 0.3px;
}

.accordion__toggle:hover {
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.18), rgba(212, 196, 176, 0.12));
    border-color: rgba(156, 120, 99, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(156, 120, 99, 0.15);
}

.accordion__arrow {
    font-size: 18px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
}

.accordion__item.active .accordion__arrow {
    transform: rotate(180deg);
}

.accordion__item.active .accordion__header {
    background: linear-gradient(135deg, rgba(156, 120, 99, 0.12) 0%, rgba(252, 250, 248, 0.6) 100%);
    box-shadow: inset 0 2px 6px rgba(156, 120, 99, 0.1);
}

.accordion__content {
    padding: 0;
    display: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(252, 250, 248, 0.3) 100%);
    backdrop-filter: blur(10px);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 28px 28px 0 28px;
}

.star-candidate-disclaimer {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.06));
    border-left: 3px solid #FFD700;
    padding: 14px 18px;
    margin: 24px 28px 0 28px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
}

/* 保有スキル */
.skill-matrix {
    margin-top: 16px;
}

.skill-matrix__item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.skill-matrix__label {
    width: 140px;
    font-size: 13px;
    color: var(--text-secondary);
}

.skill-matrix__bar {
    flex: 1;
    height: 20px;
    background: rgba(156, 120, 99, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
}

.skill-matrix__bar::before {
    content: '';
    position: absolute;
    left: 20%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.skill-matrix__bar::after {
    content: '';
    position: absolute;
    left: 40%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.skill-matrix__separator1 {
    position: absolute;
    left: 60%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.skill-matrix__separator2 {
    position: absolute;
    left: 80%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.skill-matrix__fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 10px 0 0 10px;
    transition: width 0.5s ease;
    z-index: 1;
}

.skill-matrix__fill[style*="width: 100%"] {
    border-radius: 10px;
}

.skill-matrix__value {
    margin-left: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    min-width: 30px;
}

/* セクションスタイル */
.content-section {
    margin-bottom: 24px;
}

.content-section__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
}

.content-section__list {
    list-style: none;
    padding: 0;
}

.content-section__item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(156, 120, 99, 0.05);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.content-section__item::before {
    content: "▸";
    color: var(--primary-color);
    margin-right: 8px;
}

.ai-match-circle {
    position: relative;
    width: 192px;
    height: 192px;
    margin: 20px auto;
}

.ai-match-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ai-match-circle__bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 14;
}

.ai-match-circle__progress {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.ai-match-circle__center {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-match-circle__inner {
    text-align: center;
}

.ai-match-circle__number {
    font-size: 48px;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1;
}

.ai-match-circle__label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 2px;
    font-weight: 600;
}

.match-detail {
    margin-top: 16px;
}

.match-detail__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.match-detail__item {
    margin-bottom: 10px;
}

.match-detail__label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-detail__percentage {
    font-weight: 600;
    color: var(--primary-color);
}

.match-detail__bar {
    height: 8px;
    background: rgba(156, 120, 99, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.match-detail__fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.testimonial-quote {
    background: rgba(156, 120, 99, 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 12px;
    line-height: 1.6;
}

.testimonial-author {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 8px;
    font-style: normal;
}

/* CTA / お問い合わせフォーム */
.contact-section {
    text-align: center;
    padding: 48px;
    background: #c7baab;
    border-radius: 20px;
    margin-top: 48px;
    box-shadow: 
        0 16px 48px rgba(156, 120, 99, 0.35),
        0 4px 16px rgba(156, 120, 99, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    scroll-margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30%, -30%); }
}

.contact-title {
    color: #000000;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.contact-form-grid .form-group {
    margin-bottom: 0;
}

.contact-form-grid .form-label {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.contact-form-grid .form-input,
.contact-form-grid .form-select {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.contact-form-grid .form-input:focus,
.contact-form-grid .form-select:focus {
    background: white;
    border-color: white;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.contact-button {
    background: white;
    color: var(--primary-dark);
    border: none;
    padding: 18px 56px;
    font-size: 20px;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(156, 120, 99, 0.3), transparent);
    transition: left 0.6s;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.contact-button:hover::before {
    left: 100%;
}

.inquiry-button {
    display: block;
    width: calc(100% - 48px);
    max-width: 400px;
    margin: 0 auto;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 0 #654935, 0 8px 25px rgba(156, 120, 99, 0.3);
    transform: translateY(0);
    margin-bottom: 6px;
}

.inquiry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #654935, 0 12px 30px rgba(156, 120, 99, 0.4);
}

.inquiry-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.inquiry-button:hover::before {
    left: 100%;
}

.inquiry-button.pressing {
    transform: translateY(6px) !important;
    box-shadow: 0 0 0 #654935, 0 2px 15px rgba(156, 120, 99, 0.4) !important;
    transition: all 0.15s ease-out !important;
}

.inquiry-button.releasing {
    transform: translateY(0) !important;
    box-shadow: 0 6px 0 #654935, 0 8px 25px rgba(156, 120, 99, 0.3) !important;
    transition: all 0.2s ease-out !important;
}

.inquiry-button__br {
    display: none;
}

.inquiry-button-container {
    padding: 28px 24px 32px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(248, 246, 243, 0.6) 0%, rgba(252, 250, 248, 0.4) 100%);
    border-top: 1px solid rgba(156, 120, 99, 0.15);
}

/* 候補者プロフィール */
.candidate-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(252, 250, 248, 0.4) 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.candidate-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.candidate-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-basic-info {
    flex: 1;
}

.candidate-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.candidate-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: var(--text-secondary);
}

.candidate-info-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.candidate-info-value {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 16px;
}

@media (max-width: 768px) {
    .candidate-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .candidate-info-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* 注記 */
.disclaimer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 24px;
}

/* ローディング */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header__title {
        font-size: 24px;
    }

    .form-grid, .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-section {
        padding: 24px;
    }

    .summary-section__title {
        font-size: 18px;
    }

    .contact-section {
        padding: 32px 24px;
    }

    .contact-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .contact-button {
        padding: 16px 40px;
        font-size: 18px;
    }

    .candidates-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .candidates-title {
        font-size: 22px;
    }

    .accordion__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .accordion__header-left {
        width: 100%;
    }

    .accordion__header-right {
        align-items: flex-start;
        width: 100%;
    }

    .candidate-details {
        width: 100%;
    }

    .monthly-range {
        align-self: flex-start;
    }

    .accordion__toggle {
        width: 100%;
        justify-content: center;
    }

    .candidate-title {
        font-size: 16px;
    }

    .monthly-range {
        font-size: 13px;
    }

    .working-hours {
        font-size: 12px;
    }

    .edit-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .inquiry-button__br {
        display: inline;
    }
    
    .inquiry-button {
        font-size: 16px;
        padding: 14px 24px;
        line-height: 1.4;
    }

}