/* The owner tools (speak, clone, history, sign in): page-specific styles, loaded after style.css */

/* ---- hero: the record button on a soft warm gradient (speak, clone) ---- */
.card:has(> .record-area) {
  background: radial-gradient(ellipse 80% 120% at 50% 0, var(--accent-soft), var(--panel) 72%);
  padding-top: 28px;
  padding-bottom: 28px;
}
.card:has(> .record-area) .record-area { padding-top: 4px; }
.recbtn { box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent); }
.recbtn:disabled { box-shadow: none; }
.meter { background: var(--border); }
.meter.wide { background: var(--border-soft); }

/* ---- settings: a label over its chips, the groups spaced evenly ---- */
.card.row.settings, #settings .row, .options .row { align-items: flex-start; gap: 20px 32px; }
.card.row.settings { justify-content: flex-start; }
.field > span, .field > label { font-weight: 600; }
.segmented button { transition: background-color .15s ease, border-color .15s ease; }
/* "More options" is a quiet disclosure, not a card of equal weight; it becomes one only when opened. */
.card.options:not([open]) { background: transparent; border-color: transparent; box-shadow: none; }
.options summary { font-weight: 500; }
.options:not([open]) summary { padding: 0 8px; }
.options[open] summary { padding-bottom: 4px; }
.options .row { justify-content: flex-start; }

/* ---- the notes that sit in a card: tidy, never a bar ---- */
.card .note-slot { margin-top: 12px; }
.card.error { border-color: var(--danger); }

/* ---- the typed turn ---- */
textarea#typed { min-height: 88px; }
.typed-row { margin-top: 12px; }
.typed-row #say { flex: none; }
#say-hint { color: var(--muted); flex: 1 1 12em; }
/* The keyboard shortcut is only said on a device that has a keyboard. */
#say-hint.keys { display: none; }
@media (hover: hover) and (pointer: fine) { #say-hint.keys { display: block; } }
@media (max-width: 560px) { .typed-row #say { width: 100%; } }

/* ---- results and timings ---- */
#result .panes { gap: 16px; }
.pane { border-left-width: 3px; border-left-color: var(--border); }
.pane .tag { font-size: 14px; }
#result .player { margin-top: 18px; }
.meta-row { margin-top: 14px; }

/* ---- clone ---- */
.tips-list { list-style: none; margin: 12px 0 0; padding: 0; }
.tips-list li {
  position: relative; margin: 0 0 12px; padding-left: 38px; min-height: 28px; line-height: 1.55; color: var(--text);
}
.tips-list li:last-child { margin-bottom: 0; }
.tips-list li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft);
}
.tips-list li::after {
  content: ""; position: absolute; left: 5px; top: 6px; width: 16px; height: 16px; background-color: var(--accent-strong);
  -webkit-mask: center / 16px 16px no-repeat; mask: center / 16px 16px no-repeat;
}
/* moon (quiet room), microphone, clock (1-2 minutes), waveform (same delivery), check (until the bar is full) */
.tips-list li:nth-child(1)::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }
.tips-list li:nth-child(2)::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E"); }
.tips-list li:nth-child(3)::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.tips-list li:nth-child(4)::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h2M7 8v8M11 4v16M15 8v8M19 10v4M21 12h0'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h2M7 8v8M11 4v16M15 8v8M19 10v4M21 12h0'/%3E%3C/svg%3E"); }
.tips-list li:nth-child(5)::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

.tips-card + .script { margin-top: 18px; }
.card .script { background: var(--panel-2); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: inset 0 1px 3px color-mix(in srgb, var(--text) 8%, transparent); }
.card .script p { font-size: 19px; line-height: 1.75; margin-bottom: 16px; }
.card .script p:last-child { margin-bottom: 32px; } /* room for the fade below, so the last line is never under it */
/* A soft fade at the lower edge while there is more to scroll; it sits on the blank at the very end. */
.card .script::after { content: ""; display: block; position: sticky; bottom: 0; height: 32px; margin-top: -32px; background: linear-gradient(to bottom, transparent, var(--panel-2)); pointer-events: none; }

.take { background: var(--panel-2); }
.name-field { margin-top: 18px; }
.default-pick { margin-top: 12px; }
.default-pick label { display: flex; width: 100%; cursor: pointer; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; color: var(--text); }
.default-pick input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.create-row-clone { margin-top: 16px; }
#create-why { margin-top: 8px; text-align: right; }
#create-why:empty { display: none; }
.create-row-clone .btn-pair { align-items: center; }

#voices-card h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 22px; line-height: 1.3; }
#voices-list { display: flex; flex-direction: column; gap: 8px; }
.voice-row {
  flex-wrap: nowrap; min-height: 56px; padding: 6px 8px 6px 16px; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.voice-row > div { min-width: 0; overflow-wrap: anywhere; }
.voice-row .btn { flex: none; min-height: 44px; }
.badge {
  flex: none; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; margin-right: 8px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong);
  border: 1px solid var(--accent); font-size: 14px; font-weight: 600;
}
.voices-note { margin-top: 14px; }
#done .pane.ko { border-left-color: var(--ok); }

/* ---- history: each entry a card ---- */
.clip { transition: box-shadow .15s ease; }
.clip .clip-head { margin-bottom: 12px; }
.clip .clip-head .mono { color: var(--muted); }
.clip .panes { gap: 14px; }
.clip .pane.ko .body { font-size: 19px; line-height: 1.5; }
.clip .player { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.clip .player .btn { min-height: 44px; }
.clip .player .btn.quiet { padding: 0 12px; }
.clip .player .btn.quiet[data-act="delete"]:hover:not(:disabled) { color: var(--danger); }
.empty-state { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state h2 { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.3; }
.empty-state p { margin: 0 0 14px; color: var(--muted); font-size: 17px; line-height: 1.5; }
#filter { margin-top: 2px; }
.field > span:first-child:not([class]) { font-weight: 600; }
.card .field > span + .segmented { margin-top: 2px; }
.options.card > .details-body, details#details .details-body { padding-top: 0; }
details#details summary { font-weight: 500; }

/* ---- sign in ---- */
.login .card { padding: 28px; }
.login .form { grid-template-columns: 1fr; margin-bottom: 8px; }
.login .actions .btn { width: 100%; }
@media (max-width: 560px) { .login .card { padding: 22px; } }

/* ---- the "server isn't set up" chip reads as a note ---- */
.chip.warn { color: var(--text); }

@media (max-width: 560px) {
  .card:has(> .record-area) { padding-top: 22px; padding-bottom: 22px; }
  .voice-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .segmented button, .clip { transition: none; }
}
