:root {
  color-scheme: light;
  --bg: #FFF7F1;
  --panel: #FFFFFF;
  --line: #E8E8F0;
  --fg: #1A1A2E;
  --muted: #666680;
  --orange: #FF6B35;
  --ink: #1A1A2E;
  --orange-text: #B63A11;
  --orange-light: #FFF0EB;
  --r: 20px;
  font-family:
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui,
    sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 82% 21%, #FFE4D560, transparent 53%), var(--bg);
  min-height: 100vh;
}
button,
input,
label,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--orange-text);
  text-underline-offset: 4px;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
label:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
button:active:not(:disabled),
.choose:active {
  transform: translateY(1px);
}
[hidden],
.defs {
  display: none !important;
}
.icon {
  width: 1.22em;
  height: 1.22em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.top {
  border-bottom: 1px solid #F1DED5;
  background: #FFF7F1eb;
}
.top-inner {
  max-width: 1224px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 42px 14px;
}
.brand,
.help,
.quiet,
.primary,
.choose,
.demo-button,
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.brand {
  font-weight: 780;
  letter-spacing: 0.035em;
  text-decoration: none;
  color: var(--fg);
  font-size: 20px;
  line-height: 1;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  object-fit: contain;
  border-radius: 11px;
}
.brand small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.quiet {
  border: 0;
  background: transparent;
  min-height: 44px;
  color: var(--muted);
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.quiet:hover,
.download:hover {
  color: var(--fg);
}
.layout {
  width: min(100%, 1224px);
  margin: 0 auto;
  padding: clamp(38px, 7vw, 86px) 42px max(56px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 1fr);
  gap: 22px 24px;
  align-items: stretch;
}
.lead {
  grid-column: 1/-1;
  margin-bottom: 12px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 760;
}
h2 {
  font-size: clamp(24px, 2.35vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 19px;
  line-height: 1.5;
}
.lead p {
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.55;
}
.lead .developer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--orange-text);
  font-size: 15px;
  font-weight: 700;
}
.lead .developer strong {
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: 0.04em;
}
.developer-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.15fr);
  gap: 8px 30px;
  border: 1px solid #F2CDBD;
  border-radius: var(--r);
  background: #FFF0EB;
  padding: 20px 23px;
  margin-bottom: 28px;
  scroll-margin-top: 20px;
}
.developer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.developer-card .developer {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
  font-size: 12px;
}
.developer-card .developer strong {
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.3;
  letter-spacing: 0.015em;
}
.app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #EEB49F;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.app-link:hover {
  background: #FFF0EB;
  border-color: var(--orange);
}
.lead .developer-intro {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
}
.developer-intro span {
  display: block;
  color: var(--muted);
}
.social-links {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.lead .social-invite {
  margin: 0 0 9px;
  font-size: 13px;
  font-weight: 650;
  color: #A03513;
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.social-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 70px;
  padding: 9px 3px;
  border: 1px solid #EACABB;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}
.social-grid a:hover {
  border-color: var(--orange);
  background: #FFF7F1;
}
.social-grid img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: none;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r);
  min-width: 0;
}
.demo {
  position: relative;
  isolation: isolate;
  min-height: 344px;
  overflow: hidden;
  border-radius: var(--r);
  background: #2B2524;
  display: flex;
  align-items: flex-end;
}
.cover,
.demo-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.cover {
  object-fit: cover;
  object-position: 50% 50%;
}
.demo-shade {
  background: linear-gradient(
    180deg,
    #1A1A2E4F,
    transparent 35%,
    #1A1A2E59 57%,
    #1A1A2EE8
  );
}
.film-tag {
  position: absolute;
  top: 22px;
  left: 24px;
  background: #1A1A2ECF;
  color: #FFFFFF;
  border: 1px solid #FFFFFF43;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
}
.film-tag span {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
}
.demo-foot {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 26px 24px;
}
.overline {
  font-family: "Barlow Semi Condensed", "PingFang TC", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.13em;
  line-height: 1.6;
  font-weight: 740;
  color: var(--muted);
}
.demo-title .overline {
  color: #FFFFFF;
}
.demo h2 {
  font-size: clamp(21px, 2.6vw, 36px);
  font-weight: 730;
  line-height: 1.28;
  margin: 3px 0 6px;
  color: #fff;
}
.hero-meta {
  font-size: 13px;
  color: #F3E8E2;
}
.hero-meta span {
  color: #E1B8A8;
  margin: 0 1px;
}
.demo-button {
  margin-bottom: 1px;
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #FFFFFFD1;
  border-radius: 30px;
  background: #1A1A2E90;
  color: white;
  font-size: 14px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}
