/* "Report an issue": the floating button, the error prompt and the report form
   (see js/report-issue.js). */

#cf-report-root {
    /* Hidden by an inline style until this file has loaded */
    display: block !important;
}

#cf-report-root,
.cf-ri-overlay {
    --ri-accent: #11a191;
    --ri-accent-hover: #0e8b7d;
    --ri-accent-soft: rgba(17, 161, 145, 0.1);
    --ri-ink: #0f172a;
    --ri-ink-2: #334155;
    --ri-muted: #64748b;
    --ri-faint: #94a3b8;
    --ri-line: #e2e8f0;
    --ri-mark: #f43f5e;
    --ri-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ri-ease-in: cubic-bezier(0.4, 0, 1, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#cf-report-root *,
#cf-report-root *::before,
#cf-report-root *::after,
.cf-ri-overlay *,
.cf-ri-overlay *::before,
.cf-ri-overlay *::after {
    box-sizing: border-box;
}

#cf-report-root button,
.cf-ri-overlay button {
    margin: 0;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------------------
   Floating button
   --------------------------------------------------------------------------- */
.cf-ri-fab {
    position: fixed;
    left: calc(20px + env(safe-area-inset-left, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 9000; /* under the site's pop-ups and overlays */
    display: flex;
    align-items: center;
    height: 44px;
    min-width: 44px;
    padding: 0 13px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    color: var(--ri-ink-2);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px -6px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transition:
        opacity 0.4s var(--ri-ease-out),
        transform 0.4s var(--ri-ease-out),
        box-shadow 0.2s ease,
        color 0.2s ease,
        background-color 0.2s ease;
}

.cf-ri-fab.is-shown {
    opacity: 1;
}

.cf-ri-fab svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.cf-ri-fab-label {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.34s var(--ri-ease-out), opacity 0.2s ease, margin 0.34s var(--ri-ease-out);
}

@media (hover: hover) {
    .cf-ri-fab:hover {
        color: var(--ri-accent);
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 28px -6px rgba(15, 23, 42, 0.24);
    }

    .cf-ri-fab:hover .cf-ri-fab-label {
        max-width: 140px;
        margin-left: 8px;
        opacity: 1;
    }
}

.cf-ri-fab:focus-visible {
    outline: 2px solid var(--ri-accent);
    outline-offset: 3px;
}

.cf-ri-fab:focus-visible .cf-ri-fab-label {
    max-width: 140px;
    margin-left: 8px;
    opacity: 1;
}

.cf-ri-fab:active {
    transform: scale(0.95);
}

/* Phones, while the page scrolls down under it (js/report-issue.js tuckOnScroll) */
.cf-ri-fab.is-tucked {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   "Something went wrong?" prompt after a page error
   --------------------------------------------------------------------------- */
.cf-ri-prompt {
    position: fixed;
    left: calc(20px + env(safe-area-inset-left, 0px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 9001;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: min(340px, calc(100vw - 40px));
    padding: 14px 12px 14px 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    background: #fff;
    color: var(--ri-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 18px 40px -10px rgba(15, 23, 42, 0.28);
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.3s var(--ri-ease-out), transform 0.36s var(--ri-ease-out);
}

.cf-ri-prompt.is-shown {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.cf-ri-prompt-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff7ed;
    color: #ea580c;
}

.cf-ri-prompt-icon svg {
    width: 18px;
    height: 18px;
}

.cf-ri-prompt-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.cf-ri-prompt-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.cf-ri-prompt-text {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ri-muted);
}

.cf-ri-prompt-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.cf-ri-prompt-go {
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 9px;
    background: var(--ri-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.cf-ri-prompt-go:hover {
    background: var(--ri-accent-hover);
}

.cf-ri-prompt-later {
    height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--ri-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.cf-ri-prompt-later:hover {
    background: #f1f5f9;
    color: var(--ri-ink);
}

/* ---------------------------------------------------------------------------
   Form overlay and card
   --------------------------------------------------------------------------- */
.cf-ri-overlay {
    position: fixed;
    inset: 0;
    z-index: 100030; /* above the header (50000), sign-up/login (60000) and profile nudges */
    display: flex;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
    opacity: 0;
    /* !important: several pages ship a catch-all `body > *:not(#aiModal)... { transition: filter }` */
    transition: opacity 0.3s var(--ri-ease-out) !important;
}

.cf-ri-overlay[hidden] {
    display: none !important;
}

.cf-ri-overlay.is-open {
    opacity: 1;
}

.cf-ri-overlay.is-closing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s var(--ri-ease-in) !important;
}

.cf-ri-card {
    position: relative;
    margin: auto 0;
    width: 100%;
    max-width: 460px;
    padding: 24px 24px 20px;
    border-radius: 20px;
    background: #fff;
    color: var(--ri-ink);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 24px -6px rgba(15, 23, 42, 0.12),
        0 32px 64px -12px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(14px) scale(0.965);
    transition:
        opacity 0.42s var(--ri-ease-out),
        transform 0.42s var(--ri-ease-out),
        max-width 0.42s var(--ri-ease-out);
}

.cf-ri-overlay.is-open .cf-ri-card {
    opacity: 1;
    transform: none;
}

.cf-ri-overlay.is-closing .cf-ri-card {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.2s var(--ri-ease-in), transform 0.2s var(--ri-ease-in);
}

.cf-ri-card.is-wide {
    max-width: 960px;
}

.cf-ri-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ri-faint);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.cf-ri-close:hover {
    background: #f1f5f9;
    color: var(--ri-ink);
}

.cf-ri-close svg {
    width: 16px;
    height: 16px;
}

.cf-ri-view[hidden] {
    display: none;
}

.cf-ri-view.is-entering {
    animation: cf-ri-settle 0.32s var(--ri-ease-out);
}

.cf-ri-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-right: 30px;
}

.cf-ri-head-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--ri-accent-soft);
    color: var(--ri-accent);
}

.cf-ri-head-icon svg {
    width: 22px;
    height: 22px;
}

.cf-ri-title {
    margin: 1px 0 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ri-ink);
}

.cf-ri-subtitle {
    margin: 3px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ri-muted);
}

/* Description */
.cf-ri-field {
    position: relative;
    margin-top: 20px;
}

.cf-ri-textarea {
    display: block;
    width: 100%;
    min-height: 116px;
    max-height: 260px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--ri-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ri-ink);
    font: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cf-ri-field.has-mic .cf-ri-textarea {
    padding-right: 52px;
}

.cf-ri-textarea::placeholder {
    color: #a3aebd;
}

.cf-ri-textarea:focus {
    border-color: var(--ri-accent);
    box-shadow: 0 0 0 4px var(--ri-accent-soft);
}

.cf-ri-textarea[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Quieter mic than the review page's (js/voice-to-text.js, styles in styles.css) */
.cf-ri-field .vtt-btn {
    right: 9px;
    bottom: 9px;
    width: 34px;
    height: 34px;
    background: #f1f5f9;
    color: var(--ri-muted);
    box-shadow: none;
}

.cf-ri-field .vtt-btn svg {
    width: 18px;
    height: 18px;
}

.cf-ri-field .vtt-btn:hover {
    transform: none;
    background: var(--ri-accent-soft);
    color: var(--ri-accent);
    box-shadow: none;
}

.cf-ri-field .vtt-btn.recording {
    background: linear-gradient(135deg, #e63946 0%, #c82333 100%);
    color: #fff;
}

.cf-ri-counter {
    position: absolute;
    right: 12px;
    bottom: -20px;
    font-size: 11.5px;
    color: #b45309;
    font-variant-numeric: tabular-nums;
}

.cf-ri-counter[hidden] {
    display: none;
}

/* Screenshot */
.cf-ri-shot {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid var(--ri-line);
    border-radius: 14px;
    background: #f8fafc;
}

.cf-ri-thumb {
    position: relative;
    flex-shrink: 0;
    width: 116px;
    height: 74px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 9px;
    background: #fff;
    cursor: default;
}

.cf-ri-shot[data-state="ready"] .cf-ri-thumb {
    cursor: zoom-in;
}

.cf-ri-thumb img,
.cf-ri-thumb canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.cf-ri-thumb-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed #cbd5e1;
    border-radius: inherit;
    background: #fff;
    color: #cbd5e1;
}

.cf-ri-thumb-empty[hidden] {
    display: none;
}

.cf-ri-thumb-empty svg {
    width: 24px;
    height: 24px;
}

.cf-ri-shot[data-state="capturing"] .cf-ri-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, #eef2f6 30%, #f8fafc 50%, #eef2f6 70%);
    background-size: 220% 100%;
    animation: cf-ri-shimmer 1.15s linear infinite;
}

.cf-ri-thumb-badge {
    position: absolute;
    right: 5px;
    bottom: 5px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--ri-mark);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

.cf-ri-thumb-badge[hidden] {
    display: none;
}

.cf-ri-shot-info {
    flex: 1;
    min-width: 0;
}

.cf-ri-shot-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ri-ink);
}

.cf-ri-shot-text {
    margin: 2px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ri-muted);
}

.cf-ri-shot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 5px 0 0 -8px;
}

