* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #1a1a2e;
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    height: 100dvh;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 500px;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
}

header {
    text-align: center;
    margin-bottom: 8px;
}

header h1 {
    font-size: 1.4rem;
    color: #e94560;
}

#status {
    font-size: 0.95rem;
    color: #aaa;
    margin-top: 4px;
    min-height: 1.4em;
}

#board-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#board {
    background: #c8a85a;
    border-radius: 4px;
    touch-action: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#info {
    width: 100%;
    padding: 8px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #ccc;
}

#turn-indicator {
    font-weight: bold;
}

#controls {
    display: flex;
    gap: 12px;
    padding: 8px 0 16px;
    width: 100%;
}

#controls button {
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}

#controls button:active {
    transform: scale(0.95);
}

#btn-new {
    background: #e94560;
    color: white;
}

#btn-undo {
    background: #333;
    color: #ccc;
}

@media (max-height: 600px) {
    header h1 { font-size: 1.1rem; }
    #controls button { padding: 10px; }
}
