/* Hypnoclip app — builds on the landing's site.css (tokens, fonts, buttons, inputs) */
section { padding: 0; }
/* site.css sets overflow-x:hidden on body, which breaks position:sticky — clip has the same visual effect without that */
body { overflow-x: clip; }
.view { padding: 30px 0 90px; }
.view[hidden] { display: none; }

.sec-head h1, .ed-title h1 { font: 800 clamp(28px, 4vw, 42px)/1.05 var(--display); letter-spacing: -1.4px; margin: 0 0 8px; }
.sec-head .sub, .ed-top .sub { font-size: 16px; margin-bottom: 22px; }
.sub b { color: var(--text); }
.sub a, .hint a, .locknote a { color: var(--cyan); }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--text); }

/* nav */
.navright { display: flex; align-items: center; gap: 14px; }
.navlink { color: var(--muted); text-decoration: none; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.navlink:hover { color: var(--text); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--grad); color: #07070c; font: 700 11.5px/20px var(--body); text-align: center; }
.count[hidden] { display: none; }
.devplan { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; border: 1px dashed #ffb02b88; background: #ffb02b0d; }
.devtag { font: 700 11px var(--body); letter-spacing: .6px; color: #ffb02b; padding: 0 8px 0 6px; }
.devplan button { border: 0; background: transparent; color: var(--muted); font: 600 13px var(--body); padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.devplan button.on { background: var(--text); color: #07070c; }
@media (max-width: 640px) { .devtag, .navlink { display: none; } .devplan button { padding: 7px 9px; font-size: 12px; } }

/* filters + chips */
.filters, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { margin-bottom: 18px; }
.chip { border: 1px solid var(--line2); background: #ffffff06; color: var(--muted); font: 600 13.5px var(--body); padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.chip:hover { color: var(--text); border-color: #ffffff40; }
.chip.on { color: #07070c; background: var(--text); border-color: var(--text); }

/* template grid */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tcard { position: relative; display: block; text-decoration: none; text-align: left; padding: 0; border-radius: 18px; overflow: hidden; cursor: pointer; color: var(--text);
         background: var(--panel); border: 1.5px solid var(--line); transition: border-color .2s, transform .2s, box-shadow .2s; font: inherit; }
.tcard:hover { border-color: #ff2bd677; transform: translateY(-3px); box-shadow: 0 18px 40px -20px #ff2bd677; }
.tcard:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tthumb { aspect-ratio: 9 / 13; background: #000; position: relative; display: grid; place-items: center; overflow: hidden; }
.tthumb video, .tthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tthumb .ico { font-size: 48px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px #a35bff66); }
.tmeta { padding: 10px 12px 12px; }
.tname { font: 700 14.5px/1.2 var(--body); }
.tdesc { color: var(--dim); font-size: 12.5px; margin-top: 4px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; z-index: 2; pointer-events: none; }
.tag { font: 700 10.5px var(--body); letter-spacing: .5px; padding: 3px 8px; border-radius: 99px; vertical-align: middle; }
.tag[hidden] { display: none; }
.tag.pro { color: #07070c; background: var(--grad); }
.tag.music { color: var(--text); background: #000a; border: 1px solid #ffffff2a; }
.tcard.locked .tthumb > video, .tcard.locked .tthumb > .ico { opacity: .5; }

/* featured row: the best performers (3,000 rings, Vortex) */
.featured { margin: 4px 0 26px; }
.featured[hidden] { display: none; }
.feat-title { font: 800 19px var(--display); letter-spacing: -.4px; margin: 0 0 12px; }
.feat-title span { display: block; font: 500 13.5px var(--body); color: var(--dim); letter-spacing: 0; margin-top: 3px; }
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr; } }
.fcard { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; padding: 12px; border-radius: 22px; text-decoration: none; color: var(--text);
         background: linear-gradient(135deg, #ff2bd61a, #22e6ff12 60%, transparent), var(--panel); border: 1.5px solid #ff2bd655;
         transition: border-color .2s, transform .2s, box-shadow .2s; }
.fcard:hover { border-color: #ff2bd6aa; transform: translateY(-3px); box-shadow: 0 22px 50px -24px #ff2bd6aa; }
.fcard:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.fthumb { position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; }
.fthumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fmeta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ftags { display: flex; flex-wrap: wrap; gap: 6px; }
#upgradeBtn[hidden], #manageBtn[hidden] { display: none; }
.fname { font: 800 22px/1.1 var(--display); letter-spacing: -.6px; margin-top: 4px; }
.fdesc { color: var(--muted); font-size: 14px; line-height: 1.4; margin: 0 0 6px; }
@media (max-width: 420px) { .fcard { grid-template-columns: 110px 1fr; gap: 12px; } .fname { font-size: 19px; } .fdesc { font-size: 13px; } }
.tag.hot { color: #07070c; background: #ffb02b; }

/* editor */
.ed-title { display: flex; align-items: center; gap: 12px; }
.ed-title h1 { margin: 0; }
.editor { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.previewcol { position: sticky; top: 84px; }
@media (max-width: 900px) { .previewcol { position: static; max-width: 300px; margin: 0 auto; } }
.phone-lg { width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 9 / 16.6; border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #2a2a3e, #0d0d16 40%, #1c1c2c); box-shadow: 0 0 0 1px #ffffff14, 0 40px 80px -24px #000, 0 0 120px -40px #a35bff; }
.phone-lg .screen { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: #000; }
.phone-lg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s; }
.phone-lg img.stale { opacity: .55; }
.pv-loading { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 12px; border-radius: 99px; background: #000b; font: 600 12px var(--body); opacity: 0; transition: opacity .2s; pointer-events: none; }
.pv-loading.on { opacity: 1; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #ffffff44; border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pv-caption { text-align: center; color: var(--dim); font-size: 12.5px; margin: 12px 0 0; }

.optcol { display: grid; gap: 16px; }
.opt { padding: 20px 20px 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 14px; }
.opt[hidden] { display: none; }
.opt h2 { font: 700 16px var(--display); letter-spacing: -.3px; margin: 0; }
.opt .field label { display: flex; justify-content: space-between; gap: 10px; font: 600 14px var(--body); margin-bottom: 8px; }
.opt .field b { color: var(--cyan); }
.opt-note { color: var(--dim); font-weight: 500; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; font: 500 15px var(--body); line-height: 1.4; }
[data-extra][hidden] { display: none; }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.theme, .material { position: relative; text-align: left; border: 1.5px solid var(--line2); background: #08080f; color: var(--text); border-radius: 14px;
  padding: 10px; cursor: pointer; font: inherit; transition: border-color .2s, box-shadow .2s; }
.theme:hover, .material:hover { border-color: #ffffff40; }
.theme.on, .material.on { border-color: var(--pink); box-shadow: 0 0 0 3px #ff2bd626; }
.theme:focus-visible, .material:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.swatch { display: flex; height: 34px; border-radius: 9px; overflow: hidden; margin-bottom: 8px; box-shadow: inset 0 0 0 1px #ffffff14; }
.swatch i { flex: 1; }
.oname { font: 700 13px var(--body); }
.lock { position: absolute; top: 6px; right: 6px; font-size: 11px; padding: 2px 6px; border-radius: 99px; background: #000c; color: var(--text); }
.materials { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.material { text-align: center; }
.ball { width: 42px; height: 42px; border-radius: 50%; margin: 2px auto 8px; box-shadow: 0 4px 14px #0008; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg label { position: relative; display: block; margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 11px 6px; border-radius: 12px; background: #08080f; border: 1px solid var(--line2); cursor: pointer; font: 600 13.5px var(--body); }
.seg input:checked + span { border-color: var(--pink); background: #ff2bd612; }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.input[hidden] { display: none; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.toggle[hidden] { display: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--pink); margin: 0; flex: none; }
.toggle.disabled { opacity: .6; cursor: default; }
input[type=range] { width: 100%; accent-color: var(--pink); }
.hint { margin: 0; font-size: 12.5px; color: var(--dim); }
.hint:empty { display: none; }
.spec { margin: 0; font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 12px; background: #ffffff06; border: 1px solid var(--line); }

.gobar { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); display: grid; gap: 10px; }
.go { --h: 56px; width: 100%; font-size: 16.5px; }
.go:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.err { margin: 0; color: #ff6b88; font-size: 14px; }
.err:empty { display: none; }
.locknote { margin: 0; font-size: 13.5px; color: var(--muted); }
.locknote[hidden] { display: none; }

/* my videos */
.renders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.empty { color: var(--dim); font-size: 15px; margin: 0; }
.empty a { color: var(--cyan); }
.render { padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); align-self: start; }
.rtop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rname { font-weight: 700; font-size: 14.5px; }
.rstatus { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rstatus.done { color: var(--lime); } .rstatus.error { color: #ff6b88; }
.rlook { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.bar { height: 6px; border-radius: 99px; background: #1b1b2a; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .6s; }
.render video { width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; margin-top: 12px; background: #000; }
.ractions { display: flex; gap: 8px; margin-top: 10px; }
.ractions .btn { --h: 42px; font-size: 14px; flex: 1; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; padding: 12px 18px; border-radius: 14px;
  background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 20px 50px -10px #000; font: 600 14px var(--body); }
.toast[hidden] { display: none; }
.toast a { color: var(--cyan); margin-left: 8px; }

/* account */
.account { display: flex; align-items: center; }
.me { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.me[hidden], #loginBtn[hidden], .devplan[hidden] { display: none; }
.me-email { color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-badge { font: 700 11px var(--body); letter-spacing: .5px; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; background: #ffffff10; border: 1px solid var(--line2); }
.plan-badge.paid { color: #07070c; background: var(--grad); border-color: transparent; }
.linkbtn { background: none; border: 0; color: var(--muted); font: 600 13.5px var(--body); cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--text); }
@media (max-width: 640px) { .me-email { display: none; } }
.quota { margin: 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.quota[hidden] { display: none; }
.quota b { color: var(--text); }
.quota.out { color: #ffb02b; }
.quota a { color: var(--cyan); }

/* login dialog */
#loginDlg, #upgradeDlg { width: min(460px, calc(100% - 24px)); padding: 28px 26px 22px; border: 1px solid var(--line2); border-radius: 24px; color: var(--text);
  background: radial-gradient(380px 220px at 0% 0%, #ff2bd61c, transparent 70%), var(--panel2); box-shadow: 0 40px 120px -20px #000; }
#loginDlg::backdrop, #upgradeDlg::backdrop { background: #000000b3; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#loginForm { display: grid; gap: 14px; }
#loginDlg h3, #upgradeDlg h3 { font: 800 24px/1.15 var(--display); letter-spacing: -.8px; margin: 0; }
#loginDlg .dlg-sub, #upgradeDlg .dlg-sub { margin: 0; color: var(--muted); }
#loginSent { display: grid; gap: 14px; }
#loginSent[hidden], #loginForm[hidden] { display: none; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; }
.dlg-actions .btn { --h: 48px; }
.devlink { margin: 0; font-size: 13px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #ffb02b88; background: #ffb02b0d; color: #ffd27a; }
.devlink[hidden] { display: none; }
.devlink a { color: #ffb02b; font-weight: 700; }

/* music */
.mytrack { display: grid; gap: 10px; }
.mytrack[hidden], .trackbox[hidden], #dropBox[hidden], [data-music][hidden], #recentUploads[hidden] { display: none; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-row .btn { --h: 44px; cursor: pointer; }
.upload-row .btn.disabled { opacity: .5; cursor: not-allowed; }
.upload-row select { flex: 1; min-width: 160px; height: 44px; }
.trackbox { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: #08080f; border: 1px solid var(--line2); }
.track-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trackbox audio { width: 100%; height: 40px; }
.trackbox .linkbtn { color: var(--cyan); font-size: 13px; justify-self: start; margin-top: 6px; }
.toggle.rights span { color: var(--muted); font-size: 13px; }
#musicLock[hidden] { display: none; }
.opt .field label.toggle { justify-content: flex-start; margin-bottom: 0; }

/* upgrade dialog */
.me .btn-sm { padding: 7px 14px; }
#upgradeDlg { width: min(680px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; }
#upgradeDlg .dlg-sub { margin-top: 8px; }
.upplans { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin: 16px 0 6px; }
@media (max-width: 620px) { .upplans { grid-template-columns: 1fr; } }
.upplan { position: relative; border: 1.5px solid var(--line2); border-radius: 18px; padding: 18px; background: #ffffff05; display: flex; flex-direction: column; }
.upplan.hot { border-color: #ff2bd688; background: linear-gradient(160deg, #ff2bd614, transparent 60%), #ffffff05; }
.upplan h4 { font: 800 18px var(--display); margin: 0 0 6px; }
.upplan .badge { position: absolute; top: -11px; right: 14px; font: 700 11px var(--body); padding: 4px 10px; border-radius: 99px; background: var(--grad); color: #07070c; }
.upplan .price b { font: 800 30px var(--display); }
.upplan .price span { color: var(--dim); font-size: 14px; margin-left: 4px; }
.upplan ul { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 7px; font-size: 14px; color: var(--muted); flex: 1; }
.upplan li::before { content: "✓"; color: var(--cyan); font-weight: 700; margin-right: 8px; }
.upplan .btn { width: 100%; justify-content: center; }
.upfine { color: var(--dim); font-size: 12.5px; margin: 10px 0 0; }
.me .linkbtn { white-space: nowrap; }

/* login page (/login) */
.login-page nav .wrap { display: flex; justify-content: space-between; align-items: center; }
.login-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 40px 16px 80px; }
.login-card { width: min(460px, 100%); padding: 30px 26px 26px; border: 1px solid var(--line2); border-radius: 24px;
  background: radial-gradient(380px 220px at 0% 0%, #ff2bd61c, transparent 70%), var(--panel2); box-shadow: 0 40px 120px -20px #000; }
.login-card form, #loginSent { display: grid; gap: 14px; }
#loginSent[hidden], .login-card form[hidden] { display: none; }
.login-card h1 { font: 800 26px/1.15 var(--display); letter-spacing: -.8px; margin: 0; }
.login-card .dlg-sub { margin: 0; color: var(--muted); }
.login-card .pill { justify-self: start; }
.login-card .btn { width: 100%; justify-content: center; }
.login-card .fine { color: var(--dim); font-size: 12.5px; margin: 0; text-align: center; }
.login-card .fine a { color: var(--muted); }
