html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
  color: var(--lg-ink);
}

html:not(.lg-ground),
html:not(.lg-ground) body {
  background: var(--lg-ground, #070a12);
}

#app,
.app-root {
  position: relative;
  z-index: 1;
}

.app-root {
  --tap: 44px;
  --app-bg: #14161a;
  --app-stage: #0b0c0e;
  --app-panel: #1e2126;
  --app-btn: #2a2e35;
  --app-line: #343941;
  --app-hover: #31353d;
  --app-pressed: #3a3f48;
  --app-text: #e6e8eb;
  --app-muted: #9aa3ad;
  --app-ink: #f2f3f5;
  --app-ink-text: #14161a;
  --app-accent: #f2f3f5;
  --app-focus: #f2f3f5;
  --app-warning: #f5b301;
  --app-danger: #ff6b6b;
  --app-success: #5fcf8a;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --r-xs: 2px;
  --r-sm: 6px;
  --r-img: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --h-answer: 56px;
  --h-btn: 52px;
  --h-small: 44px;
  --w-panel: clamp(340px, 31vw, 400px);
  --gap-p: 12px;
  --chip-h: clamp(40px, 5.4dvh, 52px);
  --ans-h: clamp(44px, 6.5dvh, 56px);
  --prim-h: 60px;
  --esc-h: 48px;
  --pad: 16px;
  --sep: rgba(255, 255, 255, 0.22);
  --row-sel: rgba(255, 255, 255, 0.17);
  --warn-fill: rgba(255, 209, 102, 0.14);
  --warn-line: rgba(255, 209, 102, 0.38);
  --danger-fill: rgba(255, 154, 146, 0.13);
  --danger-line: rgba(255, 154, 146, 0.4);
  --font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 100dvh;
  box-sizing: border-box;
  background: transparent;
  color: var(--lg-ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

.app-root *,
.app-root *::before,
.app-root *::after {
  box-sizing: border-box;
}

.app-root [hidden],
.app-hidden {
  display: none !important;
}

:where(.app-root) :where(button, input, textarea) {
  font: inherit;
  color: inherit;
}

:where(.app-root) :where(button) {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

:where(.app-root) :where(button:disabled) {
  cursor: default;
}

.app-root :focus-visible {
  outline: 2px solid var(--lg-ink);
  outline-offset: 2px;
}

:where(.app-root) :where(a) {
  color: inherit;
}

.eus-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.app-num {
  font-variant-numeric: tabular-nums;
}

.app-mono {
  font-family: var(--mono);
}

.app-muted {
  color: var(--lg-muted);
}

.app-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.app-h2 {
  margin: 0 0 2px;
  padding: 0 4px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-lead {
  margin: 0;
  color: var(--lg-muted);
  text-wrap: pretty;
}

.app-label {
  font-size: 15px;
  font-weight: 600;
}

.app-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--lg-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-btn,
.app-btn--primary,
.app-second,
.app-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: var(--lg-fill);
  color: var(--lg-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms, transform 100ms, opacity 150ms;
}

.app-btn--primary,
.app-primary {
  min-height: 60px;
  padding: 0 26px;
  border-radius: 30px;
  background: var(--lg-tint);
  color: var(--lg-tint-text);
  font-size: 19px;
  font-weight: 700;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 10px 26px rgba(255, 255, 255, 0.12);
}

.app-btn--primary {
  min-height: 48px;
  border-radius: 24px;
  font-size: 15px;
}

.app-primary--big {
  min-height: 60px;
}

.app-second--small {
  min-height: var(--tap);
  border-radius: 22px;
  padding: 0 16px;
}

.app-btn--quiet {
  background: none;
  min-height: var(--tap);
}

.app-btn:active:not(:disabled),
.app-second:active:not(:disabled),
.app-primary:active:not(:disabled),
.app-btn--primary:active:not(:disabled),
.app-answer:active,
.app-choice:active,
.app-escape:active,
.app-topbtn:active:not(:disabled),
.app-fbtn:active:not(:disabled),
.app-ovbtn:active:not(:disabled),
.app-vrow:active {
  transform: scale(0.97);
}

.app-btn:disabled,
.app-btn--primary:disabled,
.app-primary:disabled,
.app-second:disabled {
  opacity: 0.4;
  box-shadow: none;
}

@media (hover: hover) {
  .app-btn:hover:not(:disabled),
  .app-second:hover:not(:disabled),
  .app-answer:hover:not([aria-pressed="true"]),
  .app-choice:hover:not([aria-pressed="true"]),
  .app-fbtn:not(.app-fbtn--play):hover:not(:disabled),
  .app-topbtn:hover:not(:disabled),
  .app-escape:hover,
  .app-trail-row:is(button):hover,
  .app-row-delete:hover,
  .app-back:hover,
  .app-toast-action:hover {
    background-color: var(--lg-fill-hover);
  }

  .app-btn--primary:hover:not(:disabled),
  .app-primary:hover:not(:disabled) {
    background-color: #fff;
  }
}

.app-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px var(--lg-line);
  color: var(--lg-ink);
  font-size: 16px;
  transition: box-shadow 150ms, background-color 150ms;
}

.app-input:focus {
  outline: none;
}

.app-root .app-input:focus-visible,
.app-input:focus {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 0 2px var(--lg-ink);
}

.app-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--lg-fill);
  font-size: 15px;
}

.app-banner--error {
  background: var(--danger-fill);
  box-shadow: inset 0 0 0 1px var(--danger-line);
}

.app-banner--error > .eus-icon {
  color: var(--lg-danger);
}

/* login */

.app-root[data-screen="login"],
.app-root[data-screen="boot"] {
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.app-login {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 28px;
  --lg-r: var(--lg-r-panel);
  border-radius: var(--lg-r);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-demo {
  max-width: 440px;
}

.app-demo .app-login-error:empty {
  display: none;
}

.app-demo-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 84px;
  padding: 16px 20px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: var(--lg-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.app-demo-choice:hover {
  background: rgba(255, 255, 255, 0.17);
}

.app-demo-choice:active {
  transform: scale(0.985);
}

.app-demo-choice:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.app-demo-choice-title {
  font-size: 20px;
  font-weight: 700;
}

.app-demo-choice-hint {
  font-size: 15px;
  line-height: 1.35;
  color: var(--lg-ink-2, rgba(255, 255, 255, 0.72));
}

.app-demo-note {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--lg-ink-2, rgba(255, 255, 255, 0.72));
}

.app-login .app-title {
  font-size: 26px;
}

.app-login .app-lead {
  margin-top: -6px;
  font-size: 15px;
}

.app-login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.app-login-form .app-label:not(:first-child) {
  margin-top: 6px;
}

.app-login-form .app-primary,
.app-login > .app-primary {
  width: 100%;
}

.app-login-error {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 24px;
  margin: 2px 0;
  font-size: 14px;
  color: var(--lg-danger);
}

.app-login-error .eus-icon {
  width: 18px;
  height: 18px;
}

.app-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  overflow-y: auto;
}

.app-login-overlay .app-login {
  --lg-r: var(--lg-r-card);
  background: rgba(22, 26, 35, 0.84);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  backdrop-filter: blur(30px) saturate(120%);
}

/* dialog */

.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--s-3);
  background: rgba(0, 0, 0, 0.45);
}

.app-dialog {
  width: min(480px, 100%);
  padding: 24px;
  --lg-r: var(--lg-r-card);
  border-radius: var(--lg-r);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-dialog.lg-glass-css {
  background: rgba(22, 26, 35, 0.84);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  backdrop-filter: blur(30px) saturate(120%);
}

.app-dialog p {
  margin: 0;
}

.app-dialog-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* video list */

.app-videos {
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}

.app-videos-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-lhead {
  --lg-r: var(--lg-r-cap);
  border-radius: var(--lg-r);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-height: 52px;
  padding: 4px 4px 4px 20px;
}

.app-lhead .app-title {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  line-height: 44px;
}

.app-lhead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.app-lhead .app-second {
  background: none;
  padding: 0 14px;
}

.app-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-vrow {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
  border-radius: 20px;
  background: var(--lg-fill);
  text-decoration: none;
  transition: background-color 150ms, transform 100ms;
}

@media (hover: hover) {
  .app-vrow:hover {
    background: var(--lg-fill-hover);
  }
}

.app-vrow:active {
  background: var(--lg-fill-press);
}

.app-vrow-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-vrow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.app-vrow-head .app-mono {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.app-vrow-head .app-muted {
  font-size: 14px;
}

.app-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
  font-size: 15px;
}

.app-count-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.app-count-item .eus-icon {
  width: 16px;
  height: 16px;
}

.app-zero {
  color: var(--lg-muted);
}

.app-warn {
  color: var(--lg-warn);
  font-weight: 600;
}

.app-thumb {
  width: 96px;
  height: 68px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-img);
  background: #000;
  outline: 1px solid rgba(255, 255, 255, 0.1);
}

.app-sb-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.app-sb-note--full {
  display: block;
}

.app-sb-more {
  align-self: flex-start;
  min-height: 32px;
  font-size: 14px;
}

.app-empty {
  padding: 48px 16px;
  border-radius: 20px;
  background: var(--lg-fill);
  text-align: center;
}

.app-empty p {
  margin: 0;
}

.app-empty-title {
  margin: 0 0 var(--s-2);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-skeleton {
  height: 56px;
  border-radius: 16px;
  background: var(--lg-fill);
  animation: app-pulse 1.4s ease-in-out infinite;
}

.app-skeleton--row {
  height: 88px;
  border-radius: 20px;
}

@keyframes app-pulse {
  50% {
    background-color: rgba(255, 255, 255, 0.06);
  }
}

.app-topbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 150ms, transform 100ms, opacity 150ms;
}

.app-topbtn .eus-icon {
  width: 18px;
  height: 18px;
}

.app-topbtn[data-testid="back-button"],
.app-topbtn[data-testid="review-link"] {
  padding-left: 8px;
}

.app-topbtn:disabled {
  opacity: 0.38;
}

.app-topbtn--text {
  padding: 0 14px;
}

/* annotation screen */

.app-flow {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--w-panel);
  grid-template-rows: auto minmax(0, 1fr) 52px;
  gap: var(--pad);
  padding: max(var(--pad), env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
  overflow: hidden;
}

.app-editor-host {
  min-height: 100dvh;
}

.app-topbar {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  container-type: inline-size;
  container-name: topbar;
}

.app-toprow {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: center;
  gap: 12px;
}

.app-cap {
  --lg-r: var(--lg-r-cap);
  border-radius: var(--lg-r);
  display: flex;
  align-items: center;
  gap: 2px;
  height: 52px;
  min-width: 0;
  padding: 0 4px;
  white-space: nowrap;
}

.app-cap--left {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
}

.app-cap--mid {
  justify-self: center;
  max-width: 100%;
  overflow: hidden;
}

.app-cap--right {
  justify-self: end;
}

.app-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  flex: none;
  background: var(--sep);
}

