/* iDOLTime — iOS liquid glass × anime game. Palette: red, silver, white; red (with a white edge) for icons, selection and highlights; very little yellow. */
:root {
  --red: #e8112d; --red-d: #8a0018; --red-dd: #1a0006; --hi: #f0102f; --hi-d: #b8001f;
  --pink: #ff4d8d; --silver: #c7cbd1; --white: #ffffff;
  --glass: rgba(255, 255, 255, .08); --glass-2: rgba(255, 255, 255, .14); --stroke: rgba(255, 255, 255, .22);
  --r: 20px; --ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --ttl: 'Black Ops One', var(--ui);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--ui); color: var(--white); background: var(--red-dd); overflow-x: hidden; padding-bottom: 110px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .f { fill: currentColor; stroke: none; }
button { font-family: inherit; color: inherit; }

/* animated anime background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(255, 31, 61, .22), transparent 70%),
    radial-gradient(80% 60% at 50% 30%, #c8001e 0%, #6a0014 45%, var(--red-dd) 100%); }
.bg::before { content: ''; position: absolute; inset: -50%;
  background: repeating-conic-gradient(from 0deg at 50% 30%, rgba(255, 255, 255, .055) 0 4deg, transparent 4deg 14deg);
  animation: spin 90s linear infinite; }
.bg::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.4px) 0 0 / 6px 6px;
  mask-image: linear-gradient(180deg, transparent 30%, #000); }
.bg .speed { position: absolute; inset: 0; background: repeating-linear-gradient(105deg, transparent 0 46px, rgba(255, 255, 255, .03) 46px 48px); animation: slide 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { background-position: 200px 0; } }

/* liquid glass */
.glass, .card { background: linear-gradient(160deg, var(--glass-2), var(--glass) 40%, rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .06), 0 20px 50px rgba(0, 0, 0, .45); }
.card { border-radius: var(--r); padding: 16px; position: relative; }

/* top bar */
.top { position: sticky; top: 10px; z-index: 30; margin: 10px auto 0; width: min(1240px, calc(100% - 32px)); height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 16px; }
.brand { display: flex; align-items: center; gap: 4px; font-family: var(--ttl); font-size: 24px; letter-spacing: .02em; transform: skewX(-8deg); }
.brand img { height: 34px; margin-right: 6px; transform: rotate(-12deg); filter: drop-shadow(0 4px 10px rgba(232, 17, 45, .8)); }
.brand b { font-weight: 400; color: var(--white); text-shadow: 2px 2px 0 var(--red-d); }
.brand em { font-style: normal; color: var(--hi); text-shadow: 2px 2px 0 var(--red-d); }

main { width: min(1240px, calc(100% - 32px)); margin: 16px auto 0; }
.screen { display: none; }
.screen.active { display: block; animation: pop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* buttons */
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--glass-2); display: grid; place-items: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .15s, background .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .24); }
.icon-btn:active, .tile:active, .cta:active, .go-btn:active, .tab:active { transform: scale(.92); }
.icon-btn.on { background: var(--white); color: var(--red); }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border: 0; border-radius: 18px; cursor: pointer;
  font-size: 18px; font-weight: 800; letter-spacing: .02em; color: var(--red-dd);
  background: linear-gradient(180deg, #ffe3ef, var(--hi) 45%, var(--hi-d)); box-shadow: inset 0 1px 0 #fff, 0 10px 30px rgba(255, 31, 61, .35); transition: transform .15s; }
.cta svg { width: 24px; height: 24px; stroke-width: 2.4; }
.cta .arr { margin-left: auto; margin-right: -4px; }
.cta span { margin-right: auto; }
.cta.sm { width: 52px; height: 52px; padding: 0; }
.go-btn { width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--red-dd);
  background: radial-gradient(circle at 35% 30%, #ffe3ef, var(--hi) 45%, var(--hi-d)); box-shadow: 0 0 0 6px rgba(255, 31, 61, .18), 0 12px 34px rgba(255, 31, 61, .45);
  animation: pulse 2.2s ease-in-out infinite; transition: transform .15s; }
.go-btn svg { width: 34px; height: 34px; stroke-width: 2.3; }
.go-btn:disabled { animation: none; filter: grayscale(1) brightness(.7); cursor: not-allowed; }
.go-btn.busy svg { animation: spin 1.2s linear infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(255, 31, 61, .08), 0 12px 34px rgba(255, 31, 61, .6); } }

/* segmented control (iOS) */
.seg { display: flex; padding: 4px; gap: 2px; border-radius: 18px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .1); }
.seg button { flex: 1; min-width: 44px; height: 40px; border: 0; border-radius: 18px; background: transparent; color: var(--silver); cursor: pointer;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; transition: background .2s, color .2s; }
.seg button.on { background: var(--white); color: var(--red); box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.seg button:hover:not(.on) { color: var(--white); }

/* build */
.build { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; align-items: start; }
.stage-card { padding: 0; overflow: hidden; }
.stage-card canvas { display: block; width: 100%; height: auto; }
.stage-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 10px; align-items: center; }
#heroName { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--white); font-family: var(--ttl); font-size: clamp(26px, 4vw, 38px);
  text-transform: uppercase; letter-spacing: .03em; transform: skewX(-8deg); text-shadow: 3px 3px 0 var(--red-d), 0 0 24px rgba(255, 31, 61, .5); padding: 2px 4px; border-radius: 8px; }
