/* The Shop (shop.js) and the app themes bought with dukati or included in Mostić Plus. */

/* ---------- Home entry ---------- */
.action__icon--shop { background: var(--sunrise); position: relative; }
.action__icon--shop::before,
.shop__coin {
  content: '';
  width: 22px;
  height: 22px;
  /* An old hammered gold ducat, a crowned king holding a cross (PixelLab, Nov 9, 2026) */
  background: url(/shop/dukat.png) center / contain no-repeat;
  image-rendering: pixelated;
}
.shop__coin { display: inline-block; flex: none; }

/* ---------- the sheet ---------- */
/* The Shop always opens at full height, so switching tabs (Pets, Themes, Helpers, Plus, Buy,
   Wardrobe) never makes the sheet jump smaller; short tabs just leave room at the bottom. */
#sheet[data-kind='shop'] .sheet__panel { height: min(88dvh, var(--sheet-max, 88dvh)); }
#sheet[data-kind='shop'] .sheet__panel > * { flex-shrink: 0; }
.shop__balance { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--fs-body); color: var(--ochre); }
.shop__tabs { margin-bottom: 14px; }
.shop__tabs .seg__opt { flex: 1 1 auto; min-width: 0; }
.shop__body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.shop__plus-head h3 { margin: 0; font-family: var(--serif); font-size: var(--fs-title); }
.shop__plus-head p { margin: 2px 0 0; color: var(--muted); }
.shop__perks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.shop__perks li { position: relative; padding-left: 26px; line-height: 1.35; }
.shop__perks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fern) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.shop__free { margin: 0; font-weight: 800; color: var(--fern); }
.shop__plans { display: flex; flex-direction: column; gap: 10px; }
.shop__plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  border: 1.5px solid var(--line);
  background: var(--white);
  text-align: left;
}
.shop__plan strong { font-size: var(--fs-body); }
.shop__plan--best { border-color: var(--fern); box-shadow: 0 0 0 1px var(--fern) inset; }
.shop__plan.is-busy { opacity: 0.6; }
.shop__plan:disabled:not(.is-busy) { cursor: default; opacity: 1; }
.shop__best {
  position: absolute;
  top: -10px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--fern);
  color: var(--white);
  font-size: var(--fs-label);
  font-weight: 800;
}
.shop__small { color: var(--muted); font-size: var(--fs-small); }
.shop__have { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-card); background: var(--mint); }
.shop__note { margin: 0; padding: 12px 14px; border-radius: var(--r-card); background: var(--wheat-soft); display: flex; flex-direction: column; gap: 10px; }
.shop__note p { margin: 0; }
.shop__terms { margin: 0; color: var(--muted); font-size: var(--fs-label); line-height: 1.4; }
.shop__terms a { color: inherit; display: inline-block; padding: 14px 6px; margin: -14px 0; }
.shop__how { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.shop__grid { display: flex; flex-direction: column; gap: 10px; }
.shop__item {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-areas: 'pic text' 'pic buy';
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-card);
  border: 1.5px solid var(--edge);
  background: var(--white);
}
.shop__pic { grid-area: pic; width: 52px; height: 52px; border-radius: var(--r-btn); background: var(--mint); background-size: cover; image-rendering: pixelated; }
.shop__pic--img { object-fit: contain; background: var(--wheat-soft); padding: 2px; height: 64px; }
.shop__item-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.shop__item-text span { color: var(--muted); font-size: var(--fs-small); }
.shop__buy { grid-area: buy; justify-self: start; min-height: 40px; padding: 6px 14px; font-size: var(--fs-small); }

