/* Keybay: the web iOS kit (src/ioskit/ios.css) in harbour blue on the system grouped grey, plus the gate (first run and
   the lock screen), the tab bar, the code rows with their countdown rings, tiles, the scanner, the password maker and
   the QR transfer. The accent (--au-l light, --au-d dark) is set from Settings › Colour (Pro). */
:root { --au-l: #2a64d6; --au-d: #6c9dff; --tint: var(--au-l); --forest: var(--au-l); --coral: var(--au-l); --canvas: #f2f2f7; --tabbar-space: calc(var(--sab, 0px) + 104px); --code: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tint: var(--au-d); --forest: var(--au-d); --coral: var(--au-d); --canvas: #000; --code: #fff; } }
:root[data-theme="dark"] { --tint: var(--au-d); --forest: var(--au-d); --coral: var(--au-d); --canvas: #000; --code: #fff; }
body { background: var(--canvas); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #04122e; } }
:root[data-theme="dark"] .btn-primary { color: #04122e; }
.au-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: none; }
.mono, .mono-field .field { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0; }
.mono-field .field { text-transform: uppercase; }
.mono-field .field::placeholder { text-transform: none; }

/* ---------- the gate ---------- */
.gate { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: var(--grouped); -webkit-overflow-scrolling: touch; }
.gate-in { min-height: 100%; display: flex; flex-direction: column; padding: calc(var(--sat, 0px) + 8px) max(16px, var(--sar, 0px)) calc(var(--sab, 0px) + 28px) max(16px, var(--sal, 0px)); box-sizing: border-box; }
.gate-top { display: flex; justify-content: space-between; align-items: center; max-width: 560px; width: 100%; margin: 0 auto; }
.gate-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--tint); text-decoration: none; font-weight: 600; font-size: 16px; }
.gate-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; margin: 0 auto; }
.gate-wait { text-align: center; color: var(--text2); }
.gate-form { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 12px; }
.gate-form.narrow { max-width: 420px; width: 100%; margin: 0 auto; }
.gate-form .group { margin: 6px 0 0; }
.gate-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 4px 6px 6px; }
.gate-ico { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 82%, #fff), var(--tint)); color: #fff; font-size: 38px; box-shadow: 0 10px 28px color-mix(in srgb, var(--tint) 35%, transparent); }
.gate-ico.warn { background: linear-gradient(160deg, #ffb340, #ff8a00); box-shadow: 0 10px 28px rgba(255, 140, 0, .3); }
.gate-title { font: 700 28px/1.12 var(--sys); letter-spacing: -0.02em; margin: 6px 0 0; }
.gate-sub { margin: 0; color: var(--text2); font-size: 16px; line-height: 21px; max-width: 420px; }
.gate-points { list-style: none; margin: 6px 0 0; padding: 14px 16px; border-radius: 18px; background: var(--row); display: flex; flex-direction: column; gap: 12px; }
.gate-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 20px; }
.gate-points li > .au-ico { font-size: 24px; color: var(--tint); margin-top: -1px; }
.gate-points.tight { background: none; padding: 0; text-align: left; }
.gate-points.tight li { display: list-item; list-style: disc; margin-left: 20px; }
.gate-err { margin: 0; min-height: 0; color: var(--red); font-size: 14px; line-height: 19px; text-align: center; }
.gate-err:empty { display: none; }
.gate-alt { display: flex; justify-content: center; }
.gate-alt .text-btn, .empty-acts .text-btn { min-height: 44px; padding: 0 10px; color: var(--tint); font-size: 16px; }
.warn-store { padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--red) 10%, var(--row)); }
.understand { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--row); font-size: 15px; line-height: 20px; cursor: pointer; }
.understand input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--tint); }
.pk-btn { background: var(--row); color: var(--tint); }
.pk-btn .au-ico { font-size: 22px; }
.shake { animation: au-shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes au-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
body.gated .tabbar { display: none; }
.privacy { position: fixed; inset: 0; z-index: 60; background: var(--grouped); opacity: 0; pointer-events: none; }
.privacy.on { opacity: 1; }

/* ---------- tabs (Stitchbay's floating glass bar) ---------- */
#stack .tab-pane { position: absolute; inset: 0; }
#stack .screen-body { padding-bottom: var(--tabbar-space); }
.tabbar { position: absolute; z-index: 10; left: 50%; bottom: calc(var(--sab, 0px) + 16px); transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 92px); padding: 4px; border-radius: 34px;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 8px 30px rgba(0, 0, 0, 0.14); --i: 0; }
.tab-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 92px; border-radius: 30px; background: var(--fill); transform: translateX(calc(var(--i) * 100%)); transition: transform 0.38s var(--ease); }
.tab-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 54px; border-radius: 30px; color: var(--text); }
.tab-item.on { color: var(--tint); }
.tab-icon { width: 26px; height: 26px; display: grid; place-items: center; font-size: 26px; }
.tab-label { font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0.01em; }
.tab-item:active .tab-icon { transform: scale(0.92); }
body.has-sheet .tabbar { visibility: hidden; }
@media (min-width: 700px) {
  .tabbar { bottom: auto; top: calc(var(--sat, 0px) + 8px); grid-template-columns: repeat(3, 128px); padding: 3px; border-radius: 26px; }
  .tab-pill { top: 3px; bottom: 3px; left: 3px; width: 128px; border-radius: 22px; }
  .tab-item { flex-direction: row; gap: 6px; height: 44px; border-radius: 22px; }
  .tab-icon { width: 20px; height: 20px; font-size: 20px; }
  .tab-label { font-size: 15px; line-height: 20px; }
  #stack .screen-body { padding-bottom: calc(var(--sab, 0px) + 32px); }
}
@media (max-height: 460px) and (orientation: landscape) and (max-width: 699px) {
  .tabbar { bottom: calc(var(--sab, 0px) + 8px); grid-template-columns: repeat(3, 110px); }
  .tab-item { flex-direction: row; gap: 6px; height: 40px; }
  .tab-pill { width: 110px; }
  .tab-icon { width: 20px; height: 20px; font-size: 20px; }
  .tab-label { font-size: 13px; }
  :root { --tabbar-space: calc(var(--sab, 0px) + 64px); }
}