#heroName:focus { outline: 2px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .2); }
.stats { position: absolute; right: 14px; top: 76px; display: grid; gap: 8px; }
.stat { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; border-radius: 18px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.stat svg { width: 18px; height: 18px; color: var(--hi); }
.stat .bar { width: 70px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--white), var(--hi)); transition: width .4s cubic-bezier(.2, .9, .3, 1.2); }
.stat b { font-size: 12px; width: 22px; text-align: right; color: var(--silver); }
.move { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) skewX(-8deg); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 8px 18px; border-radius: 18px; font-family: var(--ttl); font-size: 18px; letter-spacing: .04em; color: var(--red-dd);
  background: linear-gradient(90deg, var(--hi), #ffe3ef); box-shadow: 0 6px 20px rgba(255, 31, 61, .4); }
.move svg { width: 18px; height: 18px; stroke-width: 2.5; }

.editor { display: grid; gap: 14px; }
.slots button svg { width: 24px; height: 24px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tiles.many { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tiles.many .tile { border-radius: 13px; }
.tiles.many .tile .badge { width: 22px; height: 22px; left: 5px; top: 5px; }
.tiles.many .tile .badge svg { width: 13px; height: 13px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 15px; padding: 0; cursor: pointer; overflow: hidden; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .25); transition: transform .15s, box-shadow .2s; }
.tile canvas { width: 100%; height: 100%; display: block; }
.tile .badge { position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: var(--silver); }
.tile .badge svg { width: 16px; height: 16px; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.tile.sel { border: 0; box-shadow: 0 0 0 3px var(--hi), 0 0 26px rgba(255, 31, 61, .55); }
.tile.sel .badge { background: var(--hi); color: var(--red-dd); }
.tile.sel::after { content: ''; position: absolute; right: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.face-seg { width: 160px; margin: -4px auto 0; }
.part-name { text-align: center; font-family: var(--ttl); font-size: 20px; letter-spacing: .04em; transform: skewX(-8deg); color: var(--white); min-height: 24px; }
.sets { display: flex; align-items: center; gap: 10px; }
.sets-ico { color: var(--hi); display: grid; place-items: center; }
.unis { display: flex; gap: 8px; flex: 1; justify-content: space-between; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; margin: -4px 0; }
.unis::-webkit-scrollbar { display: none; }
.uni { flex: none; }
.uni { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--stroke); cursor: pointer; display: grid; place-items: center; color: var(--white);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), transparent 60%), var(--c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); transition: transform .15s; }
.uni svg { width: 20px; height: 20px; color: var(--ic, #fff); }
.uni:hover { transform: scale(1.08); }
.uni.full { box-shadow: 0 0 0 3px var(--hi); }

/* generate screens */
.gen { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.media { min-height: 62vh; display: grid; place-items: center; overflow: hidden; padding: 12px; }
.media img, .media video { max-width: 100%; max-height: 74vh; border-radius: 14px; display: block; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.media .empty svg { width: 96px; height: 96px; color: rgba(255, 255, 255, .25); stroke-width: 1.2; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.media .float { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 10px; }
.media .float a.icon-btn { color: var(--red-dd); background: var(--hi); border: 0; width: 56px; height: 56px; text-decoration: none; }
.media .float a.icon-btn svg { width: 26px; height: 26px; stroke-width: 2.4; }
.media .refthumb { position: absolute; left: 22px; bottom: 22px; width: 70px; border-radius: 10px; border: 2px solid var(--white); }

.dock { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; justify-items: center; }
.dock #sketch { width: 64px; border-radius: 10px; border: 1px solid var(--stroke); grid-row: span 1; }
.dock .seg { width: 100%; grid-column: 1 / -1; }
.dock #genPoster, .dock #genTrailer { grid-column: 1 / -1; }
.dock .icon-btn[data-toggle] { position: absolute; right: 16px; top: 16px; }
.dir { grid-column: 1 / -1; width: 100%; background: rgba(0, 0, 0, .3); color: var(--white); border: 1px solid var(--stroke); border-radius: 13px; padding: 12px 14px; font: 15px var(--ui); resize: none; }
.dir:focus { outline: 2px solid var(--hi); }
.pill-status { grid-column: 1 / -1; min-height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 18px; font-weight: 700; font-size: 14px; color: var(--silver); }
.pill-status:empty { visibility: hidden; }
.pill-status.busy { background: rgba(0, 0, 0, .3); color: var(--white); }
.pill-status.ok { background: rgba(255, 31, 61, .16); color: var(--hi); }
.pill-status.err { background: rgba(255, 77, 141, .16); color: #ffc2d6; }
.pill-status .spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .25); border-top-color: var(--hi); animation: spin .8s linear infinite; }
.pill-status .t { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--silver); }

.timeline { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding-top: 4px; }
.shot { display: grid; justify-items: center; gap: 6px; padding: 10px 0 8px; border-radius: 11px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .1); }
.shot svg { width: 22px; height: 22px; color: var(--white); }
.shot:last-child { background: linear-gradient(180deg, rgba(232, 17, 45, .6), rgba(232, 17, 45, .25)); border-color: rgba(255, 31, 61, .5); }
.shot:last-child svg { color: var(--hi); }
.shot small { font-size: 10px; color: var(--silver); font-variant-numeric: tabular-nums; }

/* tab bar (iOS 26 floating) */
.tabbar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; display: flex; gap: 4px; padding: 6px; border-radius: 18px; }
.tab { width: 92px; height: 58px; border: 0; border-radius: 18px; background: transparent; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--silver); transition: background .2s, color .2s, transform .15s; }
.tab svg { width: 24px; height: 24px; }
.tab span { font-size: 11px; font-weight: 700; }
.tab.active { background: rgba(255, 255, 255, .92); color: var(--red); box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }

dialog { border-radius: var(--r); color: var(--white); padding: 22px; border: 1px solid var(--stroke); }
dialog::backdrop { background: rgba(26, 0, 6, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog form { display: flex; gap: 10px; align-items: center; }
dialog .big-ico { width: 30px; height: 30px; color: var(--hi); }
dialog input { height: 52px; border-radius: 18px; border: 1px solid var(--stroke); background: rgba(0, 0, 0, .3); color: #fff; padding: 0 18px; font-size: 17px; width: 190px; }

#toast { position: fixed; left: 50%; top: 80px; transform: translate(-50%, -140px); z-index: 60; padding: 12px 18px; border-radius: 18px; font-weight: 700; font-size: 14px;
  background: rgba(255, 255, 255, .95); color: var(--red-dd); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); max-width: calc(100vw - 32px); }
#toast.on { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .build, .gen { grid-template-columns: 1fr; }
  .media { min-height: 46vh; }
}
@media (max-width: 480px) {
  main, .top { width: calc(100% - 32px); }
  .card { padding: 12px; }
  .tiles { gap: 8px; }
  .tiles.many { grid-template-columns: repeat(4, 1fr); }
  .tab { width: 82px; }
  .stats { top: 66px; right: 10px; }
  .stat .bar { width: 48px; }
  .unis { gap: 4px; }
  .uni { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

/* YOU — selfie step */
.you { max-width: 460px; margin: 4vh auto 0; display: grid; gap: 18px; justify-items: center; padding: 28px 22px; }
.photo { position: relative; width: 220px; height: 220px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.25), rgba(0,0,0,.25)); border: 1px solid var(--stroke); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.photo .ph svg { width: 64px; height: 64px; stroke-width: 1.4; color: var(--white); }
.photo .ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px dashed rgba(255, 31, 61, .7); animation: spin 14s linear infinite; pointer-events: none; }
.photo.has .ring { border-style: solid; border-color: var(--hi); box-shadow: 0 0 30px rgba(255, 31, 61, .45); animation: none; }
.photo .swap { position: absolute; right: 6px; bottom: 6px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--hi); color: var(--red-dd); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.photo .swap svg { stroke-width: 2.3; }
.photo:hover { transform: scale(1.02); } .photo { transition: transform .2s; }
.name-in { width: 100%; text-align: center; background: rgba(0,0,0,.25); border: 1px solid var(--stroke); border-radius: 18px; height: 60px; color: #fff;
  font-family: var(--ttl); font-size: 28px; letter-spacing: .05em; text-transform: uppercase; }
.name-in::placeholder { color: rgba(255,255,255,.35); }
.name-in:focus { outline: 2px solid var(--hi); }
.mode { width: 100%; }
.mode button { display: flex; gap: 8px; align-items: center; justify-content: center; height: 46px; }
.mode button span { font-size: 14px; }
.privacy { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: var(--silver); }
.privacy svg { width: 15px; height: 15px; }
.tab { width: 84px; }
@media (max-width: 480px) { .tab { width: 72px; } .photo { width: 190px; height: 190px; } }

/* title styles (live preview on the name + chips) */
.ts-chrome, .ts-fire, .ts-gold, .ts-stone { -webkit-background-clip: text; background-clip: text; color: transparent !important; caret-color: #fff; }
.ts-chrome { background-image: linear-gradient(180deg, #ffffff 0%, #e6e8ec 38%, #6f747c 50%, #f4f5f7 70%, #9aa0a8 100%); filter: drop-shadow(0 3px 0 #5a0010) drop-shadow(0 0 10px rgba(255,255,255,.35)); }
.ts-fire { background-image: linear-gradient(180deg, #fffbe0 0%, #ffd60a 40%, #ff7a00 65%, #d7142b 100%); filter: drop-shadow(0 3px 0 #3a0006) drop-shadow(0 0 12px rgba(255,120,0,.6)); }
.ts-gold { background-image: linear-gradient(180deg, #fff6c2 0%, #ffd60a 45%, #b8860b 55%, #ffe680 80%, #a87400 100%); filter: drop-shadow(0 3px 0 #5a0010) drop-shadow(0 0 10px rgba(255,214,10,.5)); }
.ts-stone { background-image: linear-gradient(180deg, #d9d9d9 0%, #8a8a8a 50%, #4a4a4a 100%); filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 12px rgba(232,17,45,.8)); }
.ts-anime { color: var(--hi) !important; -webkit-text-stroke: 1.5px #fff; text-shadow: 3px 3px 0 var(--red), 6px 6px 0 rgba(0,0,0,.4); font-style: italic; }
.ts-neon { color: #fff !important; text-shadow: 0 0 6px #fff, 0 0 14px var(--pink), 0 0 28px var(--pink); }
.styles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.styles button { width: 48px; height: 48px; border-radius: 11px; border: 1px solid var(--stroke); background: rgba(0,0,0,.3); cursor: pointer; font-family: var(--ttl); font-size: 26px; line-height: 1; display: grid; place-items: center; transition: transform .15s; }
.styles button:hover { transform: translateY(-2px); }
.styles button.on { box-shadow: 0 0 0 3px var(--hi), 0 0 18px rgba(255, 31, 61, .45); }
.styles button span { display: block; padding: 2px; }

/* brand: iDOL logo + DOOMSTIME */
.brand { transform: none; gap: 10px; }
.brand .logo { height: 40px; margin: 0; transform: rotate(-4deg); filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.brand .logo-txt { font-weight: 400; transform: skewX(-8deg); }
.brand .doom { font-family: var(--ttl); font-size: 26px; letter-spacing: .04em; transform: skewX(-6deg);
  background: linear-gradient(180deg, #ffffff 0%, #d9dce1 35%, #7c828a 52%, #eceef1 72%, #a9aeb5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3a0006) drop-shadow(0 0 10px rgba(255, 90, 40, .55)); text-shadow: none; }
@media (max-width: 480px) { .brand .logo { height: 32px; } .brand .doom { font-size: 20px; } }

/* ===== FROZEN ICE / CRYSTAL LAYER ===== */
:root { --ice: rgba(235, 244, 255, .9); --frost: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"); }
.glass, .card {
  background:
    linear-gradient(155deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.07) 34%, rgba(230,240,255,.04) 62%, rgba(255,255,255,.15) 100%),
    var(--frost);
  -webkit-backdrop-filter: blur(34px) saturate(150%) brightness(1.08); backdrop-filter: blur(34px) saturate(150%) brightness(1.08);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 1.5px 1.5px 0 rgba(255,255,255,.7), inset -1px -1px 0 rgba(255,255,255,.15), inset 0 0 28px rgba(255,255,255,.10), 0 18px 44px rgba(0,0,0,.45);
}
.card, .top, .tabbar { isolation: isolate; }
/* moving ice sheen */
.card::before, .top::before, .tabbar::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.22) 47%, rgba(255,255,255,.05) 52%, transparent 60%);
  background-size: 260% 100%; background-position: 130% 0; animation: sheen 8s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes sheen { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
/* crystal shard in the corner */
.card::after { content: ''; position: absolute; top: -1px; right: -1px; width: 34px; height: 34px; pointer-events: none; z-index: 2; border-top-right-radius: inherit;
  background: linear-gradient(225deg, rgba(255,255,255,.75), rgba(255,255,255,.15) 45%, transparent 46%); }
/* frozen-window edges around the whole screen */
.bg { box-shadow: inset 0 0 140px rgba(235,244,255,.16), inset 0 0 40px rgba(255,255,255,.10); }
.bg .speed { background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 34%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 38% 72%, #fff, transparent), radial-gradient(1px 1px at 86% 82%, #fff, transparent),
  radial-gradient(1px 1px at 55% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 22% 92%, #fff, transparent),
  repeating-linear-gradient(105deg, transparent 0 46px, rgba(255,255,255,.035) 46px 48px);
  background-size: 420px 420px, 380px 380px, 460px 460px, 340px 340px, 400px 400px, 440px 440px, auto; animation: drift 40s linear infinite; }
@keyframes drift { to { background-position: 420px 420px, -380px 380px, 460px -460px, 340px 340px, -400px 400px, 440px 440px, 200px 0; } }
/* icy controls */
.seg { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.seg button.on, .tab.active { background: linear-gradient(180deg, #ffffff, #e9eff6); color: var(--red); box-shadow: inset 0 -2px 0 rgba(160,175,195,.5), 0 4px 14px rgba(0,0,0,.28); }
.icon-btn { border-radius: 14px; background: linear-gradient(160deg, rgba(255,255,255,.3), rgba(255,255,255,.08)); border: 1px solid rgba(255,255,255,.45); box-shadow: inset 1px 1px 0 rgba(255,255,255,.7); }
.tile { border: 1px solid rgba(255,255,255,.3); box-shadow: inset 1px 1px 0 rgba(255,255,255,.35); }
.tile.sel { box-shadow: 0 0 0 3px var(--hi), 0 0 0 5px rgba(255,255,255,.5), 0 0 26px rgba(255, 31, 61, .5); }
.stat, .shot, .dir, .name-in, .pill-status.busy { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.cta, .pill-cta { box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(150, 0, 70, .35), 0 10px 30px rgba(255, 31, 61, .35); }

/* ===== BERRY-FRESH background + lightning ===== */
body { background: #a80f2c; }
.bg { background:
    radial-gradient(55% 40% at 50% 0%, rgba(255, 236, 242, .45), transparent 70%),
    radial-gradient(90% 70% at 50% 35%, #ff5a5f 0%, #ee1c3a 42%, #c41232 72%, #8a0a24 100%); }
.bg::before { background: repeating-conic-gradient(from 0deg at 50% 30%, rgba(255, 255, 255, .07) 0 4deg, transparent 4deg 14deg); }
.bg .bolts { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }

/* ===== step-by-step wizard ===== */
body { padding-bottom: 120px; }
.wiz-top { width: min(1240px, calc(100% - 32px)); margin: 12px auto 0; display: grid; gap: 8px; }
.wiz-label { display: flex; align-items: center; gap: 10px; font-family: var(--ttl); font-size: 22px; letter-spacing: .04em; }
.wiz-label b { font-weight: 400; transform: skewX(-8deg); }
.wiz-label span:last-child { margin-left: auto; font-family: var(--ui); font-size: 14px; font-weight: 800; color: rgba(255,255,255,.85); }
.wiz-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--white); color: var(--red); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.wiz-ico svg { width: 20px; height: 20px; stroke-width: 2.2; }
.wiz-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.22); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
.wiz-bar i { display: block; height: 100%; width: 10%; border-radius: 6px; background: linear-gradient(90deg, #ffffff, var(--hi)); box-shadow: 0 0 12px rgba(255, 31, 61, .8); transition: width .45s cubic-bezier(.2,.9,.3,1.2); }
.wiznav { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: min(520px, calc(100% - 32px));
  display: flex; gap: 10px; padding: 8px; border-radius: 22px; }
.wiznav .icon-btn { width: 58px; height: 58px; flex: none; }
.wiznav .cta { flex: 1; height: 58px; }
.wiznav .cta:disabled { filter: grayscale(.8) brightness(.85); cursor: not-allowed; }
.title-card { max-width: 560px; margin: 4vh auto 0; display: grid; gap: 22px; justify-items: center; padding: 36px 22px; }
.title-preview { font-family: var(--ttl); font-size: clamp(40px, 9vw, 72px); line-height: 1.05; text-align: center; transform: skewX(-8deg); word-break: break-word; padding: 0 8px; }
.title-card .seg { width: 200px; }
.title-card .styles button { width: 58px; height: 58px; font-size: 30px; }

/* ===== alignment + motion focus: only the action button animates ===== */
svg { display: block; }
.cta { justify-content: center; gap: 10px; }
.cta span, .cta .arr { margin: 0; }
.icon-btn, .seg button, .tab, .uni, .wiz-ico, .stat, .shot, .move, .pill-status, .privacy, .kicker, .flow span, .step-card, .unis-row span { align-items: center; justify-content: center; }
.seg button { display: flex; }
.seg button svg { margin: auto; }
.stat { display: flex; } .stat svg { flex: none; }
.move { align-items: center; } .move svg { flex: none; }
/* everything else stays still */
.card::before, .top::before, .tabbar::before { animation: none; background-position: 70% 0; }
.photo .ring { animation: none; }
.media .empty svg { animation: none; }
.tile:hover, .uni:hover, .photo:hover, .styles button:hover { transform: none; }
/* the action button */
#wizNext:not(:disabled), .go-btn:not(:disabled), .big-cta, .pill-cta { position: relative; overflow: hidden; animation: actionPulse 1.8s ease-in-out infinite; }
#wizNext:not(:disabled)::after, .go-btn:not(:disabled)::after, .big-cta::after, .pill-cta::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.75) 46%, transparent 60%); background-size: 250% 100%; animation: actionShine 2.4s ease-in-out infinite; }
@keyframes actionPulse { 0%, 100% { box-shadow: inset 0 1px 0 #fff, 0 0 0 0 rgba(255, 31, 61, .55), 0 10px 26px rgba(255, 31, 61, .35); } 50% { box-shadow: inset 0 1px 0 #fff, 0 0 0 8px rgba(255, 31, 61, 0), 0 12px 34px rgba(255, 31, 61, .6); } }
@keyframes actionShine { 0%, 40% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
.go-btn:not(:disabled) { animation: actionPulse 1.8s ease-in-out infinite; }
/* when generate is the action, Next waits quietly */
#wizNext:disabled { animation: none; }
@media (prefers-reduced-motion: reduce) { #wizNext, .go-btn, .big-cta, .pill-cta { animation: none !important; } }
@media (max-width: 900px) {
  .stage-card { display: grid; justify-items: center; }
  .stage-card canvas { height: 42vh; width: auto; max-width: 100%; }
  .stats { top: 64px; } .stat .bar { width: 44px; }
  .move { bottom: 10px; font-size: 15px; padding: 6px 14px; }
}

/* ===== METALLIC TITLE FINISHES ===== */
.mt-chrome, .mt-gold, .mt-red, .mt-steel, .mt-fire, .mt-ice { -webkit-background-clip: text; background-clip: text; color: transparent !important; caret-color: #fff;
  -webkit-text-stroke: 1px rgba(255,255,255,.55); }
.mt-chrome { background-image: linear-gradient(180deg, #ffffff 0%, #f2f4f7 22%, #9aa1aa 45%, #3c4047 50%, #c9ced5 56%, #ffffff 76%, #8d939b 100%); filter: drop-shadow(0 2px 0 #2a2d31) drop-shadow(0 4px 0 #5a0010) drop-shadow(0 0 10px rgba(255,255,255,.3)); }
.mt-gold { background-image: linear-gradient(180deg, #fffbe6 0%, #ffe27a 22%, #c9930f 45%, #6b4700 50%, #f5c542 58%, #fff3b0 76%, #a87400 100%); filter: drop-shadow(0 2px 0 #5a3a00) drop-shadow(0 4px 0 #3a0006) drop-shadow(0 0 10px rgba(255,214,10,.45)); }
.mt-red { background-image: linear-gradient(180deg, #ffd6dc 0%, #ff5a6e 22%, #c4001f 45%, #4a0008 50%, #e8112d 58%, #ffa3b0 76%, #8a0018 100%); -webkit-text-stroke: 1px rgba(230,232,236,.9); filter: drop-shadow(0 2px 0 #9aa0a8) drop-shadow(0 4px 0 #2a0006) drop-shadow(0 0 10px rgba(255,80,100,.45)); }
.mt-steel { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, transparent 1px 3px), linear-gradient(180deg, #e6e8eb 0%, #a7adb5 30%, #5d636b 48%, #2b2f35 52%, #7c838c 62%, #c9ced5 85%, #6b7178 100%); filter: drop-shadow(0 2px 0 #15171a) drop-shadow(0 4px 0 #000) drop-shadow(0 0 8px rgba(0,0,0,.4)); }
.mt-fire { background-image: linear-gradient(180deg, #fffbe0 0%, #ffd60a 30%, #ff8a00 46%, #8a1a00 51%, #ff5a1a 60%, #ffd27a 80%, #d7142b 100%); filter: drop-shadow(0 2px 0 #3a0a00) drop-shadow(0 4px 0 #1a0000) drop-shadow(0 0 14px rgba(255,120,0,.7)); }
.mt-ice { background-image: linear-gradient(180deg, #ffffff 0%, #eef8ff 25%, #b7d0e2 46%, #5a7488 50%, #d8ecf8 58%, #ffffff 78%, #a9c2d6 100%); -webkit-text-stroke: 1px rgba(255,255,255,.9); filter: drop-shadow(0 2px 0 #7a8ea0) drop-shadow(0 4px 0 #3a0010) drop-shadow(0 0 14px rgba(230,245,255,.7)); }

/* big preview: extruded 3D depth behind the metal face */
.title-preview { position: relative; isolation: isolate; padding: 6px 14px 14px; }
.title-preview::before { content: attr(data-text); position: absolute; inset: 6px 14px 14px; z-index: -1; color: #1a0006; -webkit-text-stroke: 6px #12000466; background: none;
  text-shadow: 1px 1px 0 #3a0a14, 2px 2px 0 #3a0a14, 3px 3px 0 #330812, 4px 4px 0 #2c0710, 5px 5px 0 #25060e, 6px 6px 0 #1e050b, 8px 12px 18px rgba(0,0,0,.55); }
.title-preview.mt-chrome, .title-preview.mt-gold, .title-preview.mt-red, .title-preview.mt-steel, .title-preview.mt-fire, .title-preview.mt-ice { filter: drop-shadow(0 0 16px rgba(255,255,255,.18)); -webkit-text-stroke: 1.5px rgba(255,255,255,.7); }
.title-preview { animation: none; }
/* chips */
.styles.fonts button { width: 64px; font-size: 22px; color: #fff; }
.styles.fonts button span { line-height: 1; }
.styles button span { font-size: inherit; }

/* ===== PREMIUM: cinematic video background (replaces rays / lightning) ===== */
.bg::before, .bg .speed, .bg .bolts { display: none !important; }
.bg { background: radial-gradient(90% 70% at 50% 35%, #e8263f 0%, #b5102c 48%, #5a0616 100%); box-shadow: none; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.bg.has-video .bg-video { opacity: 1; }
.bg::after { content: ''; position: absolute; inset: 0; mask-image: none; -webkit-mask-image: none;
  background: linear-gradient(180deg, rgba(26,0,8,.45) 0%, rgba(26,0,8,.12) 35%, rgba(26,0,8,.18) 65%, rgba(26,0,8,.6) 100%),
              radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(16,0,5,.55) 100%); }
/* quieter, more premium glass */
.glass, .card { background: linear-gradient(155deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 40%, rgba(255,255,255,.04) 70%, rgba(255,255,255,.10) 100%);
  -webkit-backdrop-filter: blur(30px) saturate(140%); backdrop-filter: blur(30px) saturate(140%);
  border: 1px solid rgba(255,255,255,.26); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 24px 60px rgba(10,0,4,.45); }
.card::after { display: none; }
.card::before, .top::before, .tabbar::before { opacity: .45; }
.wiz-bar { background: rgba(255,255,255,.16); }

/* metal gradients as variables so the big preview can layer face over 3D depth */
.mt-chrome { --metal: linear-gradient(180deg, #ffffff 0%, #f2f4f7 22%, #9aa1aa 45%, #3c4047 50%, #c9ced5 56%, #ffffff 76%, #8d939b 100%); }
.mt-gold   { --metal: linear-gradient(180deg, #fffbe6 0%, #ffe27a 22%, #c9930f 45%, #6b4700 50%, #f5c542 58%, #fff3b0 76%, #a87400 100%); }
.mt-red    { --metal: linear-gradient(180deg, #ffd6dc 0%, #ff5a6e 22%, #c4001f 45%, #4a0008 50%, #e8112d 58%, #ffa3b0 76%, #8a0018 100%); }
.mt-steel  { --metal: repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, transparent 1px 3px), linear-gradient(180deg, #e6e8eb 0%, #a7adb5 30%, #5d636b 48%, #2b2f35 52%, #7c838c 62%, #c9ced5 85%, #6b7178 100%); }
.mt-fire   { --metal: linear-gradient(180deg, #fffbe0 0%, #ffd60a 30%, #ff8a00 46%, #8a1a00 51%, #ff5a1a 60%, #ffd27a 80%, #d7142b 100%); }
.mt-ice    { --metal: linear-gradient(180deg, #ffffff 0%, #eef8ff 25%, #b7d0e2 46%, #5a7488 50%, #d8ecf8 58%, #ffffff 78%, #a9c2d6 100%); }
.title-preview, .title-preview[class*="mt-"] { background: none !important; color: #1a0006 !important; filter: none !important; -webkit-text-stroke: 7px #120004 !important;
  text-shadow: 1px 1px 0 #3a0a14, 2px 2px 0 #3a0a14, 3px 3px 0 #330812, 4px 4px 0 #2c0710, 5px 5px 0 #25060e, 6px 6px 0 #1e050b, 7px 7px 0 #18040a, 10px 14px 22px rgba(0,0,0,.6); }
.title-preview::before { display: none; }
.title-preview::after { content: attr(data-text); position: absolute; inset: 6px 14px 14px; pointer-events: none; text-shadow: none;
  background-image: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.75);
  filter: drop-shadow(0 0 12px rgba(255,255,255,.22)); }

/* ===== BRAND LOCKUP: real iDOL logo + metallic DOOMSTIME ===== */
.brand .logo { height: 44px; transform: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.brand .doom, .metal-word { position: relative; isolation: isolate; font-family: 'Black Ops One', var(--ui); letter-spacing: .05em; transform: skewX(-8deg);
  --metal: linear-gradient(180deg, #ffffff 0%, #f3f5f8 20%, #b9bec6 40%, #4a4f57 49%, #2a2d33 52%, #c9ced5 60%, #ffffff 78%, #8d939b 100%);
  background-image: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.75);
  filter: drop-shadow(0 1px 0 #6b7078) drop-shadow(0 2px 0 #3a3e45) drop-shadow(0 3px 0 #1a0006) drop-shadow(0 6px 10px rgba(0,0,0,.5)) drop-shadow(0 0 14px rgba(255,255,255,.18)); }
.brand .doom { font-size: 25px; }


/* ===== size slider (iOS style, fun) ===== */
.sizer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); }
.sizer[hidden] { display: none; }
.sz-ico { display: grid; place-items: center; color: var(--white); flex: none; }
.sz-ico.sm svg { width: 15px; height: 15px; opacity: .75; }
.sz-ico.lg svg { width: 28px; height: 28px; }
.sizer b { min-width: 52px; text-align: right; font-family: var(--ttl); font-weight: 400; font-size: 18px; color: var(--hi); font-variant-numeric: tabular-nums; }
#sizeRange { -webkit-appearance: none; appearance: none; flex: 1; height: 30px; background: transparent; cursor: pointer; --p: 40%; }
#sizeRange::-webkit-slider-runnable-track { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--hi) 0 var(--p), rgba(255,255,255,.22) var(--p) 100%); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
#sizeRange::-moz-range-track { height: 10px; border-radius: 6px; background: rgba(255,255,255,.22); }
#sizeRange::-moz-range-progress { height: 10px; border-radius: 6px; background: var(--hi); }
#sizeRange::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e9eef4); border: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,.35), 0 0 0 4px rgba(255, 31, 61, .35); transition: transform .12s; }
#sizeRange:active::-webkit-slider-thumb { transform: scale(1.2); }
#sizeRange::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 3px 10px rgba(0,0,0,.35), 0 0 0 4px rgba(255, 31, 61, .35); }

[hidden] { display: none !important; }


/* gender + per-part note */
.gender { width: 100%; }
.gender button { font-size: 20px; font-weight: 800; height: 46px; }
.gender button[data-v=auto] { font-size: 14px; }
.note-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.part-note { flex: 1; height: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.25); color: #fff; padding: 0 14px; font: 15px var(--ui); }
.part-note:focus { outline: 2px solid var(--hi); }


/* reference-image card: first card, same size as the option cards */
.tile.ref-card { display: grid; place-items: center; background: rgba(255,255,255,.08); }
.tile.ref-card:not(.has) { border: 2px dashed rgba(255, 31, 61, .75); }
.ref-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ref-empty { display: grid; justify-items: center; gap: 4px; color: var(--white); }
.ref-empty svg { width: 28px; height: 28px; }
.ref-empty small { font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.ref-card .ref-x { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 0; background: #fff; color: var(--red); font-weight: 900; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.ref-card.busy > img { filter: brightness(.55); }

/* description of the selected part, below the cards */
.prompt-box { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.22); }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prompt-head .part-name { text-align: left; }
.prompt-src { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 10px; color: var(--hi); border: 1px solid rgba(255, 31, 61, .45); background: rgba(255, 31, 61, .16); }
.prompt-box p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--white); overflow-wrap: anywhere; }
.prompt-box .prompt-note { color: var(--hi); }
.prompt-box.busy #promptText { color: var(--silver); }
.study-btn { justify-self: start; min-height: 34px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass-2); font-size: 13px; font-weight: 800; cursor: pointer; }

/* generation progress card: % + bar, no spinning icons */
.gen-progress { width: min(420px, 86%); display: grid; gap: 14px; justify-items: center; text-align: center; }
.gen-progress .pct { font-family: var(--ttl); font-weight: 400; font-size: clamp(56px, 10vw, 92px); line-height: 1; color: var(--white);
  font-variant-numeric: tabular-nums; text-shadow: 3px 3px 0 var(--red-d), 0 0 26px rgba(255, 31, 61, .45); }
.gen-progress .pbar { width: 100%; height: 14px; border-radius: 8px; background: rgba(255,255,255,.18); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.3); }
.gen-progress .pbar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, #ffffff, var(--hi)); box-shadow: 0 0 14px rgba(255, 31, 61, .8); transition: width .8s ease; }
.gen-progress .plabel { font-size: 15px; font-weight: 800; color: var(--silver); letter-spacing: .04em; }
.go-btn.busy svg { animation: none !important; }
.go-btn.busy { opacity: .6; }
.pill-status .spin { display: none; }

/* ===== All action buttons: iDOL red ===== */
.cta, #wizNext, .go-btn, .media .float a.icon-btn, .pill-cta, .big-cta {
  color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  background: linear-gradient(180deg, #ff4a5c 0%, #e8112d 48%, #a8001c 100%) !important;
  border: 1px solid rgba(255,255,255,.45) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(90,0,14,.45), 0 10px 28px rgba(232,17,45,.5) !important; }
.go-btn { background: radial-gradient(circle at 35% 30%, #ff7080, #e8112d 50%, #a8001c) !important; }
.cta svg, #wizNext svg, .go-btn svg, .media .float a.icon-btn svg { color: #fff; }
#wizNext:not(:disabled), .go-btn:not(:disabled) { animation: redPulse 1.8s ease-in-out infinite !important; }
@keyframes redPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(90,0,14,.45), 0 0 0 0 rgba(255,60,80,.6), 0 10px 28px rgba(232,17,45,.5); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(90,0,14,.45), 0 0 0 9px rgba(255,60,80,0), 0 12px 36px rgba(232,17,45,.75); } }
.cta:hover:not(:disabled), .go-btn:hover:not(:disabled) { filter: brightness(1.08); }
.cta:active, .go-btn:active, #wizNext:active { filter: brightness(.92); }
#wizNext:disabled, .go-btn:disabled { filter: grayscale(.6) brightness(.8); }

/* ===== DOOMSTIME: street-fight brush lettering ===== */
.brand .doom, .metal-word { font-family: 'Road Rage', 'Black Ops One', var(--ui); font-weight: 400; letter-spacing: .04em; transform: rotate(-3deg) skewX(-6deg); padding: 0 .12em;
  --metal: linear-gradient(180deg, #ffffff 0%, #ffffff 46%, #ffd9de 56%, #ffffff 74%, #d9dce1 100%); -webkit-text-stroke: 0;
  filter: drop-shadow(2px 0 0 #1a0006) drop-shadow(-2px 0 0 #1a0006) drop-shadow(0 -2px 0 #1a0006) drop-shadow(0 2px 0 #1a0006) drop-shadow(4px 4px 0 #e8112d) drop-shadow(0 8px 12px rgba(0,0,0,.55)); }
.brand .doom { font-size: 30px; }

/* ===== app title: logo centred, DOOMSTIME below, no frame ===== */
.top.app-title { position: relative; top: 0; height: auto; justify-content: center; padding: 6px 0 0; }
.top.app-title::before { display: none; }
.app-title .brand { flex-direction: column; gap: 2px; }
.app-title .brand .logo { height: 132px; width: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.app-title .brand .doom { font-size: 46px; line-height: 1.05; white-space: nowrap; }
.app-title #lockBtn { position: absolute; right: 0; top: 10px; }
@media (max-width: 480px) { .app-title .brand .logo { height: 112px; } }
/* ===== in-app cost confirmation + saved / error notes ===== */
.go-dlg { width: min(380px, calc(100vw - 32px)); background: #3a0610; }
.go-dlg form { display: grid; gap: 14px; }
.go-dlg h2 { margin: 0; font-size: 20px; }
.go-dlg p { margin: 0; line-height: 1.5; }
.go-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.go-cancel { height: 52px; border-radius: 18px; border: 1px solid var(--stroke); background: var(--glass-2); font-weight: 800; font-size: 16px; cursor: pointer; }
.go-actions .cta { height: 52px; animation: none; }
.pill-status.err { padding: 8px 14px; line-height: 1.4; }
.saved-note { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.5; color: var(--silver); text-align: center; overflow-wrap: anywhere; }
/* ===== gallery: Pinterest-style wall, no frames ===== */
.app-title #galleryBtn { position: absolute; left: 0; top: 10px; }
.gallery { margin-top: 16px; scroll-margin: 12px 0 120px; }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gallery-head h2 { margin: 0; font-family: var(--ttl); font-weight: 400; font-size: 22px; letter-spacing: .04em; }
.gallery-head span { font-size: 12px; color: var(--silver); }
.gallery-grid { columns: 190px; column-gap: 10px; }
.gallery-grid:empty::after { content: 'Nothing here yet. Finished posters and videos will appear here.'; color: var(--silver); font-size: 14px; }
.g-item { position: relative; break-inside: avoid; margin: 0 0 10px; border-radius: 16px; overflow: hidden; line-height: 0; }
.g-item img, .g-item video { width: 100%; height: auto; display: block; border-radius: 16px; cursor: pointer; }
.g-item video { min-height: 120px; background: #12000a; aspect-ratio: 9 / 16; object-fit: cover; }
.g-actions { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.g-act { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); background: rgba(20,0,6,.55); color: #fff; cursor: pointer; text-decoration: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .15s, background .15s; }
.g-act:hover { background: rgba(232,17,45,.85); }
.g-act:active { transform: scale(.9); }
.g-act svg { width: 20px; height: 20px; }
.g-act.liked { background: #fff; color: var(--red); }
.g-act.liked svg { fill: currentColor; }
.g-play { position: absolute; left: 8px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(20,0,6,.55); pointer-events: none; }
.g-play svg { width: 14px; height: 14px; fill: #fff; stroke: none; }
.g-item.playing .g-play { display: none; }
/* ===== combine up to 3 super powers ===== */
.power-hint { margin: 0; text-align: center; font-size: 13px; font-weight: 800; color: var(--hi); }
.tile[data-order]::after { content: attr(data-order); width: 20px; height: 20px; right: 4px; top: 4px; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; box-shadow: 0 0 10px var(--pink); }
.move.combo { white-space: normal; width: max-content; max-width: 94%; justify-content: center; text-align: center; font-size: 13px; line-height: 1.25; gap: 6px; }
.move.combo svg { width: 15px; height: 15px; }

/* ===== You step: compact card ===== */
.you { max-width: 320px; margin-top: 2vh; gap: 14px; padding: 22px 16px 16px; }
.you .photo { width: 140px; height: 140px; }
.you .photo .ph svg { width: 44px; height: 44px; }
.you .photo .ring { inset: -8px; }
.you .photo .swap { width: 38px; height: 38px; right: 2px; bottom: 2px; }
.you .name-in { height: 46px; font-size: 22px; border-radius: 14px; }
.you .gender button { height: 36px; font-size: 17px; }
.you .gender button[data-v=auto] { font-size: 13px; }
/* name box: plain, no outline or shadow; hint text until a name is typed */
.you .name-in, .you .name-in:focus { outline: none; filter: none; box-shadow: none; }
.you .name-in:focus { border-color: rgba(255,255,255,.6); }
.you .name-in::placeholder { font-family: var(--ui); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.75); -webkit-text-fill-color: rgba(255,255,255,.75); -webkit-text-stroke: 0; text-shadow: none; }
/* poster + trailer are automatic: the panel only shows progress notes, or "Try again" after a problem */
.dock [hidden] { display: none !important; }
.dock:not(:has(> :not([hidden]):not(:empty))) { display: none; }
#screen-poster .gen, #screen-trailer .gen { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }

/* ===== edit a part's description inside its card ===== */
.prompt-head .part-name { flex: 1; min-width: 0; }
.prompt-edit { flex: none; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--stroke); background: var(--glass-2); cursor: pointer; }
.prompt-edit svg { width: 18px; height: 18px; }
.prompt-edit:disabled { opacity: .4; cursor: default; }
.prompt-box textarea { width: 100%; min-height: 96px; resize: vertical; border-radius: 12px; border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.35); color: #fff; padding: 10px 12px; font: 14px/1.5 var(--ui); }
.prompt-box textarea:focus { outline: none; border-color: #fff; }
.prompt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-actions:not(:has(> :not([hidden]))) { display: none; }
.study-btn.go { background: linear-gradient(180deg, #ff4a5c, #e8112d 48%, #a8001c); }

/* ===== Universe step ===== */
.world-card { max-width: 640px; margin: 0 auto; display: grid; gap: 12px; }
.world-lead { margin: 0; text-align: center; font-family: var(--ttl); font-size: 20px; letter-spacing: .04em; }
.worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.world[hidden] { display: none; }
.world-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.world-cats button { position: relative; padding: 9px 4px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(0,0,0,.28); color: #fff; font: 800 12px/1.2 inherit; font-family: inherit; cursor: pointer; }
.world-cats button.on { background: var(--hi); border-color: var(--hi); color: #2a0008; }
.world-cats button.has::after { content: ''; position: absolute; top: -2px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--hi); border: 2px solid #7a0014; }
@media (min-width: 640px) { .world-cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.world { position: relative; padding: 0; border: 1px solid rgba(255,255,255,.3); border-radius: 14px; overflow: hidden; background: #12040a; cursor: pointer; }
.world canvas { display: block; width: 100%; aspect-ratio: 400 / 260; }
.world { display: flex; flex-direction: column; }
.world span { display: grid; place-items: center; flex: 1; min-height: 38px; padding: 6px; font-size: 12px; line-height: 1.25; font-weight: 800; }
.world.sel { border-color: transparent; box-shadow: 0 0 0 3px var(--hi), 0 0 20px rgba(255, 31, 61, .5); }

/* ===== red theme: red badges carry white icons, selections are red with a white edge (so they show on the red background) ===== */
.tile.sel, .styles button.on, .world.sel, .uni.full { box-shadow: 0 0 0 3px var(--hi), 0 0 0 5px #fff, 0 0 18px rgba(255, 31, 61, .8); }
.photo.has .ring { box-shadow: 0 0 0 3px #fff, 0 0 24px rgba(255, 31, 61, .8); }
.dir:focus, .name-in:focus, .part-note:focus { outline: 3px solid var(--hi); box-shadow: 0 0 0 5px #fff; }
.tile.ref-card:not(.has) { border-color: #fff; }

/* icons: white on red; a white badge with a red icon marks what is selected or switched on */
.icon-btn, .tile .badge, .g-act, .photo .swap, .wiz-ico { background: var(--hi); color: #fff; border: 1.5px solid rgba(255, 255, 255, .9); }
.icon-btn:hover { background: var(--hi); filter: brightness(1.12); }
.icon-btn.on, .tile.sel .badge, .g-act.liked { background: #fff; color: var(--red); border-color: var(--hi); }
.ref-empty svg, .sz-ico svg, dialog .big-ico, .sets-ico svg { color: #fff; }
.sz-ico.sm svg { opacity: 1; }

/* text highlights stay white so they can be read */
.brand em, .pill-status.ok, .prompt-box .prompt-note, .power-hint, .sizer b, .sets-ico, .shot:last-child svg { color: #fff; }
.pill-status.ok { background: var(--hi); border: 1px solid #fff; }
.prompt-src { color: #fff; background: var(--hi); border: 1px solid rgba(255, 255, 255, .85); border-radius: 10px; }
.pill-status .spin { border-top-color: #fff; }

/* bars and chips */
.wiz-bar i, .gen-progress .pbar i, .stat .bar i { background: linear-gradient(90deg, #ff4a5e, var(--hi)); box-shadow: 0 0 0 1px #fff, 0 0 12px rgba(255, 31, 61, .9); }
#sizeRange::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--hi), 0 0 0 6px #fff, 0 3px 10px rgba(0,0,0,.35); }
#sizeRange::-moz-range-thumb { box-shadow: 0 0 0 4px var(--hi), 0 0 0 6px #fff; }
.world-cats button.on { background: var(--hi); border: 2px solid #fff; color: #fff; }
.world-cats button.has::after { background: var(--hi); border-color: #fff; }

/* =====================================================================
   CLEAN UI: one card layer, no outlines around icons, flat red buttons,
   no card behind the bottom buttons. Red marks what is selected.
   ===================================================================== */
:root { --surface: rgba(30, 2, 9, .68); --fill: rgba(255, 255, 255, .1); --pick: #ff2a45; }

/* one calm surface */
.card, .glass:not(.wiznav) { background: var(--surface); border: 0; box-shadow: 0 12px 32px rgba(10, 0, 4, .3); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.card::before, .card::after, .glass::before, .glass::after { display: none; }

/* no strokes around icons */
.icon-btn, .tile .badge, .g-act, .photo .swap, .wiz-ico { border: 0; box-shadow: none; }
.icon-btn { background: var(--fill); color: #fff; border-radius: 14px; }
.wiz-ico, .photo .swap { background: var(--red); color: #fff; }
.icon-btn.on { background: #fff; color: var(--red); }
.tile .badge { background: none; color: rgba(255, 255, 255, .85); }
.tile.sel .badge { background: var(--red); color: #fff; border: 0; box-shadow: none; }
.g-act { background: rgba(26, 0, 6, .62); }
.g-act.liked { background: #fff; color: var(--red); }
.ref-empty svg, .sz-ico svg, dialog .big-ico { background: none; }

/* buttons: flat, no bevel, glow, pulse or shine */
.cta, #wizNext, .go-btn, .media .float a.icon-btn, .pill-cta, .big-cta {
  background: var(--red) !important; border: 0 !important; text-shadow: none !important; box-shadow: 0 6px 18px rgba(20, 0, 5, .35) !important; animation: none !important; }
#wizNext::after, .go-btn::after, .big-cta::after, .pill-cta::after { display: none !important; }
.cta:disabled, #wizNext:disabled, .go-btn:disabled { filter: none; background: rgba(60, 12, 22, .92) !important; color: rgba(255, 255, 255, .45) !important; box-shadow: none !important; }
#wizNext:disabled svg { color: rgba(255, 255, 255, .45); }

/* bottom buttons stand on their own, over a soft fade so content never clashes with them */
.wiznav, .wiznav.glass { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; gap: 12px; }
.wiznav::before, .wiznav::after { display: none; }
.wiznav .icon-btn { width: 56px; height: 56px; border-radius: 18px; background: rgba(30, 2, 9, .86); }
.wiznav .cta { height: 56px; border-radius: 18px; font-size: 18px; }
body:not(.landing)::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 30; pointer-events: none; background: linear-gradient(180deg, rgba(26, 0, 6, 0), rgba(26, 0, 6, .88) 70%); }

/* header and progress */
.wiz-bar { height: 5px; background: rgba(255, 255, 255, .2); box-shadow: none; }
.wiz-bar i, .gen-progress .pbar i, .stat .bar i { background: var(--pick); box-shadow: none; }

/* no boxes inside boxes */
.sizer { background: none; border: 0; box-shadow: none; padding: 2px 2px 4px; }
.prompt-box { background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .14); border-radius: 0; padding: 14px 2px 0; }
.stat { background: rgba(26, 0, 6, .45); border: 0; }
.prompt-src { background: var(--fill); border: 0; }
.prompt-edit, .study-btn:not(.go), .go-cancel { background: var(--fill); border: 0; }
.study-btn.go { background: var(--red); }
.prompt-box textarea { border: 0; background: var(--fill); }
.prompt-box textarea:focus { box-shadow: 0 0 0 2px var(--pick); }

/* choices: quiet until picked, then one clear red ring */
.tile, .styles button, .world, .world-cats button, .seg, .name-in, .part-note { border: 0; box-shadow: none; }
.tile.sel, .styles button.on, .world.sel, .uni.full { border: 0; box-shadow: 0 0 0 3px var(--pick); }
.tile.ref-card:not(.has) { border: 1.5px dashed rgba(255, 255, 255, .4); background: transparent; }
.styles button, .name-in { background: var(--fill); }
.styles { display: grid; grid-template-columns: repeat(3, 58px); justify-content: center; gap: 12px; }
.seg { background: var(--fill); }
.world-cats { gap: 8px; }
.world-cats button { background: var(--fill); min-height: 38px; }
.world-cats button.on { background: var(--red); border: 0; color: #fff; }
.world-cats button.has::after { background: #fff; border: 0; width: 7px; height: 7px; top: 5px; right: 8px; }
.name-in:focus, .part-note:focus, .dir:focus { outline: none; box-shadow: 0 0 0 2px var(--pick); }

/* photo and size slider */
.photo { border: 0; background: var(--fill); }
.photo .ring { display: none; }
.photo.has .ring { display: block; inset: -5px; border: 3px solid var(--pick); box-shadow: none; }
#sizeRange::-webkit-slider-runnable-track { height: 6px; box-shadow: none; }
#sizeRange::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
#sizeRange::-moz-range-thumb { width: 24px; height: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.tile.sel:not([data-order])::after { display: none; }
.tile[data-order]::after { background: var(--red); border: 0; box-shadow: none; border-radius: 50%; }
.wiznav .icon-btn, .wiznav .icon-btn:hover { background: rgba(86, 28, 40, .96); }
.you .name-in { color: #fff !important; -webkit-text-fill-color: #fff !important; -webkit-text-stroke: 0 !important; background-image: none !important; background-color: var(--fill) !important; filter: none !important; text-shadow: none !important; }
/* poster / video: progress and notes sit plainly under the picture */
.card.dock { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-top: 4px; }
.pill-status.ok { background: var(--surface); border: 0; }
/* phones: one tap to put the finished file in Photos */
.share-btn { grid-column: 1 / -1; width: 100%; height: 52px; font-size: 16px; }
.saved-note { justify-self: stretch; padding: 10px 14px; border-radius: 14px; background: var(--surface); color: #fff; font-size: 13px; }
.shot, .shot:last-child { border: 0; box-shadow: none; }
.card.dock .shot { background: var(--surface); }

/* agreement to the public gallery */
.agree { display: flex; gap: 10px; align-items: flex-start; padding: 2px 2px 0; font-size: 12px; line-height: 1.5; color: #fff; cursor: pointer; text-align: left; }
.agree input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.agree.missing { border-radius: 12px; padding: 8px; box-shadow: 0 0 0 2px var(--pick); }
.you { max-width: 360px; }
.you .agree { align-items: center; gap: 8px; font-size: 11px; line-height: 1.35; color: rgba(255, 255, 255, .85); }
.you .agree input { width: 16px; height: 16px; margin: 0; }
/* like count under the heart, and how many turns this device has left */
.g-actions { align-items: center; }
.g-count { margin-top: -5px; min-width: 40px; text-align: center; font-size: 12px; line-height: 1.2; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 6px rgba(0, 0, 0, .7); font-variant-numeric: tabular-nums; }
.g-act:disabled { cursor: default; }
.turns-note { grid-column: 1 / -1; justify-self: center; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--surface); color: #fff; font-size: 12px; font-weight: 800; }
.pill-status.err { justify-self: center; max-width: 100%; padding: 10px 16px; border-radius: 14px; background: var(--surface); color: #fff; font-size: 14px; text-align: center; }
