/* Windows */
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 17.5rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 3.25rem - 1.5rem);
  background: var(--sheet);
  border: 1px solid var(--edge);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgb(var(--shadow) / 0.06),
    0 1.625rem 3.125rem -1.375rem rgb(var(--shadow) / 0.65);
}

.win:focus {
  outline: none;
}

.win:focus-visible {
  outline: 0.125rem solid var(--pencil);
  outline-offset: 1px;
}

.win-bar {
  flex: none;
  height: 2.25rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.25rem 0 0.75rem;
  background: var(--bar-idle);
  color: var(--on-bar);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.win.active .win-bar {
  background: var(--bar);
}

.win-bar .win-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.8125rem;
  font-stretch: 100%;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-btn {
  width: 1.875rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
}

.win-btn:hover {
  background: color-mix(in oklab, var(--on-bar) 14%, transparent);
}

.win-btn svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.win-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.125rem;
}

.win-body.flush {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.win h2 {
  margin: 0;
  font-size: 1.25rem;
  font-stretch: 110%;
  font-weight: 640;
  line-height: 1.2;
  text-wrap: balance;
}

.win h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-stretch: 75%;
  font-weight: 600;
  color: var(--muted);
}

.win p {
  margin: 0;
}

.stack-y {
  display: grid;
  gap: 0.875rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.chip {
  font-size: 0.75rem;
  padding: 0.125rem 0.5625rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
  white-space: nowrap;
}

.chip.sample {
  border-style: dashed;
  margin-right: 0.375rem;
}

.tick {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  color: var(--pencil);
  border-radius: 0.25rem;
}

.tick svg {
  width: 0.9375rem;
  height: 0.9375rem;
  overflow: visible;
}

.tick path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

a.tick:hover {
  background: var(--band);
}

.tick.draw path {
  animation: draw 0.34s cubic-bezier(0.3, 0.7, 0.3, 1) both;
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Run_close.exe */
.run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.625rem 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 1.625rem;
  padding: 0 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  font-size: 0.8125rem;
  font-weight: 600;
}

.pill[data-s="running"] {
  border-color: var(--ink);
}

.pill[data-s="done"] {
  background: var(--mint);
  color: var(--ink);
  border-color: transparent;
}

.stages {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.375rem;
}

.stages li {
  display: grid;
  gap: 1px;
  padding: 0.4375rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.stages b {
  font-weight: 600;
}

.stages span {
  font-size: 0.75rem;
  color: var(--muted);
}

.stages li[data-s="run"] {
  border-color: transparent;
  background: var(--sky);
}

.stages li[data-s="done"] {
  border-color: transparent;
  background: var(--mint);
}

.stages li[data-s="err"] {
  border-color: transparent;
  background: var(--rose);
  color: var(--pencil);
}

.stages li[data-s="err"] span {
  color: inherit;
}

.tbl-box {
  position: relative;
  overflow-x: auto;
}

.recon {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.recon th {
  padding: 0.375rem 0.5rem;
  border-bottom: 1.5px solid var(--ink);
  text-align: left;
  font-size: 0.75rem;
  font-stretch: 75%;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.recon td {
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
  height: 2.3125rem;
}

.recon .n {
  text-align: right;
  white-space: nowrap;
}

.recon .t {
  width: 2.125rem;
  text-align: center;
}

.recon tr.err td {
  color: var(--pencil);
}

.log {
  margin: 0;
  height: 8rem;
  overflow: auto;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.log .ts {
  color: var(--muted);
}

.log .er {
  color: var(--pencil);
}

.stamp {
  position: absolute;
  right: 14%;
  top: 22%;
  pointer-events: none;
  padding: 0.375rem 0.875rem 0.3125rem;
  border: 0.1875rem solid var(--pencil);
  border-radius: 0.375rem;
  color: var(--pencil);
  font-size: 1.75rem;
  font-stretch: 75%;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  rotate: -9deg;
  opacity: 0.9;
  mix-blend-mode: var(--blend);
}

.stamp small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}

/* Files and workpapers */
.files {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.files li {
  border-bottom: 1px solid var(--rule);
}

.file {
  width: 100%;
  display: grid;
  grid-template-columns: 1.625rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.5rem;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
}

button.file:hover,
a.file:hover {
  background: var(--band);
}

.file svg {
  width: 1.375rem;
  height: 1.375rem;
}

.file b {
  display: block;
  font-weight: 560;
}

.file small {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}

.fig {
  font-variant-numeric: tabular-nums lining-nums;
  font-stretch: 88%;
  font-weight: 600;
  white-space: nowrap;
}

.wp {
  display: grid;
  gap: 1.125rem;
}

.wp-fig {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.25rem;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.wp-fig strong {
  font-size: 2rem;
  font-stretch: 88%;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wp-fig span {
  flex: 1;
}

.ctrl {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.375rem;
}

.ctrl li {
  position: relative;
  padding-left: 1.25rem;
}

.ctrl li::before {
  content: "";
  position: absolute;
  left: 0.1875rem;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 0.125rem;
}

.evidence {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.evidence a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.signoff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: 0.375rem;
  overflow: hidden;
}

.signoff div {
  display: grid;
  gap: 0.125rem;
  padding: 0.5rem 0.75rem;
}

.signoff div + div {
  border-left: 1px solid var(--rule);
}

.hand {
  font-family: var(--hand);
  font-size: 1.1875rem;
  line-height: 1.1;
  color: var(--pencil);
}

/* Skills.xlsx */
.sheet {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.fx {
  display: flex;
  align-items: stretch;
  min-height: 2.125rem;
  border-bottom: 1px solid var(--edge);
  font-size: 0.8125rem;
}

.fx .ref {
  width: 3.625rem;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--edge);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.fx i {
  display: grid;
  place-items: center;
  padding: 0 0.625rem;
  border-right: 1px solid var(--edge);
  font-family: Georgia, "Times New Roman", serif;
  color: var(--muted);
}

.fx output {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.625rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.xl {
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 100%;
}

.xl thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--band);
  border: 1px solid var(--rule);
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.xl tbody th {
  background: var(--band);
  border: 1px solid var(--rule);
  width: 2.25rem;
  padding: 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.xl td {
  border: 1px solid var(--rule);
  padding: 0.375rem 0.5rem;
  white-space: nowrap;
  min-width: 8.125rem;
  cursor: cell;
}

.xl tr.hdr td {
  font-weight: 600;
}

.xl td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.xl td.sel {
  outline: 0.125rem solid var(--pencil);
  outline-offset: -0.125rem;
  background: color-mix(in oklab, var(--pencil) 8%, transparent);
}

.tabs {
  display: flex;
  gap: 0.125rem;
  padding: 0 0.5rem;
  border-top: 1px solid var(--edge);
  background: var(--band);
  overflow-x: auto;
}

.tabs button {
  border: 0;
  border-bottom: 0.125rem solid transparent;
  background: transparent;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.tabs button[aria-selected="true"] {
  background: var(--sheet);
  border-bottom-color: var(--pencil);
  font-weight: 600;
}

/* ID badge */
.badge-wrap {
  display: grid;
  justify-items: center;
  perspective: 75rem;
  transform-origin: 50% 0;
  transition: rotate 0.7s cubic-bezier(0.3, 1.8, 0.4, 1);
}

.strap {
  width: 1.625rem;
  height: 2.5rem;
  margin-top: -1.125rem;
  position: relative;
  background: linear-gradient(
    90deg,
    var(--pencil) 0 38%,
    color-mix(in oklab, var(--pencil) 70%, #000) 38% 62%,
    var(--pencil) 62%
  );
}

.strap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.625rem;
  translate: -50% 0;
  width: 1.125rem;
  height: 0.875rem;
  border: 0.125rem solid var(--muted);
  border-radius: 0.25rem;
  background: var(--sheet);
}

.badge {
  position: relative;
  width: 15.625rem;
  height: 25rem;
  margin-top: 0.25rem;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.badge.flipped {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  backface-visibility: hidden;
  border-radius: 0.875rem;
  background: var(--sheet);
  border: 1px solid var(--edge);
  box-shadow: 0 1.125rem 1.875rem -1.125rem rgb(var(--shadow) / 0.65);
  overflow: hidden;
}

.face.back {
  transform: rotateY(180deg);
  align-items: stretch;
  gap: 0.625rem;
  padding: 1.125rem;
  font-size: 0.8125rem;
  overflow: auto;
}

.slot {
  width: 3.375rem;
  height: 0.625rem;
  margin-top: 0.75rem;
  border-radius: 0.3125rem;
  background: var(--paper);
  border: 1px solid var(--edge);
}

.badge-dept {
  align-self: stretch;
  margin: 0.625rem 0 0 !important;
  padding: 0.375rem 0;
  background: var(--bar);
  color: var(--on-bar);
  text-align: center;
  font-size: 0.75rem;
  font-stretch: 88%;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.face img {
  width: 8rem;
  height: 10rem;
  margin-top: 0.875rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--edge);
}

.badge-name {
  display: grid;
  gap: 1px;
  margin-top: 0.625rem;
  text-align: center;
}

.badge-name strong {
  font-size: 1.625rem;
  font-stretch: 118%;
  font-weight: 650;
  line-height: 1.1;
}

.badge-name span {
  font-size: 0.75rem;
  color: var(--muted);
}

.badge-role {
  margin-top: 0.375rem !important;
  font-size: 0.875rem;
  font-weight: 560;
  text-align: center;
}

.barcode {
  display: block;
  width: 10.625rem;
  height: 1.875rem;
  margin: auto 0 0.875rem;
}

.barcode rect {
  fill: var(--ink);
}

.flip {
  margin-top: 0.875rem;
}

/* Résumé, mail, terminal */
.doc {
  display: grid;
  gap: 0.875rem;
  max-width: 62ch;
}

.doc ul {
  margin: 0.25rem 0 0;
  padding-left: 1.125rem;
  display: grid;
  gap: 0.1875rem;
}

.xp {
  display: grid;
  gap: 0.125rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--rule);
}

.xp b {
  font-weight: 600;
}

.avail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0.75rem 0.875rem;
  border-radius: 0.625rem;
  background: var(--mint);
  color: var(--ink);
}

.avail dt {
  font-weight: 600;
}

.avail dd {
  margin: 0;
}

/* Savings_calc.exe */
.calc {
  display: grid;
  gap: 1rem;
}

.calc-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.375rem 1rem;
}

.calc-in label {
  font-weight: 560;
}

.calc-in output {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.calc-in input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  accent-color: var(--pencil);
}

.calc-in input[type="number"] {
  width: 7rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 0.375rem;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}

.calc-bars {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 4rem;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 0.875rem;
  border-top: 1.5px solid var(--ink);
  font-size: 0.8125rem;
}

.calc-bars i {
  width: var(--w, 0%);
  height: 0.875rem;
  border-radius: 0.25rem;
  background: var(--bar);
  transition: width 0.25s ease-out;
}

.calc-bars i.after {
  background: var(--pencil);
}

.calc-bars b {
  text-align: right;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.calc-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.625rem;
}

.calc-figs div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 0.625rem;
  background: var(--band);
}

.calc-figs strong {
  font-size: 1.75rem;
  font-stretch: 88%;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.calc-figs span {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Recommendations */
.rec {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.875rem 1rem;
  border-left: 0.25rem solid var(--bar);
  border-radius: 0 0.625rem 0.625rem 0;
  background: var(--band);
}

.rec blockquote {
  margin: 0;
  line-height: 1.5;
}

.rec figcaption {
  display: grid;
  font-size: 0.8125rem;
  color: var(--muted);
}

.rec figcaption b {
  color: var(--ink);
  font-weight: 600;
}

.mail {
  display: grid;
  gap: 0.625rem;
}

.field {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--rule);
}

.field label {
  font-size: 0.8125rem;
  font-stretch: 88%;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.25rem 0.125rem;
}

.mail textarea {
  min-height: 8.125rem;
  resize: vertical;
  border: 1px solid var(--rule);
  border-radius: 0.375rem;
  background: var(--paper);
  padding: 0.625rem;
}

.term {
  flex: 1;
  min-height: 100%;
  padding: 0.75rem 0.875rem;
  background: #0f1512;
  color: #d8e3da;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.term .out {
  margin: 0;
  white-space: pre-wrap;
}

.term form {
  display: flex;
  gap: 0.5rem;
}

.term .p {
  color: #9fd4a8;
  white-space: nowrap;
}

.term input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
  caret-color: #ee8270;
}

/* Phone layout */
:root.phone body {
  --status-h: calc(3rem + env(safe-area-inset-top));
  --dock-h: calc(7rem + env(safe-area-inset-bottom));
}

:root.phone .desk {
  inset: var(--status-h) 0 var(--dock-h) 0;
  overflow: auto;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

:root.phone .icons {
  position: static;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.625rem 0.25rem;
  padding: 0.875rem 0.75rem 0.5rem;
}

:root.phone .icons li.docked {
  display: none;
}

:root.phone .icon {
  width: auto;
}

:root.phone .icon-tile {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
}

:root.phone .icon-label {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  overflow-wrap: break-word;
}

:root.phone .bginfo {
  display: none;
}

:root.phone .note {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto;
  margin: 0.875rem 1.25rem 0;
  rotate: -1deg;
  cursor: default;
}

:root.phone .note + .note {
  display: none;
}

:root.phone .taskbar {
  top: 0;
  bottom: auto;
  height: var(--status-h);
  padding: env(safe-area-inset-top) max(0.625rem, env(safe-area-inset-right)) 0
    max(0.625rem, env(safe-area-inset-left));
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
}

:root.phone .cmd,
:root.phone .tasks {
  display: none;
}

:root.phone .tray {
  flex: 1;
  gap: 0.375rem;
}

:root.phone .clock {
  order: -1;
  margin-right: auto;
  padding: 0.4375rem 0.75rem;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
  font-size: 0.875rem;
  font-weight: 600;
}

:root.phone .tray > button {
  width: 2.75rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
}

:root.phone .dock {
  position: fixed;
  left: 50%;
  bottom: calc(0.625rem + env(safe-area-inset-bottom));
  z-index: 9000;
  width: min(26.25rem, calc(100% - 1.5rem));
  translate: -50% 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.5rem 0.375rem 0.375rem;
  border-radius: 1.75rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(1.125rem) saturate(1.3);
  backdrop-filter: blur(1.125rem) saturate(1.3);
  box-shadow: 0 1.125rem 2.5rem -1.25rem rgb(var(--shadow) / 0.7);
  transition: translate 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root.phone .dock .icon {
  padding: 0.125rem;
}

:root.phone .dock .icon-tile {
  width: min(3.5rem, 15vw);
  height: min(3.5rem, 15vw);
}

:root.phone .tray > [data-wall-toggle],
:root.phone .tray > [data-theme-toggle],
:root.phone .tray > [data-sound-toggle],
:root.phone .tray > .scale-chip {
  display: none;
}

:root.phone .quick-btn {
  display: grid;
}

:root.phone .dock .icon-label {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 0;
  font-size: 0.6875rem;
}

:root.phone body.app-open .dock {
  translate: -50% calc(100% + 1.875rem);
}

:root.phone .win {
  position: fixed !important;
  inset: var(--status-h) 0 0 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 1.125rem 1.125rem 0 0;
}

:root.phone .win-bar {
  position: relative;
  height: 3.375rem;
  padding-top: 0.5rem;
  cursor: default;
  touch-action: none;
}

:root.phone .win-bar::before {
  content: "";
  position: absolute;
  top: 0.375rem;
  left: 50%;
  width: 2.5rem;
  height: 0.3125rem;
  border-radius: 0.1875rem;
  background: currentColor;
  opacity: 0.35;
  translate: -50% 0;
}

:root.phone .win-btn {
  width: 2.75rem;
  height: 2.5rem;
}

:root.phone .win-btn[data-act="min"] {
  display: none;
}

:root.phone .win-body {
  padding-bottom: calc(1.125rem + env(safe-area-inset-bottom));
}

:root.phone .status {
  bottom: calc(var(--dock-h) + 0.375rem);
}

:root.phone body.app-open .status {
  bottom: calc(1rem + env(safe-area-inset-bottom));
}

:root.phone .stages {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(6.5rem, 1fr);
  overflow-x: auto;
}

:root.phone .recon thead {
  display: none;
}

:root.phone .recon,
:root.phone .recon tbody {
  display: block;
}

:root.phone .recon tr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}

:root.phone .recon td {
  height: auto;
  padding: 0;
  border: 0;
}

:root.phone .recon td:first-child {
  order: 0;
  flex: 1 1 calc(100% - 2.75rem);
  font-weight: 600;
}

:root.phone .recon td.n {
  order: 2;
  flex: 1 1 6.5rem;
  text-align: left;
  font-size: 0.8125rem;
}

:root.phone .recon td.n::before {
  content: attr(data-label);
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
}

:root.phone .recon tr.err td.n::before {
  color: inherit;
}

:root.phone .recon td.t {
  order: 1;
  flex: 0 0 2rem;
  text-align: center;
}

:root.phone .stamp {
  font-size: 1.375rem;
  right: 8%;
}

:root.phone .xl thead,
:root.phone .xl tr.hdr,
:root.phone .xl tbody th {
  display: none;
}

:root.phone .xl,
:root.phone .xl tbody {
  display: block;
  min-width: 0;
}

:root.phone .xl tr {
  display: grid;
  gap: 0.125rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule);
}

:root.phone .xl td {
  min-width: 0;
  padding: 0.1875rem 0.375rem;
  border: 0;
  white-space: normal;
}

:root.phone .xl td:nth-of-type(1) {
  font-weight: 600;
}

:root.phone .xl td:nth-of-type(2) {
  font-size: 0.8125rem;
  color: var(--muted);
}

:root.phone .tabs button {
  padding: 0.625rem 0.875rem;
}

:root.phone.short .note {
  display: none;
}

/* 3D lanyard badge */
.win.badge-win {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.win.badge-win:focus-visible {
  outline: none;
}

.win.badge-win .win-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.badge3d {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.badge3d canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
  touch-action: none;
}

.badge3d-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  margin: 0 0.625rem 0.625rem;
  padding: 0.375rem 0.375rem 0.375rem 0.75rem;
  border-radius: 0.75rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(0.625rem);
  backdrop-filter: blur(0.625rem);
}

.btn-small {
  min-height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

:root.phone .win.badge-win {
  background: color-mix(in oklab, var(--paper) 55%, transparent);
  -webkit-backdrop-filter: blur(1rem);
  backdrop-filter: blur(1rem);
}

/* Rec_Rush.exe */
.rec {
  display: grid;
  gap: 0.875rem;
}

.rec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.625rem 1rem;
}

.rec-score {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.rec-time {
  font-family: var(--mono);
  font-size: 1.375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rec-meter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  background: var(--sky);
}

.rec-meter span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.rec-meter strong {
  font-size: 1.25rem;
  font-stretch: 88%;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.rec-cols {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.rec-cols > section {
  min-width: 0;
  align-content: start;
}

.rec-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.rec-row {
  width: 100%;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto minmax(1.375rem, auto);
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--sheet);
  color: var(--ink);
  text-align: left;
  font-size: 0.8125rem;
}

.rec-row:hover:not(:disabled) {
  border-color: var(--ink);
}

.rec-row[aria-pressed="true"] {
  background: var(--sky);
  border-color: var(--ink);
}

.rec-row.matched {
  background: var(--mint);
  border-color: transparent;
  cursor: default;
}

.rec-row.flagged {
  background: var(--rose);
  border-color: transparent;
  cursor: default;
}

.rec-date {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rec-row.matched .rec-date,
.rec-row.flagged .rec-date {
  color: var(--ink);
}

.rec-desc {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-amt {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rec-mark {
  display: grid;
  place-items: center;
}

.rec-flag {
  padding: 0 0.375rem;
  border: 1.5px solid var(--pencil);
  border-radius: 999px;
  color: var(--pencil);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  rotate: -6deg;
}

.rec-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.rec {
  container-type: inline-size;
}

@container (max-width:24em) {
  .rec-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width:38.75em) {
  .rec-row {
    grid-template-columns: minmax(0, 1fr) minmax(1.25rem, auto);
    grid-template-areas: "desc desc" "amt mark";
    row-gap: 0.125rem;
  }
  .rec-date {
    display: none;
  }
  .rec-desc {
    grid-area: desc;
    font-size: 0.75rem;
    color: var(--muted);
  }
  .rec-row.matched .rec-desc,
  .rec-row.flagged .rec-desc {
    color: var(--ink);
  }
  .rec-amt {
    grid-area: amt;
  }
  .rec-mark {
    grid-area: mark;
  }
}

:root.phone .dock {
  container-type: inline-size;
}

:root.phone .dock .icon {
  min-width: 0;
}

@container (max-width:17em) {
  .dock .icon-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

:root.phone .win {
  min-width: 0;
}

.quick-row .tgl-ico,
.quick-row select {
  flex: none;
}

.stack-y,
.rec,
.wp,
.doc,
.mail {
  grid-template-columns: minmax(0, 1fr);
}

.rec-score,
.rec-meter {
  flex-wrap: wrap;
}
