:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bg:     #f5f5f7;
    --fg:     #1a1a1a;
    --fg-muted: #555;
    --border: #ddd;
    --accent: #7852ee;
    --success: #1a7a44;
    --danger:  #c0392b;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
    line-height: 1.55;
}

header {
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 0.5rem;
}

.back-btn {
    font-size: 1.2rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}

h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

main {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

#info-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: var(--fg-muted);
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 150ms;
}
.primary-btn:disabled { opacity: 0.4; cursor: default; }
.primary-btn:not(:disabled):active { opacity: 0.82; }

.secondary-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: white;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 150ms;
}
.secondary-btn:active { background: #f0ecfd; }

#status-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

#status-msg {
    font-size: 0.95rem;
    white-space: pre-wrap;
}
#status-msg.success { color: var(--success); font-weight: 600; }
#status-msg.error   { color: var(--danger);  font-weight: 600; }
