:root {
  color-scheme: light;
  --paper: #fffaf1;
  --ink: #26302c;
  --muted: #6c756f;
  --line: #ded4c2;
  --accent: #d95f47;
  --accent-2: #347a76;
  --soft: #f5e7d1;
  --shadow: 0 16px 40px rgba(45, 34, 22, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.75;
}

button,
a {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(38, 48, 44, .1);
  background: rgba(255, 250, 241, .92);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
}

.brand-title,
.brand-subtitle {
  display: block;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
}

.share-button,
.debug-panel button {
  min-height: 38px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.share-button {
  padding: 0 14px;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 46%);
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: 44px 0 24px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 8px 0 16px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 640px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-image {
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--soft);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
}

.section-heading {
  margin-bottom: 18px;
}

h2,
h3,
p {
  margin-top: 0;
}

.section-heading h2,
.detail-section h2,
.comments-section h2 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 rgba(38, 48, 44, .12);
}

.comic-frame {
  position: relative;
  min-height: 230px;
  background: #f9dfb8;
}

.comic-frame img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.elder-hotspot {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.elder-figure {
  position: absolute;
  right: 10%;
  bottom: 10%;
  display: grid;
  justify-items: center;
  width: 54px;
  pointer-events: none;
}

.elder-face {
  width: 38px;
  height: 38px;
  border: 2px solid #3c332d;
  border-radius: 50%;
  background: #e8c39a;
}

.elder-body {
  width: 42px;
  height: 42px;
  margin-top: -2px;
  border: 2px solid #3c332d;
  border-radius: 18px 18px 4px 4px;
  background: #6b7568;
}

.elder-hotspot:focus-visible .elder-face,
.comment-icon-button:focus-visible,
.activity-elder-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.post-body {
  padding: 16px;
}

.post-body h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
}

.profile-card,
.comments-section,
.detail-section {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 20px;
}

.avatar {
  width: 88px;
  height: 88px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}

.profile-list {
  margin: 0;
}

.profile-list div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-list dt {
  color: var(--muted);
  font-size: 12px;
}

.profile-list dd {
  margin: 0;
}

.activity-photos {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.activity-photo {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
}

.activity-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.activity-photo figcaption {
  padding: 10px 12px;
  border-top: 2px solid var(--ink);
  font-weight: 700;
}

.activity-elder-button {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 58px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.detail-section,
.comments-section {
  margin: 24px 0;
  padding: 22px;
}

.detail-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.detail-body img {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.comment {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.comment-icon-button {
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #e8c39a;
  cursor: pointer;
}

.comment-icon-button[disabled] {
  cursor: default;
}

.comment strong {
  display: block;
}

.truth {
  width: min(1060px, calc(100% - 32px));
  margin: 42px auto;
  padding: 28px;
  border: 2px solid #201b18;
  background: #f6f0df;
  color: #201b18;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.truth-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 3px double #201b18;
}

.truth h1 {
  margin: 0;
  font-size: clamp(34px, 8vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

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

.truth-section {
  min-height: 180px;
  padding: 16px;
  border: 1px solid #201b18;
  background: rgba(255, 255, 255, .34);
}

.truth-section h2 {
  margin-bottom: 10px;
  border-bottom: 1px solid #201b18;
  font-size: 22px;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
}

.ledger th,
.ledger td {
  padding: 8px;
  border: 1px solid #201b18;
  text-align: left;
}

.final-message {
  display: grid;
  place-items: center;
  min-height: 55vh;
  color: #fff;
  background: #14110f;
  font-size: clamp(28px, 7vw, 72px);
  font-weight: 800;
  text-align: center;
}

.altered-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(16, 12, 10, .92);
}

.overlay-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: clamp(22px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: 0;
}

.overlay-noise {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 5px 5px;
}

.overlay-button span:last-child {
  position: relative;
}

.footer {
  width: min(1160px, calc(100% - 32px));
  margin: 48px auto 0;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.debug-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  display: none;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.debug-panel.is-visible {
  display: flex;
}

.debug-panel button {
  padding: 0 10px;
}

@media (max-width: 860px) {
  .header-inner,
  .nav {
    align-items: flex-start;
  }

  .header-inner {
    flex-direction: column;
    padding: 12px 0;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero,
  .content-grid,
  .detail-body,
  .truth-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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