/* Arrisque & Rabisque: the site, in the app's look (app/.../ui/theme). */

@font-face {
  font-family: 'Permanent Marker';
  src: url('../fonts/permanent_marker.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Patrick Hand';
  src: url('../fonts/patrick_hand.ttf') format('truetype');
  font-display: swap;
}

:root {
  --yellow: #F9D423;
  --blue: #1E4FD6;
  --crayon-blue: #3964DB;
  --red: #EC2D2D;
  --black: #1A1A1A;
  --paper: #F3ECE0;
  --white: #FBF7F0;
  --neutral: #BDB3A3;
  --line: #C9C2B6;
  --muted: #5A544C;
  /* The cover photo's yellow, for the panels around it. */
  --panel: #F5C64A;

  --marker: 'Permanent Marker', 'Comic Sans MS', cursive;
  --hand: 'Patrick Hand', 'Comic Sans MS', cursive;
  --wrap: 1440px;
  --gutter: clamp(16px, 4vw, 58px);

  /* Paper grain: tiny specks, like the app's screens. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .29  0 0 0 0 .2  .55 0 0 0 -.24'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Yellow highlighter in crayon, behind a few words (the app's [[word]]). */
  --marker-yellow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cfilter id='c' x='-5%25' y='-20%25' width='110%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' result='n'/%3E%3CfeColorMatrix in='n' type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 1.6' result='m'/%3E%3CfeComposite in='SourceGraphic' in2='m' operator='in' result='k'/%3E%3CfeDisplacementMap in='k' in2='n' scale='3'/%3E%3C/filter%3E%3Cpath filter='url(%23c)' d='M4 30 C40 26 90 33 196 24 L195 9 C120 14 60 6 6 12 Z' fill='%23F9D423'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--black);
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.hl {
  background: var(--marker-yellow) center / 100% 100% no-repeat;
  padding: 0 .18em;
  margin: 0 -.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.red { color: var(--red); }
.blue { color: var(--blue); }

/* ---------- sketch boxes (js/sketch.js) ---------- */

[data-sketch] { position: relative; isolation: isolate; }
svg.sk {
  position: absolute; left: 0; top: 0; z-index: -1;
  overflow: visible; pointer-events: none;
}
.sk-shadow {
  transform: translate(var(--so, 4px), var(--so, 4px));
  transition: transform .16s ease;
}

/* ---------- doodles ---------- */

svg.doodle { display: block; overflow: visible; pointer-events: none; }
svg.doodle:not(.on) { visibility: hidden; }
svg.doodle path {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset var(--d, .8s) cubic-bezier(.4, 0, .2, 1) var(--t, 0s);
}
svg.doodle.on path { stroke-dashoffset: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.on { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  svg.doodle path { transition: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; padding: 10px 28px;
  font-family: var(--hand); font-size: 30px; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  transition: transform .16s ease;
}
.btn:hover { transform: translate(-2px, -2px); --so: 7px !important; }
.btn:active { transform: translate(3px, 3px); --so: 1px !important; }
.btn[disabled] { cursor: default; opacity: .55; transform: none; }
.btn-red { color: var(--white); }
.btn-small { min-height: 48px; font-size: 22px; padding: 6px 18px; }
.btn .ico { width: 28px; height: 28px; flex: none; }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper) var(--grain);
}
.top-in {
  display: flex; align-items: center; gap: 24px;
  min-height: 108px;
}
.logo { display: block; width: 150px; flex: none; padding: 8px 0 4px; }
.logo img { width: 100%; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; }
.nav a {
  position: relative; font-size: 27px; text-decoration: none; padding: 6px 0;
}
.nav a .doodle {
  position: absolute; left: -4px; right: -4px; bottom: -2px; width: calc(100% + 8px); height: 8px;
}
.nav a:not(:hover):not(.here) .doodle path { stroke-dashoffset: 1; transition-duration: .2s; transition-delay: 0s; }
.bag {
  min-height: 54px; padding: 4px 22px; font-size: 26px; margin-left: clamp(4px, 1vw, 16px); gap: 0;
}
.bag-count { display: inline-block; margin-left: .25em; }
.bag.bump .bag-count { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.6) rotate(-8deg); color: var(--red); } }
.top-rule { display: block; width: 100%; height: 6px; }

.menu-btn { display: none; margin-left: auto; width: 54px; height: 54px; padding: 12px; }
.menu-btn svg { width: 100%; height: 100%; }

/* ---------- hero ---------- */

.hero { padding: clamp(28px, 5vw, 66px) 0 clamp(48px, 7vw, 96px); }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}