.app-pill:empty + .app-sep {
  display: none;
}

.app-topbar-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 8px 0 8px;
  min-width: 0;
}

.app-topbar-id {
  padding: 0 10px 0 2px;
  font: 500 13px var(--mono);
  color: var(--lg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  display: none;
}

.app-topbar-frame {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.app-topbar-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--lg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.app-expert-tag {
  flex: none;
  margin: 0 8px 0 2px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--lg-fill);
  font-size: 13px;
  font-weight: 600;
}

.app-grow {
  flex: 1;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--lg-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  flex: 0 1 auto;
}

.app-pill > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-pill:empty {
  padding: 0;
}

.app-pill .eus-icon {
  width: 17px;
  height: 17px;
}

.app-pill[data-state="saved"] {
  color: var(--lg-ok);
}

.app-pill[data-state="offline"],
.app-pill[data-state="error"],
.app-pill[data-state="conflict"] {
  color: var(--lg-warn);
}

.app-pill[data-state="playing"] {
  color: var(--lg-ink);
}

.app-histbtn {
  padding: 0 12px;
}

@container topbar (min-width: 860px) {
  .app-topbar-id {
    display: block;
  }
}

.app-cap--mid:has(.app-pill[data-state="offline"]) .app-histbtn-label,
.app-cap--mid:has(.app-pill[data-state="error"]) .app-histbtn-label,
.app-cap--mid:has(.app-pill[data-state="conflict"]) .app-histbtn-label {
  display: none;
}

.app-cap--mid:has(.app-pill[data-state="offline"]) .app-histbtn,
.app-cap--mid:has(.app-pill[data-state="error"]) .app-histbtn,
.app-cap--mid:has(.app-pill[data-state="conflict"]) .app-histbtn {
  width: var(--tap);
  padding: 0;
}

.app-pill[data-state="offline"] > span,
.app-pill[data-state="error"] > span,
.app-pill[data-state="conflict"] > span {
  overflow: visible;
  text-overflow: clip;
}

.app-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@container topbar (max-width: 719px) {
  .app-histbtn {
    width: var(--tap);
    padding: 0;
  }

  .app-histbtn-label {
    display: none;
  }
}

@container topbar (max-width: 619px) {
  .app-toprow {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }

  .app-cap--left {
    grid-column: 1 / -1;
  }

  .app-cap--mid {
    justify-self: start;
  }
}

.app-stage {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--lg-r-card);
  background: var(--lg-card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  isolation: isolate;
}

.app-stage-host {
  position: absolute;
  inset: 0;
}

.app-stage-svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.app-stage[data-drawing="true"] .app-stage-svg {
  cursor: crosshair;
}

.app-outline[data-selectable="false"],
.app-tag[data-selectable="false"] {
  pointer-events: none;
}

.app-tag text {
  font-family: var(--font);
  pointer-events: none;
}

.app-chip-mode,
.app-ovbtn {
  --lg-r: 22px;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--lg-ink);
}

