:root {
  --pink: #ff8cc6;
  --pink-deep: #f45fa8;
  --pink-soft: #ffd6ea;
  --teal: #37c8c3;
  --teal-deep: #159e9a;
  --teal-soft: #c9f3f0;
  --yellow: #ffd83d;
  --brown: #4a2412;
  --white: #ffffff;
  --kbank: #138f4e;
  --pp: #f28a1d;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Mali", "Itim", system-ui, sans-serif;
  color: var(--brown);
  background-color: var(--pink);
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.55) 3px, transparent 3.5px);
  background-size: 34px 34px;
  padding: 20px 16px 40px;
}

.wrap { max-width: 440px; margin: 0 auto; }

/* ---------- header ---------- */
.title {
  text-align: center;
  margin: 4px 0 18px;
}
.title .sub {
  display: inline-block;
  background: var(--white);
  border: 3px solid var(--brown);
  border-radius: 999px;
  padding: 2px 16px;
  font-weight: 700;
  font-size: 15px;
  transform: rotate(-2deg);
}
.title h1 {
  margin: 8px 0 0;
  font-size: 46px;
  line-height: 1;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  -webkit-text-stroke: 3px var(--teal-deep);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--teal-deep);
}

/* ---------- shop name logo (text, styled like the Nemo Onson logo) ---------- */
.brand {
  position: relative;
  margin: 34px 0 36px;
  text-align: center;
  white-space: nowrap;
  /* sizes the one-line name to roughly the width of the cards below */
  font-size: min(12.8vw, 56px);
  transform: rotate(-3deg);
}
.brand .line {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: "DynaPuff", "Mali", sans-serif;
  line-height: 1.1;
}
.brand .l1 { margin-right: .22em; }
.brand .line b {
  display: inline-block;
  font-weight: 700;
  color: #fff;
  -webkit-text-stroke: 6px var(--brown);
  paint-order: stroke fill;
  text-shadow:
    0 3px 0 var(--brown),
    0 5px 0 var(--brown);
  animation: hop 2.4s ease-in-out infinite;
}
/* every letter tilted a little differently, like hand lettering */
.brand .line b:nth-child(1) { --r: -9deg; animation-delay: 0s; }
.brand .line b:nth-child(2) { --r: 5deg;  animation-delay: .12s; }
.brand .line b:nth-child(3) { --r: -4deg; animation-delay: .24s; }
.brand .line b:nth-child(4) { --r: 7deg;  animation-delay: .36s; }
.brand .line b:nth-child(5) { --r: -5deg; animation-delay: .48s; }
.brand .line b { transform: rotate(var(--r)); }
@keyframes hop {
  0%, 70%, 100% { transform: rotate(var(--r)) translateY(0); }
  80% { transform: rotate(var(--r)) translateY(-6px); }
}