.gallery { position: relative; }
.stage {
  position: relative; aspect-ratio: 740 / 638;
  border-radius: 30px; overflow: hidden;
  background: var(--panel);
}
.view {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; transform: scale(.98);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s .35s;
}
.view.here { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.view > img { width: 100%; height: 100%; object-fit: cover; }
.view-art { display: grid; place-items: center; }
.view-art > svg { width: 92%; height: 92%; }
.view-pages { background: var(--crayon-blue); }
.view-envelopes { background: var(--red); }
.view-app { background: var(--panel); }

/* The app's home screen, in a phone. */
.phone {
  position: absolute; top: 5%; left: 50%; height: 90%; aspect-ratio: 9 / 18.5;
  background: var(--black); border-radius: 34px; padding: 9px;
  box-shadow: 9px 9px 0 rgba(26, 26, 26, .28);
  transform: translateX(-50%) rotate(-4deg);
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden;
  background: var(--paper) var(--grain); border-radius: 26px; padding: 12px 10px 0;
}
.phone-logo { width: 60%; margin: 10px 0 0 7%; }
.phone-mascot { position: absolute; width: 32%; right: 6%; top: 17%; transform: scaleX(-1); }
.phone-ask { font-size: 12px; margin: 18px 0 8px 6%; }
.phone-rows { display: grid; gap: 8px; padding: 0 2px 0 4px; }
.phone-row { display: flex; align-items: center; gap: 5px; }
.phone-act {
  flex: 1; display: flex; justify-content: space-between; align-items: center;
  height: 27px; padding: 0 8px 0 10px; font-size: 14px; line-height: 1;
}
.phone-act small { font-size: 9px; }
.phone-q {
  width: 19px; height: 19px; flex: none; border: 1.4px solid var(--black); border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; background: var(--paper);
}
.phone-strip { position: absolute; left: 0; bottom: -2px; width: 100%; height: 30px; }

.gallery-doodle { position: absolute; z-index: 2; }
.gallery-doodle.g1 { width: 110px; right: -34px; top: -40px; }
.gallery-doodle.g2 { width: 44px; left: -30px; bottom: 150px; }

.thumbs {
  display: grid; grid-template-columns: 74px repeat(3, minmax(0, 1fr));
  gap: 16px; margin-top: 18px;
}
.thumb {
  height: 138px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 22px; color: var(--muted);
  transition: transform .16s ease;
}
.thumb:hover { transform: translateY(-2px); }
.thumb.here { color: var(--black); }
.thumb-cover { padding: 4px; }
.thumb-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.thumb svg.mini { width: 54px; height: 44px; }

.buy .eyebrow { font-size: 26px; margin: 0 0 12px; }
.buy h1 {
  font-family: var(--marker); font-weight: 400;
  font-size: clamp(44px, 5.2vw, 76px); line-height: 1.04; text-transform: uppercase;
  margin: 0 0 22px; letter-spacing: .01em;
}
.buy h1 .amp { display: inline-block; color: var(--red); transform: rotate(-6deg); }
.title-wrap { position: relative; }
.title-star { position: absolute; width: 74px; right: 4%; top: -18px; }
.lead { font-size: clamp(26px, 2.2vw, 32px); margin: 0 0 26px; }
.lead-line { width: min(100%, 470px); height: 14px; margin: -22px 0 26px; }
.price {
  font-family: var(--marker); font-size: 50px; line-height: 1; margin: 0 0 30px;
  display: flex; align-items: baseline; gap: 16px;
}
.price small { font-family: var(--hand); font-size: 20px; color: var(--muted); }

.perks { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 14px; }
.perks li { display: flex; align-items: center; gap: 18px; font-size: clamp(22px, 1.9vw, 28px); }
.swatch { width: 32px; height: 32px; flex: none; }

.actions { display: grid; grid-template-columns: 1fr auto; gap: 22px; margin-bottom: 26px; }
.gift[aria-pressed="true"] { color: var(--red); }
.where { padding: 16px 24px; font-size: 24px; margin: 0; }
.where a { text-decoration: none; }
.where a:hover { text-decoration: underline wavy var(--red) 2px; text-underline-offset: 5px; }

/* ---------- sections ---------- */

.section { padding: clamp(56px, 8vw, 120px) 0; position: relative; }
.section-head { max-width: 860px; margin-bottom: clamp(32px, 4vw, 56px); }
.kicker { font-size: 22px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; color: var(--muted); }
.section h2 {
  font-family: var(--marker); font-weight: 400; text-transform: uppercase;
  font-size: clamp(38px, 4.4vw, 64px); line-height: 1.06; margin: 0;
}
.h2-line { width: min(100%, 340px); height: 16px; margin: 6px 0 18px -4px; }
.section-head p { font-size: clamp(22px, 1.9vw, 27px); margin: 0; max-width: 760px; }

/* O caderno */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.principle { padding: 24px 24px 26px; min-height: 220px; }
.principle h3 { font-family: var(--marker); font-weight: 400; font-size: 30px; margin: 0 0 10px; line-height: 1.1; }
.principle p { margin: 0; font-size: 22px; }
.principle .doodle { position: absolute; width: 54px; right: 14px; top: -22px; }
.principle.on-dark { color: var(--white); }

.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  margin-top: clamp(48px, 6vw, 88px); counter-reset: step;
}
.step { position: relative; padding-left: 78px; }
.step-n {
  position: absolute; left: 0; top: -6px; width: 60px; height: 60px;
  display: grid; place-items: center;
  font-family: var(--marker); font-size: 32px;
}
.step h3 { font-family: var(--marker); font-weight: 400; font-size: 28px; margin: 0 0 6px; }
.step p { margin: 0; font-size: 22px; }
.step .doodle.arrow { position: absolute; right: -36px; top: 4px; width: 30px; transform: rotate(-90deg); }