.cf-ri-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ri-accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.cf-ri-link:hover {
    background: var(--ri-accent-soft);
}

.cf-ri-link.is-quiet {
    color: var(--ri-muted);
}

.cf-ri-link.is-quiet:hover {
    background: #eef2f6;
    color: var(--ri-ink);
}

.cf-ri-link[hidden] {
    display: none;
}

.cf-ri-link svg {
    width: 15px;
    height: 15px;
}

.cf-ri-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Email (signed-out visitors only) */
.cf-ri-email {
    display: block;
    width: 100%;
    height: 44px;
    margin: 12px 0 0;
    padding: 0 14px;
    border: 1px solid var(--ri-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ri-ink);
    font: inherit;
    font-size: 14.5px;
    outline: none;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cf-ri-email[hidden] {
    display: none;
}

.cf-ri-email::placeholder {
    color: #a3aebd;
}

.cf-ri-email:focus {
    border-color: var(--ri-accent);
    box-shadow: 0 0 0 4px var(--ri-accent-soft);
}

.cf-ri-email[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.cf-ri-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* What gets attached */
.cf-ri-details {
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ri-muted);
}

.cf-ri-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border: none;
    background: none;
    color: inherit;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}

.cf-ri-details-toggle:hover {
    color: var(--ri-ink-2);
}

