.post-page {
  --island-ink: #3f2b46;
  --island-muted: #5e5365;
  --island-purple-dark: #563665;
  --island-line: #d9cddd;
  --post-mint: #dceee2;
  --post-green: #315a49;
  --post-paper: #fffdf7;
  --post-rule: #ddd4ca;
  color: var(--island-ink);
  background: #f5f8ef;
  background-image: radial-gradient(#64866c22 0.75px, transparent 0.75px);
  background-size: 14px 14px;
}

.post-page .island-header { background: #fffdf8; border-color: #e1d9da; }
.post-page .island-subjects { background: #f8f2fa; }
.post-page .island-nav a[aria-current] { color: var(--post-green); background: #edf5ec; border-color: #d3e4d5; }

.post-main { padding-block: clamp(1rem, 2.5vw, 1.75rem) 1.75rem; }
.post-main [hidden] { display: none; }
.post-map, .post-album { scroll-margin-top: 1rem; }

.post-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(310px, 34vw, 398px);
  overflow: hidden;
  border: 1px solid #c8dbcb;
  border-radius: 26px;
  background: #e4efe1;
  box-shadow: 0 5px 0 #45624f12;
}

.post-hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

.post-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #f0f7e9 0%, #edf6e7e6 23%, #eef6e652 36%, transparent 52%);
  content: '';
}

.post-hero-copy { width: min(43%, 460px); padding: clamp(1.4rem, 3.4vw, 3.35rem); padding-inline-end: 0; }
.post-hero h1 { margin: 0; font-size: clamp(2.15rem, 4.65vw, 3.55rem); font-weight: 900; line-height: 1.16; }

.post-hero-subtitle {
  margin: 0.36rem 0 0;
  color: #4b425c;
  font-family: Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.035em;
}

.post-hero-intro { max-width: 18em; margin: 0.75rem 0 1rem; color: var(--island-muted); font-weight: 700; text-wrap: pretty; }

.post-primary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  color: #fff;
  background: var(--island-purple-dark);
  font-weight: 800;
  text-decoration: none;
}

.post-primary-link:hover { background: #41274e; }

.post-map { margin-top: clamp(1.5rem, 3.4vw, 2.5rem); }

.post-map-header, .post-album-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
}

.post-map h2, .post-album h2 { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 900; line-height: 1.25; }
.post-count, .post-album-header p { margin: 0.3rem 0 0; color: var(--island-muted); font-size: 0.95rem; font-weight: 700; }
.post-filters { display: flex; flex-wrap: wrap; gap: 0.45rem 0.65rem; }
.post-filter { display: grid; gap: 0.2rem; }
.post-filter > span { color: var(--island-muted); font-size: 0.86rem; font-weight: 800; }

.post-segment {
  display: flex;
  gap: 0.14rem;
  padding: 0.16rem;
  border: 1px solid var(--post-rule);
  border-radius: 12px;
  background: #fffcf6;
}

.post-segment button {
  min-width: 50px;
  min-height: 44px;
  padding: 0.34rem 0.65rem;
  border: 0;
  border-radius: 9px;
  color: var(--island-ink);
  background: transparent;
  font-size: 0.93rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.post-segment button:hover { background: #efe8f4; }
.post-segment button[aria-pressed='true'] { color: #fff; background: var(--island-purple-dark); }

.post-unit-list, .post-stamp-list {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.post-unit-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-unit, .post-stamp { --post-stamp-color: #e8def2; min-width: 0; }
.post-unit:nth-child(6n + 2), .post-stamp:nth-child(6n + 2) { --post-stamp-color: #f7e0e7; }
.post-unit:nth-child(6n + 3), .post-stamp:nth-child(6n + 3) { --post-stamp-color: #dceee2; }
.post-unit:nth-child(6n + 4), .post-stamp:nth-child(6n + 4) { --post-stamp-color: #f7ebce; }
.post-unit:nth-child(6n + 5), .post-stamp:nth-child(6n + 5) { --post-stamp-color: #dfecf7; }
.post-unit:nth-child(6n + 6), .post-stamp:nth-child(6n + 6) { --post-stamp-color: #f7e5d9; }

.post-unit-card {
  display: grid;
  grid-template-columns: 3.55rem minmax(0, 1fr);
  gap: 0.8rem;
  height: 100%;
  padding: 0.95rem;
  border: 1px solid var(--post-rule);
  border-radius: 16px;
  color: var(--island-ink);
  background: var(--post-paper);
  box-shadow: 0 3px 0 #584b3b0e;
  text-decoration: none;
}

.post-unit-card:hover { border-color: #966da2; background: #fffcff; }
.post-unit--next .post-unit-card { border-color: #89b5a0; background: #fafdf6; }
.post-unit--next .post-unit-card:hover { border-color: #4c836b; }

.post-unit-picture, .post-stamp-picture {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 4px dotted #fffcf6;
  border-radius: 5px;
  color: var(--island-ink);
  background: var(--post-stamp-color);
  font-family: var(--island-font), "Segoe UI Emoji", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.post-unit-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.post-unit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.45rem; color: var(--island-muted); font-size: 0.82rem; font-weight: 800; }
.post-unit-state { padding: 0.12rem 0.42rem; border-radius: 6px; color: #625072; background: #efe9f4; }
.post-unit-state--earned, .post-unit--next .post-unit-state { color: var(--post-green); background: var(--post-mint); }
.post-unit h3, .post-stamp h3 { margin: 0.38rem 0 0; font-size: 1.15rem; font-weight: 900; line-height: 1.3; }
.post-en-title { margin: 0.15rem 0 0; color: var(--island-purple-dark); font-weight: 800; }
.post-goal { margin: 0.44rem 0 0.67rem; color: var(--island-muted); font-size: 0.94rem; overflow-wrap: anywhere; }
.post-unit-action { margin-top: auto; color: var(--island-purple-dark); font-size: 0.94rem; font-weight: 900; }
.post-unit-action span { margin-inline-start: 0.2rem; }

.post-album {
  margin-top: clamp(1.5rem, 3.4vw, 2.5rem);
  padding: clamp(0.9rem, 2.5vw, 1.5rem);
  border: 1px solid #decfdc;
  border-radius: 20px;
  background: #fbf4ee;
}

.post-album-progress { min-width: min(10rem, 100%); color: var(--island-purple-dark); font-size: 0.92rem; font-weight: 800; }
.post-album-progress progress {
  display: block;
  width: 100%;
  height: 0.65rem;
  margin-top: 0.3rem;
  overflow: hidden;
  appearance: none;
  border: 1px solid #d1c1d4;
  border-radius: 1rem;
  background: #eee4ee;
}

.post-album-progress progress::-webkit-progress-bar { background: #eee4ee; }
.post-album-progress progress::-webkit-progress-value { border-radius: 1rem; background: #5c3b70; }
.post-album-progress progress::-moz-progress-bar { border-radius: 1rem; background: #5c3b70; }
.post-stamp-list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.65rem; }

.post-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.72rem 0.35rem;
  border: 1px dashed #bfb0bd;
  border-radius: 11px;
  background: #fffcf6;
  text-align: center;
}

.post-stamp:not(.post-stamp--earned) .post-stamp-picture { border-color: transparent; color: #69756b; background: #edf0e8; }
.post-stamp--earned { border-style: solid; border-color: #aac6b4; background: #fbfff8; }
.post-stamp h3 { font-size: 0.97rem; }
.post-stamp p { margin: 0.28rem 0 0; color: var(--island-muted); font-size: 0.85rem; }
.post-stamp--earned p { color: var(--post-green); font-weight: 750; }

.post-load { padding: 0.75rem 1rem; border: 1px dashed #bfb0bd; border-radius: 10px; background: var(--post-paper); }
.post-load:empty { display: none; }
.post-lesson { min-width: 0; }

@media (max-width: 980px) {
  .post-unit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-stamp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .post-hero { align-items: start; min-height: 0; border-radius: 19px; }
  .post-hero::before { display: none; }
  .post-hero-art { position: static; height: clamp(150px, 45vw, 255px); object-position: right center; }
  .post-hero-copy { width: 100%; padding: 0.95rem 1.05rem 1.1rem; background: #edf5e6; }
  .post-hero h1 { font-size: clamp(1.9rem, 6.8vw, 2.8rem); }
  .post-hero-intro { max-width: 32ch; margin: 0.52rem 0 0.75rem; }
}

@media (max-width: 560px) {
  .post-unit-list { grid-template-columns: minmax(0, 1fr); }
  .post-segment button { padding-inline: 0.53rem; }
  .post-stamp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
