/* F5: Sections, package lists, Search, the package page, depictions and the modal sheet. Sizes are the kit's @2x
   halved, or Cydia's points (docs/cydia.md); colours from the kit's layers as named, else the theme's variables. */

/* ---- "folder.png", redrawn: a #8e8e93 rounded square with a white folder; Cydia puts the section's count in it
   (12pt bold, in the folder's grey). ---- */
.folder {
  position: relative; flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%238e8e93'/%3E%3Cpath d='M5.5 10V7.2c0-.7.5-1.2 1.2-1.2h7.6c.5 0 .9.3 1.1.7L16.2 8H25c.7 0 1.2.5 1.2 1.2V10z' fill='%23eaeaeb'/%3E%3Crect x='3' y='9.5' width='26' height='17.5' rx='1.6' fill='%23fff'/%3E%3C/svg%3E") center / 32px 32px no-repeat;
}
.folder-count { margin-top: 5px; font-size: 12px; font-weight: bold; line-height: 1; color: #8e8e93; letter-spacing: -.02em; }
.all-sources-row .cell-inner { min-height: 53px; }
.sections .cell-inner { min-height: 46px; padding-left: 7px; gap: 9px; } /* folder at (7,7), name at x 48 */
.sections .cell-label { flex: 1; min-width: 0; font-size: 18px; line-height: 22px; }

/* ---- the virtualised list (nav/vlist.js) ---- */
.vlist { position: relative; contain: layout; }
.vlist-row, .vlist-header { position: absolute; top: 0; left: 0; right: 0; }
.vlist-header { z-index: 1; }
/* Placeholder rows under a package list: a fast fling can outrun drawing the real rows (they're placed once a frame),
   so the gap shows rows still loading instead of blank space. The real rows cover them; the list is only as tall
   as its items, so they stop where the list ends. */
.pkg-vlist {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='58'%3E%3Cg fill='%23808080'%3E%3Crect x='9' y='13' width='32' height='32' rx='7' fill-opacity='.22'/%3E%3Crect x='51' y='15' width='130' height='13' rx='4' fill-opacity='.2'/%3E%3Crect x='51' y='34' width='190' height='9' rx='3' fill-opacity='.13'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 260px 58px repeat-y,
    linear-gradient(transparent 57px, var(--keyline) 57px) 0 0 / 100% 58px repeat-y, var(--plain);
}
.vlist-sticky { position: sticky; top: 0; z-index: 2; margin-bottom: -23px; } /* top: 0 is just under the nav: sticky offsets count from inside the scroller's padding */

/* Package rows: 58px, the 32px icon, name in bold with the version beside it, the short description under. */
.pkg-row { height: 58px; contain: strict; background: var(--plain); border-bottom: 1px solid var(--keyline); }
.pkg-row > .cell-inner { height: 100%; min-height: 0; gap: 10px; padding: 0 12px 0 9px; }
.pkg-row > .cell-inner::after { /* the disclosure chevron, as on every Cydia package cell */
  content: ""; flex: none; width: 9px; height: 13px; background: var(--chevron) center / contain no-repeat;
}
.pkg-row > .cell-inner.is-pressed::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17.5 26.4'%3E%3Cpath fill='%23fff' d='M.07 4.23 9.12 13.27 0 22.26 4.12 26.38 17.47 13.03 4.43 0Z'/%3E%3C/svg%3E");
}
.pkg-icon {
  position: relative; flex: none; width: 32px; height: 32px; border-radius: 7px; overflow: hidden;
  display: grid; place-items: center; background: #8c99b3; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.pkg-letter { font-size: 16px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.3); }
.pkg-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: #fff; }
.pkg-icon img.loaded { opacity: 1; }
.pkg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pkg-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.pkg-name { flex: 0 1 auto; min-width: 0; font-size: 17px; font-weight: bold; line-height: 21px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pkg-version { flex: none; margin-left: auto; max-width: 45%; font-size: 13px; color: var(--subtitle); text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pkg-desc { font-size: 14px; line-height: 17px; color: var(--subtitle); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---- loading ---- */
.loading { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 40px 20px; font-size: 17px; color: var(--head); text-shadow: var(--emboss); }
.loading-spinner { /* UIActivityIndicatorView, gray: the HUD's 12 separate spokes (nav/hud.js), in grey, turned a spoke at a time */
  width: 22px; height: 22px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cg stroke='%23808080' stroke-width='3.2' stroke-linecap='round'%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(0 18 18)' opacity='1.00'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(30 18 18)' opacity='0.93'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(60 18 18)' opacity='0.86'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(90 18 18)' opacity='0.79'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(120 18 18)' opacity='0.71'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(150 18 18)' opacity='0.64'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(180 18 18)' opacity='0.57'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(210 18 18)' opacity='0.50'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(240 18 18)' opacity='0.43'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(270 18 18)' opacity='0.36'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(300 18 18)' opacity='0.29'/%3E%3Cline x1='18' y1='3' x2='18' y2='10' transform='rotate(330 18 18)' opacity='0.21'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  animation: hud-spin .96s steps(12) infinite;
}
.depiction-slot .loading { margin: 20px; }
.page-body > .loading { height: 72%; margin: 0 20px; } /* a page still loading: the spinner in the middle (user 2026-11-17) */

/* ---- "grey search bar": 44px, #b5b9bd -> #d3dbdf (7%) -> #b3bdc5, a 1px #81919f line under it; the field is
   30px, 15px corners, white, a #7b8fa3 -> #a3afb9 edge and a soft inner shadow; the #93979d magnifier. ---- */
.search-bar {
  height: 44px; margin: 0; padding: 7px 5px; display: flex;
  background: linear-gradient(#81919f, #81919f) bottom / 100% 1px no-repeat, linear-gradient(#b5b9bd, #d3dbdf 7%, #b3bdc5);
}
.search-field {
  flex: 1; display: flex; align-items: center; height: 30px; padding: 0 10px 0 29px; border-radius: 15px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2393979d' fill-rule='evenodd' d='M6.5 0a6.5 6.5 0 0 1 5.3 10.3l4 4-1.5 1.5-4-4A6.5 6.5 0 1 1 6.5 0zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z'/%3E%3C/svg%3E") 10px 50% / 14px 14px no-repeat;
  border: 1px solid #a3afb9; border-top-color: #7b8fa3;
  box-shadow: inset 0 1.5px 2px rgba(35,31,32,.45);
}
.search-field input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none;
  font: inherit; font-size: 16px; color: #000; -webkit-user-select: text; user-select: text; -webkit-appearance: none; appearance: none;
}
.search-field input::placeholder { color: #b4b3b4; }
.search-field input::-webkit-search-decoration { -webkit-appearance: none; }
html[data-theme="dark"] .search-bar {
  background: linear-gradient(#000, #000) bottom / 100% 1px no-repeat, linear-gradient(#4c4c4c, #2a2a2a 7%, #1a1a1a);
}
html[data-theme="dark"] .search-field { background-color: #2b2e33; border-color: #15171a; }
html[data-theme="dark"] .search-field input { color: #fff; }
.search-note:empty { display: none; }
.search-note { margin: 30px 20px; }

/* ---- the package page ---- */
.group-footer { white-space: pre-line; }
.pkg-head-table { display: block; }
.pkg-head { display: flex; align-items: center; gap: 12px; padding: 10px; position: relative; min-height: 84px; }
.pkg-icon.large { width: 64px; height: 64px; border-radius: 12px; }
.pkg-icon.large .pkg-letter { font-size: 30px; }
.pkg-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 40px; }
.pkg-head-name { font-size: 17px; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pkg-head-version { font-size: 14px; color: var(--detail); }
.pkg-head-size { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--subtitle); }
.pkg-description { padding: 10px 12px; font-size: 15px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
a.cell-inner.download .cell-label { color: var(--detail); }

/* ---- Sileo depictions, drawn natively (screens/depiction.js) ---- */
.dep-card { padding: 4px 0; overflow: hidden; }
.dep { --dep-tint: var(--detail); font-size: 15px; line-height: 20px; color: var(--text); overflow-wrap: anywhere; }
.dep-header-image { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.dep-stack { display: flex; flex-direction: column; }
.dep-stack.row { flex-direction: row; align-items: center; }
.dep-stack.row > * { flex: 1; min-width: 0; }
.dep-layer { display: grid; } .dep-layer > * { grid-area: 1 / 1; }
.dep-header { margin: 10px 12px 4px; font-size: 19px; line-height: 23px; font-weight: bold; }
.dep-subheader { margin: 2px 12px 6px; font-size: 15px; color: var(--subtitle); } .dep-subheader.bold { font-weight: bold; color: var(--text); }
.dep-label { margin: 4px 12px; }
.dep-markdown { padding: 2px 12px; -webkit-user-select: text; user-select: text; }
.dep-markdown p { margin: 6px 0; }
.dep-markdown h3, .dep-markdown h4, .dep-markdown h5, .dep-markdown h6 { margin: 10px 0 4px; font-size: 16px; }
.dep-markdown ul, .dep-markdown ol { margin: 6px 0; padding-left: 22px; }
.dep-markdown img { max-width: 100%; height: auto; }
.dep-markdown code { font-family: Menlo, Courier, monospace; font-size: 13px; }
.dep a { color: var(--dep-tint); text-decoration: none; }
.dep-image { padding: 6px 12px; } .dep-image img { max-width: 100%; height: auto; }
.dep-shots { display: flex; gap: 10px; padding: 8px 12px; overflow-x: auto; touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.dep-shots img { flex: none; object-fit: cover; background: rgba(127,127,127,.15); }
.dep-row { display: flex; align-items: center; gap: 8px; min-height: 43px; padding: 0 12px; border-top: 1px solid var(--divider); }
.dep-row-title { flex: 1; font-weight: bold; } .dep-row-text { color: var(--detail); text-align: right; }
.dep-button-row { font-weight: bold; }
.dep-button-row::after { content: ""; margin-left: auto; flex: none; width: 9px; height: 13px; background: var(--chevron) center / contain no-repeat; }
.dep-button { display: block; margin: 6px 12px; padding: 10px; border-radius: 8px; text-align: center; font-weight: bold; color: #fff !important; background: var(--dep-tint); }
.dep-button-row.disabled, .dep-button.disabled { opacity: .5; pointer-events: none; }
.dep-separator { margin: 6px 12px; border: 0; border-top: 1px solid var(--divider); }

/* Segmented control (DepictionTabView): grey segments, the selected one in the kit's matte blue. */
.segmented { display: flex; margin: 8px 12px; border: 1px solid #8e8e8e; border-radius: 6px; overflow: hidden; }
.segment {
  flex: 1; height: 30px; padding: 0 6px; border: 0; cursor: pointer; font-size: 13px; font-weight: bold; color: #6b6b6b;
  text-shadow: 0 1px 0 rgba(255,255,255,.75); background: linear-gradient(#fdfdfd, #e2e2e2);
}
.segment + .segment { border-left: 1px solid #8e8e8e; }
.segment.selected { color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.35); background: var(--select); }

/* ---- the modal sheet (nav/sheet.js): its own blue nav bar with Done, slid up by transform ---- */
.sheet { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; background: var(--plain); will-change: transform; }
html.native .navbar.sheet-bar { display: block; } /* the app hides the web nav bar, not a sheet's */
.sheet-bar-row {
  position: absolute; left: 0; right: 0; top: env(safe-area-inset-top); height: 44px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px;
  padding: 0 max(5px, env(safe-area-inset-right)) 0 max(5px, env(safe-area-inset-left));
}
.sheet-right { justify-self: end; display: flex; }
.sheet-body { flex: 1; position: relative; min-height: 0; padding-bottom: env(safe-area-inset-bottom); }
.sheet-body > .sheet-scroll { position: absolute; inset: 0; }
.depiction-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

/* ---- Changes tab (screens/changes.js): the version reads "New 1.0" or "Updated 1.2" (Cydian's addition) ---- */
.pkg-row[data-change="new"] .pkg-version::before { content: "New "; font-weight: bold; }
.pkg-row[data-change="updated"] .pkg-version::before { content: "Updated "; font-weight: bold; }

/* ---- Works on my phone (F17): a small outlined tag beside the name and on the package page; the switch row above
   the Sections list and Search's results ---- */
.pkg-compat {
  flex: none; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px;
  font-size: 10px; font-weight: bold; line-height: 13px; white-space: nowrap; color: var(--subtitle);
}
.pkg-compat:empty { display: none; }
.pkg-compat[data-compat="works"] { color: #3e8e2f; }
.pkg-compat[data-compat="ios"], .pkg-compat[data-compat="rootful"], .pkg-compat[data-compat="rootless"],
.pkg-compat[data-compat="roothide"], .pkg-compat[data-compat="jailbreak"], .pkg-compat[data-compat="arch"] { color: #c0392b; }
:root[data-theme="dark"] .pkg-compat[data-compat="works"] { color: #7fcf6f; }
:root[data-theme="dark"] .pkg-compat[data-compat="ios"], :root[data-theme="dark"] .pkg-compat[data-compat="rootful"],
:root[data-theme="dark"] .pkg-compat[data-compat="rootless"], :root[data-theme="dark"] .pkg-compat[data-compat="roothide"],
:root[data-theme="dark"] .pkg-compat[data-compat="jailbreak"], :root[data-theme="dark"] .pkg-compat[data-compat="arch"] { color: #ff7b6b; }
.pkg-head-text .pkg-compat { align-self: flex-start; }
.compat-filter .cell-inner { min-height: 50px; }

/* ---- Search's scope bar (F35): iOS 6's UISearchBar scope buttons under the field. The bar runs on in the search
   bar's grey and takes its bottom line; the segments are UISegmentBar's (UISegmentBarButton*.png, 30pt): a
   #3b4046 top edge, #abbacd -> #6581a4 inside (selected #97a9c1 -> #41618e), #586f8f under, 30% white below. ---- */
.search-bar.has-scope { background: linear-gradient(#b5b9bd, #d3dbdf 7%, #b3bdc5); }
.search-scope {
  display: flex; gap: 6px; height: 44px; padding: 7px 5px; align-items: flex-start;
  background: linear-gradient(#81919f, #81919f) bottom / 100% 1px no-repeat, linear-gradient(#b3bdc5, #aab5be);
}
.scope-segments { flex: 1; min-width: 0; display: flex; border-radius: 5px; box-shadow: 0 1px 0 rgba(255,255,255,.3); }
.scope-segment, .scope-filter {
  flex: 1; min-width: 0; height: 30px; padding: 0 4px; margin: 0; cursor: pointer; touch-action: manipulation;
  font: inherit; font-size: 12px; font-weight: bold; line-height: 28px; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-shadow: 0 -1px 0 rgba(0,0,0,.45);
  border: 1px solid #505e70; border-top-color: #3b4046; border-bottom-color: #586f8f; border-radius: 0;
  background: linear-gradient(#abbacd, #6581a4); background-origin: border-box;
}
.scope-segment + .scope-segment { border-left-color: #5e7597; }
.scope-segment:first-child { border-radius: 5px 0 0 5px; }
.scope-segment:last-child { border-radius: 0 5px 5px 0; }
.scope-segment.selected, .scope-segment:active, .scope-filter.selected, .scope-filter:active {
  border-color: #3e4e64; border-top-color: #343a42; border-bottom-color: #38547b;
  background: linear-gradient(#97a9c1, #41618e); background-origin: border-box;
}
.scope-segment.selected + .scope-segment { border-left-color: #43597b; }
.scope-filter { flex: none; padding: 0 10px; border-radius: 5px; box-shadow: 0 1px 0 rgba(255,255,255,.3); }
/* Filter becomes a blue Done while its panel is open (the nav bar's Done colours, sources.css). */
.scope-filter.done, html[data-theme="dark"] .scope-filter.done {
  border-color: #1f3f86; border-top-color: #30363e;
  background: linear-gradient(#79a1f3, #3b71e1 49%, #215fdd 51%, #2361dd); background-origin: border-box;
}
.scope-filter.done:active, html[data-theme="dark"] .scope-filter.done:active {
  background: linear-gradient(#5f86d6, #2a5bc0 49%, #164bb8 51%, #184db9); background-origin: border-box;
}
html[data-theme="dark"] .search-bar.has-scope { background: linear-gradient(#4c4c4c, #2a2a2a 7%, #1a1a1a); }
html[data-theme="dark"] .search-scope { background: linear-gradient(#000, #000) bottom / 100% 1px no-repeat, #1a1a1a; }
html[data-theme="dark"] .scope-segment, html[data-theme="dark"] .scope-filter {
  border-color: #111; background: linear-gradient(#4a4f58, #24272c); background-origin: border-box;
}
html[data-theme="dark"] .scope-segment.selected, html[data-theme="dark"] .scope-segment:active,
html[data-theme="dark"] .scope-filter.selected, html[data-theme="dark"] .scope-filter:active {
  border-color: #000; background: linear-gradient(#2a2d32, #121316); background-origin: border-box;
}
html[data-theme="dark"] .scope-segments, html[data-theme="dark"] .scope-filter { box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.filter-sheet .filter-clear .cell-label { color: var(--detail); }

/* ---- Compatibility marks (F35): a small round mark beside every package, like the old Cydia tweak that drew a
   check or an X: green check works, red X doesn't, grey ? the package doesn't say. Drawn as SVG; Settings > Show
   Compatibility Marks hides them (html[data-compat-marks="off"], browse.js). ---- */
.compat-mark { flex: none; align-self: center; width: 14px; height: 14px; background: center / contain no-repeat; }
.compat-mark:not([data-mark]) { display: none; }
html[data-compat-marks="off"] .compat-mark { display: none; }
.compat-mark.large { width: 18px; height: 18px; }
.compat-mark[data-mark="works"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%2384d65e'/%3E%3Cstop offset='1' stop-color='%23329c1c'/%3E%3C/linearGradient%3E%3Ccircle cx='14' cy='14' r='13' fill='url(%23g)' stroke='%23267a16' stroke-width='1.5'/%3E%3Cpath d='M8 14.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.compat-mark[data-mark="no"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f2675c'/%3E%3Cstop offset='1' stop-color='%23c3211a'/%3E%3C/linearGradient%3E%3Ccircle cx='14' cy='14' r='13' fill='url(%23g)' stroke='%238f1610' stroke-width='1.5'/%3E%3Cpath d='M9.5 9.5l9 9M18.5 9.5l-9 9' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.compat-mark[data-mark="unknown"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c3c7cc'/%3E%3Cstop offset='1' stop-color='%238c929a'/%3E%3C/linearGradient%3E%3Ccircle cx='14' cy='14' r='13' fill='url(%23g)' stroke='%23707780' stroke-width='1.5'/%3E%3Cpath d='M10.4 11.2a3.6 3.6 0 1 1 5.4 3.1c-1.2.7-1.8 1.3-1.8 2.7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='20.6' r='1.8' fill='%23fff'/%3E%3C/svg%3E");
}
/* An exact match that can't work (Search, F35): the name in red, the reason under it. */
.pkg-name.incompatible { color: #c0392b; }
html[data-theme="dark"] .pkg-name.incompatible { color: #ff7b6b; }
.pkg-head-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pkg-head-top .pkg-head-name { min-width: 0; }
html[data-theme="dark"] .scope-segment + .scope-segment, html[data-theme="dark"] .scope-segment.selected + .scope-segment { border-left-color: #000; }

/* Search's Filter panel (screens/search.js): drops down from under the scope bar over the results only, between the
   scope bar and the tab bar; scrolls on its own. */
.filter-drop { position: fixed; left: 0; right: 0; bottom: var(--tab-h); z-index: 2; overflow: hidden; }
.filter-drop-inner {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 20px;
  background: repeating-linear-gradient(90deg, var(--pin-dark) 0 2.5px, var(--pin-light) 2.5px 8px) var(--pin-light);
  box-shadow: inset 0 3px 3px -2px rgba(0,0,0,.35);
}

/* ---- The action sheet (nav/actionsheet.js, F29): UIActionSheet's default style, from the 4S's UIAlertSheet* art.
   Panel (UIAlertSheetDefaultBackground, 84% opaque): a 1pt #3f4347 top edge, half a point of white, then
   #acb1b9 -> #5c626d over 33pt and flat below. Buttons (UIAlertSheetDefaultButton): 44pt, 10pt corners, a dark
   edge that fades inward, white -> #c2c3c5 (69%) -> #e3e3e3 face and a faint light line under the button (all
   in the art); pressed (…ButtonPressed) #91a2f0 -> #022bdc -> #3252e3 with white text. Cancel
   (…CancelButton) #7e8288 -> #2b3038 -> #383f46, white text, after a wider gap. Black style in the dark theme. ---- */
.action-scrim { position: fixed; inset: 0; z-index: 30; }
.action-dim { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.action-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 11px;
  padding: 21px 21px calc(22px + env(safe-area-inset-bottom));
  max-height: calc(100% - 20px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain;
  background:
    linear-gradient(#3f4347, #3f4347) top / 100% 1px no-repeat,
    linear-gradient(rgba(255,255,255,.84), rgba(255,255,255,.84)) 0 1px / 100% .5px no-repeat,
    linear-gradient(rgba(172,177,185,.84) 1.5px, rgba(142,148,158,.84) 12px, rgba(107,113,123,.84) 26px, rgba(92,98,109,.84) 33px);
  will-change: transform;
}
.action-title {
  margin: -6px 0 2px; font-size: 13px; line-height: 17px; text-align: center; color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,.5); white-space: pre-line; overflow-wrap: anywhere;
}
.action-button {
  flex: none; height: 44px; min-height: 44px; padding: 0 12px; margin: 0; cursor: pointer; touch-action: manipulation;
  font: inherit; font-size: 20px; font-weight: bold; line-height: 40px; color: #000; text-shadow: 0 1px 0 rgba(255,255,255,.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid rgba(0,0,0,.8); border-radius: 10px;
  box-shadow: inset 0 0 1.5px 1px rgba(0,0,0,.35), 0 1px 0 rgba(211,211,211,.23);
  background: linear-gradient(#fff, #fafafa 7%, #ebebec 23%, #d9d9db 38%, #c9cacc 54%, #c2c3c5 69%, #c5c6c7 77%, #cdcdcf 85%, #dcdcdd 92%, #e3e3e3);
  background-origin: border-box;
}
.action-button:active {
  color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.4);
  background: linear-gradient(#91a2f0, #7a90ec 7%, #6a82ea 23%, #4c69e6 38%, #2d4fe1 54%, #1036de 69%, #022bdc 77%, #0c33dd 85%, #2649df 92%, #3252e3);
  background-origin: border-box;
}
.action-button.destructive {
  color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.4); /* UIAlertSheetDefaultDestroyButton: Cydia's Remove isn't one */
  background: linear-gradient(#f59a9a, #e45c5c 30%, #cf1f1f 69%, #d52f2f); background-origin: border-box;
}
.action-button.cancel {
  margin-top: 14px; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.5);
  background: linear-gradient(#7e8288, #65676d 7%, #565a60 23%, #484b52 38%, #3b3f47 54%, #2e333b 69%, #2b3038 77%, #2c3139 85%, #333941 92%, #383f46);
  background-origin: border-box;
}
.action-button.cancel:active { background: linear-gradient(#5f6268, #3a3d43 50%, #1c2027); background-origin: border-box; }
html[data-theme="dark"] .action-sheet { /* UIAlertSheetBlackBackground: #232323 edge, #6a6a6a -> #040404 */
  background:
    linear-gradient(rgba(35,35,35,.89), rgba(35,35,35,.89)) top / 100% 1px no-repeat,
    linear-gradient(rgba(167,167,167,.82), rgba(167,167,167,.82)) 0 1px / 100% .5px no-repeat,
    linear-gradient(rgba(106,106,106,.73) 1.5px, rgba(81,81,81,.7) 12px, rgba(44,44,44,.65) 24px, rgba(9,9,9,.62) 36px, rgba(1,1,1,.6));
}
html[data-theme="dark"] .action-button:not(.cancel):not(.destructive):not(:active) { /* UIAlertSheetBlackButton */
  background: linear-gradient(#fbfbfb, #f5f5f5 15%, #f0f0f0 38%, #eee 46%, #e4e4e4 54%, #e4e4e4); background-origin: border-box;
}
html[data-theme="dark"] .action-button.cancel { /* UIAlertSheetBlackCancelButton */
  background: linear-gradient(#878787, #686868 7%, #545454 23%, #383838 38%, #1a1a1a 54%, #020202 69%, #000 77%, #131313); background-origin: border-box;
}

/* ---- The package page's head (F29): the author under the name, as a link to their packages ---- */
.pkg-head-author { font-size: 14px; color: var(--subtitle); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }

/* ---- Version History (F29, browse.js renderVersions): one cell per version, version and marks on top, sources or
   date and size beside, release notes under; versions this iPhone can't run are greyed ---- */
.version-row .cell-inner { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 9px; padding-bottom: 9px; }
.version-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.version-top .cell-label { flex: 0 1 auto; min-width: 0; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.version-top .cell-detail { margin-left: auto; font-size: 14px; }
.version-tag {
  flex: none; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px;
  font-size: 10px; font-weight: bold; line-height: 13px; color: var(--detail); white-space: nowrap;
}
.version-sub { font-size: 14px; color: var(--subtitle); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.version-notes { margin: 2px 0 0; font-size: 14px; line-height: 18px; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.version-row.unavailable .cell-label, .version-row.unavailable .version-notes { color: var(--subtitle); }

/* The section index (nav/sectionindex.js): UITableView's, 12px bold slate letters spread down the right edge
   between the bars; held, a grey rounded backing behind them. */
.section-index {
  position: absolute; z-index: 4; right: 0; top: calc(var(--nav-h) + 6px); bottom: calc(var(--tab-h) + 6px); width: 18px;
  margin-right: max(2px, env(safe-area-inset-right)); display: flex; flex-direction: column; justify-content: space-between;
  align-items: center; padding: 4px 0; border-radius: 9px; touch-action: none; -webkit-user-select: none; user-select: none;
  font-size: 11px; font-weight: bold; line-height: 1; color: #59657a; cursor: pointer;
}
.section-index.held { background: rgba(0,0,0,.18); }
html[data-theme="dark"] .section-index { color: #9aa3b2; }
html[data-theme="dark"] .section-index.held { background: rgba(255,255,255,.15); }
.page-body[data-section-index] .pkg-row > .cell-inner { padding-right: 26px; } /* rows end before the index, as UITableView's */

/* Before the app's first page (index.html #boot): the pinstripes between the bars with Loading in the middle. */
.boot {
  position: fixed; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(90deg, var(--pin-dark) 0 2.5px, var(--pin-light) 2.5px 8px) var(--pin-light);
}

/* The clear button iOS 6 puts in a search field with text in it (Cydia's search on the 4S: docs/cydia-4s/search-85.png):
   a grey circle with a white x at the field's right end. Drawn here since WebKit on iOS shows none; app.js clears
   the field on a tap there. */
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-field::after {
  content: ""; display: none; flex: none; width: 19px; height: 19px; margin: 0 -5px 0 6px; border-radius: 50%;
  background: #b4b4b4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2l-6 6' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 9px 9px no-repeat;
}
.search-field:has(input:not(:placeholder-shown))::after { display: block; }
html[data-theme="dark"] .search-field::after { background-color: #6b6f75; }

/* Search's root page: the bar and scope row fixed at the top, the results their own scroller below. */
.page-body.search-root { overflow: hidden; display: flex; flex-direction: column; }
.search-root > .search-bar, .search-root > .search-scope { flex: none; }
.search-results { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; position: relative; }
.page-body.search-root::before { display: none; } /* the always-bounce spacer (ios6.css) belongs to the results now */
.search-results::before { content: ""; float: left; width: 1px; margin-right: -1px; height: calc(100% + 1px); }
