/* アンカーをなめらかに＆着地点の見切れ防止 */
html { scroll-behavior: smooth; }
#spec, #entry { scroll-margin-top: 96px; }

/* ===== ベース ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background-image: url('../pc-fixed-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 16px 72px;
}
h1, h2, h3 { margin: 0 0 16px; color: #111; }
p { margin: 0 0 16px; color: #222; }

/* ===== カード ===== */
.recruit-card,
.recruit-spec,
.recruit-entry {
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(31, 38, 135, 0.15),
        inset 0 0 0.5px rgba(255, 255, 255, 0.9),
        inset 0 0 20px rgba(255, 255, 255, 0.25);
    padding: 42px 28px 50px;
}

.recruit-spec { margin-bottom: 80px; }
.recruit-entry { margin-top: 8px; }

.recruit-spec h2,
.recruit-entry h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #333;
    margin: 0 0 24px;
}

/* ===== 募集要項 行レイアウト ===== */
.recruit-rows { display: grid; gap: 15px; }

.recruit-row {
    display: grid;
    grid-template-columns: 8em 1fr;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 10px;
    background: #f8f8f8;
    border: 1px solid #e7e7e7;
}

.recruit-term {
    margin: 0;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    padding-left: 20px;
}

.recruit-desc {
    margin: 0;
    color: #111;
    padding-left: 20px;
}

/* ===== CF7：応募フォーム用スタイル ===== */
.wpcf7 { margin-top: 16px; }
.wpcf7 form { display: grid; gap: 18px; }

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #444;
    line-height: 1;
    margin: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    margin-top: 12px;
    min-width: 40px;
    height: 22px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
}
.badge-required { background: #ff4b4b; color: #fff; }
.badge-optional  { background: #e9ecf1; color: #555; }

.form-control,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #111;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.wpcf7 textarea,
.form-control.wpcf7-textarea { min-height: 140px; resize: vertical; }

.wpcf7 ::placeholder { color: #9aa1a7; }

.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79, 124, 255, .15);
}

.wpcf7 select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23999'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.form-options .wpcf7-list-item { margin: 0; }

.form-options .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f5f7fa;
    border: 1px solid #e0e3ea;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.form-options input[type="radio"],
.form-options input[type="checkbox"] {
    accent-color: #111;
    margin-bottom: 4px;
}

.form-options .wpcf7-list-item label:hover {
    background: #edf1ff;
    border-color: #4f7cff;
}

.form-row-submit {
    margin-top: 24px;
    text-align: center;
    width: 100%;
}

.form-submit,
.wpcf7 input[type="submit"],
.wpcf7 button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 48px;
    min-width: 400px;
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform .15s ease, opacity .15s ease, filter .15s ease;
    margin: 0 auto;
}

.wpcf7 input[type="submit"]:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    background: #FAF9FA;
    color: #333;
    border: 1px solid #333;
}

.wpcf7-response-output {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    font-size: 13px;
}

.wpcf7-not-valid-tip {
    margin-top: 4px;
    font-size: 12px;
    color: #d93025;
}

.wpcf7 form.invalid .wpcf7-response-output {
    border-color: #d93025;
    background: #fff5f5;
}

/* ===== タブUI ===== */
.recruit-tabs { margin: 0 0 24px; }

.recruit-tabs .tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 4px;
    list-style: none;
    justify-content: center;
}

.recruit-tabs .tab-buttons li {
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(226, 232, 240, 0.9);
    user-select: none;
    transition:
        background .15s ease,
        color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
    white-space: nowrap;
}

.recruit-tabs .tab-buttons li:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
    transform: translateY(-1px);
}

.recruit-tabs .tab-buttons li.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
}

.tab-content { display: none; }
.tab-content.is-active { display: block; }

.recaptcha-notice {
    font-weight: 700;
    font-size: 8px;
    color: #4E4D52;
    text-align: center;
    width: 100%;
    display: block;
    margin: 8px auto 0;
}

