:root {
    --yellow-1: #ffe995;
    --yellow-2: #ffdb67;
    --yellow-3: #ffc94d;
    --cream: #fff9e9;
    --cream-deep: #f7e8c5;
    --brown: #4c280f;
    --brown-soft: #83501f;
    --blue: #1872c8;
    --blue-dark: #0b4f9b;
    --blue-light: #54a9ec;
    --green: #58bd2b;
    --green-dark: #248b20;
    --red: #dc4f3c;
    --purple: #6c63aa;
    --wood: #e9a448;
    --wood-dark: #ad6122;
    --shadow: 0 7px 0 rgba(115, 65, 20, 0.2), 0 12px 24px rgba(98, 56, 16, 0.16);
    --shadow-blue: 0 6px 0 var(--blue-dark), 0 10px 18px rgba(23, 70, 124, 0.25);
    --radius: 28px;
    --safe-top: max(14px, env(safe-area-inset-top));
    --safe-right: max(16px, env(safe-area-inset-right));
    --safe-bottom: max(14px, env(safe-area-inset-bottom));
    --safe-left: max(16px, env(safe-area-inset-left));
    color-scheme: light;
    font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    color: var(--brown);
    background-color: var(--yellow-2);
    background-image:
        linear-gradient(90deg, rgba(255,255,255,.2) 50%, transparent 50%),
        linear-gradient(rgba(255,255,255,.18) 50%, transparent 50%);
    background-size: 96px 96px;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--blue-dark);
}

:focus-visible {
    outline: 5px solid #ffed53;
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

.button {
    position: relative;
    display: inline-flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    border: 3px solid rgba(255,255,255,.72);
    border-radius: 20px;
    color: white;
    font-size: clamp(1.05rem, 1.7vw, 1.45rem);
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    text-shadow: 0 2px 0 rgba(0,0,0,.18);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.button:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px);
}

.button:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: none;
}

.button:disabled {
    cursor: default;
}

