/* =============================================================================
   Lantern components — written once, painted by whichever system wraps them.

   Rule: a component names tokens (tokens.css), never a colour, a font or a
   size of its own. The four systems differ only in the values; the markup
   and these rules are the same for all of them.
   ============================================================================= */

[data-system] *,
[data-system] *::before,
[data-system] *::after {
  box-sizing: border-box;
}

/* --- Type roles ----------------------------------------------------------- */

.lt-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-variation-settings: 'wdth' calc(var(--display-stretch) / 1%);
  text-transform: var(--display-case);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  text-wrap: balance;
}
.lt-display--xs {
  font-size: var(--display-xs);
}
.lt-display--s {
  font-size: var(--display-s);
}
.lt-display--m {
  font-size: var(--display-m);
}
.lt-display--l {
  font-size: var(--display-l);
}
.lt-display--xl {
  font-size: var(--display-xl);
}

/* Chinese display: a heavy Song widened, as T1 does it. The transform is
   the token --cjk-widen; the box keeps its own width via inline-block. */
.lt-cjk {
  display: inline-block;
  justify-self: start;
  font-family: var(--font-display-cjk);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  transform: scaleX(var(--cjk-widen));
  transform-origin: left center;
  /* the widened glyphs overflow their box; give the box their width back */
  margin-right: calc((var(--cjk-widen) - 1) * var(--cjk-chars, 2) * 1.02em);
}

.lt-cjk--center {
  justify-self: center;
  transform-origin: center;
  margin-right: 0;
}

.lt-page-title {
  margin: 0;
  font-size: var(--text-page-title);
  font-weight: var(--weight-heading);
  letter-spacing: -0.01em;
}
.lt-title {
  font-size: var(--text-title);
  font-weight: var(--weight-heading);
}
.lt-heading {
  font-size: var(--text-row);
  font-weight: var(--weight-heading);
}
.lt-text {
  font-size: var(--text-row);
  line-height: var(--leading-row);
}
.lt-value {
  font-size: var(--text-value);
  color: var(--tertiary-foreground);
}
.lt-caption {
  font-size: var(--text-caption);
  font-weight: var(--weight-caption);
  color: var(--tertiary-foreground);
}
.lt-label {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 400;
  text-transform: var(--label-case);
  letter-spacing: var(--label-tracking);
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

/* --- Surfaces ------------------------------------------------------------- */

.lt-ground {
  background: var(--background);
  color: var(--foreground);
}
.lt-panel {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: var(--outline-w) solid var(--outline-color);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-raised);
}
.lt-popover {
  background: var(--glass-popover);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: var(--outline-w) solid var(--outline-color);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-overlay);
  padding: var(--space-1);
}
.lt-group {
  background: var(--muted);
  border-radius: var(--radius-panel);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-2);
}

/* --- Buttons -------------------------------------------------------------- */

.lt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-h);
  padding: 0 var(--control-pad-x);
  border-radius: var(--radius-control);
  border: var(--outline-w) solid var(--outline-color);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: var(--control-font);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--duration-quick) var(--ease-out),
    transform var(--duration-quick) var(--ease-out);
}
.lt-btn:hover {
  background: color-mix(in oklab, var(--card), var(--ink) 6%);
}
.lt-btn:active {
  transform: translateY(1px);
}
.lt-btn:focus-visible,
.lt-icon-btn:focus-visible,
.lt-seg button:focus-visible,
.lt-switch:focus-visible,
.lt-field:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.lt-btn--ghost {
  background: transparent;
  border-color: transparent;
}
.lt-btn--ghost:hover {
  background: var(--accent-wash);
}
/* Reverse fill: only for the decisive action — submit, confirm, publish. */
.lt-btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.lt-btn--primary:hover {
  background: color-mix(in oklab, var(--primary), var(--primary-foreground) 12%);
}
/* The lamp: the one lit action — 播放. */
.lt-btn--lamp {
  background: var(--lamp);
  color: var(--lamp-ink);
  border-color: color-mix(in oklab, var(--outline-color), var(--lamp) 40%);
  font-weight: 600;
  box-shadow: 0 0 0 0 var(--lamp-soft);
}
.lt-btn--lamp:hover {
  background: var(--lamp);
  box-shadow: var(--lamp-glow);
}
.lt-btn--danger {
  color: var(--destructive);
}
.lt-btn--lg {
  height: var(--control-lg-h);
  font-size: var(--control-lg-font);
  padding: 0 calc(var(--control-pad-x) * 1.8);
}
.lt-btn svg,
.lt-icon-btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.lt-icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--control-h);
  height: var(--control-h);
  border-radius: var(--radius-control);
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: calc(var(--control-font) + 3px);
}
.lt-icon-btn:hover {
  background: var(--accent-wash);
  color: var(--foreground);
}
.lt-icon-btn[aria-pressed='true'] {
  background: var(--accent-wash);
  color: var(--foreground);
}

