.dcard-direct-post-fields {
    --dcard-ink: #32325d;
    --dcard-label: #424770;
    --dcard-muted: #697386;
    --dcard-line: #e4e4e4;
    --dcard-green: #16805c;
    --dcard-shadow: 0 1px 1px rgba(0,0,0,.03), 0 3px 6px rgba(0,0,0,.02);
    margin-top: 12px;
    color: var(--dcard-ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.dcard-direct-post-fields *,
.dcard-direct-post-fields *::before,
.dcard-direct-post-fields *::after { box-sizing: border-box; }
.dcard-direct-post-fields .dcard-description {
    margin: 0 0 17px;
    color: var(--dcard-muted);
    font-size: 13px;
    line-height: 1.5;
}
.dcard-direct-post-fields .dcard-row { margin: 0 0 16px; }
.dcard-direct-post-fields .dcard-row-inline { display: flex; align-items: flex-start; gap: 14px; }
.dcard-direct-post-fields .dcard-field { flex: 1; min-width: 0; }
.dcard-direct-post-fields .dcard-label {
    display: block;
    margin: 0 0 8px;
    color: var(--dcard-label);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}
.dcard-direct-post-fields .dcard-input-wrap { position: relative; }
.dcard-direct-post-fields .dcard-input {
    display: block;
    appearance: none;
    width: 100%;
    height: 50px;
    min-height: 50px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--dcard-line);
    border-radius: 4px;
    background: #fff;
    color: var(--dcard-ink);
    box-shadow: var(--dcard-shadow);
    font: 400 16px/50px system-ui, -apple-system, "Segoe UI", sans-serif;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dcard-direct-post-fields .dcard-input::placeholder { color: #aab7c4; opacity: 1; }
.dcard-direct-post-fields .dcard-input:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: var(--dcard-shadow), 0 0 0 3px rgba(0,123,255,.2);
}
.dcard-direct-post-fields .dcard-input-number { padding-right: 93px; }
.dcard-direct-post-fields .dcard-input-csc { padding-right: 44px; }
.dcard-direct-post-fields .dcard-brands {
    position: absolute;
    top: 50%;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    transform: translateY(-50%);
}
.dcard-direct-post-fields .dcard-brand { display: block; width: 34px; height: 24px; object-fit: contain; }
.dcard-direct-post-fields .dcard-brand.is-hidden { display: none; }
.dcard-direct-post-fields .dcard-cvc-mark {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 25px;
    height: 17px;
    border: 1.5px solid #a0a8b5;
    border-radius: 3px;
    pointer-events: none;
    transform: translateY(-50%);
}
.dcard-direct-post-fields .dcard-cvc-mark::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #c7ccd4;
}
.dcard-direct-post-fields .dcard-cvc-mark::after {
    content: "•••";
    position: absolute;
    right: 2px;
    bottom: -2px;
    color: #7c8797;
    font-size: 9px;
    font-weight: 800;
}
.dcard-direct-post-fields .dcard-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 2px;
    color: var(--dcard-muted);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}
.dcard-direct-post-fields .dcard-security-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dcard-green);
    box-shadow: 0 0 0 3px rgba(22,128,92,.1);
}
@media (max-width: 390px) {
    .dcard-direct-post-fields .dcard-row-inline { display: block; }
}
.dcard-direct-post-fields .dcard-select {
    padding-right: 40px;
    background-image: none;
    cursor: pointer;
}
.dcard-direct-post-fields .dcard-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #697386;
    border-bottom: 2px solid #697386;
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}
.dcard-direct-post-fields .dcard-input.is-error {
    border-color: #df1b41;
    color: #df1b41;
    box-shadow: var(--dcard-shadow), 0 0 0 1px #df1b41;
}
.dcard-direct-post-fields .dcard-error {
    display: block;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    color: #df1b41;
    font-size: 13px;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height .2s ease, margin-top .2s ease, opacity .16s ease, transform .2s ease;
}
.dcard-direct-post-fields .dcard-error.is-visible {
    max-height: 52px;
    margin-top: 5px;
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .dcard-direct-post-fields .dcard-error { transition: none; }
}

.dcard-saved-choices {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
}
.dcard-saved-choices legend { padding: 0 5px; font-weight: 600; }
.dcard-saved-choices .dcard-saved-option {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin: 0;
    padding: 11px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.dcard-saved-choices .dcard-saved-option + .dcard-saved-option { margin-top: 4px; }
.dcard-saved-choices .dcard-saved-option:hover { background: #f7f9fc; }
.dcard-saved-choices .dcard-saved-option:has(input:checked) {
    border-color: #cbd2dc;
    background: #f1f3f5;
    color: #273244;
}
.dcard-saved-choices .dcard-saved-option:has(input:focus-visible) {
    outline: 2px solid #3f6fd0;
    outline-offset: 2px;
}
.dcard-saved-choices .dcard-saved-option input:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}
.dcard-saved-choices .dcard-saved-option input { flex: 0 0 auto; margin: 0; accent-color: #245bc4; }
.dcard-saved-choices .dcard-saved-card-label { flex: 1 1 auto; }
.dcard-saved-choices .dcard-saved-option:has(input:checked) .dcard-saved-card-label { font-weight: 700; }
.dcard-saved-choices .dcard-saved-option img { display: block; width: 24px; height: 16px; flex: 0 0 24px; object-fit: contain; }
.dcard-saved-hint { margin: 0 0 16px; color: #697386; font-size: 12px; line-height: 1.5; }

.dcard-saved-payform-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .66);
}
.dcard-saved-payform-dialog {
    position: relative;
    width: min(100%, 620px);
    max-height: min(90vh, 900px);
    overflow: auto;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
    color: #172033;
}
.dcard-saved-payform-title { margin: 0 48px 8px 0; font-size: 22px; line-height: 1.3; }
.dcard-saved-payform-status { margin: 0 0 16px; color: #576174; }
.dcard-saved-payform-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: auto;
    min-width: 64px;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #cbd2dc;
    border-radius: 6px;
    background: #fff;
    color: #172033;
    cursor: pointer;
}
.dcard-saved-payform-slot { min-height: 250px; }
.dcard-saved-payform-check { display: inline-block; margin-top: 12px; }
@media (max-width: 480px) {
    .dcard-saved-payform-dialog { padding: 18px; }
}
