:root {
  color-scheme: light;
  --ink: #1b2233;
  --muted: #5b6475;
  --line: #e2e6ee;
  --accent: #2456d6;
  --accent-dark: #1c44ae;
  --accent-wash: #e9effd;
  --danger: #b3261e;
  --wash: #f4f6fb;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(27, 34, 51, 0.06), 0 4px 14px rgba(27, 34, 51, 0.07);
  --shadow-hover: 0 2px 4px rgba(27, 34, 51, 0.08), 0 10px 28px rgba(27, 34, 51, 0.12);
  --focus: 0 0 0 3px #8fb0ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

a {
  color: var(--accent);
}

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 0.75rem;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.bar {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.nav-link {
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
}

.who {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.notices,
.content {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.content {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.notices:empty {
  display: none;
}

.alert {
  color: var(--danger);
  font-weight: 600;
  margin-top: 1rem;
}

.status {
  color: var(--ink);
  background: var(--accent-wash);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  margin-top: 1rem;
}

.alert:empty,
.status:empty {
  display: none;
}

.muted,
.or {
  color: var(--muted);
}

.or {
  text-align: center;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-top: 1rem;
}

.panel.narrow {
  max-width: 28rem;
  margin: 1rem auto 0;
}

.panel.narrow h1 {
  font-size: 1.5rem;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.1rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card:focus-within {
  box-shadow: var(--shadow-hover), var(--focus);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.card-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}

.card-title {
  font-size: 1.1rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.card-link {
  color: var(--ink);
  text-decoration: none;
}

.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
}

.card-link:focus-visible {
  outline: none;
}

.tagline {
  color: var(--muted);
  margin: 0;
}

.card .tagline {
  flex: 1;
}

.card-action {
  position: relative;
  z-index: 1;
}

.icon {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  border-radius: 0.9rem;
  background: var(--accent-wash);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.icon.large {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.5rem;
}

img:not([src]) {
  visibility: hidden;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: #176b3a;
  background: #def5e7;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.hero-text {
  min-width: 0;
}

.hero h1 {
  margin-bottom: 0.25rem;
}

.hero .tagline {
  font-size: 1.1rem;
}

.hero-action {
  margin-top: 1rem;
}

.note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.block {
  margin-top: 2rem;
  max-width: 46rem;
}

.block p {
  font-size: 1.05rem;
}

.features {
  margin: 0;
  padding-left: 1.25rem;
}

.features li {
  margin-bottom: 0.4rem;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0 0 0.75rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.shot {
  flex: none;
  width: min(80vw, 22rem);
  scroll-snap-align: start;
}

.shot figure {
  margin: 0;
}

.shot figcaption,
.lightbox figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.shot-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: zoom-in;
}

.shot-button:focus-visible {
  outline: none;
  box-shadow: var(--shadow), var(--focus);
}

.shot-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--accent-wash);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 22, 35, 0.78);
}

.lightbox-dialog {
  position: relative;
  margin: 0;
  width: min(100%, 64rem);
  max-height: 100%;
  overflow: auto;
  background: var(--card);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow-hover);
}

.lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 0.5rem;
}

.lightbox-dialog .button {
  margin-top: 0.75rem;
}

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

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row .muted {
  display: block;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

label {
  font-weight: 600;
}

input {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid #c5ccda;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-dark);
}

.button.large {
  font-size: 1.05rem;
  padding: 0.75rem 1.5rem;
}

.button.small {
  padding: 0.35rem 0.8rem;
}

.button.secondary {
  background: #fff;
  color: var(--accent);
}

.button.secondary:hover {
  background: var(--accent-wash);
}

.button.danger {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #8fb0ff;
  outline-offset: 2px;
}

.card .button {
  width: 100%;
}

.key-panel {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.key-panel input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 40rem) {
  h1 {
    font-size: 1.6rem;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.1rem;
  }

  .icon.large {
    width: 5rem;
    height: 5rem;
    border-radius: 1.2rem;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}
