/* light-native: written for the light site; _theme.py leaves it as it is.
   One template, laid out as on uberdesigner.ai: the preview and "more like this" stay in view on the left, so similar
   templates are always on screen; the template itself scrolls on the right. */
.tpg { --ink: #0b0b0f; --ink-2: #4a4a55; --ink-3: #8a8a96; --hair: #0b0b0f14; --hair-2: #0b0b0f0d; --paper: #ffffff; --tint: #f3f3f6; --violet: #6f4ae6; --violet-soft: #f1ecff; }
/* the left column is as wide as the screen's height lets the preview and its three neighbours fit */
.tp { display: grid; grid-template-columns: min(58%, calc((100vh - 330px) * 1.6)) minmax(0, 1fr); gap: 36px; align-items: start; padding-top: calc(96px + env(safe-area-inset-top)); padding-bottom: 40px; }
.tp__left { position: sticky; top: calc(96px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 18px; }
.tp__media { position: relative; aspect-ratio: 16 / 10; width: 100%; border-radius: 12px; overflow: hidden; background: var(--tint); box-shadow: 0 0 0 1px var(--hair-2); view-transition-name: shot; }
.tp__media img, .tp__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tp__media video { opacity: 0; transition: opacity .4s; }
.tp__media.is-playing video { opacity: 1; }
.tp__pause { position: absolute; right: 12px; bottom: 12px; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: #ffffffe6; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 2px #0b0b0f1f; }
.tp__moreh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tp__moreh h2 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tp__moreh a { font-size: 14px; font-weight: 500; color: var(--violet); }
.tp__moreh a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tp__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mth { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mth__img { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--tint); box-shadow: 0 0 0 1px var(--hair-2); }
.mth__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.mth:hover .mth__img img { transform: scale(1.03); }
.mth__f { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mth__f b { min-width: 0; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the right column ---------- */
.tp__right { display: flex; flex-direction: column; min-width: 0; }
.tp__crumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--ink-3); }
.tp__crumb a:hover { color: var(--ink); }
.tp__crumb span::before { content: "/"; margin-right: 8px; opacity: .6; }
.tp__head { display: flex; align-items: center; gap: 12px; }
.tp__h { min-width: 0; font-size: clamp(34px, 3.4vw, 52px); line-height: 1; font-weight: 500; letter-spacing: -.045em; color: var(--ink); overflow-wrap: anywhere; }
.tp__head .tier { margin-top: 6px; }
.tp__save { display: grid; place-items: center; width: 38px; height: 38px; margin-left: auto; border-radius: 50%; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hair); transition: color .2s, background-color .2s; }
.tp__save:hover { color: var(--ink); background: var(--tint); }
.tp__save .ic { width: 16px; height: 16px; }
.tp__save[aria-pressed="true"] { color: var(--violet); background: var(--violet-soft); box-shadow: inset 0 0 0 1px #6f4ae64d; }
.tp__save[aria-pressed="true"] .ic { fill: currentColor; }
.tp__k { margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.tp__app { margin-top: 22px; }
.tp__appl { margin-bottom: 10px; font-size: 14px; color: var(--ink-2); }
.tp__appl b { font-weight: 500; color: var(--ink); }
.tp__themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tth { display: block; padding: 0; border-radius: 8px; }
.tth i { display: block; aspect-ratio: 16 / 10; border-radius: 8px; background: center top / cover no-repeat var(--tint); box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow .2s, transform .3s var(--spring-ease); }
.tth:hover i { transform: translateY(-2px); }
.tth[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--violet); }

/* the actions: copy prompt, then the downloads */
.tp__acts { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.tbtn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 46px; padding: 0 12px 0 18px; border-radius: 23px; font-size: 15.5px; font-weight: 500; color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .2s, box-shadow .2s, transform .3s var(--spring-ease); }
.tbtn:hover { background: var(--tint); }
.tbtn:active { transform: scale(.985); }
.tbtn--p { justify-content: center; color: #fff; background: linear-gradient(180deg, #8a66f7, #6f4ae6); box-shadow: inset 0 1px 0 #ffffff33, 0 1px 2px #3b1fa833, 0 8px 18px -10px #6f4ae6; }
.tbtn--p:hover { background: linear-gradient(180deg, #9473fa, #7552ec); }
.tbtn .tier[hidden] { display: none; }
.tp__note { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tp__links { display: flex; gap: 16px; margin-top: 6px; }
.tp__links a, .tp__lnk { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--violet); }
.tp__links a:hover, .tp__lnk:hover { text-decoration: underline; text-underline-offset: 4px; }

/* the words, and the details */
.tp__about { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hair); }
.tp__p { font-size: 17px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.tp__long { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.tp__lab { margin: 26px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tp__get { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair); }
.tp__get dt, .tp__get dd { margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.tp__get dt { font-weight: 500; color: var(--ink); }
.tp__get dd { color: var(--ink-2); }
.tp__get dt:not(:first-of-type), .tp__get dt:not(:first-of-type) + dd { border-top: 1px solid var(--hair); }
.tp__row p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.tp__row .tp__lnk { display: inline-block; margin-top: 8px; }
.tp__fine { font-size: 13px !important; color: var(--ink-3) !important; }
.tp__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); background: var(--tint); }
a.tchip:hover { color: var(--violet); background: var(--violet-soft); }
.tsw { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 6px; border-radius: 15px; font: 500 12.5px/1 ui-monospace, "JetBrains Mono", monospace; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .15s; }
.tsw:hover { background: var(--tint); color: var(--ink); }
.tsw i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px #0b0b0f26; }

/* shared marks */
.tier { flex: none; display: inline-block; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; line-height: 20px; font-style: normal; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); box-shadow: inset 0 0 0 1px #0b0b0f24; }
.tier--pro { color: #fff; background: var(--violet); box-shadow: none; }
.tp__none { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 80px 0; }
.tp__none h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1; font-weight: 500; letter-spacing: -.04em; color: var(--ink); }
.tp__none p { color: var(--ink-2); }
.tp__none .tbtn { width: auto; padding: 0 22px; }

/* ---------- narrower: one column, the template right under its preview, similar ones at the end ---------- */
@media (max-width: 999px) {
  .tp { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: calc(84px + env(safe-area-inset-top)); }
  .tp__left { display: contents; }
  .tp__media { order: 1; }
  .tp__right { order: 2; }
  .tp__more { order: 3; margin-top: 16px; }
}
@media (max-width: 559px) { .tp__thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp__thumbs .mth:nth-child(3) { display: none; } .tp__get { grid-template-columns: 1fr; } .tp__get dd { padding-top: 0; } .tp__get dt:not(:first-of-type) + dd { border-top: 0; } }
@media (prefers-reduced-motion: reduce) { .mth__img img, .tth i { transition: none; } }

/* ---------- the live build (real.js): a file the theme doesn't have, a press in progress, the free counter, and the
   prompt sheet ("prompt copied" / "your prompt is ready", the next step, the text to select) ---------- */
.tbtn:disabled { cursor: default; transform: none; }
.tbtn[data-unavailable] { color: var(--ink-3); background: var(--tint); box-shadow: none; }
.tbtn[aria-busy="true"] { opacity: .7; }
.tp__cnt { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
button.tp__lnk { padding: 0; }
.psh { --ink: #0b0b0f; --ink-2: #4a4a55; --ink-3: #8a8a96; --hair: #0b0b0f14; --paper: #ffffff; --tint: #f3f3f6; --violet: #6f4ae6; width: min(620px, calc(100vw - 32px)); max-height: min(86vh, 860px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 0 0 1px var(--hair), 0 30px 80px -20px #0b0b0f59; }
.psh::backdrop { background: #0b0b0f66; }
.psh__c { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.psh__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.psh__h { font-size: 26px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; }
.psh__x { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); }
.psh__x:hover { color: var(--ink); background: var(--tint); }
.psh__x .ic { width: 16px; height: 16px; }
.psh__lead { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.psh__cnt, .psh__vn { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.psh__err { font-size: 13px; font-weight: 500; color: #b42318; }
.psh__ver { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-2); }
.psh__vb { justify-content: center; }
.psh__text { max-height: 34vh; overflow: auto; margin: 0; padding: 12px 14px; border-radius: 10px; font: 12.5px/1.55 ui-monospace, "JetBrains Mono", monospace; color: var(--ink-2); background: var(--tint); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
@media (max-width: 559px) { .psh { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; } }

/* ---------- keep exploring: the library's cards under the template ---------- */
.tier[hidden] { display: none; }
.tpx { padding-top: 56px; padding-bottom: 24px; border-top: 1px solid var(--hair); margin-top: 24px; }
.tpx[hidden] { display: none; }
.tpx__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.tpx__h { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; font-weight: 500; letter-spacing: -.035em; color: var(--ink); }
.tpx__all { flex: none; font-size: 15px; font-weight: 500; color: var(--violet); }
.tpx__all:hover { text-decoration: underline; text-underline-offset: 4px; }
.tpx__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 2200px) { .tpx__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1199px) { .tpx__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 799px) { .tpx__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } .tpx { padding-top: 40px; } }
@media (max-width: 479px) { .tpx__grid { grid-template-columns: 1fr; } }
.tpx .it__a { display: flex; flex-direction: column; gap: 10px; border-radius: 10px; outline-offset: 4px; }
.tpx .it__media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--tint); isolation: isolate; }
.tpx .it__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hair-2); pointer-events: none; }
.tpx .it__media img, .tpx .it__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpx .it__media img { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.tpx .it__media video { opacity: 0; transition: opacity .4s; }
.tpx .it__media.is-playing video { opacity: 1; }
.tpx .it__a:hover .it__media img { transform: scale(1.02); }
.tpx .it__f { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tpx .it__t { min-width: 0; font-size: 15.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpx .it__by { margin-top: -4px; font-size: 13px; color: var(--ink-3); }
.tpx__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hair); }
.tpx__t { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tpx__t b { color: var(--ink); font-weight: 500; }
.tpx__b { height: 38px; padding: 0 18px; border-radius: 19px; font-size: 14px; font-weight: 500; color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; }
.tpx__b:hover { background: var(--tint); }
.tpx__b[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tpx .it__media img { transition: none; } }
