* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  background: #f5f6f8;
}
a { color: #4338ca; }

.nav { display: flex; justify-content: space-between; align-items: center; max-width: 960px; margin: 0 auto; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: #111827; text-decoration: none; }
.brand img { border-radius: 7px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; }
.hero { text-align: center; margin: 8px 0 22px; }
.hero h1 { font-size: 34px; margin: 0 0 6px; letter-spacing: -.01em; }
.hero p { margin: 0; color: #4b5563; font-size: 17px; }

/* editor card */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; }
.card textarea {
  width: 100%; min-height: 230px; resize: vertical;
  font: 17px/1.55 inherit; font-family: inherit;
  border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px;
  outline: none; color: #111827; background: #fcfcfd;
}
.card textarea:focus { border-color: #a5b4fc; background: #fff; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 2px 0; font-size: 14px; color: #6b7280; flex-wrap: wrap; }
.linkbtn { background: none; border: none; padding: 0; font: inherit; color: #4338ca; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

.controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px 22px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eef0f3; }
.ctl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #6b7280; }
.ctl span b { color: #111827; font-weight: 600; }
.ctl input[type=range] { width: 100%; accent-color: #4f46e5; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; cursor: pointer; user-select: none; }
.toggle input { width: 16px; height: 16px; accent-color: #4f46e5; }
.start {
  grid-column: 1 / -1;
  font: inherit; font-size: 17px; font-weight: 600;
  padding: 13px 18px; border-radius: 12px; border: none; cursor: pointer;
  background: #4f46e5; color: #fff;
}
.start:hover { background: #4338ca; }
.start:disabled { background: #c7c9d9; cursor: not-allowed; }
.hint { margin: 10px 0 0; text-align: center; font-size: 13px; color: #9ca3af; }

@media (max-width: 560px) {
  .hero h1 { font-size: 28px; }
  .controls { grid-template-columns: 1fr; }
}

/* prompter overlay */
.prompter { position: fixed; inset: 0; background: #000; color: #fff; z-index: 50; display: none; }
.prompter.on { display: block; }
.viewport { position: absolute; inset: 0; overflow: hidden; cursor: pointer; }
.track { position: absolute; left: 0; right: 0; top: 0; padding: 0 8vw; will-change: transform; }
.track p { margin: 0 auto 0.9em; max-width: 1100px; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompter.mirror .track { transform-origin: center; }
.guide { position: absolute; left: 0; right: 0; top: 33%; height: 0; border-top: 2px solid rgba(99, 102, 241, .55); pointer-events: none; }
.guide::before { content: ""; position: absolute; left: 10px; top: -9px; border: 8px solid transparent; border-left: 12px solid #6366f1; }
.fade-top, .fade-bottom { position: absolute; left: 0; right: 0; height: 18%; pointer-events: none; }
.fade-top { top: 0; background: linear-gradient(#000, rgba(0,0,0,0)); }
.fade-bottom { bottom: 0; background: linear-gradient(rgba(0,0,0,0), #000); }
.count { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: 22vmin; font-weight: 700; color: #a5b4fc; pointer-events: none; }
.count.on { display: flex; }

.bar {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 8px;
  background: rgba(24, 24, 27, .92); border: 1px solid #3f3f46; border-radius: 14px;
  transition: opacity .25s;
}
.prompter.idle .bar { opacity: 0; }
.bar button {
  font: inherit; font-size: 14px; font-weight: 600; color: #f4f4f5;
  background: #27272a; border: 1px solid #3f3f46; border-radius: 9px;
  min-width: 38px; height: 36px; padding: 0 10px; cursor: pointer;
}
.bar button:hover { background: #3f3f46; }
.bar button.primary { background: #4f46e5; border-color: #4f46e5; min-width: 78px; }
.bar .val { font-size: 13px; color: #a1a1aa; min-width: 44px; text-align: center; }
.bar .sep { width: 1px; height: 22px; background: #3f3f46; margin: 0 4px; }
.progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #18181b; }
.progress div { height: 100%; width: 0; background: #6366f1; }
.left { position: absolute; right: 16px; top: 12px; font-size: 13px; color: #a1a1aa; }
@media (max-width: 560px) { .bar { gap: 4px; padding: 6px; } .bar .val { display: none; } }

/* content */
.section { margin-top: 48px; }
.section h2 { font-size: 22px; margin: 0 0 12px; }
.steps { margin: 0; padding-left: 22px; color: #374151; }
.steps li { margin-bottom: 8px; }
.faq details { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; color: #374151; }
kbd { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: #eef0f3; border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; }
footer { margin: 48px 0 0; text-align: center; color: #9ca3af; font-size: 13px; }
footer a { color: #9ca3af; margin: 0 8px; }

/* legal pages */
.doc { max-width: 720px; margin: 0 auto; padding: 8px 20px 48px; }
.doc h1 { font-size: 28px; margin: 8px 0 4px; }
.doc .muted { color: #6b7280; font-size: 14px; margin: 0 0 24px; }
.doc h2 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { color: #374151; }
