:root {
  --page: #f5f5f7;
  --page-soft: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(29, 29, 31, 0.1);
  --line-strong: rgba(29, 29, 31, 0.16);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-strong: #4b5563;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --shadow: 0 24px 70px rgba(22, 24, 29, 0.14);
  --shadow-soft: 0 14px 36px rgba(22, 24, 29, 0.09);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1180px;
  --press-face: #644dff;
  --press-edge: #4836bb;
  --press-glow: #654dff63;
  --press-white: rgba(255, 255, 255, 0.96);
  --press-white-edge: rgba(209, 213, 219, 0.98);
  --press-white-glow: rgba(22, 24, 29, 0.14);
  --press-danger: #ef4444;
  --press-danger-edge: #b91c1c;
  --press-danger-glow: rgba(239, 68, 68, 0.24);
  --press-photo-edge: rgba(22, 24, 29, 0.28);
  --press-photo-glow: rgba(22, 24, 29, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-x: clip;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(245, 245, 247, 0) 34%),
    linear-gradient(145deg, #fbfbfd 0%, #f5f5f7 46%, #eef1f5 100%);
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", "Avenir Next", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 18px auto 56px;
}

.nav {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 12px 10px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(22, 24, 29, 0.08);
  backdrop-filter: blur(22px) saturate(160%);
}

.nav-logo {
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.hero {
  position: relative;
  display: flex;
  min-height: min(760px, calc(100svh - 98px));
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #111;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.94) contrast(0.96);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.32) 42%, rgba(0, 0, 0, 0.1) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.54) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: clamp(24px, 5vw, 54px);
  padding: clamp(28px, 6vw, 64px);
}

.hero-copy {
  max-width: 620px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.34);
}

.eyebrow,
.hero-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  margin: 18px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button-link.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(16px);
}

.button-link:hover,
.button-link:focus-visible {
  transform: translateY(-1px);
  background: #fff;
  outline: none;
}

.button-link.secondary:hover,
.button-link.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.hero-collage {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  grid-template-rows: 170px 210px;
  gap: 10px;
  align-items: stretch;
}

.hero-card,
.photo-button,
.cover-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  text-align: inherit;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transform: translateZ(0);
}

.hero-card:first-child {
  grid-row: span 2;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.hero-card:hover img,
.hero-card:focus-visible img {
  transform: scale(1.025);
}

.hero-card:focus-visible,
.photo-button:focus-visible,
.cover-button:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.45);
  outline-offset: 3px;
}

.memory-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.memory-stat {
  padding: 22px clamp(14px, 3vw, 28px);
  border-right: 1px solid var(--line);
}

.memory-stat:last-child {
  border-right: 0;
}

.memory-stat strong {
  display: block;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.memory-stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.codrops-stage {
  font-size: 16px;
  --color-text: #fff;
  --color-bg: #000;
  --color-link: #fff;
  --color-link-hover: #ef5d36;
  --color-title: #fff;
  --perspective: 0px;
  --grid-width: 100%;
  --grid-max-width: 300px;
  --grid-item-ratio: 1.2;
  --grid-item-radius: 4px;
  --grid-gap: 2rem;
  --grid-columns: 2;
  --grid-columns-full: 7;
  --grid-rows-full: 5;
  --grid-item-translate: 0px;
  --grid-item-height: auto;
  width: 100%;
  overflow-x: hidden;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: "brisbane", "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.codrops-stage .font-alt {
  font-family: "lores-12", "SFMono-Regular", "Cascadia Mono", "PingFang SC", monospace;
  font-weight: 400;
}

.codrops-stage a {
  color: var(--color-link);
  text-decoration: none;
  outline: none;
  cursor: pointer;
}

.codrops-stage a:hover {
  color: var(--color-link-hover);
  outline: none;
}

.codrops-stage a:focus {
  outline: none;
  background: lightgrey;
}

.codrops-stage a:focus:not(:focus-visible) {
  background: transparent;
}

.codrops-stage a:focus-visible {
  outline: 2px solid red;
  background: transparent;
}

.codrops-main {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--color-bg);
}

