:root {
    --nav: #8C5A3C;
    --navb: #2C1A08;
    --bg: #F5EBDD;
    --paper: #FFF9F1;
    --paper2: #F7E9D7;
    --ink: #2C1A08;
    --accent: #C98A5A;
    --accent2: #D7A06B;
    --shadow: 0 12px 28px rgba(44, 26, 8, .10);
    --shadow2: 0 8px 18px rgba(44, 26, 8, .14);
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: 'Baloo 2', system-ui, sans-serif;
    src: url('../font/paperlogy/Paperlogy-4Regular.ttf') format('truetype');
    background: linear-gradient(180deg, #F7EBDD 0%, #F5EBDD 100%);
    color: var(--ink);
}

body:before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(44, 26, 8, .05) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
    opacity: .35;
}

/* Navbar */
@font-face {
    font-family: 'Behove';
    src: url('../font/Behove/Behove.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #8C5A3C;
    border-bottom: 3px solid #2c1a08;
    font-family: 'Behove', sans-serif;
}

.nav-left,
.nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    flex: 0;
    text-align: center;
    white-space: nowrap;
}

.logo {
    color: #EDE9E6;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    font-family: 'Behove', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #EDE9E6;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
    font-family: 'Behove', sans-serif;
}

.nav-links a:hover {
    opacity: 0.7;
}

.login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #EDE9E6 !important;
    font-family: 'Behove', sans-serif;
}

.cart-icon {
    position: relative;
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    padding: 2px 5px;
    border-radius: 50%;
    background: red;
    color: white;
    font-size: 10px;
    font-weight: bold;
    font-family: 'Behove', sans-serif;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 38px 18px 48px;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: center;
}

.intro h1 {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.0;
    margin: 0 0 14px;
}

.intro p {
    max-width: 560px;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 18px;
}

.badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 249, 241, .8);
    border: 1px solid rgba(44, 26, 8, .08);
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-family: 'Baloo 2', cursive;
    margin-bottom: 28px;
}

.board {
    position: relative;
    background: linear-gradient(180deg, var(--paper), var(--paper2));
    border: 1px solid rgba(44, 26, 8, .08);
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
}

.board:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .4), transparent 35%, rgba(44, 26, 8, .03));
    pointer-events: none;
}

.doodles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .28;
}

.doodle {
    position: absolute;
    font-size: 28px;
    animation: float 6s ease-in-out infinite;
}

.d1 {
    top: 12px;
    right: 18px
}

.d2 {
    bottom: 16px;
    left: 18px;
    animation-delay: 1s
}

.d3 {
    top: 42%;
    right: 16px;
    animation-delay: 2s
}

@keyframes float {
    50% {
        transform: translateY(-6px) rotate(-3deg)
    }
}

.form-wrap {
    background: rgba(255, 249, 241, .72);
    border: 1px solid rgba(44, 26, 8, .08);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow2);
}

.form-title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.45rem;
    margin: 0 0 10px;
}

.paper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    background: linear-gradient(180deg, #fffefb 0%, #fff8ee 100%);
    border: 1px solid rgba(44, 26, 8, .10);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(44, 26, 8, .10);
    transform-origin: center bottom;
    transition: transform .25s ease, box-shadow .25s ease;
}

.paper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(44, 26, 8, .14);
}

.paper:after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, .02), transparent 25%, rgba(0, 0, 0, .02));
    pointer-events: none;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

label {
    font-family: 'paperlogy', system-ui, sans-serif;
    src: url('../font/paperlogy/Paperlogy-4Regular.ttf') format('truetype');
    font-size: 1rem;
    font-weight: 700;
}

input,
textarea {
    font-family: 'paperlogy', system-ui, sans-serif;
    src: url('../font/paperlogy/Paperlogy-4Regular.ttf') format('truetype');
    width: 100%;
    border: 1.5px solid rgba(44, 26, 8, .14);
    border-radius: 14px;
    background: #fffdf9;
    padding: 12px 14px;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
    font-size: 15px;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(201, 138, 90, .12);
}

