.ttt-page { --ttt-x: #d5f76d; --ttt-o: #c2b0fa; max-width: 930px; margin: 0 auto; }
.ttt-page [hidden] { display: none !important; }
.ttt-page button { font: inherit; cursor: pointer; touch-action: manipulation; }
.ttt-page button:focus-visible { outline: 3px solid #f1f7ea; outline-offset: 4px; }
.ttt-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.ttt-eyebrow { margin: 0 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; color: #91a69e; }
.ttt-heading h1 { display: flex; align-items: center; gap: 24px; margin: 0; color: #f1f5ee; font-size: clamp(32px, 4vw, 46px); font-weight: 750; line-height: 1.2; letter-spacing: -1.8px; }
.ttt-title-marks { color: var(--ttt-x); font-size: 1.15em; line-height: 1; letter-spacing: -5px; white-space: nowrap; }
.ttt-title-marks i { font-style: normal; color: var(--ttt-o); margin-left: 10px; }
.ttt-subtitle { font-size: 13px; color: #a9b9b4; margin: 12px 0 0; }
.ttt-heading > a { color: #c3cfc9; text-decoration: none; font-size: 12px; white-space: nowrap; }
.ttt-heading > a span { margin-left: 8px; color: var(--ttt-x); }
.ttt-mode { display: flex; gap: 6px; padding: 5px; margin-bottom: 22px; border: 1px solid #34423f; border-radius: 12px; width: fit-content; background: #0f171b; }
.ttt-mode button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 45px; padding: 9px 22px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #a4b4ae; font-size: 13px; font-weight: 600; }
.ttt-mode button[aria-pressed="true"] { background: #26322c; border-color: #4b5e42; color: #e7f5ca; }
.ttt-mode svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.ttt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 38px; align-items: start; }
.ttt-game { min-width: 0; border: 1px solid #35443f; border-radius: 16px; overflow: hidden; background: #141f23; }
.ttt-scoreboard { display: grid; grid-template-columns: 1fr .8fr 1fr; border-bottom: 1px solid #35443f; background: #172428; }
.ttt-score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 15px 8px 13px; border-bottom: 2px solid transparent; min-width: 0; }
.ttt-score > span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #c3cfc9; }
.ttt-score b { font-size: 23px; line-height: 16px; font-weight: 500; }
.ttt-score strong { font-size: 28px; font-weight: 650; line-height: 1.2; }
.ttt-score-x strong, .ttt-score-x b, .ttt-x { color: var(--ttt-x); }
.ttt-score-o strong, .ttt-score-o b, .ttt-o { color: var(--ttt-o); }
.ttt-score-draw strong { color: #a6b5af; }
.ttt-score-x.is-active { border-bottom-color: var(--ttt-x); background: #d5f76d06; }
.ttt-score-o.is-active { border-bottom-color: var(--ttt-o); background: #c2b0fa06; }
.ttt-play-area { padding: 21px 36px 16px; }
.ttt-round-line { display: flex; align-items: center; gap: 7px; color: #9bafa7; font-size: 10px; letter-spacing: .5px; }
.ttt-round-line b { color: #e1e9e2; font-weight: 500; margin-left: 4px; }
.ttt-live-dot { width: 3px; height: 3px; margin-left: auto; border-radius: 50%; background: #81948a; }
.ttt-status { min-height: 82px; text-align: center; padding-top: 20px; }
.ttt-status h2 { margin: 0 0 6px; font-size: 21px; font-weight: 650; letter-spacing: -.4px; color: var(--ttt-x); }
.ttt-status[data-mark="O"] h2 { color: var(--ttt-o); }
.ttt-status[data-mark="draw"] h2 { color: #e8eee8; }
.ttt-status p { margin: 0; color: #a2b5ad; font-size: 12px; }
.ttt-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); width: 100%; aspect-ratio: 1; gap: 9px; max-width: 345px; margin: 14px auto 23px; }
.ttt-page .ttt-cell { display: grid; place-items: center; box-sizing: border-box; width: 100%; height: 100%; padding: 0; min-width: 0; min-height: 0; overflow: hidden; border-radius: 11px; border: 1px solid #3b4e49; background: #1c2b2e; color: var(--ttt-x); font-family: "Segoe UI", Arial, sans-serif !important; font-size: clamp(46px, 6vw, 76px) !important; font-weight: 300 !important; line-height: 1; transition: background .15s, border-color .15s; }
.ttt-cell[data-mark="O"] { color: var(--ttt-o); }
.ttt-cell[data-mark="X"] { color: var(--ttt-x); }
.ttt-cell[aria-disabled="true"] { cursor: default; }
.ttt-cell[aria-disabled="false"]:hover { background: #2a3a34; border-color: #7e9363; }
.ttt-cell.is-last:not(.is-winning) { border-color: #718279; }
.ttt-cell.is-winning { border-color: var(--ttt-x); background: #d5f76d15; box-shadow: inset 0 0 24px #d5f76d06; }
.ttt-cell.is-winning[data-mark="O"] { border-color: var(--ttt-o); background: #c2b0fa16; }
.ttt-board.is-finished .ttt-cell:not(.is-winning) { opacity: .6; }
.ttt-primary { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 345px; min-height: 47px; margin: 0 auto; padding: 10px 19px; border: 1px solid var(--ttt-x); border-radius: 8px; background: var(--ttt-x); color: #192315; font-size: 13px !important; font-weight: 700 !important; }
.ttt-primary:disabled { cursor: default; border-color: #34453c; background: #26352e; color: #93a08e; }
.ttt-primary:not(:disabled):hover { background: #e1ff92; }
.ttt-restart { display: block; border: 0; background: transparent; color: #a7b9b0; font-size: 11px !important; min-height: 38px; margin: 5px auto 0; }
.ttt-restart span { margin-right: 5px; }
.ttt-keyboard-help { border-top: 1px solid #2c3c37; padding: 13px 22px; margin: 0; font-size: 10px; line-height: 1.6; text-align: center; color: #94a9a0; }
.ttt-sidebar { padding-top: 6px; }
.ttt-sidebar h2 { color: #ecf2e9; font-size: 22px; letter-spacing: -.5px; margin: 0 0 23px; font-weight: 650; }
.ttt-option-heading { margin-bottom: 9px; color: #d1ded5; font-size: 12px; font-weight: 600; }
.ttt-segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 9px; border: 1px solid #3b4a43; gap: 3px; background: #10191c; }
.ttt-segmented button { padding: 9px 2px; min-height: 39px; font-size: 12px; color: #a6b8ad; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.ttt-segmented button[aria-pressed="true"] { background: #334232; color: #e9f5d5; border-color: #61724d; }
.ttt-option-note, .ttt-local-note > p:last-child, .ttt-settings-note { color: #a0b4a8; font-size: 11px; line-height: 1.7; margin: 10px 0 24px; }
.ttt-mark-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ttt-mark-options button { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 9px; min-height: 55px; background: #172428; border: 1px solid #3b4a43; border-radius: 8px; color: #bccabf; }
.ttt-mark-options b { font-size: 32px; font-weight: 350; line-height: 1; }
.ttt-mark-options span { font-size: 11px; }
.ttt-mark-options button[aria-pressed="true"] { border-color: var(--ttt-x); background: #d5f76d09; }
.ttt-mark-options button[data-ttt-mark="O"][aria-pressed="true"] { border-color: var(--ttt-o); background: #c2b0fa09; }
.ttt-settings-note { color: #91a89a; font-size: 10px; padding-left: 11px; border-left: 2px solid #42563d; }
.ttt-rules { padding-top: 22px; border-top: 1px solid #35443b; }
.ttt-rules .ttt-eyebrow { font-size: 9px; letter-spacing: 1.3px; }
.ttt-rule-art { display: flex; gap: 5px; margin: 15px 0; position: relative; width: fit-content; }
.ttt-rule-art span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; background: #26362a; border: 1px solid #5c6c42; color: var(--ttt-x); font-size: 32px; font-weight: 300; line-height: 1; }
.ttt-rule-art::after { content: ''; position: absolute; top: 18px; left: -5px; right: -5px; height: 2px; background: var(--ttt-x); opacity: .7; }
.ttt-rules h3 { margin: 0 0 7px; font-size: 14px; color: #dce8da; }
.ttt-rules > p:last-child { margin: 0; color: #a0b4a8; font-size: 12px; line-height: 1.7; }
.ttt-reset { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 23px; border: 0; border-top: 1px solid #35443b; background: transparent; padding: 16px 0; font-size: 11px !important; color: #b2c3b7; }
.ttt-reset:hover, .ttt-restart:hover { color: #edf5e9; }
@media (max-width: 760px) {
    .content-page:has(.ttt-page) { padding: 25px 18px; }
    .ttt-page { max-width: 540px; }
    .ttt-heading { align-items: flex-start; gap: 10px; }
    .ttt-heading h1 { font-size: 32px; gap: 15px; letter-spacing: -1px; }
    .ttt-heading > a { font-size: 10px; padding-top: 5px; }
    .ttt-heading > a span { margin-left: 2px; }
    .ttt-eyebrow { font-size: 8px; letter-spacing: 1.25px; }
    .ttt-subtitle { font-size: 12px; }
    .ttt-mode { width: 100%; }
    .ttt-mode button { flex: 1; padding: 8px 5px; font-size: 12px; gap: 7px; }
    .ttt-layout { grid-template-columns: minmax(0, 1fr); gap: 25px; }
    .ttt-play-area { padding: 18px 24px 12px; }
    .ttt-board { max-width: 345px; gap: 8px; }
    .ttt-page .ttt-cell { font-size: clamp(45px, 16vw, 76px) !important; }
    .ttt-sidebar { padding: 0 5px; }
    .ttt-sidebar h2 { font-size: 20px; margin-bottom: 17px; }
    .ttt-settings { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
    .ttt-settings > .ttt-eyebrow, .ttt-settings > h2 { grid-column: 1 / -1; }
    #ttt-difficulty-label { grid-row: 3; grid-column: 1; }
    #ttt-mark-label { grid-row: 3; grid-column: 2; }
    .ttt-segmented { grid-row: 4; grid-column: 1; align-self: stretch; }
    .ttt-mark-options { grid-row: 4; grid-column: 2; gap: 5px; }
    .ttt-mark-options button { padding: 7px 2px; min-height: 49px; }
    .ttt-mark-options span { display: none; }
    .ttt-mark-options b { font-size: 32px; }
    .ttt-option-note { font-size: 10px; margin-bottom: 15px; }
    .ttt-rules { padding-top: 18px; }
}
@media (max-width: 360px) {
    .ttt-heading h1 { font-size: 27px; gap: 8px; }
    .ttt-title-marks { letter-spacing: -3px; }
    .ttt-heading > a { font-size: 9px; }
    .ttt-play-area { padding-right: 16px; padding-left: 16px; }
    .ttt-score > span { font-size: 10px; gap: 4px; }
    .ttt-segmented button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .ttt-page .ttt-cell { transition: none; } }