/* Pictures for items that have no drawing yet: their colours. Outfits get PNGs in /shop/. */
.shop__pic--th-normal { background: var(--sunrise); }
.shop__pic--th-zelena { background: linear-gradient(160deg, #e6f0e3, #a3c59f 55%, #465d4b); }
.shop__pic--th-cista { background: linear-gradient(160deg, #ffffff, #e6efe9 55%, #2e6a55); }
.shop__pic--th-morava { background: linear-gradient(160deg, #cfe6d6, #6f9f86 60%, #3e6b58); }
.shop__pic--th-kopaonik { background: linear-gradient(180deg, #9ecbf2 0 45%, #f4f8fb 46% 70%, #2f5a45 71%); }
.shop__pic--th-night { background: radial-gradient(circle at 30% 70%, #ffd98a 0 4%, transparent 5%), radial-gradient(circle at 70% 60%, #ffd98a 0 3%, transparent 4%), linear-gradient(180deg, #1c2a4a, #34406b); }
.shop__pic--th-crveno-beli { background: repeating-linear-gradient(90deg, #c8102e 0 14px, #ffffff 14px 28px); }
.shop__pic--th-crno-beli { background: repeating-linear-gradient(90deg, #161616 0 14px, #ffffff 14px 28px); }
.shop__pic--cups { background: var(--wheat-soft) url('/cups/full.png') center / 36px no-repeat; }

/* ---------- app themes ---------- */
/* The green look Mostić had until Nov 2026, kept as a free theme. */
html[data-theme='th-zelena'] {
  --paper: #fffaf0;
  --white: #ffffff;
  --mint: #e6f0e3;
  --mint-deep: #cfe3cc;
  --sage: #a3c59f;
  --fern: #465d4b;
  --fern-bright: #6b8a64;
  --moss: #2f4435;
  --muted: #637260;
  --line: #e9e2d2;
  --sunrise: linear-gradient(135deg, #fbb3a4 0%, #fcbb9b 38%, #f3c07f 74%, #ffe99e 100%);
  --sunrise-soft: linear-gradient(160deg, #ffe7df 0%, #ffeedd 45%, #fff6dc 100%);
  --shadow: 0 10px 30px -14px rgba(47, 68, 53, 0.35);
  --serif: 'Alegreya', 'Iowan Old Style', Georgia, serif;
}

/* Clean Sans (the taste-skill direction): one font, off-white, deep green as the only accent. */
html[data-theme='th-cista'] {
  --paper: #f4f4f1;
  --white: #ffffff;
  --mint: #e6efe9;
  --mint-deep: #cfe0d6;
  --sage: #9fc2b1;
  --fern: #2e6a55;
  --fern-bright: #3f8a6f;
  --moss: #1e2321;
  --muted: #5c645f;
  --line: #e1e3de;
  --sunrise: linear-gradient(135deg, #e6efe9 0%, #eef3ef 50%, #f6f7f4 100%);
  --sunrise-soft: linear-gradient(160deg, #eef3ef 0%, #f4f6f3 50%, #f8f8f6 100%);
  --serif: 'Outfit', 'Nunito', system-ui, sans-serif;
  --sans: 'Outfit', 'Nunito', ui-rounded, system-ui, sans-serif;
  --r-card: 22px;
  --lift: 0 14px 28px -18px rgba(30, 35, 33, 0.22);
}

html[data-theme='th-morava'] {
  --sunrise: linear-gradient(135deg, #bcdcc6 0%, #cfe5cf 40%, #e3eecf 75%, #f3f2d2 100%);
  --paper: #f3f8f2;
  --mint: #dcebe0;
  --mint-deep: #bfdac8;
  --fern: #2f6b55;
  --fern-bright: #4f8f74;
  --moss: #1f3f33;
  --muted: #536b60;
  --line: #d9e6dc;
  --sunrise-soft: linear-gradient(160deg, #e3f1e7 0%, #eef6ef 45%, #f6faf3 100%);
}
html[data-theme='th-kopaonik'] {
  --sunrise: linear-gradient(135deg, #bcd8f0 0%, #d3e6f5 40%, #e7f0f7 75%, #f6f9fb 100%);
  --paper: #f5f9fc;
  --mint: #e1eef8;
  --mint-deep: #c4dcef;
  --fern: #2e5a7a;
  --fern-bright: #3f78a3;
  --moss: #1d3346;
  --muted: #546a7c;
  --line: #dbe6ee;
  --sunrise-soft: linear-gradient(160deg, #e6f1fa 0%, #f0f6fb 45%, #f8fbfd 100%);
}
html[data-theme='th-crveno-beli'] {
  --sunrise: linear-gradient(135deg, #f4b9c1 0%, #f9d3d8 40%, #fde8ea 75%, #fff7f7 100%);
  --paper: #fff8f8;
  --mint: #fbe1e4;
  --mint-deep: #f4c2c8;
  --fern: #c8102e;
  --fern-bright: #e0283f;
  --moss: #5c0d18;
  --muted: #7c5258;
  --line: #f1dadd;
  --sunrise-soft: repeating-linear-gradient(90deg, rgba(200, 16, 46, 0.07) 0 26px, transparent 26px 52px), linear-gradient(160deg, #fde6e9 0%, #fff1f2 45%, #fffafa 100%);
}
html[data-theme='th-crno-beli'] {
  --sunrise: linear-gradient(135deg, #cfcfcf 0%, #e0e0e0 40%, #efefef 75%, #fbfbfb 100%);
  --paper: #fafafa;
  --mint: #ececec;
  --mint-deep: #d6d6d6;
  --fern: #161616;
  --fern-bright: #3d3d3d;
  --moss: #0a0a0a;
  --muted: #5e5e5e;
  --line: #e3e3e3;
  --sunrise-soft: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 26px, transparent 26px 52px), linear-gradient(160deg, #ededed 0%, #f5f5f5 45%, #fdfdfd 100%);
}
html[data-theme='th-night'] {
  --sunrise: linear-gradient(135deg, #b9c2e6 0%, #cdd2ec 40%, #e2dfe9 75%, #f3e6c4 100%);
  --paper: #eef0f7;
  --mint: #dde2f2;
  --mint-deep: #c3cbe6;
  --fern: #34406b;
  --fern-bright: #4c5a92;
  --moss: #1c2a4a;
  --muted: #535d7c;
  --line: #d9ddea;
  --sunrise-soft: linear-gradient(160deg, #dfe3f3 0%, #e9ecf6 45%, #f3f1ea 100%);
}

/* Vučko in the outfit he's wearing, on the lesson-done screen (learn.js vukPair). */
.lpup-outfit { image-rendering: pixelated; width: auto; animation: lpup-bob 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes lpup-bob { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-2px) scaleY(1.02); } }
@media (prefers-reduced-motion: reduce) { .lpup-outfit { animation: none; } }

/* Vuk's pet's cheer under the pair on the lesson-done screen. */
/* The pet's cheer after a lesson: a comic-book speech bubble over its head, a little to the right,
   with a tail pointing down at the pet. Serbian only (Nov 10, 2026). */
.lvuk-pair.has-bubble { padding-top: 64px; }
.lbuddy { position: relative; display: inline-flex; align-items: flex-end; }
.lbuddy__bubble {
  position: absolute; bottom: calc(100% + 14px); left: 50%; translate: -32% 0;
  padding: 8px 14px; border-radius: 18px; border: 2.5px solid var(--moss); background: var(--white, #fff);
  font-family: var(--sans); font-weight: 800; font-size: var(--fs-body); line-height: 1.2; color: var(--moss);
  white-space: nowrap; box-shadow: 3px 3px 0 var(--moss);
  transform-origin: 32% 120%; animation: lbubble-pop 0.42s 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
/* the tail: an outlined triangle, its fill covering the bubble's edge */
.lbuddy__bubble::before, .lbuddy__bubble::after { content: ''; position: absolute; left: calc(32% - 6px); width: 0; height: 0; border-style: solid; }
.lbuddy__bubble::before { bottom: -15px; border-width: 15px 6px 0 10px; border-color: var(--moss) transparent transparent transparent; }
.lbuddy__bubble::after { bottom: -9px; left: calc(32% - 3px); border-width: 10px 4px 0 6px; border-color: var(--white, #fff) transparent transparent transparent; }
@keyframes lbubble-pop { from { opacity: 0; transform: scale(0.4) rotate(-6deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lbuddy__bubble { animation: none; } }
/* ---------- the celebration after buying (shop.js celebrate) ---------- */
.yay { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 4px 4px 8px; }
.yay__stage { position: relative; width: 220px; height: 220px; display: grid; place-items: center; margin: 4px auto 6px; }
.yay__rays {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #ffdcc4 0deg 12deg, transparent 12deg 24deg);
  mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  animation: yay-spin 14s linear infinite, yay-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
/* The pet's own happy strip: 16 frames of 100×103, shown twice the size. */
.yay__pet {
  --fw: 200px; /* one frame, shown twice the size */
  position: relative; width: var(--fw); height: calc(var(--fw) * 1.03);
  background-repeat: no-repeat; background-size: 1600% 100%; image-rendering: pixelated;
  animation: yay-frames 1.6s steps(16) infinite, yay-arrive 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.yay__kicker { margin: 0; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--fs-label); color: var(--terracotta, #c8643c); animation: yay-up 0.4s 0.25s ease-out both; }
.yay__title { margin: 0; font-family: var(--serif); font-size: var(--fs-h1); line-height: 1.15; animation: yay-up 0.45s 0.35s ease-out both; }
.yay__body { margin: 0; color: var(--muted); max-width: 30ch; animation: yay-up 0.45s 0.45s ease-out both; }
.yay__actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 10px; animation: yay-up 0.45s 0.6s ease-out both; }
.yay__actions .btn { width: 100%; }

.yay__stage--plus { height: 150px; width: 260px; margin: 0 auto; }
.yay__badge {
  position: relative; padding: 10px 26px; border-radius: 999px; background: var(--moss, #3f5e4a); color: #fff;
  font-family: var(--serif); font-size: var(--fs-h1); font-weight: 800; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: yay-arrive 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.yay__parade { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; }
.yay__parade img { width: 42px; height: 42px; image-rendering: pixelated; animation: yay-arrive 0.5s calc(0.5s + var(--i) * 0.12s) cubic-bezier(0.3, 1.6, 0.5, 1) both, yay-hop 1.4s calc(1.2s + var(--i) * 0.15s) ease-in-out infinite; }
.yay__perks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; }
.yay__perks li { position: relative; padding: 6px 12px 6px 34px; font-size: var(--fs-body); border-radius: var(--r-btn); background: var(--wheat-soft, #f6efdc); font-weight: 600; animation: yay-in 0.4s calc(0.6s + var(--i) * 0.12s) ease-out both; }
.yay__perks li::before { content: '✓'; position: absolute; left: 12px; top: 6px; font-weight: 800; color: var(--moss, #3f5e4a); }

/* 16 frames, in percent (no var() inside keyframes: WebKit can resolve those wrongly, and the strip slides) */
@keyframes yay-frames { from { background-position: 0 0; } to { background-position: 106.6667% 0; } }
@keyframes yay-spin { to { transform: rotate(360deg); } }
@keyframes yay-pop { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes yay-arrive { 0% { transform: translateY(40px) scale(0.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes yay-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes yay-in { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes yay-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(0); } }
@media (max-height: 700px) {
  .yay__stage { width: 170px; height: 170px; }
  .yay__pet { --fw: 150px; }
  .yay__stage--plus { height: 120px; }
  .yay__title { font-size: var(--fs-h1); }
}
@media (prefers-reduced-motion: reduce) {
  .yay *, .yay__rays, .yay__pet { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .yay__pet { animation: none; }
}
/* On small phones the Plus list scrolls; its buttons stay in reach at the bottom. */
.yay--plus .yay__actions { position: sticky; bottom: 0; padding: 10px 0 2px; background: linear-gradient(to bottom, transparent, var(--white, #fff) 14px); }

/* ---------- Plus on Home, and Vuk's pet (shop.js openPetPicker) ---------- */
.plus-pill {
  display: inline-flex; align-items: center; vertical-align: middle; margin-left: 8px; padding: 3px 10px; border: 0; border-radius: 999px;
  background: var(--moss, var(--moss)); color: #fff; font-family: var(--sans, inherit); font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.02em; line-height: 1.4;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--moss) 25%, transparent); cursor: pointer;
}
.action__icon--pet { background: var(--wheat-soft, #fff6dc); display: grid; place-items: center; overflow: hidden; }
.action__icon--pet img { width: 80%; height: 80%; object-fit: contain; image-rendering: pixelated; }
.pet-picker__lead { margin: 0 0 12px; color: var(--muted); }
.pet-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pet-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: var(--r-card); border: 1.5px solid var(--edge); background: var(--white, #fff); text-align: center; min-width: 0; }
.pet-tile.is-on { border: 2px solid var(--moss, var(--moss)); background: var(--wheat-soft, #fff6dc); padding: 9px 5px; }
.pet-tile__pic { width: 64px; height: 64px; display: grid; place-items: center; }
.pet-tile__pic img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.pet-tile__name { font-size: var(--fs-small); line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
.pet-tile__btn { width: 100%; min-height: 40px; padding: 6px 4px; font-size: var(--fs-small); }
.pet-tile__on { min-height: 40px; display: flex; align-items: center; font-weight: 800; font-size: var(--fs-small); color: var(--moss, var(--moss)); }
.pet-picker__note, .pet-picker__plus p { margin: 14px 0 6px; color: var(--muted); text-align: center; }
.pet-picker__plus { display: flex; flex-direction: column; align-items: stretch; }
@media (max-width: 340px) { .pet-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pet-tile__pic img { width: 64px; height: 64px; object-fit: contain; }
/* Pets not owned yet: dimmed, with a padlock; the button unlocks (buys) it. */
.pet-tile__pic { position: relative; }
.pet-tile.is-locked .pet-tile__pic img { filter: grayscale(0.85) opacity(0.55); }
.pet-tile__lock {
  position: absolute; right: -4px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--moss, var(--moss)); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.pet-tile__lock::before { /* the shackle */
  content: ''; position: absolute; left: 8px; top: 4px; width: 10px; height: 9px; border: 2px solid #fff; border-bottom: 0; border-radius: 6px 6px 0 0; box-sizing: border-box;
}
.pet-tile__lock::after { /* the body */
  content: ''; position: absolute; left: 6px; top: 12px; width: 14px; height: 10px; border-radius: 3px; background: #fff;
}
.pet-tile.is-locked .pet-tile__btn { font-size: var(--fs-label); }

/* The Dukati tab: whose accessories (Vučko or a pet you own). */
.shop__dress { margin: 4px 0 12px; }
.shop__dress-label { margin: 0 0 6px; font-weight: 800; font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fern, #4f7a5a); }
.shop__dress-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.shop__dress-row::-webkit-scrollbar { display: none; }
.shop__dress-who {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; padding: 6px 4px; border-radius: var(--r-card);
  border: 1.5px solid var(--edge); background: var(--white, #fff); font: inherit; font-size: var(--fs-label); font-weight: 800; color: var(--moss); cursor: pointer;
}
.shop__dress-who img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.shop__dress-who span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop__dress-who.is-on { border: 2px solid var(--moss, var(--moss)); background: var(--wheat-soft, #fff6dc); padding: 5px 3px; }

/* Vuk's pet: Čika Vuk and the pet as they look in lessons, then the wardrobe for that pet. */
.pet-stage {
  display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: 0 0 14px; padding: 14px 12px 10px;
  border-radius: var(--r-card); background: linear-gradient(180deg, var(--wheat-soft, #fff6dc) 0%, #f4ead0 100%);
  border: 1.5px solid var(--edge); min-height: 150px;
}
.pet-picker__head { margin: 16px 0 8px; font-size: var(--fs-label); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fern, #4f7a5a); }
.ward .pet-picker__head { margin-top: 0; }
/* Every accessory at once, in a grid (no hidden side-scroll): owned ones to wear, the rest to try on. */
.ward__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; padding: 2px 0 8px; }
.ward__chip {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: var(--r-card);
  border: 1.5px solid var(--edge); background: var(--white, #fff); font: inherit; font-size: var(--fs-label); font-weight: 800; line-height: 1.15; color: var(--moss); cursor: pointer;
}
.ward__chip img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; }
.ward__chip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; min-height: 2.3em; }
.ward__chip.is-on { border: 2px solid var(--moss, var(--moss)); background: var(--wheat-soft, #fff6dc); padding: 7px 3px; }
.ward__note { margin: 0 0 6px; color: var(--muted); }
.ward__more { width: 100%; margin-top: 6px; }
.ward__chip { transition: transform 0.12s ease; }
.ward__chip:active { transform: scale(0.96); }
.ward__chip.is-shop { background: #fbf8f1; border-style: dashed; }
.ward__chip.is-shop img { opacity: 0.9; }
.ward__chip.is-shop.is-on { border-style: solid; border-color: #c98e0c; background: #fff6dc; }
.ward__price { position: absolute; top: 4px; right: 4px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 3px; border-radius: 999px; background: #fff; border: 1px solid #f0dcc0; font-style: normal; font-size: var(--fs-label); font-weight: 800; color: var(--clay-ink, #8a4a2a); }
.ward__coin { width: 13px; height: 13px; background: url(/shop/dukat.png) center / contain no-repeat; image-rendering: pixelated; }
.ward__try { margin: 2px 0 6px; padding: 12px; border-radius: var(--r-card); background: #fff6dc; border: 1px solid #f0dcc0; }
.ward__try-text { margin: 0 0 10px; font-weight: 800; color: var(--moss); }
.ward__try-btns { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.ward__try-btns .btn:first-child { white-space: nowrap; padding-inline: 14px; }
.ward__try-btns .btn { min-height: 44px; }
.ward__earn { display: block; margin: 10px auto 0; }

/* Shop → Wardrobe: the way to the dressing room next to Čika Vuk. */
.shop__dressup {
  display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: 'pic text go'; gap: 12px; align-items: center; width: 100%; margin: 0 0 12px; padding: 12px;
  border-radius: var(--r-card); border: 2px solid var(--moss, var(--moss)); background: var(--wheat-soft, #fff6dc); font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.shop__dressup-pic { grid-area: pic; display: grid; place-items: center; height: 60px; }
.shop__dressup .shop__item-text { grid-area: text; }
.shop__dressup-go { grid-area: go; font-size: var(--fs-h1); font-weight: 800; color: var(--moss, var(--moss)); }

/* Vuk's pet: the picks are saved with one button, always in reach at the bottom of the sheet. */
.pet-save {
  position: sticky; bottom: calc(-1 * (var(--safe-bottom, 0px) + 20px)); z-index: 2; display: flex; align-items: center; gap: 12px; margin: 0 0 calc(-1 * (var(--safe-bottom, 0px) + 20px)); padding: 12px 0 calc(var(--safe-bottom, 0px) + 20px);
  background: var(--white, #fff); border-top: 1px solid var(--line); box-shadow: 0 -10px 12px -6px rgba(30, 40, 60, 0.08);
}
.pet-save__note { flex: 1; margin: 0; font-size: var(--fs-small); color: var(--muted); }
.pet-save.is-due .pet-save__note { color: var(--clay-ink, #8a4a2a); font-weight: 800; }
.pet-save__btn { flex: none; min-width: 112px; min-height: 48px; }

/* ---------- dukati: the coin, how to earn, the pop-up after winning, the top-bar chips ---------- */
.dk-coin { display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; background: url(/shop/dukat.png) center / contain no-repeat; image-rendering: pixelated; }
.dk-earn { background: var(--white); border: 1.5px solid var(--edge); border-radius: var(--r-card); padding: 14px 16px; }
.dk-earn__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--serif); font-size: var(--fs-body); }
.dk-earn__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dk-earn__list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-weight: 800; font-size: var(--fs-body); }
.dk-earn__list li:first-child { border-top: 0; }
.dk-earn__list b { color: #a8740f; white-space: nowrap; }
.dk-earn__note { margin: 8px 0 0; color: var(--muted); font-size: var(--fs-small); }
.dk-won { position: fixed; left: 50%; top: calc(var(--safe-top, 0px) + 14px); z-index: 900; width: min(340px, calc(100vw - 28px)); transform: translate(-50%, -140%); transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2); background: var(--white); border: 1px solid #ecd9a8; border-radius: var(--r-card); padding: 12px 16px 10px; box-shadow: 0 10px 30px rgba(40, 50, 80, 0.22); }
.dk-won.is-in { transform: translate(-50%, 0); }
.dk-won__total { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 6px; font-family: var(--serif); font-size: var(--fs-h1); font-weight: 800; color: #a8740f; }
.dk-won__list { list-style: none; margin: 0; padding: 0; }
.dk-won__list li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-weight: 800; font-size: var(--fs-small); }
.dk-won__list b { color: #a8740f; }
.dk-won__more { display: block; margin: 6px auto 0; font-weight: 800; font-size: var(--fs-small); }
.topstats { display: flex; gap: 6px; align-items: center; }
.topstat { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--edge); background: var(--white); font: 800 var(--fs-body) var(--sans); color: var(--ink); cursor: pointer; }
.topstat svg { width: 18px; height: 18px; }
.topstat--streak svg { color: #d9822b; }
.topstat--streak.is-out svg { color: #b3ada3; }
.topstat[hidden] { display: none; }
/* Signed in, the top strip is for the useful things only: level, streak and dukati on the left,
   the buttons on the right. The logo and greeting step aside (Home shows the name right below). */
.top:has(.topstats:not([hidden])) .top__brand { display: none; }
.top:has(.topstats:not([hidden])) .top__actions { flex: 1 1 auto; gap: 6px; }
.top:has(.topstats:not([hidden])) .topstats { margin-right: auto; }

/* Grouped Dukati / store lists: yours first, then buy now, then keep learning */
.shop__group { display: flex; flex-direction: column; gap: 8px; }
.shop__group + .shop__group { margin-top: 14px; }
.shop__group-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--fs-label); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fern); }
.shop__group-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center; font-size: var(--fs-label); letter-spacing: 0; background: color-mix(in srgb, var(--fern) 12%, var(--white)); color: var(--fern); }
.shop__group--owned .shop__group-title { color: #3f7a4f; }
.shop__group--owned .shop__group-n { background: #e3f0e2; color: #3f7a4f; }
.shop__item--owned { background: linear-gradient(180deg, #f1f8ef, var(--white) 80%); border-color: #bcd9bd; }
.shop__owned { display: inline-flex; align-items: center; gap: 6px; align-self: start; padding: 6px 12px; border-radius: 99px; background: #e3f0e2; color: #2f6a40; font-weight: 800; font-size: var(--fs-small); }
.shop__owned svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.shop__item--ready .shop__buy { box-shadow: var(--tone-glow); }
.shop__item--save { opacity: .92; }
.shop__item--save .shop__pic { filter: saturate(.75); }
.shop__act { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; grid-area: buy; }
.shop__owned { grid-area: buy; justify-self: start; }
.shop__save { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 220px; }
.shop__save-bar { flex: 1; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--moss) 10%, var(--white)); overflow: hidden; }
.shop__save-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e9b949, #c8902a); }
.shop__save-n { font-size: var(--fs-label); font-weight: 800; color: var(--muted); white-space: nowrap; }
.shop__shield-n { display: block; margin: 4px 0 0; padding: 0; background: none; border: 0; box-shadow: none; font-size: var(--fs-label); font-weight: 800; color: var(--muted); }

/* Dukati tab: folded "How to earn", Pets / Themes tabs, pet filter with owned counts */
.dk-earn--fold { padding: 0; }
.dk-earn__sum { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; cursor: pointer; }
.dk-earn__sum::-webkit-details-marker { display: none; }
.dk-earn__sum .dk-earn__title { margin: 0; }
.dk-earn__chev { display: grid; place-items: center; color: var(--muted); transition: transform .2s; }
.dk-earn__chev svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; transform: rotate(90deg); }
.dk-earn--fold[open] .dk-earn__chev { transform: rotate(180deg); }
.dk-earn--fold > :not(summary) { margin-left: 16px; margin-right: 16px; }
.dk-earn--fold[open] { padding-bottom: 12px; }
.shop__sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 14px 0 10px; padding: 4px; border-radius: var(--r-btn); background: color-mix(in srgb, var(--moss) 6%, var(--white)); border: 1.5px solid var(--edge); }
.shop__sub-tab { min-height: 40px; border: 0; border-radius: calc(var(--r-btn) - 4px); background: transparent; font: inherit; font-weight: 800; font-size: var(--fs-small); color: var(--muted); cursor: pointer; }
.shop__sub-tab.is-on { background: var(--tone-bg); color: var(--tone-ink); box-shadow: var(--tone-glow); }
.shop__dress-who { position: relative; }
.shop__dress-who:not(.is-on) { opacity: .75; }
.shop__dress-n { font-style: normal; font-size: .7rem; font-weight: 800; color: var(--muted); }
.shop__dress-who.is-on .shop__dress-n { color: #3f7a4f; }
.shop__pic--shield { background: var(--wheat-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 4 33 9v10c0 9-6 14-13 17C13 33 7 28 7 19V9z' fill='%23c6363c' stroke='%237a1f22' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M12 24q8-8 16 0' fill='none' stroke='%23fff6dc' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M11 24h18' stroke='%23fff6dc' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 38px no-repeat; }

/* Narrow phones: level, streak and dukati still fit beside the buttons */
@media (max-width: 400px) {
  .topstats { gap: 4px; }
  .topstat { padding: 0 7px; gap: 3px; height: 34px; font-size: var(--fs-small); }
  .topstat svg, .topstat .dk-coin { width: 16px; height: 16px; }
}

/* Seasonal shelf (Dukati tab): one holiday at a time */
.shop__season { padding: 10px 12px 12px; border-radius: var(--r-card, 16px); background: var(--sunrise-soft); border: 1.5px solid #f6cf9a; }
.shop__season-left { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--white); font-size: var(--fs-label); font-weight: 800; color: var(--clay-ink); }
.shop__season-note { margin: 0 0 8px; }

/* How to earn dukati: under a row with a daily limit, the limit and how far today is (1.9.135). */
.dk-earn__list li { align-items: center; }
.dk-earn__what { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dk-earn__limit { color: var(--muted); font-weight: 600; font-size: var(--fs-small); }
.dk-earn__list li.is-full .dk-earn__limit { color: var(--fern); }
.dk-earn__note + .dk-earn__note { margin-top: 4px; }
