/* =============================================================
 * UIリニューアル「Stadium Gold」— 50 フォーム
 * 対象: ログイン / 新規登録 / 投稿の入口(post_fg) / 利用タックル(pre_create)
 *       釣果投稿・釣り場紹介投稿(.post1) / お問い合わせ(.contact1)
 *       公開情報編集・会員情報(.profile2) / 退会(.regist5)
 * 全セレクタは body.ui-r で始める。HTML・JSの動作は変えない。
 * ============================================================= */

/* -------------------------------------------------------------
 * 0. このファイルで使うローカル変数
 * ------------------------------------------------------------- */
body.ui-r {
    --uf-field-h: 48px;
    --uf-field-bg: var(--ui-surface-2);
    --uf-field-line: rgba(14, 42, 61, .16);
    --uf-danger: #d3264a;
    --uf-danger-pale: #fff1f3;
}

/* -------------------------------------------------------------
 * 1. 入力欄の共通品質（フォームページ内だけ）
 * ------------------------------------------------------------- */
body.ui-r .search-result.login .form-control,
body.ui-r .post1 .form-control,
body.ui-r .post1 textarea.form-control {
    min-height: var(--uf-field-h);
    height: auto;
    background-color: var(--uf-field-bg);
    border: 1.5px solid var(--uf-field-line);
    border-radius: 12px;
    color: var(--ui-ink);
    font-size: 16px; /* iOS のズーム防止 */
    line-height: 1.5;
    padding: 10px 14px;
    box-shadow: inset 0 1px 2px rgba(7, 21, 38, .04);
}
/* select は既存の矢印（background-image）を残すため color だけ */
body.ui-r .search-result.login select.form-control,
body.ui-r .post1 select.form-control {
    padding-right: 36px;
    cursor: pointer;
    /* 既存の select { background-color: #EEE !important } に勝つため */
    background-color: var(--uf-field-bg) !important;
}
body.ui-r .search-result.login select.form-control:focus,
body.ui-r .post1 select.form-control:focus {
    background-color: #fff !important;
}
body.ui-r .search-result.login select.form-control.is-invalid,
body.ui-r .post1 select.form-control.is-invalid {
    background-color: var(--uf-danger-pale) !important;
}
/* select2（釣り場・魚種）も入力欄と同じ高さ・質感に */
body.ui-r .post1 .select2-container--default .select2-selection--single,
body.ui-r .search-result.login .select2-container--default .select2-selection--single {
    height: var(--uf-field-h);
    border: 1.5px solid var(--uf-field-line);
    border-radius: 12px;
    background-color: var(--uf-field-bg);
}
body.ui-r .post1 .select2-container--default .select2-selection--single .select2-selection__rendered,
body.ui-r .search-result.login .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(var(--uf-field-h) - 3px);
    padding-left: 14px;
    padding-right: 30px;
    color: var(--ui-ink);
    font-size: 15px;
}
body.ui-r .post1 .select2-container--default .select2-selection--single .select2-selection__arrow,
body.ui-r .search-result.login .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(var(--uf-field-h) - 3px);
    right: 8px;
}
body.ui-r .search-result.login .form-control:hover,
body.ui-r .post1 .form-control:hover {
    border-color: rgba(13, 79, 140, .35);
}
body.ui-r .search-result.login .form-control:focus,
body.ui-r .post1 .form-control:focus {
    background-color: #fff;
    border-color: var(--ui-aqua);
    box-shadow: 0 0 0 4px rgba(76, 195, 240, .28);
    outline: none;
}
body.ui-r .search-result.login textarea.form-control,
body.ui-r .post1 textarea.form-control {
    min-height: 150px;
    line-height: 1.7;
    resize: vertical;
}
body.ui-r .search-result.login .form-control[readonly],
body.ui-r .post1 .form-control[readonly] {
    background-color: var(--uf-field-bg);
    cursor: pointer;
}

