:root {
  color-scheme: light;
  --ink: #10201f;
  --muted: #5e6a67;
  --paper: #fbfaf6;
  --line: #d9ded8;
  --accent: #cf2638;
  --accent-dark: #a11928;
  --lake: #006f86;
  --button-text: #ffffff;
  --splash-bg:
    linear-gradient(145deg, rgba(11, 44, 46, 0.82), rgba(13, 43, 46, 0.18) 58%, rgba(207, 38, 56, 0.78)),
    linear-gradient(135deg, #0d2b2e, #006f86 52%, #cf2638);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.splash {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  color: #ffffff;
  background: var(--splash-bg);
  background-position: center;
  background-size: cover;
}

.splash__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.5)),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.16), transparent 31rem);
  pointer-events: none;
}

.splash__content {
  position: relative;
  align-self: end;
  width: min(100%, 42rem);
  padding: 3rem max(1.25rem, env(safe-area-inset-left)) max(2rem, env(safe-area-inset-bottom));
}

.splash__kicker {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.1rem, 18vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.primary-button {
  min-height: 3.5rem;
  min-width: 10rem;
  border: 0;
  border-radius: 999px;
  padding: 0 1.55rem;
  color: var(--button-text);
  background: var(--accent);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.22);
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.primary-button:active {
  transform: translateY(1px);
  background: var(--accent-dark);
}

.gallery {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(0, 111, 134, 0.07), transparent 13rem),
    var(--paper);
}

.gallery__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 4.5rem;
  padding: max(0.4rem, env(safe-area-inset-top)) 0.9rem 0.55rem;
  border-bottom: 1px solid rgba(16, 32, 31, 0.12);
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(16px);
}

.gallery__title {
  min-width: 0;
  text-align: center;
}

.gallery__title h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: min(100%, 44rem);
  margin: 0 auto;
  padding: 1rem 1rem max(2.2rem, env(safe-area-inset-bottom));
}

.photo-button {
  display: grid;
  min-height: 5.4rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  color: var(--ink);
  background: #ffffff;
  font-size: clamp(1.35rem, 7vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0.45rem 1.2rem rgba(16, 32, 31, 0.05);
  cursor: pointer;
  touch-action: manipulation;
}

.photo-button:active {
  border-color: rgba(0, 111, 134, 0.42);
  background: rgba(0, 111, 134, 0.06);
}

.empty-state {
  width: min(100%, 44rem);
  margin: 0 auto;
  padding: 2.5rem 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-weight: 700;
}

.viewer {
  min-height: 100svh;
  color: #ffffff;
  background: #070b0c;
}

.viewer__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  min-height: 4.6rem;
  padding: max(0.45rem, env(safe-area-inset-top)) 0.75rem 0.55rem;
  background: rgba(7, 11, 12, 0.86);
  backdrop-filter: blur(16px);
}

.viewer-home-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  touch-action: manipulation;
}

.viewer-home-button svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.viewer-home-button:active {
  background: rgba(255, 255, 255, 0.18);
}

.viewer__title {
  min-width: 0;
  text-align: center;
}

.viewer__title h2 {
  margin: 0;
}

.viewer__title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0;
}

.viewer-button {
  display: grid;
  width: 4.1rem;
  height: 4.1rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(7, 11, 12, 0.74);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.34);
  cursor: pointer;
  touch-action: manipulation;
}

.viewer-button svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.viewer-button:disabled {
  opacity: 0.34;
  cursor: default;
}

.viewer-button:not(:disabled):active {
  background: rgba(255, 255, 255, 0.18);
}

.viewer__stage {
  display: grid;
  min-height: calc(100svh - 4.6rem);
  place-items: center;
  padding: 0.8rem 0.8rem 5.6rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.viewer__stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100svh - 11rem);
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  touch-action: auto;
}

.viewer__footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  pointer-events: none;
}

.viewer__footer .viewer-button {
  pointer-events: auto;
}

[hidden] {
  display: none !important;
}

@media (min-width: 700px) {
  .splash__content {
    padding-left: 3rem;
    padding-bottom: 3rem;
  }

  .photo-list {
    padding-top: 1.4rem;
  }
}
