
:root {
    --bg: #fff6e5;
    --card: #fff;
    --ink: #2b1a12;
    --mut: #8a7468;
    --red: #e8431a;
    --yel: #ffc21a;
    --grn: #1f9d55;
    --line: #f0e2c8;
    --sh: 0 6px 20px rgba(120, 60, 10, .12);

    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1c1410;
        --card: #2a1e18;
        --ink: #fff1e0;
        --mut: #b99f90;
        --line: #3d2c23;
        --sh: 0 6px 20px rgba(0, 0, 0, .4);

        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #1c1410;
    --card: #2a1e18;
    --ink: #fff1e0;
    --mut: #b99f90;
    --line: #3d2c23;
    --sh: 0 6px 20px rgba(0, 0, 0, .4);

    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Poppins, system-ui, sans-serif;
    min-height: 100vh;
}

h1,
h2,
h3,
.logo,
.big {
    font-family: 'Baloo 2', Poppins, sans-serif;
    margin: 0;
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
}

.top {
    background: linear-gradient(135deg, var(--red), #ff7a1a);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: var(--sh);
}

.logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .5px;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}

.logo span {
    color: var(--yel);
}

.top .sp {
    flex: 1;
}

.top a,
.top button {
    color: #fff;
    background: rgba(255, 255, 255, .2);
    padding: 8px 14px;
    border-radius: 99px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.btn {
    background: var(--red);
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 0 #a82f0e;
    transition: .1s;
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #a82f0e;
}

.btn.g {
    background: var(--grn);
    box-shadow: 0 4px 0 #136b3a;
}

.btn.y {
    background: var(--yel);
    color: #2b1a12;
    box-shadow: 0 4px 0 #c18f00;
}

.btn.o {
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    border: 2px solid var(--line);
}

.btn:disabled {
    opacity: .4;
    pointer-events: none;
}

.home {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.home h1 {
    font-size: clamp(44px, 9vw, 84px);
    color: var(--red);
    line-height: 1;
}

.home h1 span {
    color: var(--yel);
    text-shadow: 0 3px 0 #c18f00;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 34px;
}

.hc {
    background: var(--card);
    border-radius: 22px;
    padding: 28px 18px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--sh);
    border: 2px solid transparent;
    transition: .2s;
}

.hc:hover {
    transform: translateY(-6px) rotate(-1deg);
    border-color: var(--red);
}

.hc i {
    font-style: normal;
    font-size: 56px;
    display: block;
}

.hc h3 {
    font-size: 26px;
    margin-top: 6px;
}

.hc p {
    color: var(--mut);
    margin: 6px 0 0;
    font-size: 14px;
}

.note {
    color: var(--mut);
    font-size: 13px;
    margin-top: 28px;
}

/* kiosk */

.welcome {
    min-height: calc(100vh - 62px);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 194, 26, .35), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(232, 67, 26, .25), transparent 45%);
}

.welcome .em {
    font-size: 90px;
    animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
    50% {
        transform: translateY(-14px) rotate(6deg);
    }
}

.welcome h1 {
    font-size: clamp(34px, 7vw, 64px);
}

.mode {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 26px;
}

.mode button {
    background: var(--card);
    color: var(--ink);
    border-radius: 22px;
    padding: 26px 34px;
    box-shadow: var(--sh);
    font-size: 20px;
    font-weight: 600;
    border: 3px solid transparent;
}

.mode button:hover {
    border-color: var(--red);
}

.mode b {
    display: block;
    font-size: 46px;
}

/* shop */

