/* Herramientas públicas (patiolab.us/tools/*). Sin dependencias. */
.tool { background:#fff; border:1px solid rgba(10,30,100,.09); border-radius:18px; padding:22px; margin:22px 0 10px; box-shadow:0 6px 24px rgba(10,30,100,.05); }
.tool label.lbl { display:block; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#5a6488; margin:0 0 6px; }
.tool textarea, .tool input[type=text], .tool input[type=number] { width:100%; font:inherit; font-size:15px; border:1px solid rgba(10,30,100,.18); border-radius:10px; padding:10px 12px; background:#fbfcff; color:#080f28; }
.tool textarea { min-height:150px; resize:vertical; }
.tool-row { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-end; margin-bottom:14px; }
.tool-row > .col { flex:1 1 220px; }
.seg { display:inline-flex; flex-wrap:wrap; gap:6px; }
.seg button { font:inherit; font-size:14px; font-weight:600; border:1px solid rgba(10,30,100,.15); background:#fff; color:#080f28; border-radius:9px; padding:7px 12px; cursor:pointer; min-width:40px; }
.seg button.on { background:#0057ff; border-color:#0057ff; color:#fff; }
.tbtn { font:inherit; font-size:15px; font-weight:700; border:0; background:#0057ff; color:#fff; border-radius:10px; padding:11px 18px; cursor:pointer; }
.tbtn.ghost { background:#fff; color:#080f28; border:1px solid rgba(10,30,100,.18); font-weight:600; }
.tbtn:disabled { opacity:.45; cursor:default; }
.tool-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.hint { font-size:13px; color:#5a6488; margin:6px 0 0; }
/* Teams */
.teams-out { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; margin-top:18px; }
.team-card { border-radius:14px; border:2px solid var(--c); background:color-mix(in srgb, var(--c) 7%, #fff); padding:12px 14px; }
.team-card h3 { margin:0 0 6px; font-size:16px; color:var(--c); display:flex; justify-content:space-between; }
.team-card ol { margin:0; padding-left:20px; font-size:15px; }
/* Bracket */
.bracket { display:flex; gap:18px; overflow-x:auto; padding:6px 2px 10px; margin-top:16px; }
.round { min-width:190px; display:flex; flex-direction:column; justify-content:space-around; gap:12px; }
.round h4 { margin:0; font-size:12px; letter-spacing:.07em; text-transform:uppercase; color:#5a6488; }
.match { border:1px solid rgba(10,30,100,.12); border-radius:12px; overflow:hidden; background:#fff; }
.match.bye, .match.pending { opacity:.6; }
.slot { display:flex; align-items:center; gap:8px; padding:8px 10px; font-size:14.5px; }
.slot + .slot { border-top:1px solid rgba(10,30,100,.08); }
.slot.win { background:#e8f0ff; font-weight:700; }
.slot .nm { flex:1; }
.slot input { width:56px; padding:5px 6px; text-align:center; }
.champion { margin-top:14px; padding:14px 16px; border-radius:14px; background:#0a3d1f; color:#fff; font-weight:700; font-size:18px; }
.champion span { color:#d4ff3f; }
table.standings { width:100%; border-collapse:collapse; margin-top:14px; font-size:14.5px; }
table.standings th, table.standings td { padding:7px 8px; border-bottom:1px solid rgba(10,30,100,.08); text-align:center; }
table.standings th:nth-child(2), table.standings td:nth-child(2) { text-align:left; }
.rr-matches { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px; margin-top:14px; }
.rr-match { display:flex; align-items:center; gap:8px; border:1px solid rgba(10,30,100,.12); border-radius:12px; padding:8px 10px; background:#fff; font-size:14.5px; }
.rr-match .nm { flex:1; }
.rr-match .nm.r { text-align:right; }
.rr-match input { width:52px; padding:5px 6px; text-align:center; }
/* Timer */
.clock { font-family:'Plus Jakarta Sans',system-ui,sans-serif; font-weight:800; font-size:clamp(64px,16vw,150px); text-align:center; letter-spacing:-.02em; line-height:1; margin:18px 0 10px; font-variant-numeric:tabular-nums; }
.clock.done { color:#e5484d; }
.clock.warn { color:#d97706; }
.center { text-align:center; }
.center .tool-actions { justify-content:center; }
/* Scoreboard */
.sb { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin-top:16px; }
.sb-team { border-radius:16px; padding:16px; text-align:center; background:color-mix(in srgb, var(--c) 9%, #fff); border:2px solid var(--c); }
.sb-team input.name { text-align:center; font-weight:700; color:var(--c); background:transparent; border:1px dashed transparent; }
.sb-team input.name:hover, .sb-team input.name:focus { border-color:rgba(10,30,100,.25); }
.sb-score { font-family:'Plus Jakarta Sans',system-ui,sans-serif; font-weight:800; font-size:clamp(64px,12vw,120px); line-height:1.05; font-variant-numeric:tabular-nums; }
.sb-btns { display:flex; gap:8px; justify-content:center; }
.sb-btns button { font:inherit; font-weight:800; font-size:18px; border:0; border-radius:12px; padding:10px 14px; min-width:56px; cursor:pointer; background:var(--c); color:#fff; }
.sb-btns button.minus { background:#fff; color:#080f28; border:1px solid rgba(10,30,100,.18); }
/* Fullscreen */
.tool:fullscreen { display:flex; flex-direction:column; justify-content:center; padding:4vw; border-radius:0; }
.tool:fullscreen .clock { font-size:28vw; }
.tool:fullscreen .sb-score { font-size:18vw; }
.tool-links a { display:inline-block; margin:4px 8px 4px 0; background:#fff; border:1px solid rgba(10,30,100,.09); border-radius:10px; padding:8px 14px; text-decoration:none; color:#080f28; font-weight:600; font-size:14.5px; }
@media print {
  header.top, footer, .cta, .no-print, .tool-actions, .faq, .tool-links, h2, .lead, .crumbs { display:none !important; }
  .tool { border:0; box-shadow:none; }
}
/* Las casillas de marcador no deben ocupar todo el ancho (la regla general de .tool input pone width:100%) */
.tool .slot input, .tool .rr-match input { width:58px; flex:0 0 58px; padding:5px 6px; text-align:center; }
.tool #tm-custom { width:80px; padding:5px 8px; }
