/* Simulador de challenge. Pantalla de operación: el gráfico ocupa todo el ancho y la franja del
   challenge, la barra de reproducción y el ticket quedan siempre a la vista.
   Todas las clases llevan el prefijo cs- para no chocar con las de la app. Usa los tokens de
   app-brand.css y app-shell.css (colores, espaciado --s-*, radios --r-*). */

.cs { --warn: #ffb74a; --cs-bar: 64px; }
body.chal-on main { max-width: none; padding: var(--s-3) var(--s-4) var(--s-7); }
body.chal-on .bar { padding-inline: var(--s-4); }
.cs-num { font-variant-numeric: tabular-nums; }
.cs-up { color: var(--good); } .cs-down { color: var(--bad); } .cs-muted { color: var(--muted); }
.cs button { font-family: inherit; color: inherit; letter-spacing: inherit; }

/* ---------- Pantalla de operación: exactamente el alto de la ventana en escritorio ---------- */
.cs-screen { display: flex; flex-direction: column; gap: var(--s-3); }
@media (min-width: 1000px) { .cs-screen { height: calc(100dvh - var(--cs-bar) - var(--s-3) * 2); min-height: 640px; } }

/* Franja del challenge */
.cs-strip {
  flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-5); align-items: center;
  padding: var(--s-4) var(--s-5); border-radius: 20px; background: var(--surface-card); border: 1px solid var(--rule);
}
.cs-day { display: grid; gap: var(--s-2); min-width: 290px; padding-right: var(--s-5); border-right: 1px solid var(--rule); }
.cs-day-h { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.cs-day-h h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.cs-day-h span { font-size: 13px; color: var(--muted); }
.cs-days { display: grid; grid-template-columns: repeat(30, 7px); gap: 2.5px; }
.cs-days i { height: 18px; border-radius: 3px; background: var(--panel2); border: 1px dashed color-mix(in srgb, var(--rule) 80%, transparent); }
.cs-days i.w { background: var(--good); border: 0; } .cs-days i.l { background: var(--bad); border: 0; } .cs-days i.f { background: #6a6e78; border: 0; }
.cs-days i.now { border: 0; background: var(--ink); animation: csPulse 2s infinite; }
@keyframes csPulse { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, #fff 18%, transparent); } }
.cs-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.cs-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5); }
.cs-kpi { display: grid; gap: 6px; min-width: 0; }
.cs-kpi > span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-kpi > b { font-size: 19px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.cs-kpi small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-bar { height: 6px; border-radius: 6px; background: var(--panel2); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3); }
.cs-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--g-teal); transition: width .35s ease, background .35s; }
.cs-bar.risk i { background: var(--good); }
.cs-bar.risk.mid i { background: var(--warn); } .cs-bar.risk.hot i { background: var(--bad); }
.cs-dots { display: flex; gap: 5px; height: 6px; align-items: center; }
.cs-dots i { width: 22px; height: 6px; border-radius: 6px; background: var(--panel2); }
.cs-dots i.on { background: var(--g-teal); }