.codrops-stage .frame {
  text-transform: uppercase;
  font-size: 13px;
  position: relative;
  padding: 1.5rem;
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: "back archive github" "sponsor sponsor sponsor";
  grid-gap: 1.5rem;
  z-index: 6000;
}

.codrops-stage .frame__back {
  grid-area: back;
}

.codrops-stage .frame__archive {
  grid-area: archive;
}

.codrops-stage .frame__github {
  grid-area: github;
}

.codrops-stage .frame a {
  display: inline-flex;
  width: fit-content;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: none;
  transition: color 180ms ease;
}

.codrops-stage .frame a:hover,
.codrops-stage .frame a:focus-visible {
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  outline: none;
  transform: none;
}

.codrops-stage .intro {
  height: calc(100vh - 4rem);
  text-align: center;
  justify-items: center;
  display: grid;
  align-content: start;
  margin-bottom: 30vh;
  grid-auto-rows: 1fr;
  gap: 1.5rem;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.16) 28%, rgba(0, 0, 0, 0.42) 70%, var(--color-bg)),
    var(--codrops-intro-image) no-repeat 50% 24%;
  background-size: cover;
}

.codrops-stage .intro__title {
  margin: 0;
  line-height: 0.9;
  align-self: end;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--color-title);
  transform: translateY(clamp(110px, 16vh, 190px));
}

.codrops-stage .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  text-transform: uppercase;
  font-size: 13px;
  align-self: start;
  transform: translateY(clamp(72px, 8vh, 116px));
}

.codrops-stage .intro__info {
  max-width: 12ch;
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  line-height: 1.2;
  opacity: 0.4;
  position: relative;
  text-transform: uppercase;
  font-size: 13px;
  align-self: end;
}

.codrops-stage .intro__info::after {
  content: "";
  width: 1px;
  height: 4rem;
  background: linear-gradient(to bottom, #fff, black);
  position: absolute;
  top: 100%;
  left: 50%;
}

.codrops-stage .mark {
  position: fixed;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 100vw;
  left: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.codrops-stage .mark__inner {
  display: flex;
  gap: 3rem;
  width: max-content;
  position: relative;
  transform: translateX(100vw);
  will-change: transform;
}

.codrops-stage .mark__inner span {
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 3rem;
  line-height: 1;
}

.codrops-stage section {
  display: grid;
  place-items: center;
  width: 100%;
  position: relative;
}

.codrops-main.shadow::after {
  content: "";
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 5000;
  pointer-events: none;
  background: linear-gradient(to right, var(--color-bg), transparent, var(--color-bg));
  background-repeat: no-repeat;
  background-size: 100%;
}

.codrops-stage .grid {
  padding: 20vh 0;
  width: var(--grid-width);
  max-width: var(--grid-max-width);
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  position: relative;
  display: grid;
  gap: var(--grid-gap);
  margin-top: 20vh;
  margin-bottom: 10vh;
}

.codrops-stage .grid--full {
  width: 100%;
  margin: 10vh 0;
  height: auto;
  aspect-ratio: 1.5;
  max-width: none;
  --grid-gap: 1rem;
  --grid-item-height: 100%;
  --grid-item-ratio: auto;
  padding: var(--grid-gap);
  grid-template-columns: repeat(var(--grid-columns-full), 1fr);
  grid-template-rows: repeat(var(--grid-rows-full), 1fr);
}

.codrops-stage .grid__item {
  margin: 0;
  position: relative;
  z-index: 1;
  perspective: 800px;
  will-change: transform, opacity;
}

.codrops-stage .grid__item > .grid__item-img,
.codrops-stage .grid__item-imgwrap {
  width: 100%;
  aspect-ratio: var(--grid-item-ratio);
  height: var(--grid-item-height);
  border-radius: var(--grid-item-radius);
  transform-style: preserve-3d;
}

.codrops-stage .grid__item-imgwrap {
  position: relative;
  overflow: hidden;
  will-change: filter;
}

.codrops-stage .grid__item-img {
  background-size: cover;
  background-position: 50% 20%;
  backface-visibility: hidden;
  will-change: transform;
}

.codrops-stage .grid__item-imgwrap > .grid__item-img {
  position: absolute;
  top: calc(-1 * var(--grid-item-translate));
  left: calc(-1 * var(--grid-item-translate));
  height: calc(100% + var(--grid-item-translate) * 2);
  width: calc(100% + var(--grid-item-translate) * 2);
}

.codrops-stage .text {
  text-transform: uppercase;
  display: flex;
  align-content: center;
  font-size: clamp(3rem, 14vw, 10rem);
  line-height: 0.7;
}

@media screen and (min-width: 53em) {
  .codrops-stage .frame {
    grid-template-columns: auto auto auto 1fr;
    grid-template-areas: "back archive github sponsor";
  }
}

.section {
  padding: clamp(58px, 8vw, 92px) 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
}

.section-subtitle {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.place-card {
  position: relative;
  min-height: 176px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.place-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0.2)),
    var(--page);
  border: 1px solid rgba(0, 113, 227, 0.18);
}

.place-card:hover,
.place-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.28);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.place-name {
  margin: 0 0 6px;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: 0;
}

