:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2938;
  background: #f5f7fa;
  font-synthesis: none;
  --ink: #162235;
  --muted: #728097;
  --line: #e4e9f0;
  --panel: #ffffff;
  --navy: #142236;
  --coral: #e86d4a;
  --coral-light: #fff0eb;
  --shadow: 0 16px 50px rgba(26, 42, 68, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f6f8fb; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 282px; flex: 0 0 282px; background: var(--navy); color: #f4f7fb; padding: 26px 18px 20px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 29px; }
.brand strong, .brand span { display: block; line-height: 1; }
.brand strong { font-size: 16px; letter-spacing: .01em; }
.brand span { color: #7e91aa; font-size: 13px; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #ff9d6d, #e85e49); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: -.08em; box-shadow: 0 6px 16px rgba(232, 109, 74, .28); }
.button { border: 0; border-radius: 10px; min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 13px; transition: transform .18s, box-shadow .18s, background .18s; text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--coral); color: white; box-shadow: 0 8px 18px rgba(232, 109, 74, .18); }
.button.primary:hover { background: #d95d3c; box-shadow: 0 10px 22px rgba(232, 109, 74, .27); }
.button.secondary { color: var(--ink); background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(27, 42, 64, .04); }
.button.secondary:hover { border-color: #cbd5e1; }
.button.ghost { color: var(--muted); background: transparent; }
.button.full { width: 100%; }
.button-plus { font-size: 21px; font-weight: 400; line-height: 0; }
.sidebar .button.primary { margin: 0 3px 34px; }
.sidebar-section-label { color: #7e91aa; font-size: 10px; letter-spacing: .15em; font-weight: 800; display: flex; justify-content: space-between; padding: 0 10px 13px; }
.sidebar-section-label span { color: #c4cfdb; letter-spacing: 0; font-size: 11px; }
.match-list { display: grid; gap: 6px; overflow: auto; }
.match-item { display: block; text-align: left; color: #d7e0eb; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 12px 10px; }
.match-item:hover { background: rgba(255, 255, 255, .045); }
.match-item.selected { background: rgba(232, 109, 74, .12); border-color: rgba(232, 109, 74, .26); }
.match-item-date, .match-item-meta { display: flex; justify-content: space-between; color: #8093aa; font-size: 10px; letter-spacing: .02em; }
.match-item strong { display: block; color: #f3f6fa; font-size: 12px; margin: 7px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-item strong i, .page-heading h1 span { color: #f78a67; font-style: normal; }
.match-item-meta { color: #9babc0; font-size: 10px; }
.match-item-meta em { color: #74879f; font-style: normal; }
.sidebar-empty { color: #7f91a8; font-size: 12px; line-height: 1.6; padding: 5px 10px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(220, 230, 241, .1); padding: 17px 9px 0; }
.local-mode { display: flex; align-items: center; gap: 8px; color: #bdcad7; font-size: 11px; font-weight: 700; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6dcc94; box-shadow: 0 0 0 3px rgba(109, 204, 148, .12); }
.sidebar-footer p { margin: 10px 0 0; color: #71849b; font-size: 10px; line-height: 1.55; }

.main-content { min-width: 0; flex: 1; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .72); }
.topbar-context { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.topbar-icon { display: grid; place-items: center; color: var(--coral); font-size: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.local-pill { display: flex; align-items: center; gap: 8px; color: #6f7d90; font-size: 11px; font-weight: 700; }
.avatar-button { width: 32px; height: 32px; border-radius: 50%; border: 0; color: #8e4e3c; background: #ffe5da; font-weight: 800; }
.content-scroll { max-width: 1370px; margin: 0 auto; padding: 42px 42px 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.heading-actions { display: flex; align-items: center; gap: 16px; }
.eyebrow { color: #a1adbd; font-size: 10px; letter-spacing: .16em; font-weight: 900; }
.page-heading h1 { color: var(--ink); font-size: clamp(25px, 3vw, 35px); letter-spacing: -.04em; margin: 9px 0 7px; line-height: 1.1; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.heading-separator { margin: 0 7px; color: #b9c3cf; }
.source-bar { display: flex; align-items: center; gap: 18px; min-height: 67px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 11px 17px; margin-bottom: 18px; box-shadow: 0 5px 18px rgba(23, 41, 67, .025); }
.source-bar-label { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.source-icon { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #ffd1c5; border-radius: 9px; color: var(--coral); font-size: 16px; }
.source-bar-label div { min-width: 0; }
.source-bar-label small { display: block; color: #a1adbd; font-size: 9px; letter-spacing: .12em; font-weight: 900; margin-bottom: 4px; }
.source-bar-label strong { display: block; color: var(--ink); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-bar select { max-width: 310px; min-width: 180px; }
.source-size, .source-type-pill { color: #8090a5; font-size: 11px; white-space: nowrap; }
.source-type-pill { color: #c74f3a; background: #fff0eb; border-radius: 20px; padding: 6px 9px; font-weight: 800; font-size: 10px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr); gap: 18px; align-items: start; }
.video-panel, .editor-card, .clips-section { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 5px 20px rgba(23, 41, 67, .025); }
.video-stage { position: relative; aspect-ratio: 16 / 9; background: #0d1727; border-radius: 12px 12px 0 0; overflow: hidden; }
.main-video { display: block; width: 100%; height: 100%; object-fit: contain; border: 0; background: #0d1727; }
.youtube-player { aspect-ratio: 16 / 9; }
.video-badge { position: absolute; left: 15px; top: 14px; background: rgba(10, 20, 35, .72); border: 1px solid rgba(255,255,255,.15); color: #d8e2ec; font-size: 9px; letter-spacing: .14em; border-radius: 6px; padding: 6px 8px; pointer-events: none; }
.video-underbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px 17px; }
.video-underbar strong, .video-underbar span { display: block; }
.video-underbar strong { font-size: 12px; color: var(--ink); margin-bottom: 5px; max-width: 450px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-underbar span { font-size: 10px; color: var(--muted); }
.text-button { border: 0; background: transparent; font-size: 11px; font-weight: 800; padding: 6px 0; }
.text-button.danger { color: #d76d6c; }
.warning-box { margin: 0 16px 16px; padding: 11px 12px; border-radius: 8px; background: #fff7e8; color: #99702d; font-size: 11px; line-height: 1.5; }
.empty-video-panel { display: grid; justify-items: center; text-align: center; padding: 82px 30px; min-height: 390px; }
.empty-video-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--coral-light); color: var(--coral); font-size: 20px; margin-bottom: 18px; }
.empty-video-panel h2 { margin: 0 0 9px; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.empty-video-panel p { max-width: 360px; margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.video-missing, .shared-placeholder { display: grid; place-items: center; height: 100%; color: #9bacbf; font-size: 12px; }

.editor-card { padding: 20px; }
.card-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.card-heading h2, .section-heading h2 { color: var(--ink); margin: 7px 0 0; font-size: 18px; letter-spacing: -.025em; }
.shortcut-hint { color: #acb5c2; font-size: 10px; border: 1px solid var(--line); padding: 5px 7px; border-radius: 5px; }
.clip-form { display: grid; gap: 14px; margin-top: 21px; }
.clip-form.is-disabled { opacity: .58; }
label { color: #718097; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
input, select, textarea { display: block; width: 100%; border: 1px solid #dce3eb; border-radius: 8px; background: #fff; color: var(--ink); outline: none; margin-top: 7px; font-size: 12px; font-weight: 500; letter-spacing: 0; }
input, select { height: 39px; padding: 0 11px; }
textarea { resize: vertical; padding: 10px 11px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: #f19a82; box-shadow: 0 0 0 3px rgba(232, 109, 74, .1); }
.time-grid, .share-fields, .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 58px; }
.input-with-action button { position: absolute; right: 5px; top: 5px; height: 29px; border: 0; border-radius: 5px; background: #f3f6f9; color: #7a8798; font-size: 9px; font-weight: 800; padding: 0 7px; }
.time-help { color: #a2afbd; font-size: 10px; margin-top: -6px; line-height: 1.4; }
.create-button { margin-top: 1px; }
.create-button span { margin-left: auto; font-size: 17px; font-weight: 400; }
.editor-note { color: #8c99aa; font-size: 10px; line-height: 1.55; padding: 9px 10px; border-radius: 7px; background: #f7f9fb; }

.clips-section { margin-top: 18px; padding: 22px 20px 20px; }
.clip-count { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 8px; background: var(--coral-light); color: var(--coral); font-size: 11px; font-weight: 900; }
.clip-list { display: grid; gap: 8px; margin-top: 17px; }
.clip-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(120px, .3fr) auto; align-items: center; gap: 12px; border: 1px solid #edf0f4; border-radius: 9px; padding: 11px 12px; }
.clip-row:hover { border-color: #dce3eb; background: #fcfdfe; }
.clip-play { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; font-size: 12px; }
.clip-play.downloadable { background: #eef8f1; color: #4d9c67; }
.clip-play.youtube { background: #fff4e8; color: #c88238; }
.clip-main { min-width: 0; }
.clip-title-line, .clip-subline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.clip-title-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 12px; }
.clip-subline { color: #8b98a9; font-size: 10px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; flex: 0 0 auto; border-radius: 4px; padding: 4px 5px; font-size: 8px; font-weight: 900; letter-spacing: .03em; }
.tag-orange { background: #fff0dd; color: #c47b29; }
.tag-red { background: #ffe9e9; color: #c85c62; }
.tag-green { background: #edf6e7; color: #669047; }
.tag-blue { background: #eaf2fb; color: #557da9; }
.tag-sand { background: #f4f0dc; color: #9b8d4e; }
.clip-sharing { color: #8090a5; font-size: 10px; white-space: nowrap; }
.clip-sharing small { display: block; color: #adb7c3; font-size: 9px; margin-top: 4px; }
.visibility-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #aab5c2; margin-right: 6px; }
.visibility-dot.public { background: #67aa79; }.visibility-dot.account { background: #5d8fbd; }
.clip-actions { display: flex; gap: 4px; }
.icon-button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; color: #8693a4; background: transparent; font-size: 15px; text-decoration: none; }
.icon-button:hover { color: var(--coral); background: var(--coral-light); }
.icon-button.danger:hover { color: #d26363; background: #fff0f0; }
.empty-clips { display: flex; align-items: center; gap: 15px; border: 1px dashed #dce3eb; margin-top: 17px; padding: 18px; border-radius: 9px; }
.empty-clips > span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--coral); background: var(--coral-light); border-radius: 8px; }
.empty-clips strong { color: var(--ink); font-size: 12px; }.empty-clips p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }

.empty-main { display: grid; place-items: center; min-height: 100vh; }
.empty-state { text-align: center; max-width: 530px; padding: 40px 20px; }
.empty-state-orbit { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 25px; border-radius: 24px; background: var(--coral-light); color: var(--coral); font-size: 28px; }
.empty-state h1 { color: var(--ink); font-size: 43px; letter-spacing: -.055em; line-height: 1.02; margin: 12px 0 14px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0 auto 25px; max-width: 400px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(14, 27, 45, .53); backdrop-filter: blur(5px); }
.modal { position: relative; width: min(100%, 510px); max-height: calc(100vh - 40px); overflow: auto; border-radius: 15px; background: #fff; padding: 30px; box-shadow: 0 28px 80px rgba(15, 30, 50, .25); }
.modal-close { position: absolute; right: 18px; top: 16px; width: 28px; height: 28px; border: 0; background: transparent; color: #8a98a9; font-size: 23px; }
.modal h2 { color: var(--ink); font-size: 25px; letter-spacing: -.04em; margin: 9px 0 8px; }
.modal-intro { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0 0 23px; }
.modal form { display: grid; gap: 14px; }.modal form .button { margin-top: 4px; }
.source-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 9px; background: #f1f4f7; margin: -2px 0 17px; }
.source-toggle button { height: 34px; border: 0; border-radius: 6px; color: #8b98a8; background: transparent; font-size: 11px; font-weight: 800; }.source-toggle button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(22, 34, 53, .08); }
.file-drop { display: grid; justify-items: center; text-align: center; border: 1px dashed #d8e1eb; border-radius: 10px; padding: 22px 15px; color: #708096; cursor: pointer; }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.file-drop-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--coral); background: var(--coral-light); font-size: 18px; margin-bottom: 10px; }.file-drop strong { color: var(--ink); font-size: 12px; }.file-drop small { display: block; max-width: 320px; font-size: 10px; line-height: 1.5; margin-top: 6px; font-weight: 500; letter-spacing: 0; }
.share-link-box { display: flex; gap: 8px; align-items: center; }.share-link-box input { flex: 1; margin: 0; min-width: 0; font-size: 10px; background: #f8fafc; }.share-link-box .button { flex: 0 0 auto; min-height: 39px; }
.share-link-note { color: #8290a2; font-size: 10px; margin-top: 9px; }.share-actions { display: flex; gap: 8px; margin-top: 23px; }.share-actions .button { flex: 1; }
.notice { position: fixed; right: 22px; bottom: 22px; z-index: 40; max-width: 380px; padding: 13px 16px; border-radius: 10px; color: #fff; font-size: 12px; line-height: 1.4; box-shadow: 0 12px 35px rgba(25, 40, 60, .2); }.notice-info { background: #405672; }.notice-success { background: #37865d; }.notice-error { background: #b45353; }

.share-page { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 35px 20px; background: radial-gradient(circle at top, #fff5ef 0, #f6f8fb 42%, #eef2f7 100%); text-align: center; color: var(--ink); }
.share-page > .brand-mark { margin-bottom: 4px; }.share-page h1 { font-size: clamp(30px, 6vw, 54px); letter-spacing: -.06em; margin: 4px 0 0; }.share-page > p { color: var(--muted); font-size: 13px; max-width: 430px; line-height: 1.6; }.share-page .button { margin-top: 9px; }.share-topline { display: flex; align-items: center; gap: 9px; color: #6e7c8f; font-weight: 900; font-size: 10px; letter-spacing: .14em; }.share-topline .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 9px; }.shared-page { align-content: start; justify-items: stretch; text-align: left; padding-top: 36px; }.shared-heading { max-width: 1000px; width: min(100%, 1000px); margin: 38px auto 5px; }.shared-heading h1 { font-size: clamp(28px, 5vw, 47px); }.shared-heading p { color: var(--muted); font-size: 13px; }.shared-heading p span { color: var(--coral); font-weight: 800; margin: 0 6px; }.shared-video { width: min(100%, 1000px); max-height: 72vh; aspect-ratio: 16 / 9; background: #0d1727; border: 0; border-radius: 14px; box-shadow: var(--shadow); }.shared-meta { width: min(100%, 1000px); display: flex; align-items: center; flex-wrap: wrap; gap: 11px; color: #8190a1; font-size: 11px; margin: 3px auto; }

@media (max-width: 1000px) { .sidebar { width: 230px; flex-basis: 230px; }.topbar, .content-scroll { padding-left: 25px; padding-right: 25px; }.workspace-grid { grid-template-columns: 1fr; }.editor-card { order: 2; }.clips-section { margin-top: 18px; } }
@media (max-width: 700px) { .app-shell { display: block; }.sidebar { width: 100%; min-height: auto; padding: 17px 15px 15px; }.brand { padding-bottom: 18px; }.sidebar .button.primary { margin-bottom: 18px; }.match-list { display: flex; overflow-x: auto; padding-bottom: 4px; }.match-item { flex: 0 0 220px; }.sidebar-footer { display: none; }.topbar { height: 61px; padding: 0 17px; }.content-scroll { padding: 26px 15px 50px; }.page-heading { display: block; }.heading-actions { display: flex; flex-wrap: wrap; margin-top: 17px; gap: 12px; }.source-bar { gap: 10px; flex-wrap: wrap; }.source-bar select { max-width: none; width: 100%; order: 3; }.source-size, .source-type-pill { margin-left: auto; }.clip-row { grid-template-columns: 34px minmax(0, 1fr) auto; }.clip-sharing { display: none; }.empty-state h1 { font-size: 35px; }.modal { padding: 25px 20px; }.form-grid, .time-grid, .share-fields { grid-template-columns: 1fr; gap: 13px; } }
