/* Phone Guide - application shell (technician UI). The replica phones are styled in ios.css / android.css / apps.css */
:root {
  --bg: #ebe9e3; --panel: #fbfaf7; --ink: #151a21; --muted: #68707c; --line: #ddd9cf;
  --accent: #0b7a85; --accent-ink: #fff; --accent-soft: #dff0f1; --hint: #ff4a3d; --ok: #1f8a4c; --warn: #c2700a;
  --top: #111a22; --radius: 10px;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-size: 14px; }
button { font: inherit; cursor: pointer; }
svg.ic { width: 1em; height: 1em; display: block; }

/* ---------- top bar ---------- */
.top { height: 52px; background: var(--top); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b { font-size: 17px; letter-spacing: .2px; }
.brand small { color: #94a3b8; font-size: 12px; }
.devsw { display: flex; background: #1e293b; border-radius: 10px; padding: 3px; gap: 2px; }
.devsw button { background: transparent; border: 0; color: #cbd5e1; padding: 6px 16px; border-radius: 8px; font-weight: 600; }
.devsw button.on { background: #fff; color: var(--top); }
.grow { flex: 1; }
.tbtn { background: #1e293b; border: 1px solid #334155; color: #e2e8f0; padding: 6px 12px; border-radius: 8px; }
.tbtn.on { background: #3b2a45; border-color: #ff2d6f; color: #ffd1e1; }
.tbtn:hover { filter: brightness(1.15); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 430px 1fr; height: calc(100vh - 52px); }
.panel { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 14px; overflow: hidden;
  background: radial-gradient(1200px 600px at 50% 0%, #f7f9fc, #e3e8f0); }

/* ---------- where-am-I card ---------- */
.where { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.where h6 { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; font-size: 14px; font-weight: 600; }
.crumbs span { white-space: nowrap; }
.crumbs span + span::before { content: "\203A"; color: #94a3b8; margin: 0 6px; font-weight: 400; }
.crumbs span:last-child { color: var(--accent); }
.tip { margin-top: 8px; font-size: 13px; line-height: 1.45; color: #334155; }
.tip:empty { display: none; }
.badge { display: inline-block; font-size: 10.5px; padding: 2px 7px; border-radius: 99px; background: #fff3d6; color: #92580a; border: 1px solid #f5d79a; font-weight: 600; letter-spacing: .02em; text-transform: none; }

/* ---------- tabs ---------- */
.ptabs { display: flex; border-bottom: 1px solid var(--line); }
.ptabs button { flex: 1; background: none; border: 0; padding: 11px 6px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.ptabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pbody { flex: 1; overflow-y: auto; padding: 14px 16px 30px; min-height: 0; }
.search { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; margin-bottom: 12px; background: #fff; }
.search:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.catname { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; display: flex; justify-content: space-between; }
.card { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; display: block; }
.card:hover { border-color: var(--accent); background: #fafcff; }
.card b { display: block; font-size: 14px; margin-bottom: 2px; }
.card small { color: var(--muted); font-size: 12.5px; line-height: 1.35; display: block; }
.empty { color: var(--muted); padding: 24px 6px; text-align: center; }
.hit { display: flex; gap: 10px; align-items: flex-start; }
.hit .kind { flex: none; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: #eef2ff; color: #3730a3; margin-top: 2px; }
.hit .kind.el { background: #ecfdf5; color: #065f46; }
.hit .path { color: var(--muted); font-size: 12px; margin-top: 2px; }
.help h4 { margin: 18px 0 6px; font-size: 13px; }
.help p, .help li { font-size: 13px; line-height: 1.5; color: #334155; }
.help ul { padding-left: 18px; margin: 6px 0; }
.help kbd { background: #f1f5f9; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 12px; }

/* ---------- guide runner ---------- */
.runner { display: none; flex-direction: column; min-height: 0; flex: 1; }
.panel.running .runner { display: flex; }
.panel.running .ptabs, .panel.running .pbody { display: none; }
.rhead { padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.rhead .cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.rhead h2 { margin: 2px 0 4px; font-size: 16px; line-height: 1.25; }
.rhead .x { float: right; background: #f1f5f9; border: 0; border-radius: 8px; padding: 4px 10px; color: var(--muted); font-weight: 600; }
.prog { height: 5px; background: #e2e8f0; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }
.rctl { flex: none; padding: 10px 16px 0; border-bottom: 1px solid var(--line); background: #fff; }
.rbody { flex: 1; overflow-y: auto; padding: 12px 16px 24px; min-height: 0; }
.now { background: var(--accent-soft); border: 1px solid #c3d4ff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.now .n { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.now .say { font-size: 17px; line-height: 1.4; font-weight: 500; }
.now .say b { color: #0b3aa8; background: #fff; padding: 0 5px; border-radius: 5px; border: 1px solid #c3d4ff; }
.now .say code { background: #fff; padding: 1px 6px; border-radius: 5px; border: 1px solid #c3d4ff; font-size: 14px; }
.now.done { background: #ecfdf5; border-color: #a7f3d0; }
.now.done .n { color: var(--ok); }
.nav2 { display: flex; gap: 8px; margin: 10px 0 8px; }
.nav2 button { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.nav2 button.primary { background: var(--accent); color: #fff; border-color: var(--accent); flex: 1; }
.nav2 button:disabled { opacity: .4; cursor: default; }
.offtrack { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; display: none; font-size: 13px; align-items: center; gap: 10px; }
.offtrack.on { display: flex; }
.offtrack button { margin-left: auto; background: #ea580c; color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 600; white-space: nowrap; }
.toolrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.toolrow button { background: #f1f5f9; border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: #334155; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; background: #fff; }
.box h5 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.box ul { margin: 0; padding-left: 18px; line-height: 1.5; }
.box.tips { background: #fffbeb; border-color: #fde68a; }
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.steps li { counter-increment: s; display: flex; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px; line-height: 1.4; align-items: flex-start; }
ol.steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0; color: #475569; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
ol.steps li:hover { background: #f8fafc; }
ol.steps li.cur { background: var(--accent-soft); }
ol.steps li.cur::before { background: var(--accent); color: #fff; }
ol.steps li.done { color: #94a3b8; }
ol.steps li.done::before { content: "\2713"; background: #dcfce7; color: var(--ok); }
ol.steps li.note { font-style: italic; color: #475569; }
ol.steps li.bad::before { background: #fee2e2; color: #b91c1c; }
ol.steps b { font-weight: 700; }
ol.steps code { background: #f1f5f9; padding: 0 4px; border-radius: 4px; }

/* ---------- stage / phone shell ---------- */
.phonewrap { position: relative; flex: none; }
.phone { position: absolute; left: 0; top: 0; transform-origin: top left; background: #0a0a0c; box-shadow: 0 0 0 2px #2a2a30 inset, 0 30px 60px rgba(15, 23, 42, .35), 0 6px 14px rgba(15, 23, 42, .25); }
.dev-iphone .phone { border-radius: 58px; padding: 12px; }
.dev-ipad .phone { border-radius: 42px; padding: 18px; }
.dev-android .phone { border-radius: 46px; padding: 11px; }
.screen { position: relative; overflow: hidden; background: #fff; isolation: isolate; }
.dev-iphone .screen { border-radius: 46px; --sb: 54px; }
.dev-ipad .screen { border-radius: 24px; --sb: 26px; }
.dev-android .screen { border-radius: 36px; --sb: 38px; }
.stageinner { position: absolute; inset: 0; }
.layer { position: absolute; inset: 0; isolation: isolate; }
.layer.below { pointer-events: none; }
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: var(--sb); z-index: 60; display: flex; align-items: center; justify-content: space-between; font-weight: 600; pointer-events: none; color: #000; }
.statusbar.light { color: #fff; }
.dev-iphone .statusbar { padding: 6px 30px 0 38px; font-size: 16px; }
.dev-ipad .statusbar { padding: 0 26px; font-size: 13px; }
.dev-android .statusbar { padding: 0 26px; font-size: 14px; font-weight: 500; }
.sbicons { display: flex; gap: 6px; align-items: center; }
.sbicons svg { width: 18px; height: 18px; }
.island { position: absolute; top: 11px; left: 50%; width: 118px; height: 34px; border-radius: 20px; background: #000; transform: translateX(-50%); z-index: 61; }
.dev-ipad .island { display: none; }
.punch { position: absolute; top: 11px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: #000; transform: translateX(-50%); z-index: 61; display: none; }
.dev-android .punch { display: block; }
.dev-android .island { display: none; }
.homebar { position: absolute; bottom: 7px; left: 50%; width: 140px; height: 5px; border-radius: 3px; background: #000; transform: translateX(-50%); z-index: 62; opacity: .85; }
.dev-android .homebar { width: 110px; height: 4px; bottom: 9px; }
.dev-ipad .homebar { width: 160px; bottom: 6px; }
.hot { position: absolute; z-index: 70; cursor: pointer; border-radius: 10px; }
.hot:hover { background: rgba(37, 99, 235, .18); outline: 2px dashed rgba(37, 99, 235, .8); }
.hot[data-zone="bottom"] { left: 24%; right: 24%; bottom: 0; height: 26px; }
.hot[data-zone="tr"] { top: 0; right: 0; width: 34%; height: 30px; }
.hot[data-zone="top"] { top: 0; left: 15%; right: 15%; height: 26px; }
.hot[data-zone="edge"] { left: 0; top: 34%; width: 14px; height: 32%; }
.hot[data-zone="mid"] { left: 20%; right: 20%; top: 46%; height: 54px; display: none; }
.hot.active { display: block !important; }

.ring { position: absolute; z-index: 90; pointer-events: none; border: 3px solid var(--hint); border-radius: 14px; box-shadow: 0 0 0 5px rgba(255, 45, 111, .22); animation: pulse 1.15s ease-in-out infinite; display: none; }
.ring .tag { position: absolute; left: 50%; top: -28px; transform: translateX(-50%); background: var(--hint); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.ring .tag.below { top: auto; bottom: -28px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 45, 111, .28); } 50% { box-shadow: 0 0 0 11px rgba(255, 45, 111, .05); } }
.scrollhint { position: absolute; left: 50%; transform: translateX(-50%); z-index: 91; background: var(--hint); color: #fff; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 99px; display: none; pointer-events: none; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); animation: bob 1s ease-in-out infinite; }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: 5px; } }
.toast { position: absolute; left: 14px; right: 14px; bottom: 54px; z-index: 95; background: rgba(15, 23, 42, .92); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 13px; text-align: center; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

.devctl { flex: none; display: flex; gap: 8px; margin-top: 12px; }
.devctl button { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 600; color: #334155; display: flex; align-items: center; gap: 6px; }
.devctl button:hover { border-color: var(--accent); color: var(--accent); }
.devctl svg { width: 16px; height: 16px; }
.devnote { flex: none; margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- modal (about) ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.on { display: flex; }
.modal .sheet { background: #fff; width: min(640px, 92vw); max-height: 86vh; overflow: auto; border-radius: 16px; padding: 22px 26px; }
.modal h3 { margin: 0 0 8px; }
.modal .close { float: right; }

#printSheet { display: none; }
@media print {
  body > *:not(#printSheet) { display: none !important; }
  #printSheet { display: block; padding: 10mm; color: #000; font-size: 12pt; }
  #printSheet h1 { font-size: 18pt; margin: 0 0 4mm; }
  #printSheet ol { padding-left: 6mm; } #printSheet li { margin: 2mm 0; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .panel { max-height: 55vh; }
  .stage { min-height: 100vh; }
}

/* phone-only view (#solo) - handy for screen sharing */
body.solo .top, body.solo .panel { display: none; }
body.solo .layout { grid-template-columns: 1fr; height: 100vh; }

/* caption chip: which handset / OS version is on screen */
.profchip { flex: none; margin-top: 10px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 12px; line-height: 1.35; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.profchip b { display: block; font-size: 13px; } .profchip span { color: var(--muted); }
.profchip.old { background: #fff7e6; border-color: #f5d79a; } .profchip.old b { color: #92580a; }
.profchip.sam { background: #eef4ff; border-color: #c3d4ff; }
.notch { display: none; }
.hwb { position: absolute; left: 50%; bottom: 20px; width: 46px; height: 46px; margin-left: -23px; border: 3px solid #6f7686; border-radius: 50%; cursor: pointer; z-index: 3; }
.hwb:hover { background: rgba(255, 255, 255, .12); border-color: #9aa3b5; }
.hwb.active { border-color: var(--hint); animation: pulse 1.15s ease-in-out infinite; }


/* ---------- redesign overrides ---------- */
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
code, kbd { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; }
.top { height: 56px; gap: 20px; padding: 0 20px; border-bottom: 3px solid var(--accent); }
.layout { height: calc(100vh - 56px); grid-template-columns: 420px 1fr; }
.brand { align-items: center; gap: 12px; }
.brand::before { content: ""; width: 26px; height: 26px; background: url(../favicon.svg) center/contain no-repeat; }
.brand b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.brand small { color: #8b98a6; font-size: 12px; }
.devsw { background: #1b2733; padding: 3px; border-radius: 9px; }
.devsw button { color: #aab6c3; padding: 6px 15px; border-radius: 7px; font-weight: 500; transition: background .15s, color .15s; }
.devsw button:hover { color: #fff; }
.devsw button.on { background: var(--accent); color: #fff; }
.verwrap { display: flex; align-items: center; gap: 8px; color: #8b98a6; font-size: 12px; }
.verwrap select { background: #1b2733; color: #e6ecf2; border: 1px solid #2f3f4f; border-radius: 8px; padding: 6px 8px; font: inherit; }
.tbtn { background: #1b2733; border: 1px solid #2f3f4f; color: #dde5ec; border-radius: 8px; font-weight: 500; }
.tbtn.on { background: #3a1f22; border-color: var(--hint); color: #ffd6d2; }
.panel { background: var(--panel); }
.where { background: #f3f1ea; padding: 16px 20px 14px; }
.where h6 { font-weight: 600; letter-spacing: .1em; }
.crumbs { font-size: 15px; font-weight: 600; }
.ptabs button { font-weight: 500; padding: 12px 6px; }
.ptabs button.on { font-weight: 600; }
.pbody { padding: 16px 20px 32px; }
.search { border-radius: 8px; padding: 10px 12px; background: #fff; }
.catname { font-weight: 600; }
.card { border-radius: var(--radius); padding: 11px 14px; transition: border-color .12s, transform .12s, box-shadow .12s; }
.card:hover { background: #fff; box-shadow: 0 2px 10px rgba(21,26,33,.08); transform: translateY(-1px); }
.card b { font-weight: 600; }
.stage { background: radial-gradient(circle at 1px 1px, rgba(21,26,33,.10) 1px, transparent 0) 0 0/18px 18px, #e4e1d8; }
.phone { box-shadow: 0 0 0 2px #2a2a30 inset, 0 40px 70px rgba(21,26,33,.32), 0 8px 18px rgba(21,26,33,.22); }
.devctl { gap: 6px; padding: 4px; background: #fbfaf7; border: 1px solid var(--line); border-radius: 12px; }
.devctl button { border: 0; background: transparent; border-radius: 8px; font-weight: 500; }
.devctl button:hover { background: var(--accent-soft); color: var(--accent); }
.profchip { background: #fbfaf7; box-shadow: none; }
.now { border-color: #b4d9dc; border-radius: 12px; }
.now .say b { color: #06555d; border-color: #b4d9dc; }
.now .say code { border-color: #b4d9dc; }
.rhead h2 { font-weight: 600; }
.nav2 button { border-radius: 9px; font-weight: 500; }
.nav2 button.primary { font-weight: 600; }
.modal .sheet { border-radius: 14px; }

.top > *, .tbtn, .devsw button, .devctl button, .catname, .where h6, .brand b { white-space: nowrap; }
.top { overflow: hidden; }
@media (max-width: 1200px) { .brand small, .verwrap span { display: none; } }
@media (max-width: 980px) {
  .top { gap: 10px; padding: 0 10px; }
  .brand::before { display: none; }
  .devsw button { padding: 6px 10px; }
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .panel { max-height: 55vh; }
  .stage { min-height: 100vh; }
}

/* ---------- left panel refinement ---------- */
.panel { box-shadow: 1px 0 0 var(--line), 6px 0 24px rgba(21,26,33,.04); z-index: 2; }
.where { position: relative; padding: 14px 20px 14px 24px; background: #f3f1ea; }
.where::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; background: var(--accent); }
.where h6 { margin-bottom: 4px; color: var(--accent); font-size: 10.5px; }
.crumbs { font-size: 16px; line-height: 1.3; letter-spacing: -.005em; }
.crumbs span { font-weight: 500; color: var(--muted); }
.crumbs span:last-child { color: var(--ink); font-weight: 600; }
.crumbs span + span::before { content: "/"; color: #b9b4a6; margin: 0 7px; }
.tip { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #d6d1c3; font-size: 12.5px; color: #4b535e; }
.ptabs { padding: 0 12px; gap: 4px; background: var(--panel); }
.ptabs button { flex: none; padding: 12px 12px; font-size: 13.5px; }
.ptabs button:hover { color: var(--ink); }
.ptabs button:last-child { margin-left: auto; }
.pbody { padding: 0 0 32px; scroll-behavior: smooth; }
.pbody > .search, .pbody > #gq, .pbody > #fq { position: sticky; top: 0; z-index: 3; width: calc(100% - 32px); margin: 0 16px; }
.search { padding: 10px 12px 10px 36px; font-size: 13.5px; border-color: var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2368707c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='M14 14l4 4'/%3E%3C/svg%3E") 12px center/15px no-repeat; }
.pbody > #gq, .pbody > #fq { box-shadow: 0 0 0 10px var(--panel), 0 10px 0 6px var(--panel); }
.search:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pbody > #gq:focus, .pbody > #fq:focus { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 10px var(--panel); }
.catname { position: sticky; top: 56px; z-index: 2; margin: 0; padding: 18px 20px 8px; background: var(--panel); color: var(--muted); font-size: 10.5px; }
.catname span:last-child { background: #ece9e0; color: #4b535e; border-radius: 99px; padding: 0 8px; font-size: 10.5px; line-height: 17px; letter-spacing: 0; }
.pbody > .card { width: calc(100% - 32px); margin: 0 16px 6px; }
.card { position: relative; padding: 11px 34px 11px 14px; background: #fff; }
.card::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-top: 2px solid #b9b4a6; border-right: 2px solid #b9b4a6; transform: translateY(-50%) rotate(45deg); transition: right .12s, border-color .12s; }
.card:hover { border-color: var(--accent); transform: none; }
.card:hover::after { right: 11px; border-color: var(--accent); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.card b { font-size: 13.5px; line-height: 1.3; }
.card small { margin-top: 2px; }
.hit .kind { background: #e6eefc; color: #2446a0; border-radius: 4px; letter-spacing: .05em; }
.hit .kind.el { background: #dff0f1; color: #06555d; }
.empty { padding: 40px 28px; font-size: 13px; line-height: 1.55; }
.help { padding: 4px 20px; }
.help h4 { margin-top: 20px; font-size: 13px; }

/* runner */
.rhead { padding: 14px 20px 12px; background: #f3f1ea; }
.rhead .x { padding: 5px 10px; border-radius: 7px; background: #fff; border: 1px solid var(--line); font-size: 12px; }
.rhead .x:hover { color: var(--ink); border-color: var(--muted); }
.rhead .cat { font-size: 10.5px; }
.rhead h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 4px 0 2px; }
.prog { height: 4px; background: #ddd9cf; margin-top: 10px; }
.rctl { padding: 14px 20px 0; box-shadow: 0 6px 12px -8px rgba(21,26,33,.18); position: relative; z-index: 1; background: var(--panel); }
.now { padding: 14px 16px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; }
.now .n { color: #bfe6e9; }
.now .say { font-size: 17px; line-height: 1.4; font-weight: 500; }
.now .say b { background: rgba(255,255,255,.18); color: #fff; border: 0; padding: 0 6px; }
.now .say code { background: rgba(255,255,255,.18); color: #fff; border: 0; }
.now.done { background: var(--ok); } .now.done .n { color: #d3f5df; }
.nav2 { gap: 6px; margin: 12px 0 10px; }
.nav2 button { padding: 10px 14px; background: #fff; }
.nav2 button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.nav2 button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.nav2 button.primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.toolrow { gap: 4px; padding-bottom: 12px; margin: 0; }
.toolrow button { background: transparent; color: var(--muted); padding: 5px 9px; }
.toolrow button:hover { background: #ece9e0; color: var(--ink); }
.rbody { padding: 14px 20px 28px; }
.box { background: #fff; border-radius: 10px; }
.box h5 { font-weight: 600; }
.box.tips { background: #fff8e8; border-color: #f0dba6; }
ol.steps { position: relative; }
ol.steps li { padding: 8px 10px; border-radius: 8px; }
ol.steps li::before { background: #ece9e0; color: #4b535e; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; }
ol.steps li.cur { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
ol.steps li.cur::before { background: var(--accent); }
ol.steps li.done { color: #9aa0a9; }
ol.steps li.done::before { background: #dcf3e5; }
.pbody::-webkit-scrollbar, .rbody::-webkit-scrollbar { width: 10px; }
.pbody::-webkit-scrollbar-thumb, .rbody::-webkit-scrollbar-thumb { background: #d3cfc3; border-radius: 6px; border: 3px solid var(--panel); }

.ptabs button { white-space: nowrap; }
@media (max-width: 980px) { .panel { max-height: 60vh; } }

.box.srcs { background: var(--accent-soft); border-color: transparent; margin-top: 12px; } .box.srcs a { color: var(--accent); text-decoration: none; } .box.srcs a:hover { text-decoration: underline; }

.legal { flex: none; margin-top: 4px; padding: 0 16px 8px; max-width: 760px; font-size: 11px; line-height: 1.4; color: var(--muted); text-align: center; } .legal a { color: var(--accent); }

.wxchip { flex: none; margin-top: 4px; background: transparent; border: 0; color: var(--muted); font-size: 11.5px; cursor: pointer; padding: 2px 8px; border-radius: 8px; } .wxchip:hover { background: rgba(0,0,0,.06); color: var(--accent); }

#screen { touch-action: none; } #screen input, #screen textarea { touch-action: auto; } #screen.swiping, #screen.swiping * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
#swipeDot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255,255,255,.35); border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.25); pointer-events: none; z-index: 220; display: none; }

/* Easter egg: Doom overlay inside the phone screen - phone turned sideways (body.doomland), layer counter-rotated */
body.doomland .panel { display: none; } body.doomland .layout { grid-template-columns: 1fr; } body.doomland .legal, body.doomland .wxchip, body.doomland .devnote { display: none; }
#doomLayer { position: absolute; z-index: 300; background: #0b0b0b; color: #ddd; display: flex; flex-direction: row; font-family: system-ui, sans-serif; overflow: hidden; }
#doomLayer .dm-stage { position: relative; height: 100%; aspect-ratio: 4 / 3; background: #000; flex: none; } #doomHost { position: absolute; inset: 0; } #doomHost .dos-js, #doomHost > div { width: 100%; height: 100%; }
#doomLayer .dm-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font-size: 14px; color: #bbb; }
#doomLayer .dm-side { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 16px; } #doomLayer .dm-top { display: flex; align-items: baseline; gap: 10px; } #doomLayer .dm-top b { color: #c00; font-size: 22px; letter-spacing: 2px; } #doomLayer .dm-top small { color: #888; flex: 1; font-size: 12px; }
#doomLayer .dm-x { background: #222; color: #ddd; border: 1px solid #444; border-radius: 8px; width: 34px; height: 30px; cursor: pointer; font-size: 15px; }
#doomLayer .dm-help { padding-top: 14px; font-size: 14px; line-height: 1.7; color: #aaa; } #doomLayer .dm-help b { color: #ddd; } #doomLayer .dm-help small { color: #666; display: block; margin-top: 14px; font-size: 11px; line-height: 1.45; }
.card.egg { border-color: #c00; }

.egghint { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; opacity: .8; }

.stage { padding-top: 28px; }

/* short windows: free vertical room for the phone */
@media (max-height: 820px) { .devnote, .profchip span { display: none; } .legal, .wxchip { margin-top: 0; } .stage { padding-top: 22px; padding-bottom: 8px; } }
/* first card / heading must not sit under the sticky search box's mask (it extends 16px below the input) */
.pbody > #gq, .pbody > #fq { margin-bottom: 20px; }

/* rotate button on the phone itself (outside the scaled phone, always the same size) */
.rotbtn { position: absolute; right: -46px; top: 50%; margin-top: -20px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(21,26,33,.18); z-index: 5; }
.rotbtn svg { width: 22px; height: 22px; } .rotbtn:hover, .rotbtn.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.devctl #btnRot.on { background: var(--accent-soft); }
#doomLayer.port { flex-direction: column; } #doomLayer.port .dm-stage { height: auto; width: 100%; } #doomLayer.port .dm-side { padding: 18px; }

/* ======================= landscape: phones turned sideways (.screen.land) ======================= */
.screen.land { --sb: 26px; }
.dev-iphone .screen.land { --sb: 28px; }
.screen.land .statusbar { padding: 0 22px; font-size: 13px; }
.dev-iphone .screen.land { background: #000; }
.dev-iphone .screen.land #layers { left: 46px; }                       /* keep content clear of the Dynamic Island (now on the left) */
.dev-iphone .screen.land .statusbar { left: 46px; padding: 0 22px 0 14px; }
.dev-iphone .screen.land .island { top: 50%; left: 11px; width: 34px; height: 118px; transform: translateY(-50%); }
.ios-legacy.dev-iphone .screen.land #layers { left: 34px; } .ios-legacy.dev-iphone .screen.land .statusbar { left: 34px; }
.ios-legacy.dev-iphone .screen.land .notch { top: 50%; left: 0; width: 31px; height: 160px; margin: -80px 0 0 0; border-radius: 0 20px 20px 0; }
.dev-android .screen.land .punch { top: 50%; left: 12px; transform: translateY(-50%); }
.screen.land .homebar { width: 130px; bottom: 5px; }
/* iPhone home screen: widget on the left, icons in 6 columns, dock under the icons */
.screen.land .ios-home { padding: calc(var(--sb) + 6px) 24px 0; }
.screen.land .ios-home .wid { position: absolute; left: 24px; top: calc(var(--sb) + 10px); width: 190px; margin: 0; } .screen.land .ios-home .widget { display: block; min-width: 0; }
.screen.land .ios-home .hgrid { grid-template-columns: repeat(6, 1fr); gap: 10px 4px; margin: 0 0 0 226px; }
.screen.land .ios-home .aicon { width: 50px; height: 50px; border-radius: 12px; } .screen.land .ios-home .aicon svg { width: 28px; height: 28px; } .screen.land .ios-home .alab { font-size: 10.5px; }
.screen.land .ios-home .dock { bottom: 12px; left: 226px; right: 24px; padding: 8px 6px; border-radius: 26px; } .screen.land .ios-home .hdots, .screen.land .ios-home .hsearch { display: none; }
.dev-android .screen.land { background: #000; } .dev-android .screen.land #layers { left: 30px; } .dev-android .screen.land .statusbar { left: 30px; padding-left: 14px; }
.dev-android .screen.land .punch { left: 8px; }
/* landscape: screens that were laid out for a tall phone */
.screen.land .apbtns.apq2 { position: static; padding-top: 6px; } .screen.land .ap-s.apreq .scroll { padding-bottom: 12px; }
.screen.land .cwwm { padding: 16px 0 16px; } .screen.land .cwsign { position: static; margin: 12px 0 0; }
.screen.land .layer.sheet > .sheetbox:has(.ap-s.apdev) { top: calc(var(--sb) - 4px); height: auto; }
.dev-android .screen.land .layer.sheet .ap-s.apdev { top: 0; height: auto; border-radius: 0; } .dev-android .screen.land .layer.sheet .ap-s.apreq { padding-top: var(--sb); }
.screen.land .ap-splash { padding-top: 80px; } .screen.land .ap-s.splash .apbtns { bottom: 22px; }
.screen.land .ap-cam, .screen.land .ap-scan { min-height: 0; } .screen.land .ap-scan { margin: calc(var(--sb) + 4px) 14px 12px; } .screen.land .ap-scan .viewfinder.sq { margin-top: 14px; width: 200px; height: 200px; } .screen.land .ap-scan p { margin-top: 4px; }
.screen.land .ap-hero { padding: 6px 30px 14px; } .screen.land .ap-hero h2 { margin: 8px 0 4px; font-size: 24px; } .screen.land .ap-logo { width: 64px; height: 64px; }
.screen.land .apshield { display: none; } .screen.land .apq { font-size: 21px; margin: 4px 8px 6px; } .screen.land .apchip { margin-bottom: 8px; padding: 4px 14px; } .screen.land .apcard { padding: 6px 12px; margin: 5px 0; } .screen.land .apcard b { font-size: 15px; } .screen.land .apxrow { padding-top: 2px; }
body.doomland .rotbtn { display: none; }
#hots[data-home="0"] .hot[data-zone="up"] { display: none; }
/* landscape: anything taller than the short screen must scroll, and the last rows must clear the bottom swipe strip */
.screen.land .drawer-panel { overflow-y: auto; } .screen.land .adlg { max-height: 90%; overflow-y: auto; }
.screen.land .scroll { padding-bottom: 36px; }
.screen.land .qs, .screen.land .sqs { max-height: calc(100% - 34px); overflow-y: auto; scrollbar-width: none; }
.screen.land .qs-wrap .scrim, .screen.land .sqs-wrap .scrim { top: auto; bottom: 0; height: 34px; }
.screen.land .cc-wrap { overflow-y: auto; }
/* AuthPoint footer (countdown + bottom bar) is part of the layout, not an overlay, so scrolled content is never hidden behind it */
.apfoot { position: static; flex: none; background: #ececec; } .ap-s.tokpg .scroll { padding: 6px 0 14px; } .screen.land .apfoot { padding-bottom: 10px; }
.screen.land .dlgf.tall { max-height: none; overflow: visible; }
.screen.land .qs-wrap .scrim, .screen.land .sqs-wrap .scrim { bottom: 30px; }
.screen.land .qs, .screen.land .sqs { max-height: calc(100% - 68px); }
.island, .notch, .punch { pointer-events: none; }

.rhead .trust { font-size: 11px; line-height: 1.35; opacity: .72; margin: 2px 0 6px; }
/* landscape: OpenVPN Connect (Android) "Get connected" pages scroll so BROWSE / NEXT stay reachable; iPhone Control Center keeps a strip to tap outside */
.screen.land .ovg .ovbody { overflow-y: auto; } .screen.land .ovg .ovup { padding-top: 6px; } .screen.land .ovg .ovfilei { width: 70px; height: 84px; margin-bottom: 10px; } .screen.land .ovg .ovup p { font-size: 15px; }
.screen.land .cc-wrap { display: flex; flex-direction: column; } .screen.land .cc-wrap .cc { flex: none; } .screen.land .cc-wrap .scrim { position: relative; inset: auto; flex: 1 0 34px; width: 100%; }
/* the header got a fifth phone button (Motorola): hide the long subtitle sooner and tighten the buttons so About never clips */
@media (max-width: 1560px) { .brand small { display: none; } }
@media (max-width: 1380px) { .devsw button { padding: 6px 11px; } .verwrap span { display: none; } .top { gap: 12px; } }
