/* Tipos — lo propio sobre la base (styles.css). Una sola pantalla: póster + panel. Estilo de Componentes. */

/* caja de texto: lo único abierto al entrar */
.writer { display: grid; gap: 8px; padding: 20px var(--pad); border-bottom: 1px solid var(--rule); }
.writer label { font-size: 13px; font-weight: 500; }
#wordInput { display: block; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--r); background: var(--paper); font-size: 16px; box-shadow: var(--lift); outline: none; transition: border-color .15s, box-shadow .15s; }
#wordInput:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 24%, transparent); }

/* 01 fuente: tu texto escrito en cada fuente, agrupado por escuela */
.font-groups { display: grid; gap: 20px; }
.font-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ftile { position: relative; display: grid; gap: 6px; align-content: space-between; min-width: 0; height: 76px; padding: 8px 10px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--rule); cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.ftile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* interlínea holgada: la tilde de las mayúsculas no se corta */
.ftile .w { font-size: 22px; line-height: 1.4; white-space: nowrap; overflow: hidden; }
.ftile .w.tall { font-size: 44px; line-height: 1.1; }
.ftile small { font-size: 11px; line-height: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftile:hover { box-shadow: 0 0 0 1px var(--rule-strong); }
.ftile:has(input:checked) { background: var(--muted); box-shadow: 0 0 0 1.5px var(--ink); }
.ftile:has(input:checked) small { color: var(--ink); }
.ftile:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--ring); z-index: 1; }
/* las miniaturas fuera de vista no se dibujan: así no se descargan sus fuentes */
.ftile { content-visibility: auto; contain-intrinsic-size: auto 76px; }

/* vista: póster o muro, y el eje en vivo a la derecha */
.stage { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.stage > :not(.views):not(.axis) { grid-column: 1 / -1; }
.views { justify-self: start; }
.views small { font-size: 11px; color: var(--soft); margin-left: 2px; }
.axis { display: flex; align-items: center; gap: 10px; justify-self: end; height: 36px; padding: 0 4px 0 12px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--rule), var(--lift); font-size: 13px; color: var(--soft); }
.axis input { width: clamp(120px, 18vw, 240px); }
.axis output { min-width: 4ch; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.axis button { width: 28px; height: 28px; border: 0; border-radius: var(--r-sm); background: var(--primary); color: var(--primary-foreground); font-size: 10px; }

/* muro */
.wall { display: none; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.stage[data-view=wall] .wall { display: grid; }
.stage[data-view=wall] .frame { display: none; }
/* filtro por escuela: chips redondos, como en Componentes */
.wall-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.wall-filter button { height: 30px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 99px; background: var(--paper); font-size: 13px; color: var(--soft); }
.wall-filter button:hover { color: var(--ink); background: var(--accent); }
.wall-filter button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.wall-filter small { font-size: 11px; opacity: .6; margin-left: 2px; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-content: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; }
.wtile { content-visibility: auto; contain-intrinsic-size: auto 168px; display: grid; grid-template-rows: 1fr auto auto; gap: 6px; min-width: 0; height: 168px; padding: 14px 16px 12px; border: 0; border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 0 0 1px var(--rule); text-align: left; color: var(--ink); transition: box-shadow .15s; }
.wtile .w { align-self: center; font-size: 56px; line-height: 1.3; white-space: nowrap; overflow: hidden; letter-spacing: 0; }
.wtile .w.tall { font-size: 64px; }
.wtile .meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 15px; min-width: 0; }
.wtile .meta b { font-weight: 500; white-space: nowrap; }
.wtile .meta span { color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtile .fnote { font-size: 12px; line-height: 16px; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.wtile:hover { box-shadow: 0 0 0 1px var(--rule-strong); }
.wtile:hover .fnote { -webkit-line-clamp: 3; }
.wtile[aria-pressed=true] { box-shadow: 0 0 0 1.5px var(--ink); }
.wtile:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }

/* 02 estilo: miniatura del valor */
#programThumb { width: 18px; height: 18px; flex: none; border-radius: 4px; box-shadow: 0 0 0 1px var(--rule); }

/* 03 colores: las 348 combinaciones de Sanzo Wada */
.wada-bar { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.wada-filter { margin-right: auto; }
.wada-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px 6px; max-height: 312px; overflow-y: auto; scrollbar-width: thin; padding: 4px; }
.wtl { content-visibility: auto; contain-intrinsic-size: auto 52px; display: grid; gap: 3px; padding: 0; border: 0; background: none; text-align: left; }
.wtl .sw { display: flex; height: 34px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
.wtl .sw i { flex: 1; }
.wtl small { font-size: 11px; line-height: 13px; color: var(--soft); font-variant-numeric: tabular-nums; }
.wtl:hover .sw { box-shadow: 0 0 0 1px var(--rule-strong); }
.wtl[aria-pressed=true] .sw { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.wtl[aria-pressed=true] small { color: var(--ink); font-weight: 500; }
#paletteName { font-size: 13px; color: var(--soft); white-space: nowrap; }
.credit { font-size: var(--t-micro); color: var(--soft); line-height: 1.5; margin: 10px 0 0; }
.credit a { color: var(--ink); text-underline-offset: 3px; }
.dropzone.own { padding: 10px 12px; margin-top: 12px; justify-content: flex-start; font-size: 13px; }

/* 04 inspiración: recortes de letras que arman el póster con un toque */
.ref-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rtile { display: grid; gap: 4px; padding: 0; border: 0; background: none; text-align: left; font-size: 11px; line-height: 13px; color: var(--soft); min-width: 0; }
.rtile span.crop { display: grid; place-items: center; height: 64px; border-radius: var(--r); background: var(--well); box-shadow: 0 0 0 1px var(--rule); overflow: hidden; }
.rtile img { max-width: 100%; max-height: 64px; display: block; object-fit: contain; }
.rtile b { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtile:hover span.crop { box-shadow: 0 0 0 1px var(--rule-strong); }
.rtile[aria-pressed=true] span.crop { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }

/* pie del panel y crédito de la fuente */
.agents-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.agents-line a { color: var(--soft); text-underline-offset: 3px; }
button.linkish { border: 0; background: none; padding: 0; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
button.linkish:hover, .agents-line a:hover { color: var(--ink); }
.agent-status { margin-left: 6px; color: var(--ink); }
.credit-line { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.credit-line a { color: var(--soft); text-underline-offset: 3px; }
.credit-line a:hover { color: var(--ink); }

@media (max-width: 899px) {
  .writer { padding: 14px var(--gap); }
  .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-line { text-align: right; }
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 70svh; }
  .axis { grid-column: 1 / -1; justify-self: stretch; }
  .axis input { flex: 1; width: auto; }
  .wtile { height: 140px; contain-intrinsic-size: auto 140px; }
  .wtile .w { font-size: 44px; }
}
