@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg-0: #f8f9ff;
  --bg-1: #eef2ff;
  --bg-2: #e9eafe;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-soft: rgba(246, 247, 255, 0.9);
  --surface-panel: linear-gradient(165deg, rgba(255, 255, 255, 0.88), rgba(244, 245, 255, 0.84));
  --text: #20264a;
  --muted: #5a628f;
  --line: rgba(89, 104, 173, 0.2);
  --line-strong: rgba(79, 93, 161, 0.35);
  --accent: #4f76ff;
  --accent-2: #8e7aff;
  --accent-soft: rgba(79, 118, 255, 0.16);
  --accent-soft-2: rgba(142, 122, 255, 0.2);
  --danger: #c73962;
  --focus: rgba(123, 132, 255, 0.44);
  --shadow: 0 26px 54px -34px rgba(44, 54, 110, 0.38);
  --shadow-soft: 0 16px 32px -24px rgba(42, 51, 104, 0.28);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 13px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body,
button,
input,
select,
textarea {
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body {
  margin: 0;
  color: var(--text);
  background: #f8fafc;
  min-height: 100vh;
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.page-home {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.78rem;
}

.page > * {
  animation: fade-up 0.46s ease both;
}

.page > *:nth-child(2) {
  animation-delay: 0.06s;
}

.page > *:nth-child(3) {
  animation-delay: 0.1s;
}

.page > *:nth-child(4) {
  animation-delay: 0.14s;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  padding: clamp(0.88rem, 1.8vw, 1.2rem);
}

.hero::before,
.hero::after {
  content: none;
  display: none;
}

.hero h1,
.hero p,
.hero .back-link,
.hero .hero-kicker,
.hero .hero-meta {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.85rem, 2.8vw, 2.65rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: 500;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.72rem;
  padding: 0.36rem 0.7rem;
  border: 1px solid rgba(79, 118, 255, 0.24);
  border-radius: 999px;
  background: rgba(79, 118, 255, 0.1);
  color: #4456b7;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.hero-meta {
  margin-top: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-actions {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-search {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.16rem 0.28rem;
  border: 1px solid rgba(79, 118, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.hero-search.is-open {
  transform: translateX(8px);
  border-color: rgba(79, 118, 255, 0.4);
  background: rgba(255, 255, 255, 0.94);
}

.hero-search__toggle {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #3d4ea8;
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.hero-search__toggle:hover {
  transform: translateY(-1px);
  background: rgba(79, 118, 255, 0.08);
  border-color: rgba(79, 118, 255, 0.24);
}

.hero-search__toggle:active {
  transform: translateY(0);
}

.hero-search__input {
  width: 0;
  min-width: 0;
  max-width: 0;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  pointer-events: none;
  transition: width 0.22s ease, max-width 0.22s ease, opacity 0.2s ease, margin 0.22s ease;
}

.hero-search.is-open .hero-search__input {
  width: clamp(150px, 24vw, 260px);
  max-width: clamp(150px, 24vw, 260px);
  opacity: 1;
  margin-right: 0.14rem;
  pointer-events: auto;
}

.hero-search__input::placeholder {
  color: var(--muted);
}

.hero-search__input:focus {
  outline: none;
}

.hero-search__count {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.12rem 0.36rem;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: #3d4ea8;
  background: transparent;
}

.hero-meta span {
  font-size: 0.82rem;
  color: #4f5ca3;
  border: 1px solid rgba(91, 106, 180, 0.22);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  background: rgba(255, 255, 255, 0.62);
}

.hero-small {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: wrap;
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 560px);
  grid-template-areas:
    "title stats"
    "subtitle stats"
    "actions stats";
  column-gap: 0.9rem;
  row-gap: 0.28rem;
  align-items: start;
}

.hero-home > h1 {
  grid-area: title;
}

.hero-home > p {
  grid-area: subtitle;
}

.hero-home > .hero-actions {
  grid-area: actions;
  margin-top: 0.36rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
}

.hero-home > .hero-actions > .back-link,
.hero-home > .hero-actions > .action-button {
  min-height: 0;
  height: auto;
  padding: 8px 16px;
  font-size: 0.88rem;
}

.hero-home > .hero-actions > .back-link {
  text-align: center;
}

.hero-home > .hero-actions > .hero-search {
  order: 99;
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  gap: 0;
  justify-content: center;
  overflow: visible;
}

.hero-home > .hero-actions > .hero-search.is-open {
  transform: none;
}

.hero-home > .hero-actions > .hero-search .hero-search__toggle {
  width: 40px;
  height: 40px;
  font-size: 1.18rem;
}

.hero-home > .hero-actions > .hero-search .hero-search__input {
  position: absolute;
  top: 50%;
  left: 46px;
  transform: translateY(-50%);
  width: 0;
  max-width: none;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(79, 118, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-soft);
  z-index: 2;
}

.hero-home > .hero-actions > .hero-search.is-open .hero-search__input {
  width: clamp(180px, 24vw, 280px);
  max-width: clamp(180px, 24vw, 280px);
  margin: 0;
  padding: 0 0.78rem;
}

.hero-home > .hero-actions > .hero-search .hero-search__count {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.28rem;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.34rem;
  border-color: rgba(79, 118, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
  z-index: 3;
}

.hero-home > .stats-hero {
  grid-area: stats;
  margin: 0;
  margin-right: 0.35rem;
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.hero-small h1 {
  font-size: clamp(1.55rem, 2.25vw, 2.25rem);
}

.back-link,
.upload-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  background: #f1f5f9;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  font-size: 0.87rem;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.back-link:hover,
.upload-pill-button:hover {
  transform: none;
  background: #e2e8f0;
}

.upload-pill-button:active,
.upload-panel input[type="file"]:active::file-selector-button,
.upload-panel input[type="file"]:active::-webkit-file-upload-button,
.upload-panel input[type="file"]::file-selector-button:active,
.upload-panel input[type="file"]::-webkit-file-upload-button:active {
  transform: translateY(0);
}

.stats {
  display: grid;
  gap: 0.92rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.stats-hero {
  margin: 0;
  padding: 0.14rem 0;
  max-width: 560px;
  gap: 0.14rem;
  align-items: center;
}

.stats-hero .stat-inline {
  display: grid;
  justify-items: center;
  gap: 0.08rem;
  padding: 0.08rem 0.72rem;
  border-left: 1px solid rgba(88, 102, 171, 0.24);
}

.stats-hero .stat-inline:first-child {
  border-left: 0;
}

.stats-hero .stat-number {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  font-weight: 700;
  color: #31429f;
  letter-spacing: -0.015em;
}

.stats-hero .stat-caption {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #4f5ca3;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.82rem 0.92rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(243, 245, 255, 0.78));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 34px -26px rgba(52, 62, 124, 0.42);
  border-color: rgba(109, 126, 204, 0.36);
}

.stat-card h2 {
  margin: 0.34rem 0 0;
  font-size: 0.89rem;
  font-weight: 600;
  color: var(--muted);
}

.stat-card p {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
  font-weight: 700;
  color: #31429f;
  letter-spacing: -0.015em;
}

.map-shell {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.map-shell__top {
  position: absolute;
  top: 0.58rem;
  right: 0.62rem;
  z-index: 500;
  pointer-events: none;
}

.status {
  display: none;
  color: var(--danger);
  font-size: 0.86rem;
  margin: 0;
}

.status:not(:empty) {
  display: inline-block;
  min-height: 1.2rem;
  padding: 0.24rem 0.46rem;
  border-radius: 8px;
  border: 1px solid rgba(199, 57, 98, 0.26);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.map-large,
.map-small {
  border-radius: 0;
  border: 0;
  overflow: hidden;
  background: #e6ebff;
}

.map-large {
  height: 100%;
  min-height: 0;
}

.map-small {
  height: clamp(430px, 68vh, 720px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hint-shell {
  padding: 0.78rem 1rem 0.96rem;
  border-top: 1px solid var(--line);
  background: rgba(248, 249, 255, 0.9);
}

.hint {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.42;
}

.archive-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(24, 29, 58, 0.42);
  backdrop-filter: blur(8px);
}

.archive-modal {
  width: min(1180px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  border: 1px solid rgba(92, 104, 170, 0.22);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 247, 255, 0.96));
  box-shadow: 0 36px 80px -42px rgba(22, 28, 59, 0.58);
  padding: 1rem;
}

.archive-modal__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.archive-modal__top h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.3rem;
  color: #2f3f92;
}

.archive-modal__subtitle {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.archive-modal__body {
  overflow: auto;
  display: grid;
  gap: 0.95rem;
  padding-right: 0.15rem;
}

.archive-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(248, 249, 255, 0.88);
  padding: 0.85rem;
}

.archive-group__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.archive-group__top h3 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: #2e3d8e;
}

.archive-group__top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.archive-grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.archive-photo {
  display: grid;
  gap: 0.42rem;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.archive-photo:hover img {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px -20px rgba(53, 67, 138, 0.5);
}

.archive-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
  border: 1px solid rgba(95, 108, 175, 0.18);
  box-shadow: var(--shadow-soft);
  background: rgba(235, 239, 255, 0.85);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.archive-photo span {
  font-size: 0.83rem;
  line-height: 1.35;
  color: var(--text);
  font-weight: 600;
}

.archive-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--muted);
  text-align: center;
}

.modal-open {
  overflow: hidden;
}

.detail-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(430px, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
}

.detail-map-wrap {
  position: sticky;
  top: 1.1rem;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(244, 245, 255, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  padding: 1rem 1.08rem;
}

.panel-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.82rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 255, 0.8));
  margin-bottom: 0.86rem;
}

.auth-panel,
.upload-panel,
.pending-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.78rem;
  background: var(--surface-soft);
  margin-bottom: 0.84rem;
}

.auth-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.auth-actions {
  display: flex;
  gap: 0.52rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
  box-shadow: none;
}

.action-button:hover {
  transform: none;
  filter: none;
  background-color: #e2e8f0;
}

.action-button:active {
  transform: translateY(0);
}

.action-button.upload-pill-button {
  border-radius: 8px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.87rem;
  padding: 8px 16px;
  box-shadow: none;
  filter: none;
}

.action-button.upload-pill-button:hover {
  transform: none;
  background: #e2e8f0;
  box-shadow: none;
  filter: none;
}

.action-button.upload-pill-button:active {
  transform: translateY(0);
}

.action-button-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 0;
  box-shadow: none;
}

.action-button-google {
  gap: 0.58rem;
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

.action-button-google::before {
  content: "";
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 32%, transparent 34%),
    conic-gradient(from -45deg, #4285f4 0 25%, #34a853 25% 50%, #fbbc05 50% 75%, #ea4335 75% 100%);
}

.back-link,
.upload-pill-button,
.action-button,
.admin-view-switch__button,
.admin-answers-mode__button,
.back-link a,
.upload-pill-button a,
.action-button a {
  color: inherit;
  text-decoration: none;
}

.upload-panel form {
  display: grid;
  gap: 0.55rem;
  max-width: 420px;
}

.upload-panel .upload-pill-button {
  justify-self: start;
}

.upload-panel input[type="file"],
.admin-input[type="file"] {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.44rem 0.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.94));
  color: #30418f;
  font: inherit;
  font-weight: 600;
  width: 100%;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.upload-panel input[type="file"]:hover,
.admin-input[type="file"]:hover {
  border-color: var(--line-strong);
}

.upload-panel input[type="file"]:focus-visible,
.admin-input[type="file"]:focus-visible {
  border-color: rgba(96, 114, 232, 0.5);
  box-shadow: 0 0 0 3px rgba(126, 136, 255, 0.2);
}

.upload-panel input[type="file"]::file-selector-button,
.upload-panel input[type="file"]::-webkit-file-upload-button,
.admin-input[type="file"]::file-selector-button,
.admin-input[type="file"]::-webkit-file-upload-button {
  margin-right: 0.62rem;
  border: 0;
  border-radius: 11px;
  padding: 0.5rem 0.84rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1f2b66;
  background: linear-gradient(180deg, #ffffff, #eaf1ff);
  box-shadow:
    inset 0 0 0 1px rgba(79, 118, 255, 0.36),
    0 9px 16px -14px rgba(53, 69, 144, 0.84);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.upload-panel input[type="file"]:hover::file-selector-button,
.upload-panel input[type="file"]:hover::-webkit-file-upload-button,
.admin-input[type="file"]:hover::file-selector-button,
.admin-input[type="file"]:hover::-webkit-file-upload-button,
.upload-panel input[type="file"]::file-selector-button:hover,
.upload-panel input[type="file"]::-webkit-file-upload-button:hover,
.admin-input[type="file"]::file-selector-button:hover,
.admin-input[type="file"]::-webkit-file-upload-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow:
    inset 0 0 0 1px rgba(79, 118, 255, 0.46),
    0 14px 20px -16px rgba(53, 69, 144, 0.92);
}

.upload-panel input[type="file"]::file-selector-button:active,
.upload-panel input[type="file"]::-webkit-file-upload-button:active,
.admin-input[type="file"]::file-selector-button:active,
.admin-input[type="file"]::-webkit-file-upload-button:active {
  transform: translateY(0);
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0.54rem 0 0.3rem;
  letter-spacing: -0.01em;
}

.detail-panel h2 {
  font-size: 1.12rem;
  font-family: "Inter", sans-serif;
  color: #2f3f92;
}

.detail-panel h3 {
  font-size: 0.98rem;
  font-family: "Inter", sans-serif;
  color: #3f4f9f;
}

.meta-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0.26rem 0.68rem;
  margin: 0.24rem 0 0.9rem;
  font-size: 0.95rem;
}

.meta-grid dt {
  font-weight: 700;
  color: var(--muted);
}

.meta-grid dd {
  margin: 0;
  color: var(--text);
}

[data-description] {
  white-space: pre-line;
  line-height: 1.48;
  color: var(--text);
}

ul {
  margin: 0.28rem 0 0.82rem 1.2rem;
  line-height: 1.45;
}

li {
  margin-bottom: 0.14rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0.62rem;
  margin: 0.4rem 0 0.9rem;
}

.photo-grid a,
.photo-grid__item {
  display: block;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-grid__item {
  width: 100%;
  padding: 0;
  cursor: pointer;
}

.photo-grid a:hover,
.photo-grid__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 26px -22px rgba(53, 67, 138, 0.55);
}

.photo-grid img {
  width: 100%;
  height: 156px;
  object-fit: cover;
  display: block;
}

.photo-grid__more {
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--surface-soft), var(--accent-soft));
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  font-size: 1.2rem;
  min-height: 156px;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  box-shadow: var(--shadow-soft);
}

.photo-grid__more:hover {
  transform: translateY(-2px);
  filter: brightness(1.01);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.photo-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(24, 29, 58, 0.52);
  backdrop-filter: blur(8px);
}

.photo-viewer-modal {
  width: min(1100px, 100%);
  max-height: min(90vh, 920px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.72rem;
  border: 1px solid rgba(92, 104, 170, 0.22);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 247, 255, 0.96));
  box-shadow: 0 36px 80px -42px rgba(22, 28, 59, 0.58);
  padding: 0.92rem;
}

.photo-viewer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.62rem;
  flex-wrap: wrap;
}

