@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --paper: #fbf7ef;
  --paper-deep: #efe2cf;
  --ink: #21312d;
  --muted: #6c756d;
  --line: #d8c7ad;
  --sage: #789879;
  --sage-dark: #42654f;
  --rose: #b55f63;
  --red: #8c3136;
  --blue: #426d83;
  --gold: #bd8d3a;
  --white: #fffdf8;
  --shadow: 0 22px 55px rgb(83 61 32 / 0.16);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(141 116 73 / 0.08) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(rgb(141 116 73 / 0.06) 1px, transparent 1px) 0 0 / 38px 38px,
    var(--paper);
  font-family: "Source Sans 3", Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.container {
  width: min(1130px, calc(100vw - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 99;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(80 57 34 / 0.16);
  background: rgb(251 247 239 / 0.9);
  backdrop-filter: blur(14px);
}

.topbar,
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.topbar {
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--gold);
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.82rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.nav-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--gold);
  cursor: pointer;
}

.button:hover,
.nav-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--gold);
}

.button-secondary {
  background: var(--white);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--sage);
}

.hero {
  padding: clamp(48px, 7vw, 92px) 0 54px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.25rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.32rem, 2vw, 1.8rem);
}

p {
  margin: 0;
}

.hero-lede,
.section-head p,
.split-section p,
.article-page .article-meta,
.article-page p,
.article-page li {
  color: var(--muted);
}

.hero-lede {
  max-width: 670px;
  margin-top: 1.1rem;
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 1.7rem 0 1.6rem;
}

.trend-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.trend-note div,
.tool-panel,
.result-panel,
.checklist-card,
.guide-card a,
.content-card,
.article-shell {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgb(255 253 248 / 0.88);
  box-shadow: var(--shadow);
}

.trend-note div {
  padding: 1rem;
}

.trend-note dt {
  font-weight: 900;
}

.trend-note dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.hero-art {
  position: relative;
  margin: 0;
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: 18px 18px var(--radius) var(--radius);
  background: linear-gradient(160deg, var(--white), #f5e5cf);
  box-shadow: 14px 14px 0 var(--sage-dark);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgb(33 49 45 / 0.34);
  pointer-events: none;
}

.hero-art figcaption {
  padding: 0.85rem 0.4rem 0.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.snail-strip {
  padding: 16px 0 40px;
}

.snail-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 1.2rem;
  align-items: center;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(120deg, #fffdf8, #ffe4b0 42%, #c7f4ed);
  box-shadow: 12px 12px 0 var(--rose);
}

.snail-copy h2 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
}

.snail-copy p:not(.eyebrow) {
  margin-top: 0.85rem;
  color: rgb(33 49 45 / 0.78);
  font-weight: 700;
}

.snail-card img {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
}

.section {
  padding: clamp(48px, 6vw, 82px) 0;
}

.compact-section {
  padding-bottom: 28px;
}

.section-head {
  max-width: 790px;
}

.section-head h2 + p,
.split-section h2 + p {
  margin-top: 0.9rem;
  font-size: 1.12rem;
}

.tool-section {
  padding: 24px 0;
}

.tool-section.alt {
  background: linear-gradient(180deg, transparent, rgb(120 152 121 / 0.14), transparent);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 1.25rem;
  align-items: stretch;
}

.tool-layout.reverse {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
}

.tool-layout.reverse .tool-panel {
  order: 2;
}

.tool-panel,
.result-panel,
.checklist-card {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.panel-title {
  margin-bottom: 1.2rem;
}

label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--ink);
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 7px;
  padding: 0.65rem 0.75rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

select:focus,
input:focus,
textarea:focus {
  outline: 3px solid rgb(189 141 58 / 0.35);
  border-color: var(--ink);
}

.result-panel {
  display: grid;
  align-content: start;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgb(181 95 99 / 0.08), transparent 45%),
    var(--white);
}

.result-header {
  margin-bottom: 1rem;
}