/* ラベル */
body.ui-r .search-result.login .form-group > label,
body.ui-r .search-result.login .regist-form-item label:not(.radio-label),
body.ui-r .post1 .form-group > label {
    color: var(--ui-ink);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .02em;
    margin-bottom: 8px;
    line-height: 1.5;
}
body.ui-r .search-result.login .form-group {
    margin-bottom: 22px;
}

/* 必須マーク → 赤いピル（文言はそのまま） */
body.ui-r .search-result.login label .required,
body.ui-r .search-result.login label .text-danger,
body.ui-r .post1 .form-group > label small.text-danger,
body.ui-r .post1 .form-group > label .text-danger {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: var(--ui-r-pill);
    background: var(--uf-danger-pale);
    border: 1px solid rgba(211, 38, 74, .25);
    color: var(--uf-danger) !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: .04em;
    width: auto;
    height: auto;
}
body.ui-r .post1 .form-group > label small.text-danger {
    display: table; /* 既存は block：ラベルの下に小さく置く */
    margin: 6px 0 0;
}

/* -------------------------------------------------------------
 * 2. エラー表示
 * ------------------------------------------------------------- */
body.ui-r .search-result.login .form-control.is-invalid,
body.ui-r .post1 .form-control.is-invalid {
    border-color: var(--uf-danger);
    background-color: var(--uf-danger-pale);
}
body.ui-r .search-result.login .form-control.is-invalid:focus,
body.ui-r .post1 .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(211, 38, 74, .18);
}
body.ui-r .search-result.login .invalid-feedback,
body.ui-r .post1 .invalid-feedback {
    position: relative;
    margin-top: 8px;
    padding-left: 24px;
    color: var(--uf-danger);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}
body.ui-r .search-result.login .invalid-feedback::before,
body.ui-r .post1 .invalid-feedback::before {
    content: "!";
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--uf-danger);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}
body.ui-r .search-result.login .errors .alert,
body.ui-r .search-result.login .alert,
body.ui-r .post1 .alert {
    border-radius: var(--ui-r);
    border: 1px solid rgba(211, 38, 74, .18);
    box-shadow: var(--ui-shadow-1);
    text-align: left;
}
body.ui-r .search-result.login .alert ul {
    margin: 0;
    padding-left: 1.2em;
}
body.ui-r .search-result.login .errors .alert br + br {
    display: none; /* 見出しと一覧の間の空行（改行タグ）を詰めるだけ */
}

/* -------------------------------------------------------------
 * 3. カード幅とスマホの左右余白
 * ------------------------------------------------------------- */