/* --- Segmented ------------------------------------------------------------ */

.lt-seg {
  display: inline-flex;
  gap: 2px;
  height: var(--control-h);
  padding: 2px;
  border-radius: var(--radius-control);
  background: var(--muted);
  border: var(--outline-w) solid var(--outline-color);
}
.lt-seg button {
  height: calc(var(--control-inner-h) - 2 * var(--outline-w));
  padding: 0 var(--control-pad-x);
  border: 0;
  border-radius: calc(var(--radius-control) - 2px);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: var(--control-font);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.lt-seg button[aria-pressed='true'] {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 0 0 var(--outline-w) var(--outline-color);
}

/* --- Switch --------------------------------------------------------------- */

.lt-switch {
  position: relative;
  flex: none;
  width: var(--switch-w);
  height: var(--switch-h);
  border-radius: 999px;
  border: var(--outline-w) solid var(--outline-color);
  background: var(--quaternary-foreground);
  cursor: pointer;
  padding: 0;
  transition: background var(--duration-quick) var(--ease-out);
}
.lt-switch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: calc(var(--switch-h) - 4px - 2 * var(--outline-w));
  height: calc(var(--switch-h) - 4px - 2 * var(--outline-w));
  border-radius: 999px;
  background: var(--card);
  transform: translateY(-50%);
  transition: left var(--duration-quick) var(--ease-out);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}
.lt-switch[aria-checked='true'] {
  background: var(--foreground);
}
.lt-switch[aria-checked='true']::after {
  left: calc(100% - var(--switch-h) + 2px + var(--outline-w));
}

/* --- Slider --------------------------------------------------------------- */

.lt-slider {
  position: relative;
  height: var(--slider-thumb);
  flex: 1;
  min-width: 80px;
}
.lt-slider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--slider-track);
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--border);
}
.lt-slider__fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: var(--slider-track);
  width: var(--v, 50%);
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--foreground);
}
.lt-slider__thumb {
  position: absolute;
  top: 50%;
  left: var(--v, 50%);
  width: var(--slider-thumb);
  height: var(--slider-thumb);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--card);
  border: max(var(--outline-w), 1px) solid var(--outline-color);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}

/* --- Field ---------------------------------------------------------------- */

.lt-field {
  height: var(--control-h);
  width: 100%;
  min-width: 0;
  padding: 0 var(--control-pad-x);
  border-radius: var(--radius-control);
  border: max(var(--outline-w), 1px) solid var(--outline-color);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: var(--control-font);
}
.lt-field--mono {
  font-family: var(--font-mono);
}

/* --- Rows ----------------------------------------------------------------- */

.lt-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--row-h);
  font-size: var(--text-row);
}
.lt-row > .lt-row__name {
  flex: 1;
  min-width: 0;
}
.lt-row > .lt-row__value {
  color: var(--tertiary-foreground);
  font-size: var(--text-value);
}

.lt-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--row-h);
  padding: 0 var(--space-2);
  border-radius: calc(var(--radius-panel) - var(--space-1));
  font-size: var(--text-row);
  color: var(--foreground);
}
.lt-menu-item:hover,
.lt-menu-item.is-active {
  background: var(--accent-wash);
}
.lt-menu-item > svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}
.lt-menu-item > span:first-of-type {
  flex: 1;
}
.lt-kbd {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--tertiary-foreground);
}
.lt-sep {
  height: var(--outline-w);
  min-height: 1px;
  background: var(--border);
  margin: var(--space-1) var(--space-2);
}

/* --- Chips, badges, avatars ---------------------------------------------- */

