* {
    box-sizing: border-box;
}

#app {
    border: 1px solid black;
    width: min(500px, 100%);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    font-family: sans-serif;
    font-weight: bold;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    align-items: center;
    background: #222;
}

.header > * {
    color: #eeeeee;
}

.header__turn {
    padding: 12px;
}

.header__status {
    padding: 12px;
    flex-grow: 1;
    text-align: center;
}

.header__restart {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
}

.board {
    display: grid;
    background: #cccccc;
    gap: 10px;
    padding: 10px;
    flex-grow: 1;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.board__tile {
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    font-family: cursive;
    color: #222222;
}

.board__tile:hover {
    background: #eeeeee;
}

.board__tile--winner {
    color: green;
}

body{margin:0;padding:12px;background:#fff8ed;color:#24454c;font-family:system-ui,sans-serif}main{max-width:650px;margin:auto}main>p{line-height:1.5}#app{margin:20px auto;border:3px solid #2b7078;border-radius:16px;overflow:hidden}.header{background:#275669;flex-wrap:wrap}.header__turn,.header__status{padding:12px 8px}.header__restart{font:700 15px system-ui;min-height:48px;padding:10px;background:#d8f6eb;color:#224e55;outline:revert}.board{background:#b6dfe0;gap:6px;padding:8px}.board__tile{border:0;border-radius:8px;font-size:clamp(38px,15vw,80px);min-width:0;min-height:0}.board__tile:focus-visible,.header__restart:focus-visible{outline:3px solid #be3869;outline-offset:-4px}.board__tile:disabled{opacity:1;cursor:default}.board__tile--winner{background:#c1f0ca;color:#165e35}