/* ---------- screens ---------- */
.wrap { padding: 0 16px 24px; max-width: 720px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.au-wide { max-width: 760px; margin: 0 auto; }
.big-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 4px 10px; }
.big-title { font: 700 34px/1.1 var(--sys); letter-spacing: -0.025em; margin: 0; }
.screen .navbar .nav-title.hidden-title { visibility: hidden; }
.screen .navbar.scrolled .nav-title.hidden-title { visibility: visible; }
@media (min-width: 700px) { #stack .screen.tab-root .navbar .nav-title { visibility: hidden !important; } }
.search-field { margin: 0 0 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill2); color: var(--text); font-size: 15px; font-weight: 500; }
.chip.on { background: var(--tint); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { color: #04122e; } }
:root[data-theme="dark"] .chip.on { color: #04122e; }
.pro-tag { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); vertical-align: 2px; }
.fine { color: var(--text2); font-size: 13px; line-height: 18px; margin: 12px 6px 0; text-align: center; }
.sheet-lede { color: var(--text2); font-size: 15px; line-height: 20px; margin: 6px 4px 4px; }
.warn-line { margin: 10px 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 12%, var(--row)); font-size: 14px; line-height: 19px; }
.warn-line .sf { color: var(--orange); }
.go-wrap { padding: 14px 4px 4px; }
.go-wrap .btn-primary:disabled { opacity: .45; }

/* the nudge to back up */
.nudge { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 0 0 12px; border-radius: 18px; background: var(--row); box-shadow: 0 0 0 0.5px var(--hairline, transparent); }
.nudge-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); font-size: 20px; flex: none; }
.nudge b { display: block; font-size: 16px; }
.nudge.danger .nudge-ico { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.nudge p { margin: 2px 0 0; color: var(--text2); font-size: 13px; line-height: 17px; }

/* empty states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 10px 10px; }
.empty-art { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 46px; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, var(--row)); margin-bottom: 8px; }
.empty h3 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.empty p { margin: 0 0 8px; color: var(--text2); font-size: 15px; line-height: 20px; max-width: 420px; }
.empty-acts { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; margin-top: 8px; }
.btn-secondary { background: var(--row); color: var(--tint); }
.btn-primary .au-ico, .btn-secondary .au-ico { font-size: 22px; }

/* tiles */
.tile { --ts: 40px; width: var(--ts); height: var(--ts); border-radius: calc(var(--ts) * 0.27); flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tile) 78%, #fff), var(--tile)); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
.tile-letter { font: 700 calc(var(--ts) * 0.46)/1 var(--rounded); letter-spacing: -0.02em; }
.tile-glyph { width: 58%; height: 58%; }

/* ---------- code rows ---------- */
.codes-list .row.code-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; width: 100%; padding: 12px 8px 12px 14px; min-height: 76px; text-align: left; background: var(--row); color: var(--text); position: relative; transition: background .2s; }
.code-row:active { background: var(--fill2); }
.code-row.copied { animation: au-flash .6s ease-out; }
.code-row.fresh { animation: au-flash 1.2s ease-out; }
@keyframes au-flash { 0% { background: color-mix(in srgb, var(--tint) 22%, var(--row)); } 100% { background: var(--row); } }
.cc-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.cc-name { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.cc-issuer { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 70%; }
.cc-acct { color: var(--text2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cc-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.cc-code { font: 600 30px/1.15 var(--rounded); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--tint); white-space: nowrap; }
.low .cc-code { color: var(--red); }
.cc-next { font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ring-wrap { position: relative; width: 34px; height: 34px; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--fill); stroke-width: 3.2; }
.ring-fg { fill: none; stroke: var(--tint); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .2s linear, stroke .3s; }
.low .ring-fg { stroke: var(--red); }
.ring-s { position: relative; font: 600 12px/1 var(--rounded); color: var(--text2); font-variant-numeric: tabular-nums; }
.ring-wrap.small { width: 18px; height: 18px; display: inline-grid; vertical-align: -3px; }
.ring-wrap.big { width: 40px; height: 40px; }
.more-btn, .hotp-next, .grip { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--text2); font-size: 20px; margin-right: -4px; cursor: pointer; }
.hotp-next { color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent); width: 38px; height: 38px; }
.more-btn:hover, .hotp-next:hover { background: var(--fill2); }
.grip { cursor: grab; touch-action: none; font-size: 22px; }
.ordering .code-row { cursor: default; }
.code-row.dragging { z-index: 3; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: none; }
.ordering .code-row:not(.dragging) { transition: transform .18s var(--ease); }
@media (max-width: 380px) { .cc-code { font-size: 26px; } .codes-list .row.code-row { gap: 10px; padding-left: 12px; } }

