:root {
  color-scheme: dark;
  --bg: #101210;
  --panel: #191c18;
  --line: #30362b;
  --text: #edf0e7;
  --muted: #919b87;
  --lime: #d3f78b;
  --soft: #22291d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft Yahei", sans-serif;
  font-size: 13px;
}
button,
select,
input {
  font: inherit;
}
button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  background: #24291f;
  border: 1px solid #39412f;
  border-radius: 7px;
  padding: 9px 12px;
  cursor: pointer;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:hover {
  background: #343e2b;
  border-color: #718356;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
button[aria-pressed="true"] {
  color: var(--lime);
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 3.6%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  font-size: 38px;
  color: var(--lime);
  line-height: 1;
}
.brand strong {
  font-size: 20px;
  letter-spacing: 2px;
}
.brand strong span {
  font-size: 15px;
  letter-spacing: 3px;
  margin-left: 8px;
}
.brand small {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 18px;
  margin-left: 8px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.local-tag {
  color: var(--muted);
  font-size: 11px;
}
.local-tag i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
  margin-right: 5px;
}
.subtle {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 5px 7px;
}
.primary {
  background: var(--lime);
  color: #1a2410;
  border-color: var(--lime);
  font-weight: 650;
}
.primary:hover {
  background: #e3ffac;
  border-color: #e3ffac;
}
main {
  max-width: 1640px;
  margin: auto;
  padding: 36px 3.6% 0;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--lime);
}
h1 {
  font-size: clamp(25px, 2.5vw, 40px);
  font-weight: 550;
  margin: 12px 0 0;
  letter-spacing: 1px;
}
h1 span {
  color: var(--lime);
}
.page-heading p {
  color: var(--muted);
  line-height: 1.9;
  margin: 0;
  font-size: 12px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 24px;
  align-items: start;
}
.studio {
  min-width: 0;
}
.stage-toolbar {
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.stage-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #838e77;
}
.dot.live {
  background: var(--lime);
  box-shadow: 0 0 10px #baf47b55;
}
.stage-toolbar b {
  font-size: 11px;
  font-weight: 500;
}
.stage-toolbar small {
  font-size: 9px;
  color: var(--muted);
  border-left: 1px solid #414735;
  padding-left: 10px;
  margin-left: 4px;
}
.stage-toolbar button {
  font-size: 11px;
  border: 0;
  background: transparent;
  padding: 7px;
}
.stage {
  position: relative;
  aspect-ratio: 16/9;
  background: #171e18;
  overflow: hidden;
  border: 1px solid var(--line);
  touch-action: none;
}
.stage canvas {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
}
.stage #guides {
  pointer-events: none;
}
.stage-tag,
.stage-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: #f6f9ec;
  text-shadow: 0 1px 4px #000;
  gap: 14px;
}
.stage-tag {
  top: 17px;
}
.stage-tag #modeTag {
  padding: 5px 7px;
  background: #11170c88;
  backdrop-filter: blur(8px);
  border: 1px solid #ffffff26;
  border-radius: 3px;
}
.stage-bottom {
  bottom: 15px;
  letter-spacing: 0.5px;
}
.stage-bottom span:first-child {
  background: #12190cb3;
  padding: 6px 9px;
  border-radius: 4px;
  max-width: 80%;
}
#recBadge {
  color: #ff8e8e;
  background: #220707b3;
  padding: 5px 8px;
  border-radius: 4px;
}
#recBadge[hidden] {
  display: none;
}
.stage:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  background: #000;
}
.stage:fullscreen canvas {
  object-fit: contain;
}
.capture-bar {
  min-height: 76px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  gap: 12px;
}
.camera-group,
.capture-group {
  display: flex;
  gap: 7px;
  align-items: center;
}
.capture-group button {
  display: flex;
  align-items: center;
  gap: 7px;
}
.record-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff7873;
  border-radius: 50%;
}
#recordBtn.recording {
  border-color: #ed7671;
  color: #ff938c;
}
#recordBtn.recording .record-dot {
  border-radius: 1px;
}
.export-note {
  font-size: 10px;
  color: var(--muted);
}
.gesture-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 32px;
  padding: 0 2px;
}
.gesture-strip > div {
  display: grid;
  grid-template-columns: 26px auto;
  column-gap: 7px;
  row-gap: 5px;
}
.gesture-icon {
  grid-row: span 2;
  font-size: 25px;
  color: var(--lime);
  align-self: center;
}
.gesture-strip b {
  font-size: 11px;
  font-weight: 550;
}
.gesture-strip small {
  font-size: 10px;
  color: var(--muted);
}
.gesture-strip > button {
  font-size: 10px;
  padding: 7px 8px;
  max-width: 140px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel section {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-title h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title h2 small {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.section-title > span {
  font-size: 10px;
  color: var(--muted);
}
.effect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 8px;
  margin-top: 18px;
}
.effect-card {
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
  min-width: 0;
}
.effect-card:hover {
  background: transparent;
}
.effect-card .swatch {
  display: block;
  height: 56px;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffffff1a;
}
.swatch:before {
  content: "";
  position: absolute;
  width: 42%;
  height: 140%;
  border: 10px solid #ffffff55;
  border-radius: 50%;
  transform: rotate(35deg);
  left: 20%;
  top: -30%;
}
.swatch:after {
  content: "+";
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 16px;
  color: #fff9;
}
.effect-card:hover .swatch {
  border-color: var(--lime);
}
.effect-card b {
  display: block;
  font-size: 10px;
  font-weight: 500;
  margin: 7px 0 2px;
}
.effect-card small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.6px;
}
.thermal {
  background: linear-gradient(
    120deg,
    #112d74,
    #2a8bce 35%,
    #f9cf39 55%,
    #fb5d3e
  );
}
.glitch {
  background:
    repeating-linear-gradient(
      0deg,
      #d1405e88 0px,
      #385f4688 2px,
      transparent 3px,
      transparent 6px
    ),
    linear-gradient(110deg, #0b5d57, #7753b6, #a5bd50);
}
.rgb {
  background: linear-gradient(
    110deg,
    #be2539,
    #c76074 35%,
    #427777 48%,
    #35a7ad 62%,
    #17282d
  );
}
.negative {
  background: linear-gradient(
    135deg,
    #1d4184,
    #3c6eab 38%,
    #e4af41 43%,
    #efbc31
  );
}
.wave {
  background: repeating-radial-gradient(
    ellipse at 20% 40%,
    #092f32,
    #6ba29c 9px,
    #3b696d 14px,
    #173537 22px
  );
}
.mono {
  background: linear-gradient(
    125deg,
    #3b4239,
    #b4b8a9 48%,
    #525e4e 49%,
    #8d9884
  );
}
.hint {
  font-size: 10px;
  color: var(--muted);
  margin: 9px 0 13px;
}
.layer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 255px;
  overflow-y: auto;
}
.layer-row {
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  background: #21261e;
  border-radius: 6px;
  padding: 6px;
  gap: 7px;
}
.layer-row.selected {
  border-color: #6b804d;
  background: #293320;
}
.layer-select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 2px;
  min-width: 0;
}
.layer-select .thumb {
  width: 26px;
  height: 27px;
  border-radius: 3px;
  flex: none;
}
.layer-select b {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.layer-select small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.layer-tools {
  display: flex;
}
.layer-tools button {
  padding: 4px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
}
.layer-row.hidden-layer {
  opacity: 0.55;
}
.empty-layers {
  padding: 17px 0;
  color: var(--muted);
  font-size: 11px;
}
.range-label {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 11px;
}
.range-label output {
  font:
    10px ui-monospace,
    monospace;
  color: var(--lime);
}
input[type="range"] {
  width: 100%;
  height: 4px;
  accent-color: var(--lime);
  margin: 13px 0 7px;
  cursor: pointer;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 11px;
}
select {
  background: #232a1e;
  color: var(--text);
  border: 1px solid #39432d;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 10px;
  max-width: 145px;
}
.mini-actions {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}
.mini-actions button {
  font-size: 10px;
  padding: 6px 8px;
  flex: 1;
}
.panel-foot {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  color: var(--muted);
}
.panel-foot > span {
  font-size: 26px;
  color: var(--lime);
}
.panel-foot p {
  font-size: 11px;
  margin: 0;
  line-height: 1.8;
}
.panel-foot small {
  display: block;
  font-size: 9px;
}
.gallery-section .section-title {
  padding-bottom: 16px;
}
.gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.gallery-empty {
  width: 100%;
  min-height: 113px;
  border: 1px dashed #343c2d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 25px;
  color: #71825e;
}
.gallery-empty span {
  font-size: 12px;
  color: #a2ac98;
}
.gallery-empty small {
  display: block;
  font-size: 10px;
  margin-top: 8px;
  color: var(--muted);
}
.capture-card {
  min-width: 190px;
  width: 190px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel);
}
.capture-card img,
.capture-card video {
  width: 100%;
  height: 107px;
  object-fit: cover;
  display: block;
  background: #000;
}
.capture-card .caption {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.caption span {
  font-size: 9px;
  color: var(--muted);
}
.caption a {
  font-size: 10px;
  color: var(--lime);
  text-decoration: none;
}
.caption button {
  padding: 2px 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  margin-top: 30px;
  color: #6f7b66;
  font-size: 9px;
  letter-spacing: 1.4px;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #d3f78b;
  color: #1a2310;
  padding: 13px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 35px #0005;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 20;
  max-width: 90%;
  font-size: 12px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  width: min(550px, 92vw);
  background: #1b2118;
  color: var(--text);
  border: 1px solid #526242;
  border-radius: 16px;
  padding: 28px;
  max-height: 85vh;
}
dialog::backdrop {
  background: #050804bd;
  backdrop-filter: blur(6px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-head button {
  font-size: 22px;
  padding: 0 8px;
  background: none;
  border: none;
}
dialog h2 {
  font-size: 24px;
  font-weight: 500;
}
dialog ol {
  padding-left: 22px;
  color: #acb8a2;
  font-size: 12px;
  line-height: 1.8;
}
dialog li {
  padding: 5px 0 5px 4px;
}
dialog li b {
  display: block;
  color: var(--text);
}
dialog p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
dialog > .primary {
  margin-top: 10px;
}
#countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 90px;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 3px 30px #000;
}
#countdown[hidden] {
  display: none;
}
#flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
#flash.fire {
  animation: flash 0.35s ease-out;
}
@keyframes flash {
  from {
    opacity: 0.85;
  }
  to {
    opacity: 0;
  }
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .effect-card .swatch {
    height: 65px;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 16px;
  }
  main {
    padding: 26px 24px 0;
  }
  .panel section {
    padding: 17px 13px;
  }
  .export-note {
    display: none;
  }
  .gesture-strip {
    flex-wrap: wrap;
    row-gap: 15px;
  }
  .gesture-strip > button {
    max-width: none;
    width: 100%;
  }
  .brand small {
    display: none;
  }
  .topbar {
    padding: 0 24px;
  }
  .page-heading p {
    font-size: 11px;
  }
}
@media (max-width: 800px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .effects-section {
    grid-row: span 2;
  }
  .panel-foot {
    grid-column: 1/-1;
  }
  .panel section {
    padding: 20px;
  }
  .effect-card .swatch {
    height: 70px;
  }
  .gesture-strip > button {
    width: auto;
  }
  .gesture-strip {
    margin-bottom: 25px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .gallery-section {
    margin-bottom: 15px;
  }
}
@media (max-width: 540px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
  }
  .brand {
    gap: 8px;
  }
  .brand-mark {
    font-size: 31px;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand strong span {
    font-size: 11px;
    margin-left: 4px;
    letter-spacing: 2px;
  }
  .local-tag {
    display: none;
  }
  .top-right {
    gap: 0;
  }
  main {
    padding: 24px 12px 0;
  }
  .page-heading {
    display: block;
  }
  .page-heading p {
    margin-top: 10px;
    font-size: 11px;
  }
  .page-heading p br {
    display: none;
  }
  h1 {
    font-size: 28px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .stage-toolbar {
    padding: 0 9px;
    height: 43px;
  }
  .stage-toolbar button {
    font-size: 10px;
    padding: 6px 4px;
  }
  .stage-toolbar small {
    font-size: 8px;
    padding-left: 6px;
    margin-left: 0;
  }
  .stage-tag {
    top: 9px;
    left: 10px;
    right: 10px;
    font-size: 8px;
  }
  .stage-bottom {
    bottom: 8px;
    left: 10px;
    right: 10px;
    font-size: 8px;
  }
  .stage-bottom #resolution {
    display: none;
  }
  .capture-bar {
    padding: 11px 8px;
    gap: 6px;
    min-height: 64px;
  }
  .capture-bar button {
    padding: 9px 7px;
    font-size: 10px;
  }
  .capture-group {
    gap: 5px;
  }
  .gesture-strip {
    gap: 12px;
    margin: 18px 5px 24px;
  }
  .gesture-strip > div {
    grid-template-columns: 20px auto;
    gap: 4px;
  }
  .gesture-icon {
    font-size: 20px;
  }
  .gesture-strip b {
    font-size: 10px;
  }
  .gesture-strip small {
    font-size: 9px;
  }
  .gesture-strip > button {
    width: 100%;
  }
  .panel {
    display: block;
  }
  .effect-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .effect-card .swatch {
    height: 70px;
  }
  .panel section {
    padding: 18px;
  }
  .gallery-empty span {
    font-size: 11px;
  }
  .gallery-empty small {
    font-size: 9px;
  }
  footer {
    font-size: 8px;
    letter-spacing: 0.5px;
    gap: 10px;
  }
  .capture-card {
    width: 165px;
    min-width: 165px;
  }
  .capture-card img,
  .capture-card video {
    height: 93px;
  }
}
