@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap');
:root{color-scheme:dark;--bg:#111116;--panel:#1b1b24;--text:#f8f6ff;--muted:#b0aebd;--accent:#c9ff66;--line:#393744}
html,.cards{scrollbar-width:none}html::-webkit-scrollbar,.cards::-webkit-scrollbar{display:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:'Golos Text',Arial,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none}button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}header{height:76px;border-bottom:1px solid #ffffff12;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 max(5vw,20px);background:#111116}header nav{display:flex;gap:16px;color:var(--muted)}header nav button{padding:9px;border-radius:8px}.selected{color:var(--text);background:#ffffff12}.brand{font-size:24px;font-weight:900;letter-spacing:-.075em;white-space:nowrap;padding:0}.brand i{font-style:normal;color:var(--accent);font-size:26px;vertical-align:-1px;margin-right:5px}.outline,.primary,.secondary{border-radius:10px;padding:13px 18px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.outline{border:1px solid var(--line)}.primary{background:var(--accent);color:#152005}.secondary{background:#2b2936}.outline:hover,.secondary:hover{background:#373443}.primary:hover{background:#ddff9e}
.wrap{width:min(1360px,90%);margin:auto}.hero{margin-top:24px;border-radius:22px;overflow:hidden;position:relative;display:flex;align-items:flex-end;min-height:440px;isolation:isolate;background:#1b3532}.hero:before{content:'';position:absolute;inset:0;z-index:-2;background:var(--art) center 47%/cover}.hero:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0b1318 0%,#0b1318e5 26%,#0b13181c 74%),linear-gradient(0deg,#070a12b0,transparent 48%)}.hero-content{padding:clamp(24px,5vw,66px);max-width:620px}.eyebrow{font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#dcffa8;font-size:12px}.hero h1{font-size:clamp(48px,7.8vw,112px);line-height:.88;letter-spacing:-.085em;margin:16px 0 20px}.hero p{font-size:clamp(15px,2.1vw,19px);line-height:1.5;max-width:420px;color:#e6e9eb;margin:0 0 24px}.hero-actions,.actions{display:flex;flex-wrap:wrap;gap:10px}
.section{padding:34px 0 52px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}h2{font-size:clamp(23px,3vw,34px);letter-spacing:-.05em;margin:0}.filters{display:flex;gap:7px;flex-wrap:wrap}.filters button{border:1px solid var(--line);border-radius:999px;padding:7px 13px;color:var(--muted);font-size:13px}.filters .active{border-color:#c9ff6670;color:var(--accent);background:#c9ff6610}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.card{text-align:left;padding:0;min-width:0}.tile{position:relative;display:flex;align-items:flex-end;aspect-ratio:1.28;background:#2c2535 var(--art) center/cover;border-radius:13px;overflow:hidden;isolation:isolate;transition:filter .2s}.card:hover .tile{filter:brightness(1.13)}.tile:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#070711e8,transparent 78%);z-index:-1}.tile strong{font-size:clamp(17px,2.65vw,37px);letter-spacing:-.065em;line-height:1;padding:14px;text-wrap:balance}.meta{display:block;color:var(--muted);font-size:13px;margin:9px 2px 0}.empty{padding:36px;background:var(--panel);border-radius:14px;color:var(--muted)}
.watch{max-width:900px;padding:20px 0 50px}.back{padding:9px 0;color:var(--muted);margin-bottom:12px}.screen{position:relative;overflow:hidden;background:#08080b;border-radius:16px}.screen canvas{display:block;width:100%;aspect-ratio:16/9}.controls{display:flex;align-items:center;gap:12px;background:#1c1b23;padding:8px 14px}.controls button{font-size:20px;padding:7px}.controls input{flex:1;min-width:0;accent-color:var(--accent)}.time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.watch h1{font-size:clamp(34px,6vw,68px);letter-spacing:-.07em;line-height:1;margin:20px 0 8px}.watch p{color:var(--muted);line-height:1.45}.watch .actions{margin-top:20px}.chapters{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.chapters button{background:var(--panel);padding:7px 10px;border-radius:7px;color:var(--muted);font-size:13px}
dialog{background:#1c1a24;border:1px solid #514a62;color:var(--text);border-radius:20px;width:min(520px,calc(100% - 24px));padding:24px;max-height:calc(100dvh - 24px);overflow:auto}dialog::backdrop{background:#080811b9;backdrop-filter:blur(6px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:15px;gap:7px}.close{font-size:24px;line-height:1}.dialog-body{display:grid;gap:13px}.dialog-body label{display:grid;gap:6px;font-weight:600;font-size:14px}textarea,input[type=text],input[type=file]{width:100%;border:1px solid var(--line);border-radius:9px;background:#111018;color:var(--text);padding:10px}textarea{resize:vertical;min-height:85px}.plans{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;border:0;padding:0;margin:0}.plans legend{margin-bottom:8px}.plans label{border:1px solid var(--line);padding:9px;border-radius:9px;cursor:pointer;display:grid;gap:4px;text-align:center}.plans label:has(:checked){border-color:var(--accent);color:var(--accent);background:#c9ff6610}.plans input{position:absolute;opacity:0}.plans label:has(:focus-visible){outline:2px solid var(--accent);outline-offset:2px}.note{font-size:12px;color:var(--muted);margin:0;line-height:1.45}.status{color:var(--muted);min-height:1em}
@media(max-width:690px){header{height:62px;gap:8px;padding:0 4%}.brand{font-size:19px}.brand i{font-size:20px;margin-right:2px}header nav{gap:0;font-size:12px}header nav button{padding:7px 5px}header .outline{font-size:11px;padding:8px;white-space:nowrap}.wrap{width:92%}.hero{margin-top:12px;min-height:485px;border-radius:16px}.hero:before{background-position:65% center}.hero:after{background:linear-gradient(0deg,#0b1019 0%,#0b1019dc 25%,#0b101915 72%)}.hero-content{padding:22px}.hero h1{font-size:58px}.section{padding-top:24px}.cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 9px}.tile{aspect-ratio:1.07}.tile strong{font-size:24px}.watch{padding-top:8px}dialog{margin:auto auto 10px}}
@media(max-width:690px){body #app .section .cards{display:grid;grid-auto-flow:column;grid-auto-columns:min(44vw,190px);grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;padding:3px 3px 10px}.section .card{scroll-snap-align:start}.section .card .tile{aspect-ratio:2/3}.section .tile strong{font-size:23px}.hero .outline{background:#1618248f}}
.story-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;padding:22px 0 18px}.story-heading h1{margin:7px 0 0;overflow-wrap:anywhere}.story-heading .meta{margin:0}.story-heading [data-download]{flex-shrink:0}.story-context{border-block:1px solid var(--line);padding:18px 0}.story-context h2,.continue-panel h2{font-size:clamp(20px,3vw,27px)}.story-context p{margin:9px 0;white-space:pre-wrap;overflow-wrap:anywhere}.backstory-edit summary{color:var(--accent);cursor:pointer;font-size:13px;padding:5px 0}.backstory-edit form{padding-top:10px}.backstory-edit button{justify-self:start}.continue-panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:clamp(12px,3vw,24px)}.continue-panel h2{margin-bottom:16px}.continue-panel .plans label{background:#14131b}.continue-panel .plans label:has(:checked){background:#c9ff6610}.continue-panel .note{margin:0}.continue-panel [role=status]:empty{display:none}
@media(max-width:375px){header{height:auto;min-height:62px;flex-wrap:wrap;padding-block:8px}header nav{order:3;width:100%}.story-heading{align-items:flex-start;flex-wrap:wrap}.story-heading [data-download]{padding:9px 12px}.continue-panel .plans label{font-size:12px;padding:8px 3px}}
.story-cover{position:relative;isolation:isolate;min-height:clamp(355px,60vw,510px);display:flex;flex-direction:column;justify-content:space-between;border-radius:18px 18px 0 0;overflow:hidden;margin-bottom:4px}.story-cover::before,.story-cover::after{content:'';position:absolute;inset:0;pointer-events:none}.story-cover::before{z-index:-2;background:#20242e var(--art) center 42%/cover;animation:poster-enter .48s ease-out both}.story-cover::after{z-index:-1;background:linear-gradient(180deg,#0d0e167d 0%,transparent 25%,transparent 37%,#11111685 69%,var(--bg) 100%)}.story-cover .back{align-self:flex-start;background:#111116a6;color:var(--text);border:1px solid #ffffff26;border-radius:999px;padding:8px 12px;margin:14px}.story-cover .story-heading{padding:26px 22px 14px}.story-cover .story-heading h1{max-width:760px;font-size:clamp(33px,7vw,76px);text-shadow:0 3px 16px #0b0b0b75}.story-context+.continue-panel{margin-top:18px}@keyframes poster-enter{from{opacity:.45;transform:scale(1.035)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.story-cover::before{animation:none}}@media(max-width:480px){.story-cover .story-heading{padding-inline:14px}.story-cover .back{margin:10px}}
/* Main navigation */
.site-header {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:16px;
  padding:12px max(5vw,20px);
  min-height:76px;
  height:auto;
}
.site-header .brand {
  display:inline-flex;
  align-items:center;
  gap:8px;
  justify-self:start;
  min-height:44px;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.055em;
}
.site-header .brand img {
  flex:none;
  width:29px;
  height:29px;
  border-radius:8px;
}
.site-header nav {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px;
  padding:4px;
  border:1px solid #ffffff10;
  border-radius:14px;
  background:#191921;
}
.site-header nav button {
  padding:0 17px;
  min-height:44px;
  white-space:nowrap;
  font-size:13px;
  font-weight:600;
  border-radius:10px;
}
.site-header nav button[aria-current="page"] {background:#34323e;color:var(--text)}
.site-header nav button:hover {color:var(--text)}
.site-header .profile-nav {
  justify-self:end;
  min-height:44px;
  padding:0 14px;
  border-radius:12px;
  white-space:nowrap;
  font-size:13px;
}
.site-header .profile-nav[aria-current="page"] {background:#c9ff6614;border-color:#c9ff6659;color:var(--accent)}
@media(max-width:690px){
  .site-header {grid-template-columns:1fr auto;gap:8px 10px;padding:9px 4% 10px}
  .site-header nav {grid-column:1/-1;grid-row:2;width:100%;order:0}
  .site-header .brand {font-size:19px;gap:6px}
  .site-header .brand img {width:26px;height:26px}
  .site-header .profile-nav {font-size:12px;padding-inline:12px}
}
.profile-page{max-width:520px;padding:clamp(16px,5vw,36px) 0 36px}
.profile-account{padding:14px;border:1px solid #414438;border-radius:18px;background:linear-gradient(135deg,#23291d,#1a1b22 64%)}
.profile-heading{display:flex;align-items:center;gap:12px}
.profile-heading h1{margin:0;font-size:clamp(24px,7vw,34px);line-height:1.1;letter-spacing:-.045em}
.profile-avatar{width:46px;height:46px;display:grid;place-items:center;flex:none;border-radius:14px;background:#c9ff6620;color:var(--accent);font-size:25px}
.profile-page p{color:var(--muted);line-height:1.45;font-size:.875rem}
.profile-heading p{margin:3px 0 0}
.profile-account-status{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin-top:12px;padding-top:10px;border-top:1px solid #ffffff18;font-size:.875rem}
.profile-account-status span{color:var(--muted);font-size:.8125rem}
.profile-panel{margin-top:17px}
.profile-panel h2{margin:0 0 6px 2px;font-size:.875rem;font-weight:600;color:var(--muted);letter-spacing:0}
.profile-group{background:var(--panel);border:1px solid #ffffff18;border-radius:15px}
.profile-group > * + *{border-top:1px solid #ffffff10}
.profile-row{display:flex;align-items:center;gap:9px;min-height:50px;width:100%;padding:7px 12px;text-align:left;font-size:.875rem}
.profile-row:hover{background:#ffffff07}
.profile-row:focus-visible{outline-offset:-3px}
.profile-row-icon{display:grid;place-items:center;flex:0 0 29px;height:29px;border-radius:8px;background:#ffffff0c;color:#dee3d6;font-size:1rem;font-weight:700}
.profile-row strong{flex:1;min-width:0}
.profile-value{color:var(--muted);font-variant-numeric:tabular-nums}
.profile-row::after{content:'';width:6px;height:6px;flex:none;margin:0 3px;border:solid var(--muted);border-width:0 1px 1px 0;transform:rotate(-45deg)}
.profile-disclosure summary{cursor:pointer;list-style:none}
.profile-disclosure summary::-webkit-details-marker{display:none}
.profile-disclosure summary::after{transform:rotate(45deg)}
.profile-disclosure[open] summary::after{transform:rotate(225deg)}
.profile-disclosure p{margin:0;padding:0 13px 11px 50px}
.hero{background:#1b1128}
.hero::before{background-size:auto 110%;background-repeat:no-repeat;background-position:right 38%}
.hero::after{background:linear-gradient(90deg,#180e23 0%,#180e23 29%,#180e23c7 47%,#180e2300 80%),linear-gradient(0deg,#0c0716a0,transparent 54%)}
.section .filters{margin-bottom:16px}
.catalog-row+.catalog-row{margin-top:22px}
.row-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 3px 8px}
.row-heading h3{margin:0;font-size:clamp(19px,2.6vw,28px);letter-spacing:-.045em}
.carousel-nav{display:flex;gap:6px}
.carousel-nav button{padding:7px 11px;min-height:38px}
body #app .section .catalog-cards{grid-auto-flow:column;grid-auto-columns:clamp(160px,19vw,245px);grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:3px;padding:3px 3px 10px}
.catalog-cards .card{scroll-snap-align:start;align-self:start}
.section .catalog-cards .tile{aspect-ratio:1;background-position:center}
.catalog-cards .tile::before{content:none}
.catalog-cards .card>strong{display:block;font-size:clamp(14px,1.7vw,19px);line-height:1.22;letter-spacing:-.025em;padding:8px 2px 0;overflow-wrap:anywhere}
@media(max-width:690px){
  .hero::before{background-size:100% auto;background-position:center top}
  .hero::after{background:linear-gradient(0deg,#180e23 0%,#180e23 41%,#180e2300 75%)}
  .hero h1{font-size:clamp(33px,11.8vw,64px);overflow-wrap:anywhere}
  body #app .section .catalog-cards{grid-auto-columns:calc((100% - 9px)/2);column-gap:9px}
}
/* Editable chapter plan */
#chapter-plan{width:min(560px,calc(100% - 16px));padding:18px;overflow:hidden}
#chapter-plan[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr);height:min(760px,calc(100dvh - 24px))}
#chapter-plan .dialog-head{margin-bottom:7px}
#chapter-plan .plan-summary{margin-bottom:14px}
.chapter-plan-form{display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0}
.chapter-plan-list{display:grid;gap:12px;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding:2px 3px 12px}
.chapter-plan-list label{display:grid;gap:6px;min-width:0}
.chapter-plan-list label>span{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:700;font-size:14px}
.chapter-plan-list small{color:var(--muted);font-weight:400}
.chapter-plan-list textarea{font-size:14px;min-height:104px;max-height:220px;line-height:1.4;field-sizing:content}
.chapter-plan-actions{display:flex;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.chapter-plan-actions .primary{flex:1}
@media(max-width:375px){.chapter-plan-actions button{padding-inline:10px;font-size:13px}}
.style-picker,.reference-photos{border:0;padding:0;margin:0;min-width:0}
.style-picker legend,.reference-photos legend{margin-bottom:8px;font-size:14px;font-weight:700}
.style-examples{display:grid;grid-auto-flow:column;grid-auto-columns:116px;gap:7px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-padding-inline:2px;padding:2px}
.dialog-body .style-choice{position:relative;display:flex;flex-direction:column;gap:5px;padding:4px;border:1px solid var(--line);border-radius:10px;background:#14131b;cursor:pointer;scroll-snap-align:start;font-size:12px;line-height:1.2}
.style-choice:has(input:checked){border-color:var(--accent);color:var(--accent)}
.style-choice:has(input:focus-visible){outline:2px solid var(--accent)}
.style-choice input{position:absolute;opacity:0}
.style-choice img,.style-automatic{display:block;height:65px;width:100%;object-fit:cover;border-radius:6px}
.style-automatic{display:grid;place-items:center;background:#272532;color:var(--muted);font-size:23px}
.style-choice>span:last-child{padding:2px 3px 4px}
.style-controls{display:flex;justify-content:flex-end;gap:5px;margin-top:6px}
.style-controls button{padding:4px 10px;min-height:29px}
.reference-photos label+label{margin-top:8px}
.reference-photos label small{color:var(--muted);font-weight:400}
#dialog{width:min(490px,calc(100% - 12px));padding:0;overflow:hidden;background:#1a1922;border-color:#3b3948;border-radius:18px}
#dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr);max-height:calc(100dvh - 16px)}
#dialog .dialog-head{align-items:center;margin:0;padding:12px 15px;border-bottom:1px solid #ffffff0c}
#dialog .dialog-head h2{font-size:22px}
#dialog .close{padding:0;width:34px;height:34px;border-radius:9px;background:#272532;font-size:21px}
#dialog .dialog-body{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:0;min-height:0}
.create-fields{display:grid;gap:14px;min-height:0;padding:14px 15px;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
.create-fields::-webkit-scrollbar,.style-examples::-webkit-scrollbar{display:none}
.create-fields label{font-size:13px}
.create-fields input[type=text],.create-fields textarea{font-size:14px;padding:9px 10px}
.create-fields textarea{min-height:68px}
.create-actions{display:grid;gap:5px;padding:10px 15px 12px;border-top:1px solid #ffffff10;background:#1e1c27}
.create-actions>.note:last-child{text-align:center;font-size:11px}
.create-actions [role=status]:empty{display:none}
#dialog .style-picker{position:relative}
#dialog .style-picker legend{padding-right:72px}
#dialog .style-examples{grid-auto-columns:clamp(85px,37%,132px)}
#dialog .style-choice{border-radius:8px}
#dialog .style-choice img,#dialog .style-automatic{height:53px}
#dialog .style-choice>span:last-child{font-size:11px;padding:1px 3px 4px}
#dialog .style-controls{position:absolute;top:-34px;right:0;margin:0}
#dialog .style-controls button{padding:0;width:29px;height:26px;min-height:26px;border-radius:7px}
.create-fields .photo-choice{position:relative;display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid var(--line);background:#21202a;border-radius:10px;padding:8px 10px;min-height:49px;cursor:pointer}
.photo-choice>span:first-of-type{display:grid;gap:2px;min-width:0}
.photo-choice [data-photo-name]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.photo-choice input[type=file]{position:absolute;inset:0;width:100%;height:100%;padding:0;opacity:0;cursor:pointer}
.photo-choice:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.photo-add{display:grid;place-items:center;flex:0 0 23px;height:23px;border-radius:7px;background:#302e3c;font-size:17px;color:var(--muted)}
.photo-choice.has-photo .photo-add{background:#c9ff661a;color:var(--accent)}
.result-player{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#08080b}
.result-player .screen{border-radius:0}
.result-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 19px}
.result-actions button{min-height:44px}
.story-result .status{margin:0 0 12px;font-size:13px}
.watch .status:empty{display:none}
#chapter-plan .plan-summary{display:grid;gap:3px}
.plan-summary strong{font-size:14px;color:var(--text);overflow-wrap:anywhere}
.chapter-plan-list label{background:#25232e;border:1px solid #ffffff10;border-radius:12px;padding:9px}
.chapter-plan-actions{display:grid;grid-template-columns:auto 1fr}
.chapter-plan-actions .note{grid-column:1/-1;text-align:center}
@media(max-width:420px){
  .result-actions button{flex:1;padding-inline:8px;font-size:13px;white-space:nowrap}
  #chapter-plan .dialog-head h2{font-size:21px}
}
.video-catalog{padding-top:clamp(12px,3vw,24px)}
#trends-title{max-width:540px;margin:0 auto 12px;font-size:clamp(1.25rem,4.5vw,1.65rem);letter-spacing:-.035em}
.video-catalog .row-heading h2{font-size:clamp(19px,2.4vw,28px);letter-spacing:-.035em}
.clip-play,.clip-length{position:absolute;display:grid;place-items:center;background:#0b0b11dc;color:#fff}
.clip-play{inset:0;margin:auto;border-radius:50%;width:42px;height:42px;padding-left:3px;font-size:15px;border:1px solid #ffffff50}
.clip-length{right:8px;bottom:8px;border-radius:6px;padding:4px 7px;font-size:12px;font-weight:700}
.video-tile .meta{margin-top:5px}
#video-template {
  width:min(790px,calc(100% - 32px));
  max-height:calc(100dvh - 32px);
  padding:0;
  margin:auto;
  background:#191820;
  border-color:#ffffff26;
  border-radius:24px;
  box-shadow:0 24px 90px #08070cb3;
  overflow:hidden;
}
#video-template[open] { display:grid; grid-template-rows:auto minmax(0,1fr); }
#video-template .dialog-head { align-items:center; margin:0; padding:16px 22px; border-bottom:1px solid #ffffff12; }
#video-template h2 { font-size:clamp(20px,4vw,28px); line-height:1.1; overflow-wrap:anywhere; }
#video-template .close { width:44px; height:44px; flex:none; border-radius:50%; background:#ffffff0e; color:var(--muted); }
#video-template .close:hover { background:#ffffff19; color:var(--text); }
.clip-form { display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; }
#video-template [hidden] { display:none; }
.clip-preparing { padding:clamp(14px,4vw,24px); overflow:auto; }
.clip-preparing-header { display:flex; align-items:center; gap:12px; min-width:0; }
.clip-preparing-header h3 { margin:0; font-size:21px; letter-spacing:-.025em; }
.clip-preparing-status { margin:5px 0 0; color:var(--muted); line-height:1.4; font-size:14px; }
.clip-preparing-icon { flex:none; width:32px; height:32px; border:3px solid #c9ff6633; border-top-color:var(--accent); border-radius:50%; animation:clip-spin .8s linear infinite; }
.clip-preparing.is-ready .clip-preparing-icon { display:grid; place-items:center; border:0; background:#c9ff6618; color:var(--accent); animation:none; }
.clip-preparing.is-ready .clip-preparing-icon::after { content:'✓'; }
.clip-preparing.has-error .clip-preparing-icon { display:none; }
.clip-progress { margin:18px 0; }
.clip-progress > div { display:flex; justify-content:space-between; gap:12px; font-size:14px; }
.clip-progress progress { display:block; width:100%; height:10px; margin-top:8px; accent-color:var(--accent); }
.ad-slot { min-height:50px; }
.ad-slot[hidden] { display:none; }
.page-ad { width:100%; }
.catalog-ad { grid-column:1/-1; }
.native-catalog-ad { min-height:90px; }
.dialog-ad { margin-block:12px; }
.preparation-ad { margin-block:16px; }
.clip-preparing .outline { min-height:44px; }
#video-result{width:min(620px,calc(100% - 20px));padding:16px;background:#191820}
#video-result .dialog-head{align-items:center;margin-bottom:12px}
#video-result .dialog-head p{margin:4px 0 0;color:var(--muted);font-size:.875rem;overflow-wrap:anywhere}
#video-result .close{flex:none;width:44px;height:44px;border-radius:50%;background:#ffffff0e}
#video-result video{display:block;width:100%;max-height:52dvh;border-radius:12px;background:#0a090e}
.video-result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.video-result-actions>*{min-height:44px;padding-inline:6px;text-align:center;font-size:.875rem}
#video-result .note:not(:empty){margin-top:10px}
@keyframes clip-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .clip-preparing-icon { animation:none; } }
.clip-content { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:22px; overflow:auto; padding:20px 22px; scrollbar-width:thin; }
.clip-preview { min-width:0; margin:0; }
#video-template video { display:block; width:100%; aspect-ratio:16/10; max-height:38dvh; object-fit:contain; background:#0a090e; border-radius:14px; }
.clip-preview figcaption { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:13px; color:var(--muted); margin-top:9px; }
.clip-preview figcaption span { padding:3px 9px; border-radius:20px; background:#ffffff0d; color:var(--text); white-space:nowrap; }
.clip-preview-status { font-size:13px; color:var(--muted); }
.clip-preview-status:not(:empty) { margin-top:8px; }
.clip-preview-status a { color:var(--accent); }
.clip-fields { display:grid; align-content:start; gap:16px; min-width:0; }
.clip-upload,.clip-wishes { display:grid; gap:7px; min-width:0; font-size:14px; font-weight:700; }
.clip-file { position:relative; display:flex; align-items:center; gap:10px; padding:10px; border:1px dashed #ffffff38; border-radius:12px; background:#ffffff05; min-width:0; }
.clip-file:hover,.clip-file:focus-within,.clip-file.has-file { border-color:#c9ff66a6; background:#c9ff6609; }
.clip-file:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.clip-file input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.clip-file-icon { display:grid; place-items:center; flex:0 0 32px; height:32px; border-radius:8px; background:#c9ff661b; color:var(--accent); font-size:21px; }
.clip-file-text { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.clip-file-text small { display:block; }
.clip-fields small { font-size:12px; color:var(--muted); font-weight:400; }
.clip-wishes > span { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 8px; }
.clip-wishes textarea { background:#100f16; font-size:16px; font-weight:400; min-height:92px; }
.clip-wishes textarea::placeholder { color:#a29fad; opacity:1; }
.clip-footer { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:9px 14px; padding:13px 22px 16px; border-top:1px solid #ffffff12; background:#1e1d26; }
.clip-total { display:grid; gap:2px; font-size:13px; color:var(--muted); }
.clip-total strong { font-size:24px; line-height:1.1; color:var(--text); }
.clip-footer .primary { min-height:44px; }
.clip-footer .note,.clip-footer .status { grid-column:1 / -1; }
.clip-footer .status { font-size:13px; }
.clip-footer .status:empty { min-height:0; margin-top:-9px; }
@media(max-width:570px) {
  #video-template { width:calc(100% - 12px); max-height:calc(100dvh - 12px - env(safe-area-inset-bottom)); margin:auto auto max(6px,env(safe-area-inset-bottom)); border-radius:19px; }
  #video-template .dialog-head { padding:8px 13px; }
  .clip-content { grid-template-columns:minmax(0,1fr); gap:17px; padding:12px 13px 16px; }
  #video-template video { max-height:32dvh; }
  .clip-footer { padding:10px 13px 12px; }
  .clip-footer .primary { padding-inline:10px; font-size:13px; }
  .clip-total { font-size:12px; }
  .clip-total strong { font-size:20px; }
}
.video-row-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.video-row-actions>a{color:var(--accent);font-size:.875rem;font-weight:600;padding:8px 0;white-space:nowrap;text-decoration:none}
.video-row-actions>a:hover,.video-row-actions>a:focus-visible{text-decoration:underline}
body #app .video-catalog .catalog-cards{grid-auto-columns:clamp(185px,22vw,290px)}
.video-catalog.video-category{padding-top:0}
.video-category-bar{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:12px;max-width:540px;margin:0 auto 10px;padding:10px 0;background:var(--bg);border-bottom:1px solid var(--line)}
.video-category-bar h1{margin:0;font-size:clamp(1.05rem,4.5vw,1.5rem);line-height:1.15;overflow-wrap:anywhere}
.video-category-bar button{flex:none;width:44px;height:44px;padding:0;font-size:1.25rem;line-height:1}
.video-feed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px;max-width:540px;margin-inline:auto}
.video-feed .tile{aspect-ratio:1;border-radius:10px}
.video-feed .card>strong{display:block;padding-top:6px;font-size:.95rem;line-height:1.25}
.video-feed .meta{margin-top:4px}
.video-tile .tile>img,.catalog-autoplay{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.video-feed .tile>img,
.video-feed .catalog-autoplay{object-position:center top}
.catalog-autoplay{opacity:0;pointer-events:none}
.video-tile.is-playing .catalog-autoplay{opacity:1}
.video-tile.is-playing .clip-play{opacity:0}
.video-tile .clip-play,.video-tile .clip-length{z-index:1}
@media(max-width:690px){
  body #app .video-catalog .catalog-cards{grid-auto-columns:55%}
  .video-catalog .carousel-nav{display:none}
}
