:root {
    --bg: #f0e9dd;
    --card: #fff;
    --ink: #1b2a41;
    --mut: #5b6472;
    --line: #e3dccd;
    --amber: #e8a23a;
    --gold: #9a6a08;
    --green: #1f6b57;
    --tan: #f0e9dd;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px)
}

@media (prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
        --bg: #141a26;
        --card: #1d2636;
        --ink: #eef1f6;
        --mut: #a3adbd;
        --line: #334057;
        --tan: #27324a;
        --gold: #e8a23a
    }
}

:root[data-theme="dark"] {
    --bg: #141a26;
    --card: #1d2636;
    --ink: #eef1f6;
    --mut: #a3adbd;
    --line: #334057;
    --tan: #27324a;
    --gold: #e8a23a
}

html {
    scroll-padding-top: env(safe-area-inset-top, 0px)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 "Source Sans 3", system-ui, sans-serif
}

h1,
h2,
.num {
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700
}

main {
    max-width: 1120px;
    margin: auto;
    padding: 40px 20px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 40px;
    align-items: start
}

/* summary box: follows the page and stops with its bottom edge in view when it is taller than the screen
   (the exact `top` is set by a small script at the end of booking.php; 84px = just below the site header) */
main > aside {
    position: sticky;
    top: 84px
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 32px
}

h1 {
    font-size: 25px;
    margin: 0 0 4px;
    line-height: 1.2
}

h1 em {
    font-style: normal;
    color: var(--gold)
}

h2 {
    font-size: 25px;
    margin: 0 0 6px
}

.sm {
    font-size: 13.5px;
    color: var(--mut);
    margin: 0
}

.top {
    display: flex;
    justify-content: space-between;
    gap: 16px
}

.lnk {
    background: none;
    border: 0;
    color: var(--gold);
    font: 700 13px "Source Sans 3", sans-serif;
    cursor: pointer;
    white-space: nowrap;
    align-self: flex-start;
    padding: 4px
}

.lnk:hover {
    text-decoration: underline
}

#dp {
    display: none;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line)
}

#dp.open {
    display: grid
}

#dp label {
    font-weight: 700;
    font-size: 13.5px
}

#dp input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: var(--card);
    color: var(--ink)
}

#dp .btn {
    width: auto;
    padding: 12px 20px
}

.ap {
    display: block;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    margin-top: 2px
}

@media(max-width:560px) {
    #dp {
        grid-template-columns: 1fr
    }
}

.car {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 16px
}

.car.on {
    border: 2px solid var(--ink)
}

.th {
    width: 150px;
    height: 104px;
    border-radius: 8px;
    flex: none;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden
}

.t1 {
    background: linear-gradient(160deg, #6aa0a8 0 35%, #b48a5a 35% 70%, #e8dcc8 70%)
}

.t2 {
    background: linear-gradient(160deg, #d9a566 0 30%, #8a6a4c 30% 70%, #c9bca6 70%)
}

.ci {
    flex: 1;
    min-width: 0
}

.ci b {
    display: block;
    font-size: 15.5px
}

.ci small {
    color: var(--mut);
    font-size: 13px
}

.ci small s {
    text-decoration: none;
    color: var(--green);
    font-weight: 600
}

.qty {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    background: var(--tan)
}

.qty button {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--tan);
    font-size: 20px;
    cursor: pointer;
    color: var(--ink)
}

.qty button:disabled {
    opacity: .35;
    cursor: default
}

.qty span {
    width: 44px;
    display: grid;
    place-items: center;
    background: var(--card);
    font-weight: 700;
    margin: 2px 0
}

.pr {
    text-align: right;
    min-width: 100px
}

.pr .num {
    font-size: 23px;
    display: block;
    line-height: 1.1
}

.pr small {
    font-size: 12.5px;
    color: var(--mut);
    display: block
}

.lab {
    font-size: 11.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mut);
    margin: 22px 0 10px
}

.inc {
    background: var(--tan);
    border-radius: 10px;
    padding: 16px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    font-size: 14px
}

.inc div:before {
    content: "✓ ";
    color: var(--green);
    font-weight: 700
}

.inc a {
    color: var(--ink)
}

.ad {
    display: flex;
    gap: 14px;
    padding: 18px 16px 18px;
    border-top: 1px solid var(--line);
    cursor: pointer
}

.ad:first-of-type {
    border: 0
}

