/* Echoic public pages. Colors and type follow the app (specification.md §8). */

:root {
  --accent: #d81b44;
  --accent-deep: #9f1239;
  --accent-soft: #fff1f2;
  --ground: #f6f5f4;
  --surface: #ffffff;
  --ink: #18181b;
  --ink-soft: #52525b;
  --muted: #66666e;
  --border: #e7e5e4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #fb7185;
    --accent-deep: #fda4af;
    --accent-soft: #3f1d24;
    --ground: #121214;
    --surface: #1c1c1f;
    --ink: #f4f4f5;
    --ink-soft: #d4d4d8;
    --muted: #a1a1aa;
    --border: #2e2e33;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

a {
  color: var(--accent-deep);
}

.site-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 32px;
}

h1 {
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 4px;
}

.updated {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}

h2 {
  font-size: 17px;
  margin: 32px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 4px;
}

.lead {
  color: var(--ink-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

th {
  width: 34%;
  font-weight: 700;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .doc {
    padding: 22px 16px 26px;
  }
  table,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }
  th {
    padding-bottom: 0;
  }
  td {
    border-top: 0;
    padding-top: 4px;
  }
}

.note {
  font-size: 14px;
  color: var(--muted);
}

.hero {
  padding: 40px 0 8px;
}

.hero h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 34px;
  font-weight: 600;
}

.links {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
}

.links a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--muted);
}

details {
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* licenses-oss.html (generated by scripts/licenses.mjs) */
main.doc {
  margin: 24px auto 48px;
  max-width: 760px;
}

@media (max-width: 792px) {
  main.doc {
    margin: 16px 16px 40px;
  }
}

.back {
  font-size: 14px;
}

.oss {
  list-style: none;
  padding: 0;
}

.oss li + li {
  margin-top: 0;
}

.pkg {
  font-weight: 700;
}

.ver,
.lic {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- landing page (index.html) */

.lp {
  font-size: 16px;
}

.lp-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.lp-nav nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
}

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

.lp main {
  max-width: 1080px;
  padding: 0 16px;
}

.lp-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 32px 0 64px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.lp-hero h1 {
  font-size: 44px;
  line-height: 1.35;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

.lp .lead {
  font-size: 17px;
  color: var(--ink-soft);
}

.center {
  text-align: center;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  margin: 12px 0 0;
  padding: 10px 22px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--ground);
  line-height: 1.3;
}

.store-small {
  font-size: 11px;
  opacity: 0.8;
}

.store-big {
  font-size: 17px;
  font-weight: 700;
}

/* The script card, drawn like the app. */
.mock {
  margin: 0;
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 18px 14px 14px;
  box-shadow: 0 24px 60px rgba(24, 24, 27, 0.12);
  max-width: 400px;
  justify-self: center;
  width: 100%;
}

.mock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 18px 8px;
}

.mock-title {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 14px;
}

.mock-scene {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 8px;
}

.mock-scene-next {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mock-line {
  margin-bottom: 10px;
}

.mock-speaker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
}

.sp-a {
  color: var(--accent);
}

.sp-b {
  color: var(--ink-soft);
}

.mock-text {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}

.mock-text .w {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
}

.mock-text .x {
  text-decoration: underline dotted #a1a1aa;
  text-underline-offset: 4px;
}

.mock-text .warn {
  color: #c2410c;
  font-size: 14px;
  margin-left: 2px;
}

.mock-tr {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 2px 0 0;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 6px 4px;
}

.mock-streak {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mock-streak b {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 26px;
}

.mock-button {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  border-radius: 16px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
}

.lp-section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.lp-section h2 {
  font-size: 28px;
  text-align: center;
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.steps li,
.features article {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 20px;
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
}

.steps h3,
.features h3 {
  font-size: 17px;
  margin: 12px 0 6px;
}

.features h3 {
  margin-top: 0;
}

.steps p,
.features p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.plan-table {
  max-width: 640px;
  margin: 0 auto 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 20px;
}

.plan-table table {
  display: table;
}

.plan-table tr {
  display: table-row;
}

.plan-table th,
.plan-table td {
  display: table-cell;
  width: auto;
  padding: 12px 6px;
  border-top: 1px solid var(--border);
}

.plan-table thead th {
  border-top: 0;
  font-size: 14px;
  color: var(--ink);
}

.plan-table td {
  text-align: center;
  white-space: nowrap;
}

.plan-table thead th:not(:first-child) {
  text-align: center;
}

.plan-table .pro {
  color: var(--accent);
}

.plan-table tbody th {
  font-weight: 400;
  color: var(--ink-soft);
}

.faq {
  max-width: 720px;
  margin: 0 auto 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 20px;
}

.faq details:first-child {
  border-top: 0;
}

.faq summary {
  padding: 8px 0;
  min-height: 44px;
}

.faq p {
  color: var(--ink-soft);
  font-size: 15px;
}

.lp-footer {
  max-width: 1080px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

@media (max-width: 860px) {
  .lp-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 8px;
  }
  .lp-hero h1 {
    font-size: 34px;
  }
  .steps,
  .features {
    grid-template-columns: 1fr;
  }
  .lp-nav nav {
    display: none;
  }
  .lp-section h2 {
    font-size: 24px;
  }
}

@media (max-width: 400px) {
  .plan-table {
    padding: 4px 12px;
  }
  .plan-table th,
  .plan-table td {
    font-size: 14px;
    padding: 10px 4px;
  }
}

.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.name-word {
  min-width: 0;
}

.name-term {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
  color: var(--accent);
}

.name-ja {
  margin: 2px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.name-word p:last-child {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

.row-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: normal;
}

@media (max-width: 860px) {
  .name-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- contact form (support.html) */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 16px 0 20px;
}

.contact label {
  font-weight: 700;
  font-size: 15px;
  margin-top: 10px;
}

.contact .optional {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

.contact input,
.contact select,
.contact textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* keeps iOS Safari from zooming in */
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 44px;
}

.contact textarea {
  resize: vertical;
  line-height: 1.7;
}

.contact input:focus,
.contact select:focus,
.contact textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.contact .field-note {
  margin: 0;
}

.contact .cf-turnstile {
  margin-top: 14px;
  min-height: 65px;
}

.contact button {
  margin-top: 8px;
  justify-self: start;
  min-height: 48px;
  padding: 12px 32px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact button:disabled {
  opacity: 0.6;
  cursor: default;
}

.contact-status {
  margin: 4px 0 0;
  font-size: 15px;
  min-height: 1.85em;
}

.contact-status[data-kind='error'] {
  color: var(--accent-deep);
}

.contact-status[data-kind='done'] {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 560px) {
  .contact button {
    justify-self: stretch;
  }
}