/* Terminal: herramientas + gráfico */
.cs-term { flex: 1; min-height: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); border-radius: 20px; overflow: hidden; border: 1px solid var(--rule); background: var(--chartbg); }
.cs-tools { display: flex; flex-direction: column; gap: 2px; padding: var(--s-2) 6px; background: var(--panel2); border-right: 1px solid var(--rule); overflow-y: auto; scrollbar-width: none; }
.cs-tools hr { width: 32px; margin: 4px auto; border: 0; border-top: 1px solid var(--rule); }
.cs-tool {
  display: grid; justify-items: center; gap: 3px; padding: 5px 2px 4px; border-radius: 12px; border: 1px solid transparent;
  background: none; color: var(--muted); font-size: 10.5px; font-weight: 500; line-height: 1; cursor: pointer; transition: background .15s, color .15s;
}
.cs-tool:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); color: var(--ink); }
.cs-tool[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, #7b2ff7 26%, var(--panel)); border-color: color-mix(in srgb, #c471ed 55%, transparent); }
.cs-tool .ph { width: 21px; height: 21px; }

.cs-chart { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cs-chead { flex: none; height: 46px; display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-3) 0 var(--s-4); border-bottom: 1px solid var(--rule); }
.cs-sym { font-weight: 600; font-size: 14.5px; }
/* Selector de instrumento (BTC, ETH, XRP); el punto marca el activo con la operación en curso */
.cs-assets button { font-weight: 600; position: relative; }
.cs-assets button.cs-open::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cs-sp { flex: 1; }
.cs-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel2); flex: none; }
.cs-seg button { border: 0; background: none; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 500; color: var(--muted); min-height: 28px; cursor: pointer; white-space: nowrap; }
.cs-seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.cs-seg button:disabled { opacity: .45; cursor: default; }
.cs-ibtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; }
.cs-ibtn:hover { background: var(--panel2); color: var(--ink); }
.cs-ibtn[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, #7b2ff7 26%, var(--panel)); }
.cs-ibtn:disabled { opacity: .4; cursor: default; }
.cs-vsep { width: 1px; height: 22px; background: var(--rule); flex: none; }
.cs-coach { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.cs-coach i { width: 34px; height: 20px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--rule); position: relative; transition: background .2s; flex: none; }
.cs-coach i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.cs-coach[aria-pressed="true"] { color: var(--ink); }
.cs-coach[aria-pressed="true"] i { background: color-mix(in srgb, var(--good) 30%, var(--panel2)); border-color: color-mix(in srgb, var(--good) 60%, var(--rule)); }
.cs-coach[aria-pressed="true"] i::after { transform: translateX(14px); background: var(--good); }

.cs-plot { position: relative; flex: 1; min-height: 0; }
#csCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: none; touch-action: none; }
.cs-legend { position: absolute; left: var(--s-4); top: var(--s-3); display: flex; gap: var(--s-3); font-size: 12.5px; color: var(--muted); pointer-events: none; }
.cs-legend b { font-weight: 500; }
.cs-hint {
  position: absolute; left: var(--s-4); top: 40px; display: flex; align-items: center; gap: var(--s-3); max-width: min(720px, calc(100% - 120px));
  padding: 6px 6px 6px var(--s-3); border-radius: 12px; background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--rule);
  backdrop-filter: blur(8px); font-size: 13px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6);
}
.cs-hint[hidden], .cs-live[hidden] { display: none; }
.cs-hint b { font-weight: 600; white-space: nowrap; }
.cs-hint span { color: var(--muted); }
.cs-live { position: absolute; right: 96px; bottom: 40px; height: 34px; padding: 0 var(--s-3); border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); font-size: 13px; font-weight: 500; cursor: pointer; }