@media (min-width: 1025px) {
    body.ui-r .search-result.login:not(.profile2):not(.regist):not(.tackle-all) {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }
    body.ui-r .search-result.login.regist:not(.profile2) {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }
    body.ui-r .search-result.login.profile2:not(.detail-news) {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 767px) {
    body.ui-r .search-result.login,
    body.ui-r .search-result.post1 {
        width: auto;
        margin-left: 12px;
        margin-right: 12px;
        padding-left: 18px;
        padding-right: 18px;
    }
    body.ui-r .search-result.login > h1:first-child,
    body.ui-r .search-result.login > h2:first-child,
    body.ui-r .search-result.post1 > h2:first-child {
        margin-left: -18px;
        margin-right: -18px;
    }
}

/* -------------------------------------------------------------
 * 4. ログイン
 * ------------------------------------------------------------- */
body.ui-r .search-result.login > form > a[href*="password"] {
    display: inline-block;
    margin-top: -6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ui-navy);
    text-decoration: none;
    border-bottom: 1px dashed rgba(13, 79, 140, .4);
}
body.ui-r .search-result.login > form > a[href*="password"]:hover {
    color: var(--ui-navy-hi);
    border-bottom-style: solid;
}
body.ui-r .search-result.login > form > .btn-result {
    display: block;
    width: 100%;
    min-height: 56px;
    margin: 26px auto 8px;
    font-size: 18px;
}
/* 「ソーシャルアカウントでログイン」等 → 左右に線を引いた区切り見出し */
body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > p {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 12px;
    color: var(--ui-ink-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
}
body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > p::before,
body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > p::after {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: var(--ui-line-strong);
}
body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > form[method="GET"] .form-group {
    margin-bottom: 10px;
}
body.ui-r .search-result.login > a > .btn-submit {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
}

/* SNSログイン・登録ボタン（ブランド色はそのまま・形と質感だけ） */
body.ui-r .search-result.login button.google,
body.ui-r .search-result.login button.facebook,
body.ui-r .search-result.login button.twitter,
body.ui-r .search-result.login button.line {
    float: none;
    display: block;
    width: 100% !important; /* 既存の 49% !important（登録画面）に勝つ */
    height: auto;
    min-height: 52px;
    margin: 0;
    padding: 12px 18px;
    border: 0;
    border-radius: 14px;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .06) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 4px rgba(7, 21, 38, .10), 0 8px 18px rgba(7, 21, 38, .12);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.4;
    cursor: pointer;
    transition: transform var(--ui-dur-2) var(--ui-ease), box-shadow var(--ui-dur-2) var(--ui-ease), filter var(--ui-dur-2) var(--ui-ease);
}
body.ui-r .search-result.login button.google:not(:disabled):hover,
body.ui-r .search-result.login button.facebook:not(:disabled):hover,
body.ui-r .search-result.login button.twitter:not(:disabled):hover,
body.ui-r .search-result.login button.line:not(:disabled):hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 8px rgba(7, 21, 38, .12), 0 14px 28px rgba(7, 21, 38, .18);
}
body.ui-r .search-result.login button.google:disabled,
body.ui-r .search-result.login button.facebook:disabled,
body.ui-r .search-result.login button.twitter:disabled,
body.ui-r .search-result.login button.line:disabled {
    cursor: not-allowed;
    opacity: .45;
    box-shadow: none;
}
/* PCは2つ横並び（フォーム要素ごと） */
@media (min-width: 768px) {
    body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > form[method="GET"],
    body.ui-r .search-result.login .regist-social > form {
        float: left;
        width: calc(50% - 5px);
        margin-bottom: 18px;
    }
    body.ui-r .search-result.login button.google,
    body.ui-r .search-result.login button.facebook,
    body.ui-r .search-result.login button.twitter,
    body.ui-r .search-result.login button.line {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
        letter-spacing: .01em;
        white-space: nowrap;
    }
    body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > form[method="GET"] + form[method="GET"],
    body.ui-r .search-result.login .regist-social > form + form {
        margin-left: 10px;
    }
    body.ui-r .search-result.login:not(.regist):not(.profile2):not(.tackle-all) > p,
    body.ui-r .search-result.login .regist-social > form:last-child::after {
        clear: both;
    }
}

/* -------------------------------------------------------------
 * 5. 新規登録
 * ------------------------------------------------------------- */
body.ui-r .search-result.regist .regist-social {
    margin-top: 6px;
    padding: 18px 20px 12px;
    border-radius: var(--ui-r);
    background: var(--ui-aqua-pale);
    border: 1px solid rgba(76, 195, 240, .35);
    text-align: left;
}
body.ui-r .search-result.regist .regist-social h3 {
    margin-top: 0;
}
body.ui-r .search-result.regist .regist-social .form-group {
    margin-bottom: 12px;
}
body.ui-r .search-result.regist .regist-form {
    margin-top: 28px;
}
body.ui-r .search-result.login .regist-form-item {
    border-bottom: 1px dashed var(--ui-line-strong);
    padding-bottom: 8px;
    margin-bottom: 8px;
}
body.ui-r .search-result.profile2 .regist-form-item,
body.ui-r .search-result.profile2.regist .regist-form-item {
    border-bottom: 0;
}
body.ui-r .search-result.login .regist-form-item p {
    color: var(--ui-ink-2);
    font-size: 13px;
    line-height: 1.7;
    margin-top: 0;
}
/* 注意書き（docomo等）は水色の注記に */
body.ui-r .search-result.regist .regist-form-item .form-group + p {
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--ui-surface-2);
    border-left: 3px solid var(--ui-aqua);
    margin-bottom: 14px;
}
body.ui-r .search-result.regist .regist-form-item .form-group + p br {
    display: none; /* 末尾の空行（装飾）を詰める */
}
body.ui-r .search-result.regist .i-checks label {
    color: var(--ui-ink);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
body.ui-r .search-result.regist .regist-form .btn-result {
    display: block;
    width: 100%;
    min-height: 56px;
    margin: 18px auto 0;
    font-size: 18px;
}
body.ui-r .search-result.login .btn-result:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    filter: saturate(.6);
}

