/* CancerManager H5 v2.0.3: make comparative data genuinely phone-readable.
   Loaded after mobile-h5.css and mobile-h5-fix.css; desktop unchanged. */
@media screen and (max-width:767px) {
  /* The earlier responsive patch left PC's first column frozen, covering all
     but a few characters of the next column on narrow phones. */
  #cycleCompareTable > .table-wrap,
  #stageObserveTable > .stage-observe-table-wrap { display:none!important; }
  #cycleCompareTable, #stageObserveTable { width:100%;max-width:100%;min-width:0; }
  .cm203-cycle-cards,.cm203-stage-cards { display:grid;gap:12px;min-width:0; }
  .cm203-cycle-card,.cm203-stage-card {
    min-width:0;overflow:hidden;border:1px solid #e0e7f0;border-radius:14px;
    background:#fff;box-shadow:0 2px 8px rgba(22,40,71,.025);
  }
  .cm203-cycle-heading { padding:13px 14px;background:#f5f8fe;border-bottom:1px solid #e6eaf2; }
  .cm203-cycle-heading strong { font-size:15px;line-height:1.55;overflow-wrap:anywhere; }
  .cm203-cycle-heading .muted { display:block;margin-top:3px;font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
  .cm203-cycle-item { padding:11px 14px;border-bottom:1px solid #edf0f5;min-width:0; }
  .cm203-cycle-item:last-child { border-bottom:0; }
  .cm203-cycle-metric,.cm203-stage-metric { font-size:13px;font-weight:750;color:#344054;line-height:1.5;overflow-wrap:anywhere;margin-bottom:6px; }
  .cm203-cycle-result,.cm203-stage-result { min-width:0;overflow-wrap:anywhere;line-height:1.6; }
  .cm203-cycle-result .cycle-cell { min-width:0!important;width:auto;line-height:1.65; }
  .cm203-cycle-result .cycle-cell-line { white-space:normal!important;overflow-wrap:anywhere; }
  .cm203-cycle-result .cycle-cell-line .muted { display:inline;white-space:normal; }
  .cm203-cycle-result .cycle-cell-source { display:flex;flex-wrap:wrap;gap:6px; }
  .cm203-cycle-result button { min-height:34px; }
  .cm203-card-hint { margin:0;font-size:12px;color:#667085;line-height:1.5; }
  .cm203-stage-heading { list-style:revert;cursor:pointer;padding:13px 14px;background:#f7f9fd; }
  .cm203-stage-heading::-webkit-details-marker { color:#4975c4; }
  .cm203-stage-heading .stage-observe-stage-head { display:inline-flex;vertical-align:middle;max-width:calc(100% - 30px); }
  .cm203-stage-heading strong { font-size:15px;overflow-wrap:anywhere; }
  .cm203-stage-heading span { line-height:1.4;overflow-wrap:anywhere; }
  .cm203-stage-body { padding:0 14px; }
  .cm203-stage-item { padding:12px 0;border-top:1px solid #edf0f5;min-width:0; }
  .cm203-stage-metric .stage-observe-sub { font-size:12px;font-weight:400;line-height:1.5; }
  .cm203-stage-result .stage-observe-value { font-size:16px;overflow-wrap:anywhere; }
  .cm203-stage-result .stage-observe-sub,.cm203-stage-result .stage-observe-change { font-size:12px;overflow-wrap:anywhere; }

  /* The calendar is a compact 7-day selector; the selected day's reports
     appear as full-width readable entries underneath it. */
  #view-followup .followup-calendar-wrap { overflow:visible!important;min-width:0!important; }
  #view-followup .followup-calendar-grid {
    display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;
    width:100%!important;min-width:0!important;max-width:100%!important;gap:1px!important;
  }
  #view-followup .followup-weekday { min-width:0!important;padding:7px 0!important;font-size:11px!important; }
  #view-followup .followup-day {
    min-width:0!important;min-height:47px!important;height:47px!important;padding:7px 0 5px!important;
    text-align:center;cursor:pointer;touch-action:manipulation;
  }
  #view-followup .followup-day-number { margin:0!important;font-size:12px!important; }
  #view-followup .followup-day-events { display:none!important; }
  #view-followup .followup-day.cm203-has-events::after {
    content:'';display:block;width:5px;height:5px;border-radius:50%;background:#3771d6;margin:4px auto 0;
  }
  #view-followup .followup-day.cm203-selected { background:#eaf2ff!important;box-shadow:inset 0 0 0 2px #3d78d8!important; }
  #view-followup .followup-day:focus-visible { outline:2px solid #3d78d8;outline-offset:-2px; }
  .cm203-calendar-mark { display:none!important; }
  .cm203-calendar-agenda { margin-top:12px;padding:13px;border:1px solid #e2e8f0;border-radius:12px;background:#fff; }
  .cm203-calendar-agenda h4 { margin:0 0 9px;font-size:14px;color:#24364f; }
  .cm203-calendar-events { display:grid;gap:7px; }
  .cm203-calendar-event { min-width:0;display:flex;flex-direction:column;gap:3px;padding:9px 10px;border-radius:8px;background:#f6f8fc;font-size:13px;line-height:1.5;overflow-wrap:anywhere; }
  .cm203-calendar-event small { font-size:12px;font-weight:400;color:#667085;white-space:pre-wrap;overflow-wrap:anywhere; }
  .cm203-calendar-event.lab { background:#eef4ff; }
  .cm203-calendar-event.imaging { background:#ecfdf3; }
  .cm203-calendar-event.treatment { background:#fff4ed; }
  .cm203-calendar-event.document { background:#f4f3ff; }
  .cm203-calendar-empty { margin:0;color:#667085;font-size:12px;line-height:1.6; }
  #view-followup .followup-calendar-head { align-items:flex-start;gap:7px; }
  #view-followup .followup-calendar-filters { gap:5px 10px; }
  #view-followup .followup-calendar-filters label { white-space:nowrap; }
  /* Keep the iOS notch/status-bar area opaque as the browser chrome collapses. */
  body::before { content:'';position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top,0px);background:#fff;z-index:260;pointer-events:none; }
  .main { padding-top:env(safe-area-inset-top,0px)!important; }
  #familySystemMenu { position:fixed!important;top:calc(env(safe-area-inset-top,0px) + 58px)!important;right:12px!important;left:auto!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 150px)!important;overflow-y:auto;z-index:240!important; }
}
@media screen and (min-width:768px) {
  .cm203-cycle-cards,.cm203-stage-cards,.cm203-calendar-agenda { display:none!important; }
}
