:root {
  color-scheme: dark;
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
  background: #101111;
  color: #f3f1ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
.primary,
select,
input {
  font: inherit;
}
button,
.primary,
select {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  color: inherit;
  background: #282a2a;
}
button:hover,
select:hover {
  background: #353837;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
label:focus-within {
  outline: 2px solid #c3dfa8;
  outline-offset: 3px;
}
.primary {
  color: #172014;
  background: #c1d8a7;
  font-weight: 650;
  display: inline-block;
}
.primary:hover {
  background: #d6eac2;
}
#gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(ellipse at 50% 35%, #222923 0%, #101111 60%);
}
.gate-card {
  text-align: center;
  width: min(100%, 380px);
}
.gate-card h1 {
  margin: 24px 0 8px;
}
.gate-card p,
#count {
  color: #aaaead;
}
.gate-card .primary {
  margin-top: 16px;
}
.gate-card input {
  width: 100%;
  padding: 12px;
  background: #191b1a;
  border: 1px solid #515650;
  border-radius: 9px;
}
#library {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100svh;
}
aside {
  background: #181a19;
  padding: 28px 18px;
  border-right: 1px solid #303230;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 38px;
}
nav {
  display: grid;
  gap: 4px;
}
nav button {
  text-align: left;
  background: transparent;
  overflow-wrap: anywhere;
}
nav button[aria-current="true"] {
  background: #30392e;
  color: #d3e6bf;
}
.albumHead,
header,
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.albumHead {
  margin: 28px 0 8px;
}
.albumHead h2 {
  font-size: 14px;
  color: #b0b4ad;
}
.albumHead button {
  padding: 0.25rem 0.55rem;
}
#lock {
  margin-top: 30px;
}
#content {
  padding: 40px clamp(18px, 4vw, 70px);
  min-width: 0;
}
h1 {
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.055em;
  line-height: 1.05;
  margin: 0;
}
header {
  border-bottom: 1px solid #333633;
  padding-bottom: 15px;
}
#count {
  margin: 0.55rem 0 0;
  font-size: 14px;
}
#files {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
#status:empty {
  display: none;
}
.month {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 5px;
}
#grid h2 {
  font-size: 21px;
  letter-spacing: -0.03em;
  margin: 28px 0 12px;
}
.tile {
  padding: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 5px;
  background: #232723;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile b {
  position: absolute;
  bottom: 8px;
  right: 8px;
  text-shadow: 0 1px 4px black;
}
.empty {
  color: #afb2ab;
  padding: 35px 0;
}
.drag {
  outline: 3px dashed #c1d8a7;
  outline-offset: -8px;
}
dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border: 0;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: #090a09;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
.bar {
  padding: 12px;
  flex-wrap: wrap;
}
#caption {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  flex: 1;
  text-align: center;
}
#stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
}
#stage img,
#stage video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
#stage img {
  touch-action: pinch-zoom;
}
.actions {
  justify-content: center;
}
.actions select {
  max-width: 30vw;
}
@media (max-width: 700px) {
  #library {
    display: block;
  }
  aside {
    padding: 12px 15px;
    border: 0;
  }
  aside nav {
    display: flex;
    overflow: auto;
    white-space: nowrap;
  }
  aside .brand {
    margin: 0 0 10px;
  }
  .albumHead {
    margin: 4px 0;
  }
  .albumHead h2 {
    margin: 4px 0;
  }
  #lock {
    position: absolute;
    right: 15px;
    top: 12px;
    margin: 0;
  }
  #content {
    padding: 24px 12px;
  }
  .month {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }
  .actions {
    gap: 4px;
  }
  .actions button,
  .actions select {
    padding: 0.6rem;
  }
  .bar {
    font-size: 14px;
  }
}

.bar a {
  color: #c1d8a7;
  text-decoration: none;
  padding: 0.55rem;
}