.photo-viewer__meta {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.photo-viewer__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.photo-viewer__heart-button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
}

.photo-viewer__heart-button.is-active {
  color: #b21f3a;
  border-color: rgba(178, 31, 58, 0.38);
  background: rgba(178, 31, 58, 0.12);
}

.photo-viewer__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  min-height: 0;
}

.photo-viewer__body img {
  width: 100%;
  height: min(70vh, 760px);
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(233, 238, 255, 0.7);
}

.photo-viewer__nav {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(79, 118, 255, 0.26);
  background: rgba(79, 118, 255, 0.1);
  color: #33449f;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
}

.photo-viewer__nav:disabled {
  cursor: default;
  opacity: 0.45;
}

.photo-viewer__status {
  min-height: 1.2rem;
}

.hero-actions .action-button.is-active,
.hero-actions .back-link.is-active,
.admin-view-switch__button.is-active,
.admin-answers-mode__button.is-active {
  border: 0;
  background: #059669;
  color: #ffffff;
}

.pending-item {
  margin: 0 0 0.72rem;
  padding: 0.64rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  list-style: none;
}

.pending-item__row {
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
  margin-top: 0.44rem;
}

.pending-item__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.admin-wrap {
  max-width: 1080px;
  margin: 0 auto;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 255, 0.82));
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.05rem;
  margin-top: 1rem;
}

