:root {
    --cb-yellow: #ffc800;
    --cb-yellow-dark: #e6b400;
    --cb-blue: #006bb6;
    --cb-blue-dark: #004e8c;
    --cb-blue-light: #e8f4fc;
    --cb-cream: #fffbf5;
    --cb-ink: #1b2b42;
    --cb-muted: #5c6b7f;
    --bg: #eef6fd;
    --ink: var(--cb-ink);
    --muted: var(--cb-muted);
    --card: #ffffff;
    --line: #d6e6f4;
    --accent: var(--cb-blue);
    --accent-soft: var(--cb-blue-light);
    --accent-glow: rgba(0, 107, 182, 0.16);
    --gold: var(--cb-yellow);
    --error: #d92d20;
    --error-bg: #fef3f2;
    --radius-sm: 14px;
    --radius-lg: 28px;
    --shadow: 0 22px 60px rgba(0, 78, 140, 0.14);
    --shadow-soft: 0 8px 24px rgba(0, 78, 140, 0.08);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: Nunito, Outfit, system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 0% -5%, rgba(255, 200, 0, 0.18) 0%, transparent 58%),
        radial-gradient(760px 380px at 100% 0%, rgba(0, 107, 182, 0.14) 0%, transparent 52%),
        radial-gradient(600px 300px at 50% 100%, rgba(255, 200, 0, 0.1) 0%, transparent 60%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

.page {
    width: min(460px, 100%);
    margin: 0 auto;
    padding: 12px 14px 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.brand-header {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 16px 14px 4px;
}

.brand-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 144px;
    height: 144px;
    background: var(--cb-blue);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(0, 107, 182, 0.22);
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-box:hover,
.brand-logo-box:focus-visible {
    filter: brightness(1.05);
}

.brand-logo-box img {
    display: block;
    width: 144px;
    height: 144px;
    object-fit: contain;
}

.card-head {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.card-date {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--cb-blue);
    letter-spacing: 0.02em;
}

.card-head h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--cb-blue-dark);
}

.lede {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, var(--cb-cream) 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 16px 14px 18px;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--cb-blue), var(--cb-yellow));
    opacity: 1;
}

.banner {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.banner-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(217, 45, 32, 0.12);
}

.form {
    display: grid;
    gap: 12px;
}

.field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}

.required-mark {
    color: var(--error);
}

.optional-mark {
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="number"] {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0 15px;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
    color: #8fa0b3;
}

.field input:focus {
    border-color: var(--cb-blue);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.field.has-error input,
.field.has-error .combo-input,
.field.has-error .phone {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.1);
}

.hint,
.error-text {
    margin: 5px 0 0;
    font-size: 11px;
    line-height: 1.4;
}

.hint {
    color: var(--muted);
}

.error-text {
    color: var(--error);
}

.date-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 15px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #f3f9ff 0%, #e8f4fc 100%);
    border: 1px solid var(--line);
    font-weight: 700;
    color: var(--cb-blue-dark);
}

.date-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cb-yellow);
    box-shadow: 0 0 0 4px rgba(255, 200, 0, 0.22);
}

.combo {
    position: relative;
}

.combo-input {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0 42px 0 15px;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235c6b7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.combo-input:focus {
    border-color: var(--cb-blue);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.combo-list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    max-height: 240px;
    overflow: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
}

.combo-list li {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}

.combo-list li[aria-selected="true"],
.combo-list li:hover {
    background: var(--cb-blue-light);
}

.combo-list .empty {
    color: var(--muted);
    cursor: default;
}

.other-wrap {
    display: none;
    margin-top: 10px;
}

.other-wrap.is-open {
    display: block;
}

.phone {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone:focus-within {
    border-color: var(--cb-blue);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.phone-prefix {
    flex: 0 0 auto;
    padding: 0 10px;
    height: 44px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #f3f9ff 0%, #e8f4fc 100%);
    font-weight: 800;
    font-size: 15px;
    border-right: 1.5px solid var(--line);
    color: var(--cb-blue);
}

.phone input {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: 44px;
}

.btn-submit,
.btn-instagram,
.btn-new-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-submit {
    margin-top: 4px;
    color: #fff;
    background: linear-gradient(180deg, #0080d4 0%, var(--cb-blue) 100%);
    box-shadow: 0 10px 24px rgba(0, 107, 182, 0.28);
}

.btn-submit:hover,
.btn-submit:focus-visible,
.btn-new-entry:hover,
.btn-new-entry:focus-visible,
.btn-instagram:hover,
.btn-instagram:focus-visible {
    transform: translateY(-1px);
}

.btn-submit:active,
.btn-new-entry:active,
.btn-instagram:active {
    transform: translateY(0);
}

.btn-submit.is-loading {
    opacity: 0.78;
    pointer-events: none;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.page-thanks {
    min-height: calc(100dvh - 164px);
    display: grid;
    align-items: start;
    padding-top: 8px;
    padding-bottom: 12px;
}

.thanks-card {
    text-align: center;
    padding: 22px 18px 20px;
}

.thanks-card h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    color: var(--cb-blue-dark);
}

.success-badge {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
}

.success-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff9e6 0%, #fff3cc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.success-icon {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--cb-blue);
}

.thanks-card .lede {
    max-width: 30ch;
    margin: 0 auto 18px;
    font-size: 14px;
}

.thanks-message {
    max-width: 100%;
    margin: 0 auto 22px;
    padding: 16px 14px;
    font-size: clamp(16px, 4.5vw, 18px);
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: var(--cb-ink);
    background: linear-gradient(180deg, #f3f9ff 0%, var(--cb-blue-light) 100%);
    border: 2px solid rgba(0, 107, 182, 0.18);
    border-radius: 16px;
    text-wrap: balance;
}

.thanks-actions {
    display: grid;
    gap: 10px;
}

.btn-new-entry {
    color: #fff;
    background: linear-gradient(180deg, #0080d4 0%, var(--cb-blue) 100%);
    box-shadow: 0 10px 24px rgba(0, 107, 182, 0.24);
}

.thanks-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.thanks-divider::before,
.thanks-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.btn-instagram {
    color: #fff;
    background: linear-gradient(135deg, #f58529 0%, #dd2a7b 48%, #8134af 100%);
    box-shadow: 0 12px 28px rgba(221, 42, 123, 0.28);
}

.thanks-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--muted);
}

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

    .card {
        padding: 18px 18px 20px;
    }
}
