:root {
  color-scheme: light;
  --text: #1b1b1b;
  --muted: #6f6f68;
  --line: #dedbd1;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --ink: #0f1418;
  --accent: #2f6f7e;
  --accent-soft: #e4f0ef;
  --shadow: 0 18px 50px rgba(28, 31, 33, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.7;
}

body.no-scroll {
  overflow: hidden;
}

body.no-hero main {
  padding-top: 78px;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(251, 250, 246, 0.82);
  border-bottom: 1px solid rgba(222, 219, 209, 0.72);
  backdrop-filter: blur(18px);
}

#cityList,
#gallery {
  scroll-margin-top: 110px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 42px;
  max-width: min(210px, 36vw);
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 22px;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 92svh;
  place-items: end start;
  overflow: hidden;
  background: #111;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.04));
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 1200ms ease;
}

.hero-image.active {
  opacity: 1;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100% - 36px));
  margin: 0 0 clamp(48px, 8vw, 96px) clamp(18px, 6vw, 88px);
  color: white;
}

.kicker {
  margin: 0 0 10px;
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0.72;
  text-transform: uppercase;
}

h2,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.15;
}

.hero-copy p:last-child {
  max-width: 430px;
  margin-bottom: 0;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.18;
}

.filter-band,
.collection-section,
.finder-section,
.video-finder-section,
.game-finder-section,
.location-section,
.video-section,
.game-section,
.gallery-section {
  padding: clamp(44px, 7vw, 92px) clamp(18px, 4vw, 54px);
}

.filter-band {
  border-bottom: 1px solid var(--line);
}

.collection-section {
  border-bottom: 1px solid var(--line);
}

.finder-section,
.video-finder-section,
.game-finder-section {
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 1320px;
  margin: 0 auto 28px;
}

.section-head .kicker {
  color: var(--accent);
}

