/* ═══ RIDER / PARENT DESKTOP (≥900px) ═══ */
@media(min-width:900px){
  #screen-rider-app.active{
    display:grid;
    grid-template-columns:220px 1fr;
    grid-template-rows:auto 1fr;
    grid-template-areas:"header header" "sidebar main";
    overflow:hidden;
  }
  #screen-rider-app>.sm-top{grid-area:header;border-bottom:1px solid var(--hair)}
  #screen-rider-app>.pc-sidenav{grid-area:sidebar}
  #screen-rider-app>.simple-content{grid-area:main;overflow-y:auto;padding:20px 16px}
  #screen-rider-app>.sm-tabs{display:none}

  #screen-parent-app.active{
    display:grid;
    grid-template-columns:220px 1fr;
    grid-template-rows:auto 1fr;
    grid-template-areas:"header header" "sidebar main";
    overflow:hidden;
  }
  #screen-parent-app>.sm-top{grid-area:header;border-bottom:1px solid var(--hair)}
  #screen-parent-app>.pc-sidenav{grid-area:sidebar}
  #screen-parent-app>.simple-content{grid-area:main;overflow-y:auto;padding:20px 16px}
  #screen-parent-app>.sm-tabs{display:none}
}

/* ═══ RIDER / PARENT APP ═══ */
#screen-rider-app,#screen-parent-app,#screen-child-schedule,#screen-all-riders{flex-direction:column}
.simple-topbar{background:var(--white);border-bottom:1px solid var(--sand);padding:0 20px;height:56px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding-top:env(safe-area-inset-top,0)}
.simple-content{flex:1;overflow-y:auto;padding:20px 16px 110px;-webkit-overflow-scrolling:touch}
/* Unified gutter: .simple-content owns horizontal padding; children fill 100% */
.simple-content .sm-card,
.simple-content .sm-hero{margin-left:0;margin-right:0}
.simple-content .rh-sched-group-head{padding-left:0;padding-right:0}
.rider-greeting{font-family:'Cormorant Garamond',serif;font-size:26px;color:var(--earth);margin-bottom:4px}
.rider-date-sub{font-size:12px;color:var(--text-muted);margin-bottom:20px}
.book-fab{position:fixed;bottom:calc(var(--safe-bottom) + 16px);left:16px;right:16px;padding:18px;background:var(--earth);color:var(--white);border:none;border-radius:12px;font-family:'DM Sans',sans-serif;font-size:15px;font-weight:500;cursor:pointer;z-index:50}
.book-fab:active{background:var(--earth-mid)}

/* ═══ CHILD / RIDER CARDS ═══ */
.child-card{background:var(--white);border-radius:12px;border:1px solid var(--sand);padding:16px;margin-bottom:10px;cursor:pointer;transition:all 0.15s;display:flex;align-items:center;gap:12px}
.child-card:active{background:var(--cream-dark)}
.child-avatar{width:40px;height:40px;border-radius:50%;background:var(--hay-light);display:flex;align-items:center;justify-content:center;font-family:'Cormorant Garamond',serif;font-size:16px;color:var(--earth);flex-shrink:0}
.child-info{flex:1;min-width:0}
.child-name{font-size:15px;font-weight:500;color:var(--earth)}
.child-next-hl{font-size:12px;color:var(--earth-light);font-weight:500;margin-top:2px}
.child-next{font-size:12px;color:var(--text-muted)}
.child-chevron{color:var(--text-muted);font-size:16px}