.shop {
    display: grid;
    grid-template-columns: 150px 1fr 340px;
    gap: 16px;
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.cats {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat {
    background: var(--card);
    color: var(--ink);
    padding: 12px 8px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: var(--sh);
    border: 2px solid transparent;
}

.cat b {
    display: block;
    font-size: 26px;
}

.cat.on {
    background: var(--red);
    color: #fff;
}

.menu h2 {
    font-size: 34px;
    margin-bottom: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.item {
    background: var(--card);
    border-radius: 20px;
    padding: 14px;
    box-shadow: var(--sh);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    transition: .15s;
}

.item:hover {
    transform: translateY(-4px);
}

.item .pic {
    height: 96px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 58px;
    background: linear-gradient(135deg, #ffe3b0, #ffc9a0);
}

.item h4 {
    margin: 6px 0 0;
    font-size: 15px;
}

.item p {
    margin: 0;
    color: var(--mut);
    font-size: 12px;
    flex: 1;
}

.item .pr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.item .pr b {
    font-size: 18px;
    color: var(--red);
}

.add {
    background: var(--yel);
    color: #2b1a12;
    padding: 8px 14px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 13px;
}

.add:active {
    transform: scale(.92);
}

.tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 99px;
    font-weight: 600;
}

.cart {
    position: sticky;
    top: 78px;
    background: var(--card);
    border-radius: 22px;
    box-shadow: var(--sh);
    padding: 16px;
    max-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
}

.cart h3 {
    font-size: 24px;
}

.lines {
    overflow: auto;
    flex: 1;
    margin: 8px 0;
    min-height: 60px;
}

.empty {
    text-align: center;
    color: var(--mut);
    padding: 30px 0;
}

.empty b {
    font-size: 44px;
    display: block;
}

.ln {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
}

.ln .n {
    flex: 1;
    font-weight: 500;
}

.ln small {
    color: var(--mut);
    display: block;
}

.q {
    display: flex;
    align-items: center;
    gap: 6px;
}

.q button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--line);
    color: var(--ink);
    font-weight: 700;
}

.q button.rm {
    background: #fde0d8;
    color: var(--red);
}

.tot {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    margin: 3px 0;
}

.tot.b {
    font-size: 22px;
    font-weight: 700;
    font-family: 'Baloo 2';
}

.fab {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: grid;
    place-items: center;
    z-index: 20;
    padding: 16px;
}

.mbox {
    background: var(--card);
    border-radius: 26px;
    padding: 26px;
    max-width: 480px;
    width: 100%;
    max-height: 92vh;
    overflow: auto;
}

.pay {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0 18px;
}

.pay button {
    background: var(--bg);
    color: var(--ink);
    padding: 14px 6px;
    border-radius: 14px;
    font-weight: 600;
    border: 3px solid transparent;
    font-size: 13px;
}

.pay b {
    display: block;
    font-size: 28px;
}

.pay .on {
    border-color: var(--red);
}

.done {
    text-align: center;
    max-width: 520px;
    margin: 30px auto;
    padding: 20px;
}

.ticket {
    background: var(--card);
    border-radius: 26px;
    box-shadow: var(--sh);
    padding: 26px;
    border-top: 12px solid var(--red);
    position: relative;
}

.ticket .num {
    font-size: 96px;
    font-weight: 800;
    color: var(--red);
    line-height: 1;
}

.pop {
    animation: pop .5s;
}

@keyframes pop {
    0% {
        transform: scale(.4);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }
}

/* kitchen */

.kit {
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    gap: 14px;
    padding: 16px;
    align-items: start;
}

.col h2 {
    font-size: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.badge {
    background: var(--red);
    color: #fff;
    border-radius: 99px;
    font-size: 15px;
    padding: 1px 12px;
}

.tk {
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--sh);
    margin-bottom: 12px;
    overflow: hidden;
    border-left: 8px solid var(--yel);
}

.tk.prep {
    border-color: var(--red);
}

.tk.late {
    border-color: #b00020;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    50% {
        box-shadow: 0 0 0 5px rgba(176, 0, 32, .25);
    }
}

.tk header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
}

.tk header b {
    font-family: 'Baloo 2';
    font-size: 26px;
}

.tk .meta {
    font-size: 12px;
    color: var(--mut);
}

.tk ul {
    margin: 0;
    padding: 0 14px 10px;
    list-style: none;
}

.tk li {
    padding: 4px 0;
    font-size: 15px;
}

.tk li b {
    background: var(--yel);
    color: #2b1a12;
    border-radius: 8px;
    padding: 1px 8px;
    margin-right: 6px;
}

.tk .acts {
    padding: 0 14px 14px;
}

.tk .btn {
    width: 100%;
    padding: 11px;
}

.stat {
    background: var(--card);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--sh);
    margin-bottom: 12px;
}

.stat .big {
    font-size: 38px;
    color: var(--red);
}

.hist div {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--line);
}

.none {
    color: var(--mut);
    text-align: center;
    padding: 30px 10px;
    background: var(--card);
    border-radius: 18px;
    border: 2px dashed var(--line);
}

/* display board */

.board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 62px);
}

.bp {
    padding: 24px;
    text-align: center;
}

.bp.s {
    background: var(--grn);
    color: #fff;
}

.bp.p {
    background: var(--card);
}

.bp h2 {
    font-size: clamp(28px, 4vw, 48px);
    margin-bottom: 16px;
}

.nums {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.nm {
    font-family: 'Baloo 2';
    font-weight: 800;
    font-size: clamp(40px, 7vw, 84px);
    background: rgba(255, 255, 255, .2);
    border-radius: 20px;
    padding: 0 24px;
    line-height: 1.3;
}

.p .nm {
    background: var(--bg);
    color: var(--red);
}

.nm.first {
    background: var(--yel);
    color: #2b1a12;
    animation: pop .6s;
    font-size: clamp(70px, 13vw, 160px);
}

@media (max-width: 1000px) {
    .shop {
        grid-template-columns: 1fr;
    }

    .cats {
        position: static;
        flex-direction: row;
        overflow: auto;
    }

    .cat {
        min-width: 96px;
    }

    .cart {
        display: none;
    }

    .fab {
        display: flex;
        position: fixed;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        left: 14px;
        right: 14px;
        justify-content: space-between;
        z-index: 9;
        padding: 16px 22px;
    }

    .kit {
        grid-template-columns: 1fr;
    }

    .board {
        grid-template-columns: 1fr;
    }

    .menu {
        padding-bottom: 70px;
    }
}
