:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --ink: #1f1a17;
  --muted: #6d625a;
  --line: #e8dfd4;
  --accent: #b5532f;
  --accent-ink: #ffffff;
  --accent-soft: #f6e4da;
  --ok: #2f7a4f;
  --warn: #a66a00;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 26, 23, .06), 0 8px 24px rgba(31, 26, 23, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171412; --surface: #211d1a; --ink: #f3ece4; --muted: #b3a79c; --line: #362f2a;
    --accent: #e07a52; --accent-soft: #3a2a22; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav { display: flex; gap: 16px; align-items: center; margin-inline-start: auto; }
.top nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 10px 18px; border-radius: 999px; font: 500 .95rem var(--sans);
  cursor: pointer; text-decoration: none; transition: transform .05s, background .15s; }
.btn:hover { background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.icon { padding: 6px 10px; }
input, textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
label { display: block; font-size: .875rem; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
label.check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; margin: 0 0 16px; cursor: pointer; }
label.check input { width: auto; flex: none; margin: 3px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 8px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step { margin: 24px 0; }
.step-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.step-n { font-family: var(--serif); color: var(--accent); font-size: 1.3rem; }

/* landing */
.hero { padding-top: 72px; padding-bottom: 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.film { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #2b2420; position: relative; box-shadow: var(--shadow); }
.film .frame { position: absolute; inset: 0; display: grid; place-items: center; color: #f3ece4; font-family: var(--serif);
  font-size: 1.4rem; opacity: 0; animation: cycle 12s infinite; }
.film .frame:nth-child(2) { animation-delay: 3s; }
.film .frame:nth-child(3) { animation-delay: 6s; }
.film .frame:nth-child(4) { animation-delay: 9s; }
.film .frame span { position: absolute; bottom: 10%; font-size: 1rem; letter-spacing: .08em; opacity: .9; }
@keyframes cycle { 0% { opacity: 0 } 8% { opacity: 1 } 25% { opacity: 1 } 33% { opacity: 0 } 100% { opacity: 0 } }
.frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.frames img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 640px) { .frames { grid-template-columns: repeat(2, 1fr); } }
.note { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid #b5532f; border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.price .approx { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.sample-film { margin: 24px 0 8px; max-width: 720px; }
.sample-note { margin-top: 8px; }
.film video { width: 100%; height: 100%; object-fit: cover; display: block; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.price { font-family: var(--serif); font-size: 2.2rem; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; margin-top: 24px; }
.pack-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pack-h h3 { margin: 0; }
.pack .price { margin: 8px 0 2px; }
.pack-size { font-weight: 500; margin: 0 0 12px; }
.pack p.small { margin: 8px 0 0; }
.pack.best { border-color: var(--accent); }
.pack-all { max-width: 52em; margin-top: 24px; }
.plain { list-style: none; padding: 0; margin: 0; }
.answer { max-width: 46em; font-size: 1.05rem; }
.crumbs { font-size: .875rem; color: var(--muted); padding-top: 24px; }
.crumbs a { color: var(--muted); }
.page { max-width: 760px; padding-top: 24px; padding-bottom: 56px; }
.page h2 { margin-top: 1.4em; }
.cta { margin: 28px 0; }
footer .row a { color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
footer { padding: 40px 0; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }

/* app */
.auth { max-width: 420px; margin: 56px auto; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; text-decoration: none; color: inherit; }
.pcard .cover { aspect-ratio: 16 / 9; background: var(--accent-soft) center / cover no-repeat; }
.pcard .body { padding: 14px 16px; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge.err { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.photo { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.photo .img { aspect-ratio: 16 / 9; background: #2b2420 center / cover no-repeat; position: relative; }
.photo.v916 .img, .photo-up.v916 .img { aspect-ratio: 9 / 16; }
.photo.v11 .img, .photo-up.v11 .img { aspect-ratio: 1; }
.photo .img .n { position: absolute; top: 6px; inset-inline-start: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; padding: 1px 8px; border-radius: 999px; }
.photo .img .warn { position: absolute; bottom: 6px; left: 6px; right: 6px; background: rgba(166,106,0,.9); color: #fff; font-size: .72rem; padding: 3px 8px; border-radius: 8px; }
.photo .ctl { padding: 8px; display: grid; gap: 6px; }
.photo-up { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; overflow: hidden; }
.photo-up .img { aspect-ratio: 16 / 9; background: #2b2420 center / cover no-repeat; opacity: .55; }
.photo-up .ctl { padding: 8px; display: grid; gap: 6px; }
.photo-up .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-up .bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.photo-up .bar > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.photo-up .st { color: var(--muted); }
.photo-up.failed { border-color: var(--warn); }
.photo-up.failed .st { color: var(--warn); }
.photo-up.failed .bar { display: none; }
.photo .ctl input { padding: 6px 8px; font-size: .9rem; }
.photo .ctl .part-add { justify-self: start; color: var(--muted); font-size: .78rem; padding: 3px 10px; }
.photo .ctl input.part { font-size: .82rem; border-color: var(--accent); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .6s; }
.player { width: 100%; border-radius: 12px; background: #000; display: block; }
.player.v916 { max-width: 360px; margin: 0 auto; }
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.scene { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.scene .media { aspect-ratio: 16 / 9; background: #2b2420 center / cover no-repeat; display: grid; place-items: center; }
.scene.v916 .media { aspect-ratio: 9 / 16; }
.scene.v11 .media { aspect-ratio: 1; }
.scene video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.scene .wait { background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; padding: 4px 12px; border-radius: 999px; }
.scene .ctl { padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.scene .ctl .btn { flex: none; white-space: nowrap; }
.title-preview { width: 100%; max-width: 480px; max-height: 420px; object-fit: contain; object-position: left top; border-radius: 12px; display: block; }
.seg { max-width: 100%; }
.song { margin-top: 6px; gap: 8px; }
.seg.wrap { flex-wrap: wrap; border-radius: 14px; }
.seg.wrap button { white-space: nowrap; }
.tracks { display: grid; gap: 6px; margin-bottom: 6px; }
.track { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.track.on { border-color: var(--accent); background: var(--accent-soft); }
.track .pick { display: none; }
.track.on .pick { display: inline-block; background: var(--accent); color: #fff; }
.track .play { flex: none; width: 34px; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; }
.share { margin-top: 16px; }
.share input { flex: 1; min-width: 200px; max-width: 520px; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
#account { margin-top: 24px; }
#account summary { cursor: pointer; }
.watch { max-width: 900px; padding-bottom: 56px; }
.watch h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; z-index: 50; max-width: calc(100% - 32px); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 28px; }
  .steps3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .top nav .hide-sm { display: none; }
  .card { padding: 18px; }
}

/* Languages: the menu in the footer, the menu in the app, fonts and right-to-left pages. */
.langs { position: relative; }
.langs summary { cursor: pointer; list-style: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs-list { position: absolute; bottom: calc(100% + 8px); inset-inline-end: 0; z-index: 10; display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 2px 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.langs-list a { padding: 4px 0; white-space: nowrap; }
.langs-list a[aria-current] { font-weight: 600; }
.lang-pick { width: auto; padding: 4px 8px; font-size: .85rem; border-radius: 999px; }
:lang(he) { --serif: "Frank Ruhl Libre", "David", "Times New Roman", serif; --sans: "Heebo", "Arial Hebrew", Arial, system-ui, sans-serif; }
:lang(ar) { --serif: "Noto Naskh Arabic", "Amiri", "Times New Roman", serif; --sans: "Noto Sans Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif; }
:lang(ja) { --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif; }
:lang(ko) { --serif: "Noto Serif KR", "AppleMyungjo", "Batang", serif; --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
:lang(zh-Hant) { --serif: "Noto Serif TC", "PMingLiU", "Songti TC", serif; --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
:lang(ja) body, :lang(ko) body, :lang(zh-Hant) body { line-height: 1.75; word-break: normal; line-break: strict; }
:lang(ko) body { word-break: keep-all; }
[dir="rtl"] .title-preview { object-position: right top; }
[dir="rtl"] .film .frame span, :lang(ar) h1 { letter-spacing: 0; }

/* Feedback: stars for the film, the reason for a retry, the idea link, the admin list. */
.rate { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 520px; }
.rate label { display: block; font-weight: 500; margin-bottom: 4px; }
.stars { display: flex; gap: 2px; margin-bottom: 8px; }
.stars button { border: 0; background: none; font-size: 1.8rem; line-height: 1; padding: 2px 4px; cursor: pointer; color: var(--line); }
.stars button.on { color: #e0a526; }
.stars button:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
.rate textarea { margin-bottom: 8px; }
.retry { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.retry p { margin: 0; }
.retry .seg button { padding: 6px 10px; font-size: .82rem; }
.app-foot { padding: 40px 16px 32px; text-align: center; }
.linkish { border: 0; background: none; color: var(--muted); font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; }
dialog.idea { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  width: min(520px, calc(100vw - 32px)); padding: 20px; box-shadow: var(--shadow); }
dialog.idea::backdrop { background: rgba(0, 0, 0, .4); }
.fb-sum { display: grid; gap: 4px; margin-top: 16px; padding: 14px 16px; }
.fb { padding: 12px 16px; margin-bottom: 10px; display: grid; gap: 6px; }
.fb[data-status="done"] { opacity: .6; }
.fb select, .fb-sum ~ .row select { width: auto; }
.fb-text { margin: 0; white-space: pre-wrap; }
/* Step 2 of the film page opens and closes (it is optional before the free preview). */
#options > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
#options > summary::-webkit-details-marker { display: none; }
#options > summary::after { content: "+"; margin-inline-start: auto; font-size: 1.4rem; line-height: 1; color: var(--muted, #777); }
#options[open] > summary { margin-bottom: 12px; }
#options[open] > summary::after { content: "−"; }