.seals { margin-top: clamp(56px, 7vw, 100px); padding: clamp(24px, 3vw, 40px); }
.seals h3 { font-family: var(--marker); font-weight: 400; font-size: 32px; margin: 0 0 6px; }
.seals > p { margin: 0 0 28px; font-size: 24px; }
.seal-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; position: relative; }
.seal-track { position: absolute; left: 6%; right: 6%; top: 58px; height: 14px; z-index: 0; }
.seal { text-align: center; position: relative; z-index: 1; }
.seal .env { width: min(150px, 100%); margin: 0 auto 10px; display: block; }
.seal b { display: block; font-family: var(--marker); font-weight: 400; font-size: 24px; }
.seal span { font-size: 21px; color: var(--muted); }

/* Desafios */
.table-panel { color: var(--white); padding: clamp(28px, 4.5vw, 64px); position: relative; }
.table-panel .kicker { color: var(--white); opacity: .8; }
.table-panel .section-head p { color: var(--white); }
.ch-doodle { position: absolute; }
.ch-doodle.d1 { width: 120px; right: -30px; top: -50px; }
.ch-doodle.d2 { width: 90px; left: -34px; bottom: 40px; }

.picker { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.pick {
  min-height: 52px; padding: 6px 20px 6px 18px; font-size: 24px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .16s ease;
}
.pick:hover { transform: translate(-1px, -2px); }
.pick[aria-pressed="true"] { transform: translate(-2px, -3px); --so: 6px !important; }
.pick .fan { display: inline-flex; gap: 2px; }
.pick .fan i { display: block; width: 10px; height: 15px; border: 1.5px solid var(--black); border-radius: 2px; }
.pick .fan i:nth-child(1) { transform: rotate(-10deg); background: var(--yellow); }
.pick .fan i:nth-child(2) { background: var(--blue); }
.pick .fan i:nth-child(3) { transform: rotate(10deg); background: var(--red); }

.table { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(28px, 4vw, 64px); align-items: start; }
.explain h3 { font-family: var(--marker); font-weight: 400; font-size: 34px; margin: 0 0 8px; line-height: 1.1; }
.explain p { font-size: 24px; margin: 0 0 18px; }
.explain .materials { font-size: 20px; opacity: .85; }
.explain-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 26px; }
.pair { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; cursor: pointer; user-select: none; }
.pair input { position: absolute; opacity: 0; pointer-events: none; }
.pair .tick { width: 30px; height: 30px; display: grid; place-items: center; }
.pair[hidden] { display: none; }
.pair .tick svg.check { width: 20px; height: 20px; opacity: 0; transition: opacity .15s; }
.pair input:checked + .tick svg.check { opacity: 1; }
.pair input:focus-visible + .tick { outline: 3px dashed var(--yellow); outline-offset: 3px; border-radius: 6px; }
.hint { font-size: 21px; min-height: 1.4em; margin: 14px 0 0; }

.deal { position: relative; min-height: 470px; perspective: 1400px; }
.deal.kit { display: grid; gap: 14px; min-height: 0; }
.card {
  position: relative; width: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}
