/* Jailbreak finder — iOS-style controls in CarterWare paint. Loads after site.css. */
.jb {
  --jb-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--cw-font-body);
  --jb-surface: rgba(30, 26, 28, .78);
  --jb-surface-2: rgba(255, 255, 255, .06);
  --jb-hair: rgba(255, 255, 255, .1);
  --jb-label: rgba(235, 235, 245, .6);
  --jb-green: #30d158;
  --jb-orange: #ff9f0a;
  --jb-spring: cubic-bezier(.2, .9, .25, 1.1);
  font-family: var(--jb-sys);
}

.jb [hidden] { display: none !important; }

.jb-hero { padding: 1.5rem 0 .5rem; }
.jb-hero h1 {
  margin: 0; font-family: var(--cw-font-display); font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 3rem); letter-spacing: -.045em; line-height: 1.02;
  text-wrap: balance;
}
.jb-hero .lede { color: var(--cw-muted); margin: .75rem 0 0; max-width: 31rem; font-size: 1.04rem; font-family: var(--cw-font-body); }
.jb-skip { margin: .9rem 0 0; font-size: .92rem; font-family: var(--cw-font-body); }

/* Grouped, inset list — the Settings look */
.jb-card { margin: 1.6rem 0 0; }
.jb-section-label {
  margin: 0 0 .45rem 1rem; font-size: .8rem; letter-spacing: .02em;
  text-transform: uppercase; color: var(--jb-label);
}
.jb-group {
  background: var(--jb-surface); border-radius: 14px; overflow: hidden;
  -webkit-backdrop-filter: saturate(160%) blur(24px); backdrop-filter: saturate(160%) blur(24px);
  box-shadow: 0 0 0 .5px var(--jb-hair), 0 24px 60px rgba(0, 0, 0, .35);
}
.jb-row {
  appearance: none; -webkit-appearance: none; width: 100%; border: 0; background: transparent;
  display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; min-height: 3.15rem;
  font: inherit; font-size: 1.06rem; color: var(--cw-text); text-align: left; cursor: pointer;
  position: relative; transition: background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.jb-row + .jb-row::before, .jb-row + .jb-wheel-wrap + .jb-row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 3.55rem; height: .5px; background: var(--jb-hair);
}
.jb-row:hover { background: rgba(255, 255, 255, .035); }
.jb-row:active { background: rgba(255, 255, 255, .08); }
.jb-row:focus-visible { outline: 2px solid var(--cw-accent); outline-offset: -2px; border-radius: 14px; }
.jb-row-icon {
  width: 1.85rem; height: 1.85rem; border-radius: .45rem; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #ff2d4f, var(--cw-accent));
}
.jb-row-icon.gray { background: linear-gradient(180deg, #9a9aa0, #6e6e74); }
.jb-row-icon svg { width: 1.15rem; height: 1.15rem; }
.jb-row-label { flex: 1; }
.jb-row-value { color: var(--jb-label); font-variant-numeric: tabular-nums; transition: color .2s ease; }
.jb-row[aria-expanded="true"] .jb-row-value,
.jb-row-value.is-set { color: var(--cw-text); }
.jb-row[aria-expanded="true"] .jb-row-value { color: #ff6b84; }
.jb-chevron { width: .5rem; height: .85rem; color: rgba(235, 235, 245, .3); flex-shrink: 0; transition: transform .3s var(--jb-spring); }
.jb-row[aria-expanded="true"] .jb-chevron { transform: rotate(90deg); }
.jb-section-foot {
  display: flex; align-items: center; gap: .45rem;
  margin: .55rem 1rem 0; font-size: .84rem; color: var(--jb-label);
}
.jb-section-foot strong { color: var(--cw-text); font-weight: 500; }
.jb-settings-glyph {
  width: 1.05rem; height: 1.05rem; border-radius: .26rem; flex-shrink: 0;
  background: linear-gradient(180deg, #a2a2a8, #6c6c72); display: grid; place-items: center;
}
.jb-settings-glyph svg { width: .8rem; height: .8rem; }

/* Inline wheel picker */
.jb-wheel-wrap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .42s var(--jb-spring);
}
.jb-wheel-wrap.open { grid-template-rows: 1fr; }
.jb-wheel-inner { overflow: hidden; min-height: 0; }
.jb-wheel-body { padding: .2rem 1rem 1rem; }
.jb-wheel {
  --h: 36px;
  position: relative; display: flex; justify-content: center; align-items: center;
  height: calc(var(--h) * 5); max-width: 19rem; margin: 0 auto;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
}
.jb-wheel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--h);
  transform: translateY(-50%); border-radius: 9px; background: rgba(255, 255, 255, .09);
  pointer-events: none;
}
.jb-wheel-prefix, .jb-wheel-dot {
  position: relative; font-size: 1.3rem; color: var(--cw-text); font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.jb-wheel-prefix { margin-right: .35rem; color: var(--jb-label); font-size: 1.15rem; }
.jb-wheel-dot { width: .6rem; text-align: center; }
.jb-col {
  position: relative; height: 100%; width: 3.6rem; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; perspective: 520px;
  outline: none; touch-action: pan-y;
}
.jb-col::-webkit-scrollbar { display: none; }
.jb-col:focus-visible li { color: #ff8fa0; }
.jb-col ul { list-style: none; margin: 0; padding: calc(var(--h) * 2) 0; transform-style: preserve-3d; }
.jb-col li {
  height: var(--h); line-height: var(--h); text-align: center; scroll-snap-align: center;
  font-size: 1.3rem; color: var(--cw-text); font-variant-numeric: tabular-nums;
  cursor: pointer; user-select: none; -webkit-user-select: none; backface-visibility: hidden;
  will-change: transform, opacity;
}
.jb-wheel-alt {
  display: flex; align-items: center; justify-content: center; gap: .55rem; flex-wrap: wrap;
  margin: .75rem 0 0; font-size: .86rem; color: var(--jb-label);
}
.jb-wheel-alt input {
  width: 6.5rem; font: inherit; font-size: 1rem; color: var(--cw-text); text-align: center;
  background: var(--jb-surface-2); border: 0; border-radius: 9px; padding: .4rem .5rem;
  box-shadow: inset 0 0 0 .5px var(--jb-hair);
}
.jb-wheel-alt input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--cw-accent); }
.jb-detected {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin: .65rem 0 0; font-size: .82rem; color: var(--jb-label);
}
.jb-detected::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--jb-green); }

