*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #1a1a2e;
    --bg-surface: #16213e;
    --bg-card: #0f3460;
    --primary: #e94560;
    --primary-light: #ff6b81;
    --accent: #f5c518;
    --text: #eee;
    --text-dim: #8899aa;
    --success: #2ecc71;
    --danger: #e74c3c;
    --tw-color: #e74c3c;
    --dw-color: #ff8c42;
    --tl-color: #3498db;
    --dl-color: #58b4d1;
    --star-color: #f5c518;
    --tile-bg: #f4e4c1;
    --tile-text: #2c1810;
    --tile-pending: #ffe066;
    --radius: 8px;
    --cell-gap: 1px;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

.view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

button {
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    padding: 8px 16px;
    background: var(--bg-card);
    color: var(--text);
    transition: background 0.15s, transform 0.1s;
}

button:active {
    transform: scale(0.96);
}

input[type="text"], input[type="password"] {
    background: var(--bg-surface);
    border: 1px solid #334;
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    font-size: 16px;
    width: 100%;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.logo {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent);
    text-align: center;
    letter-spacing: -1px;
}

.logo-small {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.error-msg {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

.icon-btn {
    background: none;
    font-size: 20px;
    padding: 4px 8px;
}