.card-face {
  color: var(--black);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card-big .card-face {
  min-height: 460px; padding: 22px 24px 18px;
  display: flex; flex-direction: column;
}
.card-big .card-hint { font-size: 20px; margin: 0; }
.card-big .card-text {
  flex: 1; display: grid; place-items: center; text-align: center;
  font-family: var(--marker); text-transform: uppercase;
  font-size: clamp(28px, 2.6vw, 40px); line-height: 1.32; margin: 10px 4px;
}
.card-foot { display: flex; justify-content: space-between; font-size: 17px; }
.card-kit .card-face { padding: 12px 18px 14px; min-height: 108px; }
.card-kit .card-tag { display: flex; justify-content: space-between; font-size: 16px; letter-spacing: .04em; }
.card-kit .card-text { font-family: var(--marker); font-size: 24px; line-height: 1.3; margin: 4px 0 0; }
.card-kit.swappable { cursor: pointer; }
.card-kit.swappable:hover { transform: translate(-2px, -2px) rotate(-.6deg); }
.card.light .card-face { color: var(--black); }
.card.dark .card-face { color: var(--white); }
.card-back {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform: rotateY(180deg);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card-back b {
  font-family: var(--marker); font-weight: 400; font-size: 40px; color: var(--red);
  transform: rotate(-5deg); position: relative;
}
.card-kit .card-back b { font-size: 24px; }
.card-back .doodle { position: absolute; left: -6%; right: -6%; bottom: -2px; width: 112%; height: 16px; }
.pile { position: relative; height: 460px; }
.pile-card { position: absolute; inset: 0; }
.pile-card .card-back { transform: none; }
.deal.kit .pile { height: 360px; }
.deal.kit .pile-card { inset: 110px 10% auto; height: 120px; }
.empty-card { min-height: 460px; display: grid; place-items: center; text-align: center; padding: 30px; font-size: 26px; color: var(--muted); }
.deal.kit .empty-card { min-height: 360px; }

/* O app */
.app-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.features { list-style: none; padding: 0; margin: 30px 0 34px; display: grid; gap: 18px; }
.features li { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; font-size: 23px; }
.features b { display: block; font-family: var(--marker); font-weight: 400; font-size: 25px; line-height: 1.15; }
.feat-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 22px; }
.stores { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.stores .soon { font-size: 21px; color: var(--muted); }

.timer-demo { padding: clamp(22px, 3vw, 36px); text-align: center; position: relative; }
.timer-demo .castle { font-size: 24px; margin: 0; }
.ring { position: relative; width: min(330px, 80%); aspect-ratio: 1; margin: 14px auto 10px; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring .track { stroke: var(--line); }
.ring .left { stroke: var(--crayon-blue); transition: stroke .3s; }
.ring.hurry .left { stroke: var(--red); }
.ring-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--marker); font-size: clamp(64px, 7vw, 92px); line-height: 1;
}
.ring.hurry .ring-num { color: var(--red); }
.ring.hurry .ring-num span { animation: pop 1s ease-out infinite; }
@keyframes pop { 0% { transform: scale(1.22); } 30% { transform: scale(1); } }
.timer-demo .msg { min-height: 1.4em; font-size: 24px; margin: 0 0 18px; }
.timer-demo .mascot { position: absolute; width: 130px; left: -62px; bottom: 18px; transform: scaleX(-1) rotate(-6deg); }

.days { margin-top: 30px; padding: 22px 24px; }
.days h3 { font-family: var(--marker); font-weight: 400; font-size: 26px; margin: 0 0 4px; }
.days p { margin: 0 0 14px; font-size: 20px; color: var(--muted); }
.days-grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; }
.day { aspect-ratio: 1; border: 1.6px solid var(--line); border-radius: 4px; transition: background .2s, border-color .2s, transform .2s; }
.day.painted { border-color: var(--black); animation: paint .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes paint { from { transform: scale(.5) rotate(-10deg); } }
.day.next { border-style: dashed; border-color: var(--black); cursor: pointer; }
.day.seal-day { position: relative; }
.day.seal-day::after { content: attr(data-symbol); position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.day.painted.seal-day::after { color: inherit; }

/* Onde comprar */
.shops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.shop { padding: 24px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; text-decoration: none; transition: transform .16s ease; }
a.shop:hover { transform: translate(-2px, -3px); --so: 7px !important; }
.shop b { font-family: var(--marker); font-weight: 400; font-size: 28px; line-height: 1.1; }
.shop span { font-size: 21px; }
.shop .go { margin-top: auto; font-size: 22px; }

/* Footer */
.foot { position: relative; padding: 70px 0 120px; overflow: hidden; }
.foot-in { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: end; position: relative; z-index: 1; }
.foot .logo { width: 210px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 22px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline wavy var(--crayon-blue) 2px; text-underline-offset: 5px; }
.foot small { display: block; font-size: 18px; color: var(--muted); margin-top: 14px; }
.foot-mascot { width: 170px; }
.foot-strip { position: absolute; left: 0; right: 0; bottom: -4px; width: 100%; height: 86px; }

/* ---------- bag drawer and toast ---------- */

.drawer-veil {
  position: fixed; inset: 0; z-index: 90; background: rgba(26, 26, 26, .35);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
}
.drawer {
  position: fixed; z-index: 91; top: 16px; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
  padding: 26px 26px 24px; display: flex; flex-direction: column;
  transform: translateX(calc(100% + 40px)); transition: transform .38s cubic-bezier(.2, .8, .2, 1);
}
body.bag-open .drawer { transform: none; }
body.bag-open .drawer-veil { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer h2 { font-family: var(--marker); font-weight: 400; font-size: 38px; margin: 0 0 18px; text-transform: uppercase; }
.drawer .close { position: absolute; right: 18px; top: 18px; width: 44px; height: 44px; font-size: 30px; display: grid; place-items: center; }
.bag-items { flex: 1; overflow: auto; display: grid; align-content: start; gap: 14px; }
.bag-item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 10px; }
.bag-item img { width: 76px; height: 66px; object-fit: cover; border-radius: 8px; }
.bag-item b { font-family: var(--marker); font-weight: 400; font-size: 20px; display: block; line-height: 1.15; }
.qty { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 22px; }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; font-size: 22px; }
.bag-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.bag-empty img { width: 150px; margin: 0 auto 10px; }
.bag-gift { font-size: 20px; color: var(--red); margin: 4px 0 0; }
.bag-total { display: flex; justify-content: space-between; font-size: 24px; margin: 16px 0 14px; }
.bag-total b { font-family: var(--marker); font-weight: 400; }
.drawer .btn { width: 100%; }
.drawer .note { font-size: 18px; color: var(--muted); text-align: center; margin: 10px 0 0; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 95;
  padding: 12px 22px 12px 14px; display: flex; align-items: center; gap: 12px; font-size: 23px;
  transform: translate(-50%, calc(100% + 60px)); visibility: hidden;
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), visibility 0s .35s;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.toast img { width: 58px; }

/* ---------- smaller screens ---------- */

@media (max-width: 1180px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo { width: 160px; }
  .nav a { font-size: 24px; }
}

@media (max-width: 980px) {
  .hero-in, .app-in, .table { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step .doodle.arrow { display: none; }
  .deal { max-width: 460px; }
  .deal.kit { max-width: none; }
  .gallery-doodle.g1 { right: -10px; }
}

@media (max-width: 860px) {
  body { font-size: 20px; }
  .top-in { min-height: 80px; }
  .logo { width: 140px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; z-index: 60; top: 86px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 22px 22px;
    background: var(--white); border: 2.5px solid var(--black); border-radius: 18px;
    box-shadow: 5px 5px 0 var(--black);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .2s, transform .25s, visibility 0s .25s;
  }
  body.menu-open .nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav a { font-size: 28px; }
  .nav a .doodle { right: auto; width: 120px; }
  .bag { margin: 8px 0 0; }
  .thumbs { grid-template-columns: 58px repeat(3, minmax(0, 1fr)); gap: 10px; }
  .thumb { height: 104px; font-size: 18px; }
  .thumb svg.mini { width: 40px; height: 34px; }
  .actions { grid-template-columns: 1fr; }
  .btn { font-size: 26px; min-height: 58px; }
  .price { font-size: 42px; }
  .foot-in { grid-template-columns: 1fr; align-items: start; }
  .foot-mascot { width: 130px; }
  .timer-demo .mascot { width: 100px; left: -8px; }
  .gallery-doodle.g2 { display: none; }
}

@media (max-width: 560px) {
  .principles, .shops { grid-template-columns: 1fr; }
  .principle { min-height: 0; }
  .seal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .seal-row .seal-track { display: none; }
  .days-grid { grid-template-columns: repeat(10, 1fr); }
  .card-big .card-face, .empty-card { min-height: 380px; }
  .deal { min-height: 390px; }
  .title-star { width: 54px; right: 0; }
  .ch-doodle.d1 { width: 80px; right: -8px; top: -36px; }
}