.admin-create-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.72rem;
}

.admin-create-top h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  color: #2f3f92;
}

.admin-create-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.admin-create-actions [data-create-toggle] {
  width: 2.3rem;
  min-width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.admin-create-menu {
  position: absolute;
  top: calc(100% + 0.42rem);
  right: 0;
  z-index: 20;
  min-width: 220px;
  padding: 0.42rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.4rem;
}

.admin-create-menu .action-button {
  justify-content: flex-start;
}

.admin-form {
  margin-top: 0.82rem;
  display: grid;
  gap: 0.72rem;
}

.admin-form-grid {
  display: grid;
  gap: 0.62rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-field {
  display: grid;
  gap: 0.34rem;
}

.admin-form-field label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 700;
}

.admin-input,
.admin-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.54rem 0.62rem;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.admin-textarea {
  resize: vertical;
  min-height: 120px;
}

.admin-input:focus-visible,
.admin-textarea:focus-visible {
  border-color: rgba(96, 114, 232, 0.5);
  box-shadow: 0 0 0 3px rgba(126, 136, 255, 0.2);
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  flex-wrap: wrap;
}

.admin-view-switch {
  padding: 0.58rem;
}

.admin-view-switch__buttons {
  display: flex;
  gap: 0.52rem;
  flex-wrap: wrap;
}

.admin-view-switch__button {
  min-width: 132px;
}

.admin-view-switch__button.is-active,
.admin-answers-mode__button.is-active {
  border: 0;
  background: #059669;
  color: #fff;
}

.admin-attendance-grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.admin-attendance-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.56rem;
  display: grid;
  gap: 0.5rem;
}

.admin-attendance-group__title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  color: #3f4f9f;
}

.admin-attendance-group__list {
  display: grid;
  gap: 0.44rem;
}

.admin-attendance-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.52rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.42rem 0.5rem;
  background: rgba(248, 249, 255, 0.82);
}

.admin-attendance-main {
  min-width: 0;
  flex: 1 1 260px;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.admin-attendance-form {
  min-width: 0;
  flex: 2 1 460px;
  display: grid;
  gap: 0.38rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-attendance-main input[type="checkbox"] {
  margin-top: 0.15rem;
}

.admin-attendance-meta {
  min-width: 0;
}

.admin-attendance-meta strong {
  display: block;
  font-size: 0.87rem;
}

.admin-attendance-wet {
  display: grid;
  gap: 0.2rem;
  justify-items: stretch;
}

.admin-attendance-wet__label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.admin-attendance-wet--wide {
  grid-column: 1 / -1;
}

.admin-attendance-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.54rem;
  font-size: 0.74rem;
  font-weight: 700;
  background: #fff;
  color: #3f4f9f;
  width: fit-content;
}

.admin-attendance-wet__input {
  width: 100%;
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.26rem 0.38rem;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.admin-attendance-select,
.admin-attendance-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.26rem 0.38rem;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.admin-attendance-textarea {
  min-height: 66px;
  resize: vertical;
}

.admin-attendance-wet__input:disabled {
  background: rgba(239, 241, 251, 0.8);
  color: var(--muted);
}

.admin-attendance-select:disabled,
.admin-attendance-textarea:disabled {
  background: rgba(239, 241, 251, 0.8);
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.82rem;
}

.admin-grid[data-pending-grid] {
  grid-template-columns: 1fr;
}

.admin-pending-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.58rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.admin-pending-group__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.58rem;
}

.admin-pending-group__title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: #3f4f9f;
}

