/* Android reference: colors.xml, styles.xml, toolbar_custom.xml,
   style_frame_rounded_smaller.xml, bg_login_submit.xml and edittext_background.xml. */
:root {
    --equiapp-blue: #02a5fe;
    --equiapp-border-blue: #74b4f1;
    --equiapp-surface: rgb(0 0 0 / 20%);
    --equiapp-text: #fff;
    --equiapp-muted: rgb(255 255 255 / 85%);
}

body {
    margin: 0;
    background: #161616;
    color: var(--equiapp-text);
    font-family: Roboto, "Noto Sans", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.equiapp-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
    background: #0c0806 url("../images/equiapp-horse-background.webp") center / cover no-repeat;
}

/* Login placement follows activity_user_login.xml; no website header/footer. */
.equiapp-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 5px;
}

.equiapp-login { position: relative; flex: 1; min-height: 690px; }
.equiapp-login-logo { position: absolute; top: 0; left: 0; width: 175px; max-width: 100%; height: auto; }
.equiapp-login-section { position: absolute; top: calc(50% + 70px); left: 16px; right: 16px; transform: translateY(-50%); }
.equiapp-login-email-row { display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid #58b8ff; padding-bottom: 2px; }
.equiapp-login-email-row > img { flex: 0 0 36px; object-fit: contain; margin-bottom: 3px; }
.equiapp-login-email { width: 0; min-width: 0; flex: 1; height: 44px; padding: 0 0 2px; border: 0; border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: 16px; }
.equiapp-login-email::placeholder { color: #ffffffd9; opacity: 1; }
.equiapp-login-email:disabled { -webkit-text-fill-color: #fff; opacity: 1; }
.equiapp-login-submit { display: block; width: 100%; margin-top: 16px; }
.equiapp-app .equiapp-login-submit:disabled { opacity: 1; cursor: not-allowed; }
.equiapp-google-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 40px; margin-top: 14px; padding: 10px 12px; border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f; font: 500 14px Roboto, Arial, sans-serif; cursor: pointer; }
.equiapp-google-button > img { flex: 0 0 20px; }
.equiapp-login-about { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: inherit; font-size: 16px; text-decoration: none; }
.equiapp-login-status { min-height: 18px; margin: 8px 0 0; color: var(--equiapp-muted); text-align: center; font-size: 12px; }
.equiapp-login-mark { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 437px); height: auto; }
.equiapp-app a:focus-visible { outline: 2px solid var(--equiapp-border-blue); outline-offset: 4px; }

/* Android bg_login_submit.xml and edittext_background.xml control styling. */
.equiapp-app .btn-primary {
    min-height: 56px;
    padding: 10px;
    border: 1px solid #8be2ff;
    border-radius: 14px;
    background: linear-gradient(#45b6ff, #087ff0);
    color: var(--equiapp-text);
    font-size: 17px;
    font-weight: 400;
}
.equiapp-app .btn-primary:active { background: linear-gradient(#188be8, #0873d5); }
.equiapp-app .form-control,
.equiapp-app .form-select {
    padding: 5px;
    border: 1px solid var(--equiapp-blue);
    border-radius: 12px;
    background-color: transparent;
    color: var(--equiapp-text);
    font-size: 12px;
    color-scheme: dark;
}
.equiapp-app .form-control::placeholder { color: var(--equiapp-muted); }
.equiapp-app .form-control:focus,
.equiapp-app .form-select:focus { border-color: var(--equiapp-border-blue); box-shadow: 0 0 0 2px rgb(116 180 241 / 25%); }

.equiapp-google-button:focus-visible { outline: 2px solid var(--equiapp-border-blue); outline-offset: 3px; }
.equiapp-session { margin: 5px; padding: 20px; border: 1px solid var(--equiapp-blue); border-radius: 16px; background: var(--equiapp-surface); text-align: center; }
.equiapp-session > img { max-width: 100%; height: auto; margin-bottom: 20px; }
.equiapp-session h1 { font-size: 25px; font-weight: 400; }

/* Android MainActivity: one phone-width shell at every browser size. */
.application-page { margin:0;background:#161616;color:#fff;font:14px/1.5 Roboto,"Noto Sans",Arial,sans-serif;overflow:hidden; }
.android-app { width:100%;max-width:430px;height:100vh;height:100dvh;box-sizing:border-box;margin-inline:auto;padding:calc(5px + env(safe-area-inset-top)) 5px calc(5px + env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden;background:#0c0806 url('../images/equiapp-horse-background.webp') center/cover no-repeat; }
.android-toolbar { height:60px;flex:0 0 60px;display:grid;grid-template-columns:50px minmax(0,1fr) 50px;position:relative;align-items:start; }
.android-toolbar form { margin:0; }.android-icon-button { display:flex;align-items:center;justify-content:center;width:50px;height:60px;padding:0;border:0;background:transparent;color:#fff; }.android-icon-button img { display:block;object-fit:contain; }
.android-toolbar-labels { min-width:0;text-align:center;text-shadow:1px 1px 2px #000; }.android-toolbar-labels p { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;margin:0; }.android-toolbar-labels h1 { margin:5px 0 0;padding-bottom:10px;font-size:25px;line-height:1.2;font-weight:400; }
.android-main { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;margin:5px;padding:8px;border:1px solid #02a5fe;border-radius:16px;background:rgb(0 0 0 / 20%); }
.android-home { position:relative;min-height:100%;display:flex;flex-direction:column; }
.android-home-logo { display:block;flex:none;width:214px;max-width:70%;height:auto;object-fit:contain;margin:10px auto 0; }
.android-notifications { position:absolute;right:4px;top:5px;display:flex;flex-direction:column;align-items:center;gap:1px;padding:4px;border:0;background:none;color:#fff;font:inherit;font-size:11px;text-shadow:1px 1px 2px #000; }
.android-home-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin:4px 2px 6px; }
.android-home-tile { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;min-height:82px;padding:2px 3px 4px;border:0;border-radius:8px;background:transparent;color:#fff;text-decoration:none;font:inherit;font-size:12px;text-shadow:1px 1px 2px #000; }.android-home-tile img { flex:none; }.android-home-tile:hover { color:#fff;background:rgb(2 165 254 / 12%); }
.android-home-tile:disabled,.android-notifications:disabled { opacity:.5;cursor:default; }.android-home-tile:disabled:hover { background:none; }
.android-home-notes { text-align:center;font-size:11px;line-height:1.5;color:#fff; }.android-home-notes p { margin:4px 0; }.android-home-mark { display:block;flex:none;width:100%;max-width:437px;height:auto;margin:auto auto 0;padding-top:12px; }
.android-menu[popover] { position:fixed;inset:auto;top:calc(65px + env(safe-area-inset-top));right:max(5px,calc((100vw - 430px)/2 + 5px));width:230px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 90px);margin:0;padding:5px 0;border:1px solid #572c13;border-radius:4px;background:#572c13;color:#fff;box-shadow:0 4px 18px rgb(0 0 0 / 35%);overflow-y:auto; }
.android-navigation { display:flex;flex-direction:column; }.android-navigation a,.android-navigation span,.android-navigation button { display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:8px 14px;border:0;background:transparent;color:#fff;text-decoration:none;font:14px/1.5 Roboto,Arial,sans-serif;text-align:left; }.android-navigation form { margin:0; }.android-navigation img { flex:none;object-fit:contain; }.android-navigation a:hover,.android-navigation button:hover { background:rgb(0 0 0 / 20%); }.android-navigation [aria-current=page] { background:rgb(0 0 0 / 20%); }.android-navigation [aria-disabled=true] { opacity:.45; }
.android-section { padding:5px; }.android-section h2,.android-section-heading { margin:5px 0 14px;font-size:18px;font-weight:400; }.android-section p { margin:12px 0; }.android-details { margin:0; }.android-details>div { padding:10px 5px;border-bottom:1px solid rgb(116 180 241 / 45%); }.android-details dt { font-size:12px;font-weight:400;color:#dbeeff; }.android-details dd { margin:3px 0 0;font-size:14px;overflow-wrap:anywhere; }.android-list-row { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;padding:5px 10px;border-bottom:1px solid #74b4f1;font-size:14px; }.android-list-row strong { font-weight:500; }.android-action { display:block;padding:12px;color:#fff;border:1px solid #8be2ff;border-radius:14px;background:linear-gradient(#45b6ff,#087ff0); }.android-action:hover { color:#fff;background:#0873d5; }
.app-skip { position:absolute;left:12px;top:-100px;z-index:20;padding:12px;background:#fff;color:#102b4e; }.app-skip:focus { top:12px; }.application-page a:focus-visible,.application-page button:focus-visible { outline:2px solid #74b4f1;outline-offset:2px; }

/* Runtime references: activity_horses_list/horse_item_row/activity_horse_details. */
.android-main.horse-main { margin:0;padding:0;border:0;border-radius:0;background:transparent; }
.android-main.horse-list-main { overflow:hidden; }
.horse-main [hidden] { display:none!important; }
.horse-list-screen { height:100%;min-height:0;padding:5px 10px;display:flex;flex-direction:column; }
.horse-list-controls { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:none;margin:4px 14px 10px; }
.horse-action-tile { display:flex;flex-direction:column;align-items:center;justify-content:center;height:90px;min-width:0;padding:5px 0;border:0;background:transparent;color:white;text-decoration:none;font:12px/1.4 Roboto,Arial,sans-serif; }
.horse-action-tile img { flex:none;width:50px;height:50px;margin:3px;object-fit:contain; }.horse-action-tile span { max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px; }
.horse-action-tile:hover { color:white; }.horse-action-tile:disabled { opacity:.45; }.horse-action-tile.scan-import { padding:0; }.horse-action-tile.scan-import span { font-size:11px; }.horse-action-tile.scan-import small { font-size:8.5px;line-height:1;text-align:center; }
.horse-yard-filter { margin:1px 0 5px;flex:none; }.horse-yard-filter select { width:100%;height:44px;min-width:0;padding:5px 24px 5px 5px;border:0;border-radius:12px;appearance:none;background:white url('../images/android/ic_down_arrow.svg') right 5px center/24px 24px no-repeat;color:black;font-size:12px; }
.horse-list { min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin; }
.horse-row,.horse-card { border:1px solid #02a5fe;border-radius:16px;background:rgb(0 0 0 / 40%);color:white; }
.horse-row { padding:5px;margin:3px 3px 6px; }.horse-row-header { display:flex;align-items:center;min-height:54px;padding:0 6px 0 10px;gap:4px; }.horse-row-header>a { flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:white;text-decoration:none;font-size:14px;font-weight:700; }
.horse-circle { display:inline-flex;flex:none;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0;border:0;background:transparent;color:white;text-decoration:none; }.horse-circle img { display:block;object-fit:contain; }.horse-chevron img { transition:transform .15s; }.horse-chevron[aria-expanded=true] img { transform:rotate(180deg); }
.horse-row-actions { margin:0 10px;padding:10px 0;border-top:1px solid #02a5fe; }.horse-row-information { display:flex;gap:10px;align-items:flex-start; }.horse-row-information>div { flex:1;min-width:0;font-size:12px; }.horse-row-information strong { color:#02a5fe;font-size:12px; }.horse-row-information p { margin:3px 0; }.horse-row-photo-link { display:block;flex:none;width:92px;height:92px;padding:2px;border:1px solid #02a5fe;border-radius:16px;overflow:hidden; }.horse-row-photo { width:100%;height:100%;object-fit:cover;border-radius:13px; }
.horse-row-shortcuts { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 3px 0; }.horse-row-shortcuts>a,.horse-row-shortcuts>button { display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;height:76px;padding:4px;border:1px solid #02a5fe;border-radius:16px;background:rgb(0 0 0 / 20%);color:white;font:10px/1.4 Roboto,Arial,sans-serif;text-decoration:none; }.horse-row-shortcuts>button:disabled { opacity:.45; }.horse-row-shortcuts span { max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.horse-detail-screen { display:flex;flex-direction:column;padding:10px; }
/* Keep Android card margins additive instead of collapsing between sections. */
.horse-detail-screen > * { flex-shrink:0; }.horse-card { margin:5px;padding:10px;overflow-wrap:anywhere; }.horse-information,.horse-identity { display:flex;align-items:center;gap:5px; }.horse-image-link { display:block;flex:none;width:120px;max-width:38%;height:140px; }.horse-photo { display:block;width:100%;height:140px;object-fit:contain;padding:2px;border:1px solid #02a5fe;border-radius:16px; }.horse-identity .horse-image-link { margin-right:7px; }.horse-identity .horse-photo { object-fit:cover; }
.horse-header-text,.horse-identity-text { flex:1;min-width:0; }.horse-name-line { display:flex;align-items:flex-start;justify-content:space-between;gap:2px; }.horse-name-line>div { min-width:0; }.horse-name-line h2 { font-size:18px;line-height:1.2;font-weight:700;margin:0; }.horse-header-text p { margin:5px 0;font-size:12px; }.horse-header-text .horse-summary { font-size:14px;font-weight:700; }.horse-header-text .horse-year-breed { font-size:14px; }.horse-year-breed span { color:#02a5fe;margin:0 3px; }
.android-app:has(.horse-main) .android-toolbar-labels h1 { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.android-app:has(.horse-create) .android-toolbar-labels h1 { font-size:16px; }.horse-identity-text .horse-name-line { align-items:center; }.horse-identity h2 { font-size:14px; }.horse-identity dl { margin:0; }.horse-identity dt { margin-top:1px;font-size:12px;font-weight:400; }.horse-identity dd { margin:0 0 8px;font-size:14px; }
.horse-section-header { display:flex;align-items:center;gap:2px; }.horse-section-header h2 { flex:1;min-width:0;margin:0;font-size:12px;font-weight:400; }.horse-section-content { padding:0 5px; }.horse-section-content p { margin:5px 0;font-size:14px; }.horse-text-edit { display:flex;width:50px;margin-left:auto; }.horse-notes { white-space:pre-wrap; }.horse-bottom-actions { display:flex; }.horse-bottom-actions>.horse-card { display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;font-size:12px; }.horse-bottom-actions button:disabled { opacity:.45; }
.horse-file-row { border-bottom:1px solid #02a5fe;font-size:11px;padding:2px; }.horse-file-row>div { display:flex;align-items:center;gap:4px; }.horse-file-row span { flex:1;min-width:0; }.horse-file-row time { font-size:11px; }.horse-file-row p { font-size:11px;margin:2px 0; }.horse-link-row { display:flex;align-items:center;gap:5px;padding-top:5px;border-top:1px solid #02a5fe;font-size:13px; }.horse-link-row>span { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.horse-person-row { padding:5px 0;border-bottom:1px solid #02a5fe;font-size:12px; }.horse-person-row>span { display:block; }.horse-person-row p { font-size:12px; }
.horse-editor { display:grid;width:100%;gap:9px; }.horse-editor h2 { margin:0;font-size:14px; }.horse-editor label { display:grid;min-width:0;gap:4px;font-size:12px; }.horse-editor input:not([type=hidden]),.horse-editor select,.horse-editor textarea { min-width:0;width:100%;min-height:44px;padding:5px;border:1px solid #ccc;border-radius:10px;background:white;color:black;font:13px/1.4 Roboto,Arial,sans-serif; }.horse-editor textarea { min-height:85px; }.horse-field-pair { display:grid;grid-template-columns:1fr 1fr;gap:10px; }.horse-identity-editor-row { display:flex;gap:12px;align-items:center; }.horse-identity-inputs { flex:1;min-width:0;display:grid;gap:5px; }.horse-identity-inputs .horse-name-line { align-items:center; }
.horse-editor-actions { display:flex;align-items:center;justify-content:flex-end;gap:8px; }.horse-button { display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:1px solid #8be2ff;border-radius:14px;background:linear-gradient(#45b6ff,#087ff0);color:white;text-decoration:none;font-size:14px; }.horse-button.secondary { background:#243548; }.horse-create p { font-size:12px; }.horse-creation-role { display:flex;align-items:center;flex-wrap:wrap;gap:8px; }.horse-creation-role legend { font-size:12px; }.horse-creation-role label { display:flex;align-items:center;min-height:44px;gap:5px; }.horse-editor .horse-creation-role input[type=radio] { width:20px;min-height:20px;accent-color:#02a5fe; }
.horse-management { padding:5px 10px;overflow-wrap:anywhere; }.horse-management h2 { font-size:14px; }.horse-management a { color:white; }.horse-section { margin:10px 0;padding:10px;border:1px solid #02a5fe;border-radius:16px;background:rgb(0 0 0 / 40%); }.horse-section p { font-size:12px; }.horse-section summary { min-height:44px;cursor:pointer; }.horse-section form { margin-top:10px; }.horse-relationship { display:flex;align-items:center;justify-content:space-between;gap:5px; }.horse-role { display:block;font-size:12px; }.horse-help { font-size:11px; }.horse-error { padding:10px;border:1px solid #ffb6a8;border-radius:8px;background:#572c13; }
@media (prefers-reduced-motion:reduce) { .horse-chevron img { transition:none; } }

.horse-submit-actions { display:flex;align-items:center;gap:16px;margin:16px 5px 5px; }
.horse-submit { flex:1;min-width:0;min-height:56px;padding:8px 16px;border:0;border-radius:14px;background:#02a5fe;color:white;font:400 17px/1.4 Roboto,Arial,sans-serif;letter-spacing:1px; }
.horse-save-status { margin:0 5px;font-size:12px; }
.horse-remove { flex:none;width:60px;min-height:60px; }.horse-remove-confirmation { margin:15px; }.horse-remove-confirmation label { display:block;margin:16px 0; }


/* Android activity_events.xml and event_row.xml. */

/* Events layout and header */
.events-screen {
    padding: 5px;
}

.events-refresh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 5px;
}

.events-refresh-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    text-decoration: none;
    font: 400 12px/1.5 Roboto,"Noto Sans",Arial,sans-serif;
}

.events-filter-heading {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .events-filter-heading .events-refresh-link {
        white-space: nowrap;
    }

/* Filter controls */
.events-controls {
    margin: 5px;
    padding: 5px;
    border: 1px solid #02a5fe;
    border-radius: 16px;
    background: rgb(0 0 0 / 40%);
}

    .events-controls > header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .events-controls h2 {
        margin: 0 5px;
        font-size: 14px;
        font-weight: 400;
    }

.events-filters {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    padding: 10px;
}

    .events-filters label {
        display: flex;
        align-items: center;
        min-width: 0;
        position: relative;
    }

        .events-filters label > img {
            position: absolute;
            left: 5px;
            width: 22px;
            height: 22px;
            object-fit: contain;
        }

    .events-filters select {
        width: 100%;
        height: 52px;
        min-width: 0;
        border: 1px solid #74b4f1;
        border-radius: 10px;
        background: white;
        color: black;
        font: 12px Roboto,Arial,sans-serif;
        padding: 5px 3px 5px 30px;
    }

/* Event action buttons */
.events-actions {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    margin: 1px 14px;
}

    .events-actions > a, .events-actions > button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 56px;
        border: 0;
        padding: 3px;
        background: transparent;
    }

        .events-actions > button:disabled {
            opacity: .45;
        }

/* Create event */
.events-create {
    margin: 5px;
    padding: 10px;
    border: 1px solid #02a5fe;
    border-radius: 16px;
    background: rgb(0 0 0 / 40%);
}

    .events-create > header {
        display: flex;
        align-items: center;
        gap: 5px;
    }

        .events-create > header label {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
        }

    .events-create input[type=date] {
        min-width: 0;
        width: 100%;
        min-height: 44px;
    }

    .events-create > div {
        display: flex;
        gap: 5px;
        margin-top: 8px;
    }

    .events-create textarea {
        flex: 1;
        min-width: 0;
        height: 120px;
    }

    .events-create aside {
        display: flex;
        flex-direction: column;
    }

.events-confirm {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

/* Event list */
.events-row {
    margin: 3px;
    padding: 5px;
    border: 1px solid #02a5fe;
    border-radius: 16px;
    background: rgb(0 0 0 / 40%);
}

    .events-row > header {
        display: flex;
        align-items: center;
        min-height: 34px;
        gap: 4px;
    }

    .events-row input[type=checkbox] {
        width: 20px;
        height: 20px;
        flex: none;
        accent-color: #02a5fe;
    }

.events-done {
    flex: none;
}

.events-checkbox {
    width: 24px;
    height: 28px;
    background: transparent;
    border: 1px solid #02a5fe;
    color: white;
    padding: 0;
}

.events-summary {
    display: grid;
    grid-template-columns: .85fr .65fr 1fr;
    flex: 1;
    min-width: 0;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    text-align: left;
    font: 13px/1.4 Roboto,Arial,sans-serif;
}

    .events-summary span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .events-summary span:first-child {
            font-size: 12px;
        }

.events-row-content {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 3px 5px 0;
    padding-top: 4px;
    border-top: 1px solid #5074b4f1;
}

    .events-row-content p {
        flex: 1;
        min-width: 0;
        margin: 0;
        min-height: 40px;
        font-size: 13px;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .events-row-content > form {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .events-row-content textarea {
        flex: 1;
        min-width: 0;
        min-height: 70px;
    }

    .events-row-content form:has(textarea) {
        width: 100%;
    }

    .events-row-content a {
        color: white;
    }

.events-empty {
    margin: 10px;
    font-size: 13px;
}

.events-create textarea, .events-row-content textarea {
    background: white;
    color: black;
    border-radius: 5px;
    padding: 5px;
    font: 13px/1.4 Roboto,Arial,sans-serif;
}

/* Help text and completion dialog */
.events-help {
    margin: 8px;
    font-size: 12px;
}

.events-completion {
    max-width: calc(100% - 32px);
    border: 1px solid #02a5fe;
    border-radius: 16px;
    background: #111;
    color: white;
    padding: 16px;
}

    .events-completion::backdrop {
        background: rgb(0 0 0 / 65%);
    }

    .events-completion h2 {
        font-size: 18px;
    }

    .events-completion input {
        display: block;
        max-width: 100%;
        margin: 8px 0;
    }

    .events-completion button {
        min-height: 44px;
        margin: 8px 8px 0 0;
    }

@keyframes events-refresh-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.events-refresh-link[aria-label="Refresh events"].is-refreshing img {
    animation: events-refresh-spin .7s linear infinite;
}

@media (prefers-reduced-motion:reduce) {
    .events-refresh-link[aria-label="Refresh events"].is-refreshing img {
        animation: none;
    }
}

/* Android YardDetailsActivity: selector, details form and expandable yard users. */
.yard-screen { padding:10px; }.yard-selector { display:flex;align-items:center;gap:12px;margin:5px; }.yard-selector label { flex:none; }.yard-selector select { flex:1;min-width:0;min-height:48px;background:white;color:black;border-radius:9px;padding:5px; }.yard-intro,.yard-privacy,.yard-readonly,.yard-status { margin:10px 5px;font-size:12px; }.yard-screen a { color:white; }.yard-details { padding:12px; }.yard-details label { display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:10px;margin:8px 0;font-size:13px; }.yard-details input,.yard-details textarea,.yard-invite input,.yard-invite select,.yard-invite-url { width:100%;min-width:0;min-height:44px;background:white;color:black;border:1px solid #74b4f1;border-radius:6px;padding:6px;font:14px/1.4 Roboto,Arial,sans-serif; }.yard-details textarea { min-height:78px; }.yard-details:disabled { opacity:.8; }.yard-terms { display:flex;align-items:center;gap:8px;margin:12px 5px;flex-wrap:wrap; }.yard-users,.yard-horses { margin-top:12px;padding:10px; }.yard-users>header { display:flex;align-items:center;justify-content:space-between;gap:8px; }.yard-users h2,.yard-horses h2 { margin:5px;font-size:15px; }.yard-invite { display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) 48px;align-items:end;gap:6px;margin:10px 0; }.yard-invite label { min-width:0;font-size:12px; }.yard-person { margin:1px;padding:1px;border-top:1px solid #02a5fe; }
.yard-person-top { display:grid;grid-template-columns:minmax(0,5fr) minmax(0,4fr) auto;align-items:center;column-gap:6px;padding:1px 5px; }
.yard-person-name,.yard-person-role,.yard-person-email,.yard-person-phone { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.yard-person-name,.yard-person-role,.yard-person-email { font-size:13px;font-weight:400;line-height:1.4; }
.yard-person-name,.yard-person-email,.yard-person-phone { opacity:.8; }.yard-person-role { opacity:.7; }
.yard-person-delete { width:44px;height:44px; }
.yard-person-contacts { display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr) 44px;align-items:center;gap:2px;padding:2px 5px; }
.yard-person-phone { font-size:11px;line-height:1.4; }
.yard-contact-icon { display:flex;align-items:center;justify-content:center;width:44px;height:44px; }.yard-contact-icon img { display:block;flex:none;object-fit:contain; }
.yard-person-status { display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 8px;padding:2px 5px 5px;font-size:12px; }
.yard-pending .yard-person-name,.yard-pending .yard-person-role,.yard-pending .yard-person-email,.yard-pending .yard-person-phone,.yard-pending .yard-whatsapp { opacity:.3; }
.yard-horses>a { display:block;margin:8px 5px; }.yard-confirm { margin:15px;padding:16px; }.yard-confirm h2 { font-size:18px; }.yard-confirm form label { display:flex;gap:10px;align-items:center;margin:16px 0; }.yard-confirm .horse-submit { display:block;width:100%;margin:16px 0; }.yard-invite-url { margin:10px 0; }

/* Android UserManageActivity: profile, independent associations, consent and Save. */
.user-screen { padding:10px; }.user-screen a { color:white; }.user-screen .user-notice { margin:8px 5px;font-size:12px;line-height:1.5; }.user-information .horse-editor>label { grid-template-columns:90px minmax(0,1fr);align-items:center;gap:8px; }.user-information .user-enabled { display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:13px; }.user-information input[readonly],.user-information textarea[readonly] { background:rgb(255 255 255 / 75%); }.user-associations>header h2 { font-size:14px; }.user-association { border-top:1px solid #02a5fe;margin-top:10px;padding:8px 0; }.user-association h3 { margin:5px 0;font-size:14px;line-height:1.5;text-align:center;overflow-wrap:anywhere; }.user-role-row { display:flex;align-items:center;gap:5px;min-height:44px;font-size:12px; }.user-role-row>span:first-child { flex:1;min-width:0;overflow-wrap:anywhere; }.user-role-status { flex:1;min-width:0;font-size:11px;overflow-wrap:anywhere; }.user-manage { margin:8px 0;font-size:12px; }.user-consent { margin:12px 5px;font-size:12px; }.user-consent label { display:block;line-height:1.6; }.user-consent input { width:20px;height:20px;vertical-align:middle;margin-right:6px;accent-color:#02a5fe; }.user-save { width:calc(100% - 10px);margin:5px; }.user-save:disabled { opacity:.5; }.user-role-dialog { position:fixed;margin:auto;width:min(90vw,520px);max-height:85dvh;overflow-y:auto;background:#18232a;padding:20px; }.user-role-dialog::backdrop { background:rgb(0 0 0 / 70%); }.user-role-dialog h2 { font-size:18px; }.user-role-dialog h3 { margin:16px 0 5px;font-size:15px;font-weight:bold; }.user-role-dialog p { font-size:13px;line-height:1.5; }

.user-profile-logo { display:block;width:100px;height:100px;object-fit:contain;margin:12px auto 0;border:1px solid #02a5fe;border-radius:12px; }.user-history-title { margin:12px 0 5px;font-size:12px;font-weight:600; }.user-history { opacity:.8; }

/* Authenticated file previews retain the photograph's actual aspect ratio. */
.horse-file-thumbnail { display:block; width:120px; height:120px; object-fit:contain; margin:8px 0; border:1px solid #00b5ed; border-radius:12px; }
.horse-file-name { overflow-wrap:anywhere; }
.horse-photo-preview { width:200px; height:200px; display:flex; align-items:center; justify-content:center; overflow:hidden; margin:8px 0; }
.horse-photo-preview[hidden] { display:none; }
.horse-photo-preview img { max-width:140px; max-height:140px; object-fit:contain; }
.horse-photo-controls { display:flex; flex-wrap:wrap; gap:8px; }
.horse-photo-controls button { min-height:44px; }

/* Administrative editor: the existing photo controls share the field panel. */
.horse-admin-editor { display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:16px;align-items:end; }
.horse-admin-fields { display:grid;gap:9px;min-width:0; }
.horse-admin-photo { position:relative;min-width:0; }
.horse-admin-photo .horse-image-link { width:100%;max-width:100%;height:190px; }
.horse-admin-photo .horse-photo { height:190px;object-fit:contain; }
.horse-photo-camera,.horse-photo-delete { position:absolute; }
.horse-photo-camera { top:5px;left:5px; }.horse-photo-delete { top:135px;right:5px; }
.horse-admin-photo p { font-size:12px;margin:6px 0; }
@media(max-width:359px) { .horse-admin-editor { grid-template-columns:minmax(0,1fr); }.horse-admin-photo { width:150px;justify-self:center; } }