/* Bottom sheet */
.jb-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.jb-sheet[hidden] { display: none; }
.jb-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0;
  transition: opacity .3s ease;
}
.jb-sheet-panel {
  position: relative; width: 100%; max-width: 32rem; max-height: min(86vh, 46rem);
  display: flex; flex-direction: column;
  background: rgba(28, 24, 26, .9);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border-radius: 14px 14px 0 0; box-shadow: 0 0 0 .5px var(--jb-hair), 0 -20px 60px rgba(0, 0, 0, .5);
  transform: translateY(100%); transition: transform .45s var(--jb-spring);
  padding-bottom: env(safe-area-inset-bottom);
}
.jb-sheet.open .jb-sheet-backdrop { opacity: 1; }
.jb-sheet.open .jb-sheet-panel { transform: translateY(0); }
@media (min-width: 640px) {
  .jb-sheet { align-items: center; }
  .jb-sheet-panel { border-radius: 16px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .4s var(--jb-spring), opacity .25s ease; }
  .jb-sheet.open .jb-sheet-panel { transform: none; opacity: 1; }
  .jb-grabber { display: none; }
}
.jb-grabber { width: 2.3rem; height: .3rem; border-radius: 3px; background: rgba(235, 235, 245, .3); margin: .45rem auto 0; }
.jb-sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: .7rem 1rem .5rem;
}
.jb-sheet-head h2 { margin: 0; font-size: 1.06rem; font-weight: 600; font-family: var(--jb-sys); letter-spacing: -.01em; }
.jb-text-btn {
  justify-self: start; appearance: none; border: 0; background: none; padding: .25rem 0;
  font: inherit; font-size: 1.06rem; color: #ff6b84; cursor: pointer;
}
.jb-search {
  display: flex; align-items: center; gap: .4rem; margin: .2rem 1rem .6rem;
  background: rgba(118, 118, 128, .24); border-radius: 10px; padding: .45rem .6rem;
}
.jb-search svg { width: 1rem; height: 1rem; color: var(--jb-label); flex-shrink: 0; }
.jb-search input {
  flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.06rem;
  color: var(--cw-text); outline: none;
}
.jb-search input::placeholder { color: var(--jb-label); }
.jb-search input::-webkit-search-cancel-button { filter: invert(.6); }
.jb-sheet-list { overflow-y: auto; padding: 0 1rem 1.25rem; overscroll-behavior: contain; }
.jb-sheet-list .jb-section-label { margin-top: 1.1rem; }
.jb-sheet-list .jb-group { background: rgba(255, 255, 255, .06); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.jb-device-row .jb-phone { width: 1.85rem; height: 1.85rem; color: var(--jb-label); flex-shrink: 0; }
.jb-device-row .jb-check { width: 1rem; height: 1rem; color: #ff6b84; visibility: hidden; }
.jb-device-row[aria-selected="true"] .jb-check { visibility: visible; }
.jb-empty { text-align: center; color: var(--jb-label); padding: 2rem 0 1rem; font-size: .95rem; }

/* Result */
.jb-result { margin: 1.4rem 0 0; }
.jb-result:empty { display: none; }
.jb-result-card {
  background: var(--jb-surface); border-radius: 22px; padding: 1.3rem 1.2rem 1.25rem;
  -webkit-backdrop-filter: saturate(160%) blur(24px); backdrop-filter: saturate(160%) blur(24px);
  box-shadow: 0 0 0 .5px var(--jb-hair), 0 30px 70px rgba(0, 0, 0, .4);
  animation: jb-pop .55s var(--jb-spring) both;
}
@keyframes jb-pop {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.jb-verdict { display: flex; gap: .9rem; align-items: flex-start; }
.jb-badge {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: #fff;
}
.jb-badge svg { width: 1.35rem; height: 1.35rem; }
.jb-badge.yes { background: var(--jb-green); box-shadow: 0 0 24px rgba(48, 209, 88, .35); }
.jb-badge.wait { background: var(--jb-orange); box-shadow: 0 0 24px rgba(255, 159, 10, .3); }
.jb-badge.info { background: #636366; }
.jb-verdict h2 {
  margin: .05rem 0 0; font-family: var(--cw-font-display); font-size: 1.45rem; font-weight: 700;
  letter-spacing: -.03em; line-height: 1.15; color: var(--cw-text);
}
.jb-verdict p { margin: .35rem 0 0; color: var(--cw-muted); font-size: .98rem; line-height: 1.5; }
.jb-verdict strong { color: var(--cw-text); font-weight: 600; }

.jb-steps { list-style: none; margin: 1.25rem 0 0; padding: 0; counter-reset: jb; }
.jb-steps li {
  counter-increment: jb; position: relative; padding: .8rem 0 .8rem 2.6rem;
  border-top: .5px solid var(--jb-hair);
}
.jb-steps li::before {
  content: counter(jb); position: absolute; left: 0; top: .78rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--cw-accent-soft); color: #ff8fa0; font-weight: 700; font-size: .9rem;
}
.jb-steps strong { display: block; color: var(--cw-text); font-weight: 600; font-size: 1.02rem; }
.jb-steps span { display: block; color: var(--cw-muted); font-size: .93rem; margin-top: .15rem; line-height: 1.5; }
.jb-steps a { text-decoration: underline; text-underline-offset: 2px; }
.jb-note {
  display: flex; gap: .55rem; align-items: flex-start; margin: .35rem 0 0; padding: .75rem .85rem;
  border-radius: 12px; background: var(--jb-surface-2); color: var(--cw-muted); font-size: .9rem; line-height: 1.5;
}
.jb-note svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; margin-top: .1rem; color: var(--jb-label); }
.jb-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.1rem 0 0; }
.jb .btn { font-family: var(--jb-sys); border-radius: 12px; }
.jb .btn svg { width: 1rem; height: 1rem; margin-left: .35rem; }

/* CarterWare on this iPhone */
.jb-fit { margin: 1.35rem 0 0; padding-top: 1.1rem; border-top: .5px solid var(--jb-hair); }
.jb-fit h3 { margin: 0; font-family: var(--cw-font-display); font-size: 1.08rem; letter-spacing: -.02em; color: var(--cw-text); }
.jb-fit > p { margin: .3rem 0 0; color: var(--cw-muted); font-size: .92rem; }
.jb-apps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem .5rem; margin: 1rem 0 0;
}
@media (min-width: 520px) { .jb-apps { grid-template-columns: repeat(6, 1fr); } }
.jb-app { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
body.cw-site a.jb-app { color: var(--cw-text); }
.jb-app img {
  width: 3.6rem; height: 3.6rem; border-radius: 22.5%; display: block;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35); transition: transform .3s var(--jb-spring);
}
a.jb-app:hover img { transform: translateY(-3px) scale(1.04); }
.jb-app span { font-size: .74rem; line-height: 1.2; color: var(--cw-text); }
.jb-app small { font-size: .68rem; color: var(--jb-label); line-height: 1.2; }
.jb-app.off img { filter: grayscale(1) brightness(.55); box-shadow: none; }
.jb-app.off span { color: var(--jb-label); }

