.sp-module {
  --sp-navy: var(--navy, #263e50);
  --sp-line: var(--line, #dedbd2);
  --sp-wine: var(--wine, #9e423d);
  --sp-ink: var(--ink, #302f2c);
  color: var(--sp-ink);
  width: 100%;
}
.sp-module h1, .sp-module h2, .sp-module h3, .sp-module p { margin: 0; }
.sp-module button, .sp-module select, .sp-module textarea { font: inherit; }
.sp-module button { cursor: pointer; }
.sp-module button:disabled { cursor: default; opacity: .62; }
.sp-module :is(button, select, textarea, summary):focus-visible { outline: 3px solid #839ba8; outline-offset: 3px; }
.sp-module svg { flex: none; width: 18px; height: 18px; }
.sp-head h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.04em; line-height: 1.35; font-weight: 650; }
.sp-head p { color: #66675f; margin-top: 9px; line-height: 1.7; font-size: 1rem; }
.sp-tools, .sp-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sp-tools { margin: 25px 0 18px; flex-wrap: wrap; }
.sp-modes, .sp-switch { display: inline-flex; padding: 3px; background: #eae9e2; border-radius: 7px; gap: 2px; }
.sp-modes button, .sp-switch button { background: transparent; color: #60625c; border: 0; border-radius: 5px; padding: 8px 16px; min-height: 38px; line-height: 1.3; font-size: .92rem; }
.sp-modes button[aria-pressed="true"], .sp-switch button[aria-pressed="true"] { background: #fffefa; color: var(--sp-navy); box-shadow: 0 1px 3px #27312f24; }
.sp-select { display: inline-flex; gap: 10px; align-items: center; color: #62645e; font-size: .9rem; }
.sp-select select { appearance: none; color: var(--sp-ink); font-size: .92rem; padding: 9px 35px 9px 12px; border: 1px solid var(--sp-line); border-radius: 5px; background: #fffefa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%234e5650' stroke-width='1.5' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 11px center; }
.sp-panel, .sp-history { background: #fffefa; border: 1px solid var(--sp-line); border-radius: 12px; overflow: hidden; }
.sp-question { background: #edf1ef; padding: clamp(21px, 3vw, 38px); color: var(--sp-navy); border-bottom: 1px solid var(--sp-line); }
.sp-question-meta { color: #536a70; font-size: .9rem; }
.sp-question-meta > span:last-child { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.sp-context, .sp-feedback b, .sp-record, .sp-button, .sp-switch button { display: inline-flex; align-items: center; gap: 8px; }
.sp-context { font-weight: 600; }
.sp-context svg { width: 22px; height: 22px; }
.sp-speaker { margin-top: 28px; font-size: .88rem; color: #576c70; }
.sp-prompt { display: flex; align-items: center; gap: 18px; margin: 8px 0 18px; }
.sp-prompt p { font: normal 500 clamp(1.7rem, 3.2vw, 2.55rem)/1.32 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.sp-icon { background: transparent; flex: none; border: 1px solid #afc0bd; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--sp-navy); padding: 0; }
.sp-icon:hover { background: #fff8; }
.sp-task { font-size: .94rem; color: #556562; line-height: 1.7; }
.sp-task span { color: #354850; margin-left: 7px; }
.sp-answer { padding: clamp(20px, 3vw, 36px); }
.sp-answer-title { margin-bottom: 16px; }
.sp-answer-title h3 { font-size: 1.08rem; font-weight: 650; }
.sp-switch button { min-height: 32px; padding: 5px 10px; font-size: .89rem; }
.sp-switch svg { width: 16px; height: 16px; }
.sp-answer textarea { display: block; box-sizing: border-box; width: 100%; min-height: 106px; padding: 13px 15px; border: 1px solid #c9cac1; border-radius: 7px; background: #fcfcf8; color: #2f3939; font-size: 1.05rem; line-height: 1.65; resize: vertical; }
.sp-answer textarea::placeholder { color: #858880; }
.sp-actions { display: flex; margin-top: 16px; }
.sp-actions:empty { display: none; }
.sp-button { border: 1px solid var(--sp-navy); background: var(--sp-navy); color: #fffefa; border-radius: 6px; min-height: 42px; padding: 9px 20px; font-weight: 550; font-size: .95rem; }
.sp-button:hover { background: #192e3e; }
.sp-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; border: 1px dashed #b3bab3; border-radius: 8px; padding: 17px; min-height: 87px; background: #f7f8f3; }
.sp-voice small { line-height: 1.65; font-size: .9rem; color: #656962; }
.sp-voice audio { max-width: 100%; height: 39px; }
.sp-record { min-height: 40px; background: #fffefa; color: var(--sp-navy); border: 1px solid #a4aca6; padding: 8px 14px; border-radius: 5px; }
.sp-record.is-on { color: #8b332e; border-color: #bb706a; background: #fff2ed; }
.sp-transcript { width: 100%; border-top: 1px solid var(--sp-line); padding-top: 12px; }
.sp-transcript span, .sp-model span { font-size: .87rem; color: #5e665e; }
.sp-transcript p { margin-top: 4px; font-size: 1.1rem; }
.sp-status { line-height: 1.7; font-size: .92rem; color: #58625d; }
.sp-status:not(:empty) { margin-top: 12px; }
.sp-feedback { border-radius: 6px; padding: 14px 17px; margin-top: 15px; background: #faf0ec; border-left: 3px solid #ae5d4e; line-height: 1.65; font-size: .97rem; }
.sp-feedback b { color: #8d453a; }
.sp-feedback ul { margin: 9px 0; padding: 0; list-style: none; }
.sp-feedback li { margin: 5px 0; }
.sp-error-tag { display: inline-block; padding: 0 5px; margin-right: 6px; color: #874238; border: 1px solid #d9afa5; border-radius: 3px; font-size: .86rem; }
.sp-model { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.sp-feedback .sp-model strong { font-size: 1.08rem; }
.sp-feedback .sp-pron { margin-top: 8px; color: #626761; font-size: .91rem; }
.sp-success { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #edf4e9; border-color: #759168; }
.sp-success b { color: #476240; }
.sp-neutral { background: #f3f2eb; border-color: #a6a08d; }
.sp-neutral b { color: #655f4c; }
.sp-end { text-align: center; padding: 45px 18px; }
.sp-end h2 { margin-top: 14px; font-size: 1.55rem; }
.sp-end p { color: #63665e; margin: 7px 0 21px; line-height: 1.6; }
.sp-done-icon { width: 44px; height: 44px; display: inline-grid; place-items: center; color: #506c49; background: #e9efdf; border-radius: 50%; }
.sp-done-icon svg { width: 23px; height: 23px; }
.sp-history { margin-top: 18px; padding: 14px 18px; font-size: .94rem; }
.sp-history summary { cursor: pointer; color: var(--sp-navy); }
.sp-history > div { margin-top: 13px; border-top: 1px solid var(--sp-line); padding-top: 12px; }
.sp-history p { line-height: 1.6; }
.sp-history p+p { color: #62695e; padding-left: 12px; }
@media(max-width: 600px) {
  .sp-tools { gap: 11px; }
  .sp-prompt { gap: 10px; }
  .sp-question, .sp-answer { padding: 18px; }
  .sp-voice small { width: 100%; }
  .sp-select { gap: 7px; }
  .sp-row { gap: 8px; }
}