/* a code's or login's own screen */
.detail-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 4px 10px; }
.dh-name { font-size: 22px; font-weight: 700; margin-top: 6px; overflow-wrap: anywhere; }
.dh-sub { color: var(--text2); font-size: 15px; overflow-wrap: anywhere; }
.dh-code { display: inline-flex; align-items: center; gap: 14px; margin-top: 8px; padding: 8px 18px; min-height: 60px; border-radius: 20px; background: var(--row); }
.dh-code.static { background: none; }
.dh-code .cc-code { font-size: 40px; }
.dh-next { min-height: 18px; }
.secret-row .lc-value { font-size: 15px; }
.icon-row { padding-top: 12px; padding-bottom: 12px; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.ip { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.ip.on { box-shadow: 0 0 0 2px var(--tint); }
.colour-pick { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.cp { width: 30px; height: 30px; border-radius: 50%; background: var(--c); position: relative; }
.cp::after { content: ""; position: absolute; inset: -7px; }
.cp.on { box-shadow: 0 0 0 2px var(--row), 0 0 0 4px var(--c); }
.fico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 13%, transparent); color: var(--tint); font-size: 22px; }
.fico.check { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.has-code { color: var(--tint); font-size: 18px; display: grid; }
.pw-line { gap: 6px; }
.pw-copy { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; min-width: 0; text-align: left; color: var(--text); }
.pw-copy .lc-value { overflow-wrap: anywhere; text-align: right; }
.eye { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--tint); font-size: 22px; flex: none; margin-right: -8px; }
.pw-edit { gap: 6px; }
.pw-edit .field { flex: 1; }
.code-line .cc-code { font-size: 20px; }
.code-line { flex-wrap: wrap; }
.code-line .cc-next { width: 100%; text-align: right; }
.site-link { color: var(--tint); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 20px; padding-top: 12px; padding-bottom: 12px; }
a.about-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); text-decoration: none; min-height: 44px; }
a.about-row .label { display: inline-flex; align-items: center; gap: 12px; color: var(--tint); }
a.about-row .label .au-ico { font-size: 20px; }
a.about-row .chev { color: var(--text3); }
.accent-row { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.accents { display: flex; gap: 6px; }
.acc { width: 30px; height: 30px; border-radius: 50%; background: var(--c); position: relative; }
.acc::after { content: ""; position: absolute; inset: -7px; }
.acc.on { box-shadow: 0 0 0 2px var(--row), 0 0 0 4px var(--c); }

/* the strength meter (Lockbox's) */
.meter { padding-top: 10px; padding-bottom: 10px; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .25s var(--ease), background .25s; }
.meter-w { line-height: 18px; }
.made { gap: 10px; align-items: center; }
.made-pw { display: block; font: 600 17px/1.35 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* scanning */
.scan-box { position: relative; margin: 8px 0 0; border-radius: 22px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 58vh; width: 100%; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 14%; pointer-events: none; }
.scan-frame i { position: absolute; width: 30px; height: 30px; border: 4px solid #fff; border-radius: 4px; }
.scan-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scan-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scan-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scan-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scan-status { text-align: center; color: var(--text2); font-size: 15px; line-height: 20px; margin: 12px 8px; min-height: 40px; }
.scan-alt { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
details.howto { display: block; padding-top: 12px; padding-bottom: 12px; }
details.howto summary { cursor: pointer; font-weight: 600; min-height: 24px; list-style: none; display: flex; justify-content: space-between; }
details.howto summary::after { content: "›"; color: var(--text3); transform: rotate(90deg); transition: transform .2s; }
details.howto[open] summary::after { transform: rotate(270deg); }
details.howto summary::-webkit-details-marker { display: none; }
details.howto p { margin: 8px 0 0; color: var(--text2); font-size: 15px; line-height: 20px; }
.sum-hero { display: flex; flex-direction: column; align-items: center; padding: 12px 0 4px; }
.sum-n { font: 700 54px/1 var(--rounded); color: var(--tint); }
.sum-t { color: var(--text2); font-size: 16px; text-align: center; margin-top: 4px; }

/* the password maker */
.gen-out { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px 16px; margin: 8px 0 4px; border-radius: 20px; background: var(--row); }
.gen-pw { font: 600 21px/1.35 ui-monospace, "SF Mono", Menlo, monospace; text-align: center; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; color: var(--text); }
.gen-meta { display: flex; gap: 8px; align-items: center; color: var(--text2); font-size: 14px; }
.gen-dot { width: 10px; height: 10px; border-radius: 50%; }
.gen-btns { display: flex; gap: 8px; }
.seg-wrap { padding: 8px 0 2px; }
.slider-row { gap: 12px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--tint); min-height: 44px; }
.slider-v { width: 28px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* the password check */
.score { display: flex; gap: 16px; align-items: center; padding: 14px 6px 8px; }
.score-ring { --p: 0; width: 78px; height: 78px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--tint) calc(var(--p) * 1%), var(--fill) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--grouped); }
.score-ring b { position: relative; font: 700 26px/1 var(--rounded); }
.score-t { font-size: 20px; font-weight: 700; }
.score p { margin: 2px 0 0; font-size: 14px; }

/* moving codes */
.warn-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 6px; }
.warn-hero h2 { margin: 4px 0 0; font-size: 22px; line-height: 27px; font-weight: 700; }
.warn-hero .btn-primary { margin-top: 10px; max-width: 380px; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; margin-top: 8px; border-radius: 22px; background: var(--row); }
.qr-name { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 17px; max-width: 100%; }
.qr-name > span:last-child { overflow-wrap: anywhere; }
.big-qr { width: min(320px, 78vw); height: auto; image-rendering: pixelated; border-radius: 10px; background: #fff; }
.qr-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 360px; }
.qr-count { color: var(--text2); font-variant-numeric: tabular-nums; }
.prose h3 { margin: 18px 4px 4px; font-size: 17px; }
.prose p { margin: 0 4px; color: var(--text2); font-size: 15px; line-height: 21px; }

/* larger tap areas without changing the look (44 px at 390 × 844 and 844 × 390) */
.btn-bordered.size-small { min-height: 34px; position: relative; }
.btn-bordered.size-small::after { content: ""; position: absolute; inset: -5px -2px; }
.text-btn { position: relative; }
@media (prefers-reduced-motion: reduce) { .ring-fg, .tab-pill, .meter-fill { transition: none; } .shake, .code-row.copied, .code-row.fresh { animation: none; } }

/* ---------- not losing your codes: the Home Screen step and banner, the backup step, Settings' status, the printed sheet ---------- */
body.gated #sheets { z-index: 35; }   /* the Home Screen steps open over the setup screen */
.nudge.strong .nudge-ico { color: #fff; background: var(--orange); }
.nudge-ico.tint { color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); }
.nudge .bordered { flex: none; }
.nudge-x { flex: none; width: 44px; height: 44px; margin: -8px -10px -8px -6px; display: grid; place-items: center; border-radius: 50%; color: var(--text3); font-size: 15px; }
.nudge-x:active { background: var(--fill, rgba(120, 120, 128, .16)); }
.gate-form .home-card { margin: 4px 0 0; }
.step-sheet .form { padding-bottom: 28px; }
.home-step { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 auto; }
.home-step .warn-hero { padding: 8px 6px 0; }
.step-lede { margin: 0; color: var(--text2); font-size: 16px; line-height: 21px; max-width: 440px; }
.home-step .gate-points { margin: 0; }
.home-step .gate-points li > .icon, .home-step .gate-points li > svg { font-size: 22px; color: var(--tint); flex: none; margin-top: -1px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--row); }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; font-size: 15px; line-height: 20px; }
.steps li + li { border-top: 0.5px solid var(--sep); }
.steps li i { font-style: normal; flex: none; width: 24px; height: 24px; margin-top: -1px; border-radius: 50%; background: var(--tint); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.share-ico { display: inline-grid; place-items: center; width: 24px; height: 22px; margin: 0 2px; vertical-align: -5px; color: var(--tint); font-size: 18px; }
.step-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--tint) 10%, var(--row)); color: var(--text); font-size: 14px; line-height: 19px; }
.step-note > svg { flex: none; color: var(--tint); font-size: 18px; margin-top: 1px; }
.step-note p { margin: 0; }
.stat-row .lc-value, .stat-line .lc-value { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; text-align: right; }
.stat-row .lc-value > svg, .stat-line .lc-value > svg { flex: none; font-size: 15px; }
.lc-value.good > svg { color: var(--green); }
.lc-value.bad { color: var(--orange); }
.lc-value.bad > svg { color: var(--orange); }
.stat-row .lc-label { flex: none; }
a.about-row .label-text.two { display: flex; flex-direction: column; align-items: flex-start; color: var(--tint); }
.row-sub { font-size: 13px; line-height: 17px; color: var(--text2); font-weight: 400; }
a.about-row { padding-top: 8px; padding-bottom: 8px; }