.app-chip-mode {
  position: absolute;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 90px);
  pointer-events: none;
}

.app-chip-mode--fade {
  animation: app-chip-fade 0.4s ease 3.2s forwards;
}

@keyframes app-chip-fade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.app-chip-mode span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-swatch {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  flex: none;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.35);
}

.app-stage-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: var(--s-2);
}

.app-ovbtn--icon {
  width: var(--tap);
  padding: 0;
  justify-content: center;
}

.app-ovbtn:disabled {
  opacity: 0.4;
}

.app-toast-area {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  pointer-events: none;
}

.app-toast {
  --lg-r: 26px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 52px;
  padding: 4px 4px 4px 20px;
  color: var(--lg-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  animation: app-toast-in 200ms cubic-bezier(0.2, 0, 0, 1);
}

.app-toast.lg-glass-css {
  background: rgba(20, 24, 33, 0.74);
}

.app-toast-action {
  flex: none;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 22px;
  background: var(--lg-fill);
  font-size: 15px;
  font-weight: 700;
  color: var(--lg-ink);
  white-space: nowrap;
  transition: background-color 150ms;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.app-stage-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4);
  text-align: center;
  background: var(--lg-card);
}

.app-stage-error-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 420px;
}

.app-stage-error p {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.app-framebar {
  --lg-r: var(--lg-r-cap);
  border-radius: var(--lg-r);
  grid-column: 1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  height: 52px;
  padding: 0 4px;
}

.app-fbtn {
  width: var(--tap);
  height: var(--tap);
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 22px;
  transition: background-color 150ms, transform 100ms, opacity 150ms;
}

.app-fbtn:disabled {
  opacity: 0.38;
}

.app-fbtn .eus-icon {
  width: 20px;
  height: 20px;
}

.app-fbtn--play {
  background: #fff;
  color: var(--lg-tint-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-fbtn--play .eus-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.app-slider {
  --p: 0;
  flex: 1;
  min-width: 0;
  height: var(--tap);
  margin: 0 10px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.app-slider:disabled {
  opacity: 0.4;
  cursor: default;
}

.app-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--lg-ink) 0, var(--lg-ink) calc(11px + (100% - 22px) * var(--p)), var(--sep) calc(11px + (100% - 22px) * var(--p)));
}

.app-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.app-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--sep);
}

