/* Daily Tamil Word (2.3.0): tabs, 6 × N tile board, Tamil keyboard (uyir / mei + the uyirmei helper strip). */
.tw-main { padding-top: 8px; }
.tw-tabs { width: 100%; display: flex; gap: 8px; align-items: center; }
.tw-tab { flex: 1; min-height: 40px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--text); font-weight: 800; font-size: 15px; cursor: pointer; }
.tw-tab.on { border-color: var(--gold); background: #ffc53322; }
.tw-icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); font-size: 18px; cursor: pointer; flex: none; }
.tw-sub { color: var(--muted); font-size: 13px; margin: 8px 0; text-align: center; min-height: 18px; }
.tw-board { display: grid; gap: 6px; margin: 2px 0 6px; }
.tw-row { display: grid; gap: 6px; }
.tw-row.shake { animation: tw-shake .35s; }
@keyframes tw-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.tw-tile { width: 58px; height: 58px; border-radius: 10px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; text-transform: uppercase; background: transparent; }
.tw-en .tw-tile { width: 52px; height: 52px; }
.tw-tile.filled { border-color: var(--muted); animation: tw-pop .12s; }
.tw-tile.correct { background: #2e9d57; border-color: #2e9d57; color: #fff; }
.tw-tile.present { background: #c9a227; border-color: #c9a227; color: #1d1600; }
.tw-tile.near { background: #2f6fbf; border-color: #2f6fbf; color: #fff; }
.tw-tile.absent { background: #5a546b; border-color: #5a546b; color: #eeeaf7; }
.tw-tile.flip { animation: tw-flip .45s ease both; }
@keyframes tw-pop { 50% { transform: scale(1.1); } }
@keyframes tw-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.tw-msg { min-height: 22px; font-weight: 700; text-align: center; margin: 4px 0; }
.tw-forms { width: 100%; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; background: var(--bg2); border-radius: 12px; padding: 6px; margin-bottom: 6px; }
.tw-forms[hidden], .tw-done[hidden] { display: none; }
.tw-forms button { min-width: 40px; height: 42px; border-radius: 8px; border: 0; background: var(--card); color: var(--text); font-size: 19px; font-weight: 700; cursor: pointer; }
.tw-kb { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.tw-kb .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.tw-kb .row { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.tw-key { min-width: 32px; height: 44px; padding: 0 6px; border-radius: 8px; border: 0; background: var(--card); color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; flex: 0 0 auto; }
.tw-en .tw-key { min-width: 30px; font-size: 16px; text-transform: uppercase; }
.tw-key.wide { min-width: 64px; font-size: 14px; }
.tw-key.on { outline: 2px solid var(--gold); }
.tw-key.correct { background: #2e9d57; color: #fff; }
.tw-key.present { background: #c9a227; color: #1d1600; }
.tw-key.near { background: #2f6fbf; color: #fff; }
.tw-key.absent { background: #2a2536; color: #6f6888; }
.tw-done { margin-top: 10px; text-align: center; }
.tw-done p { margin: 4px 0; font-weight: 800; font-size: 18px; }
.tw-done .tw-next { font-weight: 600; font-size: 13px; color: var(--muted); }
.tw-done-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.tw-sheet[hidden] { display: none; }
.tw-stats { display: flex; gap: 8px; justify-content: center; margin: 8px 0 12px; }
.tw-stats div { background: var(--card); border-radius: 10px; padding: 6px 10px; min-width: 62px; text-align: center; }
.tw-stats b { display: block; font-size: 22px; color: var(--text); }
.tw-stats span { font-size: 11px; color: var(--muted); }
.tw-dist { text-align: left; margin: 0 auto; max-width: 320px; }
.tw-dist div { display: flex; gap: 6px; align-items: center; margin: 3px 0; font-size: 13px; }
.tw-dist i { display: block; background: #3c3650; color: #fff; font-style: normal; font-weight: 800; padding: 1px 6px; border-radius: 4px; min-width: 18px; text-align: right; }
.tw-dist i.me { background: #2e9d57; }
.tw-help { text-align: left; font-size: 14px; color: var(--text); }
.tw-help .tw-row { display: inline-grid; margin: 4px 0; }
.tw-help .tw-tile { width: 38px; height: 38px; font-size: 18px; }

@media (max-width: 380px) { .tw-tile { width: 50px; height: 50px; font-size: 22px; } .tw-en .tw-tile { width: 46px; height: 46px; } .tw-key { min-width: 28px; height: 40px; font-size: 16px; padding: 0 4px; } }
.tnz-tight .tw-tile { width: 46px; height: 46px; font-size: 20px; }
.tnz-tight .tw-key { height: 38px; }
