.ribf-wrap,
.ribf-wrap * {
    box-sizing: border-box;
}
.ribf-wrap {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 36px;
    background: #fff;
    color: #111;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-family: Poppins, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}
.ribf-heading { margin-bottom: 28px; }
.ribf-title {
    margin: 0 0 8px;
    color: #111;
    font-size: clamp(25px, 4vw, 36px);
    font-weight: 600;
    line-height: 1.2;
}
.ribf-description { margin: 0; color: #666; font-size: 15px; }
.ribf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.ribf-field { min-width: 0; }
.ribf-field-full { grid-column: 1 / -1; }
.ribf-field > label {
    display: block;
    margin: 0 0 7px;
    color: inherit;
    font-size: 14px;
    font-weight: 500;
}
.ribf-field > label span { color: #c62828; }
.ribf-field input:not([type="checkbox"]),
.ribf-field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 14px;
    background: #fff;
    color: #111;
    border: 1px solid #d7d7d7;
    border-radius: 5px;
    outline: 0;
    box-shadow: none;
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ribf-field textarea { resize: vertical; }
.ribf-field input:focus,
.ribf-field textarea:focus {
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
}
.ribf-field input::placeholder,
.ribf-field textarea::placeholder { color: #999; opacity: 1; }
.ribf-file-wrap {
    padding: 14px;
    background: #fafafa;
    border: 1px dashed #cfcfcf;
    border-radius: 5px;
}
.ribf-file-wrap input[type="file"] {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.ribf-file-help { display: block; margin-top: 7px; color: #777; font-size: 12px; }
.ribf-security-box {
    padding: 16px;
    background: #f7f7f7;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
}
.ribf-captcha-row {
    display: grid;
    grid-template-columns: auto minmax(100px, 150px) 42px;
    align-items: center;
    gap: 12px;
}
.ribf-captcha-question {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    padding: 0 16px;
    background: #111;
    color: #fff;
    border-radius: 5px;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
}
.ribf-refresh-captcha {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #fff;
    color: #111;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}
.ribf-refresh-captcha:hover { background: #eee; color: #111; }
.ribf-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}
.ribf-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 3px 0 0;
    accent-color: #111;
}
.ribf-submit {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 13px 28px;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    transition: background .2s ease, opacity .2s ease, transform .2s ease;
}
.ribf-submit:hover { background: #333; color: #fff; transform: translateY(-1px); }
.ribf-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.ribf-message {
    display: none;
    margin-top: 18px;
    padding: 13px 15px;
    border-radius: 5px;
    font-size: 14px;
}
.ribf-message.is-success { display: block; background: #eaf7ed; color: #176b2c; border: 1px solid #b8dfc1; }
.ribf-message.is-error { display: block; background: #fff0f0; color: #9d1c1c; border: 1px solid #efc1c1; }
.ribf-hp {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
@media (max-width: 767px) {
    .ribf-wrap { padding: 24px 18px; }
    .ribf-grid { grid-template-columns: 1fr; gap: 16px; }
    .ribf-field-full { grid-column: auto; }
    .ribf-captcha-row { grid-template-columns: 1fr 92px 42px; gap: 8px; }
    .ribf-captcha-question { padding: 0 12px; font-size: 15px; }
    .ribf-submit { width: 100%; }
}
@media (max-width: 420px) {
    .ribf-captcha-row { grid-template-columns: 1fr 42px; }
    .ribf-captcha-row input { grid-column: 1 / -1; grid-row: 2; }
    .ribf-refresh-captcha { grid-column: 2; grid-row: 1; }
    .ribf-captcha-question { grid-column: 1; grid-row: 1; }
}