/* -------------------------------------------------------------
 * 6. お問い合わせ・公開情報編集・会員情報（.profile2）
 * ------------------------------------------------------------- */
body.ui-r .search-result.profile2 > form {
    padding-top: 6px;
}
/* float の後ろでラベルが詰まらないように行を閉じる */
body.ui-r .search-result.profile2 .form-group::after {
    content: "";
    display: table;
    clear: both;
}
body.ui-r .search-result.profile2 .left-select {
    min-height: var(--uf-field-h);
}
/* 公開／非公開の切替セレクト：水色のピル */
body.ui-r .search-result.profile2 .right-select {
    padding-left: 10px;
}
body.ui-r .search-result.profile2 .right-select select.form-control {
    min-height: var(--uf-field-h);
    border-radius: 12px;
    border: 1.5px solid rgba(76, 195, 240, .55);
    background-image: linear-gradient(180deg, #f2fbff 0%, #d7f1fb 100%);
    color: var(--ui-navy-800);
    font-weight: 700;
}
body.ui-r .search-result.profile2 .right-select img {
    pointer-events: none;
}
body.ui-r .search-result.profile2 > form > p.text-left {
    margin: 4px 0 6px;
    color: var(--ui-ink);
    font-weight: 700;
    font-size: 15px;
}
body.ui-r .search-result.profile2 > form > p.text-left + p.text-left {
    font-weight: 500;
    color: var(--ui-ink-2);
    font-size: 14px;
}

/* ラジオ（性別・ユーザー種別）：60px の大円 → 指で押しやすい 44px 行に */
body.ui-r .search-result.profile2 .radio-label {
    padding-left: 38px;
    padding-right: 22px;
    line-height: 44px;
    min-height: 44px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-ink);
    margin-bottom: 6px;
}
body.ui-r .search-result.profile2 .radio-label .checkmark {
    top: 10px;
    width: 26px;
    height: 26px;
    border: 2px solid var(--ui-line-strong);
    background: #fff;
    transition: border-color var(--ui-dur-1) var(--ui-ease), box-shadow var(--ui-dur-1) var(--ui-ease);
}
body.ui-r .search-result.profile2 .radio-label:hover .checkmark {
    border-color: rgba(13, 79, 140, .5);
}
body.ui-r .search-result.profile2 .radio-label input:checked ~ .checkmark {
    border-color: var(--ui-navy);
    box-shadow: 0 0 0 4px rgba(76, 195, 240, .22);
}
body.ui-r .search-result.profile2 .radio-label input:focus-visible ~ .checkmark {
    box-shadow: 0 0 0 4px rgba(76, 195, 240, .6);
}
body.ui-r .search-result.profile2 .radio-label .checkmark::after,
body.ui-r .search-result.profile2 .regist-form-item .radio-label .checkmark::after {
    top: 5px;
    left: 5px;
    width: 12px;
    height: 12px;
    background: var(--ui-navy);
}
/* ？アイコン（absolute）がラジオの文字に重ならないよう右に場所を空ける */
body.ui-r .search-result.profile2 .fit-content {
    position: relative;
    padding-right: 34px;
}
body.ui-r .search-result.profile2 .fit-content > .question-mark {
    top: 11px;
    right: 0;
    font-size: 20px;
    color: var(--ui-navy);
    cursor: help;
}
body.ui-r .search-result.profile2 .more-option {
    padding: 8px 14px 2px;
    border-radius: 12px;
    background: var(--ui-surface-2);
}
body.ui-r .search-result.profile2 .btn-result {
    min-height: 56px;
    font-size: 18px;
}

