:root {
  --paper: #F1EDE3;
  --paper-raised: #FBF9F3;
  --ink: #211F1A;
  --ink-soft: #58554B;
  --rule: #DAD3C2;
  --moss: #45604F;
  --moss-deep: #2E4136;
  --leather: #8B5E3C;
}

p { margin-bottom: 1rem; }

ul {
  list-style: none;
  padding-left: 0; 
  margin: 1rem 0;
}
li { padding-left: 0; }
li li { padding-left: 1.5rem; }
li li li { padding-left: 1.5rem; }

h4 {
  margin: 1.5rem 0 1rem;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
  width: 100%;
  max-width: 720px;
  padding: 2.5rem 1.5rem 1.25rem;
  background: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;   /* smaller side padding */
}

nav a:hover {
  color: #ccc;
}

nav a.active {
  border-bottom: 2px solid white;
}

.intro h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 2.1rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
  color: var(--moss-deep);
}

.intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 46ch;
  line-height: 1.5;
}

.intro ul {
  margin: 0.35rem 0 1.2rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 46ch;
}

.intro li {
  margin-bottom: 0.15rem;
}

main {
  width: 100%;
  max-width: 720px;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
  overflow: hidden;
}

main.page-scroll {
  overflow: visible;
  flex: none;          /* was: flex: 1 — stop capping its height */
}

#thread {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0 1rem;
}

.turn {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.turn:first-child { padding-top: 0; }

.turn .role {
  font-size: 0.78rem;
  color: var(--leather);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.turn .body {
  line-height: 1.6;
  font-size: 1rem;
  white-space: pre-wrap;
}

.turn .body ul,
.turn .body ol,
.turn .body li {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

.turn.user .body {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink);
}

.meta {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.tag {
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  color: var(--leather);
}

.thinking {
  color: var(--ink-soft);
  font-style: italic;
}

.error .body { color: #9C3B2E; }

form {
  width: 100%;
  max-width: 720px;
  padding: 1rem 1.5rem 2rem;
  display: flex;
  gap: 0.6rem;
}

textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.4;
  height: 3.1rem;
}

textarea:focus {
  outline: none;
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(69, 96, 79, 0.15);
}

button {
  border: none;
  background: var(--moss-deep);
  color: var(--paper-raised);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover { background: var(--moss); }
button:disabled { background: var(--rule); color: var(--ink-soft); cursor: default; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }

.shop-wrap {
  display: flex;
  flex-direction: column;
  max-width: 1000px;      /* narrower than full width */
  width: 100%;
  margin: 0 auto;
  height: 80vh;           /* or max-height: 80vh */
  overflow-y: auto;       /* makes the box scrollable */
  overflow-x: hidden;
  gap: 2rem;
  -webkit-overflow-scrolling: touch;
}

.shop-wrap iframe {
  max-width: 100% !important;
  width: 100% !important;
}

.shop-wrap > * {
  flex-shrink: 0;
}

stripe-buy-button {
  margin-bottom: 1rem;
}


