.heritage-archive-view {
  padding-top: 1rem;
}

.archive-heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  background:
    linear-gradient(118deg, rgba(248, 251, 251, 0.98), rgba(223, 234, 236, 0.9)),
    var(--paper-cold);
  border: 1px solid var(--line);
  border-radius: 1.65rem;
  box-shadow: var(--shadow);
}

.archive-heading::after {
  position: absolute;
  top: -90px;
  right: 24%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(25, 75, 91, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(25, 75, 91, 0.025), 0 0 0 48px rgba(25, 75, 91, 0.025);
  content: "";
}

.archive-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.archive-heading > div:first-child > p:last-child {
  max-width: 43rem;
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.archive-counts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  min-width: 300px;
  background: var(--surface-brand-strong);
  border-radius: 1rem;
}

.archive-counts div {
  display: flex;
  min-height: 106px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--on-brand);
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.archive-counts div:last-child {
  border-right: 0;
}

.archive-counts strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.archive-counts span {
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.57);
  font-size: 0.64rem;
  font-weight: 800;
}

.archive-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(248, 251, 251, 0.9);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.search-field {
  display: flex;
  min-width: min(330px, 100%);
  flex: 1;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.search-field:focus-within {
  border-color: var(--mineral);
  box-shadow: 0 0 0 3px rgba(47, 118, 109, 0.1);
}

.search-field svg {
  width: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-field input {
  width: 100%;
  padding: 0;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.78rem;
}

.search-field input::placeholder {
  color: #819298;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-tab {
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  background: var(--surface-page);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.filter-tab:hover,
.filter-tab.is-active {
  color: var(--on-brand);
  background: var(--surface-brand);
}

.filter-tab--new {
  color: var(--vermilion-dark);
  background: rgba(217, 74, 50, 0.08);
}

.filter-tab--new.is-active {
  color: var(--on-brand);
  background: var(--vermilion);
}

.region-select {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.region-select select {
  min-height: 40px;
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  font-size: 0.72rem;
}

.archive-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.2rem 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.archive-result-line p {
  margin: 0;
}

.archive-result-line strong {
  margin-right: 0.15rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

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

.heritage-card {
  position: relative;
  display: flex;
  min-height: 245px;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.3rem;
  color: var(--text-primary);
  background: rgba(248, 251, 251, 0.94);
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.heritage-card:hover {
  border-color: rgba(47, 118, 109, 0.65);
  box-shadow: 0 16px 36px rgba(16, 55, 66, 0.09);
  transform: translateY(-2px);
}

.heritage-card--new {
  background:
    linear-gradient(145deg, rgba(217, 74, 50, 0.04), transparent 65%),
    rgba(248, 251, 251, 0.96);
  border-color: rgba(217, 74, 50, 0.42);
}

.heritage-card__number {
  position: absolute;
  right: 1rem;
  bottom: -0.55rem;
  color: rgba(25, 75, 91, 0.07);
  font-family: var(--font-display);
  font-size: 6.5rem;
  font-weight: 700;
  line-height: 1;
}

.heritage-card__year {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.76rem;
}

.heritage-card__new {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.2rem 0.45rem;
  color: var(--on-brand);
  background: var(--vermilion);
  border-radius: 0.25rem;
  font-size: 0.6rem;
  font-weight: 900;
}

.heritage-card__type {
  margin: 1.1rem 0 0.65rem;
  padding: 0.22rem 0.42rem;
  color: var(--on-brand);
  background: var(--surface-brand);
  border-radius: 0.25rem;
  font-size: 0.6rem;
  font-weight: 900;
}

.heritage-card__type--natural {
  background: var(--mineral);
}

.heritage-card > strong {
  position: relative;
  z-index: 1;
  max-width: 92%;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.55;
}

.heritage-card__location {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.heritage-card__keywords {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 1rem;
}

.heritage-card__keywords i {
  padding: 0.18rem 0.35rem;
  color: var(--text-accent);
  background: var(--surface-tinted);
  border-radius: 0.25rem;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
}

.heritage-card__arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--text-accent);
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.archive-empty {
  padding: 5rem 1rem;
  color: var(--text-muted);
  background: rgba(248, 251, 251, 0.84);
  border: 1px dashed var(--line);
  border-radius: 1rem;
  text-align: center;
}

.archive-empty strong {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.archive-empty p {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}

.archive-source-note {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  color: var(--text-muted);
  background: rgba(223, 234, 236, 0.66);
  border-radius: 0.75rem;
  font-size: 0.68rem;
}

.archive-source-note span {
  flex: 0 0 auto;
  padding: 0.14rem 0.35rem;
  color: var(--on-brand);
  background: var(--surface-brand);
  border-radius: 0.2rem;
  font-weight: 900;
}

.archive-source-note p {
  margin: 0;
}

.heritage-detail-view {
  padding-top: 1rem;
}

.detail-position {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
}

.heritage-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
}

.heritage-detail-card {
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(248, 251, 251, 0.95);
  border: 1px solid var(--line);
  border-radius: 1.65rem;
  box-shadow: var(--shadow);
}

.detail-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin-bottom: 2.6rem;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.category-badge.is-natural {
  background: var(--mineral);
}

.new-badge {
  padding: 0.25rem 0.48rem;
  color: var(--on-brand);
  background: var(--vermilion);
  border-radius: 0.25rem;
  font-size: 0.62rem;
  font-weight: 900;
}

.heritage-detail-card > h1 {
  max-width: 56rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.25;
}

.heritage-photo {
  overflow: hidden;
  margin: 1.55rem 0 1.8rem;
  background: var(--surface-tinted);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
}

.heritage-photo__frame {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, var(--paper-blue), #c9dde0);
}

.heritage-photo__frame::before {
  color: var(--text-muted);
  content: "写真を読み込み中…";
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.heritage-photo.is-unavailable .heritage-photo__frame::before {
  content: "写真を読み込めませんでした";
}

.heritage-photo__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 260ms ease;
}

.heritage-photo.is-loading .heritage-photo__frame img {
  opacity: 0;
}

.heritage-photo figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(248, 251, 251, 0.96);
}

.heritage-photo__subject {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.55rem;
}

.heritage-photo__subject small {
  flex: 0 0 auto;
  color: var(--mineral);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.heritage-photo__subject strong {
  overflow: hidden;
  color: var(--text-accent);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heritage-photo__credit {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.56rem;
}

.heritage-photo__credit a {
  color: inherit;
  text-underline-offset: 0.18rem;
}

.heritage-photo__credit a:hover,
.heritage-photo__credit a:focus-visible {
  color: var(--text-accent);
}

.detail-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2rem 0;
}

.detail-keywords span {
  padding: 0.35rem 0.65rem;
  color: var(--text-accent);
  background: var(--surface-tinted);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.detail-learning-point {
  position: relative;
  max-width: 58rem;
  padding: 1.5rem 1.7rem;
  background: var(--surface-page);
  border-left: 3px solid var(--mineral);
  border-radius: 0 0.85rem 0.85rem 0;
}

.detail-learning-point h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.detail-learning-point > p:last-child {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 2;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.detail-footer a {
  color: var(--text-accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-underline-offset: 0.2rem;
}

.detail-index-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  padding: 2rem;
  color: var(--on-brand);
  background: var(--surface-brand-strong);
  border-radius: 1.65rem;
  box-shadow: var(--shadow);
}

.detail-index-card::after {
  position: absolute;
  right: -74px;
  bottom: -74px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.025), 0 0 0 48px rgba(255, 255, 255, 0.025);
  content: "";
}

.detail-index-number {
  display: block;
  color: rgba(255, 255, 255, 0.12);
  font-family: var(--font-display);
  font-size: 7.5rem;
  line-height: 1;
}

.detail-index-card .eyebrow {
  margin-top: 2.8rem;
  color: #9dc6c2;
}

.detail-index-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 500;
}

.year-route {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.year-route span {
  width: 9px;
  height: 9px;
  margin-top: -5px;
  background: var(--surface-brand-strong);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.year-route .is-done {
  background: var(--surface-card);
}

.year-route .is-current {
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: var(--vermilion);
  border-color: var(--on-brand);
}

.detail-index-card > p:last-child {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
}

.heritage-learning-view,
.heritage-quiz-view {
  padding-top: 1rem;
}

.heritage-learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1rem;
}

.heritage-learning-card {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: rgba(248, 251, 251, 0.95);
  border: 1px solid var(--line);
  border-radius: 1.65rem;
  box-shadow: var(--shadow);
}

.heritage-learning-card > h1 {
  max-width: 60rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.7vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.25;
  text-wrap-style: balance;
}

.heritage-learning-card > h2 {
  margin: 0.75rem 0 0;
  color: var(--mineral);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 600;
  text-wrap-style: balance;
}

.heritage-learning-lead {
  max-width: 58rem;
  margin: 1rem 0 2rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 2;
}

.heritage-core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.6rem 0;
}

.heritage-core-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 1.2rem;
  background: var(--surface-page);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

.heritage-core-card > span {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  color: rgba(25, 75, 91, 0.1);
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
}

.heritage-core-card .eyebrow {
  position: relative;
  color: var(--vermilion-dark);
}

.heritage-core-card h3 {
  position: relative;
  margin: 1.5rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.55;
}

.heritage-core-card > p:last-child {
  position: relative;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.8;
}

.heritage-learning-actions {
  margin-top: 1.5rem;
}

.heritage-memory-card {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 2rem;
  color: var(--on-brand);
  background: var(--surface-brand-strong);
  border-radius: 1.65rem;
  box-shadow: var(--shadow);
}

.heritage-memory-card::after {
  position: absolute;
  right: -55px;
  bottom: -55px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.025), 0 0 0 44px rgba(255, 255, 255, 0.025);
  content: "";
}

.heritage-memory-card .eyebrow {
  color: #9dc6c2;
}

.heritage-memory-card h2 {
  margin: 0.75rem 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.55;
}

.heritage-memory-card > p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  line-height: 1.8;
}

.heritage-memory-card dl {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
}

.heritage-memory-card dl div {
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.heritage-memory-card dt {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.heritage-memory-card dd {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
}

.heritage-quiz-name {
  margin: 0 0 0.45rem;
  color: var(--mineral);
  font-size: 0.7rem;
  font-weight: 900;
}

.heritage-score-stamps {
  grid-template-columns: repeat(3, 22px);
}

.heritage-result-actions {
  flex-wrap: wrap;
}