/* ═══ LARGE FONT MODE ═══ */
/* Rider large font */
.large-font .rider-greeting{font-size:34px}
.large-font .rider-date-sub{font-size:15px}
.large-font .schedule-horse{font-size:18px}
.large-font .schedule-detail{font-size:14px}
.large-font .schedule-rider{font-size:13px}
.large-font .schedule-time{font-size:15px}
.large-font .next-up-horse{font-size:30px}
.large-font .next-up-detail{font-size:16px}
.large-font .next-up-time{font-size:15px}
.large-font .trainer-chip{font-size:15px;padding:8px 16px}
/* Parent extra-large font */
.xl-font .rider-greeting{font-size:42px}
.xl-font .rider-date-sub{font-size:18px}
.xl-font .child-name{font-size:26px}
.xl-font .child-next-hl{font-size:19px}
.xl-font .child-next{font-size:17px}
.xl-font .schedule-horse{font-size:22px}
.xl-font .schedule-detail{font-size:17px}
.xl-font .schedule-rider{font-size:16px}
.xl-font .schedule-time{font-size:18px}
.xl-font .next-up-horse{font-size:36px}
.xl-font .next-up-detail{font-size:19px}
.xl-font .next-up-time{font-size:18px}
.xl-font .trainer-chip{font-size:18px;padding:10px 18px}
.xl-font .section-label{font-size:17px}
.xl-font .trainer-name{font-size:20px}
.xl-font .trainer-days{font-size:17px}
.xl-font .weather-temp{font-size:40px}
.xl-font .weather-cond{font-size:15px}
.xl-font .weather-day-name{font-size:13px}
.xl-font .weather-day-high{font-size:17px}
.xl-font .btn-danger-sm{font-size:15px;padding:10px 18px}

/* ═══ RIDER HOME ═══ */
.rh-greeting-row{margin-bottom:18px}
.rh-section{background:var(--white);border:1px solid var(--sand);border-radius:12px;padding:14px 16px;margin-bottom:12px}
.rh-section-title{font-size:11px;font-weight:700;letter-spacing:0.09em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px}
.rh-empty{font-size:13px;color:var(--text-muted);font-style:italic;padding:4px 0}