.button-primary {
    background: linear-gradient(#3195e3, var(--blue));
    box-shadow: var(--shadow-blue);
}

.button-green {
    background: linear-gradient(#78d947, var(--green));
    box-shadow: 0 6px 0 var(--green-dark), 0 10px 18px rgba(36, 139, 32, .2);
}

.button-cream {
    color: var(--blue-dark);
    background: linear-gradient(#fffef7, #f5e8c8);
    border-color: white;
    box-shadow: 0 6px 0 #c7995d, 0 10px 18px rgba(113, 65, 20, .18);
    text-shadow: none;
}

.button-muted,
.button-muted:disabled {
    color: #755c47;
    background: #e7d8ba;
    border-color: #f6ecd6;
    box-shadow: 0 5px 0 #b99a6c;
    text-shadow: none;
}

.button-small {
    min-height: 46px;
    padding: 8px 22px;
    border-radius: 15px;
    font-size: 1.05rem;
}

.icon-button {
    display: inline-grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 4px solid rgba(255,255,255,.75);
    border-radius: 20px;
    background: linear-gradient(#8079c0, var(--purple));
    box-shadow: 0 6px 0 #423c7d, 0 9px 16px rgba(62, 48, 104, .24);
    color: #322248;
    font-size: 2.25rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
}

.icon-button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #423c7d;
}

.paper-panel {
    border: 4px solid #e5b76f;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255,255,255,.65), transparent 45%),
        var(--cream);
    box-shadow: var(--shadow), inset 0 0 0 5px rgba(255,255,255,.65);
}

.eyebrow,
.panel-label {
    color: var(--blue-dark);
    font-size: .85rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.toast-message {
    position: fixed;
    z-index: 1000;
    top: calc(var(--safe-top) + 8px);
    left: 50%;
    width: min(90vw, 620px);
    padding: 14px 22px;
    transform: translateX(-50%);
    border: 3px solid white;
    border-radius: 17px;
    background: var(--blue);
    box-shadow: var(--shadow-blue);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    transition: opacity .25s, transform .25s;
}

.toast-message.toast-success {
    background: var(--green);
    box-shadow: 0 6px 0 var(--green-dark);
}

.toast-message.is-leaving {
    opacity: 0;
    transform: translate(-50%, -18px);
}

dialog {
    width: min(92vw, 580px);
    max-height: 90dvh;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
}

dialog::backdrop {
    background: rgba(49, 32, 26, .58);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.settings-panel,
.how-to-panel {
    position: relative;
    max-height: 88dvh;
    padding: 32px;
    overflow-y: auto;
    text-align: center;
}

.settings-panel h2,
.how-to-panel h2 {
    margin: 5px 0 24px;
    font-size: clamp(2rem, 6vw, 3rem);
}

.dialog-close {
    position: absolute;
    z-index: 2;
    top: -18px;
    right: -16px;
    width: 54px;
    height: 54px;
    border-width: 3px;
    border-radius: 17px;
    color: white;
    font-size: 2rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 14px 0 26px;
    padding: 17px;
    border: 2px solid #e4c797;
    border-radius: 18px;
    background: white;
    text-align: left;
}

.setting-row span {
    display: grid;
    gap: 3px;
}

.setting-row small {
    color: #80694f;
}

.setting-row input {
    width: 30px;
    height: 30px;
    accent-color: var(--blue);
}

.how-to-list {
    display: grid;
    gap: 12px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.how-to-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #fff3cf;
}

.how-to-list li > span {
    display: grid;
    flex: 0 0 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 1.25rem;
    font-weight: 900;
}

.how-to-list li div {
    display: grid;
    gap: 2px;
}

.how-to-list small {
    color: #755e45;
}

/* Splash */
.splash-screen {
    position: relative;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: var(--safe-top) var(--safe-right) calc(170px + var(--safe-bottom)) var(--safe-left);
    overflow: hidden;
}

.splash-screen::before {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 37%, rgba(255,255,255,.62), transparent 37%);
    content: "";
    pointer-events: none;
}

.splash-screen > .settings-button {
    position: absolute;
    z-index: 3;
    top: var(--safe-top);
    right: var(--safe-right);
}

.splash-content {
    position: relative;
    z-index: 2;
    display: grid;
    width: min(760px, 85vw);
    justify-items: center;
    gap: 20px;
    text-align: center;
}

.brand-lockup-large {
    position: relative;
    width: min(690px, 84vw);
    padding: 22px 50px 24px;
    transform: rotate(-1deg);
    border: 8px solid #f7f3df;
    border-radius: 42% 51% 45% 48% / 34% 43% 41% 46%;
    background: linear-gradient(#2b83d1, #0b58a5);
    box-shadow: 0 10px 0 #0a4381, 0 16px 30px rgba(52, 42, 24, .28), inset 0 4px 0 rgba(255,255,255,.35);
}

.brand-lockup-large h1 {
    display: grid;
    margin: 0;
    line-height: .87;
    text-shadow: 0 5px 0 rgba(70, 38, 10, .35);
}

.brand-lockup-large h1 span {
    color: #ffc928;
    font-size: clamp(4rem, 10vw, 7.5rem);
    letter-spacing: -.07em;
    -webkit-text-stroke: 3px #9b5710;
}

.brand-lockup-large h1 strong {
    color: white;
    font-size: clamp(2.7rem, 7vw, 5.3rem);
    letter-spacing: -.04em;
    -webkit-text-stroke: 2px #d3c4ab;
}

.chef-hat {
    position: absolute;
    top: -59px;
    left: 46px;
    color: white;
    font-size: 7rem;
    filter: drop-shadow(0 5px 0 #d5c8af);
}

.brand-spatula {
    position: absolute;
    right: 27px;
    bottom: 24px;
    transform: rotate(-21deg);
    color: #ffb52a;
    font-size: 4rem;
}

.splash-tagline {
    margin: -7px 0 0;
    color: #6f421d;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 800;
}

.button-play {
    width: min(470px, 76vw);
    min-height: 88px;
    border-radius: 27px;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
}

.splash-content > .button-cream {
    min-width: min(360px, 72vw);
}

.splash-counter {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 130px;
    border-top: 10px solid #bb6c27;
    background:
        linear-gradient(90deg, transparent, rgba(125,58,12,.12), transparent),
        linear-gradient(#df8f37, #bc6728);
    box-shadow: 0 -8px 20px rgba(118, 64, 21, .2);
}

.splash-counter span:not(.counter-board) {
    position: absolute;
    bottom: 18px;
    font-size: clamp(4rem, 10vw, 7rem);
    filter: drop-shadow(0 7px 2px rgba(85, 39, 8, .22));
}

.decor-tomato { right: 15%; }
.decor-cheese { left: 10%; }
.decor-egg { right: 3%; }

.splash-decor-left {
    position: absolute;
    z-index: 1;
    bottom: 105px;
    left: max(8px, 2vw);
    display: grid;
    font-size: clamp(4rem, 8vw, 7rem);
    filter: drop-shadow(0 6px 2px rgba(85, 39, 8, .2));
}

/* Auth */
.auth-screen {
    position: relative;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: calc(var(--safe-top) + 30px) var(--safe-right) calc(var(--safe-bottom) + 30px) var(--safe-left);
}

.auth-screen::after {
    position: fixed;
    right: 5vw;
    bottom: 2vh;
    content: "🍞  🧀";
    font-size: clamp(3.5rem, 9vw, 7rem);
    filter: drop-shadow(0 6px 2px rgba(85, 39, 8, .15));
}

.auth-screen > .home-button {
    position: absolute;
    z-index: 2;
    top: var(--safe-top);
    left: var(--safe-left);
    color: #5b3b5b;
    background: var(--cream);
    box-shadow: 0 6px 0 #bd9157;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(500px, 92vw);
    padding: clamp(25px, 5vw, 42px);
    text-align: center;
}

.mini-brand {
    display: inline-block;
    margin: -73px auto 26px;
    padding: 14px 25px;
    transform: rotate(-2deg);
    border: 5px solid white;
    border-radius: 24px;
    background: var(--blue);
    box-shadow: 0 6px 0 var(--blue-dark);
    color: white;
    font-size: 1.55rem;
    font-weight: 900;
}

.mini-brand span {
    color: #ffcf29;
}

.auth-card h1 {
    margin: 4px 0 22px;
    font-size: clamp(2.1rem, 6vw, 3.2rem);
}

.auth-form {
    display: grid;
    gap: 17px;
    text-align: left;
}

.auth-form label {
    display: grid;
    gap: 7px;
    font-weight: 900;
}

.auth-form input {
    width: 100%;
    min-height: 58px;
    padding: 10px 15px;
    border: 3px solid #d5ae70;
    border-radius: 15px;
    background: white;
    color: var(--brown);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: inset 0 3px 0 #f1e4cf;
}

.auth-form input:focus {
    border-color: var(--blue);
    outline: 4px solid rgba(49, 149, 227, .22);
}

.form-error {
    padding: 10px 13px;
    border: 2px solid #e7a397;
    border-radius: 13px;
    background: #ffe0db;
    color: #9a2822;
    font-weight: 800;
}

.field-help {
    margin: -7px 0 1px;
    color: #755e45;
    font-size: .9rem;
}

.auth-switch {
    margin: 25px 0 0;
    font-weight: 700;
}

.auth-switch a {
    font-weight: 900;
}

/* Shared app chrome */
.app-screen {
    position: relative;
    display: grid;
    min-height: 100dvh;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.top-bar {
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 14px;
}

.top-bar .home-button {
    color: #5b3b5b;
    background: var(--cream);
    box-shadow: 0 6px 0 #bd9157;
}

.brand-lockup-small {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 27px;
    border: 5px solid white;
    border-radius: 24px 24px 29px 29px;
    background: linear-gradient(#2b83d1, #0b58a5);
    box-shadow: 0 6px 0 var(--blue-dark), 0 10px 19px rgba(23,70,124,.2);
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    font-weight: 900;
    transform: rotate(-1deg);
}

.brand-lockup-small span {
    color: #ffcd28;
    text-shadow: 0 3px 0 #975116;
}

.brand-lockup-small strong {
    color: white;
    text-shadow: 0 3px 0 rgba(0,0,0,.23);
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.coin-pill {
    display: flex;
    min-width: 118px;
    height: 62px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 7px 18px;
    border: 4px solid white;
    border-radius: 19px;
    background: var(--cream);
    box-shadow: 0 6px 0 #c39456;
    color: var(--brown);
    font-size: 1.75rem;
}

.coin-pill img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.top-bar .icon-button {
    width: 62px;
    height: 62px;
}

.wood-sign {
    position: relative;
    z-index: 2;
    display: flex;
    width: min(780px, 87%);
    min-height: 82px;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: -50px auto 0;
    padding: 10px 32px;
    border: 4px solid #cc7c2f;
    border-radius: 22px;
    background:
        repeating-linear-gradient(5deg, rgba(120,63,19,.08) 0 2px, transparent 2px 21px),
        linear-gradient(#f5bc62, #de9140);
    box-shadow: 0 7px 0 #a95e23, 0 10px 18px rgba(87, 50, 14, .2), inset 0 3px 0 rgba(255,255,255,.35);
}

.wood-sign h1 {
    margin: 0;
    color: #5b2a0b;
    font-size: clamp(2rem, 4.8vw, 3.7rem);
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 0 rgba(255,235,176,.55);
}

.wood-sign > span {
    color: #fff2d2;
    font-size: 2.3rem;
    text-shadow: 0 3px 0 #bd6e2b;
}

.secret-mark {
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: #fff2d2;
    font-size: 2.3rem;
    line-height: 1;
    text-shadow: 0 3px 0 #bd6e2b;
    cursor: pointer;
    touch-action: manipulation;
}

.secret-mark.is-tapped {
    animation: secret-wiggle .35s ease;
}

.secret-whisper {
    margin: -8px 0 10px;
    color: #6d4c83;
    font-size: .88rem;
    font-weight: 900;
    text-align: center;
}

.secret-whisper:empty {
    display: none;
}

.secret-recipe-panel {
    position: relative;
    display: grid;
    justify-items: center;
    padding: 30px;
    text-align: center;
}

.secret-pot {
    font-size: 5rem;
    filter: drop-shadow(0 7px 2px rgba(78, 44, 16, .2));
}

.secret-recipe-panel h2 {
    margin: 6px 0 10px;
    color: #5f3b78;
    font-size: clamp(2rem, 7vw, 3.2rem);
    line-height: 1;
}

.secret-recipe-panel > p {
    max-width: 450px;
    margin: 0 0 17px;
    color: #705944;
    font-weight: 700;
    line-height: 1.4;
}

.secret-recipe-card {
    display: grid;
    width: 100%;
    gap: 5px;
    margin-bottom: 22px;
    padding: 16px;
    transform: rotate(-1deg);
    border: 3px dashed #7c5b93;
    border-radius: 17px;
    background: #eee1f3;
    color: #58396d;
}

.secret-recipe-card strong {
    font-size: 1.25rem;
}

@keyframes secret-wiggle {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-14deg) scale(1.18); }
    70% { transform: rotate(12deg) scale(1.15); }
}

/* Library and store */
.library-screen,
.store-screen {
    overflow-x: hidden;
}

.library-board {
    width: min(1060px, 88vw);
    align-self: center;
    justify-self: center;
    padding: 25px clamp(18px, 3vw, 38px) 28px;
    border-color: var(--blue-dark);
    box-shadow: 0 9px 0 var(--blue-dark), 0 16px 28px rgba(67,55,34,.21), inset 0 0 0 5px rgba(255,255,255,.7);
}

.welcome-line,
.store-intro {
    margin: 12px 0 16px;
    color: #715238;
    font-weight: 800;
    text-align: center;
}

.recipe-grid {
    display: grid;
    gap: 17px;
}

.recipe-grid-library {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recipe-card {
    position: relative;
    display: grid;
    min-width: 0;
    justify-items: center;
    align-content: start;
    padding: 12px 12px 14px;
    border: 3px solid #ecc987;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 40%, rgba(255,215,82,.27), transparent 42%),
        #fffdf4;
    box-shadow: 0 5px 0 #d1a15d, inset 0 0 0 3px white;
    text-align: center;
}

.recipe-art-wrap {
    position: relative;
    width: 100%;
}

.recipe-art {
    width: 100%;
    height: clamp(95px, 13vw, 170px);
    object-fit: contain;
}

.recipe-card h2 {
    margin: 1px 0 4px;
    font-size: clamp(1rem, 2.2vw, 1.55rem);
    line-height: 1.05;
}

.recipe-card .star-row {
    display: flex;
    gap: 3px;
    margin: 2px 0 10px;
    color: #c9b28e;
    font-size: clamp(1.25rem, 2.6vw, 1.8rem);
    line-height: 1;
    text-shadow: 0 2px 0 #9c7748;
}

.recipe-card .star-earned {
    color: #ffc51e;
}

.recipe-card .button {
    width: min(90%, 180px);
    margin-top: auto;
}

.soon-ribbon {
    position: absolute;
    right: -9px;
    bottom: 5px;
    padding: 5px 9px;
    transform: rotate(-4deg);
    border-radius: 8px;
    background: var(--purple);
    color: white;
    font-size: .65rem;
    font-weight: 900;
    text-transform: uppercase;
}

.recipe-coming-soon .recipe-art {
    opacity: .76;
}

.store-cta,
.my-recipes-cta {
    z-index: 3;
    min-width: min(90vw, 370px);
    justify-self: center;
}

.store-content {
    display: grid;
    width: min(1180px, 96vw);
    align-self: center;
    justify-self: center;
}

.wood-sign-wide {
    width: min(760px, 85vw);
    margin: 0 auto 5px;
}

.recipe-grid-store {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-card {
    min-height: 260px;
    border-width: 4px;
}

.store-card .recipe-art {
    height: clamp(90px, 13vh, 145px);
}

.free-badge {
    position: absolute;
    z-index: 2;
    top: 9px;
    left: 8px;
    padding: 6px 9px;
    transform: rotate(-10deg);
    border: 3px solid white;
    border-radius: 15px;
    background: var(--green);
    box-shadow: 0 4px 0 var(--green-dark);
    color: white;
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.price-line {
    display: flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 2px 0 9px;
    color: #7a5b3c;
    font-size: .92rem;
    font-weight: 700;
}

.price-line img {
    width: 27px;
    height: 27px;
}

.price-line strong {
    color: var(--brown);
    font-size: 1.35rem;
}

.store-status {
    min-height: 24px;
    margin: 11px 0 0;
    color: var(--blue-dark);
    font-weight: 900;
    text-align: center;
}

.store-status.is-error {
    color: #a72e26;
}

.store-card.just-bought {
    animation: card-celebrate .55s ease;
}

@keyframes card-celebrate {
    0%, 100% { transform: rotate(0) scale(1); }
    35% { transform: rotate(-2deg) scale(1.05); }
    70% { transform: rotate(2deg) scale(1.04); }
}

/* Non-playable recipe */
.coming-soon-screen {
    position: relative;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: calc(var(--safe-top) + 40px) var(--safe-right) calc(var(--safe-bottom) + 35px) var(--safe-left);
}

.coming-soon-screen > .home-button,
.coming-soon-screen > .settings-button {
    position: absolute;
    top: var(--safe-top);
}

.coming-soon-screen > .home-button {
    left: var(--safe-left);
    color: #5b3b5b;
    background: var(--cream);
    box-shadow: 0 6px 0 #bd9157;
}

.coming-soon-screen > .settings-button {
    right: var(--safe-right);
}

.coming-soon-card {
    display: grid;
    width: min(540px, 90vw);
    justify-items: center;
    padding: 30px;
    text-align: center;
}

.coming-soon-card img {
    width: min(280px, 60vw);
    height: 210px;
    object-fit: contain;
}

.coming-soon-card h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 7vw, 3.2rem);
}

.coming-soon-card p {
    max-width: 420px;
    margin: 0 0 22px;
    color: #755e45;
    font-weight: 700;
    line-height: 1.45;
}

@media (max-width: 800px) {
    .top-bar {
        grid-template-columns: auto 1fr auto;
    }

    .brand-lockup-small {
        justify-self: center;
        padding: 9px 17px;
    }

    .coin-pill {
        min-width: 91px;
        padding: 6px 10px;
        font-size: 1.35rem;
    }

    .coin-pill img {
        width: 31px;
        height: 31px;
    }

    .recipe-grid-library,
    .recipe-grid-store {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .library-board {
        width: 96vw;
        margin-top: 25px;
    }

    .wood-sign {
        margin-top: -58px;
    }

    .wood-sign-wide {
        margin-top: 5px;
    }
}

@media (max-width: 540px) {
    :root {
        --radius: 22px;
    }

    body {
        background-size: 72px 72px;
    }

    .icon-button {
        width: 56px;
        height: 56px;
        border-radius: 17px;
        font-size: 1.8rem;
    }

    .splash-screen {
        padding-bottom: calc(125px + var(--safe-bottom));
    }

    .splash-decor-left {
        display: none;
    }

    .brand-lockup-large {
        padding: 20px 25px 22px;
        border-width: 6px;
    }

    .chef-hat {
        top: -34px;
        left: 22px;
        font-size: 4.5rem;
    }

    .brand-spatula {
        right: 13px;
        font-size: 2.8rem;
    }

    .splash-counter {
        height: 100px;
    }

    .decor-tomato { right: 32%; }
    .decor-cheese { left: 2%; }
    .decor-egg { right: 1%; }

    .top-bar {
        align-items: center;
    }

    .brand-lockup-small {
        display: grid;
        gap: 0;
        padding: 5px 12px;
        font-size: 1.05rem;
        line-height: 1;
        text-align: center;
    }

    .top-actions .settings-button,
    .top-bar .home-button {
        width: 52px;
        height: 52px;
    }

    .coin-pill {
        min-width: 75px;
        height: 49px;
        border-width: 3px;
        border-radius: 15px;
        box-shadow: 0 4px 0 #c39456;
        font-size: 1.1rem;
    }

    .coin-pill img {
        width: 25px;
        height: 25px;
    }

    .top-actions {
        gap: 6px;
    }

    .recipe-grid-library,
    .recipe-grid-store {
        grid-template-columns: 1fr;
    }

    .library-board {
        margin-top: 34px;
        padding: 22px 14px;
    }

    .wood-sign {
        width: 96%;
        min-height: 66px;
        padding: 8px 14px;
    }

    .wood-sign > span {
        display: none;
    }

    .recipe-card {
        grid-template-columns: 110px 1fr;
        grid-template-rows: auto auto 1fr;
        align-items: center;
        justify-items: start;
        gap: 0 10px;
        text-align: left;
    }

    .recipe-art-wrap,
    .recipe-card > .recipe-art {
        grid-row: 1 / 4;
        width: 110px;
    }

    .recipe-art {
        height: 110px;
    }

    .recipe-card h2 {
        align-self: end;
    }

    .recipe-card .star-row {
        margin-bottom: 7px;
    }

    .recipe-card .button {
        width: 100%;
        max-width: 190px;
        justify-self: start;
    }

    .store-card {
        min-height: 135px;
    }

    .store-card .recipe-art {
        height: 110px;
    }

    .store-card .price-line {
        justify-content: start;
    }

    .free-badge {
        left: -5px;
    }
}

@media (max-height: 760px) and (orientation: landscape) {
    .splash-screen {
        padding-bottom: calc(95px + var(--safe-bottom));
    }

    .splash-content {
        gap: 11px;
    }

    .brand-lockup-large {
        width: min(490px, 62vw);
        padding: 12px 35px 15px;
    }

    .brand-lockup-large h1 span { font-size: clamp(3rem, 8vh, 5rem); }
    .brand-lockup-large h1 strong { font-size: clamp(2rem, 5.5vh, 3.6rem); }
    .chef-hat { top: -35px; font-size: 4.4rem; }
    .brand-spatula { font-size: 2.5rem; }
    .button-play { min-height: 65px; font-size: 2.2rem; }
    .splash-content > .button-cream { min-height: 50px; }
    .splash-counter { height: 80px; }
    .splash-counter span:not(.counter-board) { bottom: 2px; font-size: 4rem; }
    .splash-decor-left { display: none; }

    .library-board {
        padding-top: 18px;
    }

    .recipe-art {
        height: min(16vh, 110px);
    }

    .recipe-card {
        padding-top: 7px;
        padding-bottom: 8px;
    }

    .recipe-card .star-row {
        margin-bottom: 6px;
    }

    .store-card {
        min-height: 205px;
    }

    .store-card .recipe-art {
        height: 11vh;
    }

    .store-intro {
        margin: 5px 0 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