.handwriting {
    position: relative;
    margin-top: 16px;
    padding: 14px 16px;
    min-height: 90px;

    background: #fffaf3;
    border: 1px dashed rgba(44, 26, 8, .18);
    border-radius: 14px;

    font-family: 'Baloo 2', cursive;
    font-size: 1rem;
    line-height: 1.7;
    color: #4b2a17;

    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;

    box-shadow: 0 4px 12px rgba(44, 26, 8, .05);

    transition: .2s;
}

.ghost {
    color: #a2775d;
    opacity: .7;
    font-style: italic;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    width: 100%;
}

.btn {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition:
        transform .2s,
        box-shadow .2s,
        background .2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--nav);
    color: #fff;
    box-shadow: 0 8px 18px rgba(140, 90, 60, .25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: #7c4e33;
    box-shadow: 0 8px 18px rgba(44, 26, 8, .12);
}

.btn-secondary {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid rgba(44, 26, 8, .12);
}

.btn-secondary:hover {
    background: #fff8f1;
}

.box {
    margin-top: 30px;
    position: relative;
    background: linear-gradient(180deg, #A06A45, #7A4A2D);
    border-radius: 26px;
    padding: 22px 18px 18px;
    box-shadow: var(--shadow);
    min-height: 320px;
    overflow: hidden;
}

.box-top {
    position: relative;
    height: 18px;
    background: #6b4027;
    border-radius: 10px;
    margin-bottom: 16px;
}

.slot {
    position: absolute;
    left: 15%;
    right: 15%;
    top: 5px;
    height: 8px;
    border-radius: 999px;
    background: #2c1a08;
}

.box-body {
    position: relative;
    height: 220px;
    border-radius: 20px;
    background: linear-gradient(180deg, #9D6944, #8E5A39);
    border: 2px solid rgba(44, 26, 8, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #fff;
}

.box-body h2 {
    font-family: 'paperlogy', system-ui, sans-serif;
    src: url('../font/paperlogy/Paperlogy-4Regular.ttf') format('truetype');
    font-size: 1.55rem;
    margin: 0;
}

.box-body p {
    margin: 0;
    max-width: 220px;
    text-align: center;
    line-height: 1.6;
    opacity: .92;
}

.receipt {
    width: 110px;
    height: 84px;
    background: #fffdf8;
    border-radius: 14px;
    border: 1px solid rgba(44, 26, 8, .12);
    box-shadow: 0 10px 18px rgba(44, 26, 8, .12);
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', cursive;
    color: var(--ink);
    font-weight: 800;
}

.receipt:before,
.receipt:after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    height: 2px;
    background: rgba(44, 26, 8, .14);
    border-radius: 999px;
}

.receipt:before {
    top: 22px
}

.receipt:after {
    top: 36px
}

.slot-paper {
    position: absolute;
    left: 50%;
    top: -120px;
    transform: translateX(-50%) rotate(0deg);
    width: 220px;
    background: #fffaf3;
    border: 1px solid rgba(44, 26, 8, .12);
    border-radius: 16px;
    padding: 14px 14px 18px;
    box-shadow: 0 12px 26px rgba(44, 26, 8, .12);
    opacity: 0;
    pointer-events: none;
    white-space: pre-wrap;
    line-height: 1.6;
}

.slot-paper.fold {
    animation: foldIn .85s ease forwards;
}

@keyframes foldIn {
    0% {
        top: -120px;
        opacity: 0;
        transform: translateX(-50%) rotate(0deg) scale(1)
    }

    45% {
        top: 12px;
        opacity: 1;
        transform: translateX(-50%) rotate(-5deg) scale(.98)
    }

    72% {
        top: 122px;
        opacity: 1;
        transform: translateX(-50%) rotate(5deg) scale(.92)
    }

    100% {
        top: 150px;
        opacity: 0;
        transform: translateX(-50%) rotate(0deg) scale(.45)
    }
}

.shake {
    animation: shake .45s ease
}

@keyframes shake {

    0%,
    100% {
        transform: translateY(0)
    }

    25% {
        transform: translateY(-2px) rotate(-1deg)
    }

    50% {
        transform: translateY(0) rotate(1deg)
    }

    75% {
        transform: translateY(-1px) rotate(-.5deg)
    }
}

.success {
    margin-top: 12px;
    display: none;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(44, 26, 8, .12);
    padding: 12px 14px;
    border-radius: 14px;
    font-family: 'paperlogy', system-ui, sans-serif;
    src: url('../font/paperlogy/Paperlogy-4Regular.ttf') format('truetype');
    font-weight: 700;
    transition: .25s ease;
}

.success.show {
    display: block
}

.admin-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--ink);
    text-decoration: none;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    border-bottom: 2px solid rgba(44, 26, 8, .18);
}