/* Barra de reproducción y ticket */
.cs-dock { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); border-radius: 18px; background: var(--panel); border: 1px solid var(--rule); }
.cs-replay { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.cs-play { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 0; display: grid; place-items: center; background: var(--g-violet); color: #fff; box-shadow: 0 10px 24px -12px rgba(123, 47, 247, .9); cursor: pointer; }
.cs-btn { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); padding: 0 var(--s-3); border-radius: 12px; border: 1px solid var(--rule); background: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.cs-btn:hover { background: var(--panel2); }
.cs-btn.cs-icon { width: 44px; padding: 0; flex: none; }
.cs-clock { display: grid; gap: 1px; padding: 0 var(--s-2); white-space: nowrap; }
.cs-clock b { font-size: 15px; font-weight: 500; }
.cs-clock span { font-size: 12px; color: var(--muted); }
.cs-ticket { display: flex; align-items: center; gap: 10px; padding-left: var(--s-4); border-left: 1px solid var(--rule); }
.cs-fld { display: grid; gap: 2px; }
.cs-fld span { font-size: 11px; color: var(--muted); }
.cs-fld label { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 var(--s-2); border-radius: 10px; background: var(--panel2); border: 1px solid var(--rule); }
.cs-fld input { width: 40px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; -moz-appearance: textfield; appearance: textfield; }
.cs-fld input::-webkit-inner-spin-button, .cs-fld input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cs-fld em { font-style: normal; font-size: 12px; color: var(--muted); }
.cs-lots { display: grid; gap: 2px; min-width: 76px; font-size: 12px; color: var(--muted); }
.cs-lots b { color: var(--ink); font-weight: 500; font-size: 14px; }
.cs-buy, .cs-sell { height: 46px; min-width: 96px; padding: 0 var(--s-4); border: 0; border-radius: 14px; font-weight: 600; font-size: 15px; color: #fff; display: grid; line-height: 1.1; cursor: pointer; }
.cs-buy small, .cs-sell small { font-weight: 400; font-size: 11.5px; opacity: .85; }
.cs-buy { background: var(--g-teal); box-shadow: 0 10px 24px -14px rgba(17, 214, 182, .9); }
.cs-sell { background: var(--g-pink); box-shadow: 0 10px 24px -14px rgba(230, 36, 110, .9); }

/* ---------- Debajo: posición, operaciones del día y rendimiento ---------- */
.cs-below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--s-4); margin-top: var(--s-4); }
.cs-card { padding: var(--s-5); border-radius: var(--r-card); background: var(--surface-card); border: 1px solid var(--rule); min-width: 0; }
.cs-card h3 { margin: 0 0 var(--s-2); font-size: 17px; font-weight: 500; }
.cs-help { margin: 0 0 var(--s-4); font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.cs-empty { padding: var(--s-5); border-radius: var(--r-row); border: 1px dashed var(--rule); color: var(--muted); font-size: 14px; line-height: 1.55; }
.cs-pos { display: grid; gap: var(--s-3); }
.cs-pos-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.cs-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500; }
.cs-tag.b { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.cs-tag.s { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.cs-tag.p { background: var(--panel2); color: var(--muted); }
.cs-pnl { font-size: 30px; font-weight: 400; letter-spacing: -.02em; }
.cs-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-4); font-size: 13.5px; }
.cs-grid2 span { color: var(--muted); }
.cs-grid2 b { font-weight: 500; text-align: right; }
.cs-rowbtns { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-2); }
.cs-trades { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); max-height: 260px; overflow-y: auto; }
.cs-trades li { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-row); background: var(--panel2); font-size: 13.5px; }
.cs-trades li b { font-weight: 500; }
.cs-perf { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: var(--s-5); align-items: start; }
.cs-curve { width: 100%; height: 120px; display: block; }
.cs-stats { display: grid; gap: var(--s-3); font-size: 13.5px; }
.cs-stats div { display: flex; justify-content: space-between; gap: var(--s-3); }
.cs-stats span { color: var(--muted); }
.cs-stats b { font-weight: 500; }
.cs-pace { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-row); background: var(--panel2); font-size: 13.5px; line-height: 1.55; }
.cs-pace b { font-weight: 500; }
.cs-reset { margin: var(--s-5) 0 0; font-size: 13.5px; }