.lt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--control-h) - 4px);
  padding: 0 var(--space-2);
  border-radius: var(--radius-control);
  border: max(var(--outline-w), 1px) solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--muted-foreground);
  white-space: nowrap;
}
.lt-chip[aria-pressed='true'] {
  border-color: var(--foreground);
  color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--foreground);
}
.lt-chip--from {
  border-style: dashed;
}
.lt-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px var(--border);
}

.lt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--muted);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.lt-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--quaternary-foreground);
}
.lt-badge--live {
  color: var(--foreground);
}
.lt-badge--live::before {
  background: var(--lamp);
  box-shadow: 0 0 0 3px var(--lamp-soft);
}
/* A person's, or the machine's (§2 人暖，机器冷). */
.lt-badge--human::before {
  background: var(--human);
  box-shadow: 0 0 0 3px var(--human-soft);
}
.lt-badge--machine::before {
  background: var(--machine);
  box-shadow: 0 0 0 3px var(--machine-soft);
}

.lt-avatars {
  display: inline-flex;
}
.lt-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: oklch(0.6 0.15 var(--h, 250));
  border: 2px solid var(--card);
  margin-left: -6px;
}
.lt-avatar:first-child {
  margin-left: 0;
}

/* --- Keyframe track ●—○—○ (L1, D3, CC3) ----------------------------------- */

.lt-kf {
  display: flex;
  align-items: center;
  width: 100%;
}
.lt-kf__dot {
  position: relative;
  flex: none;
  width: var(--kf-dot);
  height: var(--kf-dot);
  border-radius: 999px;
  border: var(--kf-line) solid var(--kf-off);
  background: var(--card);
}
.lt-kf__dot.is-past {
  border-color: var(--kf-lit);
}
.lt-kf__dot.is-now {
  width: var(--kf-dot-now);
  height: var(--kf-dot-now);
  border-color: var(--kf-lit);
  background: var(--kf-lit);
  box-shadow: var(--lamp-glow);
}
.lt-kf__seg {
  flex: 1;
  min-width: 8px;
  height: var(--kf-line);
  background: var(--kf-off);
}
.lt-kf__seg.is-lit {
  background: var(--kf-lit);
}
.lt-kf--mark .lt-kf__seg {
  flex: none;
  width: calc(var(--kf-dot) * 1.4);
}
.lt-kf--mark {
  width: auto;
  display: inline-flex;
}
.lt-kf--mark .lt-kf__dot:not(.is-now) {
  border-color: var(--foreground);
}
.lt-kf--mark .lt-kf__seg {
  background: var(--foreground);
}
.lt-kf--v {
  flex-direction: column;
  width: auto;
  height: 100%;
}
.lt-kf--v .lt-kf__seg {
  width: var(--kf-line);
  height: auto;
  min-height: 8px;
}
.lt-kf__labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
}

/* The track as a loader: the light walks it. */
.lt-kf--run .lt-kf__dot {
  animation: lt-kf-dot calc(var(--kf-step) * 4) steps(1) infinite;
  animation-delay: calc(var(--i) * var(--kf-step));
}
@keyframes lt-kf-dot {
  0% {
    background: var(--kf-lit);
    border-color: var(--kf-lit);
    box-shadow: var(--lamp-glow);
  }
  25%,
  100% {
    background: var(--card);
    border-color: var(--kf-off);
    box-shadow: none;
  }
}

/* --- Slide, thumbnail, frame -------------------------------------------- */

.lt-slide {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-slide);
  background: var(--deck-paper);
  color: var(--deck-ink);
  container-type: inline-size;
  box-shadow: var(--shadow-raised);
}
.lt-slide.is-selected {
  outline: var(--outline-w-strong) solid var(--ring);
  outline-offset: 3px;
}
.lt-slide.is-selected:where([data-system='ink'] *) {
  outline-width: 2px;
}

/* Every slide is a keyframe: the frame from D and D3 — a plate header with
   the model number and the light, a tick ruler at the foot. */
.lt-frame {
  position: relative;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-panel);
  border: var(--outline-w-strong) solid var(--outline-color);
  background: var(--card);
}
.lt-frame__head,
.lt-frame__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.lt-frame__rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lt-frame__rec::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lamp);
  box-shadow: 0 0 0 3px var(--lamp-soft);
}
.lt-ticks {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 18px;
}
.lt-ticks i {
  width: 1px;
  height: 8px;
  background: var(--foreground);
}
.lt-ticks i:nth-child(3n + 1) {
  width: 2px;
  height: 18px;
}
.lt-ticks i:first-child {
  background: var(--lamp);
}