/* Today booking card */
.rh-today-card{border:1px solid var(--cream-dark);border-radius:10px;padding:12px;margin-bottom:8px;background:var(--cream)}
.rh-today-card:last-child{margin-bottom:0}
.rh-today-done{opacity:0.55}
.rh-today-top{display:flex;gap:12px;align-items:flex-start}
.rh-today-time-block{text-align:center;min-width:44px;flex-shrink:0}
.rh-today-time{font-size:15px;font-weight:700;color:var(--earth);line-height:1.2}
.rh-today-dur{font-size:10px;color:var(--text-muted)}
.rh-today-info{flex:1;min-width:0}
.rh-today-horse{font-size:15px;font-weight:700;color:var(--text);margin-bottom:2px}
.rh-today-type{font-size:12px;font-weight:500;margin-bottom:5px}
.rh-status-chip{display:inline-block;font-size:10px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;padding:2px 8px;border-radius:10px}
.rh-status-scheduled{background:#e8f4ec;color:#1e7a3f}
.rh-status-done{background:#d4edda;color:#155724}
.rh-status-past{background:var(--cream-dark);color:var(--text-muted)}
.rh-complete-btn{width:32px;height:32px;border-radius:50%;border:2px solid var(--sand);background:#fff;font-size:16px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);transition:all 0.15s;font-family:inherit}
.rh-complete-btn:hover{border-color:var(--earth);color:var(--earth)}
.rh-complete-done{border-color:#1e7a3f;background:#1e7a3f;color:#fff}
.rh-booking-notes{display:flex;gap:6px;align-items:baseline;font-size:12px;color:var(--text);background:rgba(200,169,110,0.12);border-radius:6px;padding:6px 10px;margin-top:8px}
.rh-notes-label{font-size:10px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--earth);flex-shrink:0}
.rh-note-toggle-row{padding-top:8px}
.rh-add-note-btn{font-size:11px;font-weight:600;color:var(--text-muted);background:none;border:none;cursor:pointer;padding:0;font-family:inherit}
.rh-add-note-btn:hover{color:var(--earth)}
.rh-note-textarea{width:100%;font-size:13px;font-family:inherit;border:1px solid var(--sand);border-radius:8px;padding:8px;resize:none;box-sizing:border-box;background:#fff;color:var(--text)}
.rh-note-save-btn{margin-top:6px;font-size:12px;font-weight:600;padding:6px 16px;border-radius:24px;border:none;background:var(--primary);color:#fff;cursor:pointer;font-family:inherit;transition:all 0.15s}
.rh-note-save-btn:active{background:var(--primary-dark)}

/* My Horses horizontal list */
.rh-horse-list{display:flex;flex-direction:column;gap:8px}
.rh-horse-chip{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--cream-dark);border-radius:10px;cursor:pointer;background:var(--cream);transition:box-shadow 0.15s}
.rh-horse-chip:hover{box-shadow:0 2px 8px rgba(0,0,0,0.08)}
.rh-horse-initial{width:38px;height:38px;border-radius:8px;background:var(--cream-dark);display:flex;align-items:center;justify-content:center;font-family:'Cormorant Garamond',serif;font-size:20px;color:var(--earth);flex-shrink:0}
.rh-horse-chip-body{flex:1;min-width:0}
.rh-horse-chip-name{font-size:14px;font-weight:700;color:var(--text);margin-bottom:3px}

/* Notes & Instructions */
.rh-note-item{padding:8px 0;border-bottom:1px solid var(--cream-dark)}
.rh-note-item:last-child{border-bottom:none}
.rh-note-source{font-size:11px;font-weight:600;color:var(--earth);margin-bottom:3px}
.rh-note-text{font-size:13px;color:var(--text);line-height:1.4}

/* Upcoming list */
.rh-upcoming-day-head{font-size:11px;font-weight:700;letter-spacing:0.07em;text-transform:uppercase;color:var(--earth);padding:8px 0 4px;border-bottom:1px solid var(--sand)}
.rh-upcoming-row{display:flex;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid var(--cream-dark)}
.rh-upcoming-row:last-child{border-bottom:none}
.rh-upcoming-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.rh-upcoming-body{flex:1;min-width:0}
.rh-upcoming-what{font-size:13px;font-weight:600;color:var(--text)}
.rh-upcoming-when{font-size:11px;color:var(--text-muted);margin-top:1px}

/* Info strip (weather + trainer) */
.rh-info-strip{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.rh-info-tile{display:flex;align-items:center;gap:12px;background:var(--white);border:1px solid var(--sand);border-radius:10px;padding:11px 14px}
.rh-info-tile-icon{font-size:22px;flex-shrink:0;line-height:1}
.rh-info-tile-avatar{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff;flex-shrink:0}
.rh-info-tile-body{flex:1;min-width:0}
.rh-info-tile-val{font-size:13px;font-weight:600;color:var(--earth);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rh-info-tile-sub{font-size:11px;color:var(--text-muted);margin-top:2px;line-height:1.3}

/* GCal inside rider home */
.rh-gcal-scroll{max-height:320px;margin-bottom:4px}
.rh-gcal-done{opacity:0.5}
/* 5-day week view inside rider home */
.rh-week-scroll{max-height:340px}
.rh-week-event{cursor:default;pointer-events:none}

/* Today schedule rows (below gcal) */
.rh-day-rows{margin-top:10px;display:flex;flex-direction:column;gap:0}
.rh-day-row{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid var(--cream-dark)}
.rh-day-row:last-child{border-bottom:none}
.rh-day-row-time{font-size:13px;font-weight:700;color:var(--earth);min-width:46px;flex-shrink:0;padding-top:1px}
.rh-day-row-body{flex:1;min-width:0}
.rh-day-row-title{font-size:14px;font-weight:700;color:var(--text);line-height:1.2}
.rh-day-row-type{font-weight:500}
.rh-day-row-meta{font-size:11px;color:var(--text-muted);margin-top:2px}
.rh-day-row-notes{font-size:12px;color:var(--text);background:rgba(200,169,110,0.12);border-radius:6px;padding:5px 8px;margin-top:6px;line-height:1.4}
.rh-day-row-actions{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0}

/* Action buttons row */
.rh-action-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:24px}
.rh-action-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:14px 8px;background:var(--white);border:1px solid var(--sand);border-radius:12px;cursor:pointer;font-family:inherit;transition:background 0.15s,box-shadow 0.15s}
.rh-action-btn:active{background:var(--cream);box-shadow:inset 0 1px 3px rgba(0,0,0,0.08)}
.rh-action-icon{width:22px;height:22px;color:var(--primary);display:flex;align-items:center;justify-content:center}
.rh-action-icon svg{width:22px;height:22px}
.rh-action-label{font-size:11px;font-weight:600;color:var(--earth);letter-spacing:0.03em;text-align:center}
