/* LIOS Studio · estudio. Todo vive bajo .studio para no alterar el resto del sitio. */
.studio { --st-panel: 340px; --st-ink: #f1f0f8; --st-line: rgba(241, 240, 248, .12); --st-acc: #b98bff; }
.studio .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-stage { position: relative; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 60% at 60% 46%, #1b1824 0%, #0d0c13 55%, #07070b 100%); transition: background 1.2s; }
.studio[data-light="gallery"] .st-stage { background: radial-gradient(46% 52% at 60% 44%, #17151f 0%, #07070b 62%, #040406 100%); }
.studio[data-light="explore"] .st-stage { background: radial-gradient(60% 60% at 60% 50%, #100f18 0%, #050508 70%); }
#st-gl { position: absolute; --ct: 0px; --cb: 0px; --cl: 0px; --cr: 0px; top: var(--ct); left: var(--cl); width: calc(100% - var(--cl) - var(--cr)); height: calc(100% - var(--ct) - var(--cb)); display: block; touch-action: none; opacity: 0; transition: opacity 1.4s var(--ease); }
.studio.gl-ready #st-gl { opacity: 1; }
.st-loading { position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* capas por estado */
.st-intro, .st-ui, .st-sign, .st-done, .st-work, .st-curate, .st-nogl, .st-exit-contemplate { position: absolute; z-index: 3; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s linear .7s, transform .9s var(--ease); }
.studio[data-state="intro"] .st-intro, .studio[data-state="create"] .st-ui, .studio[data-state="sign"] .st-sign, .studio[data-state="done"] .st-done,
.studio[data-state="work"] .st-work, .studio[data-state="curate"] .st-curate, .studio[data-state="nogl"] .st-nogl, .studio[data-state="contemplate"] .st-exit-contemplate { opacity: 1; visibility: visible; transition-delay: 0s; }

/* ---------- Entrada ---------- */
.st-intro { left: 0; bottom: 0; width: 100%; padding: 0 var(--gut) calc(28px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, rgba(7, 7, 11, .88) 34%); }
.st-h { font-size: clamp(2.1rem, 8.6vw, 4.4rem); line-height: 1.02; letter-spacing: -.035em; max-width: 13ch; margin: 10px 0 16px; }
.st-lead { max-width: 46ch; margin: 0; color: rgba(241, 240, 248, .78); font-size: clamp(1rem, .6vw + .86rem, 1.18rem); line-height: 1.6; }
.st-how { margin: 26px 0 12px; font: 600 12px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.st-start { display: grid; gap: 8px; }
.st-choice { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--st-line); background: rgba(241, 240, 248, .04); color: var(--st-ink); cursor: pointer; transition: border-color .3s, background .3s, transform .3s; }
.st-choice b { font: 600 16px/1.2 var(--display); }
.st-choice span { font-size: 13.5px; line-height: 1.45; color: var(--mute); }
.st-choice:hover, .st-choice:focus-visible { border-color: rgba(185, 139, 255, .6); background: rgba(185, 139, 255, .08); }
.st-choice.is-main { border-color: rgba(185, 139, 255, .7); background: rgba(185, 139, 255, .14); }
.st-sec { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.st-link { padding: 6px 0; border: 0; background: none; color: var(--mute); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(241, 240, 248, .3); cursor: pointer; }
.st-link:hover { color: var(--st-ink); }
@media (min-width: 900px) {
  .st-intro { top: 0; bottom: 0; width: min(560px, 44vw); display: flex; flex-direction: column; justify-content: center; padding: calc(var(--head) + 40px) 0 32px max(var(--gut), calc((100vw - 1320px) / 2 + var(--gut))); background: linear-gradient(90deg, rgba(7, 7, 11, .9), rgba(7, 7, 11, .5) 70%, transparent); width: min(680px, 52vw); }
  .st-intro > * { max-width: 540px; }
  .studio[data-state="intro"] #st-gl { --cl: 38%; }
  .st-intro .st-how { margin-top: 20px; }
  .st-choice { padding: 12px 16px; }
}

/* ---------- Creación ---------- */
.st-ui { inset: 0; pointer-events: none; }
.st-ui > * { pointer-events: auto; }
.st-top { position: absolute; top: calc(var(--head) + 10px); right: var(--gut); left: var(--gut); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.st-light { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--st-line); background: rgba(7, 7, 11, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.st-light button { padding: 8px 12px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 12px/1 var(--display); letter-spacing: .04em; cursor: pointer; }
.st-light button[aria-pressed="true"] { background: rgba(241, 240, 248, .92); color: #0b0b10; }
.st-tools { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--st-line); background: rgba(7, 7, 11, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.st-ico { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--st-ink); cursor: pointer; }
.st-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-ico:disabled { opacity: .3; cursor: default; }
.st-ico[aria-pressed="true"] { background: rgba(185, 139, 255, .25); color: #fff; }
.st-ico:hover:not(:disabled) { background: rgba(241, 240, 248, .1); }
.st-levelw select { height: 32px; margin: 0 4px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--st-line); background: transparent; color: var(--st-ink); font: 600 12px var(--display); }
.st-levelw option { background: #0b0b10; }

.st-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 44svh; overflow-y: auto; overscroll-behavior: contain; padding: 14px var(--gut) calc(84px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(7, 7, 11, 0), rgba(7, 7, 11, .94) 22px); scrollbar-width: thin; }
.st-langs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.st-langs::-webkit-scrollbar { display: none; }
.st-lang { flex: 0 0 auto; display: grid; gap: 3px; justify-items: start; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--st-line); background: rgba(241, 240, 248, .03); color: var(--mute); cursor: pointer; }
.st-lang span { font: 600 10px/1 var(--display); letter-spacing: .16em; color: var(--faint); }
.st-lang b { font: 600 13.5px/1.1 var(--display); }
.st-lang[aria-checked="true"] { border-color: rgba(185, 139, 255, .75); background: rgba(185, 139, 255, .16); color: var(--st-ink); }
.st-lang[aria-checked="true"] span { color: var(--st-acc); }
.st-ldesc { margin: 12px 0 4px; font-size: 14px; line-height: 1.5; color: rgba(241, 240, 248, .8); }
.st-params { display: grid; gap: 10px; margin-top: 10px; }
.st-p { display: grid; gap: 6px; font-size: 12.5px; color: var(--mute); }
.st-p > span { display: flex; justify-content: space-between; gap: 10px; }
.st-p em { font-style: normal; color: var(--st-ink); font-variant-numeric: tabular-nums; }
.st-p input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; }
.st-p input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(241, 240, 248, .2); border-radius: 2px; }
.st-p input[type="range"]::-moz-range-track { height: 2px; background: rgba(241, 240, 248, .2); }
.st-p input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--st-ink); box-shadow: 0 0 0 4px rgba(185, 139, 255, .25); }
.st-p input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--st-ink); }
.st-p input[type="text"], .st-p input[type="number"], .sg-f input, .gl-search, #sg-typed { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--st-line); background: rgba(241, 240, 248, .05); color: var(--st-ink); font: 500 15px var(--body, inherit); }
.st-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.st-extra .st-seed { flex: 1 1 100%; }
.st-mini { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--st-line); background: rgba(241, 240, 248, .05); color: var(--st-ink); font: 600 12.5px var(--display); cursor: pointer; }
.st-mini:hover { border-color: rgba(185, 139, 255, .6); }
.st-color { margin-top: 14px; display: grid; gap: 10px; }
.st-pals { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.st-pal { flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, 12px); gap: 0; align-items: center; padding: 7px 10px 7px 8px; border-radius: 999px; border: 1px solid var(--st-line); background: none; color: var(--mute); cursor: pointer; column-gap: 0; }
.st-pal i { width: 12px; height: 12px; border-radius: 50%; margin-right: -3px; box-shadow: 0 0 0 1.5px #0b0b10; }
.st-pal span { grid-column: 1 / -1; margin-top: 4px; font: 600 11px var(--display); letter-spacing: .04em; text-align: left; }
.st-pal[aria-pressed="true"] { border-color: rgba(241, 240, 248, .55); color: var(--st-ink); }
.st-swatch { display: flex; gap: 8px; }
.st-swatch button { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(241, 240, 248, .25); }
.st-swatch button[aria-pressed="true"] { box-shadow: 0 0 0 2px #0b0b10, 0 0 0 4px var(--st-ink); }
.st-bottom { position: absolute; left: var(--gut); right: var(--gut); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: flex-end; gap: 14px; pointer-events: none; }
.st-bottom > * { pointer-events: auto; }
.st-coach { margin: 0 auto 0 0; max-width: 52ch; padding: 10px 14px; border-radius: 12px; background: rgba(7, 7, 11, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; line-height: 1.45; color: rgba(241, 240, 248, .86); }
.st-finish:disabled { opacity: .35; pointer-events: none; }
.studio[data-level="1"] .st-reset, .studio[data-level="1"] .st-pals span { display: none; }
@media (max-width: 899px) {
  .studio[data-state="create"] #st-gl { --cb: 40svh; --ct: calc(var(--head) + 44px); }
  .studio[data-state="intro"] #st-gl { --cb: 46svh; --ct: var(--head); }
  .st-coach { position: absolute; left: 0; right: 0; bottom: calc(40svh + 4px); margin: 0 auto; width: max-content; max-width: calc(100% - 8px); font-size: 12.5px; }
  .st-bottom { justify-content: stretch; } .st-finish { flex: 1; }
  .st-panel { max-height: 40svh; }
}
@media (min-width: 900px) {
  .studio[data-state="create"] #st-gl { --cl: var(--st-panel); --ct: calc(var(--head) + 40px); }
  .st-panel { top: calc(var(--head) + 64px); left: max(var(--gut), calc((100vw - 1320px) / 2 + var(--gut))); right: auto; bottom: 24px; width: calc(var(--st-panel) - 40px); max-height: none; padding: 16px; border-radius: 18px; border: 1px solid var(--st-line); background: rgba(9, 9, 14, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .st-langs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .st-pals { flex-wrap: wrap; overflow: visible; }
  .st-top { left: calc(var(--st-panel) + 12px); justify-content: center; gap: 12px; }
  .st-bottom { left: calc(var(--st-panel) + 12px); right: max(var(--gut), calc((100vw - 1320px) / 2 + var(--gut))); bottom: 26px; }
}

/* ---------- Contemplación ---------- */
.studio[data-state="contemplate"] .head { opacity: .25; transition: opacity .8s; }
.st-exit-contemplate { left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; }

/* ---------- Firma, registro y obra ---------- */
.st-sign, .st-done, .st-work { inset: 0; overflow-y: auto; display: flex; align-items: flex-end; padding: 40svh var(--gut) calc(18px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.sg-card, .dn-card, .wk-card { pointer-events: auto; width: 100%; padding: 22px; border-radius: 20px; border: 1px solid var(--st-line); background: rgba(9, 9, 14, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transform: translateY(20px); transition: transform 1s var(--ease); }
.studio[data-state="sign"] .sg-card, .studio[data-state="done"] .dn-card, .studio[data-state="work"] .wk-card { transform: none; }
.studio[data-state="sign"] #st-gl, .studio[data-state="done"] #st-gl, .studio[data-state="work"] #st-gl { --cb: 52svh; --ct: var(--head); }
.sg-quote { margin: 0 0 18px; font: 600 clamp(1.3rem, 3vw, 2rem)/1.2 var(--display); letter-spacing: -.02em; }
.sg-f { display: grid; gap: 6px; margin-bottom: 12px; font-size: 12.5px; color: var(--mute); }
.sg-tabs { display: inline-flex; gap: 4px; padding: 3px; margin: 4px 0 10px; border-radius: 999px; border: 1px solid var(--st-line); }
.sg-tabs button { padding: 7px 12px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 12px var(--display); cursor: pointer; }
.sg-tabs button[aria-selected="true"] { background: rgba(241, 240, 248, .9); color: #0b0b10; }
.sg-draw { position: relative; }
#sg-pad { display: block; width: 100%; height: 150px; border-radius: 12px; background: repeating-linear-gradient(0deg, transparent 0 74%, rgba(241, 240, 248, .14) 74% calc(74% + 1px), transparent calc(74% + 1px)), rgba(241, 240, 248, .03); border: 1px dashed rgba(241, 240, 248, .22); touch-action: none; cursor: crosshair; }
.sg-hint { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; margin: 0; text-align: center; font-size: 13px; color: var(--faint); pointer-events: none; }
.sg-clear { font-size: 12.5px; }
#sg-typed { font: italic 400 28px 'Cormorant Garamond', Georgia, 'Times New Roman', serif; }
.sg-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: rgba(241, 240, 248, .82); }
.sg-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: #b98bff; flex: 0 0 auto; }
.sg-check a { color: var(--st-ink); }
.sg-err { min-height: 1.2em; margin: 10px 0 0; font-size: 13px; color: #ffb4a8; }
.sg-act, .dn-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dn-act2 { gap: 4px 20px; }
.dn-title, .wk-title { font-size: clamp(1.8rem, 5vw, 3.2rem); line-height: 1.05; margin: 8px 0 4px; letter-spacing: -.03em; }
.dn-author, .wk-author { margin: 0; color: var(--mute); }
.dn-sig, .wk-sig { display: block; width: min(320px, 70%); height: auto; margin: 14px 0 4px; opacity: .95; }
.dn-data { margin: 12px 0 0; display: grid; gap: 0; }
.dn-data div { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--st-line); font-size: 13.5px; }
.dn-data dt { color: var(--faint); }
.dn-data dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dn-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--faint); }
.wk-check { min-height: 1.2em; margin: 10px 0 0; font-size: 13px; color: #9ff0d6; }
.wk-pubstate { margin: 6px 0 0; font-size: 12.5px; color: var(--faint); }
@media (min-width: 900px) {
  .st-sign, .st-done, .st-work { align-items: center; justify-content: flex-end; padding: calc(var(--head) + 20px) max(var(--gut), calc((100vw - 1320px) / 2 + var(--gut))) 30px; }
  .sg-card, .dn-card, .wk-card { width: min(460px, 38vw); max-height: calc(100svh - var(--head) - 50px); overflow-y: auto; transform: translateX(30px); }
  .studio[data-state="sign"] #st-gl, .studio[data-state="done"] #st-gl, .studio[data-state="work"] #st-gl { --cb: 0px; --ct: 0px; --cr: min(520px, 42vw); }
}

/* ---------- Curaduría ---------- */
.st-curate { inset: 0; overflow-y: auto; padding: calc(var(--head) + 24px) var(--gut) 40px; background: #07070b; }
.cu-card { max-width: 980px; margin: 0 auto; }
.cu-login { display: grid; gap: 10px; max-width: 360px; margin-top: 20px; }
.cu-list { display: grid; gap: 14px; margin-top: 24px; }
.cu-item { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--st-line); }
.cu-item.is-pending { border-color: rgba(242, 169, 59, .5); }
.cu-item img { width: 160px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #111; }
.cu-item b { display: block; font: 600 17px var(--display); }
.cu-m, .cu-r { display: block; margin-top: 4px; font-size: 12.5px; color: var(--faint); }
.cu-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- Sin WebGL ---------- */
.st-nogl { inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: var(--head) var(--gut) 40px; max-width: 760px; }

.st-toast { position: absolute; z-index: 6; left: 50%; top: calc(var(--head) + 64px); translate: -50% -10px; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: rgba(241, 240, 248, .94); color: #0b0b10; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .4s, translate .4s; }
.st-toast.on { opacity: 1; translate: -50% 0; }

/* ---------- Mis obras, colección y textos ---------- */
.st-mine ul, .gl-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.st-mine a, .gl-item { display: block; text-decoration: none; color: var(--st-ink); border-radius: 14px; overflow: hidden; border: 1px solid var(--st-line); background: #0b0b10; transition: border-color .3s, transform .5s var(--ease); }
.st-mine a:hover, .gl-item:hover { border-color: rgba(185, 139, 255, .5); transform: translateY(-3px); }
.st-mine img, .gl-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #111; }
.st-mine b, .gl-meta b { display: block; padding: 10px 12px 0; font: 600 15px var(--display); }
.st-mine span, .gl-meta em { display: block; padding: 2px 12px 12px; font-style: normal; font-size: 12px; color: var(--faint); }
.gl-item.is-featured { grid-column: span 2; }
.gl-item.is-featured img { aspect-ratio: 16 / 9; }
.gl-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 24px; }
.gl-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-filter button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--st-line); background: none; color: var(--mute); font: 600 12px var(--display); cursor: pointer; }
.gl-filter button[aria-pressed="true"] { background: rgba(241, 240, 248, .92); color: #0b0b10; }
.gl-s { flex: 0 1 280px; }
.gl-empty { margin: 30px 0 0; color: var(--faint); max-width: 52ch; }
.gl-more { margin-top: 20px; }
.st-ed-grid { display: grid; gap: 22px; margin-top: 30px; }
.st-ed-grid h3 { margin: 0 0 8px; font: 600 17px var(--display); }
.st-ed-grid p, .st-dist p, .st-tech, .st-terms li { margin: 0; color: rgba(241, 240, 248, .78); line-height: 1.6; }
.st-dist { display: grid; gap: 16px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--st-line); }
.st-tech-h { margin: 34px 0 8px; font: 600 17px var(--display); }
.st-tech { max-width: 72ch; }
.st-terms ol { margin: 24px 0 0; padding-left: 1.2em; display: grid; gap: 12px; max-width: 76ch; }
@media (min-width: 900px) { .st-ed-grid { grid-template-columns: repeat(3, 1fr); } .st-dist { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (prefers-reduced-motion: reduce) { #st-gl, .st-intro, .st-ui, .sg-card, .dn-card, .wk-card { transition: none; } }
@media (min-width: 900px) {
  .st-intro { justify-content: safe center; overflow-y: auto; scrollbar-width: none; }
  .st-intro::-webkit-scrollbar { display: none; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .st-h { font-size: clamp(2rem, 5.2vh + 1rem, 3.4rem); margin: 6px 0 10px; }
  .st-lead { font-size: 15px; } .st-how { margin: 14px 0 8px; }
  .st-choice { padding: 9px 14px; } .st-choice span { font-size: 12.5px; }
}

.cu-vitals table { margin-top: 18px; border-collapse: collapse; font-size: 13.5px; }
.cu-vitals th, .cu-vitals td { padding: 8px 14px 8px 0; text-align: left; border-bottom: 1px solid var(--st-line); }
.cu-vitals td.ok { color: #9ff0d6; } .cu-vitals td.bad { color: #ffb4a8; }
.cu-vitals small { color: var(--faint); }
.cu-vitals .h-sm { margin: 24px 0 0; font: 600 15px var(--display); }
