/* Trazo — estilo de la casa Entropy */
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ubuntu-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ubuntu-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ubuntu-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ubuntu-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ubuntu-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ubuntu-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #101111;
  --bg-alt: #171818;
  --acc: #a8d300;
  --cyan: #00ffff;
  --text: #ffffff;
  --dim: #b0b0b0;
  --panel: rgba(42, 43, 43, 0.72);
  --panel-solid: #1f2020;
  --line: rgba(255, 255, 255, 0.09);
  --radius: 10px;
  --font: 'Ubuntu', system-ui, sans-serif;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  --warn: #ffb020;
  --bad: #ff5c6c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
::selection { background: var(--acc); color: #101111; }
* { scrollbar-width: thin; scrollbar-color: #3a3b3b transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #3a3b3b; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel-solid); color: var(--text);
  transition: background .15s, border-color .15s, transform .15s, opacity .15s;
}
.btn:hover { border-color: var(--dim); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--acc); color: #101111; border-color: var(--acc); font-weight: 700; }
.btn.primary:hover { background: #bde61a; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.small svg.ic { width: 18px; height: 18px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary:disabled { opacity: 1; background: transparent; border-color: var(--line); color: var(--dim); font-weight: 500; }
.ib {
  width: 44px; height: 44px; border-radius: var(--radius); border: 0; background: transparent; color: var(--text);
  display: grid; place-items: center; transition: background .15s, color .15s;
}
.ib:hover { background: rgba(255, 255, 255, .08); }
.ib[aria-pressed="true"] { background: var(--acc); color: #101111; }
.ib:disabled { opacity: .35; cursor: default; background: transparent; }
input:not([type]), input[type="text"] {
  background: #0c0d0d; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%;
  caret-color: var(--acc);
}
input:not([type]):focus, input[type="text"]:focus { border-color: var(--acc); outline: none; }
input::placeholder { color: #8f8f8f; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }

input[type="range"] { -webkit-appearance: none; appearance: none; height: 44px; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--acc); border: 2px solid #101111; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--acc); border: 2px solid #101111; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); transition: transform .12s; }
.sw:hover { transform: scale(1.08); }
.sw[aria-checked="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px #fff; }
.swatches.big .sw { width: 36px; height: 36px; }

/* ---------- inicio ---------- */
.home { max-width: 1100px; margin: 0 auto; padding: calc(3.2rem + 12px) 20px 40px; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }

/* barra de Entropy: misma pinta que el shell de las apps del sitio (entropy-landing/src/app-shell/shell.css),
   con valores literales; aquí solo lleva marca, "Todas las apps" e idioma */
.entropy-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 2.2rem 0.85rem;
  font-family: 'Ubuntu', system-ui, sans-serif;
  background: linear-gradient(to bottom, rgba(36, 37, 37, 0.92), rgba(36, 37, 37, 0.55) 70%, rgba(36, 37, 37, 0));
  pointer-events: none;
}
.entropy-nav > * { pointer-events: auto; }
.entropy-nav .nav__brand { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.42em; color: #a8d300; text-decoration: none; }
.entropy-nav .nav__brand:hover { color: #00ffff; }
.entropy-nav .nav__right { display: flex; gap: 0.6rem; align-items: center; }
.entropy-nav .lang {
  background: none; border: 1px solid rgba(176, 176, 176, 0.45); border-radius: 0; color: #b0b0b0;
  font-family: inherit; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.2em; line-height: normal;
  padding: 0.45em 0.9em; margin: 0; cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color 0.3s, color 0.3s; min-height: 0;
}
.entropy-nav .lang:hover, .entropy-nav .lang:focus-visible { border-color: #a8d300; color: #a8d300; }
@media (max-width: 720px) {
  .entropy-nav { position: absolute; align-items: flex-start; padding: calc(0.6rem + env(safe-area-inset-top, 0px)) 0.9rem 0.6rem; }
  .entropy-nav .nav__brand { font-size: 0.8rem; letter-spacing: 0.28em; padding-top: 0.45em; }
  .entropy-nav .nav__right { flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
  .entropy-nav .lang { font-size: 0.63rem; letter-spacing: 0.12em; padding: 0.42em 0.55em; }
}
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 0 10px; }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand-mark { font-size: 30px; font-weight: 700; color: var(--acc); letter-spacing: -0.02em; line-height: 1; }
.brand-sub { color: var(--dim); font-size: 14px; }
.home-head-r { display: flex; align-items: center; gap: 14px; }
.xp { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.xp-lvl { color: var(--text); font-weight: 700; }
.xp-bar { width: 90px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.xp-bar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s ease-out; }

.room { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 10px 0 14px; }
.room-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.room-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.net i { width: 8px; height: 8px; border-radius: 50%; background: #5a5b5b; }
.net[data-state="on"] i { background: var(--acc); }
.net[data-state="connecting"] i { background: var(--warn); }
.net[data-state="error"] i { background: var(--bad); }
.me { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 16px; align-items: end; }
.room-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.join { display: flex; gap: 8px; }
#codeIn { width: 10.5ch; text-transform: uppercase; letter-spacing: .28em; text-align: center; font-weight: 700; }
.room-help { margin: 12px 0 0; color: var(--dim); font-size: 13px; max-width: 62ch; }
.key-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 14px; padding: 12px; border: 1px solid var(--cyan); border-radius: var(--radius); }
.key-row .field { flex: 1; min-width: 180px; }
.room-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }
.room-code strong { font-size: 34px; color: var(--acc); letter-spacing: .22em; line-height: 1; margin-right: 6px; }
.room-body { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.qr { width: 164px; height: 164px; background: #fff; padding: 8px; border-radius: 8px; flex: none; }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }
.room-side { flex: 1; min-width: 200px; }
.peers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.peers li { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 24px; }
.peers .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(0,0,0,.3); }
.peers .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peers .you { color: var(--dim); font-size: 12px; }
.peers .sc { margin-left: auto; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.peers .sc.ok { color: var(--acc); font-weight: 700; }
.peers .empty { color: var(--dim); font-size: 13px; }

.free {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; color: var(--text); transition: border-color .15s, transform .15s;
}
.free:hover { border-color: var(--cyan); transform: translateY(-1px); }
.free-ic { width: 40px; height: 40px; fill: none; stroke: var(--cyan); stroke-width: 1.75; stroke-linecap: round; flex: none; }
.free-t { display: flex; flex-direction: column; gap: 2px; }
.free-t strong { font-size: 16px; }
.free-t span { color: var(--dim); font-size: 13px; }
.frees { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }

.course { margin-top: 30px; }
.course-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.course-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.course-head p { margin: 0; color: var(--dim); font-size: 13px; }
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lesson {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: left;
  display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s;
}
.lesson:hover { border-color: var(--acc); transform: translateY(-2px); }
.lesson svg { width: 100%; aspect-ratio: 1; background: #f5f4ef; border-radius: 6px; fill: none; stroke: #1a1b1b; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.lesson .lt { font-weight: 500; font-size: 14px; line-height: 1.2; }
.lesson .lm { display: flex; align-items: center; justify-content: space-between; color: var(--dim); font-size: 12px; }
.stars-s { display: inline-flex; gap: 2px; }
.stars-s svg { width: 13px; height: 13px; fill: none; stroke: #5a5b5b; stroke-width: 1.5; }
.stars-s svg.on { fill: var(--acc); stroke: var(--acc); }
.diff { display: inline-flex; gap: 2px; }
.diff i { width: 6px; height: 6px; border-radius: 50%; background: #4a4b4b; }
.diff i.on { background: var(--cyan); }
.home-foot { margin-top: auto; padding-top: 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #8f8f8f; font-size: 12px; }

/* ---------- estudio ---------- */
.studio {
  position: fixed; inset: 0; display: grid; grid-template-columns: 64px 1fr 280px; grid-template-rows: 48px 1fr;
  background: var(--bg); overflow: hidden; padding-top: env(safe-area-inset-top, 0px);
}
.bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 8px; background: var(--bg-alt); border-bottom: 1px solid var(--line); min-width: 0; overflow: hidden; }
.bar-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.bar-title strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title span { font-size: 11px; color: var(--dim); white-space: nowrap; }
.punches { display: flex; gap: 7px; list-style: none; margin: 0 auto; padding: 0; }
.punches li { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #5a5b5b; position: relative; transition: background .2s, border-color .2s, box-shadow .2s; }
.punches li.done { background: var(--acc); border-color: var(--acc); }
.punches li.done::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #101111; }
.punches li.cur { border-color: var(--cyan); box-shadow: inset 0 0 0 2px #101111; }
.bar-peers { display: none; align-items: center; margin-left: auto; }
.ava { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #101111; margin-left: -6px; border: 2px solid var(--bg-alt); }
.ava:first-child { margin-left: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text); font-size: 13px; flex: none; transition: border-color .15s;
}
.chip:hover { border-color: var(--dim); }
.chip.on { border-color: var(--acc); }
.chip .ic { width: 18px; height: 18px; }

.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; background: var(--bg-alt); border-right: 1px solid var(--line); overflow: hidden; }
.swatch { width: 26px; height: 26px; border-radius: 50%; display: block; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.4); }
.size-wrap { width: 44px; height: 150px; position: relative; margin: 4px 0; }
.size { position: absolute; left: 50%; top: 50%; width: 150px; height: 44px; transform: translate(-50%, -50%) rotate(-90deg); }

.stage { position: relative; background: var(--bg); overflow: hidden; min-width: 0; min-height: 0; }
/* el estudio es una superficie de dibujo: nada de selección de texto, menú de pulsación larga ni resaltado al tocar (iPad + lápiz) */
.studio { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.studio input, .studio textarea { -webkit-user-select: text; user-select: text; }
.stage canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.stage canvas { display: block; cursor: crosshair; }
.stage.pan canvas { cursor: grab; }
.stage.drop::after { content: ""; position: absolute; inset: 8px; border: 2px dashed var(--cyan); border-radius: var(--radius); pointer-events: none; }
.cursors { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cursors .cur { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px #101111; transition: left .06s linear, top .06s linear; }
.cursors .cur span { position: absolute; left: 12px; top: -5px; font-size: 11px; background: var(--panel-solid); color: var(--text); padding: 2px 7px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.cursors .cur.d { width: 14px; height: 14px; }
.score-pop {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; font-weight: 700; font-size: 14px; padding: 3px 9px; border-radius: 12px;
  background: var(--panel-solid); color: var(--acc); box-shadow: 0 3px 8px rgba(0,0,0,.4); animation: pop .75s cubic-bezier(.2,.8,.2,1) forwards;
}
.score-pop.mid { color: var(--warn); }
.score-pop.low { color: var(--bad); }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -90%) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -120%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -170%) scale(1); } }
.toast {
  position: absolute; left: 50%; top: 12px; transform: translate(-50%, -8px); opacity: 0; background: var(--panel); backdrop-filter: blur(8px);
  border: 1px solid var(--line); padding: 8px 14px; border-radius: 20px; font-size: 13px; transition: .2s; pointer-events: none; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.cast { background: var(--bg-alt); border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 12px; overflow: auto; min-height: 0; min-width: 0; }
.coach { background: var(--panel); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hint { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 500; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: inherit; transition: width .18s ease-out; }
.meter-nums { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.meter-nums b { color: var(--text); }
.coach-actions { display: flex; gap: 8px; align-items: center; }
.coach-actions .primary { flex: 1; }
.coach-actions .ghost { border-color: transparent; color: var(--dim); }
.coach-actions .ghost:hover { border-color: var(--line); color: var(--text); }
.people h3 { margin: 4px 0 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.chat { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); min-height: 0; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; font-size: 13px; overflow-wrap: anywhere; }
.chat-list li { line-height: 1.35; }
.chat-list li b { font-weight: 500; }
.chat-list li.sys { color: var(--dim); font-size: 12px; }
.chat-list .empty { color: var(--dim); font-size: 12px; }
.chat-form { display: flex; gap: 4px; align-items: center; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; }
.react { min-height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel-solid); color: var(--text); font-size: 12px; }
.react:hover { border-color: var(--acc); }
.react-t { color: var(--acc); font-weight: 500; }
.ib.mini { width: 28px; height: 28px; margin-left: 4px; flex: none; }
.ib.mini .ic { width: 16px; height: 16px; }
.peers .sc + .ib.mini { margin-left: 4px; }
.peers .nm.muted { color: var(--dim); text-decoration: line-through; }
.hosttag { font-size: 11px; color: #101111; background: var(--cyan); border-radius: 8px; padding: 1px 6px; font-weight: 500; }
.pp-name { display: flex; align-items: center; gap: 8px; padding: 4px 10px 6px; font-weight: 500; }
.pp-name .dot { width: 10px; height: 10px; border-radius: 50%; }
.danger-t { color: var(--bad); }
.room-rules { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.room-rules legend { color: var(--dim); font-size: 12px; padding: 0 4px; }
.room-rules label { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.room-rules input { width: 18px; height: 18px; accent-color: var(--acc); }
.room-rules input:disabled + span { color: var(--dim); }
.home-foot a { color: var(--dim); margin-left: 6px; text-underline-offset: 3px; }
.home-foot a:hover { color: var(--cyan); }
.punches li[role="button"] { cursor: pointer; }
.punches li[role="button"]:hover { box-shadow: inset 0 0 0 2px #101111, 0 0 0 2px var(--line); }
.free.match { border-color: rgba(0, 255, 255, .35); }
/* conectados ahora */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
/* botón Plus */
.plusbtn { min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid rgba(0, 255, 255, .45); background: transparent; color: var(--cyan); font-weight: 700; font-size: 12px; letter-spacing: .04em; }
.plusbtn:hover { background: rgba(0, 255, 255, .08); }
.plusbtn.on { background: var(--cyan); color: #101111; border-color: var(--cyan); }
/* salas públicas */
.lobby { margin-top: 30px; }
.lobby-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lobby-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.lobby-code { font-weight: 700; color: var(--acc); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.lobby-what { flex: 1; min-width: 160px; color: var(--dim); font-size: 13px; }
.lobby-n { font-size: 13px; font-variant-numeric: tabular-nums; }
.lobby-list .lobby-empty { color: var(--dim); font-size: 13px; background: transparent; border-style: dashed; }
.plus-tag { font-size: 11px; color: #101111; background: var(--cyan); border-radius: 8px; padding: 1px 6px; font-weight: 500; }
/* cursos de Plus */
.lesson.locked svg:first-child { opacity: .45; }
.lesson .lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--cyan); }
.lesson .lock .ic { width: 12px; height: 12px; }
/* panel de Plus */
.plus-panel { position: fixed; inset: 0; z-index: 50; background: rgba(16, 17, 17, .78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.plus-card { position: relative; background: var(--panel-solid); border: 1px solid rgba(0, 255, 255, .3); border-radius: 14px; padding: 24px; width: min(460px, 100%); max-height: 92dvh; overflow: auto; box-shadow: var(--shadow); }
.plus-card h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--cyan); }
.plus-sub { margin: 4px 0 14px; color: var(--dim); }
.plus-x { position: absolute; top: 10px; right: 10px; }
.plus-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plus-list li { display: flex; gap: 8px; align-items: flex-start; }
.plus-list .ic { width: 18px; height: 18px; color: var(--acc); margin-top: 1px; }
.plus-have { display: flex; align-items: center; gap: 6px; color: var(--acc); font-weight: 500; margin: 0 0 12px; }
.plus-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.plus-price { color: var(--dim); font-size: 13px; }
.plus-soon { color: var(--dim); font-size: 13px; }
.plus-form label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.plus-row { display: flex; gap: 8px; }
.plus-row input { flex: 1; }
.plus-msg { min-height: 1.2em; margin: 8px 0 0; font-size: 13px; color: var(--warn); }
.plus-free { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.match-online { display: block; margin-top: 4px; color: var(--cyan); font-size: 12px; }
.match-online:empty { display: none; }
.wait { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px;
  background: var(--panel-solid); border: 1px solid rgba(0, 255, 255, .35); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); z-index: 5; }
.wait-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); flex: none; animation: waitp 1.6s ease-in-out infinite; }
@keyframes waitp { 50% { opacity: .3; } }
.wait-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; color: var(--dim); }
.wait-t strong { color: var(--text); font-weight: 500; font-size: 14px; }
.wait .btn { flex: none; }
@media (max-width: 520px) { .wait { flex-wrap: wrap; } .wait .btn { width: 100%; } }
.chat-form input { min-height: 40px; padding: 8px 10px; }
.chat-form .ib { width: 40px; height: 40px; flex: none; color: var(--acc); }
.badge { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); border: 2px solid var(--bg-alt); }
.chip { position: relative; }
.room-live { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; background: rgba(0,0,0,.25); border-radius: 8px; font-size: 13px; color: var(--dim); }
.room-live b { color: var(--text); font-weight: 500; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #101111; font-weight: 700; }
.share-name { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); width: 100%; }
.share-name input { min-height: 38px; padding: 6px 10px; }
.pop.share .peers { width: 100%; font-size: 13px; }
.share-chat { width: 100%; }
.share-chat .chat { margin-top: 0; padding-top: 0; border-top: 0; }
.share-actions { display: flex; gap: 6px; width: 100%; }
.share-actions .btn { flex: 1; }
.pop.share { width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; }
.people .btn { margin-top: 10px; }
.room-block { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.room-block .code { font-size: 28px; color: var(--acc); letter-spacing: .22em; line-height: 1; }
.room-block .qr { width: 136px; height: 136px; }
.room-block .btn { align-self: flex-start; margin-top: 2px; }
.peers .sc .ic { width: 12px; height: 12px; stroke-width: 2.5; vertical-align: -1px; margin-right: 2px; }
.studio.is-free .coach, .studio.is-free .punches { display: none; }

.pop {
  position: fixed; z-index: 30; background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; min-width: 210px; display: flex; flex-direction: column; gap: 6px;
}
.pop .row { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: flex-start; min-height: 40px; padding: 0 10px; }
.pop label.row { font-size: 13px; color: var(--dim); }
.pop label.row input { flex: 1; }
.photo-row { display: flex; flex-direction: column; gap: 6px; }
.tog { margin-left: auto; width: 34px; height: 18px; border-radius: 9px; background: rgba(255,255,255,.18); position: relative; flex: none; transition: background .15s; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
[aria-pressed="true"] > .tog { background: var(--acc); }
[aria-pressed="true"] > .tog::after { transform: translateX(16px); }
.custom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--dim); padding: 4px 2px 0; }
.custom input { width: 44px; height: 36px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.pop.share { align-items: center; gap: 10px; }
.share-code { display: flex; align-items: baseline; gap: 10px; color: var(--dim); font-size: 13px; }
.share-code strong { font-size: 30px; color: var(--acc); letter-spacing: .22em; }

.result { position: fixed; inset: 0; background: rgba(16,17,17,.78); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 40; padding: 16px; }
.result-card {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; padding: 24px; max-width: 460px; width: 100%; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; max-height: 92dvh; overflow: auto; text-align: center;
}
.result-card h2 { margin: 0; font-size: 22px; font-weight: 500; }
.stars { display: flex; justify-content: center; gap: 6px; }
.stars svg { width: 38px; height: 38px; fill: none; stroke: #5a5b5b; stroke-width: 1.5; }
.stars svg.on { fill: var(--acc); stroke: var(--acc); animation: star .5s cubic-bezier(.16,1,.3,1) backwards; }
.stars svg.on:nth-child(2) { animation-delay: .12s; } .stars svg.on:nth-child(3) { animation-delay: .24s; }
@keyframes star { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.big-score { font-size: 60px; font-weight: 700; color: var(--acc); line-height: 1; }
.big-score small { font-size: 18px; color: var(--dim); font-weight: 400; }
.res-xp { margin: 0; color: var(--cyan); font-weight: 500; }
.res-steps { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 12px; color: var(--dim); }
.res-steps li { background: rgba(255,255,255,.06); padding: 4px 9px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.res-steps li b { color: var(--text); }
.res-peers { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.res-peers li { display: flex; align-items: center; justify-content: center; gap: 8px; }
.res-peers .dot { width: 10px; height: 10px; border-radius: 50%; }
.result-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; }

/* ---------- teléfonos y vertical ---------- */
@media (max-width: 899px), ((orientation: portrait) and (max-width: 1100px)) {
  .studio { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr) auto 64px; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bar { grid-row: 1; }
  .stage { grid-row: 2; }
  .cast { grid-row: 3; border-left: 0; border-top: 1px solid var(--line); padding: 8px 10px; gap: 0; overflow: visible; }
  .people { display: none; }
  .coach { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 12px; }
  .hint { grid-column: 1 / -1; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
  .meter { min-width: 0; }
  .meter-nums { font-size: 11px; }
  .coach-actions { gap: 4px; }
  .coach-actions .skip-txt { display: none; }
  .coach-actions .primary { min-width: 0; padding: 0 14px; }
  .coach-actions #skipBtn { padding: 0 6px; min-height: 36px; }
  .bar { gap: 6px; }
  .bar-title { flex: 1; }
  .studio.is-free .cast { display: none; }
  .rail { grid-row: 4; flex-direction: row; justify-content: space-evenly; padding: 0 6px; border-right: 0; border-top: 1px solid var(--line); }
  .size-wrap { width: 110px; height: 44px; margin: 0; }
  .size { width: 110px; transform: translate(-50%, -50%); }
  .bar-peers { display: flex; }
  .punches { gap: 4px; }
  .punches li { width: 14px; height: 14px; border-width: 2px; }
  .punches li.done::after { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
  .punches li.cur { box-shadow: inset 0 0 0 1.5px #101111; }
  .chip span { display: none; }
  .chip { width: 36px; padding: 0; justify-content: center; }
  .bar-title strong { font-size: 13px; }
  .bar-title span { display: none; }
  .home { padding: calc(2.9rem + 8px) 16px 32px; }
  .me { grid-template-columns: 1fr; }
  .lessons { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
}
/* teléfono acostado: rejilla propia; herramientas a la izquierda, instrucción a la derecha, papel al centro con toda la altura */
@media (orientation: landscape) and (max-height: 520px) {
  .studio { grid-template-columns: 52px minmax(0, 1fr) 220px; grid-template-rows: 40px minmax(0, 1fr); padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
  .studio.is-free { grid-template-columns: 52px minmax(0, 1fr); }
  .bar { grid-row: 1; grid-column: 1 / -1; gap: 6px; }
  .bar-title { flex: 1; }
  .bar-title span { display: none; }
  .bar-peers { display: flex; }
  .chip { width: 34px; height: 32px; padding: 0; justify-content: center; }
  .chip span { display: none; }
  .punches { gap: 4px; }
  .punches li { width: 14px; height: 14px; border-width: 2px; }
  .punches li.done::after { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
  .rail { grid-row: 2; grid-column: 1; flex-direction: column; justify-content: flex-start; gap: 0; padding: 4px 0; border-top: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  .rail .ib { width: 40px; height: 40px; flex: none; }
  .size-wrap { width: 40px; height: 84px; margin: 2px 0; flex: none; }
  .size { width: 84px; transform: translate(-50%, -50%) rotate(-90deg); }
  .stage { grid-row: 2; grid-column: 2; }
  .cast { grid-row: 2; grid-column: 3; border-top: 0; border-left: 1px solid var(--line); padding: 8px; overflow: auto; }
  .studio.is-free .cast { display: none; }
  .coach { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  .hint { font-size: 13px; -webkit-line-clamp: 5; }
  .meter { width: auto; }
  .people { display: none; }
}
@media (max-width: 420px) {
  .brand-mark { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