.cf-ri-details-toggle svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.cf-ri-details-toggle[aria-expanded="true"] .cf-ri-chevron {
    transform: rotate(90deg);
}

.cf-ri-details-list {
    margin: 6px 0 0;
    padding: 10px 12px 10px 30px;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--ri-muted);
}

.cf-ri-details-list[hidden] {
    display: none;
}

.cf-ri-details-list li + li {
    margin-top: 2px;
}

.cf-ri-details-list b {
    font-weight: 600;
    color: var(--ri-ink-2);
}

.cf-ri-error {
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #dc2626;
    transition: max-height 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.cf-ri-error.is-visible {
    max-height: 60px;
    margin-top: 12px;
    opacity: 1;
}

.cf-ri-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.cf-ri-primary {
    position: relative;
    flex: 1;
    height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 12px;
    background: var(--ri-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(17, 161, 145, 0.25), 0 6px 16px -4px rgba(17, 161, 145, 0.35);
    transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.cf-ri-primary:hover:not(:disabled) {
    background: var(--ri-accent-hover);
}

.cf-ri-primary:active:not(:disabled) {
    transform: scale(0.985);
}

.cf-ri-primary:disabled {
    cursor: default;
    opacity: 0.5;
    box-shadow: none;
}

.cf-ri-primary.is-busy {
    color: transparent;
    opacity: 1;
}

.cf-ri-primary.is-busy::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cf-ri-spin 0.7s linear infinite;
}

.cf-ri-kbd {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--ri-faint);
    white-space: nowrap;
}

.cf-ri-kbd kbd {
    display: inline-block;
    min-width: 20px;
    padding: 1px 5px;
    border: 1px solid var(--ri-line);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--ri-muted);
    text-align: center;
}

.cf-ri-primary:focus-visible,
.cf-ri-close:focus-visible,
.cf-ri-link:focus-visible,
.cf-ri-thumb:focus-visible,
.cf-ri-details-toggle:focus-visible,
.cf-ri-tool:focus-visible,
.cf-ri-prompt-go:focus-visible,
.cf-ri-prompt-later:focus-visible {
    outline: 2px solid var(--ri-accent);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Highlight view: drag boxes over the screenshot
   --------------------------------------------------------------------------- */
.cf-ri-mark-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 36px;
}

.cf-ri-mark-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ri-ink);
}

.cf-ri-mark-hint {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--ri-muted);
}

