/* Lecture recorder and tutor screens (features.js). */
.tabs { display: flex; gap: 2px; margin: .25rem var(--pad) .5rem; padding: 3px; border-radius: var(--r-md);
  background: var(--surface-2); }
.tabs button { flex: 1; min-height: 44px; padding: 0 .5em; border-radius: 11px; background: none;
  color: var(--text-2); font-size: .9375rem; font-weight: 500; position: relative; }
.tabs button:active:not(:disabled) { transform: none; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px #1f1e1d1f, 0 0 0 .5px #1f1e1d0f; }
@media (prefers-color-scheme: dark) { .tabs button[aria-selected="true"] { background: var(--surface-3); } }

.app[data-tab="lecture"] > :is(#log, #status, #confirm, footer),
.app[data-tab="tutor"] > :is(#log, #status, #confirm, footer) { display: none !important; }
.app:not([data-tab="lecture"]) #lecture-panel,
.app:not([data-tab="tutor"]) #tutor-panel { display: none; }

.panel { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: .5rem var(--pad) calc(1.25rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: .85rem; }
.panel h2 { font-size: .9375rem; font-weight: 600; margin: 1rem 0 -.25rem; color: var(--text); }
.panel select, .panel textarea { width: 100%; padding: .75em .95em; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background-color: var(--surface); color: var(--text); font: inherit; }
.panel textarea { resize: vertical; min-height: 5.5rem; line-height: 1.4; }
.panel label { display: flex; gap: .75rem; align-items: center; justify-content: space-between; min-height: 52px;
  padding: .35rem 1rem; background: var(--surface); color: var(--text); font-size: 1rem; cursor: pointer; }
.panel label input[type=checkbox] { order: 2; }
.panel label + label { margin-top: calc(-.85rem); border-top: 1px solid var(--line); }
.panel label:has(+ label) { border-radius: var(--r-md) var(--r-md) 0 0; }
.panel label + label { border-radius: 0 0 var(--r-md) var(--r-md); }
.panel > .status { padding: 0; text-align: left; font-size: .875rem; }
.panel > .status:empty { display: none; }
.reminder { margin: 0; padding: .8rem 1rem; border-radius: var(--r-md); background: var(--warn);
  border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: .875rem; line-height: 1.45; }
.elapsed { font-size: 3.5rem; font-weight: 300; letter-spacing: -.02em; text-align: center; margin: .5rem 0 0;
  font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.1; }
.record { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 56px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 1.0625rem; font-weight: 600;
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 85%, transparent); }
.record::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.record.recording { background: var(--bad); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--bad) 85%, transparent); }
.record.recording::before { border-radius: 3px; animation: rec-blink 1.4s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .35; } }
.jobs { display: grid; gap: .6rem; }
.jobs > .hint { margin: 0; padding: 1.25rem; text-align: center; border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-strong); font-size: .9375rem; }
.job { background: var(--surface); border-radius: var(--r-lg); padding: .9rem 1rem; display: grid; gap: .4rem;
  box-shadow: var(--shadow-1); }
.job-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.job-head strong { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-head span { flex: none; font-size: .75rem; font-weight: 600; padding: .25em .7em; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-ink); }
.job.failed .job-head span { background: var(--bad-soft); color: var(--bad-ink); }
.job.done .job-head span { background: var(--ok-soft); color: var(--ok); }
.job .hint { margin: 0; }
.job .error { margin: .1rem 0 0; }
.job progress { width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden;
  -webkit-appearance: none; appearance: none; background: var(--surface-2); }
.job progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.job progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .4s; }
.job progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.job a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-ink); font-weight: 600;
  text-decoration: none; justify-self: start; }
.job a::after { content: "\2197"; margin-left: .3em; }
.job > button { justify-self: start; background: var(--surface-2); border-radius: var(--r-pill); font-size: .9375rem; }
.candidate { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .4rem;
  border-top: 1px solid var(--line); font-size: .9375rem; }
.candidate button { flex: none; min-width: 72px; padding: 0 1em; border-radius: var(--r-pill); font-size: .875rem;
  font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.candidate button:disabled { opacity: 1; background: var(--surface-2); color: var(--muted); }

.row { display: flex; gap: .6rem; } .row button { flex: 1; }
#tutor-panel > .row button { min-height: 52px; background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: 0 .6em; white-space: nowrap; font-size: .9375rem; }
#tutor-panel > .row button::before { content: ""; width: 20px; height: 20px; background: var(--accent);
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
#tutor-panel > .row button:first-child { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v11H3z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/g%3E%3C/svg%3E"); }
#tutor-panel > .row button:last-child { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 16l5-5 4 4 3-3 6 6'/%3E%3C/g%3E%3C/svg%3E"); }
.preview { max-width: 100%; max-height: 40vh; object-fit: contain; border-radius: var(--r-md); align-self: center;
  box-shadow: var(--shadow-2); }
.thread { display: flex; flex-direction: column; gap: 1rem; }
.thread:empty { display: none; }
.send { min-height: 52px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-weight: 600; }
.math.display { overflow-x: auto; padding: .3rem 0; }
.msg .katex { font-size: 1.05em; }
