@font-face {
  font-family: "Xanh Mono";
  src: url("/Fonts/XanhMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Xanh Mono";
  src: url("/Fonts/XanhMono-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Go Mono";
  src: url("/Fonts/Go-Mono.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #000000;
  --dim: #8a8a8a;
  --grid: rgba(0, 0, 0, .09);
  --scan: rgba(0, 0, 0, .035);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181a1b;
    --fg: #e8e6e3;
    --dim: #a8a095;
    --grid: rgba(255, 255, 255, .1);
    --scan: rgba(255, 255, 255, .03);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #181a1b;
  --fg: #e8e6e3;
  --dim: #a8a095;
  --grid: rgba(255, 255, 255, .1);
  --scan: rgba(255, 255, 255, .03);
  color-scheme: dark;
}

html:root[data-theme="dark2"] {
  --bg: #000000;
  --fg: #e8e6e3;
  --dim: #8f887e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font: 19px/1.55 "Xanh Mono", monospace;
  padding: 14vh 16px 10vh max(16px, 12vw);
  max-width: 760px;
}

a {
  color: var(--fg);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.name {
  margin: 0;
  font: inherit;
}

.was {
  margin: 0 0 3.2em;
  color: var(--dim);
  font-style: italic;
}

.nowline {
  margin: -2.2em 0 3.2em;
}

.nowline .d {
  color: var(--dim);
  white-space: pre;
}

.label {
  grid-column: 1 / -1;
  margin: 2.4em 0 .5em;
  font: 12px/1 "Go Mono", monospace;
  color: var(--dim);
  text-transform: lowercase;
}

.list .label:first-child {
  margin-top: 0;
}

.list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 3em;
  row-gap: .15em;
}

.list .d {
  color: var(--dim);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list .off {
  color: var(--fg);
}

.foot {
  margin-top: 4.5em;
  font: 12px/1.6 "Go Mono", monospace;
  color: var(--dim);
  display: flex;
  gap: 2em;
}

.foot a,
.foot button {
  color: var(--dim);
}

.foot button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.foot button:hover {
  color: var(--fg);
}

@media (max-width: 700px), (hover: none) {
  #stage {
    transform: none !important;
    will-change: auto;
  }
}

@media (max-width: 520px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    max-width: 100%;
    font-size: 17px;
    padding: 8vh 22px 8vh;
  }

  .was {
    margin-bottom: 2.4em;
  }

  .nowline {
    margin: -1.6em 0 2.4em;
  }

  .label {
    margin-top: 2em;
  }

  .list {
    column-gap: 1.4em;
    row-gap: 0;
  }

  .list > *:not(.label),
  .list #latest > * {
    padding: .3em 0;
  }

  .list .d,
  .list a {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 0;
  }

  .list a .d {
    display: block;
  }
}

@media (hover: none) {
  .list .sel {
    transition: opacity .25s;
  }

  .list:not(.touched) .sel {
    opacity: 0 !important;
  }

  .list:not(.touched) .on,
  .list:not(.touched) .on .d {
    color: inherit;
  }

  .list:not(.touched) .on.d,
  .list:not(.touched) .on .d {
    color: var(--dim);
  }
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html {
  overflow-x: clip;
}

#stage {
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  z-index: 1;
}

.list {
  position: relative;
}

.list :not(.sel) {
  position: relative;
  z-index: 1;
}

.list .sel {
  position: absolute;
  top: 0;
  left: -.5em;
  right: -.5em;
  background: var(--fg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.list .on,
.list .on .d,
.list .on.d {
  color: var(--bg);
}

.list a:hover {
  text-decoration: none;
}

.list > *:not(.label) {
  cursor: default;
}

.list a,
.list a * {
  cursor: pointer;
}

.list button.d {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--dim);
  cursor: pointer;
}

@media (max-width: 360px) {
  body {
    font-size: 15px;
    padding-left: 18px;
    padding-right: 14px;
  }
}

.cform {
  grid-column: 1 / -1;
  display: grid;
  gap: .5em;
  max-width: 34em;
  margin-top: .8em;
}
.cform input,
.cform textarea {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--dim);
  border-radius: 0;
  padding: .3em .5em;
  width: 100%;
  resize: vertical;
}
.cform input:focus,
.cform textarea:focus {
  outline: none;
  border-color: var(--fg);
}
.cform ::placeholder {
  color: var(--dim);
}
.cform .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}
.cform p {
  margin: 0;
  display: flex;
  gap: 1.4em;
  align-items: baseline;
}
.cform button {
  font: inherit;
  color: var(--bg);
  background: var(--fg);
  border: 0;
  border-radius: 0;
  padding: .15em .9em;
  cursor: pointer;
}
.cst {
  color: var(--dim);
}