.app-slider::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--lg-ink);
}

.app-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.app-slider:focus-visible {
  outline-offset: 0;
  border-radius: 22px;
}

.app-readout {
  padding: 0 12px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.app-panel {
  --lg-r: var(--lg-r-panel);
  border-radius: var(--lg-r);
  grid-column: 2;
  grid-row: 1 / 4;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-p);
  padding: 20px;
  overflow: hidden;
}

.app-panel-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-p);
}

.app-panel[data-playing="true"] .app-panel-inner,
.app-panel[data-view="loading"] .app-panel-inner,
.app-panel[data-view="saving"] .app-panel-inner {
  opacity: 0.5;
}

.app-panel[data-view="loading"] .app-panel-inner {
  opacity: 1;
}

.app-playing-line {
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--lg-fill);
  color: var(--lg-ink);
  font-size: 15px;
  font-weight: 600;
}

.app-phead {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  margin: -6px 0 -2px;
}

.app-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 18px;
  background: var(--lg-fill);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 150ms;
}

.app-back .eus-icon {
  width: 18px;
  height: 18px;
}

.app-back[aria-hidden="true"] {
  display: none;
}

.app-count {
  flex: none;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.app-track {
  flex: 0 1 180px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 6px;
}

.app-track i {
  flex: 1 1 26px;
  min-width: 10px;
  height: 6px;
  border-radius: 3px;
  background: var(--sep);
}

.app-track i.done {
  background: var(--lg-ink);
  opacity: 0.85;
}

.app-track i.cur {
  flex: 1.8 1 46px;
  background: var(--lg-tint);
}

.app-track i.skipped {
  background: none;
  box-shadow: inset 0 0 0 1px var(--sep);
}

.app-panel-inner > .app-track {
  flex: none;
  width: 180px;
  max-width: 100%;
  margin: 6px 0 2px;
}

.app-expert-line {
  margin: 0;
  font-size: 14px;
  color: var(--lg-muted);
}

.app-pbody {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: -4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-p);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.app-pbody::-webkit-scrollbar {
  width: 6px;
}

.app-pbody::-webkit-scrollbar-track {
  background: transparent;
}

.app-pbody::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
}

