/* =========================================================*
*   SHAYNAH OS*
*   One shared palette for every app: ink outlines, paper*
*   surfaces, coral for anything held or important.*
*========================================================= */
:root {
  --ink: #1A1413;
  --paper: #FFF8F3;
  --paper-2: #F6ECE5;
  --coral: #EF6F6C;
  --coral-soft: #FDE3DD;
  --soft: #6A5F5B;
  --green: #4E9E72;
  --ok: #4E9E72;
  --gold: #E8C547;
  --blue: #C8D9FF;
  --purple: #A99BE8;
  --mint: #A9DEC0;
  --butter: #F5D98A;
  --stone: #E4DCD6;
  --error: #C2413E;
  --mb-h: 0rem; /* no top bar */
  --task-h: 3rem;
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: #F4A58F;
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--error); text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }
/* =========================================================*
*   STARTUP LOADER*
*========================================================= */
#startup-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background-color: #F4A58F;
  background-image:
    repeating-linear-gradient(30deg, rgba(255,255,255,.22) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(150deg, rgba(255,255,255,.12) 0 1px, transparent 1px 20px);
  transition: opacity .5s ease, visibility .5s ease;
}
#startup-loader.is-fadeout { opacity: 0; visibility: hidden; pointer-events: none; }
.load-iso-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: min(380px, 90vw);
  padding: 2.5rem;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
  text-align: center;
}
.iso-logo {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--coral);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  font: 800 1.8rem var(--mono);
  animation: isoPulse 1.2s ease-in-out infinite;
}
@keyframes isoPulse { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.1) rotate(3deg); } }
:where(.loader-copy) h1 { margin: 0 0 .3rem; font: 700 1.2rem var(--mono); }
:where(.loader-copy) p { margin: 0; color: var(--soft); font: .85rem var(--mono); }
/* Progress bar follows the desktop loader; mobile overrides it to 2 seconds. */
.load-bar {
  position: relative;
  width: 100%;
  height: .8rem;
  padding: 2px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
:where(.load-bar) span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transform: none;
  will-change: width;
}
/* =========================================================*
*   CURSOR: a paper arrow, coral over anything clickable*
*========================================================= */
@media (pointer: fine) {
  html, body, .desktop, .taskbar { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3v21l5.5-5.2 4 8.6 4-1.9-4-8.4H22L5 3z' fill='%23FFF8F3' stroke='%231A1413' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, auto; }
  button, a, select, label[for], .skill-chip, .invoice, .recycle-row, .task-app, .task-tool, .task-start { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3v21l5.5-5.2 4 8.6 4-1.9-4-8.4H22L5 3z' fill='%23EF6F6C' stroke='%231A1413' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, pointer; }
  input, textarea { cursor: text; }
  :root { --cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3v21l5.5-5.2 4 8.6 4-1.9-4-8.4H22L5 3z' fill='%23EF6F6C' stroke='%231A1413' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, pointer; --cursor-grab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M10.5 27L5.6 19.6a1.9 1.9 0 0 1 3-2.3L11 20V8a1.75 1.75 0 0 1 3.5 0v6V6a1.75 1.75 0 0 1 3.5 0v8V7a1.75 1.75 0 0 1 3.5 0v7.5V10a1.75 1.75 0 0 1 3.5 0v9c0 4.5-2.8 8-7.5 8z' fill='%23FFF8F3' stroke='%231A1413' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") 15 14, grab; --cursor-grabbing: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M9 27l-2.6-5.5a1.9 1.9 0 0 1 3-2L11 21v-7a1.75 1.75 0 0 1 3.5 0v2v-3a1.75 1.75 0 0 1 3.5 0v3v-2.5a1.75 1.75 0 0 1 3.5 0v3v-1.5a1.75 1.75 0 0 1 3.5 0v5c0 4-2.8 7-7.5 7z' fill='%23FDE3DD' stroke='%231A1413' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") 15 16, grabbing; }
}
/* =========================================================*
*   CLICK SPARKLES*
*========================================================= */
#sparkle-layer { position: fixed; inset: 0; z-index: 999999; pointer-events: none; overflow: hidden; }
.cursor-spark {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.4);
  animation: sparkleBurst 520ms cubic-bezier(.18, .75, .3, 1) forwards;
}
.cursor-spark::before, .cursor-spark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--spark-color);
  border-radius: 999px;
}
.cursor-spark::before { width: 100%; height: 2px; }
.cursor-spark::after { width: 2px; height: 100%; }
@keyframes sparkleBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) translate(0, 0) scale(.2) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1) rotate(110deg); }
}
/* =========================================================*
*   DESKTOP*
*========================================================= */
.desktop {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  padding: calc(var(--mb-h) + 1.25rem) 1.25rem calc(var(--task-h) + 1.35rem);
  overflow: hidden;
  background:
    repeating-linear-gradient(30deg, rgba(255,255,255,.16) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(150deg, rgba(255,255,255,.16) 0 1px, transparent 1px 46px),
    linear-gradient(160deg, #FAD3C0 0%, #F4A58F 50%, #EF7B6F 100%);
  background-attachment: fixed;
}
.widget { display: none; }
/* =========================================================*
*   DESKTOP ICONS: five to a column, top to bottom*
*========================================================= */
.icons {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, 5.75rem);
  grid-auto-columns: 7.8rem;
  gap: .25rem .5rem;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Keep five-icon columns comfortable on shorter laptop screens. */
@media (min-width: 761px) and (max-height: 760px) {
  .icons {
    grid-template-rows: repeat(5, 5.2rem);
    gap: .15rem .5rem;
  }
}
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  width: 100%;
  padding: .4rem .2rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
}
.icon:hover { background: rgba(255,248,243,.18); border-color: rgba(26,20,19,.12); }
.icon.is-selected { background: rgba(255,248,243,.32); border-color: rgba(26,20,19,.28); }
:where(.icon) svg {
  width: 3.05rem;
  height: 3.05rem;
  transition: transform .15s ease, filter .15s ease;
  filter: drop-shadow(2px 3px 0 rgba(26,20,19,.12));
}
:where(.icon:hover) svg { transform: translateY(-3px) rotate(-3deg); }
:where(.icon:active) svg { transform: scale(.92); }
/* Long names wrap onto two lines instead of getting cut off */
a.icon, a.icon:hover, a.icon > span:last-child { color: var(--ink); text-decoration: none; }
.icon > span:last-child {
  max-width: 100%;
  padding: .05rem .4rem;
  border-radius: 4px;
  background: var(--paper);
  font: 500 .7rem/1.3 var(--mono);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* =========================================================*
*   MASCOT: celebrates when a trophy unlocks*
*========================================================= */
.bot {
  position: fixed;
  right: 7.2rem;
  bottom: calc(var(--task-h) + 1.4rem);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 58px;
  height: 50px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: var(--cursor-pointer, pointer);
  transition: transform .15s ease;
}
.bot:hover { transform: translateY(-3px); }
.eye { position: relative; width: 12px; height: 15px; border-radius: 6px; background: var(--ink); overflow: hidden; animation: blink 5s infinite; }
.pupil { position: absolute; top: 4px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); transition: transform .08s linear; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* Two quick hops for Pip's first greeting. */
.bot.is-greeting { animation: botGreetingHop .72s ease-in-out; }
@keyframes botGreetingHop {
  0%, 100% { transform: translateY(0); }
  18% { transform: translateY(-15px); }
  34% { transform: translateY(0); }
  55% { transform: translateY(-11px); }
  72% { transform: translateY(0); }
}
/* Jump and spin when a trophy unlocks */
.bot.is-celebrating { animation: celebrate .9s cubic-bezier(.3, 1.4, .5, 1); background: var(--gold); }
@keyframes celebrate {
  0% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-26px) rotate(-12deg) scale(1.08); }
  55% { transform: translateY(-26px) rotate(348deg) scale(1.08); }
  80% { transform: translateY(0) rotate(360deg) scale(.96, 1.04); }
  100% { transform: translateY(0) rotate(360deg); }
}
/* A comic-style speech bubble with a tail pointing at the bot */
.bubble {
  position: absolute;
  right: -6px;
  bottom: calc(100% + 18px);
  width: max-content;
  max-width: 15.5rem;
  padding: .65rem .9rem;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  font: 500 .88rem/1.4 var(--sans);
  text-align: left;
  opacity: 0;
  transform: scale(.6);
  transform-origin: 85% 120%;
  pointer-events: none;
  transition: opacity .18s ease, transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.bubble::before, .bubble::after {
  content: "";
  position: absolute;
  right: 28px;
  width: 0;
  height: 0;
  border-style: solid;
}
.bubble::before { /* outline of the tail */
  bottom: -16px;
  border-width: 16px 14px 0 0;
  border-color: var(--ink) transparent transparent transparent;
}
.bubble::after { /* fill of the tail */
  bottom: -10.5px;
  right: 31px;
  border-width: 11px 9px 0 0;
  border-color: var(--paper) transparent transparent transparent;
}
.bubble.is-on { opacity: 1; transform: none; }
/* =========================================================*
*   WINDOWS*
*========================================================= */
.window {
  width: min(var(--w, 34rem), calc(100vw - 2rem));
  margin: 1.5rem 0;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}
.js .window {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  max-height: calc(100vh - var(--task-h) - 1.75rem);
  margin: 0;
}
.js .window.is-open { display: flex; }
.js .window.is-minimized { display: none; }
.window.is-focused { box-shadow: 9px 9px 0 var(--ink), 0 18px 40px rgba(71,38,33,.18); }
.window:not(.is-focused) .win-bar { filter: saturate(.72); }
.win-bar {
  display: flex;
  align-items: center;
  flex: none;
  gap: .55rem;
  padding: .42rem .45rem .42rem .85rem;
  border-bottom: 2px solid var(--ink);
  background: var(--c);
  cursor: var(--cursor-grab, grab);
  touch-action: none;
  user-select: none;
  transition: filter .18s ease;
}
.win-bar:active { cursor: var(--cursor-grabbing, grabbing); }
.win-title { margin: 0; font: 700 .85rem var(--mono); }
.win-min, .win-close {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  line-height: 1;
  cursor: var(--cursor-pointer, pointer);
}
.win-min { margin-left: auto; font-size: 1rem; }
.win-close { font-size: 1.1rem; }
.win-min:hover, .win-close:hover { background: var(--ink); color: var(--paper); }
.js .window.is-opening { animation: windowIn .31s cubic-bezier(.18, .89, .32, 1.18); transform-origin: 30% 15%; }
.js .window.is-closing { display: flex; animation: windowOut .15s cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
@keyframes windowIn {
  0% { opacity: 0; transform: translateY(18px) scale(.88) rotate(-.8deg); }
  65% { opacity: 1; transform: translateY(-2px) scale(1.012) rotate(.2deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes windowOut { to { opacity: 0; transform: translateY(13px) scale(.94); } }
/* =========================================================*
*   TABS AND WINDOW BODY*
*========================================================= */
.win-tabs {
  display: flex;
  align-items: flex-end;
  flex: none;
  padding: 0;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-2);
  overflow-x: auto;
  overflow-y: hidden;
}
.win-tab {
  flex: 0 0 auto;
  margin-bottom: -2px;
  padding: .45rem .8rem;
  border: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  background: none;
  font: 500 .8rem var(--mono);
  cursor: var(--cursor-pointer, pointer);
}
.win-tab:first-child { border-left: 0; border-top-left-radius: 0; }
.win-tab[aria-selected="true"] { border-color: var(--ink); border-bottom-color: var(--paper); background: var(--paper); font-weight: 700; }
.win-body { flex: 1 1 auto; min-height: 0; padding: 1.1rem 1.25rem 1.3rem; overflow-y: auto; }
.win-body > :first-child { margin-top: 0; }
:where(.win-body) h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; }
.win-body .tab-panel > h3:first-child { margin-top: 0; }
:where(.win-body) p { margin: 0 0 .8rem; }
.lede { font-size: 1.08rem; font-weight: 500; }
.label { display: block; margin: 1rem 0 .4rem; color: var(--soft); font: 500 .75rem var(--mono); }
.fine { color: var(--soft); font-size: .85rem; }
/* =========================================================*
*   README*
*========================================================= */
.readme-body {
  background: var(--paper);
}

.readme-intro {
  position: relative;
  margin: -.1rem 0 1.15rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: #FFF8F3;
  box-shadow: 5px 5px 0 #E8D0B5;
}

.readme-heading-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  margin-bottom: .85rem;
}

.win-body .readme-hi {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
}

.win-body .readme-hi::after {
  content: "";
  position: absolute;
  left: 0;
  right: 7%;
  bottom: -.34rem;
  height: .28rem;
  border-radius: 999px;
  background: #F4A9A0;
  transform: rotate(-.5deg);
}

.readme-rays {
  position: relative;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2rem;
  margin: -.18rem 0 0 .18rem;
}

.readme-rays::before,
.readme-rays::after {
  content: "";
  position: absolute;
  width: .27rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #F0B84A;
}

.readme-rays::before {
  top: .05rem;
  left: .55rem;
  transform: rotate(20deg);
}

.readme-rays::after {
  top: .7rem;
  left: 1.3rem;
  height: .9rem;
  transform: rotate(62deg);
}

.readme-intro .lede {
  margin-top: 1.15rem;
}

.readme-intro p:last-child {
  margin-bottom: 0;
}

.readme-explore-mobile {
  display: none;
}

.readme-start {
  margin: 1rem 0;
}

.readme-start-heading {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 0 0 .75rem;
}

.readme-start-heading h3 {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding: .45rem .82rem .48rem;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: #F5F1C9;
  box-shadow: 4px 4px 0 #E8D0B5;
  font-size: 1.28rem;
  line-height: 1;
}

.readme-start-heading h3::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  bottom: -.5rem;
  width: .72rem;
  height: .72rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #F5F1C9;
  transform: rotate(45deg);
}

.readme-start-heading > span {
  flex: 1 1 auto;
  height: 2px;
  background: var(--ink);
  opacity: .9;
}

.readme-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.readme-project {
  --readme-card: #F5E9F6;
  display: grid;
  grid-template-columns: 4.5rem minmax(0,1fr) 1.7rem;
  gap: .9rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: .8rem .9rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--readme-card);
  box-shadow: 5px 5px 0 #E8D0B5;
  color: var(--ink);
  text-align: left;
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease, box-shadow .12s ease;
}

.readme-project:hover {
  transform: translate(-1px,-2px);
  box-shadow: 6px 7px 0 #E8D0B5;
}

.readme-project:active {
  transform: translate(2px,2px);
  box-shadow: 2px 2px 0 #E8D0B5;
}

.readme-project-label {
  --readme-card: #F3EBF8;
}

.readme-project-billing {
  --readme-card: #F8F3D8;
}

.readme-project-jobs {
  --readme-card: #E9F5EA;
}

.readme-project-icon {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 13px;
  background: rgba(255,248,243,.55);
  box-shadow: 4px 4px 0 rgba(26,20,19,.14);
}

.readme-project-icon svg {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
}

.readme-project-copy {
  display: block;
  min-width: 0;
}

.readme-project-copy strong {
  display: block;
  margin-bottom: .26rem;
  font: 800 .86rem/1.28 var(--sans);
}

.readme-project-copy > span {
  display: block;
  color: var(--soft);
  font-size: .82rem;
  line-height: 1.4;
}

.readme-project-arrow {
  align-self: center;
  justify-self: end;
  color: var(--ink);
  font: 900 2rem/1 var(--sans);
}

.readme-fine {
  display: grid;
  grid-template-columns: 2rem minmax(0,1fr);
  gap: .65rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 2px solid var(--stone);
}

.readme-info-icon {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font: 900 1rem/1 Georgia, "Times New Roman", serif;
}