.place-meta {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.place-desc {
  margin: 0;
  max-width: 92%;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 16px 16px 16px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  line-height: 1.58;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.timeline strong {
  color: var(--text);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.map-panel,
.map-sidebar,
.place-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.map-panel {
  position: relative;
  overflow: hidden;
  min-height: 470px;
}

#travel-map {
  width: 100%;
  height: 100%;
  min-height: 470px;
  background: linear-gradient(180deg, #edf4ff 0%, #dde7f2 100%);
}

.map-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(22, 24, 29, 0.12);
  backdrop-filter: blur(18px);
}

.map-toolbar input,
.form-grid input,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.map-toolbar input {
  min-height: 42px;
  padding: 9px 13px;
}

.map-toolbar input:focus,
.form-grid input:focus,
.form-grid textarea:focus {
  border-color: rgba(0, 113, 227, 0.44);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.text-button {
  padding: 9px 16px;
}

.text-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.text-button.danger {
  border-color: rgba(220, 38, 38, 0.22);
  color: #b91c1c;
}

.icon-button:hover,
.icon-button:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 113, 227, 0.28);
  background: #fff;
  outline: none;
}

.text-button.primary:hover,
.text-button.primary:focus-visible {
  background: #0066cc;
  color: #fff;
}

.map-config-panel,
.map-status {
  position: absolute;
  z-index: 6;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.map-config-panel {
  display: grid;
  gap: 10px;
  max-width: 560px;
  padding: 16px;
}

.map-config-panel[hidden],
.map-status[hidden],
.place-editor[hidden],
.search-results:empty {
  display: none;
}

.map-config-panel h3,
.place-editor h3,
.place-list-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.map-config-panel p,
.form-help,
.map-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.map-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.map-config-grid input {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
}

.map-status {
  width: fit-content;
  max-width: min(560px, calc(100% - 36px));
  padding: 10px 14px;
}

.map-sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px;
  min-height: 470px;
}

.map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.map-summary-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.map-summary-item strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.map-summary-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.place-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.map-route {
  display: grid;
  gap: 8px;
  align-content: start;
}

.map-chip {
  display: block;
  width: 100%;
  padding: 16px 16px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  font-size: 16px;
  font-weight: 760;
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.map-chip:hover,
.map-chip:focus-visible {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
  outline: none;
}

.map-chip small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.map-chip-note {
  display: block;
  margin-top: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
}

.map-chip-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.place-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: #075da8;
  font-size: 12px;
  font-weight: 700;
}

.amap-place-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(22, 24, 29, 0.22);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transform: translateZ(0);
}