.admin-pending-group__grid {
  margin-top: 0.58rem;
}

.admin-photo {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.62rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.admin-photo img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.admin-photo p {
  margin: 0.46rem 0 0;
  font-size: 0.9rem;
}

.admin-photo .row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.admin-empty {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.admin-link-grid {
  display: grid;
  gap: 0.82rem;
}

.admin-link-group {
  display: grid;
  gap: 0.5rem;
}

.admin-link-group__title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: #3f4f9f;
}

.admin-link-group__list {
  display: grid;
  gap: 0.5rem;
}

.admin-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(248, 249, 255, 0.82);
  padding: 0.52rem 0.58rem;
}

.admin-link-main {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.admin-link-main strong {
  font-size: 0.9rem;
}

.admin-link-meta {
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-link-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.admin-link-input {
  min-width: 220px;
  max-width: 320px;
}

.admin-hikes-list {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.72rem;
}

.admin-hike-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.admin-hike-editor__details {
  padding: 0.72rem;
}

.admin-hike-editor__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #5c6f3f;
}

.admin-hike-editor__body {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.66rem;
}

.admin-hike-editor__meta {
  display: flex;
  justify-content: flex-end;
}

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

.admin-hike-editor__advanced {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(248, 249, 255, 0.65);
  padding: 0.58rem;
}

.admin-hike-editor__advanced summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.46rem;
}

.admin-hike-editor__advanced[open] summary {
  margin-bottom: 0.62rem;
}

.admin-hike-editor__advanced .admin-textarea {
  min-height: 84px;
}

.admin-hike-attendance {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(248, 249, 255, 0.65);
  padding: 0.58rem;
}

.admin-hike-attendance summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-hike-attendance__meta,
.admin-hike-attendance__status {
  margin: 0.46rem 0 0;
}

.admin-hike-attendance__toolbar {
  margin-top: 0.58rem;
  display: flex;
  align-items: center;
  gap: 0.46rem;
  flex-wrap: wrap;
}

.admin-hike-attendance__search {
  min-width: 220px;
  flex: 1;
}

.admin-hike-attendance__grid {
  margin-top: 0.58rem;
  display: grid;
  gap: 0.62rem;
}

.admin-hike-gpx {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(248, 249, 255, 0.65);
  padding: 0.58rem;
}

.admin-hike-participants {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(248, 249, 255, 0.65);
  padding: 0.58rem;
}

.admin-hike-participants summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-hike-participants__meta {
  margin: 0.46rem 0 0;
}

.admin-hike-participants__list {
  margin-top: 0.58rem;
  display: grid;
  gap: 0.58rem;
}

.admin-hike-participants__group {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.5rem 0.58rem;
}

.admin-hike-participants__group-title {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.admin-hike-participants__items {
  margin: 0.42rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.24rem;
}

.admin-hike-participants__item {
  font-size: 0.9rem;
}

.admin-hike-gpx summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-hike-gpx__status,
.admin-hike-gpx__preview {
  margin: 0.46rem 0 0;
}

.admin-hike-gpx__toolbar {
  margin-top: 0.58rem;
  display: flex;
  align-items: center;
  gap: 0.46rem;
  flex-wrap: wrap;
}

.admin-hike-gpx__select {
  min-width: 260px;
  flex: 1;
}

.admin-hike-gpx__map {
  margin-top: 0.58rem;
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f2f5ff;
}

.admin-hike-editor__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.56rem;
  flex-wrap: wrap;
}

.admin-hike-editor__status {
  margin: 0;
}

.admin-lock-list {
  display: grid;
  gap: 0.62rem;
}

.admin-lock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(248, 249, 255, 0.82);
  padding: 0.6rem 0.68rem;
}

.admin-lock-main {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.admin-lock-main strong {
  font-size: 0.92rem;
}

.admin-lock-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-lock-actions {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  flex-wrap: wrap;
}

.admin-lock-actions [data-hike-answers-toggle].is-active {
  border-color: var(--line-strong);
}

.admin-lock-state {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #4554a8;
  padding: 0.3rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-hike-answers {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
  margin-top: 0.1rem;
  padding-top: 0.62rem;
}

.admin-hike-answers-summary {
  display: grid;
  gap: 0.54rem;
}

.admin-hike-answers-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-hike-answers-metric {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.28rem 0.56rem;
  font-size: 0.79rem;
}

.admin-hike-answers-filters {
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr);
}

.admin-hike-answers-question-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.26rem;
}

.admin-moments-list {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.6rem;
}

.admin-moment {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.58rem 0.66rem;
}

