@font-face { font-family: JBM; src: url(/assets/jbm-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: JBM; src: url(/assets/jbm-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

@property --h { syntax: "<number>"; inherits: true; initial-value: 210; }
@property --s { syntax: "<percentage>"; inherits: true; initial-value: 55%; }
@property --h2 { syntax: "<number>"; inherits: true; initial-value: 235; }
@property --s2 { syntax: "<percentage>"; inherits: true; initial-value: 45%; }

:root {
  color-scheme: dark;
  --h: 210;
  --s: 55%;
  --h2: 235;
  --s2: 45%;
  --bg: #000;
  --term: rgba(0, 0, 0, .9);
  --term-solid: #000;
  --line: rgba(255, 255, 255, .11);
  --line-hi: hsl(var(--h) var(--s) 72% / .55);
  --text: #d6d6d6;
  --dim: #6e6e6e;
  --acc: hsl(var(--h) var(--s) 72%);
  --acc-strong: hsl(var(--h) var(--s) 60%);
  --acc2: var(--acc);
  --online: #7ec699;
  --idle: #e6c07b;
  --dnd: #e06c75;
  --offline: #7f8794;
  --cw: 1ch;
  transition: --h 1.2s ease, --s 1.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  font: 400 13.5px/1.55 JBM, ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: var(--text);
  background: #000;
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;
}

::selection { background: var(--acc); color: var(--term-solid); }

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dim { color: var(--dim); }
.acc { color: var(--acc); }


.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: start center;
  padding: 136px 16px 24px;
}

.term-wrap { width: min(1260px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 18px; align-items: stretch; }
.win { position: relative; display: flex; min-width: 0; }
.win .term { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.lay {
  position: absolute;
  right: 40px;
  rotate: 1.8deg;
  bottom: calc(100% - 6px);
  width: 330px;
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4));
  transform-origin: 30% 100%;
}

.term {
  position: relative;
  z-index: 1;
  background: var(--term);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .4);
}

.titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #0a0a0a;
  font-size: 12px;
  user-select: none;
}
.tb-dots { display: flex; gap: 7px; }
.tb-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2a2a; }
.tb-dots i:first-child { background: hsl(var(--h) var(--s) 62%); }
.tb-title { color: var(--dim); }
.tb-size { justify-self: end; font-size: 11px; }

.panes { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 12px; }
.p-act, .p-cava { flex: 1; }
.p-cava { display: flex; flex-direction: column; }
.p-cava .viz { flex: 1 1 0; height: auto; min-height: 56px; }
.p-views { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 18px; align-items: end; }
.p-views .digits { grid-row: 1 / 3; }
.p-views .buttons { margin-top: 0; }
.p-views .btn-msg { grid-column: 2; margin-top: 0; }

.pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px 12px;
  transition: border-color .25s;
}
.pane:hover, .pane:focus-within { border-color: var(--line-hi); }
.pane legend {
  padding: 0 6px;
  margin-left: 4px;
  font-size: 12px;
  color: var(--acc);
  font-weight: 700;
  transition: color .25s;
}
.pane legend b { color: var(--dim); font-weight: 400; font-size: 10px; vertical-align: super; margin-right: 3px; }

.who { display: flex; align-items: center; gap: 16px; padding-top: 4px; }
.avatar { position: relative; width: 84px; height: 84px; flex: none; }
#avatar { width: 84px; height: 84px; border-radius: 6px; display: block; background: var(--term-solid); box-shadow: 0 0 0 1px var(--line); }
.deco { position: absolute; inset: -11%; width: 122%; height: 122%; pointer-events: none; }
.who-text { min-width: 0; }
.who-text p { overflow-wrap: anywhere; }
h1 { font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--acc); }
.status::before { content: "●"; margin-right: 6px; }
.status::before { color: var(--offline); }
.st-offline::before { color: var(--offline); }
.status.online::before, .st-online::before { color: var(--online); }
.status.idle::before, .st-idle::before { color: var(--idle); }
.status.dnd::before, .st-dnd::before { color: var(--dnd); }
.st-online::before, .st-idle::before, .st-dnd::before, .st-offline::before { content: "●"; margin-right: 6px; }
.status, [class^="st-"], .tm-r[class*="st-"] { color: var(--text); }
.custom { margin-top: 2px; display: flex; align-items: center; gap: 6px; color: var(--text); }
.custom::before { content: "\201c"; color: var(--dim); }
.custom::after { content: "\201d"; color: var(--dim); }
.custom img { width: 16px; height: 16px; object-fit: contain; }

