:root {
  --ink: #171716;
  --paper: #fffefb;
  --paper-soft: #f7f6f1;
  --blue: #6fa8da;
  --blue-deep: #2668ad;
  --butter: #f5ca49;
  --coral: #ef9f88;
  --line: rgba(23, 23, 22, .28);
  --muted: #716f68;
  --hand: "Marker Felt", "Bradley Hand", "Comic Sans MS", cursive;
  --sans: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html, body { min-width: 0; margin: 0; background: #dbe4dd; color: var(--ink); }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; }

.stage {
  display: grid;
  grid-template-columns: minmax(230px, 340px) 390px;
  align-items: center;
  justify-content: center;
  gap: clamp(64px, 12vw, 170px);
  min-height: 100dvh;
  padding: 42px 24px;
  background: #dbe4dd;
}

.brief { max-width: 330px; }
.eyebrow, .brief dt { margin: 0; color: #20578f; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.brief h1 { margin: 15px 0; font-family: var(--hand); font-size: 54px; line-height: .95; font-weight: 700; transform: rotate(-1deg); }
.brief > p:not(.eyebrow) { margin: 0; color: #4e514d; font-size: 16px; line-height: 1.65; }
.brief dl { margin: 34px 0 0; border-top: 1px solid rgba(23, 23, 22, .22); }
.brief dl div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(23, 23, 22, .22); }
.brief dd { margin: 0; font-size: 14px; font-weight: 800; text-align: right; }

.phone {
  width: 390px;
  aspect-ratio: 39 / 74;
 
 
 
 
 
}
.screen { position: relative; height: 100%; overflow: hidden; border-radius: 35px; background: var(--paper); }
.island { position: absolute; z-index: 6; top: 10px; left: 50%; width: 94px; height: 24px; border-radius: 16px; background: #090909; transform: translateX(-50%); }
.statusbar { position: relative; z-index: 7; display: flex; height: 43px; align-items: center; justify-content: space-between; padding: 7px 20px 0 22px; font-size: 14px; font-weight: 800; }
.status-icons { display: flex; align-items: center; gap: 3px; }
.status-icons svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.status-icons svg:last-child { width: 20px; }

.app-view { position: absolute; inset: 43px 0 72px; overflow: hidden; padding: 12px 18px 18px; }
.app-view[hidden], .app-view:not(.is-active), .tabbar[hidden] { display: none; }
.icon-button { display: grid; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); line-height: 0; }
.icon-button:hover { background: var(--paper-soft); }
.icon-button svg, .tab svg, .quick-icon svg, .checkout-button svg, .perk-panel svg, .primary-button svg, .menu-visual svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.welcome-view { display: grid; align-content: start; justify-items: center; padding: 11px 31px 24px; text-align: center; }
.welcome-brand { display: grid; margin-top: 7px; font-family: var(--hand); font-size: 54px; font-weight: 700; line-height: .78; transform: rotate(-2deg); }
.welcome-brand span:last-child { margin-left: 26px; }
.welcome-subtitle { margin: 18px 0 0; font-family: var(--hand); font-size: 18px; line-height: 1.2; transform: rotate(1deg); }
.welcome-subtitle span { color: #936800; font-family: var(--sans); font-weight: 900; }
.welcome-visual { width: 250px; height: 282px; margin-top: -2px; overflow: hidden; background: transparent; }
.welcome-visual img { width: 116%; height: 116%; object-fit: cover; object-position: 50% 52%; mix-blend-mode: multiply; transform: translate(-7%, -5%); }
.welcome-note { max-width: 245px; margin: -4px 0 17px; color: var(--muted); font-family: var(--hand); font-size: 16px; line-height: 1.3; transform: rotate(-1deg); }
.primary-button, .checkout-button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; padding: 0 15px; border: 1.5px solid var(--ink); border-radius: 5px 7px 4px 6px; background: var(--paper); color: var(--ink); font-family: var(--hand); font-size: 17px; font-weight: 700; }
.primary-button { transform: rotate(-.4deg); }
.primary-button:hover, .checkout-button:hover { background: #fff7d5; }

.app-head, .view-head, .member-head { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 8px; }
.app-head p, .view-head p, .member-head p, .perk-panel > p { margin: 0; color: var(--muted); font-family: var(--hand); font-size: 15px; }
.app-head h2, .view-head h2, .member-head h2 { margin: 1px 0 0; font-family: var(--hand); font-size: 27px; line-height: 1; font-weight: 700; }
.app-head h2 span, .member-head h2 span, .perk-panel > p span { color: var(--blue-deep); }
.view-head { align-items: start; }
.view-head > div { flex: 1; padding-top: 3px; }
.member-head { text-align: center; }
.member-head > div { flex: 1; }

.hero-card { position: relative; display: block; width: 100%; height: 210px; margin-top: 7px; overflow: hidden; padding: 17px 14px; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); text-align: left; }
.hero-card div { position: relative; z-index: 2; width: 48%; }
.hero-card span, .hero-card small { display: block; font-family: var(--hand); font-size: 15px; }
.hero-card strong { display: block; margin-top: 8px; font-family: var(--hand); font-size: 29px; line-height: .95; font-weight: 700; transform: rotate(-1deg); }
.hero-card small { margin-top: 13px; color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.hero-card img { position: absolute; right: -22px; bottom: -32px; width: 235px; height: 235px; object-fit: cover; object-position: 50% 52%; mix-blend-mode: multiply; }

.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 11px; }
.quick-actions button { display: grid; grid-template-columns: 32px minmax(0, 1fr); min-width: 0; min-height: 80px; align-content: center; align-items: center; gap: 2px 8px; padding: 9px; border: 1px solid var(--line); border-radius: 4px 7px 5px 6px; background: var(--paper-soft); color: var(--ink); text-align: left; }
.quick-actions button:nth-child(2), .quick-actions button:nth-child(3) { transform: rotate(.35deg); }
.quick-actions button:hover { border-color: var(--ink); background: #fff; }
.quick-icon { display: grid; grid-row: 1 / span 2; width: 32px; height: 32px; place-items: center; color: var(--blue-deep); }
.quick-icon svg { width: 23px; height: 23px; }
.quick-actions b { align-self: end; font-family: var(--hand); font-size: 17px; line-height: 1; }
.quick-actions small { align-self: start; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.05; }
.feedback { margin: 9px 0 0; min-height: 18px; color: var(--blue-deep); font-family: var(--hand); font-size: 14px; text-align: center; }

.menu-view { padding-bottom: 18px; }
.menu-list { display: grid; gap: 9px; margin-top: 18px; }
.menu-item { display: grid; grid-template-columns: 61px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 91px; padding: 10px; border: 1px solid var(--line); border-radius: 5px 8px 4px 7px; background: var(--paper-soft); color: var(--ink); text-align: left; }
.menu-item:nth-child(2) { transform: rotate(.25deg); }
.menu-item:hover, .menu-item.is-added { border-color: var(--ink); background: #fff7d5; }
.menu-visual { display: grid; width: 58px; height: 58px; place-items: center; border: 1px dashed var(--ink); border-radius: 50%; background: #fff9dd; color: #d59a00; transform: rotate(-4deg); }
.menu-visual svg { width: 38px; height: 38px; stroke-width: 1.45; }
.menu-item span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.menu-item b { font-family: var(--hand); font-size: 18px; line-height: 1; }
.menu-item small { color: var(--muted); font-size: 14px; }
.menu-item strong { font-size: 14px; }
.checkout-button { margin-top: 18px; background: #e8f2fb; font-family: var(--sans); font-size: 14px; font-weight: 800; transform: rotate(.2deg); }

.member-illustration { height: 170px; margin: 7px 0 5px; overflow: hidden; }
.member-illustration img { width: 118%; height: 118%; object-fit: cover; object-position: center; mix-blend-mode: multiply; transform: translate(-8%, -8%); }
.member-stamps { margin-top: 7px; }
.member-stamps > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.member-stamps h3 { margin: 0; font-family: var(--hand); font-size: 20px; font-weight: 700; }
.member-stamps small { color: var(--muted); font-size: 14px; }
.stamp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 11px 2px 0; }
.stamp-row span { display: grid; width: 39px; height: 39px; place-items: center; border: 1px dashed var(--blue-deep); border-radius: 50%; background: transparent; color: var(--blue-deep); font-family: var(--hand); font-size: 16px; }
.stamp-row .is-stamped { border-style: solid; background: #edf6ff; }
.perk-panel { margin-top: 19px; }
.perk-panel > p { margin-bottom: 9px; color: var(--ink); font-size: 19px; }
.perk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.perk-panel button { display: grid; min-width: 0; min-height: 114px; justify-items: center; align-content: center; gap: 7px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 5px 7px 4px 6px; background: var(--paper-soft); color: var(--ink); text-align: center; }
.perk-panel button:last-child { transform: rotate(.35deg); }
.perk-panel button:hover { border-color: var(--ink); background: #fff; }
.perk-panel svg { width: 27px; height: 27px; color: var(--blue-deep); }
.perk-panel span { display: grid; gap: 4px; }
.perk-panel b { font-family: var(--hand); font-size: 17px; line-height: 1; }
.perk-panel small { color: var(--muted); font-size: 14px; line-height: 1.2; }

.tabbar { position: absolute; z-index: 8; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: 72px; padding: 6px 22px 18px; border-top: 1px solid var(--line); background: rgba(255, 254, 251, .97); }
.tab { display: grid; min-width: 44px; min-height: 42px; place-content: center; justify-items: center; gap: 2px; padding: 0; border: 0; background: transparent; color: #8e8c85; font-size: 14px; font-weight: 750; }
.tab svg { width: 18px; height: 18px; }
.tab.is-active { color: var(--blue-deep); }
.home-indicator { position: absolute; z-index: 9; bottom: 5px; left: 50%; width: 112px; height: 3px; border-radius: 99px; background: var(--ink); transform: translateX(-50%); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.embed-mode { overflow: hidden; }
.embed-mode body { width: 390px; min-width: 390px; height: 844px; overflow: hidden; transform: scale(var(--embed-scale, 1)); transform-origin: top left; }
.embed-mode .stage { display: block; width: 390px; min-height: 844px; padding: 0; }
.embed-mode .brief { display: none; }
.embed-mode .phone { width: 390px; height: 844px; aspect-ratio: auto; }

@media (max-width: 800px) {
  .stage { grid-template-columns: 1fr; gap: 22px; padding: 24px 14px; }
  .brief { display: none; }
}

@media (max-width: 430px) {
  .stage { min-height: 100dvh; padding: 0; }
  .phone { width: 100%; height: 100dvh; min-height: 590px; }
  .screen { border-radius: 28px; }
}

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