.amap-place-marker::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.86);
  transform: rotate(45deg);
}

.amap-place-marker span {
  width: 16px;
  height: 16px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.amap-place-marker strong {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.amap-place-marker.is-custom span {
  border-color: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.14);
}

.amap-info-window {
  width: min(330px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(22, 24, 29, 0.22);
  backdrop-filter: blur(18px);
}

.amap-info-window img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
  background: #e8eaed;
}

.amap-info-window h3 {
  margin: 10px 0 4px;
  font-size: 18px;
  line-height: 1.2;
}

.amap-info-window p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.photo-stack {
  position: relative;
  width: 100%;
  min-height: 176px;
  border-radius: 18px;
  perspective: 900px;
  isolation: isolate;
}

.photo-stack.is-empty {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.amap-info-window .photo-stack {
  min-height: 178px;
  margin-bottom: 12px;
}

.photo-stack-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: var(--fan-z);
  width: min(70%, 360px);
  height: 84%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  padding: 0;
  background: #e8eaed;
  box-shadow: 0 16px 36px rgba(22, 24, 29, 0.15);
  cursor: pointer;
  transform: translate3d(calc(-50% + var(--fan-x)), calc(-50% + var(--fan-y)), 0) rotate(var(--fan-rotate));
  transform-origin: 50% 110%;
  transition: transform 240ms ease-out, box-shadow 240ms ease-out, filter 240ms ease-out;
}

.photo-stack-card.is-front {
  z-index: 80;
  box-shadow: 0 24px 58px rgba(22, 24, 29, 0.24);
  transform: translate3d(-50%, calc(-50% - 14px), 44px) rotate(0deg) scale(1.045);
}

.photo-stack-card:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.38);
  outline-offset: 4px;
}

.photo-stack-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
  transition: filter 240ms ease-out;
}

.photo-stack-card.is-front img {
  filter: saturate(1.04);
}

.photo-stack-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.album-cover-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.86fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin: 18px 0 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.album-cover-card .photo-stack {
  min-height: clamp(210px, 28vw, 330px);
}

.album-cover-content {
  display: grid;
  gap: 12px;
  align-content: center;
}

.album-cover-content h4 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.album-cover-content p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
}

.album-cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.photo-grid.is-collapsed {
  display: none;
}

