:root {
  color-scheme: light;
  --paper: #f4f2ee;
  --paper-strong: rgba(255, 255, 255, 0.84);
  --ink: #141414;
  --ink-muted: rgba(20, 20, 20, 0.68);
  --line: rgba(20, 20, 20, 0.1);
  --accent: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  cursor: url("customCursor/p3-medium.cur"), auto;
}

a,
button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
label[for],
summary,
select {
  cursor: url("customCursor/p1-medium.cur"), pointer;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.88), rgba(230, 228, 223, 0.96)),
    #ebe8e1;
}

body {
  overflow: hidden;
  font-family: Aptos, "Segoe UI", sans-serif;
  color: var(--ink);
}

.gallery-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  cursor: url("customCursor/p3-medium.cur"), auto;
}

.gallery-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 30%, #ffffff 0%, #f2f2ef 42%, #e4e1dc 100%);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gallery-panel {
  position: absolute;
  max-width: min(40rem, calc(100vw - 2rem));
  padding: 1.45rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(70, 65, 53, 0.12);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-intro {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gallery-status {
  right: 1.2rem;
  bottom: 1.2rem;
  max-width: none;
  padding: 0.72rem 1rem;
  text-align: center;
}

.gallery-intro h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4.3vw, 2.85rem);
  line-height: 1.02;
  font-weight: 700;
}

.gallery-copy,
.gallery-status p {
  font-size: 0.97rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.gallery-status p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  color: var(--ink);
}

.gallery-copy {
  margin-top: 1rem;
  display: grid;
  gap: 0.24rem;
  justify-items: center;
}

.gallery-copy p {
  margin: 0;
}

.gallery-copy-spacer {
  min-height: 0.9rem;
}

.gallery-controls-heading {
  margin-top: 0.15rem;
  font-weight: 700;
  color: var(--ink);
}

.home-link {
  position: fixed;
  top: 0;
  left: clamp(0.45rem, 1vw, 0.85rem);
  z-index: 30;
  display: block;
  width: clamp(64px, 5vw, 82px);
  aspect-ratio: 649 / 419;
  border-radius: 0;
  background-image: url("homeButton/hb1.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-decoration: none;
  transition: transform 160ms ease;
}

.home-link:hover,
.home-link:focus-visible {
  background-image: url("homeButton/hb2.png");
  transform: translateY(-1px);
}

.home-link:focus-visible {
  outline: 2px solid rgba(17, 17, 17, 0.35);
  outline-offset: 3px;
}

.gallery-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.15rem;
  pointer-events: auto;
}

.gallery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font: inherit;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.gallery-button {
  border: none;
  background: var(--accent);
  color: #f8f8f6;
}

.gallery-button:hover,
.home-link:hover {
  transform: translateY(-1px);
}

.gallery-button:focus-visible,
.home-link:focus-visible {
  outline: 2px solid rgba(17, 17, 17, 0.35);
  outline-offset: 3px;
}

.gallery-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(17, 17, 17, 0.48);
  pointer-events: none;
}

.gallery-crosshair::before,
.gallery-crosshair::after {
  content: none;
}

body.is-locked {
  cursor: none;
}

body.is-locked .gallery-intro {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-50% - 8px));
}

body.is-locked .gallery-status {
  opacity: 0.82;
}

@media (max-width: 780px) {
  .gallery-intro,
  .gallery-status {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }

  .gallery-intro {
    top: 50%;
    transform: translateY(-50%);
  }

  .gallery-status {
    bottom: 1rem;
    text-align: left;
  }

  .gallery-actions {
    flex-wrap: wrap;
  }
}
