:root {
  --paper: #050505;
  --ink: #ffffff;
  --muted: #c7c7c7;
  --line: rgba(255, 255, 255, 0.13);
  --panel: rgba(0, 0, 0, 0.62);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.18);
  --blue: #ff5a5f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  background:
    radial-gradient(circle at 16% 10%, rgba(220, 38, 38, 0.34), transparent 30%),
    radial-gradient(circle at 80% 24%, rgba(220, 38, 38, 0.2), transparent 28%),
    #050505;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.76)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  backdrop-filter: blur(1px);
}

.resource-backdrops {
  position: absolute;
  inset: 0;
  z-index: -2;
  height: 100%;
  overflow: hidden;
  opacity: 0.7;
  pointer-events: none;
}

.resource-backdrops img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(1.12) contrast(1.06);
}

.page-header,
main {
  position: relative;
  z-index: 1;
}

.page-header {
  padding: 42px clamp(18px, 5vw, 76px) 30px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.44));
  backdrop-filter: blur(18px);
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
}

.resource-note {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.resource-search {
  max-width: 760px;
  margin-top: 22px;
}

.resource-search form {
  margin: 0;
}

.resource-search label {
  text-transform: none;
}

.resource-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 760;
}

.resource-search input:focus {
  border-color: rgba(248, 113, 113, 0.82);
  outline: 2px solid rgba(220, 38, 38, 0.24);
  outline-offset: 2px;
}

.resource-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.search-results {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.search-results.is-hidden {
  display: none;
}

.search-results li {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px);
}

.search-results a {
  width: fit-content;
  max-width: 100%;
  color: var(--ink);
  font-weight: 900;
  text-decoration-color: rgba(248, 113, 113, 0.7);
  text-underline-offset: 4px;
}

.search-results a:hover {
  color: #ffd4d6;
}

.search-results p,
.search-results small {
  margin: 0;
  color: var(--muted);
}

.search-results small {
  font-size: 0.78rem;
  font-weight: 850;
}

.super-pills,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.super-pills a,
.category-pills a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.56);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.super-pills a:hover,
.category-pills a:hover {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(220, 38, 38, 0.2);
}

.super-section {
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
}

.super-section h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.category-section {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.category-section h3 {
  margin: 18px 18px 0;
  color: var(--blue);
  font-size: 1.35rem;
}

.category-title-row {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 18px 18px 0;
}

.category-title-row h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

select {
  min-height: 40px;
  min-width: min(260px, 100%);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-transform: none;
}

.amazon-browser,
.discovery-browser {
  max-width: 880px;
  margin-top: 24px;
}

.link-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px;
  list-style: none;
}

.link-list li {
  display: grid;
  gap: 8px;
  padding: 0;
  border-top: 0;
}

.link-list li:first-child { border-top: 0; }

.link-list a {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26);
}

.link-list a:hover {
  border-color: rgba(248, 113, 113, 0.78);
  background: rgba(220, 38, 38, 0.22);
}

.link-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.compact-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.compact-category-header h3 {
  margin: 0;
}

.compact-category-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-category-header span,
.compact-category-description {
  color: var(--muted);
  font-size: 0.86rem;
}

.compact-category-header span {
  font-weight: 850;
  white-space: nowrap;
}

.compact-category-description {
  margin: 8px 18px 0;
}

.viator-toggle {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(248, 113, 113, 0.48);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.18);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: lowercase;
}

.viator-toggle:hover,
.viator-toggle:focus-visible {
  border-color: rgba(248, 113, 113, 0.86);
  background: rgba(220, 38, 38, 0.3);
}

.viator-toggle:focus-visible {
  outline: 2px solid rgba(248, 113, 113, 0.42);
  outline-offset: 2px;
}

.viator-section {
  grid-column: 1 / -1;
}

.viator-destination-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.viator-destination {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
}

.viator-destination summary {
  display: flex;
  min-height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 950;
  list-style: none;
}

.viator-destination summary::-webkit-details-marker {
  display: none;
}

.viator-destination summary::after {
  content: "+";
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
}

.viator-destination[open] summary::after {
  content: "-";
}

.viator-destination summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.viator-destination-link {
  color: var(--ink);
  font-weight: 950;
  text-decoration-color: rgba(248, 113, 113, 0.78);
  text-underline-offset: 4px;
}

.viator-destination-link:hover {
  color: #ffd4d6;
}

.viator-link-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 10px 10px;
  list-style: none;
}

.viator-link-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
}

.viator-link-list a:hover {
  background: rgba(220, 38, 38, 0.2);
}

.viator-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0 0;
}

.viator-badges span {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

@media (max-width: 820px) {
  body::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.68)),
      linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.54));
  }

  .page-header {
    padding-top: 24px;
  }

  .resource-backdrops {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 25svh;
    align-content: start;
    opacity: 0.62;
  }

  .resource-backdrops img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  h1 {
    font-size: 2.35rem;
  }

  .resource-note {
    font-size: 0.92rem;
  }

  .resource-search input {
    min-height: 46px;
    font-size: 0.95rem;
  }

  .super-pills,
  .category-pills {
    gap: 8px;
  }

  .super-pills a,
  .category-pills a {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 0.84rem;
  }

  .super-section h2 {
    font-size: 1.95rem;
  }

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

  .viator-destination-grid {
    grid-template-columns: 1fr;
  }

  .compact-category-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .viator-toggle {
    width: 100%;
  }

  .category-title-row {
    align-items: stretch;
    flex-direction: column;
  }
}
