/* Visitor pages. The tokens are documented in docs/style.html. */
@font-face {
  font-family: 'GoogleSans';
  src: url('fonts/GoogleSans-Latin-VF.woff2') format('woff2');
  font-weight: 410 900;
  font-style: normal;
  ascent-override: 106.25%;
  size-adjust: 106.25%;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #000000;
  --text: #3d3d3d;
  --surface: #f5f5f5;
  --primary: #4250af;
  --on-primary: #ffffff;
  --border: #d4d4d4;
  --shim-base: #ececf0;
  --shim-hi: #f8f8fa;
  color-scheme: light;
}
html.dark {
  --bg: #0a0a0a;
  --fg: #e5e7eb;
  --text: #dbdbdb;
  --surface: #101116;
  --primary: #accbfa;
  --on-primary: #0a0a0a;
  --border: #262626;
  --shim-base: #15161d;
  --shim-hi: #23252f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'GoogleSans', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.1px;
}
a { color: var(--primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.notice {
  margin: 0;
  padding: 10px 16px;
  text-align: center;
  color: var(--text);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.site {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.site:hover { text-decoration: none; }
.theme {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background-color 150ms ease;
}
.theme:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); }
.theme svg { width: 22px; height: 22px; }

main { max-width: 1280px; margin: 0 auto; padding: 16px 16px 48px; }
h1 {
  margin: 8px 0 4px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}
.subtitle { margin: 0 0 16px; font-size: 14px; color: var(--text); }
.empty { margin: 24px 0; }

nav.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
}
nav.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
nav.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--text); }

.folders, .albums {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.folders { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 24px; }
.albums { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.folders a, .albums a { display: block; color: var(--text); }
.folders a:hover, .albums a:hover { text-decoration: none; }
.folders a:hover .title, .albums a:hover .title { text-decoration: underline; }
.folders .thumb { aspect-ratio: 16 / 9; }
.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
img.thumb {
  background-image: linear-gradient(100deg, var(--shim-base) 30%, var(--shim-hi) 50%, var(--shim-base) 70%);
  background-size: 250% 100%;
  animation: shimmer 1.4s linear infinite;
}
img.thumb.loaded { background-image: none; animation: none; }
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.title {
  display: block;
  margin-top: 8px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .topbar { padding: 0 32px; }
  main { padding: 24px 32px 64px; }
  h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  img.thumb { background-image: none; }
}