/* お問い合わせ */
body.ui-r .search-result.contact1 > form {
    padding-top: 10px;
}
body.ui-r .search-result.contact1:not(.detail-news) textarea.form-control {
    min-height: 240px;
    border: 1.5px solid var(--uf-field-line);
}
body.ui-r .search-result.contact1:not(.detail-news) .btn-result {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 28px auto 6px;
}

/* -------------------------------------------------------------
 * 7. 投稿フォーム（.post1：入口・利用タックル・釣果投稿・釣り場紹介投稿）
 * ------------------------------------------------------------- */
body.ui-r .search-result.post1 {
    padding-bottom: 36px;
}
/* 見出し直下の説明文がカード上端に貼り付かないように */
body.ui-r .search-result.post1 > h2 + p {
    margin-top: 24px;
    color: var(--ui-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
}
body.ui-r .search-result.post1 > h2 + p a {
    display: inline;
    padding: 0;
    margin: 0;
    color: var(--ui-navy);
    border-bottom: 1px solid rgba(13, 79, 140, .4);
    text-decoration: none;
}
body.ui-r .post1 .form-group {
    margin-bottom: 20px;
}
body.ui-r .post1 .form-group > label {
    padding-top: 12px;
}
body.ui-r .post1 .post-new input,
body.ui-r .post1 .post-new select {
    color: var(--ui-ink);
}
body.ui-r .post1 .post-new select.form-control:invalid,
body.ui-r .post1 .post-new select.form-control option[value=""] {
    color: var(--ui-ink-2);
}
/* タイトル入力（大きめ） */
body.ui-r .post1 .post-new input[name="posts[title]"],
body.ui-r .post1 .post-new input[name="fg_introduces[title]"] {
    min-height: 56px;
    font-size: 18px;
    font-weight: 700;
}
/* カレンダーアイコンを入力欄の中央に */
body.ui-r .post1 .date-input i {
    top: 15px;
    right: 30px;
    color: var(--ui-navy);
    pointer-events: none;
}

/* インラインの注意書き（font-size:24px）→ 読みやすい注記カード */
body.ui-r .post1 .post-new p[style*="font-size:24px"],
body.ui-r .post1 .post-new p[style*="font-size: 24px"] {
    margin: 4px 0 22px !important;
    padding: 12px 16px 12px 44px;
    position: relative;
    font-size: 14px !important;
    line-height: 1.75;
    color: var(--ui-ink);
    background: #fff8dc;
    border: 1px solid rgba(210, 181, 3, .45);
    border-radius: 12px;
}
body.ui-r .post1 .post-new p[style*="font-size:24px"]::before,
body.ui-r .post1 .post-new p[style*="font-size: 24px"]::before {
    content: "!";
    position: absolute;
    left: 14px;
    top: 13px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ui-gold-btn);
    color: var(--ui-navy-900);
    font-size: 13px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    box-shadow: inset 0 -1px 0 rgba(110, 93, 0, .3);
}
body.ui-r .post1 .post-new p[style*="font-size:24px"] span[style*="color:red"],
body.ui-r .post1 .post-new p[style*="font-size: 24px"] span[style*="color:red"] {
    font-weight: 700;
}

/* セクション見出し（記事投稿・使用タックル・タックル登録）：紺の帯＋金の細線 */
body.ui-r .post1 .head {
    position: relative;
    margin-top: 12px;
    margin-bottom: 26px;
    padding: 12px 0;
    background: var(--ui-night-grad);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .12em;
    box-shadow: inset 0 -2px 0 var(--ui-gold);
}

