.tg-site { overflow-x: hidden; }
.tg-nav-link { color: #0057a8; font-weight: 800 !important; letter-spacing: .04em; border-bottom: 3px solid currentColor; }
.tg-main { padding-top: 1.3rem; padding-bottom: 4rem; }
.tg-masthead { display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-top: 5px solid #0057a8; border-bottom: 1px solid #ccd4dd; padding: .8rem 0 1rem; }
.tg-eyebrow { margin: 0; color: #0057a8; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.tg-masthead h1 { margin: .15rem 0 0; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.tg-masthead h1 span { color: #0057a8; }
.tg-back { color: #0057a8; font-weight: 700; white-space: nowrap; }
.tg-instructions { max-width: 62rem; margin: 1rem 0; font-size: 1rem; }
.tg-status { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; padding: .7rem 1rem; margin-bottom: 1rem; border-left: 4px solid #0057a8; background: #eef5fb; }
.tg-status strong { color: #003b75; }
.tg-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(17rem, .85fr); align-items: start; gap: clamp(1.2rem, 3vw, 2.5rem); }
.tg-board-panel, .tg-clues { min-width: 0; }
.tg-grid-scroll { max-width: 100%; overflow-x: auto; padding: .3rem .3rem .7rem; background: #e5ecf3; border: 1px solid #aebcca; overscroll-behavior-inline: contain; }
.tg-grid { display: grid; grid-template-columns: repeat(var(--tg-columns, 17), 2rem); grid-auto-rows: 2rem; width: max-content; gap: 1px; background: #315474; border: 1px solid #315474; }
.tg-cell { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; color: #102c48; background: #fff; font: 700 1rem Inter, sans-serif; cursor: pointer; }
.tg-cell:hover { background: #e5f1fc; }
.tg-cell.is-word { background: #d9eafa; }
.tg-cell.is-active { background: #ffdf83; box-shadow: inset 0 0 0 2px #3c2c00; }
.tg-cell.is-wrong { background: #ffe2df; color: #812013; }
.tg-cell.is-right { background: #d5f2df; }
.tg-cell.is-active.is-wrong { box-shadow: inset 0 0 0 2px #812013; }
.tg-cell:focus-visible, .tg-actions button:focus-visible, .tg-clue-list button:focus-visible, .tg-entry:focus-visible, .tg-back:focus-visible, .tg-grid-scroll:focus-visible { outline: 3px solid #ad5800; outline-offset: 2px; z-index: 2; }
.tg-block { background: #315474; }
.tg-number { position: absolute; top: 1px; left: 2px; font: 700 .55rem Inter, sans-serif; line-height: 1; }
.tg-letter { line-height: 1; padding-top: .3rem; }
.tg-entry-label { display: block; margin: 1rem 0 .35rem; font-weight: 700; }
.tg-entry { width: 100%; min-height: 44px; padding: .65rem .8rem; border: 2px solid #496c8c; border-radius: 2px; font: inherit; }
.tg-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.tg-actions button { min-height: 44px; padding: .55rem .85rem; border: 1px solid #0057a8; border-radius: 2px; background: #0057a8; color: #fff; font: 700 .88rem Inter, sans-serif; cursor: pointer; }
.tg-actions button:hover { background: #003e7b; }
.tg-actions-secondary button { color: #004780; background: #fff; }
.tg-actions-secondary button:hover { color: #fff; }
.tg-actions button:disabled { opacity: .55; cursor: not-allowed; }
.tg-feedback { min-height: 1.5em; margin: .8rem 0 0; font-weight: 700; color: #003b75; }
.tg-hint-text { padding: .7rem 1rem; margin: .5rem 0 0; border-left: 3px solid #a76a00; background: #fff4d9; }
.tg-clues { display: grid; gap: 1.5rem; }
.tg-clues h2 { margin: 0 0 .5rem; padding-bottom: .45rem; border-bottom: 3px solid #0057a8; font: 700 1.5rem 'Playfair Display', Georgia, serif; }
.tg-clue-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.tg-clue-list button { display: block; width: 100%; min-height: 44px; text-align: left; padding: .55rem .65rem; border: 1px solid transparent; background: #fff; color: #202e3b; font: 500 .95rem/1.4 Inter, sans-serif; cursor: pointer; }
.tg-clue-list button:hover, .tg-clue-list button.is-selected { border-color: #89acd0; background: #e8f2fc; }
.tg-clue-list button.is-solved { color: #16572c; }
.tg-clue-list strong { color: #0057a8; margin-right: .3rem; }
.tg-clue-list small { color: #586877; white-space: nowrap; }
@media (max-width: 980px) { .tg-layout { grid-template-columns: 1fr; } .tg-clues { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tg-main { padding-top: .8rem; } .tg-masthead { align-items: start; flex-direction: column; } .tg-clues { grid-template-columns: 1fr; } .tg-grid { grid-template-columns: repeat(var(--tg-columns, 17), 44px); grid-auto-rows: 44px; } .tg-letter { font-size: 1.1rem; } .tg-number { font-size: .62rem; } .tg-grid-scroll { margin-inline: -.2rem; } .tg-actions button { flex: 1 1 8.5rem; } }

/* Cada edición publica su cantidad real de columnas mediante --tg-columns. */


.tg-result-dialog{width:min(94vw,680px);max-height:94vh;border:0;padding:0;background:transparent}.tg-result-dialog::backdrop{background:rgba(3,18,34,.72)}
.tg-result-card{background:#fff;border-top:8px solid #0057a8;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.3)}.tg-result-card h2{margin:0 0 16px;font-family:"Playfair Display",serif;font-size:2rem}.tg-result-card canvas{display:block;width:min(100%,420px);height:auto;margin:0 auto 16px;border:1px solid #cbd5e1}.tg-result-card textarea{box-sizing:border-box;width:100%;margin:7px 0 12px;padding:10px;border:1px solid #9aa9b7;font:inherit;resize:vertical}.tg-result-note{color:#5f6b76;font-size:.82rem}.tg-result-card .tg-actions{margin-top:12px}

