/* The creation form reuses the image/video workspace bindings and drafts. */
.sideNav { gap: 6px; }
.sidebar { gap: 28px; overflow-y: auto; scrollbar-width: thin; }
.navItem { min-height: 44px; }
.dialogActions[hidden] { display: none; }
[data-page="home"] .shell { max-width: 1500px; padding-top: 28px; }
[data-page="home"] .workspaceHeader { display: none; }
.homeHeader { max-width: 1020px; margin: 0 auto 16px; text-align: center; }
.homeHeader h1 { font-size: 28px; font-weight: 600; margin: 8px 0 10px; line-height: 1.4; }
.homeModes { display: inline-flex; gap: 4px; border-bottom: 1px solid #39333f; }
.homeModes button { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 10px 18px; color: #a8a4b3; font-size: 14px; }
.homeModes button[aria-selected="true"] { color: #cfb9ff; border-bottom-color: #9f76f2; }
.homeModes button:hover { color: #eee4ff; background: #a47cf70a; }
.homeCreation { max-width: 1020px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.homeCreation > .moduleTop { order: 2; min-height: 0; margin: 0; justify-content: flex-end; }
.homeCreation > .moduleTop .moduleTitle { display: none; }
.homeCreation .generationLayout { display: flex; flex-direction: column; gap: 20px; }
.homeCreation .generationComposer { order: 0; width: 100%; display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 0 20px; padding: 18px; background: #1c1c21; border: 1px solid #3a3543; border-radius: 8px; }
.homeCreation .generationComposer:focus-within { border-color: #7c609e; }
.homeCreation .generationComposer > .panelHead, .homeCreation .sectionLabel { display: none; }
.homeCreation .referencePanel { grid-column: 1; grid-row: 1 / 3; margin: 0; max-height: 210px; overflow-y: auto; padding: 0 2px; scrollbar-width: thin; }
.homeCreation .referencePreviewGrid { display: flex; flex-wrap: wrap; gap: 8px; }
.homeCreation .referenceEmpty { min-height: 128px; flex-direction: column; gap: 12px; font-size: 12px; background: #25232a; border-color: #48404f; }
.homeCreation .referenceThumb { width: 100%; }
.homeCreation .referencePanelHead button { font-size: 11px; padding: 8px; white-space: normal; }
.homeCreation .promptMentionWrap { grid-row: 1; grid-column: 2; min-width: 0; }
.homeCreation .promptBox { background: transparent; border: 0; box-shadow: none; min-height: 110px; height: 110px; padding: 6px 2px; resize: vertical; }
.homeCreation .promptActions { grid-column: 2; grid-row: 2; margin: 10px 0 16px; }
.homeControls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding-top: 18px; border-top: 1px solid #35313b; }
.homeControls label { display: grid; gap: 6px; font-size: 11px; color: #aaa5b5; min-width: 0; }
.homeControls label > select { min-height: 38px; min-width: 100px; max-width: 160px; padding: 6px 10px; color: #e1dbe8; background: #29262f; border: 1px solid #443c50; border-radius: 6px; font-size: 12px; }
.homeControls .modelSelect { gap: 6px; }
.homeControls .durationControl { grid-template-columns: minmax(50px,90px) 48px auto; gap: 8px; }
.homeControls .durationControl input[type="number"] { height: 38px; min-width: 0; background: #29262f; border: 1px solid #443c50; border-radius: 6px; text-align: center; }
.homeControls .generationSubmit { width: auto; margin: 0 0 0 auto; min-height: 38px; padding: 8px 16px; font-size: 13px; }
.homeCreation .generationPreview { order: 1; width: 100%; }
.homeCreation .generationPreview:has(.studioEmpty) { display: none; }
.homeCreation .generationPreview .panelHead { margin-bottom: 12px; }
.homeCreation .generationPreview .resultBox { min-height: 0; max-height: 420px; padding: 18px; }
.homeCreation .generationRecent { display: none; }
.homeDiscovery { margin-top: 30px; padding-top: 20px; border-top: 1px solid #2d2932; }
.homeDiscoveryHead { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.homeDiscoveryHead h2 { font-size: 18px; font-weight: 550; margin: 0; }
.homeDiscoveryHead input { width: 260px; max-width: 100%; font-size: 13px; }
.homeFilterTabs { display: flex; align-items: center; gap: 8px; }
.homeFilterTabs button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 16px; border: 0; border-radius: 6px; background: transparent; color: #aaa5b5; font-size: 14px; }
.homeFilterTabs button[aria-selected="true"] { background: #29252f; color: #e7d9fa; }
.homeFilterTabs button:hover { color: #f1eafa; background: #252229; }
.homeFilterTabs small { color: #c0a6e8; font-size: 11px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.homeFilterTabs small:empty { display: none; }
.homeFilters { display: grid; gap: 10px; margin-bottom: 20px; }
.homeFilterRow { display: flex; align-items: start; gap: 22px; font-size: 12px; }
.homeFilterRow[hidden] { display: none; }
.homeFilterRow > span { flex: 0 0 28px; color: #777480; padding-top: 7px; }
.homeFilterRow > div { display: flex; flex-wrap: wrap; gap: 6px; }
.homeFilterRow button { padding: 7px 10px; background: transparent; border: 0; border-radius: 5px; color: #a7a3af; font-size: 12px; line-height: 1.4; }
.homeFilterRow button[aria-pressed="true"] { background: #9c73eb20; color: #d7beff; }
.homeFilterRow button:hover { background: #2a2532; color: #eee5fc; }
.homeVideoGrid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; align-items: start; }
.homeVideoCard { position: relative; display: flex; flex-direction: column; aspect-ratio: auto; padding: 0; overflow: hidden; background: #1c1c21; border: 1px solid #38343e; border-radius: 8px; text-align: left; }
.homeVideoCard:hover { border-color: #ac8ade; }
.homeVideoMedia { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #141417; }
.homeVideoCard video { width: 100%; height: 100%; object-fit: cover; display: block; }
.homePlay { position: absolute; left: 12px; bottom: 12px; width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: #151318be; border: 1px solid #ffffff3b; border-radius: 50%; }
.homeVideoBody { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 12px; background: #1c1c21; }
.homeVideoCaption { position: static; display: grid; min-width: 0; gap: 4px; padding: 0; background: none; color: #fff; font-size: 13px; pointer-events: none; }
.homeVideoCaption strong { overflow: hidden; color: #f0ecf4; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.homeVideoCaption small { overflow: hidden; color: #8f8997; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.homeCaseAction { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 3px; color: #bda6e8; font-size: 11px; }
.homeCaseAction .uiIcon { width: 13px; height: 13px; }
.homePlay { z-index: 1; }
.homeCaseEmpty { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 18px; color: #8e8799; border: 1px dashed #36303f; border-radius: 8px; }
.mentionMenu { top: 100%; bottom: auto; left: 0; right: 0; margin-top: 6px; max-height: 252px; z-index: 40; }
.mentionOption { width: 100%; min-width: 0; gap: 12px; padding: 8px; border-radius: 6px; }
.mentionOption .mentionThumbnail { position: relative; flex: 0 0 52px; width: 52px; height: 52px; border: 1px solid #4b4257; border-radius: 5px; background: #151418; overflow: hidden; }
.mentionThumbnail img, .mentionThumbnail video { width: 100%; height: 100%; object-fit: contain; display: block; }
.mentionThumbnail i { position: absolute; bottom: 2px; right: 2px; display: grid; place-items: center; width: 18px; height: 18px; background: #111c; border-radius: 50%; color: #fff; }
.mentionThumbnail .uiIcon { width: 11px; height: 11px; }
.mentionOption .mentionDetails { display: grid; flex: 1; gap: 3px; text-align: left; }
.mentionDetails > span { font-weight: 400; }
.mentionDetails small { font-size: 10px; color: #a19aa9; font-weight: 400; }
.templateDetailSide.templateDetailFunctional { background: #fff; color: #333; border-color: #e1e4e9; }
.templateDetailFunctional h2 { color: #30343b; }
.templateSecondaryActions .chip { background: #f8f9fb; color: #596579; border-color: #dfe3e9; }
.templatePreviewFrame { background: #f4f6f9; border-radius: 8px; }
.templatePreviewFrame::after { display: none; }
main.templateDetailPreview { padding: 28px; }
@media (max-width:760px) {
  .templateDetail.templateDetailWithPanel { grid-template-columns: 1fr; height: auto; overflow-y: auto; }
  main.templateDetailPreview { padding: 20px; min-height: 240px; }
  .templateDetailWithPanel .templateDetailSide { overflow: visible; }
  .templateDetailClose { position: fixed; top: 18px; right: 18px; }
}
@media (max-width:1100px) { .homeVideoGrid { grid-template-columns: repeat(3,minmax(0,1fr)); }.homeControls .generationSubmit { margin-left: 0; } }
@media (max-width:760px) {
  .sidebar { padding-top: 0; padding-bottom: 0; overflow-y: visible; }
  .sideNav { gap: 2px; }
  [data-page="home"] .shell { padding-top: 20px; }
  .homeHeader h1 { font-size: 24px; }
  .homeCreation .generationComposer { grid-template-columns: 86px minmax(0,1fr); padding: 14px; gap: 0 12px; }
  .homeCreation .referenceEmpty { min-height: 100px; font-size: 11px; }
  .homeCreation .promptBox { min-height: 120px; height: 120px; font-size: 13px; }
  .homeCreation .promptActions { grid-column: 1 / -1; grid-row: 3; }
  .homeControls { grid-row: 4; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: end; }
  .homeControls .generationSubmit { grid-column: 1 / -1; width: 100%; justify-content: center; white-space: nowrap; }
  .homeControls label { width: 100%; }.homeControls label > select { min-width: 0; max-width: 100%; width: 100%; }
  .homeControls .durationControl { grid-template-columns: minmax(24px,1fr) 40px auto; gap: 6px; }
  .homeCreation .referencePanelHead button { padding: 8px 4px; }
  .homeDiscovery { margin-top: 30px; }.homeDiscoveryHead { gap: 12px; }.homeDiscoveryHead h2 { font-size: 17px; white-space: nowrap; }.homeDiscoveryHead input { width: 100%; min-width: 0; }
  .homeFilterTabs button { padding: 8px 12px; }.homeFilterTabs small { max-width: 55px; }
  .homeCreation .mentionMenu { left: -98px; }
  .homeFilterRow { gap: 8px; }.homeVideoGrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .homeVideoBody { min-height: 60px; padding: 10px; }.homeCaseAction { display: none; }.homeVideoCaption { display: grid; }.homeCaseEmpty { font-size: 13px; padding: 20px; flex-wrap: wrap; }
}