/* Before you start */
.jb-tips { margin: 2.4rem 0 0; }
.jb-tips .jb-group { box-shadow: 0 0 0 .5px var(--jb-hair); }
.jb-tip { display: flex; gap: .85rem; align-items: flex-start; padding: .85rem 1rem; position: relative; }
.jb-tip + .jb-tip::before { content: ""; position: absolute; top: 0; right: 0; left: 3.65rem; height: .5px; background: var(--jb-hair); }
.jb-tip .jb-row-icon { margin-top: .1rem; }
.jb-tip .jb-row-icon.orange { background: linear-gradient(180deg, #ffb340, var(--jb-orange)); }
.jb-tip .jb-row-icon.blue { background: linear-gradient(180deg, #4aa3ff, #0a84ff); }
.jb-tip .jb-row-icon.green { background: linear-gradient(180deg, #5be37f, var(--jb-green)); }
.jb-tip strong { display: block; font-weight: 600; color: var(--cw-text); }
.jb-tip div > span { display: block; color: var(--cw-muted); font-size: .92rem; margin-top: .1rem; line-height: 1.5; }

.jb-add { margin: 2.4rem 0 0; }
.jb-add .jb-group { padding: 1.1rem 1rem 1.15rem; }
.jb-add h2 { margin: 0; font-family: var(--cw-font-display); font-size: 1.2rem; letter-spacing: -.02em; }
.jb-add p { margin: .35rem 0 0; color: var(--cw-muted); font-size: .95rem; }
.jb-url {
  display: flex; align-items: center; gap: .5rem; margin: .85rem 0 0; padding: .6rem .7rem .6rem .85rem;
  border-radius: 10px; background: var(--jb-surface-2); font-family: ui-monospace, Menlo, monospace; font-size: .9rem;
}
.jb-url code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cw-text); }
.jb-copy {
  appearance: none; border: 0; background: rgba(255, 255, 255, .1); color: var(--cw-text); cursor: pointer;
  font: inherit; font-family: var(--jb-sys); font-size: .82rem; font-weight: 600; padding: .35rem .7rem; border-radius: 8px;
}
.jb-copy:hover { background: rgba(255, 255, 255, .16); }
.jb-done { color: #ff8fa0; background: var(--cw-accent-soft); }
.jb-done:hover { background: rgba(228, 0, 43, .28); }

.jb-faq { margin-top: 2.4rem; }
.jb-faq h2 { font-family: var(--cw-font-display); font-size: 1.1rem; color: #ff6b84; letter-spacing: -.02em; margin: 0 0 .5rem; }
.jb-faq details p { color: var(--cw-muted); font-family: var(--cw-font-body); }
.jb-checked { margin: 1.5rem 0 0; color: var(--jb-label); font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
  .jb-result-card, .jb-sheet-panel, .jb-sheet-backdrop, .jb-wheel-wrap, .jb-chevron, .jb-app img { animation: none !important; transition: none !important; }
}