.section-head p:last-child {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.collection-grid {
  display: grid;
  max-width: 1320px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  margin: 0 auto;
}

.finder-grid {
  display: grid;
  max-width: 1320px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
}

.finder-grid .collection-button {
  min-height: clamp(220px, 24vw, 360px);
}

.video-grid {
  display: grid;
  max-width: 1320px;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.video-card {
  min-width: 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 64px;
  height: 46px;
  border-radius: 8px;
  background: #ff0033;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  place-items: center;
}

.video-play::after {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid white;
  content: "";
}

@media (hover: hover) and (pointer: fine) {
  .video-frame:hover img {
    filter: brightness(0.84);
    transform: scale(1.025);
  }
}

.video-card h3 {
  margin: 14px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.5;
}

.video-card > a {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.quiz-panel {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(28, 31, 33, 0.08);
}

.quiz-copy {
  max-width: 820px;
}

.quiz-copy h3,
.quiz-judge h3,
.quiz-result h3 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.2;
}

.quiz-copy p,
.quiz-judge p,
.quiz-result p {
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
}

.quiz-description-list {
  display: grid;
  gap: 4px;
  margin: 14px 0 10px;
  padding-left: 1.2em;
  color: var(--muted);
  font-weight: 800;
}

.quiz-primary,
.quiz-secondary,
.quiz-option {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.quiz-primary {
  margin-top: 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.quiz-secondary {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
}

.quiz-countdown {
  display: grid;
  width: min(420px, 100%);
  min-height: 240px;
  place-items: center;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: clamp(72px, 14vw, 132px);
  font-weight: 900;
  line-height: 1;
}

.quiz-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quiz-sensor {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  margin: 0 0 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.quiz-photo {
  display: block;
  width: 100%;
  max-height: min(64svh, 720px);
  border-radius: 8px;
  background: #ddd;
  cursor: zoom-in;
  object-fit: contain;
}

.quiz-photo:focus-visible {
  outline: 3px solid rgba(47, 111, 126, 0.35);
  outline-offset: 4px;
}

.quiz-magnifier {
  position: fixed;
  z-index: 100;
  display: none;
  width: 220px;
  height: 220px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background-color: var(--ink);
  background-repeat: no-repeat;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.quiz-magnifier.visible {
  display: block;
}

@media (hover: none), (pointer: coarse) {
  .quiz-magnifier.visible {
    display: none;
  }
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quiz-gauge {
  display: block;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.level2-answer-form {
  display: grid;
  gap: 10px;
  max-width: 460px;
}

.level5-answer-form {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.level5-answer-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 220px) auto auto;
  gap: 10px;
  align-items: center;
}

.level5-answer-prefix {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.level4-answer-form {
  display: grid;
  max-width: 720px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.level4-answer-form .level2-answer-error {
  grid-column: 1 / -1;
}

.level4-answer-field {
  display: grid;
  gap: 8px;
}

.level4-answer-field .level2-answer-row {
  grid-template-columns: minmax(120px, 1fr) auto;
}

.level2-answer-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.level2-answer-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) auto auto;
  gap: 10px;
  align-items: center;
}

.level2-answer-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
}

.level2-answer-input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(47, 111, 126, 0.18);
}

.level2-answer-unit {
  color: var(--muted);
  font-weight: 800;
}

.level2-answer-submit {
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.level2-answer-error {
  margin: 0;
  color: #9b3f3f;
  font-size: 13px;
  font-weight: 800;
}

.quiz-option {
  min-height: 62px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
  white-space: nowrap;
}

.quiz-option-label {
  display: block;
  font-size: 15px;
}

.quiz-option-range {
  display: block;
  font-size: 13px;
}

.quiz-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quiz-judge,
.quiz-result {
  text-align: center;
}

.quiz-judge.correct h3 {
  color: var(--accent);
}

.quiz-judge.incorrect h3 {
  color: #9b3f3f;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.quiz-link-row {
  display: flex;
  max-width: 1320px;
  justify-content: center;
  margin: 18px auto 0;
}

.quiz-records h3 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.2;
  text-align: center;
}

.record-summary {
  margin-bottom: 22px;
}

.record-summary > p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.record-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.record-summary-grid div,
.record-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.record-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.record-summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.2;
}

.record-list {
  display: grid;
  gap: 22px;
  margin-bottom: 10px;
}

.record-section {
  display: grid;
  gap: 10px;
}

.record-older-list {
  display: grid;
  gap: 10px;
}

.record-section > h4 {
  margin: 0;
  color: var(--accent);
  font-size: 18px;
  line-height: 1.35;
}

.record-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.record-item h5 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.35;
}

.record-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.record-toggle {
  justify-self: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.record-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.collection-button {
  position: relative;
  display: grid;
  min-height: clamp(300px, 36vw, 520px);
  overflow: hidden;
  place-items: stretch;
  padding: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  box-shadow: 0 20px 54px rgba(19, 24, 28, 0.18);
  isolation: isolate;
}

.collection-button::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  opacity: 0.28;
  transition: transform 260ms ease, opacity 260ms ease;
}

.collection-preview-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 1200ms ease, transform 4200ms ease;
  transform: scale(1.02);
}

.collection-preview-image.active {
  opacity: 1;
  transform: scale(1);
}

.collection-button.color::before {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 226, 89, 0.86), transparent 30%),
    radial-gradient(circle at 76% 28%, rgba(55, 132, 214, 0.9), transparent 34%),
    radial-gradient(circle at 46% 78%, rgba(216, 69, 83, 0.88), transparent 36%),
    linear-gradient(135deg, #1b2f3a, #604d8b 48%, #d97c52);
}

.collection-button.season::before {
  background:
    radial-gradient(circle at 28% 20%, rgba(148, 194, 116, 0.9), transparent 30%),
    radial-gradient(circle at 76% 28%, rgba(244, 192, 82, 0.88), transparent 34%),
    radial-gradient(circle at 42% 78%, rgba(175, 91, 76, 0.82), transparent 34%),
    linear-gradient(135deg, #2f4d3d, #756b48 50%, #4c5f7d);
}

.collection-button.others::before {
  background:
    radial-gradient(circle at 24% 24%, rgba(214, 198, 170, 0.78), transparent 30%),
    radial-gradient(circle at 78% 36%, rgba(92, 111, 126, 0.9), transparent 36%),
    radial-gradient(circle at 48% 82%, rgba(137, 129, 124, 0.82), transparent 35%),
    linear-gradient(135deg, #20252a, #59616b 52%, #b3a48e);
}

.collection-button.location::before {
  background:
    radial-gradient(circle at 22% 20%, rgba(99, 143, 126, 0.9), transparent 30%),
    radial-gradient(circle at 76% 36%, rgba(190, 169, 110, 0.88), transparent 34%),
    radial-gradient(circle at 48% 82%, rgba(83, 98, 124, 0.82), transparent 35%),
    linear-gradient(135deg, #21302e, #576d6a 52%, #c0a46d);
}

.collection-button.video::before {
  background: linear-gradient(135deg, #1c2529, #6b2934 54%, #b98b51);
}

.collection-button.game::before {
  background:
    radial-gradient(circle at 24% 22%, rgba(89, 172, 190, 0.86), transparent 30%),
    radial-gradient(circle at 76% 38%, rgba(227, 184, 82, 0.88), transparent 34%),
    radial-gradient(circle at 46% 82%, rgba(96, 77, 139, 0.82), transparent 35%),
    linear-gradient(135deg, #14252a, #3f6670 52%, #9d7850);
}

.collection-button:hover::before {
  opacity: 0.18;
}

.collection-button:hover .collection-preview-image.active {
  transform: scale(1.04);
}

.collection-button::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.68));
}

.collection-button span {
  position: relative;
  z-index: 3;
  align-self: end;
  padding: clamp(22px, 3vw, 34px);
  font-size: clamp(30px, 4.2vw, 54px);
  font-weight: 800;
  line-height: 1.08;
}

.location-filter {
  display: grid;
  max-width: 1320px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto;
}

.location-filter {
  margin-bottom: 18px;
}

#cityList {
  display: block;
  max-width: 1320px;
  margin: 0 auto 18px;
}

.location-filter:empty,
.location-list:empty {
  display: none;
}

#cityList:empty {
  display: none;
}

.location-list {
  max-width: 1320px;
  margin: 0 auto;
}

.location-button {
  display: flex;
  min-height: 54px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.location-button span {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.location-button small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.location-button:hover,
.location-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.location-button:hover small,
.location-button.active small {
  color: rgba(255, 255, 255, 0.82);
}

.location-region-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.location-region-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.location-region-row:first-child {
  border-top: 0;
}

.location-region-row h3 {
  margin: 0;
  padding: 20px;
  background: #f2f2ef;
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.location-city-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 28px;
  padding: 20px;
}

.location-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
}

.location-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.location-check span {
  min-width: 0;
  color: var(--accent);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.location-check small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.location-check.active span {
  color: var(--ink);
}

.location-search-bar {
  display: flex;
  max-width: 1320px;
  justify-content: center;
  gap: 12px;
  margin: 18px auto 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.location-clear,
.location-search {
  min-width: min(260px, 100%);
  min-height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.location-clear {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.location-search {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.location-clear:disabled,
.location-search:disabled {
  opacity: 0.42;
  cursor: default;
}

.location-map {
  display: grid;
  max-width: 1320px;
  gap: 12px;
  margin: 24px auto 0;
}

.location-map:empty {
  display: none;
}

.location-map-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.location-map-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.location-map a {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.location-map a span {
  font-size: 15px;
  line-height: 1.35;
}

.location-map a small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.location-map a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tag-list {
  display: grid;
  max-width: 1320px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0 auto;
}

.tag-group {
  min-width: 0;
}

.reset-group {
  grid-column: 1 / -1;
}

.tag-category-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.tag-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tag-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

@media (hover: hover) and (pointer: fine) {
  .tag-button:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
  }
}

.tag-button.reset {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.tag-button.reset.inactive {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.gallery-grid {
  display: grid;
  max-width: 1320px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto;
}

.place-gallery-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.place-gallery-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.place-gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.place-gallery-head h3 {
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
}

.place-gallery-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.place-gallery-head a {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.place-gallery-head a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.place-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #ddd;
  box-shadow: none;
  cursor: zoom-in;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.photo-card:hover img {
  filter: saturate(0.92);
  transform: scale(1.035);
}

.lightbox {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(6, 8, 10, 0.92);
}

.lightbox.open {
  display: flex;
}

.lightbox figure {
  width: min(1120px, 100%);
  margin: 0;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(88svh - 120px);
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.photo-metadata {
  width: min(920px, 100%);
  margin: 16px auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
}

.photo-metadata dl {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 20px;
}

.photo-metadata dl > div {
  min-width: 0;
}

.photo-metadata dt {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 700;
}

.photo-metadata dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.45;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 32px;
  line-height: 1;
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.previous {
  left: 18px;
}

.lightbox-nav.next {
  right: 18px;
}

@media (max-width: 980px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .collection-button {
    min-height: 240px;
  }

  .tag-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .location-region-row {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .location-city-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-map-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .place-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level4-answer-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand img {
    height: 34px;
    max-width: 130px;
  }

  .menu-toggle {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 11px 9px;
    border: 0;
    background: transparent;
    cursor: pointer;
    place-content: center;
  }

  .menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 3px 0;
    background: var(--text);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    display: flex;
    width: min(280px, calc(100vw - 32px));
    max-height: calc(100svh - 90px);
    flex-direction: column;
    gap: 0;
    padding: 8px;
    overflow-y: auto;
    background: rgba(251, 250, 246, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .site-nav a {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: 86svh;
  }

  .hero-copy {
    margin: 0 18px 42px;
  }

  .tag-list {
    grid-template-columns: 1fr;
  }

  .collection-grid,
  .location-filter {
    grid-template-columns: 1fr;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .quiz-gauge {
    padding: 14px;
  }

  .level2-answer-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .level5-answer-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .level2-answer-submit {
    grid-column: 1 / -1;
  }

  .record-summary-grid {
    grid-template-columns: 1fr;
  }

  .location-region-row {
    grid-template-columns: 1fr;
  }

  .location-region-row h3 {
    padding: 14px 16px;
  }

  .location-city-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .location-search-bar {
    flex-direction: column;
  }

  .location-map-links {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .place-gallery-head {
    display: grid;
    align-items: start;
  }

  .place-photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-card {
    aspect-ratio: 1 / 1;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox img {
    max-height: calc(78svh - 140px);
  }

  .photo-metadata {
    padding: 12px 4px 64px;
  }

  .photo-metadata dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 22px;
    transform: none;
  }
}