.admin-link:hover {
    border-bottom-color: var(--ink)
}

.admin {
    margin-top: 38px;
    background: rgba(255, 249, 241, .78);
    border: 1px solid rgba(44, 26, 8, .08);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.admin h3 {
    font-family: 'Baloo 2', cursive;
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.admin small {
    display: block;
    margin-bottom: 10px;
    opacity: .85;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.admin-item {
    background: #fffdf8;
    border: 1px solid rgba(44, 26, 8, .1);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 6px 14px rgba(44, 26, 8, .06);
}

.admin-item .meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: .9rem;
    opacity: .8;
    margin-bottom: 8px;
}

.admin-item .msg {
    white-space: pre-wrap;
    line-height: 1.6;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: .85rem;
    background: #f0e0d1;
    padding: 4px 10px;
    border-radius: 999px;
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.mini {
    padding: 8px 12px;
    font-size: .92rem
}

.reviewed {
    opacity: .6;
    text-decoration: line-through
}

.hide {
    display: none !important
}

@media (max-width:900px) {
    .hero {
        grid-template-columns: 1fr
    }

    .box {
        min-height: auto
    }

    .box-body {
        height: 200px
    }
}

@media (max-width:640px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 14px;
    }

    .nav-center {
        position: static;
        transform: none;
    }

    .nav-links {
        justify-content: center;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .navbar {
        padding: 14px 16px
    }

    .brand {
        font-size: 24px
    }

    .nav-links a {
        font-size: 15px
    }

    .page {
        padding: 18px 14px 34px
    }

    .intro p {
        font-size: 1rem
    }

    .form-wrap,
    .board,
    .admin {
        padding: 14px
    }

    .paper {
        padding: 14px
    }

    .actions {
        flex-direction: column;
        align-items: stretch
    }

    .btn {
        width: 100%
    }
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media screen and (max-width: 768px) {

    /* NAVBAR */
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .nav-left,
    .nav-right {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 16px;
    }

    /* LOGO */
    .logo {
        width: 220px;
        height: 70px;
    }

    .logo-static,
    .logo-hover {
        width: 200px;
    }

    /* HERO */
    .hero {
        display: flex;
        flex-direction: column;

        gap: 30px;

        padding: 30px 20px 50px;

        min-height: auto;
    }

    /* BOX PUTIH */
    .hero-center {
        width: 100%;

        padding: 35px 25px;

        order: 1;

        border-radius: 20px;
    }

    .hero-center h1 {
        font-size: 48px;
        line-height: 0.95;
    }

    .hero-description {
        font-size: 15px;
    }

    /* BROWNIES KIRI */
    .hero-side:first-child {
        order: 2;
    }

    .hero-side:first-child .floating-img {
        width: 90%;

        transform: none;
    }

    /* BOX KANAN */
    .hero-side:last-child {
        order: 3;
        justify-content: center;
    }

    .hero-side:last-child .floating-img {
        width: 130%;

        max-width: 500px;

        transform: translateX(40px);
    }

    /* BUTTON */
    .btn-order {
        width: 100%;
        text-align: center;
        padding: 16px;
        font-size: 16px;
    }

    /* TICKER */
    .ticker-text span {
        font-size: 12px;
        padding: 0 25px;
    }

}