/* Aviso flotante y hojas (inicio, cierre del día, resultado del challenge) */
.cs-toast {
  position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 40;
  padding: 10px 18px; border-radius: 99px; background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .7);
  font-size: 14px; max-width: 90vw; transition: opacity .25s, transform .25s;
}
.cs-toast.on { opacity: 1; transform: translate(-50%, 0); }
.cs-toast.good { border-color: color-mix(in srgb, var(--good) 60%, var(--rule)); }
.cs-toast.bad { border-color: color-mix(in srgb, var(--bad) 60%, var(--rule)); }
.cs-modal { position: fixed; inset: 0; display: grid; place-items: center; padding: var(--s-4); background: rgba(20, 21, 24, .6); backdrop-filter: blur(6px); z-index: 50; }
.cs-modal[hidden] { display: none; }
.cs-sheet { width: min(480px, 100%); padding: var(--s-6); border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); display: grid; gap: var(--s-4); }
.cs-sheet h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.cs-sheet p { margin: 0; color: var(--muted); line-height: 1.6; }
.cs-sheet .cs-kick { font-size: 13.5px; }
.cs-big { font-size: 40px; font-weight: 400; letter-spacing: -.02em; color: var(--ink); }
.cs-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.cs-rules li { padding: var(--s-3); border-radius: var(--r-row); background: var(--panel2); font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.cs-rules li b { color: var(--ink); font-size: 16px; font-weight: 500; }
.cs-cta { height: 52px; border: 0; border-radius: var(--r-row); background: var(--g-violet); color: #fff; font-weight: 600; cursor: pointer; box-shadow: 0 12px 28px -12px rgba(123, 47, 247, .8); }
.cs-cta.win { background: var(--g-teal); box-shadow: 0 12px 28px -12px rgba(17, 214, 182, .8); }
/* Elegir el activo del challenge nuevo (BTC, ETH, XRP) */
.cs-sheet .cs-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: 13.5px; }
.cs-pick .cs-btn { height: 36px; min-width: 56px; color: var(--ink); }

/* ---------- Pantallas medianas y móvil ---------- */
@media (max-width: 1240px) {
  .cs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3) var(--s-5); }
  .cs-below { grid-template-columns: 1fr 1fr; } .cs-below .cs-card:last-child { grid-column: 1 / -1; }
  .cs-clock { display: none; }
}
/* ---------- Tableta y móvil ----------
   Prioridad: el gráfico y los botones de operar. La franja muestra lo imprescindible (resultado de hoy,
   límite diario y objetivo) y se despliega con «Ver todo». Las herramientas van bajo el gráfico, al
   alcance del pulgar, y la barra de reproducción y el ticket quedan fijos abajo. */