/* the printed recovery sheet: a sheet of paper shown over the app, the only thing printed while it's open */
.ps-root { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; background: color-mix(in srgb, var(--grouped) 70%, #777); color: #111; }
.ps-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--sat, 0px) + 8px) max(12px, var(--sar, 0px)) 8px max(12px, var(--sal, 0px)); background: var(--row); color: var(--text); box-shadow: 0 0.5px 0 var(--sep); }
.ps-bar-t { font-weight: 600; font-size: 17px; }
.ps-btn { min-height: 44px; min-width: 64px; padding: 0 14px; border-radius: 22px; color: var(--tint); font-size: 17px; }
.ps-btn.prominent { background: var(--tint); color: #fff; font-weight: 600; }
.ps-btn .label { display: inline-flex; gap: 6px; align-items: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ps-btn.prominent { color: #04122e; } }
:root[data-theme="dark"] .ps-btn.prominent { color: #04122e; }
.ps-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 18px max(10px, var(--sar, 0px)) calc(var(--sab, 0px) + 28px) max(10px, var(--sal, 0px)); }
.ps-page { box-sizing: border-box; width: 100%; max-width: 186mm; margin: 0 auto; padding: 12mm 11mm; background: #fff; color: #111; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font: 10.5pt/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color-scheme: light; }
.ps-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; border-bottom: 1.5pt solid #111; }
.ps-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.ps-title b { font-size: 16pt; letter-spacing: -0.01em; }
.ps-title span { color: #444; font-size: 9.5pt; }
.ps-warn { border: 1.5pt solid #111; border-radius: 6px; padding: 7px 10px; font-size: 10.5pt; background: #fff4e5; }
.ps-how { margin: 8px 0 10px; color: #333; font-size: 9pt; }
.ps-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.ps-card { display: flex; gap: 3.5mm; align-items: flex-start; padding: 3mm; border: 0.75pt solid #999; border-radius: 4px; break-inside: avoid; page-break-inside: avoid; min-width: 0; }
.ps-qr { flex: none; width: 30mm; height: 30mm; image-rendering: pixelated; }
.ps-info { min-width: 0; flex: 1; }
.ps-info h3 { margin: 0; font-size: 11.5pt; line-height: 1.2; overflow-wrap: anywhere; }
.ps-acct { margin: 1px 0 4px; color: #333; font-size: 9pt; overflow-wrap: anywhere; }
.ps-k { margin: 0; }
.ps-k span, .ps-note > span { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .06em; color: #555; }
.ps-k code { display: block; font: 600 10pt/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.ps-meta { margin: 3px 0 0; color: #444; font-size: 8pt; }
.ps-note { margin-top: 4px; }
.ps-note pre, .ps-login pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 9pt/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.ps-logins h2 { font-size: 12pt; margin: 6mm 0 2mm; padding-top: 2mm; border-top: 0.75pt solid #999; }
.ps-logins { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 4mm; }
.ps-logins h2 { grid-column: 1 / -1; }
.ps-login { break-inside: avoid; page-break-inside: avoid; padding: 2.5mm 3mm; border: 0.75pt solid #999; border-radius: 4px; min-width: 0; }
.ps-login h3 { margin: 0 0 2px; font-size: 11pt; }
.ps-login dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; font-size: 9pt; }
.ps-login dt { color: #555; }
.ps-login dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ps-login dd code { font: 600 9.5pt ui-monospace, "SF Mono", Menlo, Consolas, monospace; word-break: break-all; }
.ps-foot { margin-top: 6mm; padding-top: 2mm; border-top: 0.75pt solid #bbb; color: #555; font-size: 8pt; }
@media (max-width: 560px) {
  .ps-page { padding: 18px 14px; font-size: 10pt; }
  .ps-codes, .ps-logins { grid-template-columns: 1fr; }
}
@media print {
  @page { size: auto; margin: 12mm; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  body.au-printing > *:not(#au-print) { display: none !important; }
  body.au-printing #au-print { position: static; display: block; background: #fff; }
  body.au-printing .ps-bar { display: none; }
  body.au-printing .ps-scroll { overflow: visible; padding: 0; }
  body.au-printing .ps-page { max-width: none; padding: 0; box-shadow: none; border-radius: 0; }
  body.au-printing .ps-codes { grid-template-columns: 1fr 1fr; }
  body.au-printing .ps-logins { grid-template-columns: 1fr 1fr; }
  .ps-warn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 480px) { .nudge { padding: 10px 12px; gap: 10px; } .nudge b { font-size: 15px; line-height: 19px; } .nudge-ico { width: 34px; height: 34px; font-size: 18px; } }
.ps-info h3, .ps-login h3 { font-weight: 700; }
.ps-logins h2 { font-weight: 700; }
.ps-note pre, .ps-login pre { overflow-wrap: break-word; }
.ps-bar-t { flex: 1; text-align: center; }
.ps-bar .ps-btn:first-child { text-align: left; }
.ps-root:focus { outline: none; }
.stat-line .lc-value { margin-left: auto; } .stat-line .lc-label { flex: none; }
@media (max-height: 500px) {
  .home-step { gap: 10px; }
  .home-step .warn-hero { padding-top: 0; gap: 4px; }
  .home-step .warn-hero .gate-ico { display: none; }
  .home-step .warn-hero h2 { font-size: 20px; line-height: 24px; }
  .step-lede { font-size: 14px; line-height: 18px; }
  .home-step .gate-points { padding: 10px 14px; gap: 8px; }
  .home-step .gate-points li { font-size: 14px; line-height: 18px; }
}