.idea-list,
.prompt-list,
.article-page ul,
.article-page ol {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.idea-list li,
.prompt-list li,
.article-page li {
  margin: 0.5rem 0;
}

.caution {
  margin-top: 1rem;
  padding: 0.85rem;
  border-left: 5px solid var(--red);
  background: rgb(181 95 99 / 0.1);
  color: var(--ink);
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.checklist-card {
  background: var(--white);
}

.checklist-card label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.checklist-card label:last-child {
  border-bottom: 0;
}

.checklist-card input {
  width: 20px;
  min-height: 20px;
  margin-top: 0.18rem;
  accent-color: var(--sage-dark);
}

.progress-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--red);
  font-weight: 900;
}

.progress-track {
  display: block;
  overflow: hidden;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 20px;
  background: var(--paper-deep);
}

#progressFill {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--sage-dark);
  transition: width 160ms ease;
}

.guide-preview {
  background: rgb(66 109 131 / 0.11);
}

.guide-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.guide-card a,
.content-card {
  display: grid;
  min-height: 230px;
  padding: 1.2rem;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.content-card a {
  display: grid;
  min-height: 100%;
  text-decoration: none;
}

.guide-card a:hover,
.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0 var(--gold);
}

.guide-card span,
.content-card span,
.content-card a span {
  color: var(--red);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.guide-card h3,
.content-card h3,
.content-card a h3 {
  margin-top: auto;
}

.guide-card p,
.content-card p,
.content-card a p {
  margin-top: 0.65rem;
  color: var(--muted);
}

.page-hero {
  padding: clamp(42px, 6vw, 76px) 0 32px;
}

.page-hero h1 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
}

.page-hero p {
  max-width: 760px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.18rem;
}

.article-shell {
  max-width: 830px;
  margin: 0 auto clamp(50px, 7vw, 86px);
  padding: clamp(1.2rem, 4vw, 2.5rem);
}

.article-page h2 {
  margin-top: 2rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.article-page h3 {
  margin-top: 1.35rem;
  font-size: 1.45rem;
}

.article-page p {
  margin-top: 1rem;
}

.article-meta {
  margin-bottom: 1.2rem;
  font-weight: 800;
}

.form-card {
  max-width: 760px;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.game-hero {
  padding-bottom: 18px;
}

.game-section {
  padding-top: 22px;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: 1.25rem;
  align-items: stretch;
}

.game-stage,
.game-panel {
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: rgb(255 253 248 / 0.9);
  box-shadow: var(--shadow);
}

.game-stage {
  overflow: hidden;
}

.game-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(120deg, #fff2a8, #ffb177, #9be7d7);
}

.game-hud div {
  display: grid;
  gap: 0.1rem;
  padding: 0.9rem 1rem;
  border-right: 2px solid rgb(33 49 45 / 0.28);
}

.game-hud div:last-child {
  border-right: 0;
}

.game-hud span {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-hud strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
}

#stampDash {
  display: block;
  width: 100%;
  aspect-ratio: 900 / 520;
  background: #ffb177;
}

.game-status {
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-panel {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.game-panel p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 700;
}

.game-actions,
.lane-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.lane-controls button {
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-deep);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.lane-controls button:hover {
  background: var(--white);
}

.site-footer {
  padding: 34px 0;
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.footer-brand {
  color: var(--white);
}

.site-footer p,
.site-footer nav a {
  color: rgb(255 253 248 / 0.76);
}

.site-footer .brand-mark {
  border-color: var(--white);
}

@media (max-width: 900px) {
  .topbar,
  .footer-grid,
  .hero-grid,
  .snail-card,
  .tool-layout,
  .tool-layout.reverse,
  .split-section,
  .game-shell,
  .guide-grid,
  .content-grid,
  .trend-note {
    grid-template-columns: 1fr;
  }

  .topbar,
  .footer-grid {
    align-items: flex-start;
  }

  .tool-layout.reverse .tool-panel {
    order: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    width: min(100% - 28px, 1130px);
  }

  .topbar {
    display: grid;
    min-height: auto;
    padding: 1rem 0;
  }

  nav {
    gap: 0.7rem;
  }

  nav a {
    font-size: 0.95rem;
  }

  h1 {
    font-size: clamp(2.6rem, 18vw, 4.25rem);
  }

  .hero-actions {
    display: grid;
  }

  .button,
  .nav-button {
    width: 100%;
  }

  .hero-art {
    box-shadow: 7px 7px 0 var(--sage-dark);
  }

  .game-hud div {
    padding: 0.75rem;
  }

  .game-actions {
    grid-template-columns: 1fr;
  }
}
