:root {
  color-scheme: dark;
  --page: #09090b;
  --panel: #121215;
  --panel-2: #18181c;
  --line: #2a2a30;
  --text: #f4f4f5;
  --muted: #92929c;
  --accent: #96250B;
  --accent-ink: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
}

button,
textarea,
select,
input {
  font: inherit;
}

button,
select,
input[type="range"] {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: default;
  opacity: 0.38;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header {
  width: min(920px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-logo {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: cover;
}

.model-state {
  color: var(--muted);
  font-size: 0.72rem;
}

.model-state.is-ready {
  color: #c96852;
}

main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 38px;
}

.composer {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 22%);
}

textarea {
  display: block;
  width: 100%;
  min-height: 370px;
  resize: none;
  padding: 24px;
  color: var(--text);
  caret-color: var(--accent);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
  line-height: 1.65;
}

textarea::placeholder {
  color: #62626b;
}

textarea:disabled {
  opacity: 0.68;
}

.composer-bar {
  min-height: 68px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.language-field {
  display: flex;
  height: 42px;
  align-items: center;
  padding: 0 4px 0 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  flex: 0 0 auto;
}

.language-field:focus-within {
  background: #1d1d22;
}

select {
  min-width: 108px;
  height: 40px;
  padding: 0 28px 0 0;
  color: #d7d7dc;
  background: transparent;
  border: 0;
  outline: 0;
  color-scheme: dark;
  font-size: 0.78rem;
}

select option {
  color: var(--text);
  background: var(--panel-2);
}

.player {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  background: transparent;
}

.player-bar {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-timeline {
  min-width: 0;
  flex: 1;
}

.seek-wrap {
  --played: 0%;
  --buffered: 0%;
  position: relative;
  width: 100%;
  height: 16px;
}

.seek-visual {
  position: absolute;
  top: 6px;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--played),
    #59342d var(--played) var(--buffered),
    #2b2b30 var(--buffered) 100%
  );
  border-radius: 999px;
}

.seek-visual::after {
  position: absolute;
  top: 50%;
  left: var(--played);
  width: 12px;
  height: 12px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 16px;
  margin: 0;
  appearance: none;
  background: transparent;
  touch-action: pan-y;
}

.seek::-webkit-slider-runnable-track {
  height: 16px;
  background: transparent;
}

.seek::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  background: transparent;
  border: 0;
}

.seek::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: transparent;
  border: 0;
}

.seek::-moz-range-track {
  height: 16px;
  background: transparent;
  border: 0;
}

.time-line {
  min-height: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b8b94;
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
}

.play-button {
  display: grid;
  place-items: center;
  color: #d8d8dc;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.play-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: var(--accent-ink);
  background: var(--accent);
}

.play-button svg {
  width: 21px;
  height: 21px;
  fill: currentcolor;
}

.shortcuts {
  margin: 14px 0 0;
  color: #64646d;
  text-align: center;
  font-size: 0.67rem;
}

kbd {
  color: #909099;
  font: inherit;
}

footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 34px;
  color: #55555d;
  text-align: center;
  font-size: 0.66rem;
}

footer a {
  color: #74747d;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 9px 13px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 14px 40px rgb(0 0 0 / 35%);
  font-size: 0.72rem;
  transform: translateX(-50%);
}

@media (max-width: 620px) {
  .header {
    height: 62px;
  }

  main {
    padding-top: 14px;
  }

  textarea {
    min-height: 310px;
    padding: 19px;
  }

  .composer-bar {
    gap: 12px;
    padding-inline: 12px;
  }

  .shortcuts {
    line-height: 1.8;
  }
}