.ad input {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--mut);
    border-radius: 4px;
    flex: none;
    margin: 0;
    cursor: pointer;
    background: var(--card)
}

.ad input:checked {
    background: var(--ink);
    border-color: var(--ink);
    box-shadow: inset 0 0 0 3px var(--card)
}

.ad input:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px
}

.ad div {
    flex: 1
}

.ad b {
    display: block
}

.ad small {
    color: var(--mut);
    font-size: 13px
}

.ad .p {
    font-size: 13.5px;
    color: var(--mut);
    white-space: nowrap
}

.f {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 16px;
    margin-top: 20px
}

.f label {
    font-weight: 700;
    font-size: 13.5px
}

.f label span {
    font-weight: 400;
    color: var(--mut)
}

.f input,
.f select,
.f textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: var(--card);
    color: var(--ink);
    height: 48px
}

.f textarea {
    height: 96px;
    resize: vertical
}

.note {
    position: relative;
    padding-left: 24px;
    font-size: 13px;
    color: var(--mut);
    margin: 20px 0
}

.note:before {
    content: "i";
    position: absolute;
    left: 0;
    top: 3px;
    width: 14px;
    height: 14px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 10px;
    text-align: center;
    line-height: 13px
}

.btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font: 700 15px "Source Sans 3", sans-serif;
    cursor: pointer;
    color: var(--ink)
}

.btn.o {
    background: var(--card);
    border: 1.5px solid var(--ink)
}

.btn.a {
    background: var(--amber);
    border: 0
}

.ctr {
    text-align: center;
    font-size: 13px;
    color: var(--mut);
    margin: 12px 0 0
}

aside .card {
    margin-bottom: 16px;
    padding: 28px
}

aside h2 {
    margin-bottom: 12px
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 14px;
    color: var(--mut);
    padding: 5px 0
}

.row span:last-child {
    color: var(--ink);
    white-space: nowrap
}

.tot {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700
}

.tot .num {
    font-size: 30px
}

.pay {
    background: var(--tan);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--mut);
    margin: 16px 0
}

.pill {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    margin: 0 6px 8px 0
}

.pill:before {
    content: "✓ ";
    color: var(--green)
}

#done,
.done2 {
    display: none;
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--tan);
    border-radius: 8px;
    font-weight: 600;
    color: var(--green)
}

@media(max-width:900px) {
    main > aside {
        position: static
    }

    main {
        grid-template-columns: 1fr;
        gap: 0
    }

    .rv {
        display: none
    }

    .card .btn.o,
    .card .btn.o+.ctr,
    #done.show {
        display: none !important
    }

    .done2.show {
        display: block
    }
}

@media(max-width:600px) {
    main {
        padding: 24px 12px 40px
    }

    .card {
        padding: 20px;
        margin-bottom: 20px
    }

    h1 {
        font-size: 22px
    }

    h2 {
        font-size: 24px
    }

    .top {
        flex-direction: column;
        gap: 0
    }

    .top>div {
        display: contents
    }

    .top h1 {
        order: 1
    }

    .lnk {
        order: 2;
        padding: 8px 0 4px
    }

    .top #bill {
        order: 3
    }

    .car {
        flex-wrap: wrap;
        gap: 14px 16px;
        padding: 14px
    }

    .th {
        width: 92px;
        height: 64px
    }

    .ci {
        flex: 1 1 calc(100% - 114px)
    }

    .qty {
        margin-right: auto
    }

    .pr {
        flex: 1
    }

    .inc,
    .f,
    #dp {
        grid-template-columns: 1fr
    }

    .ad {
        display: grid;
        grid-template-columns: 22px 1fr;
        gap: 2px 14px;
        padding: 18px 4px
    }

    .ad>div {
        display: contents
    }

    .ad input {
        grid-area: 1/1/4/2;
        margin-top: 2px
    }

    .ad b {
        grid-area: 1/2
    }

    .ad .p {
        grid-area: 2/2;
        text-align: right !important;
        font-size: 13px
    }

    .ad small {
        grid-area: 3/2;
        margin-top: 4px
    }

    .row {
        font-size: 14px
    }

    .tot .num {
        font-size: 30px
    }
}

@media(max-width:560px) {
    .car {
        flex-wrap: wrap
    }

    .f,
    .inc {
        grid-template-columns: 1fr
    }

    .card {
        padding: 20px
    }

    .ad {
        flex-wrap: wrap
    }
}
