/* Recorder */
.app-recorder { --rec: #f43f5e; --rec-dim: rgba(244, 63, 94, .55); position: relative; background: var(--surface); }
[data-theme="light"] .app-recorder { --rec: #e11d48; --rec-dim: rgba(225, 29, 72, .45); }
.app-recorder [hidden] { display: none !important; }
.win .rec-tabs button.on .ic { color: #f43f5e; }
.app-recorder .rec-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: rec-blink 1.2s ease-in-out infinite; flex: 0 0 auto; }
.app-recorder .rec-dot.white { background: #fff; }

/* voice */
.app-recorder .rec-voice { flex: 1; min-height: 0; display: flex; }
.app-recorder .rec-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 14px 22px 22px; gap: 8px;
  background: radial-gradient(120% 70% at 50% 100%, rgba(244, 63, 94, .10), transparent 70%); }
.app-recorder.rec-live .rec-stage { background: radial-gradient(120% 70% at 50% 100%, rgba(244, 63, 94, .2), transparent 70%); }
.app-recorder .rec-stage-top { align-self: stretch; display: flex; align-items: center; gap: 6px; min-height: 30px; }
.app-recorder .rec-mic-ic { color: var(--text-3); display: grid; }
.app-recorder .rec-mic { height: 30px; font-size: 12.5px; max-width: 260px; background-color: var(--tile); box-shadow: none; }
.app-recorder .rec-wave-wrap { flex: 1; align-self: stretch; min-height: 90px; display: flex; }
.app-recorder .rec-wave { width: 100%; height: 100%; display: block; }
.app-recorder .rec-time { font-family: var(--font-display); font-weight: 200; font-size: 54px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.app-recorder .rec-state { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); min-height: 20px; text-align: center; }
.app-recorder .rec-err { color: #e5484d; display: inline-flex; align-items: flex-start; gap: 6px; max-width: 380px; }
.app-recorder .rec-ctrls { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 8px; }
.app-recorder .rec-ctrl-spacer { width: 40px; }
.app-recorder .rec-sm { background: var(--tile); }
.app-recorder .rec-big { width: 72px; height: 72px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: none; box-shadow: inset 0 0 0 4px var(--line-2); transition: transform .1s; }
.app-recorder .rec-big:active { transform: scale(.95); }
.app-recorder .rec-big i { width: 54px; height: 54px; border-radius: 50%; background: var(--rec); transition: all .22s var(--ease); box-shadow: 0 6px 18px -6px rgba(244, 63, 94, .7); }
.app-recorder .rec-big.on i { width: 28px; height: 28px; border-radius: 7px; }
.app-recorder .rec-big:hover i { filter: brightness(1.08); }

.app-recorder .rec-side { width: 290px; flex: 0 0 auto; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--sidebar); min-height: 0; }
.app-recorder .rec-list-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 16px; font-size: 13.5px; flex: 0 0 auto; }
.app-recorder .rec-list { flex: 1; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.app-recorder .rec-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: default; flex: 0 0 auto; }
.app-recorder .rec-item:hover { background: var(--hover); }
.app-recorder .rec-item.sel { background: var(--tile-hover); }
.app-recorder .rec-play { width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; flex: 0 0 auto; background: rgba(244, 63, 94, .14); color: var(--rec); }
.app-recorder .rec-item.playing .rec-play { background: var(--rec); color: #fff; }
.app-recorder .rec-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.app-recorder .rec-item-txt b, .app-recorder .rec-item-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-recorder .rec-item-txt span { font-size: 11.5px; }
.app-recorder .rec-more { width: 28px; height: 28px; opacity: .7; }
.app-recorder .rec-detail { margin: 0 4px 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.app-recorder .rec-detail-wave { width: 100%; height: 44px; display: block; }
.app-recorder .rec-detail-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-recorder .rec-detail-row .btn-sm { gap: 5px; padding: 0 8px; }
.app-recorder .rec-detail-t { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.app-recorder .rec-seek { flex: 1; --accent: var(--rec); background: linear-gradient(90deg, var(--rec) var(--p, 0%), var(--surface-3) var(--p, 0%)); }
.app-recorder .rec-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; font-size: 12.5px; }
.app-recorder .rec-empty b { color: var(--text); }

/* trim sheet */
.app-recorder .rec-sheet-layer { position: absolute; inset: 0; z-index: 30; background: rgba(0, 0, 0, .3); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px 16px; }
.app-recorder .rec-sheet { width: min(520px, 100%); padding: 16px; border-radius: 16px; background: var(--glass-strong); display: flex; flex-direction: column; gap: 10px; }
.app-recorder .rec-sheet h3 { margin: 0; font-size: 16px; }
.app-recorder .rec-sheet p { margin: 0; font-size: 12.5px; }
.app-recorder .rec-trim { position: relative; height: 90px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.app-recorder .rec-trim-wave { position: absolute; inset: 6px 0; width: 100%; height: calc(100% - 12px); opacity: .45; }
.app-recorder .rec-trim-sel { position: absolute; top: 0; bottom: 0; background: rgba(244, 63, 94, .16); border-left: 3px solid var(--rec); border-right: 3px solid var(--rec); pointer-events: none; }
.app-recorder .rec-trim-h { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; -webkit-appearance: none; appearance: none; background: none; pointer-events: none; }
.app-recorder .rec-trim-h::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 16px; height: 90px; border-radius: 4px; background: transparent; cursor: ew-resize; }
.app-recorder .rec-trim-h::-moz-range-thumb { pointer-events: auto; width: 16px; height: 90px; border: 0; background: transparent; cursor: ew-resize; }
.app-recorder .rec-trim-info { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.app-recorder .rec-sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* screen */
.app-recorder .rec-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.app-recorder .rec-sgrid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 18px; align-content: start; }
.app-recorder .rec-scard { padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.app-recorder .rec-hero { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #fb7185, #be123c); box-shadow: 0 10px 24px -12px rgba(190, 18, 60, .8); }
.app-recorder .rec-scard h2 { margin: 6px 0 0; font-size: 19px; }
.app-recorder .rec-scard p { margin: 0; font-size: 13px; }
.app-recorder .rec-opts { align-self: stretch; display: flex; flex-direction: column; margin: 6px 0; }
.app-recorder .rec-opt { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.app-recorder .rec-opt:last-child { border-bottom: 0; }
.app-recorder .rec-opt-txt { flex: 1; display: flex; flex-direction: column; font-size: 13px; }
.app-recorder .rec-opt-txt span { font-size: 11.5px; }
.app-recorder .rec-opt .switch input:checked + span { background: var(--rec); }
.app-recorder .rec-sgo { height: 40px; padding: 0 20px; border-radius: 20px; background: var(--rec); color: #fff; font-size: 14px; }
.app-recorder .rec-sgo:hover { background: var(--rec); }
.app-recorder .rec-err-box { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(229, 72, 77, .12); color: #e5484d; font-size: 12.5px; align-self: stretch; }
.app-recorder .rec-err-box .ic { margin-top: 1px; }
.app-recorder .rec-sside { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.app-recorder .rec-sside .rec-list-head { padding: 6px 4px; }
.app-recorder .rec-slist { display: flex; flex-direction: column; gap: 2px; }
.app-recorder .rec-result { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.app-recorder .rec-result-v { width: 100%; max-height: 220px; border-radius: 9px; background: #000; display: block; }
.app-recorder .rec-result-row { display: flex; align-items: center; gap: 4px; }
.app-recorder .rec-sstage { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 14px; gap: 12px; }
.app-recorder .rec-sv-wrap { flex: 1; min-height: 0; position: relative; border-radius: 12px; overflow: hidden; background: #000; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rec); }
.app-recorder .rec-sv { width: 100%; height: 100%; object-fit: contain; display: block; }
.app-recorder .rec-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 120px; font-weight: 300; color: #fff; background: rgba(0, 0, 0, .45); animation: rec-pop 1s ease infinite; }
.app-recorder .rec-sbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.app-recorder .rec-sbadge { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(244, 63, 94, .14); color: var(--rec); font-weight: 700; font-variant-numeric: tabular-nums; }

/* floating pill */
.rec-pill { position: absolute; top: 10px; right: 14px; z-index: 99980; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 20px; background: var(--glass-strong); animation: rec-drop .25s var(--ease); }
.rec-pill-main { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 0; background: none; border-radius: 16px; color: var(--text); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-pill-main:hover { background: var(--hover); }
.rec-pill .rec-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #f43f5e; animation: rec-blink 1.2s ease-in-out infinite; }
.rec-pill-stop { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #f43f5e; color: #fff; padding: 0; }
@keyframes rec-blink { 50% { opacity: .3; } }
@keyframes rec-pop { 0% { transform: scale(1.15); opacity: .4; } 30% { transform: scale(1); opacity: 1; } }
@keyframes rec-drop { from { opacity: 0; transform: translateY(-8px); } }
.reduce-motion .rec-dot, .reduce-motion .app-recorder .rec-count { animation: none; }

@media (max-width: 759px) {
  .app-recorder .rec-voice { flex-direction: column; }
  .app-recorder .rec-stage { flex: 0 0 auto; padding: 10px 14px 16px; }
  .app-recorder .rec-wave-wrap { flex: 0 0 110px; }
  .app-recorder .rec-time { font-size: 44px; }
  .app-recorder .rec-side { width: auto; flex: 1; border-left: 0; border-top: 1px solid var(--line); }
  .app-recorder .rec-sgrid { grid-template-columns: 1fr; padding: 12px; }
  .rec-pill { top: 40px; }
}