.map-fallback {
  display: grid;
  height: 100%;
  min-height: 470px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.place-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  box-shadow: none;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.form-grid input,
.form-grid textarea {
  min-height: 42px;
  padding: 10px 12px;
  font-weight: 520;
}

.form-grid textarea {
  min-height: 86px;
  resize: vertical;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.tag-options input {
  width: auto;
  min-height: auto;
  margin: 0;
  accent-color: var(--accent);
}

.search-results {
  display: grid;
  gap: 6px;
}

.search-result-button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.search-result-button:hover,
.search-result-button:focus-visible {
  border-color: rgba(0, 113, 227, 0.3);
  background: #fff;
  outline: none;
}

.search-result-button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-albums:empty {
  display: none;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.6;
}

.cover-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.cover-button {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.cover-button:nth-child(2) {
  min-height: 430px;
}

.cover-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.cover-button:hover img,
.cover-button:focus-visible img {
  transform: scale(1.025);
}

.album-block {
  padding: clamp(28px, 5vw, 44px) 0;
  border-top: 1px solid var(--line);
}

.album-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.album-block.focus-target {
  animation: sectionPulse 900ms ease;
}

.album-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.album-header h3 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: 0;
}

.album-header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.album-block > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  gap: 10px;
}

.photo-button {
  position: relative;
  grid-row-end: span 24;
  overflow: hidden;
  border-radius: 18px;
  background: #e8eaed;
  box-shadow: 0 8px 24px rgba(22, 24, 29, 0.1);
  transform: translateZ(0);
}

.photo-button.is-tall {
  grid-row-end: span 34;
}

.photo-button.is-wide {
  grid-column: span 2;
  grid-row-end: span 26;
}

.photo-button.is-large {
  grid-column: span 2;
  grid-row-end: span 38;
}

.photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.photo-button:hover img,
.photo-button:focus-visible img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.footer {
  margin: 48px 0 0;
  padding: 24px 0 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease-out, transform 520ms ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(18px);
}

.place-detail {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(18px);
}

.place-detail[hidden] {
  display: none;
}

.place-detail-card {
  width: min(920px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.place-detail-hero {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #e8eaed;
}

.place-detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.place-detail-hero .photo-stack {
  min-height: 300px;
  border-radius: 0;
}

.place-detail-hero .photo-stack-card {
  border-radius: 18px;
}

.place-detail-hero .photo-stack-card img {
  min-height: 0;
}

.place-detail-body {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 28px);
}

.place-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.place-detail-head h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.place-detail-close {
  flex: 0 0 auto;
}

.place-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.place-detail-note {
  margin: 0;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.72;
  white-space: pre-wrap;
}

.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.photo-manager {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(18px);
}

.photo-manager[hidden] {
  display: none;
}

.photo-manager-card {
  width: min(860px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.photo-manager-head,
.photo-manager-body {
  padding: clamp(18px, 4vw, 28px);
}

.photo-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.photo-manager-head h3 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: 0;
}

.photo-manager-body {
  display: grid;
  gap: 18px;
}

.photo-manager-upload {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.photo-manager-upload input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
}

.memory-note-editor {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.memory-note-editor label {
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.memory-note-editor textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  line-height: 1.6;
}

.memory-note-editor textarea:focus {
  border-color: rgba(0, 113, 227, 0.5);
  outline: 3px solid rgba(0, 113, 227, 0.16);
}

.photo-manager-section h4 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.managed-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.managed-photo {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border-radius: 16px;
  background: #e8eaed;
}

.managed-photo img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.managed-photo span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.managed-photo button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #b91c1c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.detail-photo-grid button {
  min-height: 120px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: #e8eaed;
  cursor: pointer;
}

.detail-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-frame {
  position: relative;
  width: min(1120px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
}

.lightbox-image {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  background: #111;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.lightbox-caption {
  min-height: 22px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

.lightbox-control {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background-color 180ms ease, transform 180ms ease;
}

.lightbox-control:hover,
.lightbox-control:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
  outline: none;
}

.lightbox-close {
  top: -6px;
  right: -6px;
  font-size: 24px;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  transform: translateY(calc(-50% - 1px));
}

.lightbox-prev {
  left: -58px;
}

.lightbox-next {
  right: -58px;
}

.nav-links a,
.button-link,
.icon-button,
.text-button,
.search-result-button,
.managed-photo button,
.map-chip-action,
.lightbox-control {
  --press-current-face: var(--press-white);
  --press-current-edge: var(--press-white-edge);
  --press-current-glow: var(--press-white-glow);
  border: 2px solid var(--press-current-edge);
  border-radius: 0.75rem;
  background: var(--press-current-face);
  box-shadow: 0 8px 0 var(--press-current-edge);
  color: var(--text);
  cursor: pointer;
  filter: drop-shadow(0 15px 20px var(--press-current-glow));
  letter-spacing: 0.04em;
  transform: skew(-10deg);
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease, background-color 100ms ease, color 100ms ease, border-color 100ms ease, letter-spacing 100ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.button-link:hover,
.button-link:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.text-button:hover,
.text-button:focus-visible,
.search-result-button:hover,
.search-result-button:focus-visible,
.managed-photo button:hover,
.managed-photo button:focus-visible,
.map-chip-action:hover,
.map-chip-action:focus-visible,
.lightbox-control:hover,
.lightbox-control:focus-visible {
  background: var(--press-current-face);
  border-color: var(--press-current-edge);
  box-shadow: 0 10px 0 var(--press-current-edge);
  color: var(--text);
  filter: drop-shadow(0 18px 24px var(--press-current-glow));
  outline: none;
  transform: skew(-10deg) translateY(-2px);
}

.nav-links a:active,
.button-link:active,
.icon-button:active,
.text-button:active,
.search-result-button:active,
.managed-photo button:active,
.map-chip-action:active,
.lightbox-control:active {
  box-shadow: 0 0 0 var(--press-current-edge);
  filter: drop-shadow(0 6px 10px var(--press-current-glow));
  letter-spacing: 0;
  transform: skew(-10deg) translateY(8px);
}

.button-link,
.text-button.primary {
  --press-current-face: var(--press-face);
  --press-current-edge: var(--press-edge);
  --press-current-glow: var(--press-glow);
  color: #fff;
}

.button-link:hover,
.button-link:focus-visible,
.text-button.primary:hover,
.text-button.primary:focus-visible {
  color: #fff;
}

.text-button.primary {
  background: var(--press-current-face);
  border-color: var(--press-current-edge);
}

.text-button.primary:hover,
.text-button.primary:focus-visible {
  background: var(--press-current-face);
  border-color: var(--press-current-edge);
}

.button-link.secondary {
  --press-current-face: rgba(255, 255, 255, 0.16);
  --press-current-edge: rgba(255, 255, 255, 0.46);
  --press-current-glow: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.button-link.secondary:hover,
.button-link.secondary:focus-visible {
  color: #fff;
}

.text-button.danger,
.managed-photo button,
.map-chip-action.danger {
  --press-current-face: var(--press-danger);
  --press-current-edge: var(--press-danger-edge);
  --press-current-glow: var(--press-danger-glow);
  color: #fff;
}

.text-button.danger:hover,
.text-button.danger:focus-visible,
.managed-photo button:hover,
.managed-photo button:focus-visible,
.map-chip-action.danger:hover,
.map-chip-action.danger:focus-visible {
  color: #fff;
}

.icon-button {
  border-radius: 0.75rem;
}

.lightbox-control {
  --press-current-face: rgba(255, 255, 255, 0.18);
  --press-current-edge: rgba(255, 255, 255, 0.38);
  --press-current-glow: rgba(0, 0, 0, 0.38);
  color: #fff;
}

.lightbox-control:hover,
.lightbox-control:focus-visible {
  color: #fff;
}

.lightbox-prev,
.lightbox-next {
  transform: translateY(-50%) skew(-10deg);
}

.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  transform: translateY(calc(-50% - 2px)) skew(-10deg);
}

.lightbox-prev:active,
.lightbox-next:active {
  transform: translateY(calc(-50% + 8px)) skew(-10deg);
}

.map-chip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.map-chip-row .map-chip {
  min-width: 0;
}

.map-chip-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.map-chip-action {
  min-width: 54px;
  min-height: 46px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.hero-card,
.cover-button,
.photo-button,
.detail-photo-grid button {
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 0 var(--press-photo-edge), 0 16px 36px rgba(22, 24, 29, 0.14);
  filter: drop-shadow(0 15px 20px var(--press-photo-glow));
  transform: translateZ(0);
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease;
}

.hero-card img,
.cover-button img,
.photo-button img,
.detail-photo-grid img {
  width: 100%;
  height: 100%;
  margin: 0;
  transform: scale(1.02);
  transform-origin: center;
  transition: transform 140ms ease, filter 140ms ease;
}

.hero-card:hover,
.hero-card:focus-visible,
.cover-button:hover,
.cover-button:focus-visible,
.photo-button:hover,
.photo-button:focus-visible,
.detail-photo-grid button:hover,
.detail-photo-grid button:focus-visible {
  box-shadow: 0 10px 0 var(--press-photo-edge), 0 22px 46px rgba(22, 24, 29, 0.18);
  filter: drop-shadow(0 18px 24px var(--press-photo-glow));
  transform: translateY(-2px) translateZ(0);
}

.hero-card:hover img,
.hero-card:focus-visible img,
.cover-button:hover img,
.cover-button:focus-visible img,
.photo-button:hover img,
.photo-button:focus-visible img,
.detail-photo-grid button:hover img,
.detail-photo-grid button:focus-visible img {
  filter: saturate(1.06);
  transform: scale(1.07);
}

.hero-card:active,
.cover-button:active,
.photo-button:active,
.detail-photo-grid button:active {
  box-shadow: 0 0 0 var(--press-photo-edge), 0 8px 18px rgba(22, 24, 29, 0.1);
  filter: drop-shadow(0 6px 10px var(--press-photo-glow));
  transform: translateY(8px) translateZ(0);
}

.photo-stack-card {
  box-shadow: 0 8px 0 var(--press-photo-edge), 0 16px 36px rgba(22, 24, 29, 0.15);
  filter: drop-shadow(0 12px 16px var(--press-photo-glow));
}

.photo-stack-card.is-front {
  box-shadow: 0 10px 0 var(--press-photo-edge), 0 24px 58px rgba(22, 24, 29, 0.24);
  filter: drop-shadow(0 18px 24px var(--press-photo-glow));
}

@keyframes sectionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.28);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(0, 113, 227, 0);
  }
}

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr;
    align-content: end;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-collage {
    max-width: 640px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 150px;
  }

  .hero-card:first-child {
    grid-row: auto;
  }

  .place-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, var(--max-width));
    margin-top: 12px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .hero {
    min-height: 690px;
    border-radius: 24px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.72) 78%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12));
  }

  .hero-inner {
    gap: 22px;
    padding: 26px 20px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-collage {
    grid-template-rows: 112px;
    gap: 8px;
  }

  .hero-card {
    border-radius: 16px;
  }

  .memory-strip {
    grid-template-columns: 1fr;
  }

  .memory-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .memory-stat:last-child {
    border-bottom: 0;
  }

  .section-head,
  .album-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .place-grid,
  .timeline,
  .map-route,
  .map-config-grid,
  .album-cover-card,
  .cover-grid {
    grid-template-columns: 1fr;
  }

  .map-toolbar {
    grid-template-columns: 1fr auto;
  }

  .map-toolbar .text-button {
    grid-column: 1 / -1;
  }

  .map-summary {
    grid-template-columns: 1fr;
  }

  .map-panel,
  #travel-map,
  .map-fallback {
    min-height: 430px;
  }

  #travel-map {
    padding-top: 0;
  }

  .map-sidebar {
    min-height: auto;
  }

  .place-detail {
    padding: 12px;
  }

  .photo-manager {
    padding: 12px;
  }

  .place-detail-card,
  .photo-manager-card {
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .place-detail-hero {
    min-height: 210px;
    border-radius: 22px 22px 0 0;
  }

  .place-detail-hero img {
    min-height: 210px;
  }

  .cover-button,
  .cover-button:nth-child(2) {
    min-height: 320px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-button,
  .photo-button.is-tall,
  .photo-button.is-wide,
  .photo-button.is-large {
    grid-column: auto;
    grid-row-end: span 24;
    border-radius: 14px;
  }

  .photo-button.is-tall,
  .photo-button.is-large {
    grid-row-end: span 32;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-image {
    max-height: 78vh;
    border-radius: 14px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 420px) {
  .photo-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 7px;
  }

  .button-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .photo-stack {
    perspective: none;
  }

  .photo-stack-card,
  .photo-stack-card.is-front {
    box-shadow: 0 16px 36px rgba(22, 24, 29, 0.15);
    transform: translate3d(calc(-50% + var(--fan-x)), calc(-50% + var(--fan-y)), 0) rotate(var(--fan-rotate));
  }

}
