:root {
  color-scheme: dark;
  --bg: #0c1119;
  --panel: #141a26;
  --ink: #fff;
  --muted: #9aa7bd;
  --line: #ffffff1c;
  --blue: #4d8dff;
  --display: "Archivo", sans-serif;
  --body: "Inter", sans-serif;
  --mono: "JetBrains Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(0.875rem, 1vw, 1rem);
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-weight: 550;
  line-height: 1.4;
  transition:
    background 0.2s,
    transform 0.2s;
}
button:hover,
.button:hover {
  background: #ffffff12;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #06101f;
}
.primary:hover {
  background: #78a8ff;
}
.danger {
  color: #ff9c9c;
  border-color: #ff9c9c55;
}
.quiet {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
:focus-visible {
  outline: 2px solid #a9c8ff;
  outline-offset: 4px;
}
.skip {
  position: fixed;
  top: -5rem;
  left: 1rem;
  background: var(--blue);
  padding: 1rem;
  z-index: 20;
}
.skip:focus {
  top: 1rem;
}
header {
  height: 100px;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 clamp(1.2rem, 3.8vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 900 clamp(1.5rem, 2.2vw, 2rem)/1 var(--display);
  letter-spacing: -0.06em;
}
.brand > span:first-child {
  color: var(--blue);
}
.brand-caption {
  display: block;
  font: 400 0.55rem/1 var(--mono);
  letter-spacing: 0.09em;
  margin-top: 12px;
  color: var(--muted);
}
.home {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}
#account-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
#account-nav button {
  padding: 0.6rem;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1920px;
  margin: auto;
}
aside {
  padding: 2.5rem 1.8rem;
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
aside nav {
  display: grid;
}
aside nav a {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
aside nav a.active {
  color: #fff;
}
aside nav a.active span {
  color: var(--blue);
}
.micro {
  font: 400 0.65rem/1.6 var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.side-note {
  margin-top: 2rem;
  color: var(--muted);
}
.side-note img {
  image-rendering: pixelated;
}
.side-note p {
  font: 600 1.4rem/1.2 var(--display);
  letter-spacing: -0.03em;
}
main {
  padding: clamp(1.5rem, 4vw, 4rem);
  min-width: 0;
  outline: none;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.page-head h1,
h1 {
  font: 750 clamp(2.5rem, 5.5vw, 6rem)/0.97 var(--display);
  letter-spacing: -0.06em;
  margin: 1rem 0;
}
.page-head h1 em {
  font-style: normal;
  color: var(--blue);
}
.page-head p {
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 0;
}
.page-head .number {
  font: 300 clamp(3rem, 7vw, 7rem)/1 var(--display);
  color: var(--line);
}
h2 {
  font: 650 clamp(1.4rem, 2vw, 2rem)/1.15 var(--display);
  letter-spacing: -0.035em;
}
h3 {
  font: 650 1.25rem/1.2 var(--display);
  letter-spacing: -0.02em;
}
p {
  overflow-wrap: anywhere;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  border-block: 1px solid var(--line);
  padding: 1.1rem 0;
  margin-bottom: 1.1rem;
}
.filters label:first-child {
  flex: 1;
  min-width: 180px;
}
.filters label {
  font-size: 0.7rem;
  color: var(--muted);
}
input,
textarea,
select {
  display: block;
  background: #151d2b;
  border: 1px solid #ffffff26;
  border-radius: 4px;
  color: #fff;
  padding: 0.8rem 0.9rem;
  width: 100%;
  margin-top: 0.4rem;
}
input[type="checkbox"] {
  width: auto;
  margin: 0;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
input::placeholder,
textarea::placeholder {
  color: #78879e;
}
select {
  cursor: pointer;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.pill {
  font: 0.65rem/1.4 var(--mono);
  padding: 0.35rem 0.6rem;
  border: 1px solid #ffffff25;
  border-radius: 4px;
  color: #c1d0e8;
}
.pill.selected,
.pill:hover {
  border-color: var(--blue);
  color: #a5c6ff;
}
.results-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin: 1.6rem 0 1rem;
  font-size: 0.8rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}
.card {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.2rem;
  animation: arrive 0.4s both;
}
.cover {
  display: block;
  position: relative;
  background: var(--panel);
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 7px;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.cover:hover img {
  transform: scale(1.04);
}
.cover .pill {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: #0c1119dc;
  color: white;
}
.card h2 {
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
  margin: 1rem 0 0.45rem;
  overflow-wrap: anywhere;
}
.card .byline {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.card .tags {
  margin-top: 0.8rem;
}
.stats {
  font: 0.65rem/1.5 var(--mono);
  white-space: nowrap;
}
.empty {
  padding: clamp(2rem, 6vw, 6rem) 1rem;
  text-align: center;
  border: 1px dashed #ffffff26;
  margin-top: 2rem;
  color: var(--muted);
}
.empty h2 {
  color: white;
}
.empty p {
  max-width: 32rem;
  margin: 1rem auto 1.5rem;
}
.empty img {
  width: 64px;
  image-rendering: pixelated;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  margin: 2rem;
}
.form-shell {
  max-width: 900px;
}
.form-section {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 2rem;
}
.form-section h2 {
  margin: 0;
  font-size: 1.4rem;
}
.form-section .hint {
  margin-top: 0.8rem;
}
.fields {
  display: grid;
  gap: 1.3rem;
}
.fields.two {
  grid-template-columns: 1fr 1fr;
}
label {
  display: block;
  font-size: 0.85rem;
}
.hint {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}
.upload-zone {
  padding: 1.2rem;
  border: 1px dashed #4d8dff70;
  background: #4d8dff08;
  border-radius: 6px;
}
.upload-zone input {
  padding: 0.6rem 0;
  border: 0;
  background: none;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
.preview-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}
.preview-item button {
  font-size: 0.65rem;
  padding: 0.3rem;
  width: 100%;
}
.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.file-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  overflow-wrap: anywhere;
}
.check {
  display: flex;
  align-items: start;
  gap: 0.8rem;
}
.check input {
  margin-top: 0.25rem;
}
.actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.error {
  color: #ffaaaa;
  padding: 1rem;
  border: 1px solid #ffaaaa50;
  border-radius: 4px;
}
.error:empty {
  display: none;
}
.auth {
  max-width: 500px;
  margin: 2rem auto;
}
.auth h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}
.auth form {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}
.auth-links a {
  color: #a5c6ff;
}
.notice {
  padding: 1.2rem;
  background: #4d8dff15;
  border: 1px solid #4d8dff55;
  border-radius: 6px;
  margin: 1rem 0;
}
.recovery-code {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
  font-family: var(--mono);
  background: #080d15;
  padding: 1rem;
  margin: 1rem 0;
}
.breadcrumbs {
  display: flex;
  gap: 0.7rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  gap: 2rem;
}
.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #141a26;
  border-radius: 7px;
}
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.7rem;
  overflow: auto;
  padding-bottom: 0.5rem;
}
.gallery-thumbs button {
  padding: 0;
  flex: 0 0 75px;
  overflow: hidden;
  border-radius: 4px;
}
.gallery-thumbs img {
  width: 75px;
  height: 60px;
  object-fit: cover;
}
.gallery-thumbs button[aria-pressed="true"] {
  border-color: var(--blue);
}
.detail-title {
  font-size: clamp(2rem, 3.6vw, 4rem);
  margin: 0.7rem 0 1rem;
}
.detail-info {
  border-block: 1px solid var(--line);
  padding: 1rem 0;
  margin: 1.5rem 0;
}
.detail-info p {
  margin: 0.6rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}
.detail-info span {
  color: var(--muted);
}
.description {
  white-space: pre-wrap;
  color: #c3cede;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.detail-body {
  margin-top: 2rem;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  background: #4d8dff24;
  border: 1px solid #4d8dff55;
  border-radius: 50%;
  font: 700 1.8rem var(--display);
  color: #a5c6ff;
}
.profile-head {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.profile-head h1 {
  font-size: 3rem;
}
.muted {
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #e7efff;
  color: #101b2e;
  border-radius: 6px;
  padding: 1rem 1.4rem;
  box-shadow: 0 10px 50px #0006;
  max-width: 90vw;
  z-index: 30;
  display: none;
}
#toast.show {
  display: block;
}
dialog {
  background: var(--panel);
  color: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 500px;
  padding: 2rem;
}
dialog::backdrop {
  background: #000a;
}
dialog form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.guide {
  max-width: 750px;
}
.guide p,
.guide li {
  color: var(--muted);
}
.guide h2 {
  margin-top: 2rem;
}
.progress {
  color: #a5c6ff;
  font-size: 0.8rem;
}
.hidden {
  display: none !important;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1400px) {
  .layout {
    grid-template-columns: 275px minmax(0, 1fr);
  }
  aside {
    padding: 3rem 2.5rem;
  }
}
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .form-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  header .home {
    display: none;
  }
  #account-nav {
    margin-left: auto;
  }
}
@media (max-width: 767px) {
  header {
    height: 80px;
    padding: 0 1rem;
    gap: 0.5rem;
  }
  .brand-caption {
    display: none;
  }
  #account-nav {
    font-size: 0.7rem;
    gap: 0.5rem;
  }
  #account-nav .button {
    padding: 0.55rem;
  }
  .layout {
    display: block;
  }
  aside {
    padding: 1rem;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 1rem;
  }
  aside > .micro,
  .side-note,
  aside > .quiet {
    display: none;
  }
  aside nav {
    display: flex;
    gap: 1rem;
    overflow: auto;
  }
  aside nav a {
    white-space: nowrap;
    font-size: 0.75rem;
    border: 0;
    padding: 0.3rem 0;
  }
  aside nav a span {
    display: none;
  }
  aside > .button {
    display: none;
  }
  main {
    padding: 1.4rem 1rem;
  }
  .page-head {
    gap: 1rem;
  }
  .page-head .number {
    display: none;
  }
  .page-head h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  .filters {
    gap: 0.6rem;
  }
  .filters label:first-child {
    flex-basis: 100%;
  }
  .filters label {
    flex: 1;
  }
  .grid {
    gap: 1.1rem;
  }
  .cover {
    aspect-ratio: 1;
  }
  .card .byline {
    display: block;
  }
  .stats {
    display: block;
    margin-top: 0.4rem;
  }
  .fields.two {
    grid-template-columns: 1fr;
  }
  .form-section {
    padding: 1.5rem 0;
  }
  .preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .detail-layout {
    gap: 1rem;
  }
  .card .tags {
    display: none;
  }
  .page-head p {
    font-size: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