.admin-moment__meta {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.admin-moment__text {
  margin: 0.46rem 0 0;
  white-space: pre-line;
  line-height: 1.42;
}

.admin-answers-mode {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-answers-mode__button {
  min-width: 160px;
}

.admin-answers-mode__button.is-active {
  border-color: var(--line-strong);
}

.admin-answers-filters {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.62rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-answers-filters .admin-form-field {
  margin: 0;
}

.admin-answers-filters .admin-form-field span {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-answers-chart {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.72rem;
}

.admin-answers-chart h3 {
  margin: 0;
  font-size: 0.92rem;
}

.admin-answers-list {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.6rem;
}

.admin-answer-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.58rem 0.66rem;
}

.admin-answer-card__meta {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.admin-answer-card__value {
  margin: 0.48rem 0 0;
  white-space: pre-line;
}

.admin-answer-details {
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
  row-gap: 0.3rem;
  column-gap: 0.46rem;
}

.admin-answer-details dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-answer-details dd {
  margin: 0;
  white-space: pre-line;
}

.fun-pie-row {
  margin-top: 0.58rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.72rem;
}

.fun-pie {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", "Manrope", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: #2f3f80;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.funness-block > p {
  margin: 0;
}

.fun-pie--small {
  width: 62px;
  height: 62px;
  font-size: 0.74rem;
}

.fun-pie--large {
  width: 112px;
  height: 112px;
  font-size: 1rem;
}

.fun-pie-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.32rem;
}

.fun-pie-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.fun-pie-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(32, 38, 74, 0.16);
  flex-shrink: 0;
}

.fun-pie-dot.is-a {
  background: #5f7a45;
}

.fun-pie-dot.is-b {
  background: #758ecf;
}

.fun-pie-dot.is-c {
  background: #c48b56;
}

.attendance-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  background: var(--surface-soft);
  margin-bottom: 0.84rem;
}

.self-form-panel form {
  display: grid;
  gap: 0.62rem;
  max-width: 520px;
}

.self-form-content {
  margin-top: 0.72rem;
}

.self-link-claim {
  border: 1px dashed rgba(79, 118, 255, 0.36);
  border-radius: 12px;
  background: rgba(243, 247, 255, 0.72);
  padding: 0.62rem 0.68rem;
  margin-bottom: 0.72rem;
}

.self-form-toggle {
  width: 100%;
  border: 1px solid rgba(79, 118, 255, 0.32);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(237, 243, 255, 0.88));
  color: #22316f;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.72rem 0.84rem;
  cursor: pointer;
  box-shadow: 0 14px 24px -20px rgba(53, 69, 144, 0.75);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.self-form-toggle::after {
  content: "+";
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #3550c2;
  background: rgba(79, 118, 255, 0.16);
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.self-form-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 118, 255, 0.42);
  box-shadow: 0 18px 28px -22px rgba(53, 69, 144, 0.9);
}

.self-form-toggle.is-open::after {
  content: "−";
  transform: scale(1.04);
  background: rgba(79, 118, 255, 0.24);
}

.self-form-row {
  display: grid;
  gap: 0.28rem;
}

.self-form-row > span {
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 700;
}

.self-form-row input,
.self-form-row select,
.self-form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.52rem 0.62rem;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.self-form-row textarea {
  resize: vertical;
  min-height: 96px;
}

.self-form-row input:focus-visible,
.self-form-row select:focus-visible,
.self-form-row textarea:focus-visible {
  border-color: rgba(96, 114, 232, 0.5);
  box-shadow: 0 0 0 3px rgba(126, 136, 255, 0.2);
}

.attendance-toolbar {
  margin: 0.65rem 0;
}

.attendance-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.56rem 0.7rem;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.attendance-grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.attendance-group {
  display: grid;
  gap: 0.48rem;
}

.attendance-group__title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  color: #3f4f9f;
}