/* =========================================================*
*   CASE STUDY CONTENT*
*========================================================= */
.flow { margin: 0 0 .8rem; padding-left: 1.35rem; list-style-position: outside; }
ol.flow { padding-left: 1.6rem; }
:where(.flow) li { margin-bottom: .35rem; padding-left: .2rem; }
.flow li::marker { font-family: var(--sans); }
.guards { display: grid; gap: .55rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
:where(.guards) li { display: grid; grid-template-columns: 4.6rem 1fr; gap: .6rem; align-items: start; }
.tag {
  display: inline-block;
  justify-self: start;
  padding: .02rem .45rem;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font: 700 .7rem/1.5 var(--mono);
}
.tag-ok { background: var(--mint); }
.tag-held { background: var(--coral); }
.tag-skip { background: var(--stone); }
.tag-wait { background: var(--butter); }
/* =========================================================*
*   "WHAT COMES OUT" SAMPLE VISUALS*
*========================================================= */
.mock { margin: .4rem 0 1rem; }
:where(.mock) figcaption { margin-top: .5rem; color: var(--soft); font-size: .8rem; }
/* Label proof + drafted reply */
.mock-proof { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: .8rem; align-items: start; }
.mock-label {
  position: relative;
  aspect-ratio: 3 / 2;
  padding: .8rem .9rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 4px 4px 0 var(--ink);
  font: .74rem/1.45 var(--mono);
  transform: rotate(-1.5deg);
}
:where(.mock-label) p { margin: 0; }
.mock-label-title { margin-bottom: .2rem !important; padding-right: 3.6rem; font-weight: 800; font-size: .82rem; line-height: 1.25; }
.mock-barcode {
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: .7rem;
  height: 1.6rem;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px);
}
.mock-mail { border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); overflow: hidden; font-size: .8rem; }
.mock-mail-row { margin: 0; padding: .35rem .7rem; border-bottom: 1.5px solid var(--stone); overflow-wrap: anywhere; }
:where(.mock-mail-row) b { display: inline-block; min-width: 3.8rem; color: var(--soft); font: 500 .7rem var(--mono); }
.mock-mail-body { margin: 0; padding: .6rem .7rem; }
.mock-mail-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; margin: 0; padding: .45rem .7rem; border-top: 1.5px solid var(--stone); background: var(--paper-2); }
.mock-file { padding: .05rem .4rem; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--paper); font: .68rem var(--mono); }
/* Billing review screen */
.mock-review { border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); overflow: hidden; font: .74rem var(--mono); }
.mock-review-head { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; background: var(--ink); color: var(--paper); }
:where(.mock-review-head) span { opacity: .75; }
.mock-review-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .75rem; border-bottom: 1.5px solid var(--stone); }
.mock-review-foot { padding: .5rem .75rem; background: var(--coral-soft); color: var(--error); font-weight: 700; }
/* Telegram-style job match */
.telegram-preview {
  max-width: 29rem;
  padding: .85rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: radial-gradient(circle at 15% 20%, rgba(169,155,232,.13), transparent 9rem), #0E0D0F;
}
.telegram-bubble {
  padding: .8rem .85rem .55rem;
  border-radius: 5px 14px 14px 14px;
  background: #232323;
  color: #F5F5F5;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font-size: .82rem;
  line-height: 1.35;
}
:where(.telegram-bubble) p { margin: 0; }
.telegram-score { padding-bottom: .45rem; border-bottom: 1px solid rgba(255,255,255,.12); font-weight: 800; }
.telegram-role { margin-top: .65rem; font-size: 1.02rem; font-weight: 800; }
.telegram-company { margin-top: .05rem; font-weight: 700; }
.telegram-detail { margin-top: .08rem; }
.telegram-heading { margin-top: .8rem; font-weight: 800; }
.telegram-reasons { margin: .25rem 0 .7rem; padding-left: 1.15rem; }
:where(.telegram-reasons) li { margin: .08rem 0; }
.telegram-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: .55rem; color: #A0A0A0; font-size: .72rem; }
/* =========================================================*
*   PROOF CHECKER*
*========================================================= */
.checker { padding: .9rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-2); }
.checker-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: stretch; }
.checker-field { display: flex; flex-direction: column; min-width: 0; }
.checker .label { margin: 0 0 .4rem; }
:where(.checker) pre, :where(.checker) textarea {
  width: 100%;
  height: 11rem;
  min-height: 11rem;
  margin: 0;
  padding: .6rem .7rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: .8rem/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
:where(.checker) textarea { resize: vertical; }
.checker-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: .8rem 0 0; font-size: .9rem; }
/* =========================================================*
*   BUTTONS*
*========================================================= */
.small-btn {
  margin-left: auto;
  padding: .24rem .65rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  font: 500 .76rem var(--mono);
  cursor: var(--cursor-pointer, pointer);
}
.small-btn:hover { background: var(--ink); color: var(--paper); }
.action-btn { margin-left: 0; background: var(--ink); color: var(--paper); }
.links { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn {
  display: inline-block;
  padding: .55rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 2px 3px 0 var(--coral); }
.btn-line { background: var(--paper); color: var(--ink); }
.btn-line:hover { box-shadow: 2px 3px 0 var(--ink); }


.proof-impact {
  display: grid;
  gap: .28rem;
  margin: .55rem 0 .8rem;
  padding: .72rem .8rem;
  border-left: 4px solid var(--coral);
  background: var(--paper-2);
}
.proof-impact-label {
  color: var(--soft);
  font: 800 .7rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.proof-impact-values {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: baseline;
}
.proof-impact-values strong { font: 900 1.05rem/1.1 var(--mono); }
.proof-impact-values span { font: 900 1rem/1 var(--mono); }

/* Results: a measured before/after, set like the About page's "What ties it all together" note */
.result-card {
  display: grid;
  gap: .7rem;
  margin: .55rem 0 .9rem;
  padding: .9rem 1rem 1rem;
  border: 1.5px solid var(--stone);
  border-radius: 10px;
  background: var(--paper-2);
}
:where(.result-card) p { margin: 0; }
.result-lead { display: block; font-size: 1rem; }
.result-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.result-compare > div { display: grid; gap: .15rem; }
:where(.result-compare) span { color: var(--soft); font: 700 .75rem var(--mono); }
:where(.result-compare) b { font: 900 1.2rem/1.15 var(--mono); }
.result-before b { color: var(--soft); }

/* Billing: the two generated PDFs side by side */
.output-pdf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.output-pdf {
  display: grid;
  gap: .4rem;
  color: var(--ink);
  text-decoration: none;
}
.output-pdf img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.output-pdf span { font: 700 .76rem var(--mono); }
.safeguard-review { margin-top: .8rem; }

/* =========================================================
   LABEL PROOF INBOX SIMULATOR
========================================================= */
.proof-preview-card {
  margin: 1.1rem 0 1.25rem;
  padding: .9rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(145deg, #FFF8F3, #F7EEE7);
  box-shadow: 4px 4px 0 rgba(26,20,19,.12);
}

.proof-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .8rem;
}

.proof-preview-head h3 { margin: .12rem 0 0; }

.proof-inbox-layout {
  display: grid;
  grid-template-columns: minmax(12.5rem, .72fr) minmax(0, 1.28fr);
  gap: .8rem;
  margin-top: .8rem;
}

.proof-inbox-list {
  display: grid;
  gap: .45rem;
  align-content: start;
}

.proof-request {
  display: grid;
  gap: .16rem;
  width: 100%;
  padding: .62rem .7rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 2px 2px 0 rgba(26,20,19,.12);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.proof-request:hover,
.proof-request.is-selected {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.proof-request.is-selected { background: var(--coral-soft); }

.proof-request-file {
  font: 800 .75rem/1.2 var(--mono);
  overflow-wrap: anywhere;
}

.proof-request-meta {
  color: var(--soft);
  font: .7rem/1.25 var(--mono);
}

.proof-request-note {
  font-size: .78rem;
  font-weight: 750;
}

.proof-run-panel {
  display: grid;
  gap: .75rem;
  min-width: 0;
  padding: .8rem 0 0;
  border-top: 1.5px solid rgba(26,20,19,.18);
}

.proof-run-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .7rem;
}

.proof-run-head .label { margin-bottom: .12rem; }

.proof-run-head strong {
  display: block;
  font: 800 .78rem/1.3 var(--mono);
  overflow-wrap: anywhere;
}

.proof-run-steps {
  display: grid;
  align-content: start;
  gap: .32rem;
  min-height: 14.8rem;
  margin: 0;
  padding: .7rem .75rem;
  list-style: none;
  border: 1.5px solid var(--stone);
  border-radius: 8px;
  background: var(--paper-2);
}

.proof-run-steps li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0,1fr);
  gap: .35rem;
  align-items: start;
  font: .72rem/1.45 var(--mono);
}

.proof-run-steps li span:first-child {
  color: var(--ok);
  font-weight: 900;
}

.proof-run-steps .is-placeholder {
  grid-template-columns: 1fr;
  color: var(--soft);
  align-self: center;
}

.proof-run-result {
  display: grid;
  gap: .55rem;
  padding-top: .15rem;
}

.proof-result-title {
  margin: 0;
  font-weight: 850;
}

.proof-result-copy {
  margin: 0;
  color: var(--soft);
  font-size: .88rem;
}

.proof-success-output {
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: .65rem;
  margin-top: .15rem;
}

.live-proof-frame {
  position: relative;
  min-height: 11.2rem;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

.live-proof-label {
  position: relative;
  min-height: 11.2rem;
  padding: 1rem;
  font: .78rem/1.45 var(--mono);
}

.live-proof-label p { margin: 0 0 .18rem; }
.live-proof-product { font-weight: 800; font-size: .9rem; }
.live-proof-label .mock-barcode { bottom: .8rem; }

.proof-draft-mail {
  min-height: 11.2rem;
  margin: 0;
}

.proof-validation-output {
  display: grid;
  gap: .42rem;
}

.proof-compare-row {
  display: grid;
  grid-template-columns: 8rem minmax(0,1fr);
  gap: .5rem;
  align-items: center;
  padding: .5rem .6rem;
  border-radius: 7px;
  background: var(--paper-2);
  font: .73rem/1.3 var(--mono);
}

.proof-compare-row.is-good { box-shadow: inset 3px 0 0 var(--ok); }
.proof-compare-row.is-bad {
  background: var(--coral-soft);
  color: var(--error);
  box-shadow: inset 3px 0 0 var(--error);
}

/* =========================================================*
*   BILLING DEMO*
*========================================================= */
.spot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.invoice {
  display: grid;  gap: .3rem;
  padding: .7rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  font: .76rem/1.4 var(--mono);
  text-align: left;
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease, box-shadow .12s ease;
}
.invoice:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.invoice.picked-stop { background: var(--coral); }
.invoice.picked-warn { background: var(--butter); }
.invoice.picked-clean { background: var(--mint); }
.inv-no { font-weight: 700; font-size: .82rem; }
.inv-row { display: flex; justify-content: space-between; gap: .4rem; }
.inv-row span:first-child { color: var(--soft); }
.missing { color: var(--error); font-style: italic; }
.spot-result { min-height: 3em; margin-top: .8rem; }
/* =========================================================*
*   JOB BOT DEMO*
*========================================================= */
.job-demo { margin-top: .9rem; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.job-demo-toolbar { display: flex; align-items: end; gap: .5rem; padding: .75rem; border-bottom: 2px solid var(--ink); background: var(--paper); }
.job-demo-toolbar .label { margin: 0 auto 0 0; }
:where(.job-demo-toolbar) select {
  display: block;
  margin-top: .25rem;
  padding: .35rem .45rem;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font: .72rem var(--mono);
}
.job-profile-note { margin: 0; padding: .55rem .75rem; border-bottom: 2px solid var(--ink); background: #EFF8F1; color: var(--soft); font-size: .78rem; }
.job-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid var(--ink); background: var(--paper-2); font: .62rem var(--mono); }
:where(.job-stats) span { padding: .45rem .5rem; border-right: 1.5px solid var(--stone); }
.job-stats span:last-child { border-right: 0; }
:where(.job-stats) b { font-size: .78rem; }
.job-board { font: .7rem/1.3 var(--mono); }
.job-row {
  display: grid;
  grid-template-columns: minmax(11rem, 1.6fr) 3.2rem 6.8rem 5.3rem;
  align-items: center;
  min-height: 2.5rem;
  padding: .35rem .55rem;
  border-bottom: 1.5px solid var(--stone);
  background: var(--paper);
  transition: background .2s ease, transform .2s ease;
}
.job-row:last-child { border-bottom: 0; }
.job-row span:first-child { font-weight: 500; }
:where(.job-row) strong { justify-self: end; font-size: .62rem; color: var(--soft); }
.job-head { min-height: 2rem; background: var(--ink); color: var(--paper); font-size: .62rem; }
.job-row.is-processing { transform: translateX(3px); background: #FFF4C9; }
.job-row.is-match { background: var(--mint); }
.job-row.is-reject { background: var(--coral-soft); }
.job-row.is-skip { background: var(--stone); }
:where(.job-row.is-match) strong { color: #216440; }
:where(.job-row.is-reject) strong { color: var(--error); }
/* =========================================================
   ABOUT
========================================================= */
.about-background-hero {
  display: grid;
  grid-template-columns: 10.75rem minmax(0, 1fr);
  gap: 1.15rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: .9rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(145deg, #FFF8F3, #F9EAE5);
  box-shadow: 4px 4px 0 rgba(26,20,19,.14);
}
.about-photo-wrap { margin: 0; }
.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
:where(.about-background-copy) h3 {
  margin: 0 0 .45rem;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.about-background-copy .lede { margin-bottom: 0; }
.about-story { padding-top: .25rem; }
.about-thread {
  margin-top: 1rem;
  padding: .8rem .9rem;
  border: 1.5px solid var(--stone);
  border-radius: 10px;
  background: var(--paper-2);
}
:where(.about-thread) strong {
  display: block;
  margin-bottom: .25rem;
}
:where(.about-thread) p { margin: 0; }
.work-intro {
  max-width: 39rem;
  margin-bottom: .8rem;
}
.work-sequence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: .8rem 0 1.2rem;
  padding: .65rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-2);
  font: 700 .68rem var(--mono);
}
:where(.work-sequence) span {
  padding: .16rem .4rem;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
}
:where(.work-sequence) i {
  color: var(--soft);
  font-style: normal;
}
.about-section-block {
  padding: 1rem 0;
  border-bottom: 1.5px dashed rgba(26,20,19,.25);
}
.about-section-block:first-of-type { padding-top: .15rem; }
.about-section-block:last-child { border-bottom: 0; }
:where(.about-section-block) h3 { margin: 0 0 .35rem; }
/* =========================================================*
*   SKILLS (same palette as the rest of the OS)*
*========================================================= */
.skills-body .skill-group { margin-bottom: .8rem; }
.skills-body .skill-group:last-child { margin-bottom: 0; }

.skill-group { margin-bottom: .9rem; padding: .8rem .9rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-2); }
:where(.skill-group) h3 { margin: 0 0 .55rem; font-size: 1rem; }
.skill-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-chip {
  padding: .2rem .6rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font: .72rem var(--mono);
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.skill-chip:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.skill-chip.is-active { background: var(--blue); box-shadow: 2px 2px 0 var(--ink); }
.skill-evidence {
  margin: .65rem 0 0;
  padding-top: .55rem;
  border-top: 1.5px dashed rgba(26,20,19,.22);
  color: var(--soft);
  font-size: .82rem;
  line-height: 1.45;
}
:where(.skill-evidence) strong { color: var(--ink); }
.skill-detail { margin-top: .65rem; min-height: 0; padding: .65rem .75rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font: .78rem/1.45 var(--mono); }
/* =========================================================*
*   ALIGNEDFX*
*========================================================= */
.alignedfx-app-icon .alignedfx-icon-frame {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  margin: -.17rem 0;
  transition: transform .15s ease;
}
.alignedfx-app-icon:hover .alignedfx-icon-frame { transform: translateY(-3px) rotate(-3deg); }
:where(.alignedfx-icon-frame) img { display: block; width: 3.4rem; height: 3.4rem; object-fit: contain; filter: drop-shadow(2px 3px 0 rgba(26,20,19,.12)); }
.alignedfx-logo-full { display: block; width: min(22rem, 88%); margin: 0 auto 1rem; border: 2px solid var(--ink); border-radius: 12px; background: #F6F0E5; }
.alignedfx-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
:where(.alignedfx-tags) span { padding: .2rem .5rem; border: 1.5px solid var(--ink); border-radius: 999px; background: #E8EFE2; font: .7rem var(--mono); }
.alignedfx-links { margin-top: 1.2rem; }
/* =========================================================*
*   CONTACT (same palette as the rest of the OS)*
*========================================================= */
.contact-heading { margin: 0 0 .45rem; font-size: 2rem; letter-spacing: -.03em; }
.contact-form { display: grid; gap: .3rem; }
.contact-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:where(.contact-form) label { margin-top: .55rem; color: var(--soft); font: 500 .76rem var(--mono); }
:where(.contact-form) input, :where(.contact-form) select, :where(.contact-form) textarea {
  width: 100%;
  padding: .65rem .75rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  outline: none;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { box-shadow: 3px 3px 0 var(--coral); }
:where(.contact-form) textarea { resize: vertical; min-height: 9rem; }
.contact-form .has-error { border-color: var(--error); background: var(--coral-soft); }
.field-error { min-height: 1.2em; margin: 0; color: var(--error); font-size: .78rem; }
.contact-actions { display: flex; justify-content: center; gap: .55rem; margin-top: .7rem; }
.form-status { min-height: 1.3rem; margin: .45rem 0 0; color: var(--soft); font: .76rem var(--mono); }
/* =========================================================
   BUG BASH (whack-the-bug game)
========================================================= */
.bb-body { background: var(--paper); }
.bb { display: grid; gap: .75rem; font-family: var(--sans); color: var(--ink); }
.bb[hidden] { display: none; }
.bb-center { justify-items: center; gap: .9rem; padding: 1rem .5rem; text-align: center; }
.bb-lede { max-width: 30rem; margin: 0; font-size: 1.05rem; line-height: 1.5; }
.bb-small { max-width: 28rem; margin: 0; color: var(--soft); font-size: .92rem; }
/* Start screen */
.bb-intro { gap: .85rem; padding: .6rem .25rem 1rem; }
.bb-intro-title { margin: 0; font: 800 3rem/1 var(--sans); letter-spacing: -.03em; text-shadow: 3px 3px 0 var(--purple); }
.bb-preview { width: 100%; max-width: 17rem; gap: .45rem; padding: .55rem; border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.bb-preview .bb-cell { border-radius: 9px; cursor: default; }
.bb-preview .bb-pop { bottom: 17%; }
.bb-preview .bb-icon { width: 40%; }
.bb-preview .bb-tag { padding: .18rem .35rem; font-size: .58rem; }
.bb-how { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; max-width: 28rem; text-align: left; }
.bb-how-item { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-radius: 12px; }
.bb-how-item.is-bug { background: var(--coral-soft); }
.bb-how-item.is-safe { background: #E3F4EA; }
.bb-how-piece { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; }
.bb-how-piece .bb-icon { width: 100%; height: 100%; }
.bb-how-item strong { display: block; font-size: .95rem; line-height: 1.2; }
.bb-how-item small { display: block; margin-top: .15rem; color: var(--soft); font-size: .8rem; line-height: 1.3; }
.bb-meta { max-width: 26rem; margin: .1rem 0 0; color: var(--soft); font-size: .92rem; line-height: 1.5; }
.bb-meta b { color: var(--ink); }
.bb-btn { padding: .8rem 1.5rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--coral); color: var(--ink); font: 800 1rem var(--sans); box-shadow: 3px 3px 0 var(--ink); cursor: var(--cursor-pointer, pointer); transition: transform .12s ease, box-shadow .12s ease; }
.bb-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.bb-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* Game screen: Pip perched on the wave card, then score, board, tally */
#bb-play { gap: .75rem; }
.bb-top { position: relative; }
.bb-top-pip { position: relative; z-index: 2; display: flex; align-items: center; min-width: 0; gap: 1.05rem; margin: 0 0 .65rem .25rem; }
.bb-top-pip .bb-pip-face { flex: 0 0 auto; width: 3.6rem; height: 3.6rem; gap: .5rem; margin-top: 0; border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.bb-top-pip .bb-pip-eye { width: .6rem; height: .92rem; }
.bb-top-pip .bb-pip-face.is-happy .bb-pip-eye { height: .5rem; }
.bb-top-pip .bb-pip-face.is-wince .bb-pip-eye { height: .22rem; }
.bb-top-pip .bb-pip-say { min-width: 0; max-width: calc(100% - 5rem); padding: .6rem .95rem; border-radius: 16px; background: #ECE7FA; box-shadow: 2px 2px 0 var(--ink); font-size: 1rem; line-height: 1.3; white-space: normal; overflow-wrap: break-word; }

/* Pip talks using the same left-pointing speech-tail geometry as the Home screen.
   Keep the row outside the wave card, so the tail never collides with its border. */
.bb-top-pip .bb-pip-say,
.bb-end-pip .bb-pip-say {
  position: relative;
  isolation: isolate;
}
.bb-top-pip .bb-pip-say::before,
.bb-end-pip .bb-pip-say::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--bb-speech-bg, #FFFDFB);
  transform: rotate(45deg);
}
.bb-top-pip .bb-pip-say { --bb-speech-bg: #ECE7FA; }
.bb-end-pip .bb-pip-say { --bb-speech-bg: #ECE7FA; }
/* On the end screen Pip sits under the title and his bubble points up at him. */
.bb-end-pip .bb-pip-say::before { left: 50%; top: -7px; margin-top: 0; border-bottom: 0; border-top: 2px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.bb-wavecard { position: relative; padding: 1rem 7.5rem 1rem 1.15rem; border: 2px solid var(--ink); border-radius: 16px; background: #FFF4DA; }
.bb-wave strong { color: var(--ink); font: 800 1.7rem/1.05 var(--sans); letter-spacing: -.01em; }
.bb-timer { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); padding: .45rem .95rem; border: 2px solid var(--ink); border-radius: 12px; background: var(--butter); box-shadow: 3px 3px 0 var(--ink); font: 700 2rem/1 var(--mono); }
.bb-scorecard { display: grid; grid-template-columns: 1fr 2px 1fr; align-items: center; padding: .6rem 0; border: 2px solid var(--stone); border-radius: 14px; background: #FFFDFB; color: var(--soft); font-size: 1rem; }
.bb-scorecard > span { text-align: center; white-space: nowrap; }
.bb-scorecard i { height: 1.6rem; background: var(--stone); }
.bb-scorecard b { margin-right: .3rem; color: var(--ink); font-size: 1.45rem; font-weight: 800; }
#bb-board { background: var(--purple); }
.bb-tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.bb-tally > span { display: grid; gap: .1rem; padding: .55rem .4rem; border-radius: 12px; color: var(--soft); font-size: .85rem; text-align: center; }
.bb-tally b { color: var(--ink); font: 800 1.35rem/1 var(--sans); }
.bb-tally .is-good, .bb-report div:nth-child(1) { background: #E3F4EA; }
.bb-tally .is-bad, .bb-report div:nth-child(2) { background: var(--coral-soft); }
.bb-tally .is-esc, .bb-report div:nth-child(3) { background: #ECE7FA; }
.bb-timer.is-low { background: var(--coral); }
/* Desktop: scoreboard on the left, board on the right, sized to the screen
   height so the whole game is visible without scrolling. */
@media (min-width: 761px) {
  section[data-app="bug-bash"] {
    --bb-side: 22rem;
    --bb-board: min(34rem, calc((100vh - 9.5rem) * 1.08), calc(100vw - var(--bb-side) - 6.5rem));
  }
  section[data-app="bug-bash"].is-wide { --w: calc(var(--bb-side) + 1.5rem + var(--bb-board) + 2.6rem) !important; }
  #bb-play { display: grid; grid-template-columns: var(--bb-side) var(--bb-board); grid-template-rows: auto auto 1fr auto; column-gap: 1.5rem; row-gap: .8rem; align-items: start; }
  #bb-play .bb-top { display: contents; }
  #bb-play .bb-wavecard { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 1.15rem; }
  #bb-play .bb-wave strong { font-size: 1.3rem; white-space: nowrap; }
  #bb-play .bb-timer { position: static; transform: none; flex: none; margin-right: 3px; padding: .38rem .7rem; font-size: 1.5rem; }
  #bb-play .bb-scorecard { grid-column: 1; grid-row: 2; }
  #bb-play .bb-top-pip { grid-column: 1; grid-row: 3; align-self: center; justify-self: center; flex-direction: column; gap: .7rem; margin: .2rem 0; }
  #bb-play .bb-top-pip .bb-pip-face { width: 3.8rem; height: 3.8rem; gap: .55rem; }
  #bb-play .bb-top-pip .bb-pip-eye { width: .7rem; height: 1.05rem; }
  #bb-play .bb-top-pip .bb-pip-face.is-happy .bb-pip-eye { height: .58rem; }
  #bb-play .bb-top-pip .bb-pip-face.is-wince .bb-pip-eye { height: .26rem; }
  #bb-play .bb-top-pip .bb-pip-say { max-width: 18rem; text-align: center; }
  #bb-play .bb-top-pip .bb-pip-say::before { left: 50%; top: -7px; margin-top: 0; border-bottom: 0; border-top: 2px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
  #bb-play .bb-tally { grid-column: 1; grid-row: 4; align-self: end; grid-template-columns: 1fr; gap: .45rem; }
  #bb-play .bb-tally > span { display: flex; align-items: baseline; gap: .6rem; padding: .5rem 1rem; font-size: .95rem; text-align: left; }
  #bb-play .bb-tally b { min-width: 2.2rem; font-size: 1.45rem; }
  #bb-play #bb-board { grid-column: 2; grid-row: 1 / span 4; align-self: stretch; grid-template-rows: repeat(3, 1fr); width: var(--bb-board); max-width: none; }
  /* The board stretches to the scoreboard's height so their bottoms always line up. */
  #bb-play #bb-board .bb-cell { aspect-ratio: auto; min-height: calc((var(--bb-board) - 2.6rem) * .29); }
  #bb-play[hidden], #bb-start-screen[hidden] { display: none; }
}
.bb-streak b { color: var(--coral); }
.bb-pip-say { position: relative; padding: .3rem .6rem; border: 2px solid var(--ink); border-radius: 10px; background: #FFFDFB; color: var(--ink); font: 700 .8rem/1.2 var(--sans); white-space: nowrap; }
.bb-pip-say:empty { visibility: hidden; }
.bb-pip-face { display: flex; align-items: center; justify-content: center; gap: .32rem; width: 2.2rem; height: 2.2rem; border: 2px solid var(--ink); border-radius: 9px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.bb-pip-eye { width: .38rem; height: .58rem; border-radius: 999px; background: var(--ink); transition: height .12s ease; }
.bb-pip-face.is-happy { animation: bbPipHop .4s ease; }
.bb-pip-face.is-happy .bb-pip-eye { height: .3rem; border-radius: .3rem .3rem 0 0; }
.bb-pip-face.is-wince { animation: bbPipShake .35s ease; }
.bb-pip-face.is-wince .bb-pip-eye { height: .16rem; }
#bb-end { position: relative; gap: 1rem; padding-top: 1.2rem; }
.bb-end-title { margin: 0; font: 800 2.7rem/1.05 var(--sans); letter-spacing: -.03em; text-shadow: 3px 3px 0 var(--purple); }
.bb-end-pip { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-top: .2rem; }
.bb-end-pip .bb-pip-face { width: 4.4rem; height: 4.4rem; gap: .6rem; border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); }
.bb-end-pip .bb-pip-eye { width: .72rem; height: 1.1rem; }
.bb-end-pip .bb-pip-face.is-glad .bb-pip-eye { height: .6rem; border-radius: .6rem .6rem 0 0; }
.bb-end-pip .bb-pip-face.is-sheepish .bb-pip-eye { height: .26rem; }
.bb-end-pip .bb-pip-say { max-width: 21rem; padding: .7rem 1.1rem; border-radius: 16px; background: #ECE7FA; box-shadow: 2px 2px 0 var(--ink); font-size: 1.02rem; line-height: 1.3; white-space: normal; text-align: center; }
.bb-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.bb-pip-face.is-glad { animation: bbPipHop .5s ease 2; }
.bb-pip-face.is-glad .bb-pip-eye { height: .4rem; border-radius: .4rem .4rem 0 0; }
.bb-pip-face.is-sheepish .bb-pip-eye { height: .2rem; }
.bb-pip-face.is-sheepish { transform: rotate(-6deg); }
@keyframes bbPipHop { 40% { transform: translateY(-5px); } }
@keyframes bbPipShake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.bb-board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; padding: .8rem; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper-2); box-shadow: 4px 4px 0 var(--ink); touch-action: manipulation; }
.bb-cell { position: relative; display: block; aspect-ratio: 1 / .88; padding: 0; border: 2px solid var(--ink); border-radius: 12px; background: #FFFDFB; color: inherit; font: inherit; overflow: hidden; cursor: var(--cursor-pointer, pointer); -webkit-tap-highlight-color: transparent; }
.bb-cell:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.bb-hole { position: absolute; left: 50%; bottom: 12%; width: 62%; height: 16%; border-radius: 50%; background: #2A2220; box-shadow: inset 0 3px 0 rgba(0,0,0,.4); transform: translateX(-50%); }
.bb-pop { position: absolute; left: 0; right: 0; bottom: 18%; display: grid; justify-items: center; gap: .15rem; opacity: 0; transform: translateY(45%) scale(.6); transition: opacity .12s ease, transform .16s cubic-bezier(.3, 1.5, .5, 1); pointer-events: none; }
.bb-cell.is-up .bb-pop { opacity: 1; transform: none; }
.bb-pop .bb-icon { width: 46%; height: auto; }
.bb-tag { padding: .25rem .5rem; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font: 700 .78rem/1 var(--mono); white-space: nowrap; }
.bb-cell.is-safe .bb-tag { background: var(--mint); }
.bb-cell.is-squashed .bb-tag { text-decoration: line-through; }
.bb-cell.is-false { background: var(--coral-soft); }
.bb-cell.is-false .bb-pop { transform: rotate(-5deg); }
.bb-cell.is-escaped .bb-pop { opacity: 0; transform: translateY(-30%); }
.bb-float { position: absolute; top: .35rem; right: .45rem; font: 800 1.05rem/1 var(--sans); pointer-events: none; animation: bbFloat .7s ease-out forwards; }
.bb-float.is-good { color: var(--green); }
.bb-float.is-bad { color: var(--error); }
@keyframes bbFloat { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-14px); } }
.bb-banner { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; gap: .3rem; border-radius: 12px; background: rgba(255, 248, 243, .9); text-align: center; }
.bb-banner[hidden] { display: none; }
.bb-banner strong { font: 800 1.8rem/1.1 var(--sans); }
.bb-banner span { color: var(--soft); font-size: 1rem; }
.bb-banner { justify-items: center; }
.bb-banner [hidden] { display: none; }
.bb-count { color: var(--coral); font: 800 4.5rem/1 var(--sans); text-shadow: 3px 3px 0 var(--ink); animation: bbCount 1s ease-out infinite; }
@keyframes bbCount { 0% { transform: scale(1.25); opacity: .4; } 25% { transform: scale(1); opacity: 1; } }
.bb-next { margin-top: .6rem; }

.bb-report { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; width: 100%; max-width: 26rem; }
.bb-report div { display: grid; gap: .2rem; padding: .7rem .4rem; border: 2px solid var(--ink); border-radius: 12px; background: #FFFDFB; box-shadow: 3px 3px 0 var(--ink); }
.bb-report b { font: 800 1.8rem/1 var(--sans); }
.bb-report span { color: var(--soft); font-size: .85rem; }
.bb-score { display: flex; align-items: baseline; gap: .45rem; margin: 0; padding: .7rem 1.4rem; border-radius: 14px; background: #FFF4DA; color: var(--soft); font-size: 1rem; }
.bb-score b { color: var(--ink); font: 800 2rem/1 var(--sans); }

@media (max-width: 760px) {
  .bb-intro { gap: .7rem; padding-top: .2rem; }
  .bb-intro-title { font-size: 2.4rem; }
  .bb-intro .bb-lede { font-size: .98rem; }
  .bb-preview { max-width: 12.5rem; }
  .bb-how { grid-template-columns: 1fr; gap: .5rem; }
  .bb-how-item { padding: .55rem .7rem; }
  .bb-how-piece { width: 2.1rem; height: 2.1rem; }
  .bb-how-item strong { font-size: .92rem; }
  .bb-tag { padding: .22rem .38rem; font-size: .62rem; }
  #bb-play { gap: .55rem; }
  .bb-top-pip { margin: 0 0 .55rem .2rem; gap: .9rem; }
  .bb-top-pip .bb-pip-face { width: 2.9rem; height: 2.9rem; margin-top: 0; }
  .bb-top-pip .bb-pip-eye { width: .5rem; height: .78rem; }
  .bb-top-pip .bb-pip-say { max-width: calc(100% - 3.5rem); padding: .45rem .8rem; font-size: .88rem; text-align: left; }
  .bb-wavecard { padding: .85rem 6rem .85rem 1rem; }
  .bb-wave strong { font-size: 1.4rem; line-height: 1.2; }
  .bb-timer { right: .85rem; padding: .35rem .75rem; font-size: 1.5rem; }
  .bb-scorecard { padding: .45rem 0; }
  .bb-scorecard b { font-size: 1.25rem; }
  #bb-board { justify-self: center; width: 100%; max-width: 21rem; }
  .bb-end-title { font-size: 2.3rem; }
  #bb-end { min-height: calc(100dvh - 8rem); align-content: center; padding-top: .4rem; gap: 1.1rem; }
  #bb-end .bb-report { max-width: none; }
  .bb-score { padding: .6rem 1.1rem; }
  .bb-board { gap: .5rem; padding: .6rem; }
}
@media (max-width: 760px) and (max-height: 640px) {
  #bb-board { max-width: 18rem; }
  .bb-top-pip .bb-pip-face { width: 2.6rem; height: 2.6rem; }
  .bb-wavecard { padding-top: .85rem; }
}
@media (max-width: 760px) and (max-height: 600px) {
  #bb-board { max-width: 16.5rem; }
  #bb-play { gap: .45rem; }
  .bb-tally > span { padding: .4rem .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-pop, .bb-pip-eye { transition: none; }
  .bb-pip-face.is-happy, .bb-pip-face.is-wince, .bb-pip-face.is-glad, .bb-float, .bb-count { animation: none; }
  .bb-float { opacity: 1; }
}
/* =========================================================
   RECYCLE BIN
========================================================= */
.rb-body {
  background: var(--paper);
}

.rb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  margin-bottom: 1rem;
}

.rb-count {
  color: var(--soft);
  font: .8rem var(--mono);
}

.rb-empty-btn {
  padding: .62rem .85rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--coral);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font: 800 .78rem var(--mono);
}

.rb-empty-btn:active {
  transform: translate(2px,2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.rb-list {
  display: grid;
  gap: .65rem;
}

.rb-row {
  display: grid;
  grid-template-columns: 3rem minmax(0,1fr);
  gap: .75rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: .68rem .78rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(26,20,19,.12);
  color: var(--ink);
  text-align: left;
}

.rb-row:hover {
  background: var(--paper-2);
}

.rb-row.is-selected {
  border-width: 3px;
  background: #FBF0C8;
  box-shadow: 4px 4px 0 var(--ink);
}

.rb-copy {
  display: grid;
  justify-items: start;
  min-width: 0;
  gap: .28rem;
}

.rb-copy strong {
  max-width: 100%;
  font: 800 .8rem/1.25 var(--mono);
  overflow-wrap: anywhere;
}

.rb-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: .18rem .48rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--soft);
  font: .66rem/1.1 var(--mono);
  white-space: nowrap;
}

.rb-file-icon {
  display: block;
  width: 2.7rem;
  height: 3.15rem;
  filter: drop-shadow(2px 2px 0 rgba(26,20,19,.14));
}

.rb-file-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rb-file-icon path,
.rb-file-icon circle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rb-file-icon .rb-file-shape {
  fill: var(--rb-file, #D7D2CE);
}

.rb-file-icon .rb-fold {
  fill: rgba(255,248,243,.58);
}

.rb-file-icon .rb-plumbob {
  fill: #65C466;
}

.rb-lilac { --rb-file: #C8B6FF; }
.rb-pink { --rb-file: #F4A9A0; }
.rb-gold { --rb-file: #E8C547; }
.rb-teal { --rb-file: #6FC7C3; }
.rb-mint { --rb-file: #B9E5BE; }
.rb-coral { --rb-file: #EF6F6C; }
.rb-gray { --rb-file: #D7D2CE; }

.rb-pip-row {
  display: grid;
  grid-template-columns: 3rem minmax(0,1fr);
  gap: .75rem;
  align-items: center;
  margin: .05rem 0 .15rem .15rem;
}

.rb-pip-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  width: 2.7rem;
  height: 2.7rem;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.rb-pip-eye {
  width: .48rem;
  height: .72rem;
  border-radius: 999px;
  background: var(--ink);
}

.rb-pip-bubble {
  position: relative;
  margin: 0;
  padding: .72rem .82rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(26,20,19,.14);
  color: var(--ink);
  font: .84rem/1.4 var(--sans);
}

.rb-pip-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  transform: translateY(-50%) rotate(45deg);
}

/* =========================================================
   TROPHIES
========================================================= */
.trophy-body { display: grid; gap: 1rem; }
/* Trophy shelf: the count, then five trophies that fill in as they're earned */
.trophy-shelf-head { display: grid; justify-items: center; gap: .2rem; margin: .2rem 0 1.1rem; }
.trophy-count { display: flex; align-items: baseline; gap: .25rem; font: 900 3rem/1 var(--sans); letter-spacing: -.03em; }
.trophy-count-of { color: var(--soft); font-weight: 800; }
.trophy-count-cap { color: var(--soft); font: 700 .8rem var(--mono); }
.trophy-shelf {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: end;
  width: 100%;
  margin-top: .7rem;
  padding: 0 1rem;
}
.trophy-shelf::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 8px;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  background: var(--stone);
  box-shadow: 3px 3px 0 var(--ink);
}
.trophy-slot { position: relative; z-index: 1; width: 3.2rem; height: 3.2rem; transform-origin: 50% 100%; }
.trophy-slot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.trophy-slot .cup { fill: var(--paper-2); stroke: #9C8F89; stroke-width: 2.6; stroke-dasharray: 3.5 2.5; stroke-linejoin: round; }
.trophy-slot .handle { fill: none; stroke: #9C8F89; stroke-width: 2.6; stroke-dasharray: 3.5 2.5; stroke-linejoin: round; }
.trophy-slot.is-earned .cup { fill: var(--gold); stroke: var(--ink); stroke-width: 2.4; stroke-dasharray: none; }
.trophy-slot.is-earned .handle { stroke: var(--ink); stroke-width: 2.4; stroke-dasharray: none; }
.trophy-slot.is-new { animation: trophyHop .62s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes trophyHop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-14px) scale(1.12, .94); }
  65% { transform: translateY(0) scale(.94, 1.06); }
  100% { transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .trophy-slot.is-new { animation: none; } }
.trophy-list { display: grid; gap: .72rem; margin: 0; }
.trophy-card { display: grid; grid-template-columns: 4rem minmax(0,1fr) auto; gap: .75rem; align-items: center; padding: .75rem; border: 2px dashed #B7AFA9; border-radius: 14px; background: transparent; color: #9A918C; }
.trophy-card.is-earned { border-style: solid; border-color: var(--ink); background: #FBF0C8; color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.trophy-card-icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 12px; background: #F6ECE5; opacity: .42; filter: grayscale(1); }
.trophy-card-icon svg { width: 72%; height: 72%; }
.trophy-card.is-earned .trophy-card-icon { border: 2px solid var(--ink); background: var(--gold); opacity: 1; filter: none; }
.trophy-card-copy h3 { margin: 0 0 .2rem; font-size: 1rem; line-height: 1.1; }
.trophy-card-copy p { margin: 0; color: inherit; font-size: .88rem; line-height: 1.35; }
.trophy-rarity { align-self: start; padding: .18rem .48rem; border: 1.5px solid currentColor; border-radius: 999px; font: 800 .68rem var(--mono); }
.trophy-reset-row { display: flex; justify-content: center; padding-top: .15rem; }
.trophy-reset-btn { min-width: 10.5rem; background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
/* Reset asks once before clearing progress. Touch screens keep :hover after a tap,
   so the button only darkens on hover where a real pointer can hover. */
@media (hover: none) {
  .trophy-reset-btn:hover { background: var(--paper); color: var(--ink); }
}
.trophy-reset-btn.is-confirming,
.trophy-reset-btn.is-confirming:hover { background: var(--coral); color: var(--paper); }
.trophy-reset-btn.is-done,
.trophy-reset-btn.is-done:hover { background: var(--paper); color: var(--ink); cursor: default; }

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .trophy-body { gap: .9rem; }
  .trophy-count { font-size: 2.8rem; }
  .trophy-shelf { padding: 0 .7rem; }
  .trophy-slot { width: 2.9rem; height: 2.9rem; }
  .trophy-card { grid-template-columns: 3.5rem minmax(0,1fr) auto; gap: .6rem; padding: .68rem; border-radius: 15px; }
  .trophy-card-icon { width: 3.5rem; height: 3.5rem; }
  .trophy-card-copy h3 { font-size: .98rem; }
  .trophy-card-copy p { font-size: .84rem; }
  .trophy-rarity { font-size: .62rem; }
}

.credits-stage { position: relative; }

.credits-confetti-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  pointer-events: none;
  z-index: 6;
}

.credits-confetti-piece {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: 7px;
  height: 11px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--piece);
  opacity: 0;
  transform: rotate(var(--rot));
  animation: creditsConfettiFall var(--dur) cubic-bezier(.18,.72,.28,1) var(--delay) forwards;
}

@keyframes creditsConfettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0,-8px,0) rotate(var(--rot));
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 230px,0) rotate(calc(var(--rot) + 220deg));
  }
}

/* =========================================================
   CREDITS PAYOFF
========================================================= */
.credits-body {
  overflow: auto;
  background: linear-gradient(180deg, #FFF8F3 0%, #FFF4EE 100%);
}

.credits-stage {
  display: grid;
  gap: .9rem;
  padding: .1rem;
}

.credits-ending {
  margin: 0;
  padding: .72rem .7rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(26,20,19,.14);
  text-align: center;
  font-size: clamp(.8rem, 2.2vw, .98rem);
  font-weight: 800;
  white-space: nowrap;
}

.credits-bot-celebration {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 8.2rem;
}

.credits-bot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 92px;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 19px;
  background: #F8E7A4;
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-4deg);
  transform-origin: 50% 80%;
}

.credits-bot .eye {
  width: 13px;
  height: 20px;
  border-radius: 999px;
  background: var(--ink);
}

.credits-bot .pupil {
  width: 4px;
  height: 4px;
  margin: 3px 0 0 3px;
  border-radius: 50%;
  background: #FFF8F3;
}

.credits-spark,
.credits-heart {
  position: absolute;
  color: var(--coral);
  font-weight: 900;
  pointer-events: none;
}

.credits-spark-a { left: calc(50% - 82px); top: 2rem; font-size: 1.35rem; }
.credits-spark-b { right: calc(50% - 90px); top: 3rem; font-size: 1.55rem; color: #E8C547; }
.credits-heart { right: calc(50% - 77px); top: 1.2rem; font: 900 1.65rem var(--sans); }

.credits-bot-message {
  position: relative;
  padding: .8rem .9rem;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(26,20,19,.12);
}

.credits-bot-message::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 17px;
  height: 17px;
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
  background: var(--paper);
  transform: translateX(-50%) rotate(45deg);
}

.credits-bot-name {
  display: block;
  margin-bottom: .25rem;
  color: var(--coral);
  font: 800 .72rem var(--mono);
}

.credits-bot-message p {
  margin: 0;
  font: 1rem/1.45 var(--sans);
}

.credits-card {
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 5px 5px 0 rgba(26,20,19,.15);
}

.credits-card h3 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.05;
}

.credits-tagline {
  margin: .65rem auto 0;
  max-width: 38rem;
  color: var(--soft);
  text-align: center;
  font: 1rem/1.55 var(--sans);
}

.credits-divider {
  height: 1px;
  margin: .9rem 0;
  background: var(--coral-soft);
}

.credits-trophy-head {
  margin-bottom: .7rem;
  color: var(--coral);
  font: 900 .74rem var(--mono);
  letter-spacing: .04em;
}

.credits-trophy-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .8rem;
}

.credits-trophy {
  display: grid;
  gap: .35rem;
  justify-items: center;
  text-align: center;
  font: 700 .69rem/1.15 var(--mono);
}

.credits-trophy-icon {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 5.4rem;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 rgba(26,20,19,.12);
}

.credits-trophy-icon svg {
  width: 66%;
  height: 66%;
}

.credits-trophy-coral { background: #F9C9C5; }
.credits-trophy-gold { background: #F8E7A4; }
.credits-trophy-mint { background: #BDE6D0; }
.credits-trophy-lavender { background: #D9D0F5; }
.credits-trophy-blue { background: #CDE4F5; }

.credits-actions {
  display: grid;
  justify-items: center;
  gap: .6rem;
}

.credits-hello,
.credits-replay {
  min-height: 3rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.credits-hello {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .7rem;
  width: min(100%, 31rem);
  padding: .65rem 1rem;
  background: var(--coral);
  color: #FFF8F3;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1rem;
}

.credits-hello span:nth-child(2) { text-align: center; }

/* Replay uses the coral pill style; buttons don't inherit the page font on their own. */
.credits-replay {
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: var(--cursor-pointer, pointer);
}

.credits-stage.is-playing .credits-bot {
  animation: creditsCelebrate .8s cubic-bezier(.2,.9,.3,1.15) 2;
}

.credits-stage.is-playing .credits-trophy {
  animation: creditsTrophyPop .48s cubic-bezier(.2,.9,.3,1.15) both;
}

.credits-stage.is-playing .credits-trophy:nth-child(1) { animation-delay: .03s; }
.credits-stage.is-playing .credits-trophy:nth-child(2) { animation-delay: .08s; }
.credits-stage.is-playing .credits-trophy:nth-child(3) { animation-delay: .13s; }
.credits-stage.is-playing .credits-trophy:nth-child(4) { animation-delay: .18s; }
.credits-stage.is-playing .credits-trophy:nth-child(5) { animation-delay: .23s; }

@keyframes creditsCelebrate {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  40% { transform: rotate(5deg) translateY(-6px); }
  70% { transform: rotate(-2deg) translateY(-2px); }
}

@keyframes creditsTrophyPop {
  0% { opacity: .25; transform: translateY(8px) scale(.9); }
  70% { opacity: 1; transform: translateY(-1px) scale(1.04); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .credits-body { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .credits-stage { gap: .8rem; }
  .credits-ending { font-size: .95rem; }
  .credits-bot-celebration { min-height: 7.5rem; }
  .credits-bot { width: 84px; height: 70px; }
  .credits-bot-message p { font-size: .95rem; }
  .credits-card { padding: .85rem; }
  .credits-card h3 { font-size: 1.55rem; }
  .credits-tagline { font-size: .95rem; }
  .credits-trophy-grid { gap: .48rem; }
  .credits-trophy { font-size: .62rem; }
  .credits-trophy-icon { border-radius: 9px; }
  .credits-hello { font-size: .96rem; }
}

@media (max-width: 430px) {
  .credits-trophy-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .38rem;
  }
  .credits-trophy { font-size: .57rem; }
}

/* =========================================================*
*   TASKBAR*
*========================================================= */
.taskbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 4500;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
  height: var(--task-h);
  padding: .3rem .5rem;
  border-top: 2px solid var(--ink);
  background: #E9DED6;
  box-shadow: 0 -4px 0 rgba(26,20,19,.08);
  font: .7rem var(--mono);
}
.task-start { display: flex; align-items: center; gap: .45rem; height: 100%; padding: .2rem .55rem; border: 2px solid var(--ink); border-radius: 5px; background: var(--paper); font: 700 .72rem var(--mono); }
.task-logo { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 2px solid var(--ink); border-radius: 4px; background: var(--coral); }
.task-running { display: flex; gap: .3rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.task-running::-webkit-scrollbar { display: none; }
.task-app {
  flex: 0 1 10rem;
  min-width: 5.6rem;
  max-width: 11rem;
  height: 2.05rem;
  padding: .3rem .55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 2px solid #8C7B72;
  border-radius: 4px;
  background: #F4EAE3;
  font: .68rem var(--mono);
  text-align: left;
}
.task-app.is-focused { border-color: var(--ink); background: var(--paper); box-shadow: inset 0 -3px 0 var(--coral); }
.task-app.is-minimized { opacity: .65; }
.task-tools { display: flex; align-items: center; gap: .25rem; }
.task-tool { height: 2.05rem; padding: .3rem .48rem; border: 1.5px solid #9B887D; border-radius: 4px; background: #F4EAE3; font: .66rem var(--mono); }
.task-tool:hover { background: var(--paper); }
.sound-toggle { display: inline-flex; align-items: center; gap: .35rem; min-width: 7.5rem; font-weight: 700; }
.sound-toggle.is-hinting { border-color: var(--ink); background: var(--paper); animation: soundHint .9s ease-in-out 4; }
@keyframes soundHint { 50% { box-shadow: 0 0 0 4px var(--coral); transform: translateY(-2px); } }
.sound-toggle[aria-pressed="true"] { background: #D8F0DF; border-color: var(--ink); }
.task-clock { min-width: 4.8rem; text-align: right; font: .68rem var(--mono); }

/* =========================================================
   DESKTOP REVEAL
   A short arrival sequence after the loader, then everything returns
   to the normal static desktop state.
========================================================= */
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  /*
    Desktop boot reveal: icons arrive by column, not one-by-one.
    The desktop grid uses five rows per column, so 1–5, 6–10, and 11+ form the three groups.
  */
  body.desktop-reveal .icons > li {
    opacity: 0;
    transform: translateY(6px);
    animation: desktopIconIn .32s ease forwards;
  }
  body.desktop-reveal .icons > li:nth-child(-n+5) { animation-delay: .10s; }
  body.desktop-reveal .icons > li:nth-child(n+6):nth-child(-n+10) { animation-delay: .18s; }
  body.desktop-reveal .icons > li:nth-child(n+11) { animation-delay: .26s; }

  body.desktop-reveal .taskbar { animation: desktopTaskbarIn .34s ease both; }

  @keyframes desktopIconIn {
    to { opacity: 1; transform: none; }
  }
  @keyframes desktopTaskbarIn {
    from { transform: translateY(100%); opacity: 0; }
  }
}

/* =========================================================*
*   NOTIFICATIONS*
*========================================================= */
.notices { position: fixed; top: calc(var(--mb-h) + .8rem); right: .9rem; z-index: 5000; display: grid; gap: .5rem; width: min(20rem, calc(100vw - 1.8rem)); pointer-events: none; }
.notice {
  display: grid;
  grid-template-columns: .55rem 1fr;
  gap: .7rem;
  padding: .65rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  text-align: left;
  font-size: .85rem;
  line-height: 1.4;
  cursor: var(--cursor-pointer, pointer);
  pointer-events: auto;
  animation: slide .25s ease;
}
.notice::before { content: ""; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--c, var(--coral)); }
:where(.notice) b { display: block; font: 700 .75rem var(--mono); }
.notice .sample { color: var(--soft); font-size: .75rem; }
.notice-trophy-icon { display: none; }
.notice.is-leaving { opacity: 0; transform: translateX(10px); transition: opacity .25s, transform .25s; }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } }
/* =========================================================*
*   SCREENSAVER*
*========================================================= */
#screensaver {
  position: fixed;
  inset: 0;
  z-index: 90000;
  overflow: hidden;
  background: rgba(26, 20, 19, .94);
  animation: saverIn .6s ease;
}
@keyframes saverIn { from { opacity: 0; } }
.saver-bot {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 150px;
  height: 128px;
  border: 5px solid var(--paper);
  border-radius: 34px;
  background: var(--coral);
  transition: background .3s ease;
  will-change: transform;
}
.saver-bot .eye { width: 28px; height: 36px; border-radius: 14px; background: var(--ink); }
.saver-bot .pupil { top: 9px; left: 7px; width: 14px; height: 14px; }
.saver-flash {
  position: absolute;
  top: 45%;
  left: 50%;
  margin: 0;
  color: var(--paper);
  font: 800 clamp(2.5rem, 8vw, 5rem) var(--mono);
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0;
  pointer-events: none;
}
.saver-flash.is-on { animation: flash 1.6s ease forwards; }
@keyframes flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
.saver-hint { position: absolute; left: 0; right: 0; bottom: 1.5rem; margin: 0; color: #A69D96; font: .8rem var(--mono); text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* =========================================================*
*   PHONE*
*========================================================= */
/* =========================================================*
*   REDUCED MOTION*
*========================================================= */
@media (prefers-reduced-motion: reduce) {
  .live, .eye, .iso-logo, .bot.is-celebrating { animation: none; }
  .js .window.is-opening, .js .window.is-closing, .notice, .cursor-spark, #screensaver { animation: none; }
    :where(.icon) svg, .bot, .invoice, .job-row, .skill-chip, .btn { transition: none; }
}/* =========================================================
   SAFEGUARDS
========================================================= */
.safeguard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: .35rem 0 1rem;
}
.safeguard-card {
  padding: .75rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper-2);
}
.safeguard-kicker {
  display: block;
  margin-bottom: .25rem;
  color: var(--soft);
  font: 700 .64rem var(--mono);
  letter-spacing: .04em;
}
:where(.safeguard-card) strong {
  display: block;
  margin-bottom: .25rem;
  font-size: .94rem;
}
:where(.safeguard-card) p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.45;
}

/* =========================================================
   RESUME
========================================================= */
.resume-body { text-align: center; }
.resume-name {
  margin: 0 0 .25rem;  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.025em;
}
.resume-location {
  color: var(--soft);
  font: .8rem var(--mono);
}
.resume-body .links { justify-content: center; }

/* =========================================================
   COLLAPSIBLE SECTIONS (desktop base)
   On the phone these are accordions. On the desktop there is
   room to show them outright, so the summary becomes a plain
   heading instead of a raw browser disclosure triangle.
   The phone rules later in this file override all of it.
========================================================= */
body:not(.mobile-os) .mobile-collapse { margin: 1.1rem 0; }
:where(body:not(.mobile-os) .mobile-collapse) > summary {
  margin: 0 0 .5rem;
  font: 800 .95rem/1.3 var(--sans);
  letter-spacing: -.01em;
  list-style: none;
  cursor: default;
}
:where(body:not(.mobile-os) .mobile-collapse) > summary::-webkit-details-marker { display: none; }
:where(body:not(.mobile-os) .mobile-collapse) > summary::marker { content: ""; }
.mobile-shell { display: none; }
/*  =========================================================
   MOBILE shaynahOS — CONSOLIDATED PHONE STYLES
   Keep phone-only overrides in this single block.
=========================================================  */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .safeguard-grid { grid-template-columns: 1fr; }

  .telegram-preview { max-width: 100%; }
  .telegram-foot { flex-wrap: wrap; }

  .readme-projects { grid-template-columns: 1fr; }
  .about-background-hero {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    align-items: start;
  }
  .about-photo {
    aspect-ratio: 4 / 5;
    object-position: center 20%;
  }
  :where(.about-background-copy) h3 { font-size: 1.3rem; }
  .work-sequence {
    gap: .3rem;
    font-size: .62rem;
  }
  :root { --task-h: 3.15rem; }
  body { overflow: hidden; }
  .desktop {
    overflow-y: auto;
    padding: calc(var(--mb-h) + 1rem) 1rem calc(var(--task-h) + 5.5rem);
    background:
      radial-gradient(circle at 90% 8%, rgba(255,255,255,.35), transparent 15rem),
      repeating-linear-gradient(30deg, rgba(255,255,255,.16) 0 1px, transparent 1px 46px),
      repeating-linear-gradient(150deg, rgba(255,255,255,.16) 0 1px, transparent 1px 46px),
      linear-gradient(165deg, #FAD3C0 0%, #F4A58F 52%, #EF7B6F 100%);
  }
  .widget { display: block; margin-bottom: 1.4rem; padding: 1rem 1.1rem; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); box-shadow: 4px 4px 0 var(--ink); }
  :where(.widget) p { margin: 0; }
  .widget-hi { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
  .icons { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; grid-auto-columns: auto; gap: 1rem .3rem; width: auto; }
  .icon { padding: .25rem 0; }
  :where(.icon) svg { width: 3.5rem; height: 3.5rem; }
  .alignedfx-app-icon .alignedfx-icon-frame, :where(.alignedfx-icon-frame) img { width: 3.8rem; height: 3.8rem; }
  .icon > span:last-child { font-size: .65rem; line-height: 1.25; }
  .bot { right: 1rem; bottom: calc(var(--task-h) + 1rem); }
  .js .window.is-open {
    position: fixed;
    inset: 0 0 var(--task-h) 0;
    width: auto;
    max-height: none;
    border: 0;
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  .win-bar { cursor: default; }
  .checker-cols, .spot, .mock-proof { grid-template-columns: 1fr; }
  .mock-arrow { width: 2px; height: 1.2rem; margin: 0 auto; }
  .mock-arrow::after { right: -4px; top: auto; bottom: -3px; border: 5px solid transparent; border-top: 7px solid var(--ink); }
  .mock-review-row { grid-template-columns: 1fr auto; }
  .mock-review-row span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--soft); }
  .about-tabs .win-tab { padding: .35rem .55rem; font-size: .68rem; }
  .job-demo-toolbar { align-items: stretch; flex-wrap: wrap; }
  .job-demo-toolbar .label, :where(.job-demo-toolbar) select { width: 100%; }
  .job-stats { grid-template-columns: repeat(2, 1fr); }
  .job-board { overflow-x: auto; }
  .job-row { grid-template-columns: minmax(9rem, 1.5fr) 2.8rem 5.6rem 4.5rem; min-width: 24rem; }
  .contact-actions { flex-direction: column; }
  .contact-actions .btn { text-align: center; }
  .recycle-table { overflow-x: auto; }
  .recycle-row { min-width: 35rem; }
  .task-start-text, .sound-label { display: none; }
  .sound-toggle { min-width: 0; }
  .task-app { min-width: 4.6rem; max-width: 7rem; font-size: .62rem; }
  .task-clock { min-width: 3.8rem; font-size: .62rem; }
  .js .window.is-opening { animation: mobileWindowIn .26s cubic-bezier(.2, .8, .2, 1); }
  .js .window.is-closing { animation: mobileWindowOut .18s ease forwards; }
  @keyframes mobileWindowIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes mobileWindowOut { to { opacity: 0; transform: translateY(20px); } }
  :root {
    --mobile-top: env(safe-area-inset-top, 0px);
    --mobile-bottom: env(safe-area-inset-bottom, 0px);
    --glass: rgba(255, 248, 243, .72);
    --glass-line: rgba(26, 20, 19, .14);
    --m-wall:
      radial-gradient(60% 40% at 88% 4%, rgba(255, 231, 160, .9), transparent 70%),
      radial-gradient(55% 45% at 0% 38%, rgba(200, 182, 255, .55), transparent 70%),
      radial-gradient(70% 50% at 100% 100%, rgba(239, 111, 108, .75), transparent 70%),
      radial-gradient(50% 40% at 10% 100%, rgba(111, 199, 195, .45), transparent 70%),
      linear-gradient(170deg, #FBE2D3 0%, #F7BFA9 55%, #F29A86 100%);
  }

  html, body { width: 100%; min-height: 100%; overscroll-behavior: none; }
  body { min-height: 100dvh; overflow: hidden; }
  body.mobile-os .desktop { min-height: 100dvh; height: 100dvh; padding: 0; background: var(--m-wall); }

  /* Desktop pieces have no place on the phone */
  body.mobile-os .desktop > .icons,
  body.mobile-os .desktop > .widget,
  body.mobile-os .desktop > .bot,
  body.mobile-os .taskbar { display: none; }

  .mobile-shell {
    position: fixed;
    inset: 0;
    z-index: 1200;
    font-family: var(--sans);
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-shell.is-active { display: block; }
  .mobile-shell button, .mobile-shell a { font-family: inherit; color: inherit; cursor: var(--cursor-pointer, pointer); }

  .mobile-lock,
  .mobile-home {
    position: absolute;
    inset: 0;
    background: var(--m-wall);
  }
  .mobile-lock::after,
  .mobile-home::after {
    /* fine dot texture so the gradient has some tooth */
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(26, 20, 19, .09) 1px, transparent 1.2px);
    background-size: 18px 18px;
    pointer-events: none;
  }
  .mobile-lock > *, .mobile-home > * { position: relative; z-index: 1; }

  .mobile-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 2.2rem;
    padding: calc(var(--mobile-top) + .35rem) 1.4rem 0;
    font: 700 .78rem var(--mono);
  }
  .mobile-status-trophies {
    padding: .12rem .5rem;
    border-radius: 999px;
    background: rgba(26, 20, 19, .08);
  }

  /* ---------- Pip's face, at any size ---------- */
  .m-face {
    --s: 1;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(7px * var(--s));
    width: calc(58px * var(--s));
    height: calc(50px * var(--s));
    flex: 0 0 auto;
    border: calc(2.5px * var(--s)) solid var(--ink);
    border-radius: calc(14px * var(--s));
    background: var(--paper);
    box-shadow: calc(4px * var(--s)) calc(4px * var(--s)) 0 var(--ink);
  }
  .m-eye {
    position: relative;
    width: calc(12px * var(--s));
    height: calc(15px * var(--s));
    border-radius: calc(6px * var(--s));
    background: var(--ink);
    overflow: hidden;
    animation: blink 5s infinite;
  }
  .m-pupil {
    position: absolute;
    top: calc(4px * var(--s));
    left: calc(3px * var(--s));
    width: calc(6px * var(--s));
    height: calc(6px * var(--s));
    border-radius: 50%;
    background: var(--paper);
    transform: translate(var(--px, 0px), var(--py, 0px));
    transition: transform .12s ease-out;
  }
  .m-face-sm { --s: .62; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
  .m-face-md { --s: 1.15; }
  .m-face-xl { --s: 2.3; }
  .m-face.is-poked { animation: mPoke .38s cubic-bezier(.3, 1.5, .5, 1); }
  .m-face.is-celebrating { background: var(--gold); animation: celebrate .9s cubic-bezier(.3, 1.4, .5, 1); }
  @keyframes mPoke {
    0% { transform: scale(1); }
    35% { transform: scale(1.12, .88); }
    70% { transform: scale(.95, 1.06); }
    100% { transform: scale(1); }
  }

  /* ---------- Lock screen ---------- */
  .mobile-lock {
    z-index: 3;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    padding-bottom: calc(var(--mobile-bottom) + .5rem);
    transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
    touch-action: none;
  }
  .mobile-lock.is-dragging { transition: none; }
  .mobile-lock.is-unlocked {
    transform: translateY(-104%);
    opacity: .4;
    pointer-events: none;
  }

  .mobile-lock-center { text-align: center; margin-top: 4vh; }
  .mobile-lock-date { font-weight: 700; font-size: 1.05rem; opacity: .8; }
  .mobile-lock-clock {
    margin-top: .1rem;
    font: 800 clamp(4.6rem, 25vw, 7rem)/.95 var(--sans);
    letter-spacing: -.055em;
    color: var(--ink);
    text-shadow: 0 2px 0 rgba(255, 248, 243, .5);
  }
  @keyframes mFloat { 50% { transform: translateY(-12px); } }
  @keyframes mShadow { 50% { transform: scaleX(.78); opacity: .6; } }

  .mobile-lock-note {
    display: flex;
    align-items: center;
    gap: .85rem;
    width: calc(100% - 1.5rem);
    max-width: 24rem;
    margin: 0 auto 1.1rem;
    padding: .85rem 1rem;
    border: 1px solid var(--glass-line);
    border-radius: 22px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 10px 30px rgba(71, 38, 33, .14);
    text-align: left;
    animation: mNoteIn .6s .35s cubic-bezier(.2, .9, .3, 1.2) both;
  }
  @keyframes mNoteIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
  .m-note-text { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.35; }
  .m-note-top { display: flex; justify-content: space-between; margin-bottom: .1rem; }
  :where(.m-note-top) strong { font: 700 .74rem var(--mono); letter-spacing: .02em; }
  :where(.m-note-top) small { color: var(--soft); font-size: .72rem; }

  .mobile-swipe-hint {
    display: grid;
    justify-items: center;
    gap: .55rem;
    padding-bottom: .3rem;
  }
  :where(.mobile-swipe-hint) small {
    font: 700 .74rem var(--mono);
    opacity: .75;
    animation: mHint 2.4s ease-in-out infinite;
  }
  .m-home-bar { width: 8.5rem; height: 5px; border-radius: 999px; background: var(--ink); }
  @keyframes mHint {
    0%, 100% { transform: translateY(0); opacity: .45; }
    50% { transform: translateY(-6px); opacity: .9; }
  }

  /* ---------- Home screen ---------- */
  .mobile-home {
    z-index: 1;
    display: flex;
    flex-direction: column;
    transform: scale(.94);
    opacity: 0;
    transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
  }
  .mobile-shell.is-unlocked .mobile-home { transform: none; opacity: 1; }

  .mobile-home-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: .9rem 1.1rem calc(7.6rem + var(--mobile-bottom));
  }

  /* Legacy mobile-home transitions are disabled in the hybrid phone layout.
     The unlock + icon arrival below owns this animation now. */

  .m-greet { margin: .2rem .15rem 1.1rem; }
  :where(.m-greet) small { font: 700 .74rem var(--mono); opacity: .7; }
  :where(.m-greet) h1 { margin: .15rem 0 .25rem; font: 800 2.05rem/1.05 var(--sans); letter-spacing: -.035em; }
  :where(.m-greet) p { margin: 0; font-size: .95rem; line-height: 1.4; opacity: .82; }

  .m-widget {
    position: relative;
    border: 2px solid var(--ink);
    border-radius: 24px;
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--ink);
    text-align: left;
    transition: transform .12s ease, box-shadow .12s ease;
  }
  button.m-widget:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
  .m-widget-label {
    position: absolute;
    top: .8rem;
    left: .95rem;
    font: 700 .66rem var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .6;
  }

  .m-bot-widget {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem;
    align-items: center;
    width: 100%;
    margin-bottom: .85rem;
    padding: 1rem 1rem 1rem 1.1rem;
    background: #C8D9FF;
  }
  .m-bot-copy { display: grid; gap: .4rem; min-width: 0; }
  .m-bot-copy .m-widget-label,
  .m-trophy-copy .m-widget-label { position: static; }
  .m-bot-line {
    position: relative;
    display: block;
    min-height: 2.9em;
    padding: .55rem .7rem;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--paper);
    font-size: .86rem;
    line-height: 1.35;
  }
  .m-bot-line::before {
    /* speech bubble tail pointing at the face */
    content: "";
    position: absolute;
    left: -9px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
    transform: rotate(45deg);
  }

  .m-trophy-widget {
    display: grid;
    grid-template-columns: 4.1rem 1fr auto;
    gap: .9rem;
    align-items: center;
    width: 100%;
    margin-bottom: .85rem;
    padding: .8rem 1rem .8rem .9rem;
    background: var(--gold);
  }
  .m-trophy-copy { display: grid; gap: .2rem; min-width: 0; }
  .m-trophy-next { font-size: .86rem; font-weight: 700; line-height: 1.3; }
  .m-ring { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; }
  :where(.m-ring) svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
  :where(.m-ring) circle { fill: none; stroke-width: 7; }
  .m-ring-track { stroke: rgba(26, 20, 19, .15); }
  .m-ring-fill {
    stroke: var(--ink);
    stroke-linecap: round;
    stroke-dasharray: 163.4;
    stroke-dashoffset: 163.4;
    transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1);
  }
  .m-ring-num { font: 800 1.35rem/1 var(--sans); letter-spacing: -.04em; }
  .m-ring-num::after { content: "/5"; font-size: .7rem; opacity: .55; }

  .mobile-start-widget { padding: .95rem .95rem .8rem; }
  .mobile-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 .1rem .6rem;
  }
  :where(.mobile-widget-head) span { font: 700 .66rem var(--mono); letter-spacing: .04em; text-transform: uppercase; opacity: .6; }
  :where(.mobile-widget-head) small { color: var(--soft); font: .66rem var(--mono); }
  .mobile-start-cards { display: grid; }
  .mobile-start-card {
    display: grid;
    grid-template-columns: 2.9rem 1fr auto;
    gap: .8rem;
    align-items: center;
    padding: .6rem .15rem;
    border: 0;
    border-top: 1.5px dashed rgba(26, 20, 19, .2);
    background: transparent;
    text-align: left;
  }
  .mobile-start-card:first-child { border-top: 0; }
  .mobile-start-card-icon {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 2px solid var(--ink);
    border-radius: 13px;
    background: var(--paper-2);
  }
  .mobile-start-card:nth-child(1) .mobile-start-card-icon { background: #DDF2F0; }
  .mobile-start-card:nth-child(2) .mobile-start-card-icon { background: #FBF0C8; }
  .mobile-start-card:nth-child(3) .mobile-start-card-icon { background: #DDF0E3; }
  :where(.m-card-text) strong { display: block; font-size: .98rem; }
  :where(.m-card-text) small { display: block; margin-top: .1rem; color: var(--soft); font-size: .76rem; }
  .m-chev { font-size: 1.5rem; line-height: 1; opacity: .35; }

  .mobile-app-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem .5rem;
    margin: 1.4rem 0 .5rem;
  }
  .mobile-app,
  .mobile-dock > * {
    display: grid;
    justify-items: center;
    gap: .4rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
    font: 700 .7rem/1.15 var(--sans);
    text-align: center;
  }
  .mobile-app-tile {
    display: grid;
    place-items: center;
    width: min(16.5vw, 4.1rem);
    aspect-ratio: 1;
    border: 2px solid var(--ink);
    border-radius: 22%;
    box-shadow: 3px 3px 0 var(--ink);
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
  }
  .mobile-app:active .mobile-app-tile,
  .mobile-dock > *:active .mobile-app-tile { transform: translate(2px, 2px) scale(.96); box-shadow: 1px 1px 0 var(--ink); }
  :where(.mobile-app-tile) svg { display: block; width: 66%; height: 66%; }
  .mobile-app-logo { display: block; width: 78%; height: 78%; object-fit: contain; }

  .app-readme { background: #FFF8F3; }
  .app-about { background: #F4A9A0; }
  .app-skills { background: #C8D9FF; }
  .app-resume { background: #FFE2DC; }
  .app-aligned { background: #A7B39B; }
  .app-game { background: #C8B6FF; }
  .app-trophy { background: #E8C547; }
  .app-deleted { background: #F2D9C8; }
  .app-sound { background: #1A1413; }
  .app-sound svg path[fill] { fill: #FFF8F3; }
  .app-sound .m-sound-on path:not([fill]) { stroke: #FFF8F3; }
  .app-sound .m-sound-on { display: none; }
  #mobile-sound[aria-pressed="true"] .app-sound { background: #7CC49A; }
  #mobile-sound[aria-pressed="true"] .app-sound svg path[fill] { fill: #FFF8F3; }
  #mobile-sound[aria-pressed="true"] .app-sound .m-sound-on path:not([fill]) { stroke: var(--ink); }
  #mobile-sound[aria-pressed="true"] .m-sound-on { display: block; }
  #mobile-sound[aria-pressed="true"] .m-sound-off { display: none; }
  .app-contact { background: #F2D9C8; }
  .app-credits { background: #EF6F6C; }

  .mobile-dock {
    position: absolute;
    left: .75rem;
    right: .75rem;
    bottom: calc(.6rem + var(--mobile-bottom));
    z-index: 5;
    display: flex;
    justify-content: space-evenly;
    padding: .75rem .5rem .6rem;
    border: 2px solid var(--ink);
    border-radius: 30px;
    background: rgba(255, 248, 243, .9);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 10px 30px rgba(71, 38, 33, .16);
  }
  .mobile-dock > * { flex: 0 0 4.6rem; }
  :where(.mobile-dock) small { font-size: .64rem; font-weight: 700; }

  /* ---------- Trophy banners drop from the top, like phone notifications ---------- */
  body.mobile-os .notices {
    top: calc(var(--mobile-top) + .5rem);
    left: .6rem;
    right: .6rem;
    width: auto;
  }
  body.mobile-os .notice {
    grid-template-columns: 2.3rem 1fr;
    align-items: center;
    padding: .7rem .85rem;
    border: 1px solid var(--glass-line);
    border-radius: 20px;
    background: rgba(255, 248, 243, .88);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(71, 38, 33, .2);
    animation: mBanner .45s cubic-bezier(.2, .9, .3, 1.15);
  }
  body.mobile-os .notice.has-trophy-icon::before { display: none; }
  body.mobile-os .notice.has-trophy-icon {
    grid-template-columns: 2.3rem minmax(0, 1fr);
    touch-action: none;
  }
  body.mobile-os .notice-trophy-icon {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
  }
  body.mobile-os .notice-trophy-icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }
  body.mobile-os .notice.is-leaving { transform: translateY(-120%); }
  @keyframes mBanner { from { transform: translateY(-130%); } }

  /* ---------- Apps open full screen ---------- */
  .mobile-shell.is-app-open { pointer-events: none; z-index: 1600; }
  .mobile-shell.is-app-open .mobile-home { opacity: 0; transform: scale(.94); }
  .mobile-shell.is-app-open .mobile-app-chrome { pointer-events: auto; }

  .mobile-app-chrome {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1500;
    padding-top: var(--mobile-top);
    background: var(--app-c, var(--paper));
  }
  .mobile-app-header {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3.2rem;
    padding: .2rem .6rem;
    border-bottom: 2px solid var(--ink);
  }
  :where(.mobile-app-header) strong {
    position: absolute;
    left: 50%;
    width: min(58vw, 17rem);
    transform: translateX(-50%);
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 700 .82rem var(--mono);
  }
  .mobile-home-btn {
    justify-self: start;
    min-height: 2.2rem;
    padding: 0 .75rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    font-weight: 800;
    font-size: .82rem;
  }
  .mobile-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 10;
    height: 3px;
    width: 0%;
    background: var(--coral);
    transition: width .1s ease-out;
  }

  body.mobile-os .window.is-open {
    position: fixed;
    inset: calc(var(--mobile-top) + 3.2rem) 0 0 0;
    z-index: 1450;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--paper);
    overflow: hidden;
  }
  body.mobile-os .window.is-closing { animation: mobileAppOut .2s ease forwards; }
  @keyframes mobileAppOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }

  body.mobile-os .window .win-bar { display: none; }
  body.mobile-os .window .win-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1rem calc(2rem + var(--mobile-bottom));
  }
  body.mobile-os .window .win-tabs { position: static; margin: 0; }
  body.mobile-os .window .win-tab { min-height: 2.6rem; flex: 1; }

  .mobile-collapse { margin: .75rem 0; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; }
  :where(.mobile-collapse) summary { padding: .7rem .8rem; background: var(--paper-2); font-weight: 800; cursor: var(--cursor-pointer, pointer); }
  .mobile-collapse > *:not(summary) { margin-left: .75rem; margin-right: .75rem; }
  .mobile-checker-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; margin: .7rem 0; }
  .checker-cols { grid-template-columns: 1fr; }
  :where(.checker) pre, :where(.checker) textarea { height: 9rem; min-height: 9rem; }

  .job-board { display: grid; gap: .55rem; border: 0; }
  .job-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .25rem .6rem;
    min-width: 0;
    padding: .7rem .75rem;
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    background: var(--paper);
  }
  .job-row.job-head { display: none; }
  .job-row span:nth-child(1) { grid-column: 1 / -1; font-weight: 800; }
  .job-row span:nth-child(2), .job-row span:nth-child(3) { font-size: .72rem; color: var(--soft); }
  :where(.job-row) strong { grid-column: 2; grid-row: 2 / span 2; align-self: center; justify-self: end; }
  .spot { grid-template-columns: 1fr; }

  /* Trophies as cards */
  body.mobile-os .trophy-list { display: grid; gap: .6rem; }
  :where(body.mobile-os .trophy-list) li {
    grid-template-columns: 2.6rem 1fr;
    gap: .75rem;
    align-items: center;
    margin: 0;
    padding: .8rem .9rem;
    border: 2px dashed rgba(26, 20, 19, .3);
    border-radius: 16px;
    font-family: var(--sans);
  }
  body.mobile-os .trophy-list li.earned { border: 2px solid var(--ink); background: #FBF0C8; box-shadow: 3px 3px 0 var(--ink); }
  body.mobile-os .trophy-list .box {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--paper-2);
    font-size: 0;
  }
  body.mobile-os .trophy-list .box::before { content: "🔒"; font-size: 1.05rem; filter: grayscale(1); opacity: .6; }
  body.mobile-os .trophy-list .earned .box { background: var(--gold); border: 2px solid var(--ink); }
  body.mobile-os .trophy-list .earned .box::before { content: ""; filter: none; opacity: 1; }
  body.mobile-os .trophy-list .t-name { font-size: .95rem; }
  body.mobile-os .trophy-list .t-hint { font-size: .8rem; line-height: 1.35; }

  @media (hover: none) {
    .icon:hover, .btn:hover, .small-btn:hover { transform: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-lock,
.mobile-home,
.m-greet,
.m-bot-widget,
.m-trophy-widget,
.mobile-start-widget,
.mobile-app-grid,
.mobile-dock,
.mobile-lock-note,
:where(.mobile-swipe-hint) small,
.m-eye,
body.mobile-os .window.is-open,
body.mobile-os .window.is-closing,
body.mobile-os .notice {
      animation: none;
      transition: none;
    }
  }
  :root {
    --mobile-top: env(safe-area-inset-top, 0px);
    --mobile-bottom: env(safe-area-inset-bottom, 0px);
    --m-wall:
      repeating-linear-gradient(30deg, rgba(255,255,255,.16) 0 1px, transparent 1px 46px),
      repeating-linear-gradient(150deg, rgba(255,255,255,.16) 0 1px, transparent 1px 46px),
      radial-gradient(circle at 88% 8%, rgba(255,255,255,.28), transparent 15rem),
      linear-gradient(160deg, #FAD3C0 0%, #F4A58F 50%, #EF7B6F 100%);
  }

  body.mobile-os .desktop {
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
    background: var(--m-wall);
  }

  body.mobile-os .desktop > .icons,
  body.mobile-os .desktop > .widget,
  body.mobile-os .desktop > .bot,
  body.mobile-os .taskbar {
    display: none;
  }

  .mobile-shell {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    color: var(--ink);
    font-family: var(--sans);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-shell.is-active { display: block; }

  .mobile-lock,
  .mobile-home {
    position: absolute;
    inset: 0;
    background: var(--m-wall);
  }

  .mobile-lock::after,
  .mobile-home::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.12), transparent 11rem);
  }

  .mobile-lock > *,
  .mobile-home > * {
    position: relative;
    z-index: 1;
  }

  .mobile-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 2.2rem;
    padding: calc(var(--mobile-top) + .35rem) 1.2rem 0;
    font: 700 .76rem var(--mono);
  }

  .mobile-status-trophies {
    padding: .12rem .45rem;
    border-radius: 999px;
    background: rgba(255,248,243,.38);
  }

  /* ---------- Lock screen ---------- */
  .mobile-lock {
    z-index: 3;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    padding-bottom: calc(.75rem + var(--mobile-bottom));
    transition: transform .48s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
  }

  .mobile-lock.is-unlocked {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-lock-center {
    align-self: start;
    margin-top: 10vh;
    text-align: center;
  }

  .mobile-lock-clock {
    font-size: clamp(4.5rem, 22vw, 6.6rem);
    font-weight: 300;
    line-height: .92;
    letter-spacing: -.065em;
  }

  .mobile-lock-date {
    margin-top: .55rem;
    font-weight: 750;
  }

  .hybrid-lock-bot {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 1rem;
    width: min(88vw, 24rem);
    margin: 0 auto 1.15rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .hybrid-lock-bubble {
    position: relative;
    max-width: 17.5rem;
    padding: .7rem .95rem;
    border: 2.5px solid var(--ink);
    border-radius: 19px;
    background: var(--paper);
    box-shadow: 4px 4px 0 rgba(26,20,19,.9);
    font-weight: 650;
    text-align: left;
  }

  .hybrid-lock-bubble::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -14px;
    width: 18px;
    height: 18px;
    border-right: 2.5px solid var(--ink);
    border-bottom: 2.5px solid var(--ink);
    background: var(--paper);
    transform: translateX(-50%) rotate(45deg);
  }

  .mobile-swipe-hint {
    display: grid;
    justify-items: center;
    gap: .45rem;
    padding-bottom: .15rem;
  }

  :where(.mobile-swipe-hint) small {
    font: 700 .7rem var(--mono);
    opacity: .72;
    animation: hybridHint 2.2s ease-in-out infinite;
  }

  .m-home-bar {
    width: 7.8rem;
    height: 5px;
    border-radius: 999px;
    background: var(--ink);
  }

  @keyframes hybridHint {
    0%,100% { transform: translateY(0); opacity: .45; }
    50% { transform: translateY(-5px); opacity: .9; }
  }

  /* ---------- Home screen ---------- */
  .mobile-home {
    z-index: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(.94);
  }

  .mobile-shell.is-unlocked .mobile-home {
    opacity: 1;
    transform: none;
  }

  .mobile-home-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: .8rem .95rem calc(7rem + var(--mobile-bottom));
  }

  .hybrid-mobile-greeting {
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: rgba(255,248,243,.92);
    box-shadow: 4px 4px 0 var(--ink);
  }

  :where(.hybrid-mobile-greeting) small {
    display: block;
    margin-bottom: .15rem;
    color: var(--soft);
    font: 700 .66rem var(--mono);
  }

  :where(.hybrid-mobile-greeting) h1 {
    margin: 0 0 .25rem;
    font-size: 1.55rem;
    line-height: 1.05;
    letter-spacing: -.035em;
  }

  :where(.hybrid-mobile-greeting) p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.4;
  }

  .hybrid-app-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem .55rem;
    align-items: start;
    padding-bottom: 1.2rem;
  }

  .mobile-app {
    display: grid;
    justify-items: center;
    gap: .38rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font: 700 .69rem/1.15 var(--sans);
    text-align: center;
  }

  .mobile-app-tile {
    display: grid;
    place-items: center;
    width: min(20vw, 4.5rem);
    aspect-ratio: 1;
    border: 2px solid var(--ink);
    border-radius: 17px;
    background: var(--paper);
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform .12s ease;
  }

  .mobile-app:active .mobile-app-tile { transform: scale(.93); }

  /* Touch taps should depress the icon, not leave Safari's square focus artifact. */
  .mobile-app,
  .mobile-app-tile {
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-app:focus:not(:focus-visible),
  .mobile-app:focus-visible {
    outline: none;
  }

  /* Safari/Chrome mobile: no native button chrome or lingering focus rectangle. */
  button.mobile-app {
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    outline: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  button.mobile-app:hover,
  button.mobile-app:focus,
  button.mobile-app:focus-visible,
  button.mobile-app:active {
    -webkit-appearance: none;
    appearance: none;
    outline: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  /*
    iPhone-inspired SpringBoard arrival:
    the home surface settles in first, then app icons use a short spring-like
    fly-in with a tiny overshoot instead of a generic fade.
  */
  .mobile-shell.is-unlocking .hybrid-mobile-greeting,  .mobile-shell.is-unlocking .mobile-app {
    opacity: 1;
    transform: none;
  }

  .mobile-shell.is-home-arriving .hybrid-mobile-greeting {
    animation: mobileHomeCardIn .34s cubic-bezier(.22,.8,.22,1) both;
  }

  .mobile-shell.is-home-arriving .mobile-app {
    animation: mobileSpringIconIn .50s cubic-bezier(.18,.88,.26,1.12) both;
  }

  .mobile-shell.is-home-arriving .mobile-app:nth-child(4n+1) { --fly-x: -8px; }
  .mobile-shell.is-home-arriving .mobile-app:nth-child(4n+2) { --fly-x: -3px; }
  .mobile-shell.is-home-arriving .mobile-app:nth-child(4n+3) { --fly-x: 3px; }
  .mobile-shell.is-home-arriving .mobile-app:nth-child(4n) { --fly-x: 8px; }

  .mobile-shell.is-home-arriving .mobile-app:nth-child(-n+4) { animation-delay: .02s; }
  .mobile-shell.is-home-arriving .mobile-app:nth-child(n+5):nth-child(-n+8) { animation-delay: .045s; }
  .mobile-shell.is-home-arriving .mobile-app:nth-child(n+9) { animation-delay: .07s; }

  @keyframes mobileHomeCardIn {
    0% { opacity: 0; transform: translateY(5px) scale(.985); }
    100% { opacity: 1; transform: none; }
  }

  @keyframes mobileSpringIconIn {
    0% {
      opacity: 0;
      transform: translate3d(var(--fly-x, 0), 10px, 0) scale(.86);
    }
    68% {
      opacity: 1;
      transform: translate3d(0, -1px, 0) scale(1.022);
    }
    86% {
      transform: translate3d(0, 0, 0) scale(.996);
    }
    100% {
      opacity: 1;
      transform: none;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-shell.is-home-arriving .hybrid-mobile-greeting,
    .mobile-shell.is-home-arriving .mobile-app {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }


  .mobile-app-featured .mobile-app-tile {
    background: #FFF1E9;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .mobile-app-featured > span:last-child {
    font-weight: 850;
  }

  :where(.mobile-app-tile) svg {
    width: 72%;
    height: 72%;
  }

  .mobile-app-logo {
    display: block;
    width: 78%;
    height: 78%;
    object-fit: contain;
  }

  .m-sound-on { display: none; }
  #mobile-sound[aria-pressed="true"] .m-sound-on { display: block; }
  #mobile-sound[aria-pressed="true"] .m-sound-off { display: none; }

  /* ---------- Pip lives on the phone, not inside a widget ---------- */
  .mobile-floating-bot {
    position: fixed;
    right: .85rem;
    bottom: calc(.95rem + var(--mobile-bottom));
    z-index: 1900;
    display: grid;
    justify-items: end;
    gap: .55rem;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity .25s ease, transform .32s ease;
  }

  .mobile-shell.is-unlocked .mobile-floating-bot {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .mobile-shell.is-app-open .mobile-floating-bot {
    pointer-events: auto;
  }

  .mobile-bubble {
    position: relative;
    display: block;
    width: max-content;
    max-width: min(15.5rem, calc(100vw - 5.5rem));
    padding: .62rem .8rem;
    border: 2.5px solid var(--ink);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 3px 3px 0 var(--ink);
    font-size: .82rem;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transform: scale(.72) translateY(7px);
    transform-origin: 88% 120%;
    pointer-events: none;
    transition: opacity .18s ease, transform .22s cubic-bezier(.3,1.45,.5,1);
  }

  .mobile-bubble.is-on {
    opacity: 1;
    transform: none;
  }

  .mobile-bubble::before {
    content: "";
    position: absolute;
    right: 26px;
    bottom: -11px;
    width: 16px;
    height: 16px;
    border-right: 2.5px solid var(--ink);
    border-bottom: 2.5px solid var(--ink);
    background: var(--paper);
    transform: rotate(45deg);
  }

  .mobile-bot-avatar.is-arriving {
    animation: hybridBotArrival .72s ease-in-out;
  }

  @keyframes hybridBotArrival {
    0%,100% { transform: translateY(0); }
    18% { transform: translateY(-15px); }
    34% { transform: translateY(0); }
    55% { transform: translateY(-11px); }
    72% { transform: translateY(0); }
  }

  /* ---------- Apps remain full-screen on phones ---------- */
  .mobile-shell.is-app-open {
    z-index: 1600;
    pointer-events: none;
  }

  .mobile-shell.is-app-open .mobile-home {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-shell.is-app-open .mobile-app-chrome,
  .mobile-shell.is-app-open .mobile-floating-bot {
    pointer-events: auto;
  }

  .mobile-app-chrome {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1800;
    padding-top: var(--mobile-top);
    background: var(--app-c, var(--paper));
  }

  .mobile-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 10;
    height: 3px;
    width: 0%;
    background: var(--coral);
    transition: width .1s ease-out;
  }

  .mobile-app-header {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3.2rem;
    padding: .25rem .55rem;
    border-bottom: 2px solid var(--ink);
  }

  :where(.mobile-app-header) strong {
    position: absolute;
    left: 50%;
    width: min(58vw, 17rem);
    transform: translateX(-50%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: .82rem;
  }

  .mobile-home-btn {
    min-height: 2.35rem;
    border: 0;
    background: transparent;
    color: #A44545;
    font-weight: 850;
    text-align: left;
  }

  body.mobile-os .window.is-open {
    position: fixed;
    inset: calc(var(--mobile-top) + 3.2rem) 0 0 0;
    z-index: 1450;
    width: 100%;
    height: calc(100dvh - var(--mobile-top) - 3.2rem);
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    overflow: hidden;
    background: var(--paper);
  }

  body.mobile-os .window .win-bar { display: none; }

  body.mobile-os .window .win-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1rem calc(5.8rem + var(--mobile-bottom));
  }

  body.mobile-os .window .win-tabs {
    position: static;
    margin: 0;
  }

  body.mobile-os .window .win-tab {
    min-height: 2.6rem;
    flex: 1;
  }

  /* Mobile label proof simulator */
  .proof-preview-head {
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
  }
  .proof-preview-head .small-btn {
    align-self: stretch;
    width: 100%;
    margin-left: 0;
    min-height: 2.45rem;
  }

  .proof-impact-values { align-items: center; }

  .proof-inbox-layout { grid-template-columns: 1fr; }
  .proof-inbox-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .proof-request { min-height: 5.4rem; }
  .proof-success-output { grid-template-columns: 1fr; }
  .proof-run-steps { min-height: 14.8rem; }
  .proof-compare-row { grid-template-columns: 1fr; gap: .15rem; }

  .job-board { display: grid; gap: .55rem; border: 0; }
  .job-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .25rem .6rem;
    min-width: 0;
    padding: .7rem .75rem;
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    background: var(--paper);
  }
  .job-row.job-head { display: none; }
  .job-row span:nth-child(1) { grid-column: 1 / -1; font-weight: 800; }
  .job-row span:nth-child(2), .job-row span:nth-child(3) { font-size: .72rem; color: var(--soft); }
  :where(.job-row) strong { grid-column: 2; grid-row: 2 / span 2; align-self: center; justify-self: end; }
  .spot { grid-template-columns: 1fr; }

  /* Phone-style trophy alerts retained */
  body.mobile-os .notices {
    top: calc(var(--mobile-top) + .5rem);
    left: .6rem;
    right: .6rem;
    width: auto;
  }

  body.mobile-os .notice {
    grid-template-columns: 2.3rem 1fr;
    align-items: center;
    padding: .7rem .85rem;
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: rgba(255,248,243,.94);
    box-shadow: 0 10px 28px rgba(71,38,33,.18);
  }

  body.mobile-os .notice.has-trophy-icon::before { display: none; }
  body.mobile-os .notice.has-trophy-icon {
    grid-template-columns: 2.3rem minmax(0, 1fr);
    touch-action: none;
  }
  body.mobile-os .notice-trophy-icon {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
  }
  body.mobile-os .notice-trophy-icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-lock,
    .mobile-home,
    .mobile-floating-bot,
    .mobile-bubble,
    .mobile-bot-avatar,
    :where(.mobile-swipe-hint) small {
      animation: none;
      transition: none;
    }
  }
  .mobile-lock {
    grid-template-rows: auto auto 1fr auto;
  }

  .mobile-lock-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 2.2rem;
    padding: calc(var(--mobile-top) + .4rem) 1.2rem 0;
  }

  .mobile-lock-center {
    align-self: start;
    margin-top: 6vh;
    text-align: center;
  }

  .mobile-lock-clock {
    font-size: clamp(4.8rem, 23vw, 6.8rem);
  }

  .mobile-lock-notifications {
    align-self: start;
    display: grid;
    gap: .55rem;
    width: min(92vw, 27rem);
    margin: 2rem auto 1rem;
  }

  .mobile-lock-notice,
  button.mobile-lock-notice {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    padding: .68rem .78rem;
    border: 1px solid rgba(26,20,19,.15);
    border-radius: 18px;
    background: rgba(255,248,243,.78);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: 0 10px 24px rgba(71,38,33,.10);
  }

  .mobile-lock-notice > span:nth-child(2) {
    display: grid;
    min-width: 0;
  }

  :where(.mobile-lock-notice) strong {
    font-size: .8rem;
    line-height: 1.2;
  }

  :where(.mobile-lock-notice) small {
    margin-top: .08rem;
    color: var(--soft);
    font-size: .76rem;
    line-height: 1.25;
  }

  :where(.mobile-lock-notice) time {
    align-self: start;
    color: var(--soft);
    font-size: .65rem;
  }

  .lock-notice-icon {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background: var(--paper);
    font: 800 .82rem var(--mono);
  }

  .lock-system { background: var(--coral); }
  .lock-projects { background: var(--mint); }
  .lock-trophies { background: var(--gold); }

  .mobile-swipe-hint {
    width: max-content;
    margin: 0 auto;
    padding: .35rem .8rem calc(.1rem + var(--mobile-bottom));
    border: 0;
    background: transparent;
    color: inherit;
  }

  /* Home status bar: sound is a control, not an app. */
  .mobile-status-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
  }

  .mobile-sound-control {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: .35rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255,248,243,.38);
  }

  :where(.mobile-sound-control) svg {
    width: 100%;
    height: 100%;
  }

  .mobile-sound-control .m-sound-on { display: none; }
  .mobile-sound-control[aria-pressed="true"] .m-sound-off { display: none; }
  .mobile-sound-control[aria-pressed="true"] .m-sound-on { display: block; }

  .mobile-sound-control.is-hinting {
    animation: mobileSoundHint .9s ease-in-out 3;
  }
  @keyframes mobileSoundHint {
    50% { box-shadow: 0 0 0 4px var(--coral); transform: translateY(-2px); }
  }

  /* Main icons return to the freer desktop-like presentation. */
  .hybrid-app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem .55rem;
    padding: .1rem 0 1.5rem;
  }

  .mobile-app {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: .38rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font: 700 .68rem/1.15 var(--sans);
    text-align: center;
  }

  .mobile-app-tile {
    display: grid;
    place-items: center;
    width: min(20vw, 4.65rem);
    height: min(20vw, 4.65rem);
    aspect-ratio: 1;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  :where(.mobile-app-tile) svg {
    width: 88%;
    height: 88%;
    filter: drop-shadow(2px 3px 0 rgba(26,20,19,.12));
  }

  .mobile-app-logo {
    width: 88%;
    height: 88%;
    object-fit: contain;
    filter: drop-shadow(2px 3px 0 rgba(26,20,19,.10));
  }

  .mobile-app-featured .mobile-app-tile {
    background: transparent;
    box-shadow: none;
  }

  .mobile-app:active .mobile-app-tile {
    transform: scale(.94);
  }

  /* Folder tiles intentionally keep the iPhone-style rounded container. */

  /* Folder overlay */

  /* Pip: no bounce on tap. He only speaks. */
  .mobile-bot-avatar.is-poked {
    animation: none;
  }

  /* Folder and app layers stay above the character when needed. */
  .hybrid-mobile-greeting {
    padding: .78rem .9rem;
    margin-bottom: .85rem;
    border-radius: 14px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  :where(.hybrid-mobile-greeting) h1 {
    font-size: 1.42rem;
    margin-bottom: .18rem;
  }

  :where(.hybrid-mobile-greeting) p {
    font-size: .84rem;
    line-height: 1.35;
  }

  .hybrid-app-grid {
    gap: 1.08rem .48rem;
  }

  .mobile-app-label {
    display: inline-block;
    max-width: 100%;
    padding: .08rem .42rem;
    border-radius: 5px;
    background: rgba(255,248,243,.96);
    box-shadow: 0 1px 0 rgba(26,20,19,.08);
    font: 700 .67rem/1.22 var(--mono);
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mobile-app-featured .mobile-app-label {
    font-weight: 800;
  }
  /* Compact the intro, but keep the original interactive-experiences copy. */
  .hybrid-mobile-greeting {
    padding: .72rem .82rem;
    margin-bottom: .75rem;
    border-radius: 14px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  :where(.hybrid-mobile-greeting) small {
    margin-bottom: .08rem;
  }

  :where(.hybrid-mobile-greeting) h1 {
    margin: 0 0 .18rem;
    font-size: 1.38rem;
    line-height: 1.04;
  }

  :where(.hybrid-mobile-greeting) p {
    margin: 0;
    font-size: .81rem;
    line-height: 1.32;
  }

  /* Real phone-like 4-across app grid. */
  .hybrid-app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .95rem .18rem;
    align-items: start;
    padding: .1rem 0 1.4rem;
  }

  .mobile-app {
    min-width: 0;
    gap: .3rem;
  }

  .mobile-app-tile {
    width: min(17.5vw, 4.2rem);
    height: min(17.5vw, 4.2rem);
  }

  :where(.mobile-app-tile) svg,
  .mobile-app-logo {
    width: 90%;
    height: 90%;
  }

  .mobile-app-label {
    max-width: calc(100% - .15rem);
    padding: .07rem .30rem;
    border-radius: 4px;
    font: 700 .58rem/1.18 var(--mono);
    letter-spacing: -.01em;
  }

  /* Old folder UI is gone. */

  /*
    iPhone-like app opening:
    the full-screen app expands out from the exact icon the visitor tapped.
    It is a springy scale/position expansion rather than a generic fade/zoom.
  */
  body.mobile-os .window.is-open,
  .mobile-app-chrome:not([hidden]) {
    transform-origin: var(--mobile-launch-x, 50vw) var(--mobile-launch-y, 70vh);
    animation: mobileAppLaunch .34s cubic-bezier(.18, .82, .22, 1) both;
    will-change: transform, opacity;
  }

  @keyframes mobileAppLaunch {
    0% {
      opacity: .45;
      transform: translate(
        calc(var(--mobile-launch-x, 50vw) - 50vw),
        calc(var(--mobile-launch-y, 70vh) - 50vh)
      ) scale(.12);
    }
    58% {
      opacity: 1;
      transform: translate(0, 0) scale(1.018);
    }
    100% {
      opacity: 1;
      transform: translate(0, 0) scale(1);
    }
  }

  /* The home screen subtly recedes while the selected app expands. */
  .mobile-shell.is-app-open .mobile-home {
    transition: transform .36s cubic-bezier(.2,.8,.2,1), opacity .26s ease;
    transform: scale(.965);
    opacity: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    body.mobile-os .window.is-open,
    .mobile-app-chrome:not([hidden]) {
      animation: none;
    }
  }
  .mobile-lock {
    display: flex;
    flex-direction: column;
    padding:
      calc(var(--mobile-top) + .65rem)
      1rem
      calc(.55rem + var(--mobile-bottom));
    overflow: hidden;
  }

  /* Small lock icon above date/time. */
  .mobile-lock-lock {
    position: relative;
    width: 1.55rem;
    height: 1.8rem;
    margin: 0 auto .8rem;
    transition: transform .18s ease;
  }

  .lock-shackle {
    position: absolute;
    left: 50%;
    top: 0;
    width: .82rem;
    height: .88rem;
    border: 2.5px solid var(--ink);
    border-bottom: 0;
    border-radius: .5rem .5rem 0 0;
    transform: translateX(-50%);
    transform-origin: 15% 85%;
    transition: transform .2s cubic-bezier(.2,.8,.2,1);
  }

  .lock-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1.2rem;
    height: 1.08rem;
    border-radius: .22rem;
    background: var(--ink);
    transform: translateX(-50%);
  }

  .mobile-lock-lock.is-unlocked .lock-shackle {
    transform: translateX(-50%) translateY(-.08rem) rotate(-32deg);
  }

  .mobile-lock-lock.is-unlocked {
    transform: translateY(-2px);
  }

  /* One clock only. Keep the current ink color. */
  .mobile-lock-center {
    margin: 0;
    text-align: center;
  }

  .mobile-lock-date {
    margin-bottom: .08rem;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 650;
  }

  .mobile-lock-clock {
    color: var(--ink);
    font-size: clamp(5.9rem, 27vw, 8rem);
    font-weight: 300;
    line-height: .9;
    letter-spacing: -.075em;
  }

  /* Small portfolio widgets underneath the clock. */
  .mobile-lock-widgets {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .65rem;
    width: min(100%, 27rem);
    margin: 1.1rem auto 0;
  }

  .lock-trophy-widget {
    min-height: 4.1rem;
    border-radius: 18px;
    background: rgba(255,248,243,.32);
    -webkit-backdrop-filter: blur(15px) saturate(1.1);
    backdrop-filter: blur(15px) saturate(1.1);
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    column-gap: .28rem;
    min-width: 5rem;
    padding: .5rem .7rem;
  }

  :where(.lock-trophy-widget) > span {
    grid-row: 1 / 3;
    font-size: 1.25rem;
  }

  :where(.lock-trophy-widget) strong {
    align-self: end;
    font-size: 1.05rem;
    line-height: 1;
  }

  :where(.lock-trophy-widget) small {
    align-self: start;
    color: rgba(26,20,19,.65);
    font-size: .62rem;
  }

  /* Two dark notification cards, closer to an actual iPhone lock screen. */
  .mobile-lock-notifications {
    display: grid;
    gap: .5rem;
    width: min(100%, 27rem);
    margin: 1.05rem auto 0;
  }

  .mobile-lock-notice,
  button.mobile-lock-notice {
    display: grid;
    grid-template-columns: 2.45rem minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    padding: .68rem .8rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: rgba(17,15,16,.86);
    color: #FFF8F3;
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    backdrop-filter: blur(18px) saturate(1.15);
    box-shadow: 0 10px 26px rgba(26,20,19,.12);
  }
  button.mobile-lock-notice { color: #FFF8F3; }

  .lock-notice-icon {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 10px;
    background: #FFF8F3;
    color: var(--ink);
  }

  .lock-projects {
    background: #7CC49A;
    font: 800 .85rem var(--mono);
  }

  .lock-bot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
  }

  .lock-bot-eye {
    display: block;
    width: .43rem;
    height: .58rem;
    border-radius: 999px;
    background: var(--ink);
  }

  .lock-bot-eye {
    transform-origin: center;
    animation: lockBotBlink 4.2s ease-in-out infinite;
  }
  @keyframes lockBotBlink {
    0%, 43%, 47%, 100% { transform: scaleY(1); }
    45%, 46% { transform: scaleY(.08); }
  }

  .lock-notice-copy {
    min-width: 0;
    display: grid;
  }

  .lock-notice-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .7rem;
  }

  :where(.lock-notice-top) strong {
    font-size: .78rem;
    line-height: 1.15;
  }

  :where(.lock-notice-top) time {
    color: rgba(255,248,243,.55);
    font-size: .65rem;
    white-space: nowrap;
  }

  :where(.lock-notice-copy) small {
    margin-top: .08rem;
    color: rgba(255,248,243,.92);
    font-size: .78rem;
    line-height: 1.28;
  }

  /* Recruiter-friendly bottom shortcuts inspired by flashlight/camera controls. */
  .mobile-lock-shortcuts {
    display: flex;
    justify-content: space-between;
    width: min(100%, 24rem);
    margin: auto auto .35rem;
    padding: 0 .35rem;
  }

  .lock-shortcut {
    display: grid;
    justify-items: center;
    gap: .25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font: 700 .62rem var(--mono);
  }

  :where(.lock-shortcut) svg {
    width: 1.55rem;
    height: 1.55rem;
  }

  .lock-shortcut::before {
    content: "";
    grid-row: 1;
    grid-column: 1;
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 50%;
    background: rgba(17,15,16,.82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  :where(.lock-shortcut) svg {
    grid-row: 1;
    grid-column: 1;
    z-index: 1;
    align-self: center;
    color: #FFF8F3;
  }

  :where(.lock-shortcut) span {
    grid-row: 2;
  }

  .mobile-swipe-hint {
    flex: 0 0 auto;
    margin: .35rem auto 0;
  }

  @media (max-height: 700px) {
    .mobile-lock-widgets { margin-top: .7rem; }
    .mobile-lock-notifications { margin-top: .7rem; }
    .mobile-lock-notice { padding-top: .55rem; padding-bottom: .55rem; }
    .mobile-lock-shortcuts { margin-bottom: .1rem; }
  }
  .mobile-lock-notice {
    opacity: 0;
    transform: translateY(18px) scale(.98);
    filter: blur(4px);
    pointer-events: none;
    transition:
      opacity .38s ease,
      transform .38s cubic-bezier(.22, 1, .36, 1),
      filter .38s ease;
  }

  .mobile-lock-notice.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
  }

  /* The Projects notice is a real button now. Strip the UA chrome so it still
     reads as a notification, and give it a little press feedback. */
  button.mobile-lock-notice {
    width: 100%;
    font: inherit;
    font-size: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
  }
  button.mobile-lock-notice.is-visible:active {
    transform: translateY(0) scale(.985);
  }
  button.mobile-lock-notice:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-lock-notice {
      transition: none;
      filter: none;
      transform: none;
    }
  }
  /* The lock screen exists from first paint. Do not wait for JS to reveal it. */
  .mobile-shell {
    display: block;
    visibility: visible;
  }

  .mobile-shell:not(.is-unlocked) .mobile-lock {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .mobile-shell:not(.is-unlocked):not(.is-unlocking) .mobile-home {
    opacity: 0;
    visibility: hidden;
    transform: scale(.98);
    pointer-events: none;
  }

  .mobile-shell.is-unlocking .mobile-home,
  .mobile-shell.is-unlocked .mobile-home {
    visibility: visible;
  }

  /* Hide desktop chrome immediately on mobile, even before JS adds body.mobile-os. */
  .desktop > .icons,
  .desktop > .widget,
  .desktop > .bot,
  .taskbar {
    display: none;
  }

  /* Lock/date/clock are truly centered across the full phone width. */
  .mobile-lock-lock {
    flex: 0 0 auto;
  }

  .mobile-lock-center {
    display: grid;
    justify-items: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .mobile-lock-date {
    width: 100%;
    margin: 0 0 .08rem;
    text-align: center;
  }

  .mobile-lock-clock {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 .04em 0 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  /* Both lock-screen widgets are the same width and height. */
  .mobile-lock-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: min(100%, 27rem);
  }

  .lock-trophy-widget {
    width: 100%;
    min-width: 0;
    height: 4.35rem;
    min-height: 4.35rem;
    grid-template-columns: auto auto;
    justify-content: center;
    padding: .55rem .7rem;
  }

  /* Notification stack:
     Projects arrives first.
     Pip's collapsed slot then opens ABOVE it, naturally pushing Projects down. */
  .mobile-lock-notifications {
    display: grid;
    grid-template-rows: 0fr 1fr;
    gap: 0;
    width: min(100%, 27rem);
    margin: 1.05rem auto 0;
    transition: grid-template-rows .42s cubic-bezier(.22, 1, .36, 1);
  }

  .mobile-lock-notifications.has-bot {
    grid-template-rows: 1fr 1fr;
  }

  .lock-notice-slot {
    min-height: 0;
    overflow: hidden;
  }

  .lock-notice-slot-bot {
    padding-bottom: 0;
    transition: padding-bottom .42s cubic-bezier(.22, 1, .36, 1);
  }

  .mobile-lock-notifications.has-bot .lock-notice-slot-bot {
    padding-bottom: .5rem;
  }

  .mobile-lock-notice {
    opacity: 0;
    transform: translateY(-10px) scale(.985);
    filter: blur(3px);
    pointer-events: none;
    transition:
      opacity .32s ease,
      transform .42s cubic-bezier(.22, 1, .36, 1),
      filter .32s ease;
  }

  .mobile-lock-notice.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
  }

  /* Projects is already occupying its own row, so it smoothly shifts down
     when the BOT row above expands. */
  .lock-notice-slot-projects {
    min-height: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-lock-notifications,
    .lock-notice-slot-bot,
    .mobile-lock-notice {
      transition: none;
    }
  }
  .mobile-lock-clock {
    font: 800 clamp(4.6rem, 25vw, 7rem)/.95 var(--sans);
    letter-spacing: -.055em;
    font-variant-numeric: normal;
    text-shadow: 0 2px 0 rgba(255, 248, 243, .5);
  }
  /* Top status row, inspired by a phone's silent/status area. */
  .mobile-lock-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 2rem;
    margin-bottom: .2rem;
    padding: 0 .15rem;
  }

  .lock-os-name {
    color: rgba(26,20,19,.78);
    font: 700 .68rem var(--mono);
    letter-spacing: .01em;
  }

  .lock-status-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
  }

  /* A medium-weight clock, colorful without the doubled white shadow. */
  .mobile-lock-clock {
    font: 500 clamp(5.7rem, 26vw, 7.6rem)/.9 var(--sans);
    letter-spacing: -.065em;
    text-shadow: none;
    background: linear-gradient(90deg, #6FC7C3 0%, #E8C547 48%, #EF6F6C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  /* Both widgets now match the notification language and remain identical in size. */
  .mobile-lock-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
  }

  /* Better Projects icon: actual stack of three project cards. */
  .lock-projects {
    background: #FFF8F3;
    padding: .18rem;
  }

  :where(.lock-projects) svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  @media (max-height: 700px) {
    .mobile-lock-status { margin-bottom: 0; }
  }
  .hybrid-mobile-greeting {
    padding-top: .78rem;
  }

  :where(.hybrid-mobile-greeting) h1 {
    margin-top: 0;
  }
  .mobile-lock-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 2rem;
    margin-bottom: .15rem;
    padding: 0 .18rem;
  }

  .lock-phone-status {
    display: flex;
    align-items: center;
    gap: .48rem;
    color: var(--ink);
  }

  .lock-cellular {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 1rem;
  }

  :where(.lock-cellular) i {
    display: block;
    width: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  .lock-cellular i:nth-child(1) { height: .3rem; }
  .lock-cellular i:nth-child(2) { height: .48rem; }
  .lock-cellular i:nth-child(3) { height: .68rem; }
  .lock-cellular i:nth-child(4) { height: .9rem; }

  .lock-wifi {
    width: 1.25rem;
    height: .95rem;
    overflow: visible;
  }

  .lock-battery {
    position: relative;
    display: block;
    width: 1.7rem;
    height: .78rem;
    padding: 2px;
    border: 1.8px solid currentColor;
    border-radius: .22rem;
  }

  .lock-battery::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -.24rem;
    width: .14rem;
    height: .34rem;
    border-radius: 0 .1rem .1rem 0;
    background: currentColor;
    transform: translateY(-50%);
  }

  .lock-battery-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: .08rem;
    background: currentColor;
  }

  /* Back to black, medium-weight clock. */
  .mobile-lock-clock {
    font: 500 clamp(5.7rem, 26vw, 7.6rem)/.9 var(--sans);
    letter-spacing: -.065em;
    text-shadow: none;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
  }

  /* Equal translucent widgets like the earlier lock screen. */
  .mobile-lock-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    align-items: stretch;
  }

  .lock-widget {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .58rem;
    width: 100%;
    min-width: 0;
    height: 4.35rem;
    min-height: 4.35rem;
    padding: .58rem .66rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 18px;
    background: rgba(255,248,243,.34);
    color: var(--ink);
    -webkit-backdrop-filter: blur(15px) saturate(1.08);
    backdrop-filter: blur(15px) saturate(1.08);
    box-shadow: 0 7px 20px rgba(71,38,33,.07);
  }

  .lock-moon-icon,
  .lock-trophy-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.35rem;
    line-height: 1;
  }

  .lock-widget-copy {
    display: grid;
    min-width: 0;
  }

  :where(.lock-widget-copy) strong {
    color: var(--ink);
    font-size: .72rem;
    line-height: 1.15;
  }

  :where(.lock-widget-copy) span {
    margin-top: .12rem;
    color: rgba(26,20,19,.68);
    font-size: .62rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* The trophy widget no longer inherits the older dark/card rules. */
  .lock-trophy-widget {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: initial;
    padding: .58rem .66rem;
    background: rgba(255,248,243,.34);
    color: var(--ink);
  }
  /* Pip uses his existing --s size system and tucks into the app header. */
  .mobile-shell.is-app-open .mobile-floating-bot {
    top: calc(var(--mobile-top) + .42rem);
    bottom: auto;
    right: .72rem;
    z-index: 2205;
  }

  .mobile-shell.is-app-open .mobile-floating-bot .m-face {
    --s: .5;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .mobile-shell.is-app-open .mobile-bubble {
    display: none;
  }

  /* Give the header enough room for the tucked BOT. */
  .mobile-shell.is-app-open .mobile-app-header {
    padding-right: 3.7rem;
  }

  /* No fake lock-screen values appear before JavaScript hydrates them. */
  .mobile-lock-clock:empty::after,
.mobile-lock-date:empty::after,
#lock-moon-phase:empty::after,
[data-mobile-trophy-num]:empty::after {
    content: "\00a0";
  }

  /* Moon widget layout modeled after the user's real iPhone lock-screen widget. */
  .lock-moon-widget {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: .48rem;
  }

  .lock-moon-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.05rem;
    height: 2.05rem;
    color: var(--ink);
  }

  .moon-disc {
    position: relative;
    display: block;
    width: 1.75rem;
    height: 1.75rem;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(26,20,19,.16);
    box-shadow: inset 0 0 0 1px rgba(26,20,19,.08);
  }

  .moon-disc::before,
  .moon-disc::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
  }

  .moon-disc::before {
    background: var(--ink);
  }

  .phase-new .moon-disc::before { opacity: .14; }
  .phase-new .moon-disc::after { display: none; }

  .phase-full .moon-disc::before { opacity: 1; }
  .phase-full .moon-disc::after { display: none; }

  .phase-first-quarter .moon-disc::before {
    clip-path: inset(0 0 0 50%);
  }

  .phase-last-quarter .moon-disc::before {
    clip-path: inset(0 50% 0 0);
  }

  .phase-waxing-crescent .moon-disc::before {
    background:
      radial-gradient(circle at 31% 50%, transparent 0 58%, var(--ink) 59% 100%);
  }

  .phase-waning-crescent .moon-disc::before {
    background:
      radial-gradient(circle at 69% 50%, transparent 0 58%, var(--ink) 59% 100%);
  }

  .phase-waxing-gibbous .moon-disc::before {
    background: var(--ink);
  }

  .phase-waxing-gibbous .moon-disc::after {
    left: -42%;
    width: 84%;
    background: rgba(255,248,243,.72);
  }

  .phase-waning-gibbous .moon-disc::before {
    background: var(--ink);
  }

  .phase-waning-gibbous .moon-disc::after {
    left: 58%;
    width: 84%;
    background: rgba(255,248,243,.72);
  }

  .lock-moon-widget .lock-widget-copy {
    align-content: center;
  }

  :where(.lock-moon-widget .lock-widget-copy) strong {
    font-size: .73rem;
    font-weight: 800;
  }

  :where(.lock-moon-widget .lock-widget-copy) span {
    margin-top: .05rem;
    font-size: .62rem;
  }

  :where(.lock-moon-widget .lock-widget-copy) small {
    margin-top: .03rem;
    color: rgba(26,20,19,.58);
    font: 600 .56rem/1.15 var(--mono);
    white-space: nowrap;
  }

  /* Battery outline is visible immediately, fill appears only when a real level is available. */
  .lock-battery-fill {
    width: 0;
    opacity: 0;
  }

  /* Short mobile label keeps the 4-across grid aligned. */
  [data-mobile-open="recycle-bin"] .mobile-app-label {
    white-space: nowrap;
  }
  .mobile-lock-status, .lock-phone-status { display: none; }

  .mobile-lock { transition: transform .5s cubic-bezier(.22,1,.36,1); }
  .mobile-lock.is-unlocked { transform: translateY(-110%); opacity: 1; }

  .lock-moon-widget { grid-template-columns: 2.4rem minmax(0,1fr); }
  .lock-moon-visual { width: 2.2rem; height: 2.2rem; }
  .moon-disc {
    width: 1.92rem;
    height: 1.92rem;
    background:
      radial-gradient(circle at 36% 32%, rgba(255,248,243,.25) 0 6%, transparent 7%),
      radial-gradient(circle at 63% 60%, rgba(26,20,19,.13) 0 7%, transparent 8%),
      rgba(26,20,19,.14);
    box-shadow: inset 0 0 0 1px rgba(26,20,19,.12), 0 1px 2px rgba(26,20,19,.08);
  }

  :where(.lock-moon-widget .lock-widget-copy) strong { font: 800 .8rem/1.05 var(--sans); }
  :where(.lock-moon-widget .lock-widget-copy) span {
    margin-top: .05rem;
    color: var(--ink);
    font: 650 .68rem/1.1 var(--sans);
    white-space: nowrap;
  }
  :where(.lock-moon-widget .lock-widget-copy) small {
    margin-top: .06rem;
    color: rgba(26,20,19,.7);
    font: 700 .63rem/1 var(--mono);
    letter-spacing: .02em;
    white-space: nowrap;
  }

  .phase-new .moon-disc::before { opacity: .32; background: var(--ink); }
  .phase-full .moon-disc::before { opacity: .88; background: #FFF8F3; }
  .phase-first-quarter .moon-disc::before, .phase-last-quarter .moon-disc::before { background: #FFF8F3; opacity: .95; }
  .phase-waxing-crescent .moon-disc::before { background: radial-gradient(circle at 32% 50%, rgba(255,248,243,.08) 0 57%, #FFF8F3 58% 100%); opacity: .95; }
  .phase-waning-crescent .moon-disc::before { background: radial-gradient(circle at 68% 50%, rgba(255,248,243,.08) 0 57%, #FFF8F3 58% 100%); opacity: .95; }
  .phase-waxing-gibbous .moon-disc::before, .phase-waning-gibbous .moon-disc::before { background: #FFF8F3; opacity: .95; }

  .lock-trophy-icon { width: 2.1rem; height: 2.1rem; font-size: 0; }
  :where(.lock-trophy-icon) svg { display:block; width:100%; height:100%; }
  :where(.lock-trophy-copy) strong { display:flex; align-items:baseline; gap:.15rem; }
  .lock-trophy-copy .trophy-number,
  .lock-trophy-copy .trophy-total { font: 750 .82rem/1.05 var(--sans); }

  .lock-shortcut-sound .m-sound-on { display:none; }
  .lock-shortcut-sound[aria-pressed="true"] .m-sound-on { display:block; }
  .lock-shortcut-sound[aria-pressed="true"] .m-sound-off { display:none; }

  :where(.mobile-swipe-hint) small { font-size:.66rem; font-weight:600; opacity:.62; }

  .mobile-floating-bot { gap:1rem; }
  .mobile-bubble::before { bottom:-8px; }

  body.mobile-os .about-background-hero {
    display:block;
    margin-bottom:.85rem;
  }
  body.mobile-os .about-photo-wrap {
    width:min(48vw,10.5rem);
    margin:0 auto .9rem;
  }
  body.mobile-os .about-photo { width:100%; aspect-ratio:4/5; }
  body.mobile-os .about-background-copy { text-align:left; }
  :where(body.mobile-os .about-background-copy) h3 { margin-top:0; }
  /* iPhone-inspired boot screen */
  #startup-loader {
    display: grid;
    place-items: center;
    background: #000;
    background-image: none;
    opacity: 1;
    visibility: visible;
    transition: opacity .32s ease, visibility .32s ease;
  }

  #startup-loader.is-fadeout {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  #startup-loader .load-iso-container {
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #startup-loader .iso-logo {
    width: 4.4rem;
    height: 4.4rem;
    border: 0;
    border-radius: 1.15rem;
    background: var(--coral);
    color: #FFF8F3;
    box-shadow: none;
    font: 900 2rem/1 var(--mono);
    animation: mobileBootPulse 1s ease-in-out infinite;
  }

  #startup-loader .loader-copy {
    display: none;
  }

  @keyframes mobileBootPulse {
    0%, 100% { transform: scale(1); opacity: .92; }
    50% { transform: scale(1.045); opacity: 1; }
  }

  /* Fake phone status bar, intentionally part of the lock-screen aesthetic. */
  .mobile-lock-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 2rem;
    margin-bottom: .15rem;
    padding: 0 .18rem;
    color: var(--ink);
  }

  .lock-os-name {
    display: inline-block;
    font: 750 .72rem/1 var(--sans);
    letter-spacing: -.01em;
  }

  .lock-phone-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--ink);
  }

  .lock-cellular {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 1rem;
  }

  :where(.lock-cellular) i {
    display: block;
    width: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  .lock-cellular i:nth-child(1) { height: .3rem; }
  .lock-cellular i:nth-child(2) { height: .48rem; }
  .lock-cellular i:nth-child(3) { height: .68rem; }
  .lock-cellular i:nth-child(4) { height: .9rem; }

  .lock-wifi {
    width: 1.25rem;
    height: .95rem;
    overflow: visible;
  }

  .lock-battery {
    position: relative;
    display: block;
    width: 1.7rem;
    height: .78rem;
    padding: 2px;
    border: 1.8px solid currentColor;
    border-radius: .22rem;
  }

  .lock-battery::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -.24rem;
    width: .14rem;
    height: .34rem;
    border-radius: 0 .1rem .1rem 0;
    background: currentColor;
    transform: translateY(-50%);
  }

  .lock-battery-fill {
    display: block;
    width: 76%;
    height: 100%;
    border-radius: .08rem;
    background: currentColor;
    opacity: 1;
  }
  #startup-loader .load-iso-container {
    display: grid;
    justify-items: center;
    gap: 1.5rem;
  }

  #startup-loader .load-bar {
    position: relative;
    display: block;
    width: 72vw;
    max-width: 300px;
    height: 4px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    box-shadow: none;
  }

  #startup-loader .load-bar > span {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transform: none;
    will-change: width;
  }

  /* App-open must win over the later unlocked-home rules. */
  .mobile-shell.is-unlocked.is-app-open .mobile-home {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(.965);
  }
}

@media (max-width: 430px) {
  :where(.icon) svg { width: 3.15rem; height: 3.15rem; }
  .alignedfx-app-icon .alignedfx-icon-frame, :where(.alignedfx-icon-frame) img { width: 3.45rem; height: 3.45rem; }
  .task-tool { padding: .25rem .4rem; }
  .task-clock { display: none; }
  .task-app { max-width: 5.6rem; }
}



@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .hybrid-mobile-greeting,
  :where(.hybrid-mobile-greeting) h1,
  :where(.hybrid-mobile-greeting) p {
    text-align: left;
  }
}


@media (min-width: 761px) {
  .window button,
  .window button *,
  .window a,
  .window a *,
  .window summary,
  .window summary *,
  .window .win-tab,
  .window .win-tab *,
  .window .skill-chip,
  .window .invoice,
  .window .recycle-row,
  .window label[for],
  .window select {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3v21l5.5-5.2 4 8.6 4-1.9-4-8.4H22L5 3z' fill='%23EF6F6C' stroke='%231A1413' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, pointer;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .hybrid-mobile-greeting,
  :where(.hybrid-mobile-greeting) h1,
  :where(.hybrid-mobile-greeting) p { text-align: center; }
  .credits-hello { width: calc(100% - 1.25rem); max-width: 31rem; margin-inline: auto; }
}

.inline-trophy-svg { display:inline-block; width:1.15em; height:1.15em; flex:0 0 auto; vertical-align:-.18em; }
.mobile-status-trophies { display:inline-flex; align-items:center; gap:.28rem; }
.credits-ending { display:flex; align-items:center; justify-content:center; gap:.4rem; }


@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  body.mobile-os .rb-body {
    padding: 1rem;
    background: var(--paper);
  }

  body.mobile-os .rb-toolbar {
    margin-bottom: .85rem;
  }

  body.mobile-os .rb-count {
    font-size: .78rem;
  }

  body.mobile-os .rb-empty-btn {
    padding: .62rem .72rem;
    font-size: .75rem;
  }

  body.mobile-os .rb-list {
    gap: .62rem;
  }

  body.mobile-os .rb-row {
    grid-template-columns: 2.8rem minmax(0,1fr);
    gap: .72rem;
    padding: .62rem .7rem;
    border-radius: 13px;
  }

  body.mobile-os .rb-file-icon {
    width: 2.55rem;
    height: 3rem;
  }

  body.mobile-os .rb-copy strong {
    font-size: .79rem;
  }

  body.mobile-os .rb-pill {
    font-size: .64rem;
  }

  body.mobile-os .rb-pip-row {
    grid-template-columns: 2.7rem minmax(0,1fr);
    gap: .7rem;
    margin-left: .1rem;
  }

  body.mobile-os .rb-pip-face {
    width: 2.55rem;
    height: 2.55rem;
  }

  body.mobile-os .rb-pip-bubble {
    padding: .68rem .75rem;
    font-size: .82rem;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .hybrid-mobile-greeting,
  :where(.hybrid-mobile-greeting) h1,
  :where(.hybrid-mobile-greeting) p {
    text-align: left;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .trophy-reset-row {
    display: flex;
    justify-content: center;
  }

  .trophy-reset-btn {
    width: auto;
    min-width: 0;
    max-width: max-content;
    min-height: 0;
    padding: .48rem .85rem;
    font-size: .72rem;
    line-height: 1.15;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .mobile-shell.is-app-launching .mobile-floating-bot {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .mobile-shell.is-home-arriving .mobile-floating-bot {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

/* Trophies: keep rows their natural height */
.trophy-body { align-content: start; }
.trophy-reset-row { align-items: center; }


/* =========================================================
   FIXES (Oct 14)
========================================================= */
/* Elements that set display: grid ignore the hidden attribute without this */
.proof-inbox-demo [hidden],
.rb-pip-row[hidden] { display: none !important; }

/* Trophies: rows keep their natural height, reset button stays small */
.trophy-body { align-content: start; }
.trophy-reset-row { align-items: center; }
.trophy-reset-btn { height: auto !important; min-height: 0 !important; align-self: center; flex: 0 0 auto; }

/* Label proof demo: requests on top, the run panel full width below */
.proof-inbox-layout { grid-template-columns: 1fr; }
.proof-inbox-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proof-request-file { overflow-wrap: normal; word-break: normal; }
.proof-run-head { flex-wrap: wrap; align-items: center; }
.proof-run-head strong { overflow-wrap: normal; }
.proof-run-head .tag { white-space: normal; text-align: center; }
.proof-run-steps li.is-stop span:first-child { color: var(--error); }
.proof-run-steps li.is-stop { color: var(--error); }
@media (max-width: 520px) {
  .proof-inbox-list { grid-template-columns: 1fr; }
  .proof-success-output { grid-template-columns: 1fr; }
}

/* Recycle Bin: original location, like a real Windows Recycle Bin (desktop) */
.rb-loc {
  color: var(--soft);
  font: .68rem/1.2 var(--mono);
}
.rb-copy { grid-template-columns: auto; }
body:not(.mobile-os) .rb-row {
  grid-template-columns: 3rem minmax(0, 1fr);
}
body:not(.mobile-os) .rb-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name name" "loc pill";
  align-items: center;
  width: 100%;
  column-gap: .6rem;
}
body:not(.mobile-os) .rb-copy strong { grid-area: name; }
body:not(.mobile-os) .rb-copy .rb-loc { grid-area: loc; }
body:not(.mobile-os) .rb-copy .rb-pill { grid-area: pill; justify-self: end; }
body.mobile-os .rb-loc { display: none; }

/* Phone: Pip lives in the app header from the start, no separate floating copy */
.mobile-header-pip { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .mobile-shell.is-app-open .mobile-app-header { padding-right: .7rem; }
  .mobile-header-pip {
    display: inline-flex;
    margin-left: auto;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 30px;
    height: 26px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 2px 2px 0 var(--ink);
  }
  .mobile-header-pip-eye {
    width: 6px;
    height: 8px;
    border-radius: 3px;
    background: var(--ink);
    animation: blink 5s infinite;
  }
  .mobile-shell.is-app-open .mobile-floating-bot,
  .mobile-shell.is-app-launching .mobile-floating-bot {
    display: none !important;
  }
}

/* =========================================================
   OCT 14 UPDATE: demo tabs, job demo, phone Recycle Bin
========================================================= */

/* "interactive demo" tab gets a play mark so people know it's playable */
.win-tab .tab-play {
  display: inline-block;
  margin-right: .2rem;
  color: var(--coral);
  font-size: .7em;
  transform: translateY(-1px);
}

/* Call-to-action inside each case study */
.demo-cta {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  margin: 1.1rem 0 1.3rem;
  padding: .85rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--coral-soft);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  text-align: left;
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease, box-shadow .12s ease;
}
.demo-cta:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.demo-cta:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.demo-cta-play {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  color: var(--paper);
  font-size: .9rem;
  padding-left: .12rem;
}.demo-cta-copy { display: grid; gap: .1rem; min-width: 0; }
.demo-cta-copy strong { font-size: .98rem; }
.demo-cta-copy small { color: var(--soft); font-size: .8rem; }

/* Label proof: keep file names and status tags from splitting mid-word */
.proof-run-head { flex-direction: column; align-items: flex-start; gap: .45rem; }
.proof-run-head strong,
.proof-request-file { overflow-wrap: normal; word-break: keep-all; }
.proof-run-head .tag { white-space: normal; text-align: left; }

/* ---------- Job matching demo ---------- */
.jd {
  display: grid;
  gap: .8rem;
  margin-top: .9rem;
}
.jd-profiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}
.jd-profile {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .6rem .65rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(26,20,19,.15);
  color: var(--ink);
  text-align: left;
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.jd-profile:hover { transform: translate(-1px, -1px); }
.jd-profile.is-active { background: #DDF0E3; box-shadow: 3px 3px 0 var(--ink); }
.jd-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #7CC49A;
  font: 800 .66rem var(--mono);
}
.jd-profile-copy { display: grid; min-width: 0; }
.jd-profile-copy strong { font-size: .78rem; line-height: 1.2; }
.jd-profile-copy small { color: var(--soft); font: .62rem/1.3 var(--mono); }
.jd-controls { display: flex; align-items: center; gap: .55rem; }
.jd-run {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #7CC49A;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font: 800 .82rem var(--mono);
  cursor: var(--cursor-pointer, pointer);
}
.jd-run:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.jd-run:disabled { opacity: .55; cursor: default; }
.jd-controls .small-btn { margin-left: 0; }
.jd-controls .jd-run, .jd-controls #job-reset { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 9.5rem; padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); font: 800 .82rem var(--mono); }
.jd-controls #job-reset { background: var(--paper); color: var(--ink); }
.jd-controls #job-reset:hover { background: var(--paper-2); color: var(--ink); }
.jd-controls #job-reset:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.jd-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
}
.jd-stats span {
  display: grid;
  gap: .05rem;
  padding: .45rem .6rem;
  border-right: 1.5px solid var(--line, #E6DAD2);
  color: var(--soft);
  font: .62rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.jd-stats span:last-child { border-right: 0; }
.jd-stats b { color: var(--ink); font: 800 1.15rem var(--sans); letter-spacing: 0; }
.jd-stats .is-match b { color: #2F7A50; }
.jd-stats .is-reject b { color: var(--error); }
.jd-feed { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.jd-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .25rem .75rem;
  align-items: center;
  padding: .65rem .75rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.jd-job-main { display: grid; gap: .1rem; min-width: 0; }
.jd-job-main strong { font-size: .86rem; }
.jd-meta { color: var(--soft); font: .64rem/1.3 var(--mono); }
.jd-verdict {
  padding: .2rem .55rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font: 700 .62rem var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
}
.jd-why { grid-column: 1 / -1; color: var(--soft); font-size: .76rem; }
.jd-why:empty { display: none; }
.jd-job.is-processing { background: #FFF4C9; transform: translateX(4px); box-shadow: -4px 0 0 var(--gold); }
.jd-job.is-match { background: #DDF0E3; }
.jd-job.is-match .jd-verdict { background: #7CC49A; }
.jd-job.is-reject { background: var(--paper); opacity: .72; }
.jd-job.is-reject .jd-verdict { background: var(--coral-soft); color: var(--error); border-color: var(--error); }
.jd-job.is-skip { background: var(--paper-2); }
.jd-job.is-skip .jd-verdict { background: #D7D2CE; }
.jd-summary {
  margin: 0;
  padding: .7rem .85rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #7CC49A;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
  font-size: .86rem;
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .jd-profiles { grid-template-columns: 1fr; }
  .jd-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .jd-stats span { padding: .4rem .45rem; font-size: .56rem; }
  .jd-stats b { font-size: 1rem; }
}

/* ---------- Recycle Bin ---------- */
.rb-file-icon .rb-candle-down { fill: var(--ink); stroke: var(--ink); }
.rb-file-icon .rb-candle-up { fill: var(--paper); stroke: var(--ink); }
.rb-file-icon rect { stroke-width: 2.2; }
.rb-item { min-width: 0; }
.rb-swipe { position: relative; }
.rb-swipe-del { display: none; }
.rb-phone-bar { display: none; }
.rb-pip-row.is-new { animation: rbPipIn .22s ease-out; }
@keyframes rbPipIn { from { opacity: 0; transform: translateY(-6px); } }
.rb-row.is-nope { animation: rbNope .35s; }
@keyframes rbNope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Phone: one grouped list, swipe-to-delete, bottom toolbar */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  body.mobile-os .rb-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding-bottom: 0 !important;
  }
  body.mobile-os .rb-body > * { flex: 0 0 auto; }
  body.mobile-os .rb-toolbar { margin: 0 .4rem .5rem; }
  body.mobile-os .rb-empty-btn { display: none; }
  body.mobile-os .rb-count {
    color: var(--soft);
    font: 700 .68rem var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  body.mobile-os .rb-list {
    display: block;
    gap: 0;
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--ink);
  }
  body.mobile-os .rb-item { position: relative; }
  body.mobile-os .rb-item + .rb-item::before,
  body.mobile-os .rb-pip-row + .rb-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 3.9rem;
    right: 0;
    height: 1px;
    background: #E6DAD2;
    z-index: 3;
  }
  body.mobile-os .rb-swipe { overflow: hidden; }
  body.mobile-os .rb-swipe-del {
    position: absolute;
    inset: 0 0 0 auto;
    display: block;
    width: 88px;
    border: 0;
    background: #C8413E;
    color: var(--paper);
    font: 800 .8rem var(--mono);
  }
  body.mobile-os .rb-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: .85rem;
    min-height: 3.9rem;
    padding: .6rem .9rem .6rem 1rem;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--paper);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    transition: transform .22s cubic-bezier(.2,.8,.2,1), background .15s;
  }
  body.mobile-os .rb-row.is-dragging { transition: none; }
  body.mobile-os .rb-row.is-selected { background: #FBF0C8; }
  body.mobile-os .rb-file-icon { width: 2.1rem; height: 2.45rem; filter: none; }
  body.mobile-os .rb-copy strong { font-size: .8rem; }
  body.mobile-os .rb-loc { display: none; }
  body.mobile-os .rb-pip-row {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: .75rem;
    margin: 0;
    padding: .2rem .9rem .9rem;
    background: #FBF0C8;
  }
  body.mobile-os .rb-list > .rb-pip-row:first-child { padding-top: .9rem; }
  body.mobile-os .rb-pip-face { width: 2.4rem; height: 2.1rem; border-radius: 9px; box-shadow: 2px 2px 0 var(--ink); }
  body.mobile-os .rb-pip-bubble { font-size: .86rem; box-shadow: 3px 3px 0 var(--ink); }
  body.mobile-os .rb-phone-bar {
    position: sticky;
    flex: 0 0 auto;
    margin-top: auto !important;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    margin: auto -1rem 0;
    padding: .75rem 1.4rem calc(.9rem + var(--mobile-bottom, 0px));
    border-top: 2px solid var(--ink);
    background: var(--paper-2);
  }
  body.mobile-os .rb-phone-btn {
    border: 0;
    background: none;
    padding: .4rem .2rem;
    color: var(--ink);
    font: 800 .95rem var(--sans);
  }
  body.mobile-os .rb-phone-btn.is-danger { color: #C8413E; }
}

/* The title gets focus when a window opens; no box drawn around it */
.win-title:focus { outline: none; }

/* Phone apps always sit at the left edge, whatever the desktop placed them at */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  body.mobile-os .window.is-open { left: 0 !important; right: 0 !important; }
}

/* README on phones (from your ChatGPT README version) */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  body.mobile-os [data-app="readme"] .win-body {
    padding: .9rem .8rem 1.2rem;
  }

  body.mobile-os .readme-intro {
    padding: 1rem .95rem 1.05rem;
    margin-bottom: 1.15rem;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #E8D0B5;
  }

  body.mobile-os .win-body .readme-hi {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  body.mobile-os .readme-rays {
    flex-basis: 1.9rem;
    width: 1.9rem;
    transform: scale(.9);
    transform-origin: left top;
  }

  body.mobile-os .readme-intro .lede {
    margin-top: 1.05rem;
    font-size: 1rem;
  }

  body.mobile-os .readme-intro p {
    font-size: .94rem;
    line-height: 1.55;
  }

  body.mobile-os .readme-explore-desktop {
    display: none;
  }

  body.mobile-os .readme-explore-mobile {
    display: inline;
  }

  body.mobile-os .readme-start-heading {
    gap: .65rem;
    margin-bottom: .8rem;
  }

  body.mobile-os .readme-start-heading h3 {
    padding: .42rem .72rem .45rem;
    font-size: 1.22rem;
  }

  body.mobile-os .readme-projects {
    gap: .68rem;
  }

  body.mobile-os .readme-project {
    grid-template-columns: 3.55rem minmax(0,1fr) 1.25rem;
    gap: .68rem;
    padding: .7rem .72rem;
    border-radius: 11px;
    box-shadow: 4px 4px 0 #E8D0B5;
  }

  body.mobile-os .readme-project-icon {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 11px;
    box-shadow: 3px 3px 0 rgba(26,20,19,.14);
  }

  body.mobile-os .readme-project-icon svg {
    width: 2.65rem;
    height: 2.65rem;
  }

  body.mobile-os .readme-project-copy strong {
    font-size: .78rem;
    line-height: 1.25;
  }

  body.mobile-os .readme-project-copy > span {
    font-size: .75rem;
    line-height: 1.35;
  }

  body.mobile-os .readme-project-arrow {
    font-size: 1.7rem;
  }

  body.mobile-os .readme-fine {
    grid-template-columns: 1.75rem minmax(0,1fr);
    gap: .55rem;
    margin-top: .9rem;
    padding-top: .8rem;
    font-size: .74rem;
    line-height: 1.35;
  }

  body.mobile-os .readme-info-icon {
    width: 1.55rem;
    height: 1.55rem;
    font-size: .9rem;
  }
}

/* =========================================================
   OCT 14 (late): README title, reset button, job colors,
   Recycle Bin = the interactive prototype on every screen
========================================================= */

/* README: plain title, no underline or rays */
.win-body .readme-hi::after,
body.mobile-os .win-body .readme-hi::after { display: none !important; }
.readme-rays,
body.mobile-os .readme-rays { display: none !important; }

/* Trophies: reset button centered */
.trophy-reset-row { display: flex !important; justify-content: center !important; }
.trophy-reset-btn { margin: 0 auto !important; }

/* Job demo: dropdown + clear result colors */
.jd-controls { flex-wrap: wrap; align-items: flex-end; }
.jd-select-label {
  display: grid;
  gap: .3rem;
  margin: 0 auto 0 0;
  color: var(--soft);
  font: 500 .72rem var(--mono);
}
.jd-select-label select {
  min-width: 14rem;
  min-height: 2.4rem;
  padding: .35rem .6rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 600 .86rem var(--sans);
}
.jd-job.is-match { background: #DDF0E3; border-color: #2F7A50; }
.jd-job.is-match .jd-verdict { background: #7CC49A; border-color: #2F7A50; color: var(--ink); }
.jd-job.is-reject { background: #FDE3DD; border-color: var(--error); opacity: 1; }
.jd-job.is-reject .jd-verdict { background: #F4A9A0; border-color: var(--error); color: #7A1F1D; }
.jd-job.is-reject .jd-why { color: #8A2E2B; }
.jd-job.is-skip { background: #E4DCD6; border-color: #8C827C; }
.jd-job.is-skip .jd-verdict { background: #D7D2CE; border-color: #8C827C; color: var(--ink); }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .jd-select-label { width: 100%; margin-right: 0; }
  .jd-select-label select { width: 100%; min-width: 0; }
}

/* ---------- Recycle Bin: one grouped list, swipe to delete, bottom toolbar ---------- */
.rb-body {
  display: flex !important;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 0 !important;
}
.rb-body > * { flex: 0 0 auto; }
.rb-toolbar { margin: 0 .4rem .5rem; }
.rb-empty-btn { display: none !important; }
.rb-count {
  color: var(--soft);
  font: 700 .68rem var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rb-list {
  display: block !important;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}
.rb-item { position: relative; }
.rb-item + .rb-item::before,
.rb-pip-row + .rb-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 3.9rem;
  right: 0;
  height: 1px;
  background: #E6DAD2;
  z-index: 3;
}
.rb-swipe { position: relative; overflow: hidden; }
.rb-swipe-del {
  position: absolute;
  inset: 0 0 0 auto;
  display: block !important;
  width: 88px;
  border: 0;
  background: #C8413E;
  color: var(--paper);
  font: 800 .8rem var(--mono);
  cursor: var(--cursor-pointer, pointer);
}
.rb-list .rb-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  width: 100%;
  min-height: 3.9rem;
  padding: .6rem 1rem .6rem 1rem;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--paper);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), background .15s;
}
.rb-list .rb-row:hover { background: var(--paper-2); }
.rb-list .rb-row.is-dragging { transition: none; }
.rb-list .rb-row.is-selected { background: #FBF0C8; }
.rb-list .rb-file-icon { width: 2.1rem; height: 2.45rem; filter: none; }
body .rb-list .rb-copy {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-width: 0;
}
.rb-list .rb-copy strong { font: 800 .8rem/1.3 var(--mono); }
.rb-list .rb-loc { flex: 0 0 auto; color: var(--soft); font: .7rem var(--mono); }
body.mobile-os .rb-list .rb-loc { display: none; }
.rb-list .rb-pip-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  margin: 0;
  padding: .2rem 1rem .9rem;
  background: #FBF0C8;
}
.rb-list > .rb-pip-row:first-child { padding-top: .9rem; }
.rb-list .rb-pip-face { width: 2.4rem; height: 2.1rem; border-radius: 9px; box-shadow: 2px 2px 0 var(--ink); }
.rb-list .rb-pip-bubble { font-size: .86rem; box-shadow: 3px 3px 0 var(--ink); }
.rb-phone-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex !important;
  justify-content: space-between;
  margin: auto -1.25rem 0 !important;
  padding: .7rem 1.5rem .85rem;
  border-top: 2px solid var(--ink);
  background: var(--paper-2);
}
body.mobile-os .rb-phone-bar {
  margin: auto -1rem 0 !important;
  padding-bottom: calc(.9rem + var(--mobile-bottom, 0px));
}
.rb-phone-btn {
  border: 0;
  background: none;
  padding: .4rem .2rem;
  color: var(--ink);
  font: 800 .95rem var(--sans);
  cursor: var(--cursor-pointer, pointer);
}
.rb-phone-btn.is-danger { color: #C8413E; }

/* Recycle Bin toolbar: anchored to the window's bottom edge, so it's in place from the first frame */
.window[data-app="recycle-bin"] .rb-body {
  position: static !important;
  min-height: 0;
  padding-bottom: 4.6rem !important;
}
.rb-phone-bar {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0 !important;
  margin: 0 !important;
}
body.mobile-os .window[data-app="recycle-bin"] .rb-body {
  padding-bottom: calc(5rem + var(--mobile-bottom, 0px)) !important;
}

/* =========================================================
   ABOUT: tilted photo with coral shadow, headline in its own pink card
========================================================= */
.about-photo-wrap { padding: .5rem .6rem .7rem .4rem; }
.about-photo {
  transform: rotate(-3deg);
  border: 3px solid var(--ink) !important;
  border-radius: 12px !important;
  box-shadow: 7px 7px 0 #EF8F88 !important;
  background: var(--paper);
}
.about-background-copy {
  padding: 1rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #FCE3DF;
  box-shadow: 4px 4px 0 #F2B8B1;
}
.about-background-copy .lede {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
}
body.mobile-os .about-photo-wrap {
  width: min(58vw, 13rem) !important;
  margin: .4rem auto 1.2rem !important;
}
body.mobile-os .about-background-copy .lede { font-size: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .about-photo { transform: none; }
}


/* =========================================================
   PERSONAL PROJECTS: folder (phone), Self Sabotage Slayer, GitHub links
========================================================= */
.gh-mark { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.gh-btn, .gh-link { display: inline-flex; align-items: center; gap: .45rem; }
.contact-elsewhere {
  margin: 1.1rem 0 0;
  padding-top: .9rem;
  border-top: 2px solid var(--stone);
  font: 600 .82rem var(--mono);
}
.gh-link { color: var(--ink); text-decoration: none; }
.gh-link:hover { text-decoration: underline; }
.contact-elsewhere { display: grid; justify-items: start; gap: .5rem; }
.art-mark { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.demo-cta-gh .art-mark { width: 1.3rem; height: 1.3rem; color: var(--paper); }

/* VR Thriller: the 360 video in a 16:9 frame */
.vr-body a.demo-cta { color: var(--ink); text-decoration: none; }
.vr-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #0F1629;
  box-shadow: 3px 3px 0 var(--ink);
}
.vr-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vr-poster { display: block; aspect-ratio: auto; color: var(--paper); text-decoration: none; }
.vr-poster img { display: block; width: 100%; height: auto; }
.vr-poster-play {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 700; box-shadow: 3px 3px 0 var(--ink);
}
.vr-poster-play span { color: #EF6F6C; }
.vr-poster, .vr-cap-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .vr-embed, .vr-cap-desk, .vr-body .vr-yt { display: none; }
  .vr-poster { display: block; }
  .vr-cap-touch { display: block; }
}
.vr-body .vr-art { background: var(--paper); margin-top: 1rem; }
.demo-cta-code { margin-top: -.5rem; background: var(--paper); text-decoration: none; }
.demo-cta-gh { background: var(--ink) !important; padding-left: 0 !important; }
.demo-cta-gh .gh-mark { width: 1.3rem; height: 1.3rem; color: var(--paper); }


/* Phone folder */
.pf-folder { display: none; }
.pf-folder-tile {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 5px;
  padding: 9px;
  background: rgba(255, 248, 243, .55) !important;
  border: 2px solid var(--ink) !important;
  border-radius: 22% !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.pf-mini {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
}
.pf-mini img, .pf-mini svg { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .pf-folder:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(26, 20, 19, .28);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity .18s ease;
  }
  .pf-folder.is-open { opacity: 1 !important; }
  .pf-folder-panel {
    width: min(19rem, 100%);
    transform: scale(.85);
    transition: transform .22s cubic-bezier(.2,.9,.3,1.15);
  }
  .pf-folder.is-open .pf-folder-panel { transform: none; }
  .pf-folder-title {
    margin: 0 0 .8rem;
    color: var(--paper);
    font: 800 1.6rem var(--sans);
    text-align: center;
    text-shadow: 0 1px 8px rgba(26,20,19,.35);
  }
  .pf-folder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.4rem 1rem 1.2rem;
    border: 2px solid var(--ink);
    border-radius: 28px;
    background: rgba(255, 248, 243, .8);
    box-shadow: 5px 5px 0 var(--ink);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pf-folder, .pf-folder-panel { transition: none !important; }
}
.pf-folder-tile { align-content: center !important; gap: 4px !important; padding: 8px !important; }
.pf-folder-btn .mobile-app-label { line-height: 1.15; }


/* =========================================================
   Personal Projects folder: frosted glass, 2x2, apps at the top
========================================================= */
.pf-folder-tile {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  align-content: stretch !important;
  gap: 6px !important;
  padding: 10px !important;
  background:
    linear-gradient(160deg, rgba(255,255,255,.62), rgba(255,255,255,.22)) !important;
  border: 1.5px solid rgba(255,255,255,.7) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.95),
    inset 0 0 14px rgba(255,255,255,.35),
    0 6px 16px rgba(71,38,33,.16) !important;
  filter: none !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
}
.pf-mini { border-radius: 7px; }
.pf-mini svg, .pf-mini img { border-radius: 7px; }
.pf-empty { visibility: hidden; }

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .pf-folder:not([hidden]) {
    background: rgba(255, 236, 228, .18);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    backdrop-filter: blur(22px) saturate(1.3);
  }
  .pf-folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    min-height: 15rem;
    gap: 1.2rem .8rem;
    padding: 1.5rem 1.1rem 1.3rem;
    border: 1.5px solid rgba(255,255,255,.75);
    border-radius: 34px;
    background: linear-gradient(160deg, rgba(255,255,255,.5), rgba(255,255,255,.18));
    box-shadow:
      inset 0 1.5px 0 rgba(255,255,255,.9),
      inset 0 0 30px rgba(255,255,255,.25),
      0 18px 40px rgba(71,38,33,.22);
    -webkit-backdrop-filter: blur(26px) saturate(1.6);
    backdrop-filter: blur(26px) saturate(1.6);
  }
  .pf-folder-title { text-shadow: 0 1px 10px rgba(26,20,19,.25); }
}


/* =========================================================
   README badge (phone): red "1" that pops in after unlock
========================================================= */
.app-badge { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .mobile-app-tile:has(.app-badge) { position: relative; overflow: visible !important; }
  .app-badge:not([hidden]) {
    position: absolute;
    top: -.15rem;
    right: -.1rem;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .3rem;
    border: 2px solid var(--paper);
    border-radius: 999px;
    background: #E5483F;
    color: #fff;
    font: 800 .78rem/1 var(--sans);
    box-shadow: 0 2px 6px rgba(26,20,19,.25);
    pointer-events: none;
  }
  .app-badge.is-popping { animation: appBadgePop .55s cubic-bezier(.2,.9,.3,1.4) both; }
  @keyframes appBadgePop {
    0%   { transform: scale(0); opacity: 0; }
    55%  { transform: scale(1.3); opacity: 1; }
    75%  { transform: scale(.9); }
    100% { transform: scale(1); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-badge.is-popping { animation: none; }
}


/* =========================================================
   SELF SABOTAGE SLAYER window
========================================================= */
.sss-body { min-width: 0; overflow-x: hidden; }
.sss-body a.demo-cta { color: var(--ink); text-decoration: none; }

/* SSS: bring the playable experience forward, with optional deeper exploration */
.sss-body .sss-shot { margin-bottom: .65rem; }
.sss-body .sss-play-link { margin-top: .75rem; margin-bottom: 1.2rem; }
.sss-body .sss-code-link { margin-top: 1.1rem; margin-bottom: .25rem; }
.sss-bosses {
  margin: 1.25rem 0 .25rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
.sss-bosses > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem .9rem;
  background: var(--c);
  color: var(--ink);
  cursor: var(--cursor-pointer, pointer);
  list-style: none;
}
.sss-bosses > summary::-webkit-details-marker { display: none; }
.sss-bosses > summary::marker { content: ""; }
.sss-bosses > summary:focus-visible { outline: 3px solid var(--ink); outline-offset: -5px; }
.sss-bosses-copy { display: grid; gap: .15rem; min-width: 0; }
.sss-bosses-heading { font: 800 .98rem var(--sans); }
.sss-bosses-hint { font-size: .8rem; line-height: 1.4; opacity: .8; }
.sss-bosses-toggle {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 800 1.15rem/1 var(--sans);
}
.sss-bosses-toggle::before { content: "+"; }
.sss-bosses[open] .sss-bosses-toggle::before { content: "−"; }
.sss-bosses-intro {
  margin: 0 0 .85rem;
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.5;
}
.sss-bosses-content { padding: .9rem .9rem .15rem; }
.sss-bosses .boss-map { margin-top: 0; }

/* The bosses as a level map: stops joined by a path, in play order */
.boss-map {
  display: grid;
  gap: .5rem;
  margin: .5rem 0 1.1rem;
  padding: 0;
  list-style: none;
}
.boss-map li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem auto 1fr;
  align-items: center;
  column-gap: .7rem;
  min-height: 2rem;
}
.boss-map li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1.5px);
  top: 2rem;
  height: .5rem;
  border-left: 3px dotted var(--ink);
}
.boss-stop {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 800 .82rem var(--sans);
}
.boss-name { font-weight: 700; }
.boss-note { color: var(--soft); font-size: .82rem; }
.boss-map li:last-child .boss-stop { background: var(--c); }
.boss-map li:last-child .boss-name { font-weight: 800; }
body:not(.mobile-os) .boss-map { grid-template-rows: repeat(6, auto); grid-auto-flow: column; column-gap: 2rem; }
body:not(.mobile-os) .boss-map li:nth-child(6)::after { display: none; }

/* The four moves, laid out like the game's own control panel */
.sss-moves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: .5rem 0 .8rem;
  padding: .55rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #0F1629;
}
.sss-moves > div {
  padding: .6rem .7rem;
  border: 1px solid #2A3555;
  border-radius: 8px;
  background: #18213A;
  color: #E7ECF7;
}
.sss-moves strong { display: block; font-size: .92rem; }
.sss-moves p { margin: .2rem 0 0; color: #A9B4CC; font-size: .84rem; line-height: 1.4; }

.sss-shot a { display: block; }
.sss-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #141B2D;
  box-shadow: 3px 3px 0 var(--ink);
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .sss-moves { gap: .4rem; padding: .45rem; }
  .sss-moves > div { padding: .5rem .55rem; }
}

/* =========================================================
   SAFEGUARDS: the route a request travels
========================================================= */
.safeguard-intro { margin: 0 0 1rem; color: var(--soft); font-size: .92rem; }
.sg-route { position: relative; margin: 0; padding: 0; list-style: none; }
.sg-stop::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  bottom: -.2rem;
  left: .9rem;
  border-left: 2.5px solid var(--ink);
}
.sg-stop, .sg-end {
  position: relative;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: .9rem;
  padding-bottom: 1.15rem;
}
.sg-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #6FC7C3;
  font: 800 .82rem var(--sans);
}
.sg-text strong { display: block; margin: .2rem 0 .2rem; font-size: 1rem; letter-spacing: -.01em; }
.sg-text p { max-width: 34rem; margin: 0; font-size: .88rem; line-height: 1.5; }
.sg-exit {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .45rem;
  padding: .12rem .5rem;
  border: 1.5px dashed var(--ink);
  border-radius: 6px;
  background: var(--coral-soft);
  font-size: .76rem;
  font-weight: 600;
}
.sg-exit span { color: var(--error); font-weight: 800; }
.sg-end { padding-bottom: 0; align-items: start; }
.sg-send {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 1.9rem;
  margin-left: -.2rem;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: #6FC7C3;
  box-shadow: 3px 3px 0 var(--ink);
  font: 800 .82rem var(--sans);
}
.sg-end { grid-template-columns: 3.4rem minmax(0, 1fr); }
.sg-end .sg-text strong { font-size: 1.12rem; }
.sg-under {
  margin: 1.3rem 0 .4rem;
  padding: .7rem .85rem;
  border-radius: 8px;
  background: #E3F4F3;
  font-size: .86rem;
  line-height: 1.5;
}
.edge-cases { margin: .9rem 0 1rem; border-top: 1.5px dashed rgba(26,20,19,.35); }
.edge-cases > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 0 .2rem;
  background: none;
  font: 700 .92rem var(--sans);
  cursor: var(--cursor-pointer, pointer);
  list-style: none;
}
.edge-cases > summary::-webkit-details-marker { display: none; }
.edge-cases > summary::marker { content: ""; }
.edge-cases > summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font: 700 .85rem/1 var(--sans);
}
.edge-cases[open] > summary::before { content: "−"; }
.edge-cases > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.edge-list { margin: .4rem 0 0; padding: 0; list-style: none; }
.edge-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .15rem 1.2rem;
  padding: .42rem 0;
  border-bottom: 1px solid rgba(26,20,19,.1);
  font-size: .85rem;
  line-height: 1.4;
}
.edge-list li:last-child { border-bottom: 0; }
.edge-list b { font-weight: 500; color: var(--soft); }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .mobile-collapse .safeguard-intro { margin-top: .7rem; }
  .sg-stop { gap: .75rem; }
  .sg-end { grid-template-columns: 3.4rem minmax(0, 1fr); gap: .75rem; }
  .edge-list li { grid-template-columns: 1fr; gap: .05rem; }
  .mobile-collapse .edge-cases { margin-bottom: .8rem; }
}


/* =========================================================
   LABEL PROOF DEMO: inbox + route (Oct 18)
========================================================= */
.pd-lede { margin: 0 0 .9rem; font-size: 1.02rem; font-weight: 500; }
.pd-lede span { color: var(--soft); font-size: .86rem; font-weight: 400; }
.pd {
  display: grid;
  grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
.pd [hidden] { display: none !important; }
.pd-inbox {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}
.pd-mail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .1rem .5rem;
  width: 100%;
  padding: .62rem .75rem .68rem;
  border: 0;
  border-bottom: 1.5px solid rgba(26,20,19,.14);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: var(--cursor-pointer, pointer);
}
.pd-mail:last-child { border-bottom: 0; }
.pd-mail:hover { background: #EEF8F7; }
.pd-mail.is-selected { background: #D7F0EE; box-shadow: inset 4px 0 0 #3FA7A2; }
.pd-mail:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.pd-from { overflow: hidden; color: var(--soft); font-size: .72rem; white-space: nowrap; text-overflow: ellipsis; }
.pd-time { color: var(--soft); font-size: .7rem; }
.pd-subj { grid-column: 1 / -1; font-size: .86rem; font-weight: 700; line-height: 1.3; }
.pd-atts { display: flex; flex-wrap: wrap; gap: .3rem; grid-column: 1 / -1; margin-top: .25rem; }
.pd-att {
  padding: .06rem .4rem;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  background: var(--paper-2);
  font: 600 .66rem var(--mono);
}

.pd-run-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.pd-run-head strong { font-size: 1rem; }
.pd-run-head .tag { white-space: nowrap; }
.pd-route { margin: 0; padding: 0; list-style: none; }
.pd-stop, .pd-end {
  position: relative;
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: .75rem;
  padding-bottom: .85rem;
}
.pd-stop::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: -.2rem;
  left: .85rem;
  border-left: 2.5px dashed rgba(26,20,19,.25);
}
.pd-stop.is-pass::before { border-left-style: solid; border-left-color: var(--ink); }
.pd-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 2.5px solid rgba(26,20,19,.3);
  border-radius: 50%;
  background: var(--paper);
  color: var(--soft);
  font: 800 .78rem var(--sans);
  transition: background .2s, border-color .2s, color .2s;
}
.pd-stop-text strong { display: block; margin-top: .2rem; color: var(--soft); font-size: .92rem; transition: color .2s; }
.pd-stop.is-active .pd-dot { border-color: var(--ink); color: var(--ink); animation: pdPulse 1s ease-in-out infinite; }
.pd-stop.is-pass .pd-dot { border-color: var(--ink); background: #6FC7C3; color: var(--ink); }
.pd-stop.is-fail .pd-dot { border-color: var(--ink); background: var(--coral); color: var(--ink); }
.pd-stop.is-active strong, .pd-stop.is-pass strong, .pd-stop.is-fail strong, .pd-end.is-reached strong { color: var(--ink); }
@keyframes pdPulse { 50% { box-shadow: 0 0 0 4px rgba(111,199,195,.45); } }
.pd-sub { margin: .25rem 0 0; padding: 0; list-style: none; }
.pd-sub li { display: flex; gap: .4rem; margin: .12rem 0; font-size: .8rem; line-height: 1.35; animation: pdIn .25s ease-out both; }
.pd-sub li span { flex: none; width: .9rem; font-weight: 800; }
.pd-sub li.is-ok span { color: #2F8F6A; }
.pd-sub li.is-fail { color: var(--error); font-weight: 600; }
@keyframes pdIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.pd-exit {
  display: inline-flex;
  margin-top: .4rem;
  padding: .12rem .5rem;
  border: 1.5px dashed var(--ink);
  border-radius: 6px;
  background: var(--coral-soft);
  font-size: .76rem;
  font-weight: 700;
  animation: pdIn .25s ease-out both;
}
.pd-end { grid-template-columns: 3.2rem minmax(0, 1fr); padding-bottom: 0; }
.pd-send {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 1.8rem;
  margin-left: -.15rem;
  border: 2.5px solid rgba(26,20,19,.3);
  border-radius: 8px;
  background: var(--paper);
  color: var(--soft);
  font: 800 .78rem var(--sans);
  transition: background .2s, box-shadow .2s;
}
.pd-end.is-reached .pd-send { border-color: var(--ink); background: #6FC7C3; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.pd-route.is-idle { opacity: .55; }
.pd-hint { margin: .7rem 0 0; color: var(--soft); font-size: .84rem; }

.pd-result { margin-top: 1rem; padding-top: .9rem; border-top: 1.5px dashed rgba(26,20,19,.3); }
.pd-result-copy { margin: 0 0 .75rem; font-size: .9rem; line-height: 1.5; }
.pd-out-success { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.pd-out-success .live-proof-frame { max-width: 19rem; }
.pd-compare { display: grid; gap: .4rem; }
.pd-compare-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: .6rem;
  padding: .5rem .65rem;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  font-size: .82rem;
}
.pd-compare-row span { color: var(--soft); font-family: var(--mono); font-size: .74rem; }
.pd-compare-row.is-good { box-shadow: inset 4px 0 0 #3FA7A2; }
.pd-compare-row.is-bad { background: var(--coral-soft); box-shadow: inset 4px 0 0 var(--error); }
.pd-compare-row.is-bad strong { color: var(--error); }

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .pd { grid-template-columns: 1fr; gap: 1rem; }
  .pd-out-success { grid-template-columns: 1fr; }
  .pd-compare-row { grid-template-columns: 1fr; gap: .1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-stop.is-active .pd-dot, .pd-sub li, .pd-exit { animation: none; }
}


/* Draft mock: proof shown inline, tags belong to the original request */
.mock-inline-proof { display: inline-block; margin-top: .35rem; padding: .15rem .45rem; border: 1.5px dashed rgba(26,20,19,.35); border-radius: 5px; color: var(--soft); font-size: .74rem; }
.mock-mail-foot { flex-wrap: wrap; align-items: center; }
.mock-orig { margin-left: auto; color: var(--soft); font-size: .7rem; }
.tag-pin { background: #DCD3F5; }
.pd-stop.is-skip .pd-dot { border-color: rgba(26,20,19,.45); background: var(--paper-2); color: var(--soft); }
.pd-stop.is-skip::before { border-left-style: solid; border-left-color: rgba(26,20,19,.45); }
.pd-stop.is-skip strong { color: var(--soft); }


/* =========================================================
   Swipe unlock: icons ease in under the lifting lock screen,
   then finish with the same spring the tap unlock uses.
========================================================= */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .mobile-shell .mobile-app:nth-child(4n+1) { --fly-x: -8px; }
  .mobile-shell .mobile-app:nth-child(4n+2) { --fly-x: -3px; }
  .mobile-shell .mobile-app:nth-child(4n+3) { --fly-x: 3px; }
  .mobile-shell .mobile-app:nth-child(4n) { --fly-x: 8px; }

  .mobile-shell.is-drag-unlock .mobile-app {
    opacity: calc(.15 + .85 * var(--unlock-p, 0));
    transform: translate3d(calc(var(--fly-x, 0px) * (1 - var(--unlock-p, 0))), calc(10px * (1 - var(--unlock-p, 0))), 0)
               scale(calc(.86 + .14 * var(--unlock-p, 0)));
    transition: none;
  }
  .mobile-shell.is-drag-unlock .hybrid-mobile-greeting {
    opacity: calc(.2 + .8 * var(--unlock-p, 0));
    transform: translateY(calc(5px * (1 - var(--unlock-p, 0))));
    transition: none;
  }

  .mobile-shell.is-home-settling .mobile-app {
    animation: mobileSpringSettle .46s cubic-bezier(.18,.88,.26,1.12) both;
  }
  .mobile-shell.is-home-settling .hybrid-mobile-greeting {
    animation: mobileCardSettle .3s cubic-bezier(.22,.8,.22,1) both;
  }

  @keyframes mobileSpringSettle {
    0% {
      opacity: calc(.15 + .85 * var(--unlock-p, 0));
      transform: translate3d(calc(var(--fly-x, 0px) * (1 - var(--unlock-p, 0))), calc(10px * (1 - var(--unlock-p, 0))), 0)
                 scale(calc(.86 + .14 * var(--unlock-p, 0)));
    }
    62% { opacity: 1; transform: translate3d(0, -1px, 0) scale(1.022); }
    84% { transform: translate3d(0, 0, 0) scale(.996); }
    100% { opacity: 1; transform: none; }
  }
  @keyframes mobileCardSettle {
    0% { opacity: calc(.2 + .8 * var(--unlock-p, 0)); transform: translateY(calc(5px * (1 - var(--unlock-p, 0)))); }
    100% { opacity: 1; transform: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-shell.is-drag-unlock .mobile-app,
    .mobile-shell.is-drag-unlock .hybrid-mobile-greeting,
    .mobile-shell.is-home-settling .mobile-app,
    .mobile-shell.is-home-settling .hybrid-mobile-greeting {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }
}


/* Edge-case list: read as "case - outcome" instead of two competing columns. */
.edge-list li {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  justify-content: start;
  column-gap: .45rem;
}
.edge-list b {
  text-align: left;
}
@media (max-width: 760px) {
  .edge-list li {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .35rem;
  }
}

/* Contact: the send button shows its own progress, with dots that fill in one at a time */
.sending-dots span { opacity: 0; animation: 1.2s steps(1) infinite; }
.sending-dots span:nth-child(1) { animation-name: sendingDot1; }
.sending-dots span:nth-child(2) { animation-name: sendingDot2; }
.sending-dots span:nth-child(3) { animation-name: sendingDot3; }
@keyframes sendingDot1 { 0% { opacity: 0; } 25% { opacity: 1; } }
@keyframes sendingDot2 { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes sendingDot3 { 0% { opacity: 0; } 75% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sending-dots span { animation: none; opacity: 1; } }

/* Bug Bash uses the header Pip only on its opening rules screen. */
.mobile-app-chrome.bb-hide-header-pip .mobile-header-pip { visibility: hidden; }

/* Bug Bash Pip uses the same shape and eyes as the home-screen Pip (58 x 50, pupils, blink). */
section[data-app="bug-bash"] .bb-pip-face { --pw: 3.6rem; width: var(--pw) !important; height: calc(var(--pw) * .862) !important; gap: calc(var(--pw) * .12) !important; border-width: 2.5px; border-radius: calc(var(--pw) * .24) !important; box-shadow: 4px 4px 0 var(--ink); }
section[data-app="bug-bash"] .bb-pip-eye { position: relative; overflow: hidden; width: calc(var(--pw) * .207) !important; height: calc(var(--pw) * .259) !important; border-radius: calc(var(--pw) * .103) !important; animation: blink 5s infinite; }
section[data-app="bug-bash"] .bb-pip-eye::after { content: ""; position: absolute; top: 27%; left: 25%; width: 50%; height: 40%; border-radius: 50%; background: var(--paper); }
section[data-app="bug-bash"] .bb-pip-face:is(.is-happy, .is-glad) .bb-pip-eye { height: calc(var(--pw) * .13) !important; border-radius: calc(var(--pw) * .13) calc(var(--pw) * .13) 0 0 !important; animation: none; }
section[data-app="bug-bash"] .bb-pip-face:is(.is-wince, .is-sheepish) .bb-pip-eye { height: calc(var(--pw) * .06) !important; animation: none; }
section[data-app="bug-bash"] .bb-pip-face:is(.is-happy, .is-glad, .is-wince, .is-sheepish) .bb-pip-eye::after { display: none; }
.bb-end-pip .bb-pip-face { --pw: 4.4rem; }
@media (min-width: 761px) { #bb-play .bb-top-pip .bb-pip-face { --pw: 3.8rem; } }
@media (max-width: 760px) { .bb-top-pip .bb-pip-face { --pw: 2.9rem; } .bb-end-pip .bb-pip-face { --pw: 3.8rem; } }
@media (max-width: 760px) and (max-height: 640px) { .bb-top-pip .bb-pip-face { --pw: 2.6rem; } }
@media (prefers-reduced-motion: reduce) { section[data-app="bug-bash"] .bb-pip-eye { animation: none; } }
