@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:ital,opsz,wght@1,9..144,600&display=swap');

:root {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #172019;
    background: #f4f1e9;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #e4b936;
    outline-offset: 3px;
}

.top {
    min-height: 76px;
    background: #101915;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px max(20px, calc((100vw - 1160px) / 2));
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    color: #e4b936;
    font-family: 'Fraunces', serif;
    font-size: 22px;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; line-height: 1.05; }
.brand small { color: rgba(255,255,255,.55); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; margin-top: 3px; }
.cart-link {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}
.cart-link b { display: grid; place-items: center; min-width: 29px; height: 29px; padding: 0 8px; background: #e4b936; color: #101915; border-radius: 99px; }

.container { max-width: 1160px; margin: auto; padding: 56px 20px 90px; }
.container.narrow { max-width: 900px; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; padding: 18px 0 62px; }
.eyebrow, .step { margin: 0 0 10px; color: #72786f; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; }
.hero h1 { margin: 0; font-size: clamp(42px, 6.2vw, 78px); line-height: .98; letter-spacing: -.055em; max-width: 820px; }
.hero h1 em { color: #1c6b45; font-family: 'Fraunces', serif; font-weight: 600; }
.hero-copy { max-width: 620px; margin: 24px 0 0; color: #62675f; font-size: 17px; line-height: 1.65; }
.hero-stamp { width: 112px; height: 112px; border: 1px solid #cbc6b8; border-radius: 50%; display: grid; place-content: center; text-align: center; transform: rotate(6deg); }
.hero-stamp strong { font-family: 'Fraunces', serif; font-size: 36px; line-height: 1; color: #1c6b45; }
.hero-stamp span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-heading > span { color: #858980; font-size: 12px; }
.tabs { display: flex; gap: 9px; overflow-x: auto; margin: 0 -20px 22px; padding: 2px 20px 10px; scrollbar-width: thin; }
.tab {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #d3cec2;
    background: rgba(255,255,255,.55);
    border-radius: 99px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 700;
    color: #555c54;
    transition: .18s ease;
}
.tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--tab-accent); }
.tab:hover { border-color: #92978d; }
.tab.active { background: #101915; color: #fff; border-color: #101915; box-shadow: 0 8px 20px rgba(16,25,21,.14); }

.game-card {
    --accent: #159447;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dedbd2;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 22px 65px rgba(36,42,35,.08);
}
.game-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--accent); }
.game-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.game-head h2 { margin: 0 0 6px; font-size: 31px; letter-spacing: -.04em; }
.game-head p:not(.step) { margin: 0; color: #777d74; }
.game-actions { display: flex; align-items: center; gap: 9px; }
.ghost { border: 1px solid #d9dcd7; background: #f6f7f4; border-radius: 12px; padding: 11px 15px; cursor: pointer; font-weight: 700; color: #253129; }
.ghost:hover { border-color: var(--accent); }
.text-button { border: 0; background: none; color: #687068; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px; }
.text-button.danger { color: #9e3932; }

.numbers { display: grid; grid-template-columns: repeat(10, minmax(40px, 1fr)); gap: 10px; margin: 29px 0; }
.ball {
    aspect-ratio: 1;
    min-width: 0;
    border-radius: 50%;
    border: 1px solid #d9ddd8;
    background: #fff;
    color: #3b443d;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, color .12s ease, border .12s ease;
}
.ball:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.ball.selected { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 28%, transparent); }

.extra-panel { margin: 8px 0 26px; padding: 21px; background: #f5f4ef; border-radius: 16px; }
.extra-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 14px; }
.extra-heading span { color: #747970; font-size: 12px; }
.extra-options { display: flex; flex-wrap: wrap; gap: 8px; }
.extra-option { border: 1px solid #d5d7d2; background: #fff; padding: 9px 13px; border-radius: 99px; cursor: pointer; font-size: 13px; font-weight: 600; }
.extra-option.selected { color: #fff; border-color: var(--accent); background: var(--accent); }

.selection { border-top: 1px solid #ecece7; padding-top: 20px; }
.selection-head { display: flex; justify-content: space-between; align-items: center; color: #62685f; font-size: 13px; }
.selection-head strong { color: #222b24; }
.selection-head strong b { color: var(--accent); font-size: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 39px; margin-top: 12px; align-items: center; }
.chip { display: inline-grid; place-items: center; min-width: 38px; height: 38px; background: #edf0eb; color: #29352c; border-radius: 99px; padding: 0 9px; font-weight: 800; font-size: 13px; }
.empty-selection { color: #9a9e98; font-size: 13px; font-style: italic; }
.feedback { min-height: 20px; margin: 13px 0 -4px; color: #8e5e16; font-size: 13px; }
.feedback.success, .feedback.error { min-height: auto; padding: 12px 14px; border-radius: 10px; }
.feedback.success { color: #1f6d43; background: #e4f3e9; }
.feedback.error { color: #9d352f; background: #f9e8e6; }
.primary {
    display: block;
    width: 100%;
    margin-top: 20px;
    border: 0;
    border-radius: 13px;
    padding: 17px 22px;
    background: #e4b936;
    color: #101915;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.primary:hover:not(:disabled) { transform: translateY(-1px); background: #edc94e; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.button-link { text-align: center; text-decoration: none; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #d9d4c8; border: 1px solid #d9d4c8; margin-top: 28px; border-radius: 16px; overflow: hidden; }
.trust-strip div { background: #efede6; padding: 18px 21px; }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong { font-size: 13px; }
.trust-strip span { color: #7d817a; font-size: 11px; margin-top: 3px; }

.page-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; }
.page-title h1 { margin: 0; font-size: clamp(38px, 6vw, 58px); letter-spacing: -.055em; }
.notice { background: #fff8dd; border: 1px solid #e6d48f; color: #6a581c; padding: 14px 16px; border-radius: 12px; font-size: 13px; }
.cart-list { margin-top: 24px; }
.cart-item { background: #fff; border: 1px solid #dedbd2; border-radius: 17px; padding: 20px; margin: 12px 0; }
.cart-item-head { display: flex; justify-content: space-between; gap: 20px; }
.cart-item-head div > span, .cart-item-head div > strong { display: block; }
.cart-item-head div > span { color: #8a8e87; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 3px; }
.cart-item-head div > strong { font-size: 20px; }
.remove-button { border: 0; background: none; color: #9e3932; text-decoration: underline; cursor: pointer; font-size: 12px; }
.cart-extra { margin: 13px 0 0; padding-top: 13px; border-top: 1px solid #eeeeea; color: #666d65; font-size: 13px; }
.cart-summary { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: end; margin-top: 24px; }
.cart-summary div span, .cart-summary div strong { display: block; }
.cart-summary div span { color: #71766f; font-size: 12px; }
.cart-summary div strong { font-family: 'Fraunces', serif; font-size: 38px; color: #1c6b45; }
.cart-summary .primary { margin: 0; }
.empty-state { text-align: center; padding: 70px 20px; background: rgba(255,255,255,.5); border: 1px dashed #cbc7bc; border-radius: 20px; }
.empty-state > span { font-size: 46px; color: #1c6b45; }
.empty-state h2 { margin: 13px 0 5px; }
.empty-state p { color: #72776f; margin: 0 0 24px; }
.empty-state .primary { max-width: 300px; margin: auto; }
.inline { display: flex; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 240px; }
.field input, .field select { padding: 13px; border: 1px solid #ccc; border-radius: 10px; background: #fff; }
.checkout-form { display: grid; gap: 16px; margin-top: 24px; }
.form-card { background: #fff; border: 1px solid #dedbd2; border-radius: 17px; padding: 24px; }
.form-card h2 { margin: 0 0 20px; font-size: 23px; }
.field { color: #596058; font-size: 13px; font-weight: 600; }
.field input:focus { border-color: #1c6b45; }
.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #d8d9d4; border-radius: 13px; cursor: pointer; }
.payment-option:has(input:checked) { border-color: #1c6b45; background: #edf6f0; }
.payment-option input { accent-color: #1c6b45; }
.payment-option span strong, .payment-option span small { display: block; }
.payment-option span small { color: #777d75; font-size: 11px; margin-top: 3px; }
.checkout-summary { display: flex; justify-content: space-between; align-items: center; padding: 4px 3px; color: #6d736b; font-size: 13px; }
.checkout-summary > strong { color: #172019; font-size: 23px; }
.checkout-summary > strong small { color: #7a8079; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.checkout-form > .primary { margin: 0; }
.receipt { background: #fff; border: 1px solid #dedbd2; border-radius: 24px; padding: clamp(25px, 5vw, 50px); text-align: center; box-shadow: 0 22px 65px rgba(36,42,35,.08); }
.receipt-success { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 50%; background: #1c6b45; color: #fff; font-size: 28px; }
.receipt h1 { margin: 0; font-size: 48px; letter-spacing: -.05em; }
.receipt > p:not(.eyebrow) { max-width: 550px; margin: 12px auto 25px; color: #697068; line-height: 1.55; }
.receipt-code { display: inline-flex; flex-direction: column; gap: 4px; padding: 13px 24px; border: 1px dashed #bfc4bc; border-radius: 12px; }
.receipt-code span { color: #7b8179; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.receipt-code strong { letter-spacing: .08em; }
.receipt-details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 30px 0; padding: 1px; background: #e0e0da; border-radius: 12px; overflow: hidden; text-align: left; }
.receipt-details div { background: #f6f6f3; padding: 13px; }
.receipt-details dt { color: #898e87; font-size: 10px; text-transform: uppercase; }
.receipt-details dd { margin: 3px 0 0; font-weight: 700; font-size: 13px; }
.receipt-games { text-align: left; border-top: 1px solid #e9e9e4; padding-top: 25px; }
.receipt-games h2 { font-size: 18px; }
.receipt-game { padding: 15px 0; border-bottom: 1px solid #eeeeea; }
.receipt-game p { color: #666d65; font-size: 12px; }
.print-button { margin-top: 20px; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #dedbd2; border-radius: 17px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-table th, .admin-table td { padding: 15px 17px; text-align: left; border-bottom: 1px solid #ecece7; font-size: 13px; }
.admin-table th { color: #777d75; background: #f7f7f3; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td small { display: block; color: #858a83; margin-top: 3px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-block; border-radius: 99px; padding: 5px 9px; background: #e4f3e9; color: #1f6d43; font-size: 10px; font-weight: 800; text-transform: uppercase; }

@media (max-width: 820px) {
    .numbers { grid-template-columns: repeat(8, 1fr); }
    .trust-strip { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .container { padding-top: 38px; }
    .hero { grid-template-columns: 1fr; padding-bottom: 45px; }
    .hero-stamp { display: none; }
    .section-heading > span { display: none; }
    .game-card { padding: 22px 15px; border-radius: 18px; }
    .game-head { display: block; }
    .game-actions { margin-top: 16px; justify-content: space-between; }
    .numbers { grid-template-columns: repeat(5, 1fr); gap: 8px; }
    .extra-heading { display: block; }
    .extra-heading span { display: block; margin-top: 3px; }
    .page-title { align-items: start; }
    .cart-summary { grid-template-columns: 1fr; }
    .payment-options, .receipt-details { grid-template-columns: 1fr; }
}

@media print {
    body { background: #fff; }
    .top, .print-button, .receipt > .primary { display: none; }
    .container { padding: 0; }
    .receipt { border: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