/* 画像アップロード → 点線のドロップゾーン風（input の動作はそのまま） */
body.ui-r .post1 .form-group > .file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-height: 76px;
    padding: 14px 16px;
    border: 2px dashed rgba(13, 79, 140, .30);
    border-radius: var(--ui-r);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(76, 195, 240, .16) 0%, rgba(76, 195, 240, 0) 60%),
        var(--ui-surface-2);
    font-size: 13px;
    transition: border-color var(--ui-dur-2) var(--ui-ease), background-color var(--ui-dur-2) var(--ui-ease);
}
body.ui-r .post1 .form-group > .file:hover,
body.ui-r .post1 .form-group > .file:focus-within {
    border-color: var(--ui-aqua);
}
body.ui-r .post1 .custom-file-upload {
    flex: 0 0 auto;
    width: 150px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
}
body.ui-r .post1 .custom-file-upload:focus {
    box-shadow: none;
}
body.ui-r .post1 .custom-file-upload:focus-visible {
    outline: 3px solid rgba(76, 195, 240, .6);
    outline-offset: 2px;
    border-radius: var(--ui-r-pill);
}
body.ui-r .post1 .custom-file-upload::before {
    display: inline-block;
    box-sizing: border-box;
    width: 150px;
    height: 44px;
    padding: 0 16px 0 40px;
    line-height: 44px;
    border: 0;
    border-radius: var(--ui-r-pill);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") no-repeat 16px 50% / 18px 18px,
        var(--ui-navy-grad);
    color: #fff;
    text-shadow: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: left;
    box-shadow: 0 0 0 1px rgba(76, 195, 240, .45), inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 14px rgba(13, 79, 140, .25);
    transition: transform var(--ui-dur-2) var(--ui-ease), box-shadow var(--ui-dur-2) var(--ui-ease);
}
body.ui-r .post1 .custom-file-upload:hover::before {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(76, 195, 240, .8), inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 20px rgba(13, 79, 140, .32);
}
body.ui-r .post1 .custom-file-upload.invalid::before {
    box-shadow: 0 0 0 2px var(--uf-danger), 0 6px 14px rgba(211, 38, 74, .2);
}
body.ui-r .post1 .file .right-text {
    flex: 1 1 120px;
    min-width: 0;
    color: var(--ui-ink-2);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.ui-r .post1 .file .invalid-feedback {
    flex: 0 0 100%;
    margin-top: 0;
}

/* ＋／− の丸ボタン（魚種の追加・セクション追加） */
body.ui-r .post1 .profile-plus span {
    width: 44px;
    height: 44px;
    line-height: 40px;
    border: 2px solid var(--ui-navy);
    background: #fff;
    color: var(--ui-navy);
    font-weight: 800;
    box-shadow: var(--ui-shadow-1);
    transition: background-color var(--ui-dur-1) var(--ui-ease), color var(--ui-dur-1) var(--ui-ease), transform var(--ui-dur-2) var(--ui-ease-spring);
}
body.ui-r .post1 .profile-plus a {
    text-decoration: none;
}
body.ui-r .post1 .profile-plus a:hover span {
    background: var(--ui-navy);
    color: #fff;
    transform: scale(1.06);
}
body.ui-r .post1 .text-right > span {
    top: 12px;
    color: var(--ui-ink-2);
    font-weight: 700;
}
body.ui-r .post1 .fish-type > .row {
    margin-bottom: 12px;
}

/* 「追加する ＋」→ 点線のピルの帯 */
body.ui-r .post1 .more-post1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 26px 0 30px;
    padding: 10px 16px;
    border: 2px dashed rgba(13, 79, 140, .28);
    border-radius: var(--ui-r);
    color: var(--ui-navy);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .06em;
    background: var(--ui-surface-2);
}
body.ui-r .post1 .more-post1 .profile-plus {
    padding-left: 0;
}

/* 記事セクション（fieldset）の区切りと削除ボタン */
body.ui-r .post1 .content-area > hr {
    border: 0;
    border-top: 2px dashed var(--ui-line-strong);
    margin: 26px 0;
}
body.ui-r .post1 .minus-content {
    top: -16px;
    right: 6px;
    width: 32px;
    height: 32px;
    line-height: 26px;
    font-size: 22px;
    font-weight: 800;
    color: var(--uf-danger);
    border-color: rgba(211, 38, 74, .55);
    background: #fff;
    box-shadow: var(--ui-shadow-1);
}
body.ui-r .post1 .minus-content:hover {
    background: var(--uf-danger);
    color: #fff;
}

