/* ── shared page shell ──────────────────────────────────────────────────── */

.hex-root {
  min-height: 100vh;
  background: #f4efe8;
  padding: 20px 16px 56px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.hex-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #777;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.hex-back:hover { color: #222; }

/* ── detail card ─────────────────────────────────────────────────────────── */

.hex-card {
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.09),
    0 24px 64px rgba(0,0,0,0.06);
  overflow: hidden;
}

.hex-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ede8e0;
  overflow: hidden;
}

.hex-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hex-content {
  padding: 28px 28px 32px;
}

.hex-number-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a08060;
  margin-bottom: 8px;
}

.hex-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1520;
  margin: 0 0 18px;
  line-height: 1.2;
}

.hex-description {
  font-size: 16px;
  line-height: 1.78;
  color: #4a4540;
  margin: 0;
}

/* ── prev / next ─────────────────────────────────────────────────────────── */

.hex-pagination {
  max-width: 620px;
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hex-pag-link {
  display: flex;
  flex-direction: column;
  padding: 13px 16px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: #555;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, color 0.15s;
  overflow: hidden;
}

.hex-pag-link:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.10);
  color: #1a1520;
}

.hex-pag-link.prev { text-align: left; }
.hex-pag-link.next { text-align: right; }

.hex-pag-dir {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 4px;
}

.hex-pag-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── index grid ─────────────────────────────────────────────────────────── */

.hex-index-root {
  min-height: 100vh;
  background: #f4efe8;
  padding: 24px 16px 56px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.hex-index-header {
  max-width: 960px;
  margin: 0 auto 24px;
}

.hex-index-heading {
  font-size: 28px;
  font-weight: 700;
  color: #1a1520;
  margin: 0;
}

.hex-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.hex-grid-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.07);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}

.hex-grid-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 12px 32px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

.hex-grid-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #ede8e0;
}

.hex-grid-info {
  padding: 11px 13px 13px;
}

.hex-grid-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #a08060;
  margin-bottom: 3px;
}

.hex-grid-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1520;
  line-height: 1.3;
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .hex-content { padding: 20px 18px 24px; }
  .hex-title   { font-size: 23px; }
  .hex-grid    { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