.app-pbody--enter {
  animation: app-step-in 180ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes app-step-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
}

.app-trail {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-trail-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  background: var(--lg-fill);
  text-align: left;
  font-size: 13px;
  line-height: 1.2;
  transition: background-color 150ms;
}

.app-trail-label {
  flex: none;
  font-size: 13px;
  color: var(--lg-muted);
}

.app-trail-value {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-trail-row .eus-icon {
  display: none;
}

.app-question {
  flex: none;
  margin: 2px 0 0;
  font-size: clamp(18px, 2.4dvh, 24px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.app-question:focus {
  outline: none;
}

.app-help {
  margin: -2px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--lg-muted);
  text-wrap: pretty;
}

.app-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--lg-muted);
}

.app-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--ans-h);
  padding: 6px 16px;
  border-radius: var(--lg-r-control);
  background: var(--lg-fill);
  text-align: left;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  transition: background-color 150ms, color 150ms, transform 100ms;
}

.app-answer small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lg-muted);
}

.app-radio {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.app-radio .eus-icon {
  width: 14px;
  height: 14px;
}

.app-answer[aria-pressed="true"] {
  background: var(--lg-tint);
  color: var(--lg-tint-text);
}

.app-answer[aria-pressed="true"] .app-radio {
  box-shadow: inset 0 0 0 2px currentColor;
}

.app-answer[aria-pressed="true"] small {
  color: rgba(12, 14, 19, 0.68);
}

.app-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  border-radius: 20px;
  background: var(--lg-fill);
  transition: background-color 150ms;
}