.attendance-group__grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.attendance-item {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.56rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attendance-item__main {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.attendance-item input[type="checkbox"] {
  margin-top: 0.18rem;
}

.attendance-item__text {
  display: grid;
  gap: 0.16rem;
}

.attendance-item__meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.attendance-wet-shoes {
  display: grid;
  gap: 0.18rem;
  justify-items: end;
  flex: 0 0 auto;
}

.attendance-wet-shoes__label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.1;
}

.attendance-wet-shoes__input {
  width: 78px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.34rem 0.46rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.attendance-wet-shoes__input:disabled {
  background: rgba(239, 241, 251, 0.8);
  color: var(--muted);
}

.attendance-actions {
  margin-top: 0.72rem;
}

.attendance-legacy {
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}

.attendance-legacy h4 {
  margin: 0 0 0.4rem;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: #3f4f9f;
}

.attendance-legacy-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.58rem;
  margin-top: 0.55rem;
}

.attendance-legacy-title {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.attendance-legacy-controls {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.8fr) auto;
  align-items: center;
}

.attendance-legacy-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.48rem 0.58rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.leaderboard-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(244, 245, 255, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  padding: 1rem;
  margin-top: 1rem;
}

.leaderboard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.leaderboard-filter {
  margin-top: 0.8rem;
}

.leaderboard-table-wrap {
  margin-top: 0.8rem;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.leaderboard-table th,
.leaderboard-table td {
  text-align: left;
  padding: 0.58rem 0.62rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.moments-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(244, 245, 255, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  padding: 1rem;
  margin-top: 1rem;
}

.moments-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.72rem;
}

.moments-favorites {
  margin-top: 0.8rem;
}

.moments-favorites h2 {
  margin: 0 0 0.62rem;
  font-size: 1.02rem;
}

.moments-favorites__grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.moment-favorite {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 0.58rem;
  display: grid;
  gap: 0.4rem;
}

.moment-favorite__media {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.moment-favorite__media img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.moment-favorite__controls {
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.moment-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 0.72rem 0.78rem;
}

.moment-card__title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: #2f3f92;
}

.moment-card__meta {
  margin: 0.36rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.moment-card__text {
  margin: 0.52rem 0 0;
  white-space: pre-line;
  line-height: 1.45;
}

.leaderboard-table thead th {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: #3f4f9f;
  background: rgba(245, 246, 255, 0.88);
  position: sticky;
  top: 0;
}

.leaflet-control-layers,
.leaflet-bar {
  border: 1px solid rgba(79, 95, 174, 0.28) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-soft) !important;
  overflow: hidden;
}

.leaflet-control-layers-expanded {
  font-family: "Manrope", sans-serif;
  font-size: 0.86rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
}

.leaflet-control-layers label {
  color: var(--text);
}

.leaflet-control-zoom a {
  font-size: 1.04rem;
  background: rgba(255, 255, 255, 0.97) !important;
  color: #3a4b9c !important;
  border-color: rgba(79, 95, 174, 0.24) !important;
}

.leaflet-control-scale-line {
  border-color: rgba(56, 68, 140, 0.36) !important;
  color: rgba(39, 49, 108, 0.95) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  font-family: "IBM Plex Mono", monospace;
}

.leaflet-tooltip {
  border-radius: 8px;
  border: 1px solid rgba(79, 95, 174, 0.24);
  box-shadow: var(--shadow-soft);
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

.route-marker {
  background: transparent;
  border: 0;
}

.route-marker__badge,
.route-marker__house,
.route-marker__flag {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(79, 95, 174, 0.2);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.route-marker__badge {
  font-weight: 800;
}

.route-marker__flag--start {
  color: #627dff;
}

.route-marker__flag--finish {
  color: #4f56aa;
}

body.theme-field-notebook {
  --bg-0: #f8fafc;
  --bg-1: #f8fafc;
  --bg-2: #f8fafc;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: rgba(248, 250, 252, 0.92);
  --surface-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(148, 163, 184, 0.24);
  --line-strong: rgba(100, 116, 139, 0.42);
  --accent: #2563eb;
  --accent-2: #4f46e5;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-soft-2: rgba(79, 70, 229, 0.1);
  --danger: #dc2626;
  --focus: rgba(37, 99, 235, 0.24);
  --shadow: 0 28px 54px -36px rgba(15, 23, 42, 0.24);
  --shadow-soft: 0 16px 28px -20px rgba(15, 23, 42, 0.18);
  background: #f8fafc;
  position: relative;
}

body.theme-field-notebook::before {
  content: none;
  display: none;
}

body.theme-field-notebook::after {
  content: none;
  display: none;
}

body.theme-field-notebook .page {
  position: relative;
  z-index: 1;
}

body.theme-field-notebook .hero,
body.theme-field-notebook .map-shell,
body.theme-field-notebook .detail-panel,
body.theme-field-notebook .leaderboard-shell,
body.theme-field-notebook .moments-shell,
body.theme-field-notebook .archive-modal,
body.theme-field-notebook .photo-viewer-modal,
body.theme-field-notebook .admin-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  backdrop-filter: none;
}

body.theme-field-notebook .hero::before,
body.theme-field-notebook .hero::after {
  display: none;
}

body.theme-field-notebook .hero h1,
body.theme-field-notebook .detail-panel h2,
body.theme-field-notebook .detail-panel h3,
body.theme-field-notebook .archive-modal__top h2,
body.theme-field-notebook .archive-group__top h3,
body.theme-field-notebook .admin-create-top h2,
body.theme-field-notebook .admin-link-group__title,
body.theme-field-notebook .attendance-group__title,
body.theme-field-notebook .attendance-legacy h4,
body.theme-field-notebook .moment-card__title,
body.theme-field-notebook .admin-create-top h2,
body.theme-field-notebook .admin-attendance-group__title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

body.theme-field-notebook .hero h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 700;
}

body.theme-field-notebook .hero p,
body.theme-field-notebook .archive-modal__subtitle,
body.theme-field-notebook .auth-message,
body.theme-field-notebook .hint,
body.theme-field-notebook .moment-card__meta,
body.theme-field-notebook .admin-link-meta,
body.theme-field-notebook .admin-lock-meta,
body.theme-field-notebook .admin-moment__meta,
body.theme-field-notebook .admin-answer-card__meta,
body.theme-field-notebook .attendance-item__meta,
body.theme-field-notebook .pending-item__meta,
body.theme-field-notebook .self-form-row > span,
body.theme-field-notebook .admin-form-field label {
  color: var(--muted);
}

body.theme-field-notebook .hero-kicker,
body.theme-field-notebook .hero-meta span {
  border-color: rgba(77, 107, 53, 0.2);
  background: rgba(228, 220, 205, 0.88);
  color: var(--accent);
}

body.theme-field-notebook .hero-home {
  column-gap: 1.2rem;
}

body.theme-field-notebook .back-link,
body.theme-field-notebook .upload-pill-button,
body.theme-field-notebook .action-button.upload-pill-button,
body.theme-field-notebook .action-button-secondary,
body.theme-field-notebook .admin-create-menu .action-button {
  border-radius: 8px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

body.theme-field-notebook .back-link:hover,
body.theme-field-notebook .upload-pill-button:hover,
body.theme-field-notebook .action-button.upload-pill-button:hover,
body.theme-field-notebook .action-button-secondary:hover,
body.theme-field-notebook .admin-create-menu .action-button:hover {
  background: #e2e8f0;
  border: 0;
  box-shadow: none;
  filter: none;
}

body.theme-field-notebook .action-button {
  border-radius: 8px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

body.theme-field-notebook .action-button:hover {
  background: #e2e8f0;
  box-shadow: none;
  filter: none;
}

body.theme-field-notebook .action-button-secondary {
  border-radius: 8px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

body.theme-field-notebook .action-button-secondary:hover {
  background: #e2e8f0;
  color: #334155;
  border: 0;
  box-shadow: none;
}

body.theme-field-notebook .action-button-google {
  border: 0;
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

body.theme-field-notebook .action-button-google:hover {
  background: #e2e8f0;
}

body.theme-field-notebook .hero-search {
  border-color: rgba(77, 107, 53, 0.24);
  background: rgba(251, 247, 239, 0.96);
}

body.theme-field-notebook .hero-search.is-open {
  border-color: rgba(77, 107, 53, 0.38);
}

body.theme-field-notebook .hero-search__toggle {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

body.theme-field-notebook .hero-search__toggle:hover {
  border-color: rgba(77, 107, 53, 0.2);
  background: rgba(77, 107, 53, 0.08);
}

body.theme-field-notebook .hero-search__count {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

body.theme-field-notebook .hero-home > .hero-actions > .hero-search .hero-search__input {
  border-color: rgba(77, 107, 53, 0.24);
  background: rgba(255, 251, 243, 0.97);
}

body.theme-field-notebook .hero-home > .hero-actions > .hero-search .hero-search__count {
  border-color: rgba(77, 107, 53, 0.18);
  background: rgba(251, 247, 239, 0.96);
}

body.theme-field-notebook .stats-hero .stat-inline {
  border-left-color: rgba(77, 107, 53, 0.16);
}

body.theme-field-notebook .stats-hero .stat-number,
body.theme-field-notebook .stat-card p {
  color: var(--text);
}

body.theme-field-notebook .stats-hero .stat-caption,
body.theme-field-notebook .stat-card h2 {
  color: var(--muted);
}

body.theme-field-notebook .map-shell,
body.theme-field-notebook .detail-panel,
body.theme-field-notebook .leaderboard-shell,
body.theme-field-notebook .moments-shell {
  border-radius: 16px;
}

body.theme-field-notebook .map-large,
body.theme-field-notebook .map-small {
  background: #dbe0d1;
}

body.theme-field-notebook .map-small {
  border-color: var(--line);
}

body.theme-field-notebook .status:not(:empty) {
  border-color: rgba(160, 76, 60, 0.28);
  background: rgba(251, 247, 239, 0.95);
}

body.theme-field-notebook .archive-group,
body.theme-field-notebook .panel-section,
body.theme-field-notebook .auth-panel,
body.theme-field-notebook .upload-panel,
body.theme-field-notebook .pending-panel,
body.theme-field-notebook .admin-view-switch,
body.theme-field-notebook .admin-pending-group,
body.theme-field-notebook .attendance-panel,
body.theme-field-notebook .admin-attendance-group,
body.theme-field-notebook .admin-answers-chart,
body.theme-field-notebook .admin-photo,
body.theme-field-notebook .admin-link-row,
body.theme-field-notebook .admin-hike-editor,
body.theme-field-notebook .admin-lock-row,
body.theme-field-notebook .admin-moment,
body.theme-field-notebook .admin-answer-card,
body.theme-field-notebook .attendance-item,
body.theme-field-notebook .attendance-legacy-row,
body.theme-field-notebook .moment-card,
body.theme-field-notebook .moment-favorite,
body.theme-field-notebook .pending-item {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    rgba(247, 241, 231, 0.9);
  box-shadow: var(--shadow-soft);
}

body.theme-field-notebook .admin-create-menu,
body.theme-field-notebook .admin-hike-editor__advanced,
body.theme-field-notebook .admin-hike-attendance,
body.theme-field-notebook .admin-hike-participants,
body.theme-field-notebook .admin-hike-gpx,
body.theme-field-notebook .self-link-claim {
  border-color: rgba(77, 107, 53, 0.26);
  background: rgba(236, 230, 217, 0.95);
}

body.theme-field-notebook .meta-grid dt,
body.theme-field-notebook .attendance-wet-shoes__label,
body.theme-field-notebook .admin-attendance-wet__label,
body.theme-field-notebook .admin-lock-state {
  color: var(--accent);
}

body.theme-field-notebook .admin-lock-state {
  background: rgba(251, 247, 239, 0.95);
  border-color: rgba(77, 107, 53, 0.22);
}

body.theme-field-notebook .hero-actions .action-button.is-active,
body.theme-field-notebook .hero-actions .back-link.is-active,
body.theme-field-notebook .admin-view-switch__button.is-active,
body.theme-field-notebook .admin-answers-mode__button.is-active {
  border: 0;
  background: #059669;
  color: #fff;
}

body.theme-field-notebook .attendance-search,
body.theme-field-notebook .admin-input,
body.theme-field-notebook .admin-textarea,
body.theme-field-notebook .hero-search__input,
body.theme-field-notebook .self-form-row input,
body.theme-field-notebook .self-form-row select,
body.theme-field-notebook .self-form-row textarea,
body.theme-field-notebook .attendance-wet-shoes__input,
body.theme-field-notebook .admin-attendance-wet__input,
body.theme-field-notebook .admin-attendance-select,
body.theme-field-notebook .admin-attendance-textarea,
body.theme-field-notebook .attendance-legacy-input,
body.theme-field-notebook .upload-panel input[type="file"],
body.theme-field-notebook .admin-input[type="file"] {
  border-color: rgba(119, 127, 96, 0.26);
  border-radius: 16px;
  background: rgba(255, 251, 243, 0.94);
  color: var(--text);
}

body.theme-field-notebook .attendance-search:focus-visible,
body.theme-field-notebook .admin-input:focus-visible,
body.theme-field-notebook .admin-textarea:focus-visible,
body.theme-field-notebook .hero-search__input:focus-visible,
body.theme-field-notebook .self-form-row input:focus-visible,
body.theme-field-notebook .self-form-row select:focus-visible,
body.theme-field-notebook .self-form-row textarea:focus-visible,
body.theme-field-notebook .attendance-wet-shoes__input:focus-visible,
body.theme-field-notebook .admin-attendance-wet__input:focus-visible,
body.theme-field-notebook .admin-attendance-select:focus-visible,
body.theme-field-notebook .admin-attendance-textarea:focus-visible,
body.theme-field-notebook .attendance-legacy-input:focus-visible,
body.theme-field-notebook .upload-panel input[type="file"]:focus-visible,
body.theme-field-notebook .admin-input[type="file"]:focus-visible {
  border-color: rgba(77, 107, 53, 0.44);
  box-shadow: 0 0 0 3px rgba(77, 107, 53, 0.14);
}

body.theme-field-notebook .upload-panel input[type="file"]::file-selector-button,
body.theme-field-notebook .upload-panel input[type="file"]::-webkit-file-upload-button,
body.theme-field-notebook .admin-input[type="file"]::file-selector-button,
body.theme-field-notebook .admin-input[type="file"]::-webkit-file-upload-button {
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(251, 247, 239, 1), rgba(232, 225, 211, 0.96));
  box-shadow: 0 12px 18px -18px rgba(72, 69, 47, 0.52);
}

body.theme-field-notebook .upload-panel input[type="file"]:hover::file-selector-button,
body.theme-field-notebook .upload-panel input[type="file"]:hover::-webkit-file-upload-button,
body.theme-field-notebook .admin-input[type="file"]:hover::file-selector-button,
body.theme-field-notebook .admin-input[type="file"]:hover::-webkit-file-upload-button,
body.theme-field-notebook .upload-panel input[type="file"]::file-selector-button:hover,
body.theme-field-notebook .upload-panel input[type="file"]::-webkit-file-upload-button:hover,
body.theme-field-notebook .admin-input[type="file"]::file-selector-button:hover,
body.theme-field-notebook .admin-input[type="file"]::-webkit-file-upload-button:hover {
  box-shadow: 0 16px 20px -18px rgba(72, 69, 47, 0.56);
  filter: none;
}

body.theme-field-notebook .self-form-toggle {
  border-color: rgba(77, 107, 53, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.98), rgba(232, 223, 208, 0.95));
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

body.theme-field-notebook .self-form-toggle:hover {
  border-color: rgba(77, 107, 53, 0.36);
  box-shadow: 0 18px 26px -22px rgba(72, 69, 47, 0.42);
}

body.theme-field-notebook .self-form-toggle::after {
  color: var(--accent);
  background: rgba(77, 107, 53, 0.12);
}

body.theme-field-notebook .self-form-toggle.is-open::after {
  background: rgba(77, 107, 53, 0.18);
}

body.theme-field-notebook .leaderboard-table thead th {
  background: rgba(232, 223, 208, 0.92);
  color: var(--accent);
}

body.theme-field-notebook .leaderboard-table th,
body.theme-field-notebook .leaderboard-table td {
  border-bottom-color: var(--line);
}

body.theme-field-notebook .leaflet-control-layers,
body.theme-field-notebook .leaflet-bar {
  border-color: rgba(119, 127, 96, 0.24) !important;
  box-shadow: var(--shadow-soft) !important;
}

body.theme-field-notebook .leaflet-control-layers-expanded,
body.theme-field-notebook .leaflet-control-zoom a {
  background: rgba(251, 247, 239, 0.97) !important;
  color: var(--text) !important;
}

body.theme-field-notebook .leaflet-control-zoom a {
  border-color: rgba(119, 127, 96, 0.24) !important;
}

body.theme-field-notebook .leaflet-control-scale-line {
  border-color: rgba(77, 107, 53, 0.28) !important;
  color: var(--text) !important;
  background: rgba(251, 247, 239, 0.92) !important;
}

body.theme-field-notebook .leaflet-tooltip {
  border-color: rgba(119, 127, 96, 0.22);
  background: rgba(251, 247, 239, 0.96);
  color: var(--text);
}

body.theme-field-notebook .route-marker__badge,
body.theme-field-notebook .route-marker__house,
body.theme-field-notebook .route-marker__flag {
  border-color: rgba(119, 127, 96, 0.22);
  background: rgba(251, 247, 239, 0.98);
  color: var(--text);
}

body.theme-field-notebook .route-marker__flag--start {
  color: var(--accent-2);
}

body.theme-field-notebook .route-marker__flag--finish {
  color: var(--accent);
}

/* Fun Mode */
body,
body.theme-field-notebook {
  background: #e8f5e9;
}

.hero h1 {
  color: #166534;
  font-weight: 800;
  font-size: clamp(2rem, 3.3vw, 3rem);
}

.hero,
.map-shell,
.detail-panel,
.leaderboard-shell,
.moments-shell,
.admin-card,
.archive-modal,
.photo-viewer-modal {
  border-radius: 24px;
  border: 4px solid #4ade80;
  background: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
  backdrop-filter: none;
}

.hero::before,
.hero::after {
  display: none;
}

.action-button,
.back-link,
.upload-pill-button,
.admin-view-switch__button,
.admin-answers-mode__button {
  border: 0;
  border-radius: 999px;
  background: #fde047;
  color: #1f2937;
  font-weight: 500;
  padding: 8px 16px;
  text-decoration: none;
  box-shadow: none;
  transition: all 0.2s ease;
}

.action-button:hover,
.back-link:hover,
.upload-pill-button:hover,
.admin-view-switch__button:hover,
.admin-answers-mode__button:hover {
  transform: translateY(-2px);
  background: #fef08a;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  filter: none;
}

.action-button.is-active,
.back-link.is-active,
.hero-actions .action-button.is-active,
.hero-actions .back-link.is-active,
.admin-view-switch__button.is-active,
.admin-answers-mode__button.is-active {
  background: #10b981;
  color: #ffffff;
}

.action-button a,
.back-link a,
.upload-pill-button a,
.admin-view-switch__button a,
.admin-answers-mode__button a {
  text-decoration: none;
  color: inherit;
}

.stats-hero .stat-number,
.stat-card p {
  color: #f97316;
}

a,
button,
input,
[role="button"] {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible,
.leaflet-container a:focus-visible {
  box-shadow: 0 0 0 3px var(--focus);
  border-radius: 10px;
}

.leaflet-container .leaflet-interactive:focus,
.leaflet-container a:focus {
  outline: none !important;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .detail-map-wrap {
    position: static;
  }
}

@media (max-width: 980px) {
  .page-home {
    min-height: auto;
    display: block;
  }

  .hero-home {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "subtitle"
      "actions"
      "stats";
  }

  .hero-home > .hero-actions {
    margin-top: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }

  .hero-search.is-open {
    transform: translateX(0);
  }

  .hero-search.is-open .hero-search__input {
    width: min(56vw, 220px);
    max-width: min(56vw, 220px);
  }

  .hero-home > .hero-actions > .hero-search .hero-search__input {
    top: calc(100% + 0.34rem);
    left: 0;
    transform: none;
    height: 34px;
  }

  .hero-home > .hero-actions > .hero-search.is-open .hero-search__input {
    width: min(62vw, 240px);
    max-width: min(62vw, 240px);
    padding: 0 0.7rem;
  }

  .hero-home > .hero-actions > .hero-search .hero-search__count {
    top: calc(100% + 2.7rem);
    right: 0;
    margin-top: 0;
  }

  .hero-home > .stats-hero {
    justify-self: stretch;
    max-width: none;
    margin-right: 0;
    margin-top: 0.3rem;
  }

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

  .stats-hero {
    max-width: none;
    margin-left: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-hero .stat-number {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .stats-hero .stat-inline {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .stats-hero .stat-caption {
    font-size: 0.66rem;
  }

  .meta-grid {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }

  .map-small {
    height: 370px;
  }

  .map-large {
    height: 62vh;
    min-height: 420px;
  }

  .map-shell__top {
    top: 0.45rem;
    right: 0.45rem;
  }

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

  .attendance-group__grid {
    grid-template-columns: 1fr;
  }

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

  .attendance-wet-shoes {
    justify-items: start;
  }

  .attendance-legacy-controls {
    grid-template-columns: 1fr;
  }

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

  .admin-attendance-grid {
    grid-template-columns: 1fr;
  }

  .admin-hike-editor__grid {
    grid-template-columns: 1fr;
  }

  .admin-hike-editor__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-hike-attendance__toolbar {
    align-items: stretch;
  }

  .admin-hike-attendance__search {
    min-width: 0;
    width: 100%;
  }

  .admin-attendance-form {
    grid-template-columns: 1fr;
    flex-basis: 100%;
  }

  .admin-hike-gpx__toolbar {
    align-items: stretch;
  }

  .admin-hike-gpx__select {
    min-width: 0;
    width: 100%;
  }

  .admin-hike-gpx__map {
    min-height: 260px;
  }

  .admin-link-row {
    grid-template-columns: 1fr;
  }

  .admin-link-actions {
    justify-content: flex-start;
  }

  .admin-link-input {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .admin-lock-row {
    grid-template-columns: 1fr;
  }

  .admin-answers-filters {
    grid-template-columns: 1fr;
  }

  .fun-pie-row {
    align-items: flex-start;
  }

  .fun-pie--large {
    width: 96px;
    height: 96px;
  }

  .leaderboard-top {
    align-items: flex-start;
  }

  .archive-modal {
    max-height: 100%;
    border-radius: 20px;
    padding: 0.9rem;
  }

  .archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .photo-viewer-modal {
    max-height: 100%;
    border-radius: 20px;
    padding: 0.75rem;
  }

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

  .photo-viewer__nav {
    width: 100%;
    height: 38px;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