/* ===== TOPページへ戻るフローティングボタン ===== */
.btn-home-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    text-decoration: none;
    z-index: 999;
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 0 1px rgba(255, 255, 255, 0.9),
        inset 0 0 16px rgba(255, 255, 255, 0.12);
    transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.btn-home-float svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.btn-home-float span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
}
.btn-home-float:hover {
    transform: translateY(-3px) scale(1.06);
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 1px rgba(255, 255, 255, 1),
        inset 0 0 24px rgba(255, 255, 255, 0.2);
}
.btn-home-float:active {
    transform: scale(0.95);
    opacity: .85;
}

/* ===== レスポンシブ ===== */
@media (max-width: 767px) {
    .container { padding: 40px 12px 56px; }

    .recruit-card,
    .recruit-spec,
    .recruit-entry { padding: 20px; }

    .recruit-row {
        grid-template-columns: 1fr;
        gap: 4px;
        border-radius: 14px;
        padding: 10px 12px;
    }

    .recruit-tabs .tab-buttons { border-radius: 16px; }

    .recruit-tabs .tab-buttons li {
        flex: 1 0 auto;
        font-size: 12px;
        padding: 8px 12px;
    }

    .wpcf7 form { gap: 16px; }
    .form-label { font-size: 13px; }

    .form-row-submit {
        margin-top: 24px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .form-submit,
    .wpcf7 input[type="submit"],
    .wpcf7 button { min-width: 240px; }

    .btn-home-float {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        width: 50px;
        height: 50px;
    }
    .btn-home-float svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== ダークモード ===== */
@media (prefers-color-scheme: dark) {
    body {
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.40)),
            url('../pc-fixed-bg.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        color: #e6e6e6;
    }

    h1, h2, h3 { color: #f2f2f2; }
    p { color: #e0e0e0; }

    .recruit-card,
    .recruit-spec,
    .recruit-entry {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(22px) saturate(130%);
        border-color: rgba(255, 255, 255, 0.10);
        box-shadow:
            0 8px 30px rgba(0, 0, 0, 0.45),
            inset 0 0 0.5px rgba(255, 255, 255, 0.15);
    }

    .recruit-spec h2,
    .recruit-entry h2 { color: #f2f2f2; }

    .recruit-row {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .recruit-term { color: #ccc; }
    .recruit-desc { color: #f5f5f5; }

    .dm-text,
    .dm-text p { color: #f5f5f5; }

    .form-label,
    .form-row label { color: #f5f5f5; }

    .badge-required { background: #ef4444; color: #fff; }
    .badge-optional  { background: #e5e7eb; color: #111; }

    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 textarea {
        background: #1a1a1a;
        border-color: #333;
        color: #eee;
    }

    .wpcf7 ::placeholder { color: #777; }

    .wpcf7 select {
        background-color: #1a1a1a;
        border-color: #333;
        color: #f5f5f5;
        background-image:
            linear-gradient(45deg, transparent 50%, #f5f5f5 50%),
            linear-gradient(135deg, #f5f5f5 50%, transparent 50%);
        background-position: right 14px center, right 9px center;
        background-size: 8px 8px;
        background-repeat: no-repeat;
    }

    .wpcf7 select:hover,
    .wpcf7 select:focus {
        background-color: #f5f5f5;
        color: #111;
        border-color: #f5f5f5;
    }

    .wpcf7 select:focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    }

    .form-options .wpcf7-list-item label {
        background: #1a1a1a;
        border-color: #2a2a2a;
        color: #eee;
    }

    .form-options .wpcf7-list-item label:hover {
        background: #111;
        border-color: #4f7cff;
        color: #f5f5f5;
    }

    .recruit-tabs .tab-buttons li {
        background: rgba(255, 255, 255, 0.08);
        color: #f2f2f2;
        border-color: rgba(255, 255, 255, 0.12);
    }

    .recruit-tabs .tab-buttons li:hover,
    .recruit-tabs .tab-buttons li.is-active {
        background: #f2f2f2;
        color: #111;
        border-color: #f2f2f2;
    }

    .form-submit,
    .wpcf7 input[type="submit"],
    .wpcf7 button {
        background: #f5f5f5;
        color: #111;
    }

    .wpcf7 input[type="submit"]:hover {
        background: #111;
        color: #f5f5f5;
        border-color: #f5f5f5;
    }

    .wpcf7 form.invalid .wpcf7-response-output { background: #111; }

    .recaptcha-notice { color: #fff; }
    .recaptcha-notice a { color: #ccc; }
}
