/* Sickos Clipz — purpose-built phone experience */
.scMobileApp,
.scMobileSearch,
.scMobileViewer,
.scMobileSheet { display: none; }

@media (max-width: 767px) {
  :root {
    --sc-red: #e81717;
    --sc-red-dark: #c91313;
    --sc-ink: #111111;
    --sc-copy: #51575e;
    --sc-muted: #858b92;
    --sc-line: #e5e5e7;
    --sc-surface: #f5f5f7;
    --sc-white: #ffffff;
    --sc-bottom: env(safe-area-inset-bottom);
  }

  html.mobileReady,
  html.mobileReady body {
    min-width: 320px !important;
    min-height: 100dvh !important;
    color-scheme: light !important;
    background: #fff !important;
    overscroll-behavior-y: none;
  }
  html.mobileReady body {
    padding: 0 !important;
    color: var(--sc-ink) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif !important;
  }
  html.mobileReady body::before,
  html.mobileReady #appShell,
  html.mobileReady .siteFooter,
  html.mobileReady #selectionBar { display: none !important; }
  html.mobileReady body.scNoScroll { overflow: hidden !important; }

  .scMobileApp {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    color: var(--sc-ink);
    background: var(--sc-white);
  }
  .scMobileApp [hidden],
  .scMobileViewer [hidden] { display: none !important; }
  .scMobileTop {
    position: sticky;
    top: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px;
    min-height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 10px 0 14px;
    border-bottom: 1px solid rgba(229,229,231,.92);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px) saturate(150%);
  }
  .scMobileBrand {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-width: 0;
    min-height: 48px;
    padding: 0;
    border: 0;
    color: var(--sc-ink);
    background: transparent;
  }
  .scMobileBrand img { width: 39px; height: 39px; object-fit: contain; }
  .scMobileTopActions { display: flex; align-items: center; gap: 0; }
  .scIconButton {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    color: var(--sc-ink);
    background: transparent;
  }
  .scIconButton:active { background: var(--sc-surface); transform: scale(.96); }
  .scIconButton svg { width: 22px; height: 22px; }
  .scMenuToggle { position: relative; }
  .scMenuToggle:focus,
  .scMenuToggle:focus-visible { outline: 0 !important; box-shadow: none !important; }
  .scMenuToggle i {
    position: absolute;
    left: 13px;
    width: 20px;
    height: 1.5px;
    border-radius: 99px;
    background: currentColor;
    transform-origin: center;
    transition: transform .36s cubic-bezier(.32,.72,0,1), top .36s cubic-bezier(.32,.72,0,1);
  }
  .scMenuToggle i:first-child { top: 20px; }
  .scMenuToggle i:last-child { top: 27px; }
  .scMenuToggle.open i:first-child { top: 23.5px; transform: rotate(45deg); }
  .scMenuToggle.open i:last-child { top: 23.5px; transform: rotate(-45deg); }
  .scMobileMain {
    flex: 1;
    min-width: 0;
    padding: 0 14px calc(var(--sc-bottom) + 22px);
  }
  .scMobileMain.scPickerMain { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .scMobilePageHead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 2px 18px;
  }
  .scMobilePageHead.scBackHead { align-items: center; padding-top: 16px; }
  .scHeadCopy { min-width: 0; }
  .scKicker {
    display: block;
    margin-bottom: 6px;
    color: var(--sc-red);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .17em;
    text-transform: uppercase;
  }
  .scMobilePageHead h1 {
    overflow: hidden;
    margin: 0;
    color: var(--sc-ink);
    font-family: "Arial Black", Inter, sans-serif;
    font-size: clamp(27px, 8.5vw, 38px);
    font-weight: 950;
    line-height: .98;
    letter-spacing: -.065em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .scMobilePageHead p { margin: 8px 0 0; color: var(--sc-copy); font-size: 12px; }
  .scHeadAction,
  .scPillButton {
    min-width: 48px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--sc-line);
    border-radius: 15px;
    color: var(--sc-ink);
    background: var(--sc-white);
    font-size: 11px;
    font-weight: 800;
  }
  .scHeadAction.scPrimary,
  .scPillButton.scPrimary { border-color: var(--sc-red); color: #fff; background: var(--sc-red); }
  .scHeadBack { margin-left: -8px; }
  .scSyncStrip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 0 0 18px;
    padding: 0 13px;
    border: 1px solid var(--sc-line);
    border-radius: 14px;
    color: var(--sc-copy);
    background: var(--sc-surface);
    font-size: 10px;
    font-weight: 700;
  }
  .scSyncStrip i { width: 7px; height: 7px; border-radius: 999px; background: #20a565; box-shadow: 0 0 0 4px rgba(32,165,101,.1); }
  .scSyncStrip b { margin-left: auto; color: var(--sc-ink); font-size: 10px; }
  .scSectionHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 4px 2px 10px;
  }
  .scSectionHead b { color: var(--sc-ink); font-size: 13px; letter-spacing: -.02em; }
  .scSectionHead span { color: var(--sc-muted); font-size: 10px; }
  .scMonthList,
  .scFolderList,
  .scClipList,
  .scBundleList,
  .scRoughList { display: grid; gap: 10px; }
  .scMonthRow,
  .scFolderRow,
  .scBundleCard,
  .scRoughCard {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sc-line);
    border-radius: 20px;
    color: var(--sc-ink);
    background: var(--sc-white);
    text-align: left;
  }
  .scMonthRow { grid-template-columns: 48px minmax(0,1fr) 32px; align-items: center; min-height: 78px; padding: 12px 12px; }
  .scMonthMark,
  .scFolderMark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--sc-red);
    background: rgba(232,23,23,.065);
  }
  .scMonthMark svg,
  .scFolderMark svg { width: 20px; height: 20px; }
  .scRowCopy { min-width: 0; padding: 0 10px; }
  .scRowCopy b,
  .scFolderIdentity b {
    display: block;
    overflow: hidden;
    color: var(--sc-ink);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .scRowCopy small,
  .scFolderIdentity small { display: block; margin-top: 5px; color: var(--sc-muted); font-size: 10px; }
  .scRowArrow { display: grid; place-items: center; color: var(--sc-red); }
  .scRowArrow svg { width: 19px; height: 19px; }
  .scMonthRow:active,
  .scFolderRow:active,
  .scBundleCard:active { border-color: rgba(232,23,23,.34); background: #fafafa; transform: scale(.992); }

  .scFolderRow {
    grid-template-columns: 76px minmax(0,1fr) 48px;
    align-items: center;
    min-height: 92px;
    padding: 8px 8px 8px 10px;
  }
  .scFolderOpen,
  .scClipOpen,
  .scBundleOpen {
    position: absolute;
    inset: 0 48px 0 0;
    z-index: 1;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .scFolderRow > :not(.scFolderOpen),
  .scClipRow > :not(.scClipOpen),
  .scBundleCard > :not(.scBundleOpen) { position: relative; z-index: 0; }
  .scFolderRow > .scSelectCircle,
  .scClipRow > .scSelectCircle,
  .scBundleCard > .scSelectCircle { z-index: 2; }
  .scThumbStack {
    position: relative;
    width: 68px;
    height: 60px;
  }
  .scThumbStack span {
    position: absolute;
    overflow: hidden;
    width: 58px;
    height: 44px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #e9e9ec;
  }
  .scThumbStack span:nth-child(1) { top: 0; left: 0; z-index: 3; }
  .scThumbStack span:nth-child(2) { top: 7px; left: 6px; z-index: 2; }
  .scThumbStack span:nth-child(3) { top: 14px; left: 12px; z-index: 1; }
  .scThumbStack img { width: 100%; height: 100%; object-fit: cover; }
  .scFolderIdentity { min-width: 0; padding: 0 10px; }
  .scFolderIdentity em { display: block; margin-top: 7px; color: var(--sc-copy); font-size: 9px; font-style: normal; }
  .scSelectCircle {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 15px;
    color: var(--sc-copy);
    background: transparent;
  }
  .scSelectCircle i {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1.5px solid #b6bac0;
    border-radius: 9px;
    font-size: 13px;
    font-style: normal;
  }
  .scSelectCircle.selected i { border-color: var(--sc-red); color: #fff; background: var(--sc-red); }
  .scFilterRail {
    display: flex;
    gap: 8px;
    margin: 0 -14px 14px;
    padding: 0 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .scFilterRail::-webkit-scrollbar { display: none; }
  .scFilterChip {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--sc-line);
    border-radius: 999px;
    color: var(--sc-copy);
    background: var(--sc-white);
    font-size: 10px;
    font-weight: 800;
  }
  .scFilterChip.active { border-color: var(--sc-ink); color: #fff; background: var(--sc-ink); }
  .scClipRow {
    position: relative;
    display: grid;
    grid-template-columns: 94px minmax(0,1fr) 48px;
    align-items: center;
    min-height: 82px;
    padding: 7px 4px 7px 7px;
    border: 1px solid var(--sc-line);
    border-radius: 18px;
    color: var(--sc-ink);
    background: var(--sc-white);
  }
  .scClipThumb {
    position: relative;
    width: 88px;
    height: 62px;
    overflow: hidden;
    border-radius: 13px;
    color: #fff;
    background: #171719;
  }
  .scClipThumb img { width: 100%; height: 100%; object-fit: cover; }
  .scClipThumb i {
    position: absolute;
    right: 6px;
    bottom: 5px;
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 18px;
    padding: 0 5px;
    border-radius: 6px;
    color: #fff;
    background: rgba(0,0,0,.72);
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
  }
  .scClipIdentity { min-width: 0; padding: 0 10px; }
  .scClipIdentity b { display: block; overflow: hidden; font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
  .scClipIdentity small { display: block; overflow: hidden; margin-top: 5px; color: var(--sc-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .scBadges { display: flex; gap: 5px; margin-top: 7px; }
  .scBadges span { padding: 3px 6px; border-radius: 6px; color: var(--sc-copy); background: var(--sc-surface); font-size: 7px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
  .scBadges span.scProxy { color: #fff; background: var(--sc-ink); }
  .scLoadMore { width: 100%; min-height: 50px; margin-top: 12px; border: 1px solid var(--sc-line); border-radius: 16px; color: var(--sc-copy); background: var(--sc-surface); font-size: 11px; font-weight: 800; }
  .scEmpty {
    display: grid;
    place-items: center;
    min-height: 230px;
    padding: 34px 24px;
    border: 1px dashed #d7d7da;
    border-radius: 22px;
    color: var(--sc-copy);
    background: var(--sc-surface);
    text-align: center;
  }
  .scEmpty > div { display: flex; align-items: center; flex-direction: column; }
  .scEmpty b { display: block; color: var(--sc-ink); font-size: 15px; }
  .scEmpty span { display: block; max-width: 260px; margin-top: 8px; font-size: 11px; line-height: 1.55; }
  .scLoading {
    display: flex;
    min-height: calc(100dvh - 170px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    text-align: center;
  }
  .scLoadingMark {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: var(--sc-surface);
  }
  .scLoadingMark::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(232,23,23,.24);
    border-radius: inherit;
    animation: scLoadingPulse 1.7s ease-in-out infinite;
  }
  .scLoadingMark img { width: 58px; height: 58px; object-fit: contain; }
  .scLoading b { margin-top: 20px; color: var(--sc-ink); font-size: 17px; }
  .scLoading span { max-width: 290px; margin-top: 8px; color: var(--sc-copy); font-size: 11px; line-height: 1.5; }
  .scLoadingTrack { width: min(250px,70vw); height: 3px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: var(--sc-line); }
  .scLoadingTrack i { display: block; width: 42%; height: 100%; border-radius: inherit; background: var(--sc-red); animation: scLoadingTrack 1.25s ease-in-out infinite; }
  @keyframes scLoadingPulse { 50% { transform: scale(1.08); opacity: .35; } }
  @keyframes scLoadingTrack { from { transform: translateX(-120%); } to { transform: translateX(340%); } }

  .scMobileMenu {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: block;
    visibility: hidden;
    overflow: hidden;
    opacity: 0;
    background: #f5f5f7;
    clip-path: inset(0 0 100% 0);
    pointer-events: none;
    transition: clip-path .48s cubic-bezier(.32,.72,0,1), opacity .24s ease, visibility 0s linear .48s;
  }
  .scMobileMenu.show {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
    transition-delay: 0s;
  }
  .scMobileMenuContent {
    display: flex;
    flex-direction: column;
    width: min(100%, 560px);
    height: 100%;
    margin: 0 auto;
    padding: calc(76px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom));
    overflow: auto;
  }
  .scMenuLinks { display: grid; align-content: start; gap: 24px; }
  .scMenuGroup { display: grid; gap: 9px; }
  .scMenuGroupLabel {
    padding: 0 5px;
    color: #8c8c92;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .scMenuGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .scMenuPrimary .scMenuGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scMenuLink {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 6px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 58px;
    padding: 7px 10px 7px 7px;
    border: 1px solid rgba(29,29,31,.075);
    border-radius: 16px;
    color: #1d1d1f;
    background: rgba(255,255,255,.64);
    opacity: 0;
    transform: translateY(-10px) scale(.985);
    text-align: left;
    box-shadow: 0 6px 22px rgba(17,17,19,.025);
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
  }
  .scMobileMenu.show .scMenuLink {
    animation: scMenuItemIn .46s cubic-bezier(.22,.78,.2,1) both;
    animation-delay: calc(55ms + (var(--sc-menu-order) * 33ms));
  }
  .scMenuIcon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #5a5b61;
    background: #ececef;
    transition: color .2s ease, background .2s ease, transform .2s ease;
  }
  .scMenuLink b { min-width: 0; font-size: 12px; font-weight: 760; line-height: 1.12; letter-spacing: -.025em; }
  .scMenuLink i { width: 7px; height: 7px; border-radius: 50%; background: transparent; transform: scale(.4); transition: transform .2s ease, background .2s ease; }
  .scMenuLink.active { border-color: rgba(232,23,23,.18); color: #111113; background: #fff; }
  .scMenuLink.active .scMenuIcon { color: #fff; background: var(--sc-red); transform: scale(1.03); }
  .scMenuLink.active i { background: var(--sc-red); transform: scale(1); }
  .scMenuLink:active { background: #fff; transform: scale(.975); }
  .scMenuPrimary .scMenuLink {
    grid-template-columns: 1fr;
    grid-template-rows: 39px auto 4px;
    justify-items: center;
    gap: 5px;
    min-height: 91px;
    padding: 10px 5px 8px;
    text-align: center;
  }
  .scMenuPrimary .scMenuLink b { font-size: 11px; }
  .scMenuPrimary .scMenuLink i { width: 18px; height: 3px; border-radius: 99px; }
  .scMenuFooter {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: auto;
    padding: 24px 7px 4px;
    border-top: 1px solid rgba(29,29,31,.12);
    opacity: 0;
    transform: translateY(10px);
  }
  .scMobileMenu.show .scMenuFooter { animation: scMenuFooterIn .38s ease .32s both; }
  .scMenuFooter > span { color: #86868b; font-size: 10px; font-weight: 650; }
  .scMenuFooter > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; }
  .scMenuFooter button { padding: 0; border: 0; color: #55555a; background: transparent; font-size: 10px; font-weight: 650; }
  .scMenuFooter button:active { color: var(--sc-red); }

  .scSelectionTray,
  .scPickerTray {
    position: fixed;
    right: 10px;
    bottom: calc(var(--sc-bottom) + 5px);
    left: 10px;
    z-index: 170;
    display: grid;
    grid-template-columns: 48px minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 68px;
    padding: 8px;
    border: 1px solid #2c2c30;
    border-radius: 21px;
    color: #fff;
    background: rgba(17,17,17,.96);
    box-shadow: 0 20px 55px rgba(0,0,0,.3);
    backdrop-filter: blur(18px);
  }
  .scSelectionTray b,
  .scPickerTray b { display: block; font-size: 11px; }
  .scSelectionTray small,
  .scPickerTray small { display: block; margin-top: 3px; color: #a9adb2; font-size: 8px; }
  .scTrayAction { min-height: 48px; padding: 0 17px; border: 0; border-radius: 15px; color: #fff; background: var(--sc-red); font-size: 10px; font-weight: 900; }
  .scPickerTray { bottom: max(10px, env(safe-area-inset-bottom)); grid-template-columns: 48px minmax(0,1fr) auto; }

  .scBundleCard { grid-template-columns: 104px minmax(0,1fr) 48px; align-items: center; min-height: 116px; padding: 9px 6px 9px 9px; }
  .scBundleMosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 96px; height: 96px; overflow: hidden; border-radius: 16px; background: var(--sc-surface); }
  .scBundleMosaic span { overflow: hidden; background: #e6e6e9; }
  .scBundleMosaic span:first-child { grid-row: 1 / 3; }
  .scBundleMosaic img { width: 100%; height: 100%; object-fit: cover; }
  .scBundleCopy { min-width: 0; padding: 0 11px; }
  .scBundleCopy h2 { overflow: hidden; margin: 0; color: var(--sc-ink); font-size: 15px; font-weight: 900; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
  .scBundleCopy p { overflow: hidden; margin: 7px 0 0; color: var(--sc-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .scBundleStats { display: flex; gap: 10px; margin-top: 11px; color: var(--sc-copy); font-size: 9px; font-weight: 750; }
  .scBundleDetailActions { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 8px; margin-bottom: 16px; }
  .scBundleDetailActions button { min-height: 48px; border: 1px solid var(--sc-line); border-radius: 15px; color: var(--sc-ink); background: var(--sc-white); font-size: 10px; font-weight: 850; }
  .scBundleDetailActions button.scPrimary { border-color: var(--sc-red); color: #fff; background: var(--sc-red); }
  .scNotesCard { margin-bottom: 12px; padding: 14px; border: 1px solid var(--sc-line); border-radius: 18px; background: var(--sc-surface); }
  .scNotesCard label { display: block; margin-bottom: 8px; color: var(--sc-muted); font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
  .scNotesCard textarea { width: 100%; min-height: 66px; resize: vertical; border: 0; outline: 0; color: var(--sc-ink); background: transparent; font-size: 11px; line-height: 1.5; }
  .scBundleGroup { overflow: hidden; border: 1px solid var(--sc-line); border-radius: 18px; background: var(--sc-white); }
  .scBundleGroup + .scBundleGroup { margin-top: 9px; }
  .scBundleGroupHead { display: grid; grid-template-columns: 44px minmax(0,1fr) 48px; align-items: center; min-height: 66px; padding: 4px; }
  .scBundleGroupHead > button { width: 44px; height: 48px; border: 0; color: var(--sc-copy); background: transparent; }
  .scBundleGroupHead b { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .scBundleGroupHead small { display: block; margin-top: 4px; color: var(--sc-muted); font-size: 9px; }
  .scBundleGroupClips { display: none; gap: 8px; padding: 8px; border-top: 1px solid var(--sc-line); background: var(--sc-surface); }
  .scBundleGroup.open .scBundleGroupClips { display: grid; }

  .scRoughCard { padding: 16px; }
  .scRoughTop { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 11px; }
  .scRoughIcon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--sc-red); background: rgba(232,23,23,.065); font-weight: 900; }
  .scRoughCopy { min-width: 0; }
  .scRoughCopy b { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .scRoughCopy small { display: block; overflow: hidden; margin-top: 5px; color: var(--sc-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .scRoughStatus { text-align: right; }
  .scRoughStatus b { display: block; color: var(--sc-red); font-size: 14px; }
  .scRoughStatus small { display: block; margin-top: 4px; color: var(--sc-muted); font-size: 8px; }
  .scProgress { height: 4px; margin: 15px 0 12px; overflow: hidden; border-radius: 99px; background: var(--sc-line); }
  .scProgress i { display: block; height: 100%; border-radius: inherit; background: var(--sc-red); }
  .scRoughDetail { color: var(--sc-copy); font-size: 9px; line-height: 1.45; }
  .scRoughActions { display: flex; gap: 8px; margin-top: 14px; }
  .scRoughActions a,
  .scRoughActions button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; flex: 1; border: 1px solid var(--sc-line); border-radius: 14px; color: var(--sc-ink); background: var(--sc-white); font-size: 9px; font-weight: 850; text-decoration: none; }
  .scRoughActions .scPrimary { border-color: var(--sc-red); color: #fff; background: var(--sc-red); }

  .scMobileSearch,
  .scMobileViewer,
  .scMobileSheet {
    position: fixed;
    inset: 0;
    z-index: 20000;
  }
  .scMobileViewer { z-index: 22000; }
  .scMobileSheet { z-index: 25000; }
  .scMobileSearch.show { display: flex; flex-direction: column; color: var(--sc-ink); background: #fff; }
  .scSearchTop { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; border-bottom: 1px solid var(--sc-line); }
  .scSearchField { display: grid; grid-template-columns: 22px minmax(0,1fr) 48px; align-items: center; min-height: 52px; padding-left: 15px; border-radius: 18px; color: var(--sc-muted); background: var(--sc-surface); }
  .scSearchField input { min-width: 0; height: 48px; border: 0; outline: 0; color: var(--sc-ink); background: transparent; font-size: 15px; }
  .scSearchField button { width: 48px; height: 48px; border: 0; color: var(--sc-muted); background: transparent; }
  .scSearchCancel { min-width: 66px; border: 0; color: var(--sc-red); background: transparent; font-size: 11px; font-weight: 850; }
  .scSearchBody { flex: 1; padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); overflow: auto; }

  .scMobileSheet { display: none; align-items: flex-end; padding: 12px 10px calc(10px + env(safe-area-inset-bottom)); background: rgba(17,17,17,.34); backdrop-filter: blur(8px); }
  .scMobileSheet.show { display: flex; }
  .scSheetCard { width: 100%; max-height: 82dvh; overflow: auto; padding: 10px 10px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 25px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.24); }
  .scSheetHandle { width: 36px; height: 4px; margin: 2px auto 14px; border-radius: 99px; background: #d7d7da; }
  .scSheetTitle { padding: 0 8px 12px; }
  .scSheetTitle h2 { margin: 0; color: var(--sc-ink); font-size: 20px; letter-spacing: -.04em; }
  .scSheetTitle p { margin: 6px 0 0; color: var(--sc-copy); font-size: 10px; line-height: 1.45; }
  .scSheetList { display: grid; gap: 7px; }
  .scSheetAction { display: grid; grid-template-columns: 44px minmax(0,1fr) 24px; align-items: center; min-height: 60px; width: 100%; padding: 6px 10px; border: 0; border-radius: 17px; color: var(--sc-ink); background: var(--sc-surface); text-align: left; }
  .scSheetAction.scDanger { color: #c91313; }
  .scSheetAction svg { width: 20px; height: 20px; }
  .scSheetAction b { display: block; font-size: 11px; }
  .scSheetAction small { display: block; margin-top: 3px; color: var(--sc-muted); font-size: 8px; }
  .scSheetForm { display: grid; gap: 10px; padding: 0 4px 4px; }
  .scSheetForm label { display: grid; gap: 6px; color: var(--sc-copy); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
  .scSheetForm input,
  .scSheetForm textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--sc-line); border-radius: 15px; outline: 0; color: var(--sc-ink); background: var(--sc-surface); font-size: 13px; text-transform: none; letter-spacing: 0; }
  .scSheetForm textarea { min-height: 88px; resize: vertical; }
  .scSheetSubmit { min-height: 52px; border: 0; border-radius: 16px; color: #fff; background: var(--sc-red); font-size: 11px; font-weight: 900; }

  .scMobileViewer.show { display: flex; flex-direction: column; color: #fff; background: #050506; }
  .scViewerTop {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) 52px;
    align-items: center;
    min-height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 8px 0;
    background: linear-gradient(to bottom,rgba(0,0,0,.78),transparent);
  }
  .scViewerTop button { width: 52px; height: 52px; border: 0; color: #fff; background: transparent; }
  .scViewerTop .scViewerMode { padding: 0 5px; font-size: 8px; font-weight: 850; letter-spacing: .03em; }
  .scViewerTitle { min-width: 0; text-align: center; }
  .scViewerTitle b { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .scViewerTitle small { display: block; margin-top: 4px; color: rgba(255,255,255,.64); font-size: 8px; }
  .scViewerStage { position: relative; display: grid; place-items: center; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-x; }
  .scViewerStage video { width: 100%; height: 100%; object-fit: contain; background: #050506; }
  .scViewerDrive { width: 100%; height: 100%; border: 0; background: #050506; }
  .scViewerDrive[hidden], .scViewerStage video[hidden] { display: none; }
  .scViewerMessage { position: absolute; inset: 0; display: none; place-items: center; padding: 30px; color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.5; text-align: center; }
  .scViewerMessage.show { display: grid; }
  .scViewerPlay { position: absolute; display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #fff; background: rgba(0,0,0,.48); backdrop-filter: blur(12px); }
  .scViewerPlay[hidden] { display: none; }
  .scViewerPlay svg { width: 27px; height: 27px; margin-left: 3px; }
  .scViewerTapZones { position: absolute; z-index: 3; inset: 74px 0 176px; display: grid; grid-template-columns: 27% 46% 27%; pointer-events: none; }
  .scViewerTapZones[hidden] { display: none; }
  .scViewerTapZones [data-sc-viewer-double-tap] { width: 100%; height: 100%; touch-action: manipulation; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
  .scViewerTapZones [data-sc-viewer-double-tap]:first-child { grid-column: 1; }
  .scViewerTapZones [data-sc-viewer-double-tap]:last-child { grid-column: 3; }
  .scViewerGestureHint { position: absolute; z-index: 4; right: 14px; bottom: 190px; left: 14px; display: flex; justify-content: space-between; opacity: 0; transform: translateY(8px); pointer-events: none; }
  .scViewerGestureHint.show { animation: scGestureHint 2.8s ease both; }
  .scViewerGestureHint span { display: grid; grid-template-columns: 23px auto; align-items: center; min-width: 104px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(7,7,8,.68); box-shadow: 0 10px 30px rgba(0,0,0,.25); backdrop-filter: blur(14px); }
  .scViewerGestureHint i { grid-row: 1 / 3; font-size: 21px; font-style: normal; }
  .scViewerGestureHint b { font-size: 9px; line-height: 1; }
  .scViewerGestureHint small { margin-top: 3px; color: rgba(255,255,255,.62); font-size: 7px; }
  .scViewerSeekFeedback { position: absolute; z-index: 6; top: 43%; display: grid; place-items: center; min-width: 74px; height: 74px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; opacity: 0; color: #fff; background: rgba(7,7,8,.62); transform: translate(-50%,-50%) scale(.82); pointer-events: none; backdrop-filter: blur(12px); }
  .scViewerSeekFeedback.left { left: 23%; }
  .scViewerSeekFeedback.right { left: 77%; }
  .scViewerSeekFeedback.show { animation: scSeekFeedback .65s ease both; }
  .scViewerSeekFeedback b { font-size: 12px; font-variant-numeric: tabular-nums; }
  .scViewerBottom {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    padding: 58px 12px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top,rgba(0,0,0,.9) 0,rgba(0,0,0,.62) 52%,transparent 100%);
  }
  .scViewerInfoRow { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 9px; margin-bottom: 7px; }
  .scViewerInfoButton { display: block; min-width: 0; width: 100%; padding: 0 4px 3px; border: 0; color: #fff; background: transparent; text-align: left; }
  .scViewerInfoButton b { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .scViewerInfoButton small { display: block; overflow: hidden; margin-top: 5px; color: rgba(255,255,255,.62); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .scViewerSeekControls { display: flex; gap: 6px; }
  .scViewerSeekControls[hidden] { display: none; }
  .scViewerSeekControls button { display: flex; align-items: center; justify-content: center; gap: 3px; width: 49px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; color: #fff; background: rgba(255,255,255,.09); backdrop-filter: blur(12px); }
  .scViewerSeekControls span { font-size: 17px; line-height: 1; }
  .scViewerSeekControls b { font-size: 8px; font-variant-numeric: tabular-nums; }
  .scMobileViewer.driveMode .scViewerSeekControls { opacity: .84; }
  .scTimeline { display: grid; grid-template-columns: 36px minmax(0,1fr) 36px; align-items: center; gap: 6px; }
  .scTimeline span { color: rgba(255,255,255,.68); font-size: 8px; font-variant-numeric: tabular-nums; }
  .scTimeline span:last-child { text-align: right; }
  .scTimeline input { width: 100%; height: 30px; margin: 0; accent-color: var(--sc-red); }
  .scMobileViewer.driveMode .scTimeline { display: none; }
  .scMobileViewer.driveMode .scViewerPlay { display: none; }
  .scViewerActions { display: grid; grid-template-columns: 52px 52px minmax(0,1fr) minmax(0,1fr); gap: 7px; margin-top: 6px; }
  .scViewerActions button { min-height: 50px; border: 1px solid rgba(255,255,255,.17); border-radius: 16px; color: #fff; background: rgba(255,255,255,.09); font-size: 9px; font-weight: 850; }
  .scViewerActions button.scPrimary { border-color: var(--sc-red); background: var(--sc-red); }
  .scViewerMeta {
    position: absolute;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 7;
    display: none;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 23px;
    background: rgba(18,18,20,.96);
    box-shadow: 0 24px 70px rgba(0,0,0,.45);
    backdrop-filter: blur(20px);
  }
  .scViewerMeta.show { display: block; }
  .scViewerMetaHead { display: flex; justify-content: space-between; gap: 12px; }
  .scViewerMetaHead b { font-size: 14px; }
  .scViewerMetaHead button { width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; color: #fff; background: transparent; }
  .scViewerMeta dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
  .scViewerMeta dl div { padding: 11px; border-radius: 13px; background: rgba(255,255,255,.07); }
  .scViewerMeta dt { color: rgba(255,255,255,.5); font-size: 7px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
  .scViewerMeta dd { overflow: hidden; margin: 5px 0 0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

  .modalBackdrop.show,
  .cloudModalBackdrop.show,
  .cloudModalBackdrop { z-index: 30000 !important; }
  .modal,
  .cloudModal {
    color: var(--sc-ink) !important;
    background: #fff !important;
  }
  .modal h2,
  .cloudModal h2,
  .modal label,
  .cloudModal label { color: var(--sc-ink) !important; }
  .modal p,
  .cloudModal p,
  .cloudModal small { color: var(--sc-copy) !important; }
  #modalSub {
    display: block !important;
    margin: 8px 0 18px !important;
    color: var(--sc-copy) !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
  }
  .modal .formatChoices {
    display: grid !important;
    gap: 10px !important;
    margin-top: 4px !important;
  }
  .modal .formatChoice {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 88px !important;
    padding: 14px !important;
    border: 1px solid var(--sc-line) !important;
    border-radius: 18px !important;
    color: var(--sc-ink) !important;
    background: var(--sc-surface) !important;
    box-shadow: none !important;
    text-align: left !important;
  }
  .modal .formatChoice:not(:disabled):active {
    border-color: rgba(232,23,23,.42) !important;
    background: #fff !important;
  }
  .modal .formatChoice:disabled {
    border-color: var(--sc-line) !important;
    color: var(--sc-muted) !important;
    background: #f1f1f3 !important;
    opacity: .58 !important;
  }
  .modal .formatIcon {
    grid-row: 1 / 3 !important;
    display: grid !important;
    place-items: center !important;
    width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    border: 1px solid rgba(232,23,23,.16) !important;
    border-radius: 15px !important;
    color: var(--sc-red) !important;
    background: rgba(232,23,23,.06) !important;
    font-size: 18px !important;
  }
  .modal .formatChoice b {
    align-self: end !important;
    color: var(--sc-ink) !important;
    font-size: 12px !important;
  }
  .modal .formatChoice span {
    align-self: start !important;
    margin-top: 4px !important;
    color: var(--sc-copy) !important;
    font-size: 9px !important;
  }
  .modal .formatChoice:disabled b,
  .modal .formatChoice:disabled span { color: var(--sc-muted) !important; }
  .modal input,
  .modal textarea,
  .modal select,
  .cloudModal input,
  .cloudModal select {
    min-height: 50px !important;
    border-color: var(--sc-line) !important;
    color: var(--sc-ink) !important;
    background: var(--sc-surface) !important;
  }
  .cloudClose,
  .modalClose { width: 48px !important; height: 48px !important; color: var(--sc-copy) !important; }
  .loginOverlay { z-index: 40000 !important; color: var(--sc-ink) !important; background: #fff !important; }
  .loginCard { color: var(--sc-ink) !important; background: #fff !important; }
  .loginCard label { color: var(--sc-copy) !important; }
  .loginCard input { min-height: 52px !important; border-color: var(--sc-line) !important; color: var(--sc-ink) !important; background: var(--sc-surface) !important; }

  @media (orientation: landscape) and (max-height: 540px) {
    .scViewerBottom { padding-top: 34px; }
    .scViewerInfoRow { max-width: 66%; }
    .scViewerActions { grid-template-columns: 48px 48px 130px 130px; justify-content: end; }
  }

  @keyframes scGestureHint {
    0% { opacity: 0; transform: translateY(8px); }
    12%,76% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-5px); }
  }
  @keyframes scSeekFeedback {
    0% { opacity: 0; transform: translate(-50%,-50%) scale(.82); }
    22%,64% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.08); }
  }
  @keyframes scMenuItemIn {
    from { opacity: 0; transform: translateY(-10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes scMenuFooterIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .scLoadingMark::after,
    .scLoadingTrack i { animation: none !important; }
    .scMonthRow:active,
    .scFolderRow:active,
    .scBundleCard:active,
    .scIconButton:active { transform: none !important; }
    .scMobileMenu { transition-duration: .01ms !important; }
    .scMobileMenu.show .scMenuLink,
    .scMobileMenu.show .scMenuFooter { animation-duration: .01ms !important; animation-delay: 0s !important; }
    .scMenuToggle i { transition-duration: .01ms !important; }
  }
}

/* Shared phone stability: predictable taps, fields, and viewport sizing across every tool. */
@media (max-width: 767px) {
  html.mobileReady { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  html.mobileReady .scMobileApp,
  html.mobileReady .scMobileMain { width: 100%; max-width: 100vw; min-width: 0; overflow-x: clip; }
  html.mobileReady button,
  html.mobileReady a,
  html.mobileReady label,
  html.mobileReady input[type="button"],
  html.mobileReady input[type="submit"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  html.mobileReady input,
  html.mobileReady textarea,
  html.mobileReady select { max-width: 100%; font-size: max(16px, 1em); }
  html.mobileReady button:focus-visible,
  html.mobileReady a:focus-visible,
  html.mobileReady input:focus-visible,
  html.mobileReady textarea:focus-visible,
  html.mobileReady select:focus-visible { outline: 2px solid rgba(232, 23, 23, .62); outline-offset: 2px; }
}
