/* ==========================================================================
   Лобби: чеки, приклеенные к серой стене
   ========================================================================== */
body.wall {
    --paper: #eeede8;
    --paper-2: #e2e1db;
    --jp: 'Noto Sans JP', 'Yu Gothic', 'Meiryo', sans-serif;
}
/* Фон из цифр, перелив и виньетка — общие: assets/bg.css */

.wall .page { max-width: 1560px; }
.wall .topline { color: rgba(241,240,235,.75); }
.wall .topline a:hover { color: #fff; }

/* Мятая бумага и рваный край (clip-path генерирует PHP) */
.receipt.rough::after, .receipt.rough::before { display: none; }
.receipt.rough {
    background:
        var(--noise),
        linear-gradient(172deg, transparent 30%, rgba(0,0,0,.035) 31%, transparent 34%),
        linear-gradient(8deg, transparent 58%, rgba(255,255,255,.4) 59%, transparent 62%),
        linear-gradient(95deg, transparent 70%, rgba(0,0,0,.03) 71%, transparent 75%),
        var(--paper);
}

.jp { font-family: var(--jp); }

/* ---------- Фото ---------- */
.photo { position: relative; background: #d9d8d2; overflow: hidden; }
.photo canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; }
.photo canvas.is-ready { opacity: 1; }
.photo .cap { position: absolute; left: 12px; bottom: 10px; color: #f4f3ee; font-size: 14px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.photo.is-missing canvas { display: none; }
.photo.is-missing::after {
    content: 'нет картинки'; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px;
    font: 500 13px var(--mono); color: var(--ink-2);
    background: radial-gradient(circle, rgba(22,22,22,.28) 1.2px, transparent 1.6px) 0 0 / 5px 5px, #dddcd6;
}

/* ---------- Дёрганье в стиле stop-motion ----------
   Каждый чек перескакивает между позами без плавности (steps), со своим ритмом (--t) и сдвигом (--d).
   Базовый наклон — --r (задаётся в разметке). */
.collage .receipt-wrap, .works > a.receipt-wrap {
    transform: rotate(var(--r, 0deg));
    animation: jitter var(--t, 2s) steps(1, end) var(--d, 0s) infinite;
}
@keyframes jitter {
    0%   { transform: translate(0, 0) rotate(var(--r, 0deg)); }
    12%  { transform: translate(2.5px, -1.5px) rotate(calc(var(--r, 0deg) + .5deg)); }
    25%  { transform: translate(-2px, 2px) rotate(calc(var(--r, 0deg) - .35deg)); }
    37%  { transform: translate(1px, 2.5px) rotate(calc(var(--r, 0deg) + .25deg)); }
    50%  { transform: translate(-2.5px, -1px) rotate(calc(var(--r, 0deg) - .5deg)); }
    62%  { transform: translate(1.5px, 1px) rotate(calc(var(--r, 0deg) + .4deg)); }
    75%  { transform: translate(0, -2.5px) rotate(calc(var(--r, 0deg) - .2deg)); }
    87%  { transform: translate(5px, 3px) rotate(calc(var(--r, 0deg) + 1.4deg)); }   /* редкий сильный рывок */
    100% { transform: translate(0, 0) rotate(var(--r, 0deg)); }
}


/* ---------- Коллаж ---------- */
.collage {
    display: grid; gap: 18px; align-items: start; margin-top: 26px;
    grid-template-columns: 1fr 1.35fr 1fr .82fr;
    grid-template-areas:
        "a b c d"
        "a b c e"
        "a b f f";
}
.collage .receipt-wrap { min-width: 0; }
.strip { display: contents; }
.strip-nav { display: none; }
.c-a { grid-area: a; margin-top: 18px; }
.c-b { grid-area: b; z-index: 2; }
.c-c { grid-area: c; margin-top: 30px; }
.c-d { grid-area: d; margin-top: 70px; }
.c-e { grid-area: e; }
.c-f { grid-area: f; z-index: 1; margin-top: -40px; }

.collage .receipt { padding: 26px 24px 30px; }

/* A — «領収書» */
.rc-title { text-align: center; line-height: 1.15; }
.rc-title .kanji { font: 700 44px/1 var(--jp); letter-spacing: .06em; display: block; }
.rc-title small { display: block; font-size: 16px; letter-spacing: .12em; margin-top: 6px; }
.items { margin: 0; padding: 0; list-style: none; font-size: 16px; text-transform: uppercase; }
.items li { display: flex; justify-content: space-between; gap: 10px; }
.items li:nth-child(odd) { opacity: .88; }
.items .total { font: 500 20px var(--mono); margin-top: 6px; }

/* B — главный чек */
.brand { display: flex; align-items: center; gap: 16px; }
.brand-mark { display: grid; gap: 5px; flex-shrink: 0; }
.brand-mark i { display: block; width: 58px; height: 15px; background: var(--ink); }
.brand-name { font: 700 clamp(30px, 3.2vw, 50px)/1 var(--sans); letter-spacing: -.03em; }
.addr { font-size: 17px; line-height: 1.45; margin-top: 16px; }
.addr b { font-weight: 600; }
.stamp-date { font-size: 20px; margin: 14px 0 12px; }
.b-photo { aspect-ratio: 4 / 5; }
.hello { text-align: center; margin-top: 18px; }
.hello h1 { margin: 0; font: 700 clamp(28px, 2.8vw, 42px)/1.08 var(--cond); text-transform: uppercase; letter-spacing: .01em; }
.hello p { margin: 10px 0 0; font-size: 17px; }
.hello .jp { font-size: 16px; color: var(--ink-2); display: block; margin-bottom: 8px; }
.b-code { margin-top: 18px; }
.b-code .barcode { height: 62px; }
.b-code .r-code { font-size: 17px; letter-spacing: .18em; color: var(--ink); }

/* C — Checkpoint */
.c-c .head { text-align: center; font-size: 20px; margin-bottom: 12px; }
.c-photo { aspect-ratio: 4 / 5; }
.c-c .note { font-size: 16px; line-height: 1.6; margin-top: 16px; }

/* D — маленький «ресторанный» */
.shop { text-align: center; }
.shop b { font: 900 clamp(18px, 1.7vw, 27px)/1.1 var(--jp); letter-spacing: -.04em; display: block; white-space: nowrap; }
.shop small { display: block; font-size: 13px; margin-top: 6px; }
.d-photo { aspect-ratio: 16 / 9; margin: 14px 0; }
.good { font-size: 18px; line-height: 1.55; }

/* E — «好きなことで» */
.love .jp { font: 500 22px/1.35 var(--jp); }
.love p { margin: 8px 0 12px; font-size: 14px; }
.love .barcode { height: 34px; width: 60%; }

/* F — широкий */
.f-photo { aspect-ratio: 21 / 8; }
.f-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 22px; margin-top: 14px; }

@media (max-width: 1180px) {
    .collage { grid-template-columns: 1fr 1fr; grid-template-areas: "b b" "a c" "d e" "f f"; }
    .c-b { max-width: 640px; justify-self: center; width: 100%; }
    .c-d, .c-f { margin-top: 0; }
}


/* ---------- Работы ---------- */
.works-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 90px 0 26px; }
.works-head h2 { margin: 0; font: 500 clamp(42px, 6vw, 88px)/.95 var(--sans); letter-spacing: -.035em; color: #fff; }
.works-head p { margin: 0; font-size: 16px; color: rgba(241,240,235,.8); max-width: 420px; }

.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 30px; align-items: start; }
.work { display: block; text-decoration: none; color: var(--ink); }
.work .num { display: flex; justify-content: space-between; font-size: 15px; }
.work h3 { margin: 12px 0 4px; font: 700 34px/1 var(--cond); text-transform: uppercase; }
.work .desc { font-size: 16px; color: var(--ink-2); margin: 0 0 14px; }
.work .items { font-size: 15px; }
.work .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.work .tags span { border: 1.5px solid var(--ink); padding: 2px 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.work .go {
    display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 13px 14px;
    background: var(--ink); color: var(--paper); font: 700 17px var(--cond); letter-spacing: .12em; text-transform: uppercase;
}
.work .go svg { transition: transform .25s; }
a.receipt-wrap { transition: transform .3s cubic-bezier(.2,.8,.2,1), filter .3s; text-decoration: none; }
@media (hover: hover) {
a.receipt-wrap:hover { animation: none; transform: rotate(0) translateY(-8px); filter: drop-shadow(0 26px 30px rgba(0,0,0,.8)) drop-shadow(0 0 1px rgba(255,255,255,.2)); }
a.receipt-wrap:hover .go svg { transform: translateX(5px); }
}
a.receipt-wrap:active { animation: none; transform: scale(.975); transition-duration: .08s; }

.work-soon {
    border: 2px dashed rgba(241,240,235,.55); min-height: 420px; display: grid; place-items: center; text-align: center;
    color: rgba(241,240,235,.85); padding: 30px;
}
.work-soon b { display: block; font: 700 34px var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.work-soon .cursor { display: inline-block; width: .6em; height: 1em; background: currentColor; vertical-align: -2px; animation: rec 1s steps(2, jump-none) infinite; }

.foot { margin-top: 80px; text-align: center; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: rgba(241,240,235,.7); }
.a-photo { aspect-ratio: 4 / 3; }
.a-top { aspect-ratio: 4 / 3; }


/* Текст прямо на поле цифр — тёмный ореол, чтобы читался */
.wall .topline, .works-head, .work-soon, .foot { text-shadow: 0 0 6px #050505, 0 0 14px #050505, 0 0 24px #050505; }
.work-soon { background: rgba(5,5,5,.55); }

/* ==========================================================================
   Телефон
   ========================================================================== */
html { -webkit-tap-highlight-color: transparent; }
a, button, label { touch-action: manipulation; }

@media (max-width: 640px) {
    .wall .page { --gutter: 16px; padding: 0 var(--gutter) calc(40px + env(safe-area-inset-bottom)); }

    /* Липкая шапка со стеклом */
    .wall .topline {
        position: sticky; top: 0; z-index: 30; margin: 0 calc(-1 * var(--gutter));
        padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px;
        background: rgba(5,5,5,.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; text-shadow: none;
    }
    .wall .topline .crumbs a { border: 1px solid rgba(241,240,235,.35); padding: 6px 10px; color: #f1f0eb; }

    .collage { display: block; margin-top: 18px; }
    .collage .receipt { padding: 22px 18px 26px; }

    /* Главный чек компактнее */
    .c-b { margin: 0 4px; }
    .brand { gap: 12px; }
    .brand-mark i { width: 40px; height: 11px; }
    .brand-mark { gap: 4px; }
    .brand-name { font-size: 34px; }
    .addr { font-size: 15px; margin-top: 12px; }
    .stamp-date { font-size: 16px; margin: 12px 0 10px; }
    .b-photo { aspect-ratio: 1 / 1; }
    .hello h1 { font-size: 31px; }
    .hello p { font-size: 15px; }
    .hello .jp { font-size: 13px; }
    .b-code .barcode { height: 46px; }
    .b-code .r-code { font-size: 13px; letter-spacing: .12em; }

    /* Лента со свайпом */
    .strip {
        display: flex; align-items: flex-start; gap: 16px;
        margin: 8px calc(-1 * var(--gutter)) 0; padding: 30px var(--gutter) 26px;
        overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter); scrollbar-width: none;
    }
    .strip::-webkit-scrollbar { display: none; }
    .strip > .receipt-wrap { flex: 0 0 min(80vw, 320px); margin-top: 0; scroll-snap-align: center; }
    .c-a .a-photo, .c-a .a-photo + p { display: none; }      /* длинный чек укорачиваем */
    .f-photo { aspect-ratio: 4 / 3; }
    .f-foot { font-size: 16px; }
    .rc-title .kanji { font-size: 38px; }
    .shop b { font-size: 24px; }

    .strip-nav {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(241,240,235,.7);
        text-shadow: 0 0 8px #050505;
    }
    .strip-count b { color: #fff; font-weight: 600; }
    .strip-dots { display: flex; gap: 6px; }
    .strip-dots i { width: 22px; height: 4px; background: rgba(241,240,235,.25); cursor: pointer; transition: background .2s, width .2s; }
    .strip-dots i.on { background: #f1f0eb; width: 34px; }
    .strip-hint { animation: hint 1.4s steps(1, end) infinite; }
    .strip.is-touched ~ .strip-nav .strip-hint { visibility: hidden; }
    @keyframes hint { 50% { transform: translateX(4px); } }

    /* Работы */
    .works-head { margin: 54px 0 18px; }
    .works-head h2 { font-size: 46px; }
    .works-head p { font-size: 14px; }
    .works { gap: 22px; }
    .work h3 { font-size: 30px; }
    .work-soon { min-height: 190px; }
    .foot { margin-top: 50px; font-size: 12px; }
}