.fetch { display: flex; gap: 22px; align-items: center; padding-top: 6px; }
.tux { font: inherit; font-size: 10.5px; line-height: 1.12; flex: none; letter-spacing: 0; }
.tux i { font-style: normal; }
.kv { min-width: 0; flex: 1; display: grid; gap: 1px; }
.kv > div { display: flex; gap: 10px; min-width: 0; }
.kv dt { color: var(--acc); font-weight: 700; width: 7ch; flex: none; }
.kv dd { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kv > .kv-title { display: block; font-weight: 700; }
.swatches { margin-top: 8px; gap: 0 !important; }
.swatches i { width: 3ch; height: 1.2em; display: block; }
.swatches i:nth-child(1) { background: hsl(var(--h) var(--s) 14%); }
.swatches i:nth-child(2) { background: hsl(var(--h) var(--s) 24%); }
.swatches i:nth-child(3) { background: hsl(var(--h) var(--s) 34%); }
.swatches i:nth-child(4) { background: hsl(var(--h) var(--s) 44%); }
.swatches i:nth-child(5) { background: hsl(var(--h) var(--s) 54%); }
.swatches i:nth-child(6) { background: hsl(var(--h) var(--s) 64%); }
.swatches i:nth-child(7) { background: hsl(var(--h) var(--s) 74%); }
.swatches i:nth-child(8) { background: hsl(var(--h) var(--s) 86%); }

.cmd { white-space: nowrap; overflow: hidden; }
.ps { color: var(--acc2); font-weight: 700; }
.typed { color: var(--text); }
.typed.typing::after, .cur {
  content: "";
  display: inline-block;
  width: .6em; height: 1.1em;
  margin-left: 1px;
  vertical-align: -.2em;
  background: var(--acc);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.out { margin-top: 6px; }
.out.wait { visibility: hidden; }
.p-about .out { line-height: 1.65; }

.ls { display: grid; gap: 1px; }
.ls a {
  display: flex; align-items: center; gap: 10px;
  margin: 0 -6px; padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
  white-space: nowrap; overflow: hidden;
}
.ls a:hover, .ls a:focus-visible { background: var(--acc); color: var(--term-solid); text-decoration: none; outline: none; }
.ls a:hover .dim, .ls a:focus-visible .dim { color: inherit; opacity: .7; }
.ls a:hover img, .ls a:focus-visible img { filter: brightness(0); }
.ls img, .ls svg { flex: none; opacity: .9; }
.ls .nm { color: var(--acc); font-weight: 700; }
.ls a:hover .nm, .ls a:focus-visible .nm { color: inherit; }
.ls .tgt { overflow: hidden; text-overflow: ellipsis; }

.activity { display: flex; gap: 14px; align-items: center; padding-top: 6px; }
.art { position: relative; width: 72px; height: 72px; flex: none; }
#act-large { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; display: block; box-shadow: 0 0 0 1px var(--line); }
.art .small { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--term-solid); background: var(--term-solid); }
.act-text { min-width: 0; line-height: 1.45; }
.act-text p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kind { font-size: 11px; font-weight: 700; }
.kind::before { content: "> "; }
.act-name { font-weight: 700; }
.idle-line { padding-top: 6px; }

.digits { display: flex; min-height: 64px; padding-top: 4px; }
.digits img { width: 29px; height: 64px; display: block; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn88 { display: block; padding: 0; border: 0; background: none; cursor: var(--curp, pointer); line-height: 0; transition: transform .2s; }
.btn88 img { display: block; width: 88px; height: 31px; image-rendering: pixelated; }
.btn88:hover { transform: translateY(-1px); }
.btn88:focus-visible { outline: 1px solid var(--acc); outline-offset: 2px; }
.btn-msg { font-size: 11px; min-height: 1.5em; margin-top: 4px; }

.viz { display: block; width: 100%; height: 56px; margin-top: 4px; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.player img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; display: block; box-shadow: 0 0 0 1px var(--line); }
.track { min-width: 0; line-height: 1.35; flex: none; }
.track p { white-space: nowrap; }
.song-title { font-weight: 700; color: var(--acc2); }
.key {
  font: inherit; font-weight: 700;
  color: var(--acc);
  background: none; border: 0; cursor: var(--curp, pointer);
  padding: 2px 2px;
  border-radius: 3px;
  white-space: pre;
}
.key:hover { background: var(--acc); color: var(--term-solid); }
.key:focus-visible { outline: 1px solid var(--acc); outline-offset: 2px; }
.i-play, .paused .i-pause { display: none; }
.paused .i-play { display: inline; }
.progress { flex-basis: 100%; order: 3; min-width: 0; display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; min-width: 0; overflow: hidden; white-space: pre; cursor: var(--curp, pointer); color: var(--line-hi); outline: none; }
.bar b { color: var(--acc); font-weight: 400; }
.bar:focus-visible { background: hsl(var(--h) var(--s) 70% / .08); }
.vol-wrap { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.vol { -webkit-appearance: none; appearance: none; width: 84px; height: 14px; background: transparent; cursor: var(--curp, pointer); }
.vol::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--acc) var(--v, 22%), var(--line-hi) 0); }
.vol::-moz-range-track { height: 2px; background: var(--line-hi); }
.vol::-moz-range-progress { height: 2px; background: var(--acc); }
.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 14px; margin-top: -6px; background: var(--acc); border-radius: 1px; }
.vol::-moz-range-thumb { width: 8px; height: 14px; border: 0; background: var(--acc); border-radius: 1px; }
.vol:focus-visible { outline: 1px solid var(--acc); outline-offset: 2px; }

