@font-face { font-family: "Roboto Numbers"; src: url("assets/apk/font/roboto_medium_numbers.ttf") format("truetype"); font-display: swap; }
:root {
  color-scheme: dark;
  --app-width: 375px;
  --bg: #121212;
  --black: #000;
  --surface: #202024;
  --surface-2: #29292e;
  --surface-3: #17171a;
  --line: #35353d;
  --text: #fff;
  --muted: #a4a4a5;
  --quiet: #808080;
  --accent: #ff6b8a;
  --gold: #ffd35a;
  --green: #63d69b;
  --builder-font: Roboto, Arial, sans-serif;
  --builder-radius: 10px;
  font-family: var(--builder-font);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #080808; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #080808; color: var(--text); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-shell { position: relative; width: min(100%, var(--app-width)); min-height: 100vh; margin: 0 auto; overflow: hidden; background: var(--bg); box-shadow: 0 0 0 1px rgba(255,255,255,.04); }

.builder-custom-section { position: relative; display: grid; gap: 14px; margin: 18px 16px; padding: 18px; overflow: hidden; border-radius: var(--builder-radius); }
.builder-custom-section.layout-banner { min-height: 210px; align-content: end; }
.builder-custom-section.layout-center { text-align: center; }
.builder-custom-media { width: 100%; max-height: 240px; border-radius: calc(var(--builder-radius) - 2px); object-fit: cover; }
.builder-custom-section.layout-banner > .builder-custom-media { position: absolute; inset: 0; height: 100%; max-height: none; opacity: .55; }
.builder-custom-copy { position: relative; z-index: 1; }
.builder-custom-copy small { color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.builder-custom-copy h2 { margin: 5px 0 0; font-size: 22px; }
.builder-custom-copy p { margin: 8px 0 0; color: currentColor; font-size: 13px; line-height: 1.5; opacity: .82; }
.builder-custom-copy a { display: inline-flex; min-height: 38px; align-items: center; margin-top: 14px; padding: 0 16px; border-radius: var(--builder-radius); color: #fff; background: var(--accent); font-size: 12px; font-weight: 800; text-decoration: none; }
.content-preview-mode [data-content-block] { cursor: pointer !important; outline: 1px dashed rgba(255,255,255,.2); outline-offset: -2px; }
.content-preview-mode [data-content-block]:hover, .content-preview-mode .content-preview-selected { outline: 3px solid var(--accent); outline-offset: -3px; }
#app-main { min-height: 100vh; }
.view { display: none; min-height: 100vh; padding-bottom: 116px; }
.view.active { display: block; }
.view.no-main-nav { padding-bottom: 0; }

.home-hero { position: relative; height: 286px; overflow: hidden; background: #000; }
.home-hero video { width: 100%; height: 100%; object-fit: cover; }
.hero-fade { position: absolute; inset: auto 0 0; height: 108px; background: linear-gradient(transparent, rgba(0,0,0,.94)); pointer-events: none; }
.hero-content { position: absolute; right: 16px; bottom: 28px; left: 16px; display: grid; gap: 4px; text-shadow: 0 1px 10px #000; }
.hero-content strong { font-size: 20px; line-height: 1.2; }
.hero-content span { color: #dedede; font-size: 12px; }
.hero-dots { position: absolute; bottom: 16px; left: 50%; display: flex; gap: 5px; transform: translateX(-50%); }
.hero-dots i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.45); }
.hero-dots i.active { width: 12px; border-radius: 3px; background: #fff; }
.pro-badge { position: absolute; right: 16px; bottom: 57px; width: 40px; height: 21px; border: 1px solid rgba(255,211,90,.8); border-radius: 11px; background: rgba(20,15,5,.8); color: var(--gold); font-size: 9px; font-weight: 800; }

.home-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; height: 73px; margin: 17px 16px 0 13px; }
.home-tool { min-width: 0; padding: 0; border: 0; border-radius: 8px; background: linear-gradient(145deg, #29292f, #1d1d21); overflow: hidden; color: #fff; font-size: 10px; }
.home-tool > span:last-child { display: block; overflow: hidden; padding: 2px 5px 6px; text-overflow: ellipsis; white-space: nowrap; }
.tool-media { display: block; height: 50px; overflow: hidden; }
.tool-media video { width: 100%; height: 100%; object-fit: cover; }
.multi { padding: 6px; }
.multi > span:last-child { padding: 2px 0 0; }
.multi-grid { display: grid; height: 47px; grid-template-columns: 1fr 1fr; gap: 3px; }
.multi-grid video { width: 100%; height: 22px; border-radius: 3px; object-fit: cover; }

.home-search { display: flex; width: calc(100% - 32px); height: 40px; align-items: center; gap: 8px; margin: 12px 16px 0; padding: 0 14px; border: 0; border-radius: 8px; background: #202025; color: #77777f; font-size: 14px; text-align: left; }
.icon.search-icon, .history-search > span { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; }
.icon.search-icon::after, .history-search > span::after { content: ""; display: block; width: 6px; height: 2px; background: currentColor; transform: translate(10px, 10px) rotate(45deg); transform-origin: left center; }
.home-heading, .discover-subhead { display: flex; align-items: center; justify-content: space-between; padding: 20px 16px 0; }
.home-heading h1, .discover-view h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.home-heading button, .discover-subhead button { padding: 5px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.category-row { display: flex; gap: 20px; margin: 16px 0 14px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 0 0 7px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #85858c; font-size: 13px; }
.chip.active { border-color: var(--accent); color: #fff; }
.template-grid, .masonry { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 16px; }
.template-card { position: relative; min-width: 0; height: 226px; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: #202024; text-align: left; }
.template-card.tall { height: 250px; }
.template-card.short { height: 205px; }
.template-card video { width: 100%; height: 100%; object-fit: cover; }
.template-card::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.9)); pointer-events: none; }
.template-info { position: absolute; z-index: 1; right: 10px; bottom: 10px; left: 10px; }
.template-info strong, .template-info span { display: block; }
.template-info strong { font-size: 13px; }
.template-info span { margin-top: 3px; color: #c5c5c8; font-size: 10px; }
.template-badge { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 3px 6px; border-radius: 4px; background: rgba(0,0,0,.72); color: #fff; font-size: 9px; font-weight: 700; }

.discover-view { padding-top: 80px; }
.discover-tabs { display: flex; gap: 24px; margin: 16px 16px 0; }
.discover-tabs button { display: flex; align-items: center; gap: 4px; padding: 0 0 5px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 14px; }
.discover-tabs button.active { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.clock-mark { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; }
.heart-mark { font-size: 18px; line-height: 14px; }
.discover-rail { display: flex; gap: 9px; height: 135px; margin-top: 16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.discover-rail .template-card { flex: 0 0 100px; height: 135px; }
.discover-rail .template-info { display: none; }
[data-content-block="discover.generation"] > h1 { margin: 20px 16px 12px; }
.generation-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px; }
.generation-shortcuts button { display: grid; height: 80px; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 8px; padding: 10px; border: 0; border-radius: 8px; background: #232329; text-align: left; }
.shortcut-icon { display: grid; width: 36px; height: 36px; grid-row: 1 / 3; place-items: center; border-radius: 50%; background: #34343b; color: var(--accent); }
.generation-shortcuts strong { align-self: end; font-size: 12px; }
.generation-shortcuts small { align-self: start; margin-top: 3px; color: #85858d; font-size: 8px; }
.discover-subhead { padding-top: 22px; padding-bottom: 12px; }
.discover-subhead strong { font-size: 18px; }

.bottom-nav { position: fixed; z-index: 40; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; display: flex; width: 282px; height: 57px; align-items: center; justify-content: center; gap: 0; padding: 6px; border: 1px solid rgba(255,255,255,.08); border-radius: 29px; background: rgba(28,28,31,.95); box-shadow: 0 8px 24px rgba(0,0,0,.45); transform: translateX(-50%); backdrop-filter: blur(16px); }
.bottom-nav button { display: grid; width: 90px; height: 45px; place-items: center; padding: 0; border: 0; border-radius: 23px; background: transparent; color: #777780; }
.bottom-nav button.active { background: #35353a; color: #fff; }
.bottom-nav button > span { position: relative; display: block; width: 23px; height: 23px; }
.home-nav-icon::before { content: ""; position: absolute; inset: 7px 3px 2px; border: 2px solid currentColor; border-top: 0; border-radius: 2px; }
.home-nav-icon::after { content: ""; position: absolute; width: 13px; height: 13px; top: 2px; left: 5px; border-top: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg); }
.discover-nav-icon { border: 2px solid currentColor; transform: rotate(45deg) scale(.72); }
.discover-nav-icon::after { content: ""; position: absolute; inset: 5px; border: 2px solid currentColor; }
.profile-nav-icon { border: 2px solid currentColor; border-radius: 50%; }
.profile-nav-icon::before { content: ""; position: absolute; width: 6px; height: 6px; top: 3px; left: 6px; border: 2px solid currentColor; border-radius: 50%; }
.profile-nav-icon::after { content: ""; position: absolute; width: 13px; height: 6px; bottom: 3px; left: 3px; border: 2px solid currentColor; border-radius: 8px 8px 4px 4px; }
body.route-create .bottom-nav, body.route-creations .bottom-nav, body.route-auth .bottom-nav { display: none; }

@media (min-width: 431px) { body { padding: 14px 0; } .app-shell { min-height: calc(100vh - 28px); border-radius: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
