/* C11 presentation is scoped to this offline shell; C7/C8/C9 shared views stay unchanged. */
.offline-library[hidden], .offline-welcome[hidden] { display: none !important; }

.offline-welcome {
  width: min(100%, 560px);
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: max(1.2rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.offline-welcome-art { width: clamp(210px, 72vw, 350px); aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto clamp(1rem, 3.5vh, 1.8rem); border-radius: 50%; background: radial-gradient(circle, #fffefd 0 55%, #f4e7e2 56% 72%, transparent 73%); }
.offline-welcome-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.offline-welcome-eyebrow { margin: 0 0 .7rem; color: #9a536d; font-size: .7rem; font-weight: 750; letter-spacing: .16em; }
.offline-welcome h1 { max-width: 19ch; margin: 0; color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 8.2vw, 3rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.12; }
.offline-welcome-copy { max-width: 35ch; margin: 1rem 0 1.65rem; color: #756b70; font-size: 1rem; line-height: 1.65; }
.offline-enter { width: min(100%, 360px); min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; border: 1px solid #8d3e5c; border-radius: 1rem; background: #a64d6d; color: #fff; box-shadow: 0 8px 20px rgb(166 77 109 / 16%); font: inherit; font-weight: 700; cursor: pointer; transition: background-color .16s ease, transform .16s ease; }
.offline-enter:hover { background: #8d3e5c; }
.offline-enter:active { transform: translateY(1px); }
.offline-enter:focus-visible { outline: 3px solid #9a536d; outline-offset: 3px; }
.offline-welcome-note { max-width: 38ch; margin: 1.35rem 0 0; color: #756b70; font-size: .77rem; line-height: 1.5; }

.offline-library { width: min(100%, 820px); min-height: 100vh; margin: 0 auto; padding: 0 1rem max(1.5rem, env(safe-area-inset-bottom)); }
.offline-topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid #eadfd9; }
.offline-topbar .brand { gap: .55rem; color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; }
.offline-topbar .brand img { width: 40px; height: 40px; object-fit: contain; }
.offline-topbar .brand b { color: #71364e; font-weight: 500; }
.offline-topbar .brand:focus-visible { outline: 3px solid #b9708a; outline-offset: 3px; border-radius: .5rem; }
.offline-topbar .readonly-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .65rem; border: 1px solid #d6e2d2; background: #f1f5ed; color: #34543c; white-space: nowrap; }
.offline-page { max-width: 720px; margin: 0 auto; padding: clamp(1.4rem, 5vw, 2.5rem) 0 1.5rem; }
.offline-page-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.offline-page-heading .eyebrow { margin-bottom: .35rem; }
.offline-page-heading h1 { color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 8vw, 2.7rem); font-weight: 500; letter-spacing: -.04em; overflow-wrap: anywhere; }
.offline-page-heading h1:focus { outline: none; }
.offline-page-heading h1:focus-visible { outline: 3px solid #b9708a; outline-offset: 4px; border-radius: .25rem; }
.offline-heading-mark { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; background: #f7dce6; color: #803651; font-size: 1.25rem; }
.offline-page .page-intro { margin: .55rem 0 1rem; color: #756b70; line-height: 1.55; }
.offline-shell-status { width: fit-content; max-width: calc(100% - 2rem); margin: .65rem auto 0; padding: .4rem .7rem; border: 1px solid #d9e2d4; border-radius: 999px; background: #f4f7f1; color: #425d42; font-size: .76rem; line-height: 1.4; overflow-wrap: anywhere; text-align: center; }
.offline-library .storage-state { margin: 0 0 .9rem; color: #71646a; font-size: .81rem; line-height: 1.45; }
.offline-library .error-banner { margin: 0 0 .9rem; padding: .85rem 1rem; border-color: #e7c4c4; border-radius: 1rem; background: #fff3f2; color: #763939; font-size: .88rem; }
.offline-library .empty-banner { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: .5rem 0 1rem; padding: 1.5rem 1.15rem; border: 1px dashed #d9c9c5; border-radius: 1.35rem; background: linear-gradient(145deg, #fffefd, #faf3f0); color: #756b70; text-align: center; }
.offline-library .empty-banner[hidden] { display: none !important; }
.empty-mark { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: .75rem; border-radius: 15px; background: #f7e8ed; color: #9a536d; font-size: 1.25rem; }
.offline-library .empty-banner h2 { margin: 0 0 .4rem; color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; font-weight: 550; }
.offline-library .empty-banner p { max-width: 38ch; margin: 0; font-size: .88rem; line-height: 1.55; }
.offline-library .trip-list { gap: .9rem; }
.offline-library .snapshot-trip-card { min-width: 0; overflow: hidden; padding: 0; border: 1px solid #eadfd9; border-radius: 1.25rem; background: #fffefd; box-shadow: 0 10px 27px rgb(83 56 61 / 7%); }
.offline-library .snapshot-trip-card-body { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: .45rem; padding: 1.05rem; }
.offline-library .snapshot-eyebrow { margin: 0; color: #9a536d; font-size: .65rem; font-weight: 750; letter-spacing: .13em; }
.offline-library .snapshot-card-title { min-width: 0; margin: 0; color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 5.4vw, 1.4rem); font-weight: 550; line-height: 1.2; overflow-wrap: anywhere; }
.offline-library .snapshot-card-destination { margin: -.1rem 0 0; color: #71364e; font-size: .89rem; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.offline-library .snapshot-dates { margin: .1rem 0 .2rem; color: #756b70; font-size: .83rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.offline-library .snapshot-status { align-self: flex-start; padding: .4rem .7rem; background: #f2edf3; color: #59436b; font-size: .75rem; }
.offline-library .snapshot-status.active { background: #e8efe5; color: #34543c; }
.offline-library .snapshot-open, .offline-library .snapshot-back { min-height: 46px; border: 1px solid #e8afc0; border-radius: .9rem; padding: .65rem .95rem; background: #f7dce6; color: #803651; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.offline-library .snapshot-open { width: 100%; margin-top: .35rem; }
.offline-library .snapshot-open:hover, .offline-library .snapshot-back:hover { background: #efd0da; }
.offline-library .snapshot-open:focus-visible, .offline-library .snapshot-back:focus-visible { outline: 3px solid #9a536d; outline-offset: 3px; }
.offline-library .snapshot-open:disabled { cursor: wait; opacity: .68; }
.offline-library .snapshot-open:disabled:hover { background: #f7dce6; }
.offline-library .snapshot-detail-hero { margin: .8rem 0 1.1rem; padding: clamp(1.1rem, 5vw, 1.7rem); border: 1px solid #e7d5d6; border-radius: 1.35rem; background: linear-gradient(140deg, #f5e8e3 0%, #faefec 58%, #f1e5eb 100%); box-shadow: none; }
.offline-library .snapshot-detail-hero .snapshot-trip-title { margin: .15rem 0 .65rem; color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 7vw, 2.15rem); font-weight: 500; line-height: 1.12; overflow-wrap: anywhere; }
.offline-library .snapshot-detail-hero .snapshot-dates { margin: 0 0 .75rem; font-size: .9rem; }
.offline-library .snapshot-destination { margin: .65rem 0 0; color: #71364e; font-size: .95rem; font-weight: 650; }
.offline-library .snapshot-section { margin-top: 1rem; padding: 1.1rem; border: 1px solid #eadfd9; border-radius: 1.2rem; background: #fffefd; box-shadow: 0 6px 19px rgb(83 56 61 / 4%); }
.offline-library .snapshot-section h2 { margin: 0 0 .8rem; color: #49383f; font-family: Georgia, "Times New Roman", serif; font-size: 1.22rem; font-weight: 550; }
.offline-library .snapshot-day { padding: .9rem 0; border-top: 1px solid #f0e8ea; }
.offline-library .snapshot-day h3 { color: #594750; }
.offline-library .snapshot-day-date { color: #756b70; font-size: .82rem; }
.offline-library .snapshot-activities { gap: .75rem; margin-top: .9rem; }
.offline-library .snapshot-activity { padding: .65rem .75rem; border-left: 2px solid #e8afc0; border-radius: 0 .7rem .7rem 0; background: #fff9fa; }
.offline-library .snapshot-activity-title { color: #49383f; line-height: 1.45; }
.offline-library .snapshot-activity-meta, .offline-library .snapshot-place { color: #756b70; font-size: .81rem; line-height: 1.45; }
.offline-library .snapshot-place { color: #71364e; font-weight: 600; }
.offline-library .snapshot-checklist { gap: .7rem; margin: 0; }
.offline-library .snapshot-checklist-item { align-items: flex-start; color: #594750; line-height: 1.5; }
.offline-library .snapshot-checkmark { flex: 0 0 1.2rem; color: #756b70; }
.offline-library .snapshot-checkmark.is-checked { color: #34543c; }
.offline-library .snapshot-empty { color: #756b70; }

.lab-tools, .offline-diagnostics { margin: 1.25rem 0 0; border: 1px solid #e8dfdf; border-radius: .95rem; background: rgb(255 254 253 / 76%); color: #62565a; font-size: .79rem; }
.lab-tools summary, .offline-diagnostics summary { min-height: 44px; display: flex; align-items: center; padding: .6rem .85rem; color: #715964; cursor: pointer; font-weight: 650; list-style-position: inside; }
.lab-tools summary:focus-visible, .offline-diagnostics summary:focus-visible { outline: 3px solid #b9708a; outline-offset: 2px; border-radius: .75rem; }
.lab-tools > p, .offline-diagnostics > p { margin: 0; padding: .25rem .9rem .75rem; line-height: 1.5; }
.offline-library .storage-save { width: 100%; min-height: 44px; margin: .35rem 0 .2rem; font-size: .84rem; }
.offline-library .storage-hint { padding-top: .25rem; color: #756b70; font-size: .75rem; }
.offline-library .storage-feedback { margin: .2rem .9rem .85rem; padding: .75rem; border: 1px solid #d7d0de; border-radius: .8rem; background: #f8f5fa; color: #59436b; font-size: .82rem; line-height: 1.45; }
.offline-library .storage-feedback[hidden] { display: none !important; }
.offline-library .storage-save:disabled { cursor: wait; opacity: .68; }
.offline-library .storage-save:disabled:hover { background: #f7dce6; }
.offline-library .shell-retry { width: calc(100% - 1.8rem); margin: 0 .9rem .75rem; }
.offline-diagnostic-list { max-height: 280px; display: grid; gap: .55rem; margin: 0; padding: 0 .9rem .8rem 2.4rem; overflow: auto; }
.offline-diagnostic-list li { padding-left: .15rem; }
.offline-diagnostic-list li strong { display: block; margin-top: .1rem; font-size: .77rem; }
.offline-diagnostic-list li[data-state="ok"] strong { color: #34543c; }
.offline-diagnostic-list li[data-state="failed"] strong, .offline-diagnostic-list li[data-state="timeout"] strong { color: #803b3b; }
.offline-diagnostic-list li[data-state="unavailable"] strong { color: #756b70; }
.offline-diagnostic-list li small { display: block; margin-top: .15rem; color: #756b70; line-height: 1.4; overflow-wrap: anywhere; }
.offline-diagnostic-error { margin: 0 .9rem .5rem; color: #763939; line-height: 1.45; }
.offline-diagnostic-error:empty { display: none; }
.offline-diagnostic-privacy { color: #756b70; font-size: .72rem; }
.offline-library > footer { margin-top: 1.5rem; border-top: 1px solid #eadfd9; padding: 1rem 0; color: #756b70; font-size: .75rem; line-height: 1.5; text-align: center; }

@media (min-width: 620px) {
  .offline-library { padding-right: 2rem; padding-left: 2rem; }
  .offline-library .trip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .offline-library .snapshot-trip-card-body { padding: 1.25rem; }
  .offline-library .snapshot-open { margin-top: auto; }
}

@media (max-width: 360px) {
  .offline-welcome-art { width: min(72vw, 250px); }
  .offline-library { padding-right: .8rem; padding-left: .8rem; }
  .offline-topbar .brand { gap: .4rem; font-size: .9rem; }
  .offline-topbar .brand img { width: 36px; height: 36px; }
  .offline-topbar .readonly-pill { padding: .34rem .5rem; font-size: .7rem; }
  .offline-library .snapshot-trip-card-body { padding: .9rem; }
}