.demo-button:hover {
  background: #1A1A2EE8;
}
.demo-button .icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke-width: 1;
}
.setup {
  padding: clamp(22px, 3vw, 35px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.setup h2 {
  margin-bottom: 25px;
}
.durations {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.durations legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 620;
  color: #55556A;
}
.duration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.duration-grid button,
.tabs button {
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 44px;
  background: #FFFFFF;
  font-size: 14px;
  font-weight: 650;
  padding: 0 3px;
  color: #55556A;
}
.duration-grid button:hover,
.tabs button:hover {
  border-color: #E55A26;
}
.duration-grid button[aria-pressed="true"] {
  color: var(--orange-text);
  background: #FFF0EB;
  border-color: #FF6B35;
}
.import-area {
  padding-top: 23px;
  text-align: center;
  position: relative;
}
.primary {
  border: 0;
  background: var(--orange);
  border-radius: 10px;
  min-height: 46px;
  color: var(--ink);
  font-weight: 740;
  padding: 0 18px;
  text-decoration: none;
  font-size: 15px;
}
.primary:hover {
  background: #FF7B4C;
}
.choose {
  width: 100%;
  cursor: pointer;
  min-height: 51px;
  font-size: 17px;
}
.file-input {
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  position: absolute;
  overflow: hidden;
}
.file-input:focus-visible + .choose {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
.formats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  font:
    12px/1.5 "DM Sans",
    "PingFang TC",
    system-ui,
    sans-serif;
  color: var(--muted);
}
.formats i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #E55A26;
}
.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 17px;
  font-size: 12px;
  color: var(--muted);
}
.privacy .icon {
  height: 14px;
  width: 14px;
}
.process,
.editor,
.notice {
  grid-column: 1/-1;
  scroll-margin-top: 14px;
}
.process,
.editor {
  padding: clamp(18px, 3.2vw, 35px);
}
.notice {
  border: 1px solid #EFA89C;
  border-radius: 12px;
  padding: 14px 17px;
  background: #FFF1EE;
  color: #9D2C21;
  line-height: 1.6;
}
.section-head,
.progress-row,
.save-row,
.add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.section-head > div:first-child,
.save-row > div:first-child {
  min-width: 0;
}
.section-head .overline {
  margin-bottom: 3px;
}
.process h2 {
  font-size: 22px;
}
.progress-row {
  margin: 14px 0 8px;
  gap: 12px;
}
.progress-row progress {
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 20px;
  background: var(--line);
  overflow: hidden;
  accent-color: var(--orange);
}
progress::-webkit-progress-bar {
  background: var(--line);
}
progress::-webkit-progress-value {
  background: var(--orange);
  border-radius: 10px;
}
progress::-moz-progress-bar {
  background: var(--orange);
}
.progress-row output,
.clip-count {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--orange-text);
  white-space: nowrap;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.file-name {
  max-width: 64vw;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  letter-spacing: 0.035em;
}
.tabs {
  display: flex;
  gap: 2px;
  background: #F5F5FA;
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 2px;
  flex: none;
}
.tabs button {
  background: transparent;
  border: 0;
  padding: 0 12px;
  min-height: 40px;
}
.tabs button[aria-pressed="true"] {
  background: #FFF0EB;
  color: var(--orange-text);
}
.movie-frame {
  margin-top: 16px;
  aspect-ratio: 16/9;
  background: #1A1A2E;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.movie-frame video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.movie-frame p {
  color: var(--muted);
}
.save-row,
.add-row {
  margin-top: 16px;
  flex-wrap: wrap;
}
.save-row strong {
  font-size: 20px;
  margin-bottom: 2px;
  display: block;
}
.save-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.download {
  min-height: 44px;
  color: #A03513;
  font-size: 14px;
  font-weight: 640;
}
.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  border-top: 1px solid var(--line);
  margin-top: 17px;
  padding-top: 13px;
}
.line-share,
.follow-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.line-share {
  padding: 0 12px;
  border: 1px solid #E8E8F0;
  border-radius: 9px;
  color: #1A1A2E;
  background: #FFFFFF;
}
.line-share:hover {
  border-color: #FF6B35;
}
.follow-link {
  margin-left: auto;
}
.clip-panel {
  border-top: 1px solid var(--line);
  margin-top: 21px;
  padding-top: 20px;
}
.clip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}
.clip {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  min-width: 0;
}
.clip.omit {
  background: #F5F5FA;
}
.clip.omit .clip-jump {
  opacity: 0.55;
}
.clip-jump {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  background: none;
  border: 0;
  flex: 1;
  min-width: 0;
  padding: 6px;
  color: var(--fg);
}
.thumb {
  width: 66px;
  aspect-ratio: 16/10;
  border-radius: 5px;
  object-fit: cover;
  background: #F5F5FA;
  flex: none;
}
.clip-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.clip-text strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.clip-text small {
  color: var(--muted);
  font-size: 12px;
}
.check-area {
  width: 47px;
  min-height: 54px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check-area input {
  width: 19px;
  height: 19px;
  accent-color: var(--orange);
}
.update {
  margin-top: 14px;
}
.outlined {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 13px;
  color: var(--fg);
}
.feedback {
  position: fixed;
  z-index: 4;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 88vw;
  background: #1A1A2E;
  color: #FFFFFF;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  box-shadow: 0 3px 20px #1A1A2E22;
}
dialog {
  background: #FFFFFF;
  border: 1px solid #E8E8F0;
  color: var(--fg);
  border-radius: 16px;
  padding: 21px 24px;
  width: min(460px, calc(100% - 28px));
  max-height: 80dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #1A1A2E99;
}
dialog h2 {
  font-size: 25px;
}
dialog h3 {
  font-size: 15px;
  margin-top: 17px;
}
dialog p {
  font-size: 14px;
  line-height: 1.75;
  margin-top: 4px;
  color: #55556A;
}
dialog a {
  font-size: 13px;
}
.close {
  width: 44px;
}
.credits {
  padding-top: 13px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
@media (max-width: 760px) {
  .top-inner {
    padding: calc(6px + env(safe-area-inset-top))
      max(19px, env(safe-area-inset-right)) 6px
      max(19px, env(safe-area-inset-left));
  }
  .brand {
    font-size: 17px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .help {
    font-size: 13px;
    padding-right: 0;
  }
  .layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 27px max(17px, env(safe-area-inset-right))
      max(35px, env(safe-area-inset-bottom))
      max(17px, env(safe-area-inset-left));
  }
  .lead {
    order: 0;
    margin-bottom: 2px;
  }
  .lead h1 {
    font-size: clamp(34px, 8.7vw, 51px);
  }
  .lead p {
    margin-top: 8px;
    font-size: 15px;
  }
  .developer-card {
    display: block;
    padding: 15px;
    margin-bottom: 23px;
  }
  .developer-card .developer {
    margin: 0;
    font-size: 11px;
  }
  .developer-card .developer strong {
    font-size: 27px;
  }
  .lead .developer-intro {
    margin-top: 9px;
    font-size: 12px;
  }
  .social-links {
    margin-top: 13px;
  }
  .lead .social-invite {
    margin: 0 0 7px;
    font-size: 12px;
  }
  .social-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .social-grid a {
    flex-direction: row;
    min-height: 44px;
    gap: 6px;
    padding: 7px 3px;
    font-size: 11px;
  }
  .social-grid img {
    width: 20px;
    height: 20px;
  }
  .tool-actions {
    gap: 4px 10px;
  }
  .follow-link {
    margin-left: 0;
  }
  .setup {
    order: 1;
    padding: 18px 19px;
  }
  .setup h2 {
    font-size: 21px;
    margin-bottom: 15px;
  }
  .duration-grid {
    gap: 6px;
  }
  .durations legend {
    font-size: 13px;
    margin-bottom: 7px;
  }
  .duration-grid button {
    min-height: 42px;
  }
  .import-area {
    padding-top: 16px;
  }
  .choose {
    min-height: 48px;
  }
  .formats {
    margin-top: 6px;
  }
  .privacy {
    margin-top: 12px;
    padding-top: 10px;
  }
  .demo {
    order: 5;
    min-height: 0;
    aspect-ratio: 1.75;
  }
  .film-tag {
    top: 13px;
    left: 15px;
    font-size: 11px;
    padding: 4px 8px;
  }
  .demo-foot {
    padding: 15px;
    gap: 8px;
  }
  .demo-title .overline {
    font-size: 9px;
  }
  .demo h2 {
    font-size: clamp(18px, 5vw, 27px);
    margin: 2px 0 1px;
  }
  .hero-meta {
    font-size: 11px;
  }
  .demo-button {
    font-size: 13px;
    min-height: 42px;
    padding: 0 11px;
  }
  .process,
  .notice {
    order: 2;
  }
  .editor {
    order: 3;
  }
  .feedback {
    order: 6;
  }
  .clip-list {
    grid-template-columns: 1fr;
  }
  .tabs button {
    padding: 0 10px;
  }
  .save-row,
  .add-row {
    gap: 9px;
  }
  .save-actions {
    gap: 15px;
  }
  .editor > .section-head h2 {
    font-size: 22px;
  }
  .editor {
    padding: 15px;
  }
  .clip-panel {
    margin-top: 16px;
    padding-top: 15px;
  }
  .file-name {
    max-width: 45vw;
  }
  .movie-frame {
    margin-top: 12px;
  }
  .clip-panel .section-head,
  .add-row {
    align-items: flex-start;
  }
  .clip-panel h3 {
    font-size: 17px;
  }
}
@media (max-width: 345px) {
  .layout {
    padding-left: 12px;
    padding-right: 12px;
  }
  .demo-foot {
    padding: 12px;
  }
  .demo-button {
    padding: 0 8px;
  }
  .help {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Short first-use guidance. */
.setup h2 {
  margin-bottom: 8px;
}

.setup-guide {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 18px;
}

@media (max-width: 760px) {
  .setup h2 {
    margin-bottom: 6px;
  }

  .setup-guide {
    margin-bottom: 14px;
  }

  .lead .developer {
    margin: 0 0 10px;
    font-size: 14px;
  }

  .lead .developer strong {
    font-size: 24px;
  }
}

.app-back { display:inline-flex; align-items:center; min-height:44px; flex:none; font-size:14px; font-weight:700; text-decoration:none; }
.top-inner { gap:12px; }
.top-inner .brand { margin-right:auto; }

.app-embedded .top { position: sticky; top: 0; z-index: 30; }
