@font-face {
  font-family: 'FreeMono';
  src: url('/fonts/FreeMono-armenian.woff2') format('woff2');
  unicode-range: U+0530-058F, U+FB13-FB17;
  font-display: swap;
}

:root {
  --paper: rgb(212, 211, 200);
  --maroon: #52222b;
  --link: #1b1b1b;
  --green: #b3ae5a;
  --lime: #c4bab5;
  --lilac: #C1BCD7;
  --orange: #c56e3b;
  --ink: #1b1b1b;
  --dots: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22><rect x=%229%22 y=%229%22 width=%222%22 height=%222%22 fill=%22%235CD0E6%22/></svg>');
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #221d1f;
  --maroon: #d6a6b1;
  --link: #e2dfd3;
  --lime: #3d3538;
  --lilac: #4a4562;
  --ink: #e2dfd3;
  --dots: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22><rect x=%229%22 y=%229%22 width=%222%22 height=%222%22 fill=%22%232c6470%22/></svg>');
}

html {
  background-color: var(--paper);
}

body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  box-sizing: border-box;
  font-family: 'FreeMono', 'Courier New', monospace;
  color: var(--ink);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--paper);
  background-image: var(--dots);
  pointer-events: none;
}

a {
  text-decoration: underline;
  text-decoration-color: var(--maroon);
  text-underline-offset: 3px;
  color: var(--link);
}

.nav a,
.links-box a,
.game,
.copy {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-layout {
  display: flex;
  align-items: stretch;
  gap: 20px;
  min-height: calc(100vh - 40px);
}

.side,
.wing {
  flex-shrink: 0;
  width: min(400px, 28vw);
  margin-top: 17px;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.guy {
  position: absolute;
  right: 21px;
  top: 0;
  height: 40px;
  width: auto;
  z-index: 2;
  pointer-events: none;
}

.wing {
  overflow: hidden;
  padding: 26px 24px 20px;
}

.wing-toy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.wing:has(> .wing-toy) {
  position: relative;
}

.wing > :first-child {
  margin-top: 0;
}

.menu,
.wing {
  border: 1px solid var(--maroon);
  box-sizing: border-box;
  padding: 16px 20px;
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--lilac);
  background-color: var(--paper);
}

.menu,
.links-box {
  background-image: linear-gradient(90deg, transparent 21px, rgba(197, 110, 59, 0.6) 21px, rgba(197, 110, 59, 0.6) 22px, transparent 22px);
  background-repeat: no-repeat;
}

.menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  padding-left: 34px;
}

.links-box {
  position: sticky;
  bottom: 21px;
  margin: auto -20px 0 -34px;
  padding: 14px 20px 16px 34px;
  border-top: 1px dashed var(--orange);
  border-radius: 0 0 14px 14px;
  background-color: var(--paper);
}

.menu > .nav {
  margin-bottom: 20px;
  padding-right: 30px;
  line-height: 1.5;
}

.menu > .nav a {
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


.content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 17px 20px 20px;
}

.content > :first-child,
.menu > :first-child,
.links-box > :first-child {
  margin-top: 0;
}

.menu p {
  margin: 8px 0;
}

.menu hr {
  border: 0;
  border-top: 1px solid var(--maroon);
  margin: 14px -20px;
}

.nav-title {
  color: var(--maroon);
  font-weight: bold;
}

.nav a.strong {
  color: var(--maroon);
  font-weight: bold;
}

