* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

.cf:before,
.cf:after {
    content: '';
    display: table;
}

.cf:after {
    clear: both;
}

#board {
    margin: 0 auto;
}

.controls {
    font-size: 14px;
    text-align: center;
    padding: .5em;
}

.info {
    width: 90vmin;
    margin: 0 auto;
}

input,
label,
button {
    direction: inline-block;
    font-size: inherit;
    background: none;
}

input,
button {
    border: 1px solid #ccc;
    border-radius: 3px;
}

button,
label {
    margin: .5em;
    white-space: nowrap;
}

h1 {
    font-size: 24px;
    color: #333;
    font-weight: 400;
}

p {
    font-size: 16px;
    color: #555;
}

.square {
    position: relative;
    display: block;
    float: left;
    padding: .2em;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, .3);
    font-size: .5em;
}

.square.invisible {
    color: transparent;
    background: none !important;
}

.square:hover {
    background-color: #ddd !important;
}

.square:before {
    opacity: 0;
    content: attr(data-x) ', ' attr(data-y);
    position: absolute;
    background: #000;
    color: #fff;
    top: -1.4em;
    left: 0;
    white-space: nowrap;
    z-index: 0;
    font-size: 14px;
    line-height: 1.3;
    padding: 0 .1em;
    transition: opacity .1s ease-in-out;
    pointer-events: none;
}

.square:hover:before {
    opacity: 1;
}