.cs-more, .cs-zoom, .cs-tsum, .cs-s, .cs-spd { display: none; }
.cs-tf { display: flex; align-items: center; gap: 10px; }
@media (max-width: 999px) {
  body.chal-on main { padding: var(--s-2) var(--s-3) var(--s-6); }
  .cs-screen { gap: var(--s-2); }
  .cs-strip { grid-template-columns: 1fr; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: 18px; }
  .cs-day { border-right: 0; padding-right: 0; min-width: 0; gap: 6px; }
  .cs-day-h { flex-wrap: nowrap; }
  .cs-day-h h2 { font-size: 19px; white-space: nowrap; }
  .cs-day-h span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .cs-more { display: inline; margin-left: auto; font-size: 13px; white-space: nowrap; min-height: 32px; }
  .cs-days { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
  .cs-days i { height: 12px; }
  .cs-strip:not(.open) .cs-days, .cs-strip:not(.open) .cs-note, .cs-strip:not(.open) .cs-x { display: none; }
  .cs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
  .cs-kpi { gap: 4px; }
  .cs-kpi > span { font-size: 11.5px; }
  .cs-kpi > b { font-size: 15.5px; }
  .cs-kpi small { font-size: 11px; }

  .cs-term { display: flex; flex-direction: column; border-radius: 18px; }
  .cs-chart { order: 1; }
  .cs-tools { order: 2; flex-direction: row; overflow-x: auto; border-right: 0; border-top: 1px solid var(--rule); padding: 6px; gap: 2px; -webkit-overflow-scrolling: touch; }
  .cs-tools hr { flex: none; width: 1px; height: 34px; margin: auto 3px; border-top: 0; border-left: 1px solid var(--rule); }
  .cs-tool { flex: none; min-width: 56px; min-height: 48px; }
  .cs-chead { height: 44px; gap: var(--s-2); padding: 0 var(--s-2) 0 var(--s-3); overflow-x: auto; scrollbar-width: none; }
  .cs-chead .cs-soon { display: none; }
  .cs-coach span { display: none; }
  .cs-ibtn { width: 36px; height: 36px; }
  .cs-chead .cs-vsep { display: none; }
  /* Todo en un solo alto de pantalla: el gráfico se queda con el espacio que sobra */
  .cs-screen { height: calc(100dvh - var(--cs-bar) - var(--s-2) * 2); min-height: 540px; }
  .cs-term { flex: 1; min-height: 0; }
  .cs-chart { flex: 1; min-height: 0; }
  .cs-plot { flex: 1; min-height: 180px; }
  .cs-l { display: none; } .cs-s { display: inline; }
  .cs-legend { left: var(--s-3); top: var(--s-2); right: 70px; flex-wrap: wrap; gap: 0 var(--s-2); font-size: 11px; }
  .cs-legend span:first-child { display: none; }
  .cs-hint { left: var(--s-2); top: 30px; max-width: calc(100% - 76px); padding: 4px 4px 4px var(--s-3); font-size: 12.5px; }
  .cs-hint span { display: none; }
  .cs-zoom { display: flex; position: absolute; right: 70px; bottom: 36px; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: color-mix(in srgb, var(--panel) 92%, transparent); }
  .cs-zoom button { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; }
  .cs-zoom button + button { border-left: 1px solid var(--rule); }
  .cs-live { right: 70px; bottom: 84px; }

  /* Reproducción y ticket, fijos abajo mientras operas */
  .cs-dock { flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-2); }
  .cs-replay { gap: var(--s-2); }
  .cs-replay .cs-seg { display: none; }
  .cs-spd { display: inline-flex; width: 56px; flex: none; padding: 0; }
  .cs-replay #csEnd { flex: 1; min-width: 0; }
  .cs-replay #csEnd span { overflow: hidden; text-overflow: ellipsis; }
  .cs-ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "tf tf tf" "sell sum buy"; gap: var(--s-2); border-left: 0; padding: 0; }
  .cs-tsum { display: block; grid-area: sum; height: 48px; padding: 0 var(--s-3); border-radius: 14px; border: 1px solid var(--rule); background: var(--panel2); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
  .cs-ticket.open .cs-tsum { border-color: color-mix(in srgb, #c471ed 55%, var(--rule)); }
  .cs-tf { grid-area: tf; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--s-2); padding-bottom: var(--s-2); border-bottom: 1px solid var(--rule); }
  .cs-ticket:not(.open) .cs-tf { display: none; }
  .cs-fld label { height: 38px; }
  .cs-fld input { width: 100%; min-width: 0; font-size: 16px; }
  .cs-lots { min-width: 0; align-self: end; padding-bottom: 8px; }
  .cs-sell, .cs-buy { height: 48px; min-width: 0; padding: 0 var(--s-2); }
  .cs-sell { grid-area: sell; } .cs-buy { grid-area: buy; }
  .cs-toast { top: calc(var(--cs-bar) + var(--s-2)); bottom: auto; transform: translate(-50%, -12px); border-radius: 16px; text-align: center; width: max-content; max-width: calc(100vw - 32px); }
  .cs-toast.on { transform: translate(-50%, 0); }

  .cs-below { grid-template-columns: 1fr; gap: var(--s-3); margin-top: var(--s-3); }
  .cs-below .cs-card:last-child { grid-column: auto; }
  .cs-card { padding: var(--s-4); }
  .cs-perf { grid-template-columns: 1fr; gap: var(--s-4); }
  .cs-sheet { max-height: calc(100dvh - 32px); overflow-y: auto; padding: var(--s-5); }
  .cs-big { font-size: 34px; }
}
@media (max-width: 380px) {
  .cs-replay .cs-seg button { padding: 4px 7px; }
  .cs-rules { grid-template-columns: 1fr; }
}

/* Dibujo seleccionado: botón para eliminarlo dentro de la barra de ayuda */
.cs-hint .cs-del { height: 30px; padding: 0 var(--s-3); font-size: 12.5px; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--rule)); }
.cs-hint .cs-del:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