.menu-title,
.page-title {
  color: var(--maroon);
  font-weight: bold;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links-box .nav {
  margin-top: 12px;
}

.links-box .nav > li {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 0;
}

.links-box .nav > li::before {
  display: none;
}

.links-box .nav a {
  padding: 2px 10px;
  border: 1px solid var(--maroon);
  border-radius: 12px;
  color: var(--ink);
}

.links-box .support-title {
  margin-top: 16px;
}

.support-title.rainbow {
  animation: rainbow 3s steps(1) infinite;
}

:root[data-theme="dark"] .support-title.rainbow {
  animation-name: rainbow-dark;
}

@keyframes rainbow {
  0% { color: #b4a64b; }
  16.66% { color: #591e2a; }
  33.33% { color: #d2682b; }
  50% { color: #d6a6b1; }
  66.66% { color: #464719; }
  83.33% { color: #98a8d9; }
}

@keyframes rainbow-dark {
  0% { color: #b4a64b; }
  16.66% { color: #b0606f; }
  33.33% { color: #d2682b; }
  50% { color: #d6a6b1; }
  66.66% { color: #8f9140; }
  83.33% { color: #98a8d9; }
}

.links-box .nav a:hover {
  background: var(--lime);
}

.log {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.log li {
  padding: 6px 0;
  line-height: 1.5;
}

.log time {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--maroon);
}

.nav ul {
  list-style: none;
  margin: 2px 0 4px 20px;
  padding: 0;
  border-left: 1px dashed var(--maroon);
}

.nav li {
  margin: 6px 0;
  padding-left: 8px;
}

.nav > li {
  padding-left: 0;
}

.nav a {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
}

.nav a:hover {
  background: var(--lime);
  text-decoration: none;
}

.nav a.current {
  background: var(--green);
  color: #1b1b1b;
}

.nav a.current:hover {
  text-decoration: none;
}

.nav .toggle {
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
  width: 15px;
  height: 15px;
  padding: 0;
  margin-right: 8px;
  line-height: 13px;
  border: 1px solid var(--maroon);
  border-radius: 2px;
  background: transparent;
  color: var(--maroon);
  cursor: pointer;
  vertical-align: middle;
}

.nav .toggle:hover {
  background: var(--maroon) !important;
  color: var(--paper);
}

.nav > li.has-kids::before {
  display: none;
}

.nav.links > li::before {
  background: transparent;
  border-radius: 50%;
}

.nav > li::before,
.nav-title::before {
  content: '';
  display: inline-block;
  box-sizing: border-box;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 2px;
  border: 1px solid var(--maroon);
  background: transparent;
}

.nav > li.c-green::before,
.nav-title.c-green::before { background: var(--green); }
.support-title.rainbow::before { background: currentColor; }
.nav > li.plus::before {
  content: '+';
  font-size: 13px;
  line-height: 13px;
  text-align: center;
  color: var(--maroon);
}

.content img,
.content video {
  max-width: 100%;
}

.content {
  position: relative;
}

.deco {
  position: absolute;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.deco.dragging {
  cursor: grabbing;
  z-index: 5;
}

.deco.pinned {
  cursor: default;
  pointer-events: none;
}

@media (max-width: 700px) {
  #content {
    min-height: 70vh;
  }
  .deco {
    transform: scale(0.75);
    transform-origin: top left;
  }
}

.art-image {
  max-width: 700px;
  width: 100%;
  height: auto;
}

@media (max-width: 700px) {
  body {
    padding: 12px;
  }
  .page-layout {
    gap: 12px;
  }
  .page-layout {
    flex-direction: column;
  }
  .side {
    order: 0;
    width: 100%;
    margin-top: 0;
    gap: 12px;
  }
  .content {
    order: 1;
  }
  .wing {
    order: 2;
    width: 100%;
    margin-top: 0;
  }
  .links-box {
    position: relative;
  }
  .wing:empty,
  .wing.only-toy {
    display: none;
  }

}

.folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 26px 18px;
  margin: 30px 0 20px;
  padding-top: 13px;
}
.folder {
  position: relative;
  display: block;
  min-height: 64px;
  padding: 14px 12px 12px;
  border: 1px solid var(--maroon);
  border-radius: 0 14px 14px 14px;
  box-shadow: 4px 4px 0 var(--lilac);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
}
.folder::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -13px;
  width: 45%;
  height: 12px;
  border: 1px solid var(--maroon);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--paper);
}
.folder:hover,
.folder:hover::before {
  background: var(--lime);
  text-decoration: none;
}
.folder.doc,
.folder.doc:hover {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
.folder.doc::before {
  display: none;
}
.doc-icon {
  display: block;
  width: 97px;
  height: 121px;
  overflow: visible;
  filter: drop-shadow(4px 4px 0 var(--lilac));
  stroke: var(--maroon);
}
.doc-page {
  fill: var(--paper);
}
.folder.doc:hover .doc-page {
  fill: var(--lime);
}
.doc-fold {
  fill: var(--lilac);
  stroke-linejoin: round;
}
.doc-icon line {
  stroke-width: 1;
  stroke-linecap: round;
}
.folder.doc .folder-name {
  width: 160px;
  margin-top: 10px;
  font-weight: normal;
  font-size: 12px;
  color: var(--ink);
}
.folder-name {
  display: block;
  color: var(--maroon);
  font-weight: bold;
  overflow-wrap: anywhere;
}
.folder-count {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.credits {
  width: 100%;
  border-collapse: collapse;
}
.credits th,
.credits td {
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: top;
  border-top: 1px dashed var(--orange);
}
.credits th {
  border-top: 0;
  color: var(--maroon);
  font-weight: bold;
}
.credits td:first-child {
  width: 28%;
}
.credits td:nth-child(2) {
  width: 32%;
}

.folders.content-view {
  display: block;
  padding-top: 0;
}
.file-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 10px;
  border-top: 1px dashed var(--orange);
  color: inherit;
  text-decoration: none;
}
.file-row:last-child {
  border-bottom: 1px dashed var(--orange);
}
.file-row:hover {
  background: var(--lime);
  text-decoration: none;
}
.file-row .doc-icon {
  flex: none;
  width: 40px;
  height: 50px;
  filter: drop-shadow(3px 3px 0 var(--lilac));
}
.file-row:hover .doc-page {
  fill: var(--paper);
}
.file-main {
  flex: 1;
  min-width: 0;
}
.file-name {
  display: block;
  color: var(--maroon);
  overflow-wrap: anywhere;
}
.file-meta {
  flex: none;
  display: grid;
  gap: 2px;
  font-size: 12px;
  text-align: right;
  color: var(--maroon);
}
@media (max-width: 700px) {
  .file-row {
    flex-wrap: wrap;
  }
  .file-meta {
    width: 100%;
    display: flex;
    gap: 12px;
    padding-left: 56px;
    text-align: left;
  }
}

.wing-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  width: min(400px, 28vw);
  margin-top: 17px;
}

.wing-wrap > .wing {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-top: 0;
}

@media (max-width: 700px) {
  .wing-wrap {
    order: 2;
    width: 100%;
    margin-top: 0;
  }
  .wing-wrap:has(> .wing:empty),
  .wing-wrap:has(> .wing.only-toy),
  .wing-wrap:has(> .wing.cites) {
    display: none;
  }
}

.theme-notch {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 3;
  box-sizing: border-box;
  width: 67px;
  height: 40px;
  padding-right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--maroon);
  border-bottom: 1px solid var(--maroon);
  border-bottom-left-radius: 12px;
  background: var(--paper) var(--dots) fixed;
}

.theme-notch::before,
.theme-notch::after {
  content: '';
  position: absolute;
  height: 13px;
  background:
    radial-gradient(circle at 0 100%, transparent 12px, var(--maroon) 12px, var(--maroon) 13px, transparent 13px),
    radial-gradient(circle at 0 100%, var(--paper) 12.5px, transparent 12.5px),
    var(--paper) var(--dots) fixed;
}

.theme-notch::before {
  left: -13px;
  top: 0;
  width: 13px;
}

.theme-notch::after {
  right: 0;
  top: 100%;
  width: 18px;
  height: 17px;
  background:
    radial-gradient(circle at 0 13px, transparent 12px, var(--maroon) 12px, var(--maroon) 13px, transparent 13px) 0 0 / 100% 13px no-repeat,
    radial-gradient(circle at 0 13px, var(--paper) 12.5px, transparent 12.5px) 0 0 / 100% 13px no-repeat,
    linear-gradient(90deg, var(--paper) 12px, var(--maroon) 12px, var(--maroon) 13px, transparent 13px) 0 13px / 100% 4px no-repeat,
    radial-gradient(circle at 4px 17px, var(--lilac) 13px, transparent 13px),
    var(--paper) var(--dots) fixed;
}

.theme-toggle {
  display: flex;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--maroon);
  cursor: pointer;
}

.theme-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid var(--maroon);
  border-radius: 2px;
  box-sizing: border-box;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.theme-toggle:hover svg {
  background: var(--lime);
}

:root:not([data-theme="dark"]) .theme-toggle .sun,
:root[data-theme="dark"] .theme-toggle .moon {
  background: var(--green);
  border-color: var(--green);
  color: #1b1b1b;
}