.cf-ri-stage {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding: 8px;
    border: 1px solid var(--ri-line);
    border-radius: 12px;
    background: #f1f5f9;
}

/* The whole screenshot fits, whatever its shape */
.cf-ri-stage canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 250px);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.cf-ri-mark-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.cf-ri-mark-actions .cf-ri-primary {
    flex: 0 0 auto;
    min-width: 120px;
    height: 42px;
    margin-left: auto;
    font-size: 14.5px;
}

.cf-ri-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--ri-line);
    border-radius: 10px;
    background: #fff;
    color: var(--ri-ink-2);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.cf-ri-tool:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.cf-ri-tool:disabled {
    opacity: 0.45;
    cursor: default;
}

.cf-ri-tool svg {
    width: 15px;
    height: 15px;
}

/* ---------------------------------------------------------------------------
   Sent
   --------------------------------------------------------------------------- */
.cf-ri-success {
    padding: 14px 4px 6px;
    text-align: center;
}

.cf-ri-check {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ri-accent);
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    box-shadow: 0 0 0 8px var(--ri-accent-soft);
    animation: cf-ri-pop 0.5s var(--ri-ease-out) 0.05s forwards;
}

.cf-ri-check svg {
    width: 26px;
    height: 26px;
}

.cf-ri-check path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: cf-ri-draw 0.36s ease-out 0.28s forwards;
}

.cf-ri-success .cf-ri-title {
    margin: 0;
    font-size: 19px;
}

.cf-ri-success-text {
    max-width: 320px;
    margin: 8px auto 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ri-muted);
    text-wrap: balance;
}

.cf-ri-success .cf-ri-actions {
    justify-content: center;
    margin-top: 22px;
}

.cf-ri-success .cf-ri-primary {
    flex: 0 0 auto;
    min-width: 140px;
    height: 44px;
}

@keyframes cf-ri-spin {
    to { transform: rotate(360deg); }
}

@keyframes cf-ri-shimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

@keyframes cf-ri-settle {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes cf-ri-pop {
    to { opacity: 1; transform: scale(1); }
}

@keyframes cf-ri-draw {
    to { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------------------
   Phones: smaller button, bottom sheet
   --------------------------------------------------------------------------- */
@media (max-width: 560px) {
    .cf-ri-fab {
        left: calc(14px + env(safe-area-inset-left, 0px));
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        height: 42px;
        min-width: 42px;
        padding: 0 12px;
    }

    .cf-ri-prompt {
        left: 12px;
        right: 12px;
        bottom: calc(66px + env(safe-area-inset-bottom, 0px));
        width: auto;
    }

    .cf-ri-overlay {
        padding: 0;
    }

    .cf-ri-card,
    .cf-ri-card.is-wide {
        margin: auto 0 0;
        max-width: none;
        max-height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 28px 20px calc(18px + env(safe-area-inset-bottom, 0px));
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
        transition: transform 0.46s var(--ri-ease-out), opacity 0.2s ease;
    }

    .cf-ri-card::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        width: 36px;
        height: 4px;
        margin-left: -18px;
        border-radius: 999px;
        background: #e2e8f0;
    }

    .cf-ri-overlay.is-closing .cf-ri-card {
        opacity: 1;
        transform: translateY(100%);
        transition: transform 0.26s var(--ri-ease-in);
    }

    .cf-ri-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .cf-ri-textarea,
    .cf-ri-email {
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .cf-ri-kbd {
        display: none;
    }

    .cf-ri-stage canvas {
        max-height: calc(100vh - 210px);
    }

    .cf-ri-mark-actions .cf-ri-tool span {
        display: none;
    }
}

@media print {
    #cf-report-root,
    .cf-ri-overlay {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cf-ri-fab,
    .cf-ri-prompt,
    .cf-ri-overlay,
    .cf-ri-overlay.is-closing,
    .cf-ri-card,
    .cf-ri-overlay.is-closing .cf-ri-card {
        transition-duration: 0.01ms !important;
    }

    .cf-ri-card,
    .cf-ri-overlay.is-closing .cf-ri-card,
    .cf-ri-fab {
        transform: none !important;
    }

    .cf-ri-view.is-entering,
    .cf-ri-check,
    .cf-ri-check path {
        animation-duration: 0.01ms;
        animation-delay: 0s;
    }
}
