:root {
  --cream: #ffe4f3;
  --paper: #fff7fb;
  --ink: #3a1430;
  --muted: #8a4d73;
  --line: #f5c6de;
  --sage: #e85aa8;
  --sage-deep: #9b1f6b;
  --peach: #ff6cb7;
  --peach-deep: #c42d86;
  --blush: #ffd3ec;
  --sky: #f3c6ff;
  --gold: #ffd24a;
  --good: #ffe0f3;
  --warn: #ffe4f0;
  --shadow: 0 12px 28px rgba(155, 31, 107, 0.14);
  --radius: 26px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 10% 6%, #ffc2ea 0 140px, transparent 141px),
    radial-gradient(circle at 92% 0%, #f3c6ff 0 160px, transparent 161px),
    radial-gradient(circle at 80% 88%, #ffd24a 0 90px, transparent 91px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='%239b1f6b' fill-opacity='0.08'%3E%3Ccircle cx='18' cy='20' r='4'/%3E%3Ccircle cx='12' cy='28' r='3.2'/%3E%3Ccircle cx='24' cy='28' r='3.2'/%3E%3Ccircle cx='16' cy='12' r='3'/%3E%3Ccircle cx='22' cy='13' r='3'/%3E%3Cellipse cx='18' cy='34' rx='6' ry='5'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  min-height: 100vh;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 140px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.paw {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, #ff7ac4 0%, #9b1f6b 100%);
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  box-shadow: 0 8px 0 #6a1248, var(--shadow);
  border: 3px solid #fff;
}
.brand h1 {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 32px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.brand p {
  margin: 0;
  color: var(--peach-deep);
  font-size: 13px;
  font-weight: 800;
}

.who-chip, #who-chip {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  font-size: 14px;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.who-chip img, #who-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: rgba(255,250,243,.92);
  padding: 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  margin-bottom: 16px;
  position: sticky;
  top: 8px;
  z-index: 5;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.tabs button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 12px 8px;
  font-weight: 800;
}
.tabs button.on {
  background: linear-gradient(180deg, #ff7ac4, #9b1f6b);
  color: white;
  box-shadow: 0 6px 0 #6a1248;
}

.card {
  background: var(--paper);
  border: 2px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.hero {
  background:
    linear-gradient(180deg, #fff4fb 0 55%, #ffd6ef 55% 78%, #f7b8e4 78% 100%);
  overflow: hidden;
  position: relative;
  border: 3px solid #ff8ac8;
  box-shadow: 0 0 0 3px #fff, 0 16px 32px rgba(155, 31, 107, 0.18);
}
.hero::after { content: none; }
.hp {
  display: inline-block;
  margin: 0 0 8px;
  background: linear-gradient(180deg, #ffd24a, #f0b400);
  color: #3a1430;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 0 #b8860a;
}
.hero h2 {
  margin: 0 0 8px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.hero p { margin: 0 0 14px; color: var(--muted); }
.mascots {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}
.mascots figure { margin: 0; text-align: center; }
.mascots img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  border-radius: 22px;
  border: 3px solid #fff;
  box-shadow: 0 8px 0 #f0d7b8;
  background: #fff6ea;
}
.mascots figcaption {
  margin-top: 6px;
  font-weight: 800;
  font-size: 14px;
}
.invite {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
.invite img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid #fff;
  box-shadow: 0 4px 0 #f0d7b8;
}
.invite-line { font-weight: 800; margin: 0 0 10px; }
.photo-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
#photo-camera, #photo-album, #signup-camera, #signup-album, #avatar-camera, #avatar-album {
  display: none;
}
.steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 800;
  border: 2px solid #ffd3ec;
}

label {
  display: block;
  font-weight: 800;
  margin: 12px 0 6px;
}
input, textarea, select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid #ffd09a;
  border-color: var(--peach);
}
textarea { min-height: 90px; resize: vertical; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  background: linear-gradient(180deg, #ff7ac4, #9b1f6b);
  color: white;
  width: 100%;
  box-shadow: 0 6px 0 #6a1248;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(2px); box-shadow: 0 4px 0 #6a1248; }
.btn.peach {
  background: linear-gradient(180deg, #ffd24a, #f0b400);
  color: #3a1430;
  box-shadow: 0 6px 0 #b8860a;
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: none;
}
.btn[disabled] { opacity: .55; cursor: wait; }

.note {
  background: var(--warn);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 10px;
  font-weight: 700;
}
.ok {
  background: var(--good);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 10px;
  font-weight: 700;
}

.composer .photo-btn {
  border: 3px dashed var(--peach);
  background:
    repeating-linear-gradient(135deg, #fff6ee, #fff6ee 12px, #ffe8d4 12px, #ffe8d4 24px);
  border-radius: 22px;
  min-height: 132px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--peach-deep);
}
.composer .photo-btn img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.composer input[type="file"] { display: none; }

.post {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ffd24a, #ff6cb7, #c42d86) border-box;
  border: 3px solid transparent;
}
.post .who {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.avatar {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--gold), var(--blush));
  display: grid;
  place-items: center;
  font-size: 24px;
  flex: none;
  box-shadow: 0 4px 0 #e2b07a;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid #ffd24a; }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack-pet {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.handle { color: var(--sage-deep); font-weight: 800; }
.comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}
.comments-title { margin: 0 0 8px; font-weight: 800; }
.comment {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
}
.comment .mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}
.muted { color: var(--muted); font-size: 14px; }
.me-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.me-avatar {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 6px 0 #f0d7b8;
}
.photo-btn.sm { min-height: 90px; margin-bottom: 8px; }
.composer .photo-btn, .photo-btn {
  border: 3px dashed var(--peach);
  background: repeating-linear-gradient(135deg, #fff6ee, #fff6ee 12px, #ffe8d4 12px, #ffe8d4 24px);
  border-radius: 22px;
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  overflow: hidden;
  color: var(--peach-deep);
  width: 100%;
}
.photo-btn img { width: 100%; max-height: 220px; object-fit: cover; }
.who strong { display: block; }
.who span { color: var(--muted); font-size: 14px; }
.post .pic {
  border-radius: 18px;
  overflow: hidden;
  margin: 8px 0 12px;
  background: #f3ebe1;
  box-shadow: 0 10px 0 #efe0cf;
}
.post .pic img { width: 100%; max-height: 420px; object-fit: cover; }
.post p { margin: 0 0 12px; white-space: pre-wrap; }
.headline {
  margin: 0 0 10px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.site-url {
  color: var(--sage-deep);
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 10px !important;
}
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.like {
  border: 0;
  background: #fff1e6;
  color: var(--peach-deep);
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 14px;
}
.btn.tiny { width: auto; padding: 8px 12px; font-size: 14px; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
  margin: 12px 0;
}
.check input { width: auto; margin-top: 4px; }
.fb-wrap, .fb-frame { display: inline-block; vertical-align: middle; }
.sortbar {
  display: grid;
  grid-template-columns: auto 1fr 1.4fr;
  gap: 8px;
  align-items: center;
}
.sortbar label { margin: 0; }
@media (max-width: 640px) {
  .sortbar { grid-template-columns: 1fr; }
}
.foot {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.foot a { color: var(--sage-deep); }

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding: 8px;
  background: #fff6ea;
  border-radius: 18px;
}
.bubble {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  padding: 10px 12px;
}
.bubble.mine {
  background: #ffe0f3;
  border-color: #ffb3dc;
  border-radius: 18px 18px 6px 18px;
}
.bubble b { display: block; font-size: 14px; }
.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}
.chat-form .btn { width: auto; padding-inline: 20px; }

.hidden { display: none !important; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }

.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  z-index: 4;
}
.dock.off { display: none !important; }
.panel[data-panel="chat"] { padding-bottom: 8px; }
.wallet {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  margin: 12px 0;
}
.treats { font-weight: 800; margin: 0 0 8px; }
.shop {
  position: fixed;
  inset: 0;
  background: rgba(58, 20, 48, 0.45);
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 12px;
}
.shop.hidden { display: none !important; }
.shop-card {
  background: #fff7fb;
  width: min(420px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 16px 16px;
  padding: 12px 12px 0;
  border: 3px solid #ff8ac8;
  overflow: hidden;
}
.shop-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.shop-top h2 { margin: 0 0 4px; font-size: 22px; }
.shop-top p { margin: 4px 0; }
.purse-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.add-coin {
  border: 0;
  background: #ffd24a;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  box-shadow: 0 3px 0 #e0b020;
}
.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 16px;
}
.shop-item {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.shop-item b { color: #e85aa8; }
.shop-item span { font-size: 13px; font-weight: 600; color: #7a4a6a; }
.shop-x {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #ff8ac8;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 0 #d45a9a;
  flex: 0 0 44px;
}
.ledger p { margin: 6px 0; font-size: 14px; }
.bag { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 13px;
}
.shop-shelf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0;
  padding: 8px 6px 12px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
  background: #fff4fb;
  border-radius: 16px;
}
.shop-packs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0 10px;
}
.shop-pic {
  background: #fff;
  border: 3px solid #ff8ac8;
  border-radius: 22px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  box-shadow: 0 6px 0 #f4b3d8;
}
.icon-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #ffe08a);
  border: 3px solid #ffd24a;
  display: grid;
  place-items: center;
  font-size: 40px;
  line-height: 1;
}
.icon-circle.gold { background: radial-gradient(circle at 30% 30%, #fff6c8, #f0c14a); }
.shop-name {
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
}
.coin-pic {
  background: transparent;
  border: 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pic-emoji { font-size: 30px; line-height: 1; }
.shop-pic b { color: #e85aa8; font-size: 16px; }
.shop-coins { flex: 0 0 auto; }
body.in .needs-guest { display: none !important; }
.shop-pic b { color: #e85aa8; font-size: 18px; }
.bowl-wrap { margin: 8px 0 12px; }
.bowl-meta { margin-bottom: 8px; }
.bowl-meta span { display: block; font-weight: 700; }
.bowl-visual { width: 168px; margin: 0; }
.bowl-rim {
  height: 8px;
  background: linear-gradient(#f6d27a, #d7a04a);
  border: 2px solid #b8832c;
  border-radius: 20px;
}
.bowl-inner {
  position: relative;
  height: 62px;
  margin: -4px 8px 0;
  background: radial-gradient(ellipse at top, #fffdf8, #f3e2c8);
  border: 3px solid #c9963d;
  border-top: 0;
  border-radius: 0 0 90px 90px;
  overflow: hidden;
  box-shadow: inset 0 -8px 10px rgba(120,70,20,.14);
}
.bowl-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(#8be3a4, #e7c56a 55%, #c9893a);
  transition: height .6s ease;
}
.bowl-empty .bowl-fill { background: #efe4ea; }
.bowl-hungry .bowl-fill { background: linear-gradient(#ffd27a, #f0b84a); }
.bowl-full .bowl-fill { background: linear-gradient(#7de3a0, #c9e87a); }
.bowl-inner .bites {
  position: relative;
  z-index: 1;
  justify-content: center;
  padding: 18px 8px 8px;
  min-height: 100%;
}
.bowl-base {
  height: 12px;
  margin: -2px 28px 0;
  background: #c98922;
  border-radius: 0 0 20px 20px;
}
.bite.more { font-size: 14px; font-weight: 900; }
.got {
  position: fixed;
  inset: 0;
  background: rgba(58,20,48,.5);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}
.got.hidden { display: none !important; }
.got-card {
  background: #fff7fb;
  border: 4px solid #ff8ac8;
  border-radius: 24px;
  padding: 16px 14px 12px;
  text-align: center;
  width: min(360px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.confirm-list {
  overflow-y: auto;
  max-height: 36vh;
  text-align: left;
  margin: 8px 0;
}
.confirm-list p { margin: 6px 0; }
.confirm-actions {
  position: sticky;
  bottom: 0;
  background: #fff7fb;
  padding-top: 8px;
}
.bites { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; font-size: 22px; }
.cart-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 3px solid #ffd24a;
  border-radius: 16px 16px 0 0;
  padding: 10px;
  margin: 0 -12px 0;
  flex: 0 0 auto;
  z-index: 2;
}
.cart-bar.hidden { display: none !important; }
.share-mask {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}
.share-mask img { width: 100%; display: block; }
.share-stamp {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(58, 20, 48, .78);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
}
.share-stamp b { color: #ffd24a; display: block; }
.share-stamp span { display: block; }
.share-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