/* flowers & stars around the cloud */
.brand .deco {
  position: absolute;
  z-index: 2;
  width: 30px; height: 30px;
  filter: drop-shadow(0 2px 0 rgba(74,36,18,.25));
  animation: sway 3s ease-in-out infinite;
}
.brand .deco.sm { width: 22px; height: 22px; }
.brand .deco.st { width: 26px; height: 26px; animation-name: twinkle; }
@keyframes sway { 0%,100% { transform: rotate(-10deg); } 50% { transform: rotate(12deg); } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.2) rotate(15deg); } }
/* kept above and below the name so nothing covers the letters */
.brand .p1 { left: 2%;   top: -26px;    color: #ff8fc7; }
.brand .p2 { left: 22%;  bottom: -24px; color: #3d8bff; animation-delay: .6s; }
.brand .p3 { right: 3%;  top: -26px;    color: #3d8bff; animation-delay: 1.1s; }
.brand .p4 { right: 24%; bottom: -26px; color: #ff8fc7; animation-delay: .3s; }
.brand .p5 { left: 47%;  top: -24px;    color: #fff; animation-delay: .9s; }
.brand .s1 { left: 6%;   bottom: -26px; animation-delay: .4s; }
.brand .s2 { right: 28%; top: -24px;    animation-delay: 1.3s; }
.brand .s3 { right: 4%;  bottom: -24px; animation-delay: 2s; }

@media (prefers-reduced-motion: reduce) {
  .brand .line b, .brand .deco { animation: none; }
}

/* ---------- cards ---------- */
.card {
  background: var(--white);
  border: 3px solid var(--brown);
  border-radius: 26px;
  box-shadow: 0 6px 0 var(--brown);
  padding: 18px;
  margin-bottom: 20px;
  position: relative;
}
.card.teal { background: var(--teal-soft); }

.tag {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--teal);
  color: var(--white);
  border: 3px solid var(--brown);
  border-radius: 999px;
  padding: 2px 18px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

/* ---------- QR ---------- */
.qr-box {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  margin: 10px auto 12px;
  overflow: hidden;
  position: relative;
  border-radius: 14px;
  background: #fff;
}
/* crop the QR square out of the full poster */
.qr-box img {
  position: absolute;
  width: 254%;
  left: -24.4%;
  top: -17.6%;
  display: block;
}
/* white frame hides poster decorations peeking in at the edges */
.qr-box::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 9px #fff;
  border-radius: 14px;
  pointer-events: none;
}

/* ---------- account rows ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 3px solid var(--brown);
  border-radius: 20px;
  padding: 10px 10px 10px 12px;
  margin-top: 12px;
}
.badge {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  border: 2px solid var(--brown);
}
.badge.k { background: var(--kbank); }
.badge.p { background: var(--pp); }
.badge.n { background: var(--pink-deep); font-size: 14px; }
.badge.t { background: #ff6a13; font-size: 15px; }

/* the payment poster is the main visual: full width, no frame */
.poster {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}
.poster-card { padding: 8px; }
/* logo image badge: scale up slightly to trim the thin border baked into the image */
.badge.img { background: #fff; overflow: hidden; }
.badge.img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); display: block; }

.info { flex: 1; min-width: 0; }
.info .label { font-size: 13px; opacity: .75; }
.info .value {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.info .value.name { font-size: 16px; white-space: normal; }
.card.teal { padding: 18px 12px; }
.row { gap: 10px; padding: 8px 8px 8px 10px; }
.badge { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
.badge.n { font-size: 13px; }
.copy { padding: 5px 11px; font-size: 14px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  border: 3px solid var(--brown);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--brown);
  transition: transform .08s, box-shadow .08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--brown); }

.copy {
  flex: none;
  background: var(--yellow);
  color: var(--brown);
  padding: 6px 14px;
  font-size: 15px;
}
.copy.done { background: var(--teal); color: #fff; }

.btn.main {
  display: block;
  width: 100%;
  background: var(--pink-deep);
  color: #fff;
  font-size: 18px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
}
.btn.ghost {
  display: inline-block;
  background: var(--white);
  color: var(--brown);
  font-size: 15px;
  padding: 6px 16px;
  text-decoration: none;
}

.note {
  text-align: center;
  background: var(--pink-soft);
  border: 3px dashed var(--pink-deep);
  border-radius: 18px;
  padding: 10px;
  font-weight: 700;
  margin-top: 14px;
}
.center { text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 30px);
  background: var(--brown);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- review ---------- */
.summary { display: flex; align-items: center; gap: 16px; justify-content: center; }
.summary .big { font-size: 48px; font-weight: 700; line-height: 1; }
.stars-static { color: #f5b400; font-size: 22px; letter-spacing: 2px; }
.stars-static .off { color: #e6d6dd; }

.star-input { display: flex; justify-content: center; gap: 6px; margin: 6px 0 14px; }
.star-input button {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 40px; line-height: 1; color: #e6d6dd;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s;
}
.star-input button.on { color: #f5b400; text-shadow: 0 2px 0 var(--brown); }
.star-input button:active { transform: scale(1.2); }

label.f { display: block; font-weight: 700; margin: 10px 0 6px; }
input.f, textarea.f {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--brown);
  border: 3px solid var(--brown);
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}
input.f:focus, textarea.f:focus { border-color: var(--pink-deep); }
textarea.f { min-height: 110px; resize: vertical; }
.hint { font-size: 13px; opacity: .7; text-align: right; margin-top: 4px; }

.review {
  border-top: 2px dashed #f2c3da;
  padding: 12px 0;
}
.review:first-child { border-top: none; padding-top: 0; }
.review .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.review .who { font-weight: 700; }
.review .date { font-size: 12px; opacity: .6; }
.review .text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

.thanks { text-align: center; padding: 10px 0; }
.thanks .emoji { font-size: 48px; }

.admin-bar {
  background: var(--brown); color: #fff;
  border-radius: 16px; padding: 8px 14px;
  font-weight: 700; text-align: center; margin-bottom: 18px;
}
.admin-actions { display: flex; gap: 8px; margin-top: 8px; }
.admin-actions .btn { padding: 4px 14px; font-size: 14px; }
.ok { background: var(--teal); color: #fff; }
.del { background: #fff; color: var(--brown); }
.empty { text-align: center; opacity: .6; padding: 8px 0; }

.mock-flag {
  text-align: center; font-size: 12px; color: #fff; opacity: .85; margin-top: 10px;
}

.btn:disabled { opacity: .6; cursor: default; }
