:root {
  color-scheme: dark;
  --bg: #101414;
  --panel: #1c2423;
  --raised: #25302d;
  --line: #344540;
  --text: #f3f6f4;
  --muted: #9bb0a7;
  --mint: #cfeae1;
  --green: #b2d6bd;
  --danger: #e9a49c;
  font-family: 'Golos Text', 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #080d0c; scrollbar-width: none; overscroll-behavior: none; overflow-x: clip; }
html::-webkit-scrollbar { display: none; }
/* No rubber-band bounce or sideways wobble inside the Telegram webview. */
body { margin: 0; background: #080d0c; color: var(--text); overscroll-behavior: none; overflow-x: clip; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--mint); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
button, a, input, textarea, select { touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.18; letter-spacing: -.7px; font-weight: 700; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.4px; }
h3 { font-size: 16px; line-height: 1.35; }
p { line-height: 1.5; }
small { color: var(--muted); font-size: 12px; line-height: 1.45; }
strong { font-weight: 600; }
svg { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.layout { position: relative; max-width: 430px; margin: auto; min-height: 100svh; background: var(--bg); }
/* Telegram fullscreen draws its own buttons over the page top: keep the page header below them. */
.workspace { padding: calc(26px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)) 16px calc(108px + env(safe-area-inset-bottom, 0px)); min-width: 0; }
.topbar { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; min-height: 38px; }
.topbar:has(.back-btn) h1 { font-size: 24px; }
.topbar > h1.grow { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-subtitle { color: var(--muted); font-size: 13px; margin-top: 5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.icon-button, .back-btn { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; }
.back-btn { background: var(--panel); border: 1px solid #283733; }
.icon-button.mint { background: var(--mint); color: var(--bg); border-radius: 14px; }
.mobile-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #101818; border-top: 1px solid #24302c; padding: 9px 8px calc(10px + env(safe-area-inset-bottom, 0px)); }
.mobile-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11px; min-height: 56px; padding: 5px 0; }
.mobile-nav svg { width: 25px; height: 25px; }
.mobile-nav button.active { color: var(--mint); font-weight: 600; }
.mobile-nav button.active svg { stroke-width: 2; }
.hero { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; text-align: left; background: var(--mint); color: #101b16; border-radius: 18px; padding: 24px 20px; min-height: 124px; }
.hero h2 { font-size: 27px; font-weight: 700; letter-spacing: -.9px; }
.hero p { font-size: 13px; color: #314b40; margin-top: 9px; max-width: 220px; }
.round-plus { flex-shrink: 0; border-radius: 50%; border: 1px dashed #405c50; width: 76px; height: 76px; display: grid; place-items: center; }
.round-plus svg { background: #10201a; color: var(--mint); border-radius: 50%; width: 40px; height: 40px; padding: 9px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 26px 0 13px; }
.section-head h2 { font-size: 19px; }
.section-head p { color: var(--muted); font-size: 13px; }
.button { min-height: 44px; padding: 12px 16px; border-radius: 12px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; line-height: 1.3; text-align: center; }
.button.primary { background: var(--mint); color: #12211a; min-height: 50px; }
.button.secondary { background: #2b3932; color: var(--text); }
.button.outline { border: 1px solid var(--line); background: transparent; }
.button.subtle { color: var(--muted); background: none; font-size: 12px; padding: 7px 0; min-height: 44px; font-weight: 500; }
.button.subtle svg { width: 18px; height: 18px; }
.button.wide { width: 100%; }
.button.danger { background: #392723; color: var(--danger); }
.space-top { margin-top: 18px; }
.project-list, .source-list, .clip-grid { display: grid; gap: 10px; }
.project-row, .source-row, .publication-row { display: flex; align-items: center; width: 100%; text-align: left; gap: 13px; border-radius: 16px; background: var(--panel); padding: 10px; }
.project-row { min-height: 92px; }
.project-row img, .source-row img { width: 83px; height: 72px; object-fit: cover; flex-shrink: 0; border-radius: 10px; }
.project-row strong, .source-row strong, .publication-row strong { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.project-row small, .source-row small, .publication-row small { display: block; margin-top: 4px; }
.project-row > svg, .source-row > svg, .publication-row > svg { color: var(--muted); width: 19px; }
.source-row { min-height: 82px; }
.source-row img { height: 64px; }
.search-row { display: flex; gap: 12px; margin-bottom: 19px; }
.search-field { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; background: var(--panel); border: 1px solid #293a33; border-radius: 14px; padding: 0 13px; color: var(--muted); }
.search-field input { min-width: 0; width: 100%; background: transparent; color: var(--text); border: 0; min-height: 46px; outline-offset: 0; }
.project-account { background: var(--panel); border-radius: 14px; padding: 13px; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; }
.project-account strong { font-size: 14px; display: block; }
.project-account small { display: block; margin-top: 4px; }
.account-mark { background: #344039; border-radius: 50%; width: 37px; height: 37px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.new-cut { margin-top: 16px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid #2b3832; margin: 23px 0 18px; }
.tabs button { flex: 1; min-height: 45px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; padding: 11px 2px; }
.tabs .selected { color: var(--mint); border-color: var(--mint); font-weight: 600; }
.clip-card { border-radius: 16px; background: var(--panel); padding: 13px 13px 5px; }
.clip-content { display: flex; gap: 12px; align-items: flex-start; }
.clip-poster { position: relative; border-radius: 11px; overflow: hidden; flex-shrink: 0; width: 92px; height: 100px; padding: 0; background: #34433a; }
.clip-poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.clip-poster > svg { position: absolute; top: 37px; left: 32px; color: #fff; background: #0d1616ad; border-radius: 50%; padding: 7px; width: 30px; height: 30px; }
.clip-poster > span { position: absolute; bottom: 5px; right: 5px; background: #101919c9; border-radius: 4px; padding: 2px 4px; color: white; font-size: 10px; }
.clip-body { min-width: 0; flex: 1; }
.clip-body h3 { font-size: 14px; overflow-wrap: anywhere; font-weight: 600; }
.clip-body .row.between > h3 { flex: 1; min-width: 0; }
.clip-body .row.between > .row { flex-shrink: 0; gap: 2px; }
.clip-body .row { align-items: flex-start; }
.clip-body .row small { flex-shrink: 0; }
.clip-caption { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid #344039; margin-top: 12px; padding-top: 3px; }
.clip-actions button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 8px 0; color: #d8e8df; font-size: 12px; }
.clip-actions svg { width: 17px; height: 17px; }
.publication-row { margin-bottom: 9px; min-height: 80px; }
.publication-row img { width: 62px; height: 67px; object-fit: cover; border-radius: 8px; }
.publication-row .button { padding: 10px; font-size: 12px; }
.filter-row { display: flex; gap: 10px; align-items: flex-end; }
.filter-row label { flex: 1; min-width: 0; }
.filter-row label > span { font-size: 12px; color: var(--muted); display: block; margin-bottom: 5px; }
.filter-row select { min-height: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); width: 100%; padding: 10px; }
.period-pill { font-size: 12px; background: var(--panel); padding: 14px 12px; border-radius: 10px; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 19px 0 12px; }
.stat-box { padding: 16px 10px; background: var(--panel); border: 1px solid #2a3a32; border-radius: 13px; min-width: 0; }
.stat-box strong { display: block; font-size: clamp(17px, 5vw, 23px); letter-spacing: -.7px; overflow-wrap: anywhere; }
.stat-box small { display: block; font-size: 11px; margin-top: 7px; }
.statistics-row { display: flex; gap: 8px; align-items: center; text-align: left; background: var(--panel); border-radius: 16px; padding: 17px; width: 100%; }
.statistics-row .grow > strong, .statistics-row .grow > small { display: block; }
.statistics-row .grow > small { margin-top: 5px; }
.statistics-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 15px; margin-top: 18px; }
.statistics-values small { display: block; font-size: 10px; }
.profile-identity { display: flex; gap: 17px; align-items: center; margin: 10px 0 28px; }
.profile-identity h2 { margin-bottom: 5px; }
.avatar { width: 36px; height: 36px; background: #cfeae1; color: #182c20; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.avatar.large { width: 62px; height: 62px; font-size: 25px; }
.wallet-preview { display: flex; align-items: center; text-align: left; gap: 12px; background: var(--mint); color: #15251c; border-radius: 18px; padding: 18px; width: 100%; }
.wallet-preview > span:first-child { display: flex; gap: 8px; align-items: center; }
.wallet-count { flex: 1; text-align: right; }
.wallet-count b { display: block; font-size: 29px; line-height: 1.1; }
.wallet-count small { color: #3c5948; display: block; font-size: 10px; margin-top: 5px; }
.wallet-preview > svg { width: 16px; }
.profile-links { margin-top: 23px; display: grid; gap: 10px; }
.profile-link { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--panel); border-radius: 14px; padding: 17px 15px; min-height: 80px; }
.profile-link > svg { color: var(--muted); }
.profile-link strong, .profile-link small { display: block; }
.profile-link small { margin-top: 5px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 12px; }
.hint.zero { margin-top: 0; }
.notice { background: #25372d; border: 1px solid #3f5546; border-radius: 12px; color: #cbded0; padding: 13px 15px; font-size: 13px; line-height: 1.6; margin-top: 16px; }
.empty { text-align: center; padding: 32px 18px; border: 1px dashed #3a4a40; border-radius: 16px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); font-size: 13px; margin: 12px 0 20px; }
.empty svg { margin: 0 auto 12px; }
.status-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 24px 0 0; padding: 12px 0; font-size: 11px; color: var(--muted); border-top: 1px solid #293730; }
.status-strip button { text-decoration: underline; min-height: 44px; padding: 0; }
.dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); margin-right: 5px; }
.badge { display: inline-block; background: #283b2e; color: #c6dccc; border-radius: 7px; font-size: 11px; padding: 6px 8px; }
.panel { padding: 18px; background: var(--panel); border-radius: 17px; }
.panel > h2 { margin-bottom: 15px; }
.panel-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.field { display: block; margin-top: 17px; min-width: 0; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.field input:not([type=range]):not([type=checkbox]), .field textarea, .field select, .input { background: #16201c; border: 1px solid #405046; color: var(--text); border-radius: 11px; min-height: 46px; width: 100%; padding: 12px; }
.field textarea { resize: vertical; min-height: 100px; }
.field p { color: var(--muted); margin-top: 8px; font-size: 12px; }
.field.zero { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field.inline { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.field.inline > span { margin: 0; font-weight: 500; }
.field.inline #duration-value { width: 100px; }
.segment { display: flex; background: #18221e; border: 1px solid #3c4d42; padding: 3px; gap: 2px; border-radius: 13px; }
.segment button { flex: 1; min-width: 0; padding: 11px 3px; min-height: 44px; border-radius: 10px; font-size: 12px; color: var(--muted); }
.segment .selected { background: var(--mint); color: #15261b; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 5px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; background: #34423a; font-size: 24px; flex-shrink: 0; }
.field .stepper input:not([type=range]):not([type=checkbox]) { width: 44px; min-height: 44px; padding: 6px 0; text-align: center; background: transparent; border: 0; font-size: 25px; font-weight: 700; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 0; font-size: 14px; cursor: pointer; }
.check-label { display: flex; align-items: center; gap: 10px; }
.check-label svg { color: var(--muted); width: 19px; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.switch i { position: absolute; inset: 0; background: #526157; border-radius: 20px; pointer-events: none; }
.switch i::after { content: ''; position: absolute; width: 18px; height: 18px; left: 4px; top: 4px; background: #d7e4dc; border-radius: 50%; transition: transform .15s; }
.switch input:checked + i { background: var(--mint); }
.switch input:checked + i::after { transform: translateX(18px); background: #233a2b; }
.switch input:focus-visible + i { outline: 2px solid var(--mint); outline-offset: 3px; }
.separator, .accordion { border-top: 1px solid #3a4840; margin-top: 14px; padding-top: 10px; }
.accordion > summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 10px; cursor: pointer; font-size: 14px; list-style: none; }
.accordion > summary::after { content: '›'; font-size: 25px; color: var(--muted); }
.accordion[open] > summary::after { transform: rotate(90deg); }
.accordion > summary::-webkit-details-marker { display: none; }
.range-row { display: flex; gap: 12px; align-items: center; margin-top: 16px; font-size: 13px; }
.range-row input { flex: 1; min-width: 0; accent-color: var(--mint); }
.range-row output { min-width: 35px; text-align: right; }
.editor-layout .workspace { padding: 18px 14px calc(142px + env(safe-area-inset-bottom, 0px)); }
.editor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.editor-head h1 { font-size: 16px; letter-spacing: -.2px; }
.editor-head .button { padding: 10px; font-size: 12px; }
.editor-preview { margin: 0 auto 12px; text-align: center; }
.editor-preview > video { height: 280px; max-width: 100%; background: #0b0f0e; border-radius: 14px; }
.video-frame { max-width: 148px; margin: auto; aspect-ratio: 9/16; border-radius: 15px; position: relative; overflow: hidden; background: #344438; }
.video-frame .backdrop { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(14px); opacity: .55; object-fit: cover; }
.video-frame .game-image { position: absolute; inset: 25% 0 auto; height: 45%; width: 100%; object-fit: cover; }
.video-frame .webcam-box { position: absolute; inset: 4% 5% auto; height: 24%; background: #405247; border-radius: 3px; display: grid; place-items: center; }
.video-frame.standard .webcam-box { display: none; }
.video-frame.standard .game-image { inset: 0; height: 100%; }
.video-title { position: absolute; inset: 6% 7% auto; color: white; font-size: 15px; font-weight: 800; line-height: 1.15; text-shadow: 0 2px 4px #000; }
.subtitle-sample { position: absolute; inset: 71% 4% auto; text-shadow: 1px 2px #000; font-size: 13px; font-weight: 700; }
.subtitle-sample span { padding: 3px; border-radius: 3px; background: var(--mint); color: #14241a; text-shadow: none; }
.preview-ad { position: absolute; inset: auto 0 14%; background: var(--mint); color: #22352a; font-size: 10px; padding: 8px 4px; }
.part-label { position: absolute; inset: 23% 0 auto; font-size: 10px; }
.preview-tag { position: absolute; bottom: 7px; left: 5px; padding: 4px 6px; border-radius: 4px; background: #101914ce; color: #d5e6d9; font-size: 9px; }
.preview-caption { font-size: 10px; color: var(--muted); margin-top: 8px; }
.timeline-preview { display: block; padding: 0; text-align: center; width: 100%; margin: 14px 0; }
.time-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.timeline-frames { display: flex; position: relative; width: calc(100% - 44px); height: 50px; border-radius: 9px; margin: 6px 22px; touch-action: pan-y; }
.timeline-frames img { flex: 1; min-width: 0; width: 14.28%; object-fit: cover; border-right: 1px solid #101914; }
.timeline-selection { position: absolute; left: 28%; top: 0; height: 100%; width: 40%; border: 3px solid var(--mint); border-radius: 7px; background: #cfeae10d; }
.timeline-hint { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); }
.timeline-handle { position: absolute; z-index: 2; top: -2px; width: 44px; height: 54px; transform: translateX(-50%); background: transparent; touch-action: none; cursor: ew-resize; }
.timeline-handle i { display: block; height: 100%; width: 9px; margin: auto; background: var(--mint); border-radius: 4px; border: 1px solid #172d26; }
.timeline-handle:focus-visible i { outline: 2px solid var(--text); outline-offset: 2px; }
.timeline-handle:disabled { display: none; }
.timeline-fragments { display: flex; overflow-x: auto; gap: 6px; margin: 8px 0; scrollbar-width: thin; }
.timeline-fragments button { flex-shrink: 0; border-radius: 8px; border: 1px solid var(--line); padding: 9px 10px; min-height: 44px; font-size: 11px; color: var(--muted); }
.timeline-fragments button.selected { background: var(--panel); border-color: var(--mint); color: var(--text); }
.publication-facts { margin: 18px 0; font-size: 12px; }
.publication-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.publication-facts dt { color: var(--muted); }
.publication-facts dd { text-align: right; margin: 0; }
.publication-facts dd small { display: block; margin-top: 3px; font-size: 10px; }
.stats-period { margin: 13px 0 18px; }
.stats-period .form-grid { margin: 10px 0; }
.account-mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.publication-identity { display: flex; align-items: center; gap: 13px; }
.publication-identity > img { width: 64px; height: 72px; object-fit: cover; border-radius: 10px; }
.publication-identity > span { min-width: 0; }
.publication-identity h3 { overflow-wrap: anywhere; }
.publication-identity small { display: block; margin-top: 6px; }
.match-choice { display: flex; gap: 10px; align-items: center; padding: 15px 12px; min-height: 54px; background: var(--panel); border-radius: 12px; cursor: pointer; }
.match-choice input { accent-color: var(--mint); flex-shrink: 0; }
.match-choice > img { width: 44px; height: 56px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.match-choice > span { min-width: 0; }
.match-choice strong, .match-choice small { overflow-wrap: anywhere; }
.match-choice span { min-width: 0; }
.match-choice strong { font-size: 13px; overflow-wrap: anywhere; }
.match-choice small { display: block; margin-top: 5px; font-size: 11px; }
.clip-menu { width: 44px; height: 44px; flex-shrink: 0; font-size: 22px; color: var(--muted); }
.editor-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 0 12px; }
.editor-tools button { background: var(--panel); border-radius: 13px; min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 12px; }
.editor-tools button.selected { background: var(--mint); color: #112419; font-weight: 600; }
.editor-panel { padding: 14px; }
.editor-action { position: fixed; z-index: 19; left: 50%; bottom: 0; transform: translateX(-50%); max-width: 430px; width: 100%; padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: #101818; border-top: 1px solid #2f3c34; }
.editor-action .row { font-size: 12px; margin-bottom: 9px; }
.editor-action .button { width: 100%; }
.error-text { color: var(--danger); font-size: 12px; line-height: 1.5; }
.error-text:not(:empty) { margin: 8px 0; }
.cut-editor { margin-top: 15px; }
.timeline { height: 45px; position: relative; background: repeating-linear-gradient(90deg, #344536 0, #344536 12px, #203025 12px, #203025 24px); margin: 15px 0 6px; border-radius: 10px; overflow: hidden; }
.timeline .selection { position: absolute; top: 0; bottom: 0; border: 2px solid var(--mint); background: #cfeae122; pointer-events: none; }
.editor-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor-fragments { display: flex; flex-wrap: wrap; gap: 6px; }
.editor-fragments .button { padding: 8px; font-size: 11px; }
.crop-area { aspect-ratio: 16/9; position: relative; border-radius: 10px; background: #354637; overflow: hidden; margin-top: 14px; }
.crop-area > img, .crop-area > video { width: 100%; height: 100%; object-fit: fill; border-radius: 0; }
#crop-area { touch-action: none; cursor: crosshair; }
#crop-area > video { pointer-events: none; }
.crop-box { position: absolute; border: 2px solid var(--mint); background: #cfeae122; pointer-events: none; }
.crop-box span { position: absolute; top: 0; left: 0; background: var(--mint); color: #182a1f; font-size: 10px; padding: 3px; }
.crop-corner { position: absolute; width: 10px; height: 10px; border: 2px solid var(--mint); border-radius: 2px; background: #101818; }
.crop-corner.tl { top: -5px; left: -5px; }
.crop-corner.tr { top: -5px; right: -5px; }
.crop-corner.bl { bottom: -5px; left: -5px; }
.crop-corner.br { bottom: -5px; right: -5px; }
dialog.crop-expanded { width: calc(100% - 12px); max-width: 700px; }
.job-card { background: var(--panel); border-radius: 16px; padding: 17px; margin-bottom: 10px; }
.job-card h3 { font-size: 16px; overflow-wrap: anywhere; }
.job-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.job-card .actions .button { font-size: 12px; }
.job-progress { height: 4px; background: #3a4a3e; border-radius: 3px; margin: 15px 0 8px; overflow: hidden; }
.job-progress i { display: block; height: 100%; background: var(--mint); }
.task-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 42px; border-bottom: 1px solid var(--line); font-size: 12px; }
.campaign-list { padding: 0; margin: 0; border: 0; }
.campaign-list legend { margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.campaign-choice { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 7px; cursor: pointer; }
.campaign-choice:has(input:checked) { border-color: var(--mint); background: #243730; }
.campaign-choice input { accent-color: var(--mint); width: 16px; height: 16px; flex-shrink: 0; }
.campaign-choice strong { display: block; font-size: 14px; }
.campaign-choice small { display: block; margin-top: 4px; font-size: 10px; }
.campaign-choice.unavailable { opacity: .5; cursor: not-allowed; }
.balance-card { background: var(--mint); color: #16281d; border-radius: 18px; padding: 23px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.balance-card strong { font-size: 48px; letter-spacing: -2px; }
.balance-card p { color: #425e4d; font-size: 12px; margin-top: 8px; }
.package-grid { display: grid; gap: 10px; }
.package { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; background: var(--panel); border: 1px solid #3d4c42; border-radius: 14px; padding: 18px; }
.package strong { font-size: 28px; }
.package .price { color: var(--mint); font-size: 18px; }
.package .button { grid-column: 1 / -1; margin-top: 8px; }
.package p { font-size: 12px; color: var(--muted); }
.ledger-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #2b3b30; font-size: 13px; }
.ledger-row small { display: block; margin-top: 4px; }
.positive { color: var(--mint); }
.connection { display: flex; gap: 10px; align-items: center; padding: 13px 0; }
.connection small { display: block; margin-top: 5px; }
.connection .button { padding: 10px; font-size: 12px; }
.connection h3 { font-size: 14px; }
.connection-icon { width: 34px; height: 34px; border-radius: 10px; background: #34453a; display: grid; place-items: center; flex-shrink: 0; font-size: 22px; }
.account-list { display: grid; gap: 12px; }
.account-card { padding: 18px; background: var(--panel); border-radius: 16px; }
.account-card h3 { font-size: 16px; }
.account-card .row .button { font-size: 12px; }
.welcome { max-width: 430px; background: var(--bg); min-height: 100svh; margin: auto; padding: 40px 24px; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 22px; font-weight: 700; margin-bottom: 50px; }
.brand img { width: 35px; height: 35px; }
.welcome h1 { font-size: 43px; }
.welcome .lead { color: var(--muted); font-size: 15px; margin: 22px 0; }
.welcome-thumb { margin: 25px 0 15px; border-radius: 15px; overflow: hidden; }
.welcome-thumb img { width: 100%; display: block; }
.welcome .button { margin-top: 18px; }
.upload-box { background: #1b2b21; border: 1px dashed #5b7562; border-radius: 15px; padding: 24px 15px; text-align: center; }
.upload-box > svg { margin: 0 auto 12px; }
.upload-box p { color: var(--muted); font-size: 12px; margin: 12px 0 17px; }
.upload-box input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-progress { width: 100%; accent-color: var(--mint); margin-top: 17px; }
dialog { color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 20px; width: calc(100% - 24px); max-width: 406px; max-height: calc(var(--visible-height,100dvh) - 40px); overflow: auto; }
dialog::backdrop { background: #020806d9; }
dialog video { width: 100%; max-height: 260px; background: black; border-radius: 11px; }
dialog video.clip-preview-player { max-height: calc(var(--visible-height,100dvh) * .7); object-fit: contain; }
.modal-header { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h2 { font-size: 20px; }
.modal-header button { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: var(--panel); }
.modal-content > p { color: var(--muted); font-size: 13px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal-actions .button { flex: 1; }
#toast { position: fixed; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 160px); max-width: min(398px, calc(100vw - 28px)); width: max-content; border-radius: 13px; background: var(--mint); color: #163021; font-size: 13px; line-height: 1.5; padding: 13px 17px; z-index: 50; box-shadow: 0 8px 35px #0006; pointer-events: none; opacity: 0; transition: transform .18s, opacity .18s; }
#toast.visible { transform: translate(-50%, 0); opacity: 1; }
.footer-note { color: var(--muted); font-size: 11px; text-align: center; margin-top: 24px; }
.loading { max-width: 430px; min-height: 100svh; margin: auto; background: var(--bg); padding: 100px 24px; text-align: center; font-size: 30px; }
.loading span { display: block; font-size: 13px; color: var(--muted); margin-top: 15px; }
@media (max-width: 360px) {
  .workspace { padding-left: 13px; padding-right: 13px; }
  .hero { padding: 20px 16px; }
  .hero h2 { font-size: 24px; }
  .round-plus { width: 60px; height: 60px; }
  .project-row img { width: 70px; height: 70px; }
  .section-head h2 { font-size: 17px; }
  .clip-poster { width: 78px; height: 96px; }
  .clip-poster > svg { left: 25px; }
  .segment button { font-size: 11px; }
  .field.inline { gap: 6px; }
  .stepper { gap: 1px; }
  .stepper button { width: 44px; height: 44px; }
  .wallet-preview { padding: 16px 13px; gap: 8px; }
  .wallet-preview > span:first-child { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
.keyboard-open .mobile-nav, .keyboard-open .editor-action { visibility: hidden; pointer-events: none; }
