:root {
    color-scheme: dark;
    --background: #0e0e11;
    --card: #17171c;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f6f2ea;
    --muted: #a39d92;
    --faint: #756f66;
    --accent: #d7b15e;
    --ink: #1c1406;
    --danger: #e08a8c;
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(1200px 500px at 50% -10%, rgba(215, 177, 94, 0.16), transparent 55%), var(--background);
    color: var(--text);
}

.page {
    width: min(440px, calc(100% - 32px));
    margin: 0 auto;
    padding: calc(28px + var(--safe-top)) 0 calc(36px + var(--safe-bottom));
}

.mark {
    margin: 0 0 18px;
    letter-spacing: 0.28em;
    font-size: 13px;
    font-weight: 650;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px 20px 20px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 560;
    letter-spacing: -0.03em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.meta {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
}

label span {
    font-size: 13px;
    color: var(--muted);
}

label em {
    color: var(--faint);
    font-style: normal;
}

input {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #101014;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    line-height: 1.3;
    padding: 14px 14px;
    min-height: 48px;
}

input:focus {
    outline: 2px solid rgba(215, 177, 94, 0.7);
    outline-offset: 1px;
}

button {
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 680;
    min-height: 48px;
    padding: 14px 18px;
    margin-top: 6px;
}

button:disabled {
    opacity: 0.55;
}

.error {
    margin: 0;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.sync-note {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    line-height: 1.4;
}

.tracking {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.track-card h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 560;
    letter-spacing: -0.03em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.track-card .artist {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.track-status {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.track-card .meta {
    margin: 0;
    white-space: pre-line;
}

.status-pending { color: #cbb98a; }
.status-accepted { color: #8fbfa4; }
.status-rejected { color: #b7a0a1; }
.status-played { color: var(--accent); }

.confirmation h1 {
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.instagram {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.instagram .meta {
    margin-bottom: 14px;
}

.instagram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 680;
    line-height: 1.2;
    min-height: 48px;
    padding: 14px 18px;
    text-align: center;
    text-decoration: none;
}

button.quiet {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

@media (max-width: 420px) {
    h1 {
        font-size: 28px;
    }

    .page {
        width: min(440px, calc(100% - 24px));
    }
}

@media (min-width: 800px) {
    .page {
        padding-top: 64px;
    }
}