/* --- Sticker (B3): a die-cut edge and a tilt ------------------------------ */

.lt-sticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.35em 0.8em;
  border-radius: var(--radius-panel);
  background: var(--sticker-bg, var(--lamp));
  color: var(--sticker-ink, var(--lamp-ink));
  border: var(--sticker-edge-w) solid var(--edge);
  box-shadow: var(--sticker-shadow);
  transform: rotate(var(--tilt, var(--sticker-tilt)));
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  line-height: 1;
  white-space: nowrap;
}
.lt-sticker--pill {
  border-radius: 999px;
}

/* --- Bars and the editor shell ------------------------------------------ */

.lt-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: calc(var(--control-h) + 2 * var(--space-2));
  padding: var(--space-2) var(--space-3);
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: var(--outline-w) solid var(--outline-color);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-raised);
}
.lt-bar__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: var(--text-title);
  font-weight: var(--weight-heading);
}
.lt-bar__title > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lt-spacer {
  flex: 1;
}

.lt-app-wrap {
  container-type: inline-size;
  height: 100%;
}
.lt-app {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr) 264px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-2);
  padding: var(--space-2);
  height: 100%;
  min-height: 560px;
  background: var(--stage);
  border-radius: var(--radius-panel);
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--foreground);
}
.lt-app > .lt-bar {
  grid-column: 1 / -1;
}
.lt-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-content: start;
  padding: var(--space-3);
  overflow: hidden;
}
.lt-rail__track {
  grid-row: 1 / span 6;
  padding: 22px 0;
}
.lt-rail__item {
  display: grid;
  gap: 4px;
}
.lt-rail__item .lt-slide {
  border-radius: calc(var(--radius-slide) * 0.6);
  box-shadow: 0 0 0 max(var(--outline-w), 1px) var(--border);
}
.lt-rail__item.is-now .lt-slide {
  box-shadow: 0 0 0 var(--outline-w-strong) var(--ring);
}
.lt-rail__item.is-now .lt-slide:where([data-system='ink'] *) {
  box-shadow: 0 0 0 2px var(--ring);
}
.lt-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-3);
  min-width: 0;
}
.lt-stage__canvas {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-4) var(--space-6);
  min-height: 0;
}
.lt-stage__canvas .lt-slide {
  max-width: 760px;
}
/* What the model changed (§2 人暖，机器冷). */
.lt-ai-mark {
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--machine);
  color: #fff;
  font: 600 11px/1.4 var(--font-ui);
  box-shadow: 0 0 12px var(--machine-soft);
}
.lt-stage__foot {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
}
.lt-stage__foot .lt-kf {
  flex: 1;
}
.lt-inspector {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  overflow: hidden;
}
.lt-section {
  display: grid;
  gap: var(--space-1);
  padding-top: var(--space-2);
  border-top: max(var(--outline-w), 1px) solid var(--border);
}
.lt-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--row-h);
}

@container (max-width: 980px) {
  .lt-app {
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .lt-app > .lt-inspector {
    display: none;
  }
}
@container (max-width: 640px) {
  .lt-app {
    grid-template-columns: minmax(0, 1fr);
  }
  .lt-app > .lt-rail {
    display: none;
  }
  .lt-hide-narrow,
  .lt-app .lt-bar .lt-badge,
  .lt-app .lt-bar .lt-lockup__word {
    display: none !important;
  }
}

/* --- Phone ---------------------------------------------------------------- */

.lt-phone {
  position: relative;
  width: 360px;
  max-width: 100%;
  height: 740px;
  border-radius: 46px;
  padding: 10px;
  background: #0d0d0f;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.5);
  flex: none;
}
.lt-phone__screen {
  position: relative;
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background: var(--stage);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding: 44px var(--space-2) var(--space-2);
}
.lt-phone__island {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 96px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0d0d0f;
  z-index: 3;
}
.lt-phone .lt-bar {
  padding: var(--space-1) var(--space-2);
}
.lt-filmstrip {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.lt-filmstrip__thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
}
.lt-filmstrip__thumbs .lt-slide {
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--border);
}
.lt-filmstrip__thumbs .is-now .lt-slide {
  box-shadow: 0 0 0 2px var(--ring);
}
.lt-sheet {
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  bottom: var(--space-2);
  padding: 6px var(--space-4) var(--space-4);
  border-radius: 24px;
  background: var(--glass-popover);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: var(--outline-w) solid var(--outline-color);
  box-shadow: var(--shadow-overlay);
  display: grid;
  gap: var(--space-2);
}
.lt-sheet__grabber {
  justify-self: center;
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: var(--quaternary-foreground);
  margin-bottom: var(--space-1);
}
.lt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