/* 新規タックル登録リンク（pre_create） */
body.ui-r .post1 .link-post1 {
    font-weight: 700;
    color: var(--ui-navy);
}
body.ui-r .post1 #tackleCreateArea .tackle-list {
    margin-top: 10px;
}

/* 投稿の種類選択（post_fg） */
body.ui-r .post1 .post-new > p[style*="1.2em"] {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 12px;
    color: var(--ui-navy-800);
    font-weight: 800;
    font-size: 16px !important;
    letter-spacing: .02em;
}
body.ui-r .post1 .post-new > p[style*="1.2em"]::before {
    content: "";
    flex: 0 0 5px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--ui-gold-hi) 0%, var(--ui-gold) 50%, var(--ui-navy) 51%, var(--ui-navy-800) 100%);
}
body.ui-r .post1 .post-new > .btn-result.btn-next {
    min-height: 60px;
    font-size: 18px;
    width: 100%;
    margin: 0 auto 12px;
}
/* 下書き一覧（add-friend）→ 紺のアウトラインピル（副ボタン） */
body.ui-r .post1 .post-new button.add-friend {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    min-height: 48px;
    margin: 0 auto 8px;
    padding: 10px 20px;
    background: #fff;
    color: var(--ui-navy);
    border: 1.5px solid rgba(13, 79, 140, .5);
    border-radius: var(--ui-r-pill);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: var(--ui-shadow-1);
    transition: background-color var(--ui-dur-2) var(--ui-ease), color var(--ui-dur-2) var(--ui-ease), transform var(--ui-dur-2) var(--ui-ease), box-shadow var(--ui-dur-2) var(--ui-ease);
}
body.ui-r .post1 .post-new button.add-friend i {
    margin-left: 8px;
}
body.ui-r .post1 .post-new button.add-friend:hover {
    background: var(--ui-navy);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 79, 140, .28);
}

/* -------------------------------------------------------------
 * 8. カードの外の送信ボタン（金の大きなCTA）と戻るボタン（ゴースト）
 * ------------------------------------------------------------- */