.app-row:not(.app-row--sel) {
  padding: 0 6px;
}

.app-row:not(.app-row--sel) .app-row-top {
  min-height: 40px;
  gap: 4px;
}

.app-row:not(.app-row--sel) .app-row-sum,
.app-row:not(.app-row--sel) .app-row-delete,
.app-row:not(.app-row--sel) .app-row-need > span {
  display: none;
}

.app-row:not(.app-row--sel) .app-row-need {
  flex: none;
  padding: 0 2px;
}

@media (hover: hover) {
  .app-row:not(.app-row--sel):hover {
    background: var(--lg-fill-hover);
  }
}

.app-row--sel {
  flex: 1 0 100%;
  order: 99;
  padding: 0 10px 10px;
  border-radius: 18px;
  background: var(--row-sel);
  box-shadow: inset 0 0 0 1px var(--lg-line);
}

.app-row--sel .app-choice:not([aria-pressed="true"]) {
  background: rgba(255, 255, 255, 0.13);
}

.app-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  cursor: pointer;
}

.app-row-sum {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-row-need {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--lg-warn);
}

.app-row-need .eus-icon {
  width: 16px;
  height: 16px;
}

.app-row-delete {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  margin-right: -6px;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--lg-muted);
  transition: background-color 150ms;
}

.app-row-delete .eus-icon {
  width: 17px;
  height: 17px;
}

.app-row-label {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--lg-muted);
}

.app-tag {
  flex: none;
  padding: 2px 10px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #0b0c0e;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.app-tag--zone {
  background: rgba(11, 12, 14, 0.85);
  color: #fff;
  box-shadow: inset 0 0 0 1px #fff;
}

.app-tag--unknown {
  background: none;
  box-shadow: none;
  outline: 1px dashed #fff;
  outline-offset: -1px;
}

.app-chips {
  display: grid;
  gap: 6px;
}

.app-chips--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-chips--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-chips--sector {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-chips--numerals {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-choice {
  min-height: var(--chip-h);
  padding: 4px 6px;
  border-radius: var(--lg-r-control);
  background: var(--lg-fill);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  transition: background-color 150ms, color 150ms, transform 100ms;
}

.app-chips--two .app-choice {
  font-size: 14px;
}

.app-chips--numerals .app-choice {
  font-size: 17px;
}

.app-row--sel .app-choice[aria-pressed="true"],
.app-choice[aria-pressed="true"] {
  background: var(--lg-tint);
  color: var(--lg-tint-text);
}

.app-pfoot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap-p);
  padding-top: 2px;
}

.app-pfoot .app-primary {
  width: 100%;
  min-height: var(--prim-h);
}

.app-why {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 -2px;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--lg-muted);
}

.app-why .eus-icon {
  width: 16px;
  height: 16px;
  color: var(--lg-warn);
}

.app-why .app-link {
  min-height: 24px;
  font-size: 14px;
}

.app-escape {
  width: 100%;
  min-height: var(--esc-h);
  padding: 0 18px;
  border-radius: 24px;
  background: var(--lg-fill);
  color: var(--lg-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 150ms, transform 100ms;
}

.app-escape:active {
  background: var(--lg-fill-press);
}

.app-pbody .app-second {
  width: 100%;
  flex: none;
  min-height: var(--esc-h);
}

.app-state {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--lg-fill);
}

.app-state p {
  margin: 0;
}

.app-state-title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

.app-state-body {
  font-size: 14px;
  line-height: 1.4;
  color: var(--lg-muted);
  overflow-wrap: anywhere;
}