.tmux {
  display: flex; align-items: center;
  height: 24px;
  font-size: 12px;
  background: hsl(var(--h) var(--s) 62% / .16);
  border-top: 1px solid var(--line);
  white-space: nowrap; overflow: hidden;
  user-select: none;
}
.tmux > span { padding: 0 9px; height: 100%; display: flex; align-items: center; }
.tm-sess { background: var(--acc); color: var(--term-solid); font-weight: 700; }
.tm-win { color: var(--dim); }
.tm-win.on { color: var(--text); font-weight: 700; }
.tm-fill { flex: 1; }
.tm-r { border-left: 1px solid var(--line); }
#clock { background: var(--acc); color: var(--term-solid); font-weight: 700; border: 0; }

.boot {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  border: 0; cursor: var(--curp, pointer); text-align: left;
  background: #000;
  color: var(--text);
  font: inherit;
  padding: 20px;
}
.boot-box {
  display: flex; flex-direction: column;
  width: min(460px, 100%);
  padding: 26px 28px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.boot-logo { display: block; white-space: pre; color: var(--acc); line-height: 1; font-size: clamp(12px, 4.2vw, 20px); }
.boot-sub { display: block; margin-top: 10px; color: var(--dim); font-size: 12px; }
.bootlog { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.bootlog > span { display: block; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.bootlog .ok { color: var(--acc); font-weight: 700; }
.bootlog .br { color: var(--dim); }
.login { display: block; margin-top: 16px; }
.login-line { white-space: pre; }
.hint { display: block; color: var(--dim); font-size: 12px; animation: glow 2.4s ease-in-out infinite; }
.boot:focus { outline: none; }
.boot:focus-visible .boot-box { border-color: var(--line-hi); }
body.entered .boot { opacity: 0; visibility: hidden; }
@keyframes glow { 50% { opacity: .45; } }


@media (max-width: 1100px) {
  .term-wrap { grid-template-columns: minmax(0, 1fr); width: min(640px, 100%); gap: 14px; }
  .win-r { order: -1; }
}

@media (max-width: 760px) {
  .stage { padding: 118px 10px 24px; }
  .lay { width: 250px; right: 22px; bottom: calc(100% - 5px); }
  .panes { padding: 8px; }
  .p-cava .viz { flex: none; height: 80px; }
  .p-views { display: block; }
  .p-views .buttons { margin-top: 10px; }
  .tm-win:not(.on) { display: none; }
  .tb-size { display: none; }
}

@media (max-width: 420px) {
  body { font-size: 12.5px; }
  .tux { font-size: 7.5px; }
  .fetch { gap: 14px; }
  .ls .perm { display: none; }
  .vol-wrap { display: none; }
  #tm-status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cur, .typed.typing::after, .hint { animation: none; }
}

html { cursor: var(--cur, auto); }
a, button, label, summary { cursor: var(--curp, pointer); }