body.ui-r .content.pre > .search-result.post1 ~ .btn-result.btn-without {
    min-height: 64px;
    height: auto;
    padding: 14px 24px;
    font-size: 18px;
    line-height: 1.4;
    border-radius: 18px;
}
body.ui-r .content.pre > .search-result.post1 ~ a > .btn-submit.btn-without,
body.ui-r .search-result.profile2 + a > .btn-submit.btn-without,
body.ui-r .search-result.regist5 + a > .btn-submit {
    background-color: rgba(255, 255, 255, .55);
    background-image: none;
    color: var(--ui-navy-800);
    border: 1.5px solid rgba(7, 21, 38, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
    height: auto;
    min-height: 52px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 700;
}
body.ui-r .content.pre > .search-result.post1 ~ a > .btn-submit.btn-without:hover,
body.ui-r .search-result.profile2 + a > .btn-submit.btn-without:hover,
body.ui-r .search-result.regist5 + a > .btn-submit:hover {
    background-color: #fff;
    color: var(--ui-navy);
    border-color: var(--ui-navy);
    box-shadow: 0 8px 20px rgba(7, 21, 38, .14);
}
body.ui-r .content.pre > .search-result.post1 ~ a > .btn-submit.btn-without i,
body.ui-r .search-result.profile2 + a > .btn-submit.btn-without i {
    color: var(--ui-navy);
}
@media (min-width: 1025px) {
    body.ui-r .content.pre > .search-result.post1 ~ .btn-result.btn-without,
    body.ui-r .content.pre > .search-result.post1 ~ a > .btn-submit.btn-without,
    body.ui-r .search-result.profile2 + a > .btn-submit.btn-without {
        max-width: 640px;
    }
    body.ui-r .content.pre > .search-result.post1 ~ a > .btn-submit.btn-without,
    body.ui-r .search-result.profile2 + a > .btn-submit.btn-without {
        margin-top: 14px;
        margin-bottom: 14px;
    }
}

/* -------------------------------------------------------------
 * 9. スマホ（〜767px）
 * ------------------------------------------------------------- */
@media (max-width: 767px) {
    /* 投稿フォームはラベルを上・入力を下に積む（狭い横並びで選択肢が「選…」に潰れるのを防ぐ） */
    body.ui-r .post1 .form-group {
        flex-wrap: wrap;
    }
    body.ui-r .post1 .form-group > label[class*="col-"],
    body.ui-r .post1 .form-group > div[class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    body.ui-r .post1 .form-group > label {
        padding-top: 0;
        margin-bottom: 8px;
        font-size: 14px;
    }
    body.ui-r .post1 .form-group > label small.text-danger {
        display: inline-block;
        margin: 0 0 0 8px;
    }
    body.ui-r .post1 .form-group > label br {
        display: none;
    }
    body.ui-r .post1 .date-input i {
        right: 16px;
    }
    body.ui-r .post1 .form-group > .file {
        padding: 12px;
    }
    body.ui-r .post1 .head {
        margin-left: -18px;
        margin-right: -18px;
    }
    body.ui-r .post1 .post-new p[style*="font-size:24px"],
    body.ui-r .post1 .post-new p[style*="font-size: 24px"] {
        font-size: 13px !important;
    }
    /* 魚種：1行目に魚種、2行目に匹数と＋ */
    body.ui-r .post1 .fish-type .row {
        margin-left: 0;
        margin-right: 0;
    }
    /* 既存の pr-5 / pl-5 は !important のため */
    body.ui-r .post1 .fish-type .row > div {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.ui-r .post1 .fish-type .row > div.pl-5.pr-5 {
        padding-right: 12px !important;
    }
    body.ui-r .post1 .fish-type .row > div.text-right {
        padding-left: 4px !important;
    }
    body.ui-r .post1 .fish-type .row > div:first-child {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 8px;
    }
    body.ui-r .post1 .fish-type .row > .invalid-feedback {
        flex: 0 0 100%;
        margin: -2px 0 8px;
    }
    body.ui-r .post1 .fish-type .row > div.col-4:not(:first-child) {
        flex: 0 0 50%;
        max-width: 50%;
    }
    body.ui-r .search-result.login button.google,
    body.ui-r .search-result.login button.facebook,
    body.ui-r .search-result.login button.twitter,
    body.ui-r .search-result.login button.line {
        min-height: 54px;
        font-size: 16px;
    }
    body.ui-r .search-result.login > form > .btn-result,
    body.ui-r .search-result.regist .regist-form .btn-result {
        min-height: 56px;
        font-size: 17px;
        margin-left: 0;
        margin-right: 0;
    }
    body.ui-r .search-result.login label,
    body.ui-r .search-result.login .form-group > label {
        font-size: 15px;
    }
    body.ui-r .search-result.login input {
        height: auto;
    }
    body.ui-r .search-result.regist .regist-social {
        padding: 16px 14px 8px;
    }
    body.ui-r .search-result.profile2 .right-select {
        width: 120px;
    }
    body.ui-r .search-result.profile2 .left-select {
        width: calc(100% - 120px);
    }
    body.ui-r .search-result.profile2 .radio-label {
        padding-right: 14px;
        font-size: 15px;
    }
    body.ui-r .content.pre > .search-result.post1 ~ .btn-result.btn-without {
        font-size: 16px;
        min-height: 60px;
    }
}

/* -------------------------------------------------------------
 * 10. 動きを減らす設定
 * ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    body.ui-r .search-result.login button.google,
    body.ui-r .search-result.login button.facebook,
    body.ui-r .search-result.login button.twitter,
    body.ui-r .search-result.login button.line,
    body.ui-r .post1 .custom-file-upload::before,
    body.ui-r .post1 .profile-plus span,
    body.ui-r .post1 .post-new button.add-friend,
    body.ui-r .post1 .form-group > .file {
        transition: none;
    }
    body.ui-r .search-result.login button:hover,
    body.ui-r .post1 .custom-file-upload:hover::before,
    body.ui-r .post1 .profile-plus a:hover span,
    body.ui-r .post1 .post-new button.add-friend:hover {
        transform: none;
    }
}