.app-state--ok .app-state-title .eus-icon {
  color: var(--lg-ok);
}

.app-state--warn {
  background: var(--warn-fill);
  box-shadow: inset 0 0 0 1px var(--warn-line);
}

.app-state--warn .app-state-body {
  max-height: calc(1.4em * 3);
  overflow-y: auto;
  color: var(--lg-ink);
  scrollbar-width: thin;
}

.app-state--warn .app-state-title .eus-icon {
  color: var(--lg-warn);
}

.app-pbody--loading {
  gap: 10px;
}

.app-pbody--loading .app-skeleton:first-child {
  height: 120px;
  border-radius: 18px;
}

@media (min-width: 600px) and (max-height: 859px) {
  .app-root {
    --gap-p: 8px;
    --prim-h: 54px;
    --esc-h: 46px;
  }
}

@media (min-width: 600px) and (max-height: 759px) {
  .app-root {
    --prim-h: 52px;
    --esc-h: 44px;
  }

  .app-panel {
    padding: 16px;
  }
}

@media (min-width: 600px) and (max-height: 699px) {
  .app-root {
    --gap-p: 6px;
    --prim-h: 48px;
    --esc-h: 42px;
  }

  .app-panel {
    padding: 14px 16px;
  }

  .app-phead {
    margin: -6px 0 -4px;
  }

  .app-help {
    display: none;
  }
}

@media (max-width: 899px), (orientation: portrait) {
  .app-flow {
    --pad: 14px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) 52px auto;
    gap: 12px;
  }

  .app-panel {
    grid-column: 1;
    grid-row: 4;
    --lg-r: 30px;
    padding: 16px 18px 18px;
  }

  .app-pfoot {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }

  .app-pfoot > .app-why,
  .app-pfoot > :only-child {
    grid-column: 1 / -1;
  }

  .app-pfoot .app-primary,
  .app-pfoot .app-escape {
    min-height: 56px;
    border-radius: 28px;
  }

  .app-pfoot .app-primary {
    font-size: 18px;
  }

  .app-pfoot .app-escape {
    padding: 0 12px;
    white-space: normal;
  }
}

@media (min-width: 600px) and (max-width: 899px), (min-width: 600px) and (orientation: portrait) {
  .app-chips--numerals {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .app-chips--sector {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .app-chips--landmark {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-answers > :only-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 599px) {
  .app-flow {
    --pad: 12px;
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto calc((100vw - 24px) * 0.71) 52px auto;
    overflow: visible;
  }

  .app-chips--sector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-stage {
    border-radius: 24px;
  }

  .app-panel {
    padding: 16px;
    overflow: visible;
  }

  .app-pbody {
    overflow: visible;
  }

  .app-pfoot {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 3;
    margin: 0 -8px;
    padding: 8px;
    border-radius: 34px;
    background: rgba(18, 21, 30, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);
  }

  .app-pfoot--quiet {
    position: static;
    margin: 0;
    padding: 4px 0 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .app-row {
    scroll-margin-top: 8px;
    scroll-margin-bottom: 150px;
  }

  .app-videos {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .app-lhead {
    padding-left: 16px;
  }

  .app-lhead .app-topbtn,
  .app-lhead .app-second {
    padding: 0 10px;
  }

  .app-chip-mode {
    max-width: calc(100% - 84px);
    padding: 0 12px;
  }

  .app-question {
    font-size: 22px;
  }

  .app-thumb {
    width: 72px;
    height: 51px;
  }

  .app-vrow {
    padding: 12px 14px;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-root *,
  .app-root *::before,
  .app-root *::after {
    animation-duration: 100ms !important;
    transition: none !important;
  }

  .app-pbody--enter,
  .app-toast,
  .app-skeleton {
    animation-name: none !important;
  }
}

.app-user {
  max-width: 12em;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--lg-muted);
}

@media (max-width: 599px) {
  .app-user {
    display: none;
  }
}