/* --- Empty state: the system's glyph and a title, nothing more (§6) ------ */

.lt-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  border-radius: var(--radius-panel);
  border: max(var(--outline-w), 1px) dashed var(--border);
}

/* --- Toast ---------------------------------------------------------------- */

.lt-toast {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: var(--text-row);
  font-weight: 500;
  box-shadow: var(--shadow-overlay);
}
.lt-toast svg {
  width: 16px;
  height: 16px;
}

/* T1: the seal — a heavy Song 幻燈 white on vermilion, in a squircle. */
.lt-seal {
  display: inline-grid;
  place-items: center;
  width: 1em;
  height: 1em;
  border-radius: 28%;
  background: var(--seal);
  color: #fff;
  border: max(var(--outline-w), 2px) solid var(--edge);
  box-shadow: 0 0 0 max(var(--outline-w), 1px) var(--outline-color);
  overflow: hidden;
  flex: none;
}
.lt-seal > span {
  font-family: var(--font-display-cjk);
  font-weight: 900;
  font-size: 0.34em;
  line-height: 1;
  white-space: nowrap;
  transform: scaleX(1.2);
}

/* --- Marks and app icons -------------------------------------------------- */

.lt-lockup {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  gap: 0.45em;
  color: var(--foreground);
}
.lt-lockup__word {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-variation-settings: 'wdth' calc(var(--display-stretch) / 1%);
  text-transform: var(--display-case);
  letter-spacing: var(--display-tracking);
  line-height: 1;
}
.lt-appicon {
  width: 72px;
  height: 72px;
  border-radius: 22%;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}
.lt-appicon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .lt-kf--run .lt-kf__dot {
    animation: none;
  }
  .lt-btn {
    transition: none;
  }
}

/* --- The user's deck (content, not chrome) --------------------------------
   One sample deck, the same in every system: the chrome changes around it,
   the slide does not. Sizes are in container units so a thumbnail is the
   same slide, smaller. */

.deck {
  font-family: 'Newsreader', 'Noto Serif SC', serif;
}
.deck__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--deck-sky-1), var(--deck-sky-2));
}
.deck__sun {
  position: absolute;
  width: 22cqw;
  aspect-ratio: 1;
  right: 14cqw;
  top: 12cqw;
  border-radius: 999px;
  background: var(--deck-sun);
}
.deck__hill {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -38cqw;
  height: 60cqw;
  border-radius: 50%;
  background: var(--deck-hill-2);
}
.deck__hill--b {
  left: 30%;
  right: -40%;
  bottom: -30cqw;
  background: var(--deck-hill-1);
}
.deck__text {
  position: absolute;
  left: 7cqw;
  top: 8cqw;
  display: grid;
  gap: 1.6cqw;
  color: var(--deck-ink);
}
.deck__kicker {
  font-family: 'Martian Mono', 'JetBrains Mono', monospace;
  font-size: 2.2cqw;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.deck__title {
  font-size: 8.5cqw;
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.deck--paper .deck__sky {
  background: var(--deck-paper);
}
.deck--paper .deck__sun {
  background: var(--deck-sky-2);
  right: auto;
  left: 60cqw;
}
.deck--alt .deck__sky {
  background: linear-gradient(180deg, var(--deck-alt-1), var(--deck-alt-2));
}
.deck--alt .deck__sun {
  background: var(--deck-paper);
}
.deck--rose .deck__sky {
  background: linear-gradient(180deg, var(--deck-alt-3), var(--deck-alt-4));
}
.deck--rose .deck__text,
.deck--dusk .deck__text {
  color: var(--deck-paper);
}
.deck--dusk .deck__sky {
  background: linear-gradient(180deg, var(--deck-alt-5), var(--deck-alt-6));
}
