:root {
  --color-bg: #eaf6fb;
  --color-header: #0d5c75;
  --color-primary: #1f8fc4;
  --color-primary-dark: #0c5f82;
  --color-accent: #ff8c42;
  --color-accent-light: #ffe4cc;
  --color-sun: #ffd166;
  --color-visited: #ff8c42;
  --color-unvisited: #4aa3c9;
  --color-text: #1c2b33;
  --color-panel-bg: #ffffff;
  --color-card-bg: #ffffff;
  --color-border: #d7e8ef;
  --radius-lg: 22px;
  --radius-md: 14px;
  --font-heading: "Zen Maru Gothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, .brand {
  font-family: var(--font-heading);
}

/* ---------- Simple header (admin page) ---------- */

.app-header {
  background: var(--color-primary-dark);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header h1 {
  margin: 0;
  font-size: 1.15rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: radial-gradient(circle at 15% 20%, #4fb3dd 0%, var(--color-primary) 45%, var(--color-primary-dark) 100%);
  color: white;
  padding-bottom: 70px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero::before {
  width: 260px;
  height: 260px;
  top: -80px;
  right: 8%;
}

.hero::after {
  width: 140px;
  height: 140px;
  bottom: 60px;
  left: 6%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 0;
  position: relative;
  z-index: 2;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
}

.admin-link {
  color: white;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 28px 34px;
  text-align: center;
}

.eyebrow {
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-sun);
  margin: 0 0 6px;
}

.hero-content h1 {
  font-size: 2.1rem;
  line-height: 1.35;
  margin: 0 0 14px;
  font-weight: 900;
}

.hero-sub {
  font-size: 0.95rem;
  opacity: 0.92;
  margin: 0;
}

.hero-compact {
  padding-bottom: 50px;
}

.hero-compact .hero-content {
  padding: 10px 28px 20px;
}

.hero-compact .hero-content h1 {
  font-size: 1.7rem;
  margin: 0;
}

.wave-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 70px;
  z-index: 1;
}

.wave-divider-alt {
  height: 50px;
}

/* ---------- Message section ---------- */

.message-section {
  position: relative;
  background: white;
  overflow: hidden;
  padding-top: 50px;
}

.message-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px 56px;
  text-align: center;
}

.message-eyebrow {
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 10px;
}

.message-lead {
  font-size: 0.92rem;
  line-height: 2;
  color: #3a4a52;
  margin: 0 0 28px;
}

.progress-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.progress-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.progress-bar {
  background: white;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: #5a7583;
}

.progress-text strong {
  color: var(--color-accent);
  font-size: 1.05rem;
}

/* ---------- Main / views ---------- */

.app-main {
  position: relative;
  min-height: calc(100vh - 260px);
}

#list-view {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 24px 60px;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 18px;
  flex: 1;
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(13, 92, 117, 0.06);
}

.search-box input {
  border: none;
  outline: none;
  font: inherit;
  flex: 1;
  background: transparent;
}

.filter-chips {
  display: flex;
  gap: 8px;
}

.chip {
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.result-count {
  font-size: 0.8rem;
  color: #5a7583;
  margin: 14px 2px 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aquarium-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(13, 92, 117, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  opacity: 0;
  animation: cardIn 0.45s ease both;
  animation-delay: var(--delay, 0s);
}

.aquarium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgba(13, 92, 117, 0.18);
}

.card-art {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  position: relative;
  overflow: hidden;
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35) 0, transparent 40%),
    radial-gradient(circle at 80% 75%, rgba(255, 255, 255, 0.25) 0, transparent 35%);
}

.card-art::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cpath d='M0 8 Q10 0 20 8 T40 8 V16 H0 Z' fill='white' fill-opacity='0.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 40px 16px;
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-pref {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

.card-body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.8rem;
  color: #5a7583;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-results {
  text-align: center;
  color: #7590a0;
  padding: 40px 0;
  font-size: 0.95rem;
}

/* ---------- Badges ---------- */

.visit-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  width: fit-content;
}

.visit-badge.visited {
  background: var(--color-accent-light);
  color: #c96a1e;
}

.visit-badge.unvisited {
  background: #e7f2f7;
  color: var(--color-unvisited);
}

/* ---------- Detail panel ---------- */

.detail-page {
  max-width: 640px;
  margin: 28px auto 60px;
  padding: 0 20px;
}

.detail-content-card {
  background: var(--color-panel-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(13, 92, 117, 0.12);
  padding: 30px;
}

.detail-content h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.detail-content .prefecture {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 0.85rem;
}

.detail-content .address {
  font-size: 0.85rem;
  color: #556;
  margin: 6px 0;
}

.detail-content .description {
  font-size: 0.9rem;
  margin: 10px 0;
}

.detail-content a.official {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.visit-record {
  border-top: 1px dashed var(--color-border);
  padding: 14px 0;
}

.visit-record .visit-date {
  font-weight: bold;
  font-size: 0.9rem;
}

.visit-record .comment {
  font-size: 0.88rem;
  margin: 6px 0;
  white-space: pre-wrap;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }
  .list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
