.kk-advent-calendar {
  display: block;
  /* the frame is a size container and takes no width from its content, e.g. as a flex item */
  width: 100%;
}
.kk-advent-calendar .kk-advent-calendar-frame,
.kk-advent-calendar .kk-advent-calendar-frame * {
  box-sizing: border-box;
}
.kk-advent-calendar .kk-advent-calendar-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 48px 24px;
  border-radius: var(--kk-advent-calendar-radius, 24px);
  /* the readable colors (*-on-rgb, *-shade-rgb, *-num, accent-text, accent-on) come from drop.php, the fallbacks fit the default colors */
  color: rgb(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255));
  text-align: center;
  background-color: var(--kk-advent-calendar-bg2, #07160f);
  background-image: radial-gradient(ellipse at 50% 0%, var(--kk-advent-calendar-bg1, #1b4d3a) 0%, var(--kk-advent-calendar-bg2, #07160f) 78%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  /* the doors are sized by the width of the calendar */
  container-type: inline-size;
}
.kk-advent-calendar .kk-advent-calendar-frame-flat {
  box-shadow: none;
}
.kk-advent-calendar .kk-advent-calendar-frame::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
/* layers that fill their box: the decoration behind the calendar and the parts of a door */
.kk-advent-calendar .kk-advent-calendar-stars,
.kk-advent-calendar .kk-advent-calendar-stars::after,
.kk-advent-calendar .kk-advent-calendar-snow,
.kk-advent-calendar .kk-advent-calendar-scene,
.kk-advent-calendar .kk-advent-calendar-door,
.kk-advent-calendar .kk-advent-calendar-inside,
.kk-advent-calendar .kk-advent-calendar-inside::after,
.kk-advent-calendar .kk-advent-calendar-leaf,
.kk-advent-calendar .kk-advent-calendar-leaf-front,
.kk-advent-calendar .kk-advent-calendar-leaf-back,
.kk-advent-calendar .kk-advent-calendar-pattern,
.kk-advent-calendar .kk-advent-calendar-filler {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.kk-advent-calendar .kk-advent-calendar-stars {
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(2px 2px at 8% 14%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 23% 38%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(2px 2px at 41% 9%, rgba(255, 236, 180, 0.9) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 62% 27%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(2px 2px at 79% 12%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 92% 44%, rgba(255, 236, 180, 0.8) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 5% 62%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(2px 2px at 88% 78%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 51%);
  animation: kk-advent-calendar-twinkle 4s ease-in-out infinite alternate;
}
.kk-advent-calendar .kk-advent-calendar-stars::after {
  content: '';
  pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 15% 25%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(2px 2px at 33% 18%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 52% 40%, rgba(255, 236, 180, 0.8) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(2px 2px at 70% 6%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 85% 30%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 51%), radial-gradient(1.5px 1.5px at 96% 66%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 51%);
  animation: kk-advent-calendar-twinkle 3s ease-in-out 1.5s infinite alternate-reverse;
}
.kk-advent-calendar .kk-advent-calendar-snow {
  z-index: 0;
  pointer-events: none;
}
/* scene behind the whole calendar: the SVG is the mask, the color is the text color, so it shows on light and dark backgrounds.
   The square motif covers the calendar. On tall calendars (phones) it would grow far beyond the width, so it grows at most to
   1.4 times the width there and stands at the bottom (see the @supports block), the sides are cropped: the main motifs sit in the middle. */
.kk-advent-calendar .kk-advent-calendar-scene {
  z-index: -1;
  background-color: rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.08);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: cover;
  mask-size: cover;
  pointer-events: none;
}
.kk-advent-calendar .kk-advent-calendar-scene--tree,
.kk-advent-calendar .kk-advent-calendar-scene--tree::before {
  -webkit-mask-image: url('../img/scenes/tree.svg');
  mask-image: url('../img/scenes/tree.svg');
}
.kk-advent-calendar .kk-advent-calendar-scene--sleigh,
.kk-advent-calendar .kk-advent-calendar-scene--sleigh::before {
  -webkit-mask-image: url('../img/scenes/sleigh.svg');
  mask-image: url('../img/scenes/sleigh.svg');
}
.kk-advent-calendar .kk-advent-calendar-scene--snowflake,
.kk-advent-calendar .kk-advent-calendar-scene--snowflake::before {
  -webkit-mask-image: url('../img/scenes/snowflake.svg');
  mask-image: url('../img/scenes/snowflake.svg');
}
.kk-advent-calendar .kk-advent-calendar-scene--workshop,
.kk-advent-calendar .kk-advent-calendar-scene--workshop::before {
  -webkit-mask-image: url('../img/scenes/workshop.svg');
  mask-image: url('../img/scenes/workshop.svg');
}
.kk-advent-calendar .kk-advent-calendar-head,
.kk-advent-calendar .kk-advent-calendar-grid,
.kk-advent-calendar .kk-advent-calendar-foot {
  position: relative;
  z-index: 1;
}
.kk-advent-calendar .kk-advent-calendar-eyebrow {
  display: inline-flex;
  gap: 0.6em;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--kk-advent-calendar-accent-text, var(--kk-advent-calendar-accent, #f2c14e));
}
.kk-advent-calendar .kk-advent-calendar-eyebrow-icon {
  font-size: 1.1em;
  line-height: 0;
}
/* the font and its weight come from the h2 of the shop, size, color and margins from the calendar */
.kk-advent-calendar .kk-advent-calendar-title {
  margin: 0 0 0.4rem;
  padding: 0;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.1;
  color: var(--kk-advent-calendar-accent-text, var(--kk-advent-calendar-accent, #f2c14e));
  /* from light gold on dark backgrounds, solid on light ones (title-from is the text color then) */
  background-image: linear-gradient(180deg, var(--kk-advent-calendar-title-from, #fff6d8) 10%, var(--kk-advent-calendar-accent-text, var(--kk-advent-calendar-accent, #f2c14e)) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 10px rgba(var(--kk-advent-calendar-bg-shade-rgb, 0, 0, 0), 0.35));
}
/* size and weight come from the class lead of the shop */
.kk-advent-calendar .kk-advent-calendar-sub {
  max-width: 38em;
  margin: 0 auto;
  color: rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.85);
}
.kk-advent-calendar .kk-advent-calendar-foot {
  margin-top: 28px;
}
.kk-advent-calendar .kk-advent-calendar-preview,
.kk-advent-calendar .kk-advent-calendar-status {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.kk-advent-calendar .kk-advent-calendar-preview {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.75rem;
  padding: 0.3rem 0.35rem 0.3rem 0.9rem;
  background: #ffc107;
  color: #212529;
}
.kk-advent-calendar .kk-advent-calendar-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #212529;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.kk-advent-calendar .kk-advent-calendar-preview-btn + .kk-advent-calendar-preview-btn {
  margin-left: -0.4rem;
}
.kk-advent-calendar .kk-advent-calendar-preview-btn:hover {
  background: rgba(0, 0, 0, 0.16);
}
.kk-advent-calendar .kk-advent-calendar-preview-btn:focus-visible {
  outline: 2px solid #212529;
  outline-offset: 2px;
}
.kk-advent-calendar .kk-advent-calendar-slot.is-unlocked .kk-advent-calendar-lock {
  display: none;
}
.kk-advent-calendar .kk-advent-calendar-status {
  background: rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.1);
  color: rgb(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255));
  border: 1px solid rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.18);
}
.kk-advent-calendar .kk-advent-calendar-countdown {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: 1.2rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.08);
  border: 1px solid rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.16);
  color: rgb(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255));
}
.kk-advent-calendar .kk-advent-calendar-countdown[hidden],
.kk-advent-calendar .kk-advent-calendar-cd-unit[hidden] {
  display: none;
}
.kk-advent-calendar .kk-advent-calendar-cd-label {
  font-size: 0.9rem;
  color: rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.85);
}
.kk-advent-calendar .kk-advent-calendar-cd-units {
  display: inline-flex;
  gap: 0.35rem;
}
.kk-advent-calendar .kk-advent-calendar-cd-unit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.9rem;
  padding: 0.2rem 0.3rem;
  border-radius: 10px;
  background: rgba(var(--kk-advent-calendar-bg-shade-rgb, 0, 0, 0), 0.28);
}
.kk-advent-calendar .kk-advent-calendar-cd-unit b {
  font-size: 1.2rem;
  line-height: 1.15;
  color: var(--kk-advent-calendar-accent-text, var(--kk-advent-calendar-accent, #f2c14e));
  font-variant-numeric: tabular-nums;
}
.kk-advent-calendar .kk-advent-calendar-cd-unit small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.kk-advent-calendar .kk-advent-calendar-grid {
  display: grid;
  /* doors of at least 120px, but always two columns: the big door of the 24th spans two (with container queries see below) */
  grid-template-columns: repeat(auto-fill, minmax(min(120px, calc((100% - 14px) / 2)), 1fr));
  grid-auto-flow: dense;
  gap: 14px;
  max-width: 1000px;
  margin: 32px auto 0;
}
.kk-advent-calendar .kk-advent-calendar-slot {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  /* numbers, icons and the label are sized by the width of the door */
  container-type: inline-size;
}
.kk-advent-calendar .kk-advent-calendar-slot--big {
  grid-column: span 2;
  grid-row: span 2;
}
/* the open leaf swings out towards the viewer: it lies above the neighbouring doors */
.kk-advent-calendar .kk-advent-calendar-slot.is-open {
  z-index: 2;
}
.kk-advent-calendar .kk-advent-calendar-door {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 900px;
}
.kk-advent-calendar .kk-advent-calendar-door:focus {
  outline: none;
}
.kk-advent-calendar .kk-advent-calendar-door:focus-visible {
  outline: 3px solid var(--kk-advent-calendar-accent, #f2c14e);
  outline-offset: 3px;
}
.kk-advent-calendar .kk-advent-calendar-inside {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, #fffdf6 0%, #f1e3c4 100%);
  box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(0, 0, 0, 0.2);
}
.kk-advent-calendar .kk-advent-calendar-inside img {
  display: block;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0;
  transform: scale(0.5) translateY(10px);
  transition: transform 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) 0.3s, opacity 0.4s ease 0.3s;
}
.kk-advent-calendar .kk-advent-calendar-inside-icon {
  font-size: 2rem;
  color: rgba(0, 0, 0, 0.12);
}
.kk-advent-calendar .kk-advent-calendar-inside::after {
  content: '';
  background: radial-gradient(circle at 50% 50%, rgba(255, 228, 140, 0.95) 0%, rgba(255, 228, 140, 0) 65%);
  opacity: 0;
  pointer-events: none;
}
.kk-advent-calendar .kk-advent-calendar-leaf {
  z-index: 1;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  transition: transform 0.95s cubic-bezier(0.25, 1.1, 0.35, 1);
}
.kk-advent-calendar .kk-advent-calendar-leaf-front,
.kk-advent-calendar .kk-advent-calendar-leaf-back {
  border-radius: 14px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.kk-advent-calendar .kk-advent-calendar-leaf-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--kk-advent-calendar-door, #a4161a);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.22) 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.kk-advent-calendar .kk-advent-calendar-leaf-front::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  bottom: 7px;
  border: 1.5px dashed rgba(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255), 0.35);
  border-radius: 9px;
  pointer-events: none;
}
.kk-advent-calendar .kk-advent-calendar-leaf-front::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  /* the accent where it is readable on the door, else light or dark */
  background: var(--kk-advent-calendar-door-num, var(--kk-advent-calendar-accent, #f2c14e));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.kk-advent-calendar .kk-advent-calendar-leaf-back {
  transform: rotateY(180deg);
  background-color: var(--kk-advent-calendar-door, #a4161a);
  background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38));
}
/* doors of the second color (every other day) take it and its readable colors, also in the popup (outside of the calendar).
   Doors with an own color set these variables inline. */
.kk-advent-calendar--color2 {
  --kk-advent-calendar-door: var(--kk-advent-calendar-door2, #1f5c45);
  --kk-advent-calendar-door-on-rgb: var(--kk-advent-calendar-door2-on-rgb, 255, 255, 255);
  --kk-advent-calendar-door-shade-rgb: var(--kk-advent-calendar-door2-shade-rgb, 0, 0, 0);
  --kk-advent-calendar-door-num: var(--kk-advent-calendar-door2-num, var(--kk-advent-calendar-accent, #f2c14e));
}
/* pattern of a door: the SVG is the mask, the color is the readable color of the door, so it shows on light and dark doors */
.kk-advent-calendar .kk-advent-calendar-pattern {
  border-radius: inherit;
  background-color: rgba(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255), 0.14);
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  pointer-events: none;
}
.kk-advent-calendar .kk-advent-calendar-pattern--dots {
  -webkit-mask-image: url('../img/patterns/dots.svg');
  mask-image: url('../img/patterns/dots.svg');
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}
.kk-advent-calendar .kk-advent-calendar-pattern--stripes {
  -webkit-mask-image: url('../img/patterns/stripes.svg');
  mask-image: url('../img/patterns/stripes.svg');
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
  opacity: 0.6;
}
.kk-advent-calendar .kk-advent-calendar-pattern--checks {
  -webkit-mask-image: url('../img/patterns/checks.svg');
  mask-image: url('../img/patterns/checks.svg');
  -webkit-mask-size: 16px 16px;
  mask-size: 16px 16px;
  opacity: 0.7;
}
.kk-advent-calendar .kk-advent-calendar-pattern--stars {
  -webkit-mask-image: url('../img/patterns/stars.svg');
  mask-image: url('../img/patterns/stars.svg');
  -webkit-mask-size: 28px 28px;
  mask-size: 28px 28px;
}
.kk-advent-calendar .kk-advent-calendar-pattern--snowflakes {
  -webkit-mask-image: url('../img/patterns/snowflakes.svg');
  mask-image: url('../img/patterns/snowflakes.svg');
  -webkit-mask-size: 32px 32px;
  mask-size: 32px 32px;
}
.kk-advent-calendar .kk-advent-calendar-filler {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background-color: var(--kk-advent-calendar-door, #a4161a);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.2) 100%);
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}
.kk-advent-calendar .kk-advent-calendar-filler::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  bottom: 7px;
  border: 1.5px dotted rgba(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255), 0.45);
  border-radius: 9px;
}
.kk-advent-calendar .kk-advent-calendar-filler-mark {
  position: relative;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--kk-advent-calendar-door-num, var(--kk-advent-calendar-accent, #f2c14e));
}
.kk-advent-calendar .kk-advent-calendar-num {
  position: relative;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--kk-advent-calendar-door-num, var(--kk-advent-calendar-accent, #f2c14e));
  text-shadow: 0 2px 0 rgba(var(--kk-advent-calendar-door-shade-rgb, 0, 0, 0), 0.35), 0 0 18px rgba(255, 220, 140, 0.35);
}
.kk-advent-calendar .kk-advent-calendar-slot--big .kk-advent-calendar-num {
  font-size: 4.6rem;
}
.kk-advent-calendar .kk-advent-calendar-label {
  position: relative;
  /* room inside the dashed border and clear of the knob of the door (13px from the edge, 8px wide, the label stands above it) */
  max-width: calc(100% - 36px);
  font-size: 0.6rem;
  margin-bottom: 0.35rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  overflow-wrap: anywhere;
  color: var(--kk-advent-calendar-label, var(--kk-advent-calendar-door-num, var(--kk-advent-calendar-accent, #f2c14e)));
}
.kk-advent-calendar .kk-advent-calendar-slot--big .kk-advent-calendar-label {
  font-size: 0.8rem;
}
.kk-advent-calendar .kk-advent-calendar-front-icon {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--kk-advent-calendar-door-num, var(--kk-advent-calendar-accent, #f2c14e));
  animation: kk-advent-calendar-float 3.5s ease-in-out infinite;
}
.kk-advent-calendar .kk-advent-calendar-slot--big .kk-advent-calendar-front-icon {
  font-size: 1.8rem;
}
.kk-advent-calendar .kk-advent-calendar-lock {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  line-height: 0;
  color: rgba(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255), 0.55);
}
/* in the flow below the number, so that it never covers the label or the number */
.kk-advent-calendar .kk-advent-calendar-today {
  position: relative;
  margin-top: 0.4rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--kk-advent-calendar-accent, #f2c14e);
  color: var(--kk-advent-calendar-accent-on, #2b1d00);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* Sizes by container: the doors grow with the calendar (cqw of the frame), their content with the door (cqi of the slot).
   The values above stay for browsers without container queries. Values with var() and container units do not fall back
   to a previous declaration when the units are unknown, so they live in this block. */
@supports (width: 1cqi) {
  .kk-advent-calendar .kk-advent-calendar-grid {
    /* about 7 doors in a row on a wide calendar, 3 on a phone, never fewer than 2 */
    grid-template-columns: repeat(auto-fill, minmax(min(clamp(80px, 13cqw, 150px), calc((100% - 14px) / 2)), 1fr));
  }
  .kk-advent-calendar .kk-advent-calendar-num,
  .kk-advent-calendar .kk-advent-calendar-slot--big .kk-advent-calendar-num {
    font-size: clamp(1.6rem, 30cqi, 4.6rem);
  }
  .kk-advent-calendar .kk-advent-calendar-inside-icon {
    font-size: clamp(1.4rem, 30cqi, 4rem);
  }
  .kk-advent-calendar .kk-advent-calendar-filler-mark {
    font-size: clamp(1.2rem, 26cqi, 2.6rem);
  }
  .kk-advent-calendar .kk-advent-calendar-front-icon,
  .kk-advent-calendar .kk-advent-calendar-slot--big .kk-advent-calendar-front-icon {
    font-size: clamp(1rem, 14cqi, 2.6rem);
  }
  .kk-advent-calendar .kk-advent-calendar-lock {
    font-size: clamp(12px, 13cqi, 20px);
  }
  /* the open leaf stands out of the door by the same share on small and big doors */
  .kk-advent-calendar .kk-advent-calendar-door {
    perspective: 1000cqi;
  }
  /* the scene grows to cover the calendar, but at most to 1.4 times its width: then it stands at the bottom (sizes of the
     scene box, which is a size container) */
  .kk-advent-calendar .kk-advent-calendar-scene {
    container-type: size;
    background: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .kk-advent-calendar .kk-advent-calendar-scene::before {
    --kk-advent-calendar-scene-size: max(100cqw, min(100cqh, 140cqw));
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--kk-advent-calendar-bg-on-rgb, 255, 255, 255), 0.08);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: var(--kk-advent-calendar-scene-size) var(--kk-advent-calendar-scene-size);
    mask-size: var(--kk-advent-calendar-scene-size) var(--kk-advent-calendar-scene-size);
    /* centered while it is taller than the calendar, at the bottom while it is shorter */
    -webkit-mask-position: 50% max(calc((100cqh - var(--kk-advent-calendar-scene-size)) / 2), calc(100cqh - var(--kk-advent-calendar-scene-size)));
    mask-position: 50% max(calc((100cqh - var(--kk-advent-calendar-scene-size)) / 2), calc(100cqh - var(--kk-advent-calendar-scene-size)));
  }
  .kk-advent-calendar .kk-advent-calendar-label,
  .kk-advent-calendar .kk-advent-calendar-slot--big .kk-advent-calendar-label {
    /* the width of an uppercase character with its letter spacing, in em (a bit more than the average, to keep a margin) */
    --kk-advent-calendar-label-char: 0.8;
    --kk-advent-calendar-label-room: calc(100cqi - 36px);
    --kk-advent-calendar-label-max: clamp(0.6rem, 6.5cqi, 1rem);
    max-width: var(--kk-advent-calendar-label-room);
    /* labels wrap at spaces and after hyphens, they only shrink as far as their longest word needs to fit in a line.
       The minimum keeps them readable, longer words break. */
    font-size: clamp(0.5rem, calc(var(--kk-advent-calendar-label-room) / (var(--kk-advent-calendar-label-word, 1) * var(--kk-advent-calendar-label-char))), var(--kk-advent-calendar-label-max));
  }
}
/* small doors (three in a row on phones): without the knob the label has the whole width inside the dashed border,
   tighter spacing, and the lock gives way to the label and the icon (a locked door still shakes and tells why) */
@container (max-width: 112px) {
  .kk-advent-calendar .kk-advent-calendar-leaf-front::after {
    display: none;
  }
  .kk-advent-calendar .kk-advent-calendar-label {
    --kk-advent-calendar-label-room: calc(100cqi - 20px);
    --kk-advent-calendar-label-char: 0.74;
    margin-bottom: 0.15rem;
    letter-spacing: 0.04em;
    /* a bit smaller than on bigger doors, so that words of about 12 letters still fit in a line */
    font-size: clamp(0.45rem, calc(var(--kk-advent-calendar-label-room) / (var(--kk-advent-calendar-label-word, 1) * var(--kk-advent-calendar-label-char))), var(--kk-advent-calendar-label-max));
  }
  .kk-advent-calendar .kk-advent-calendar-front-icon {
    margin-bottom: 0.15rem;
  }
  .kk-advent-calendar .kk-advent-calendar-today {
    margin-top: 0.2rem;
    padding: 1px 6px;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
  }
  .kk-advent-calendar .kk-advent-calendar-lock {
    bottom: 8px;
  }
  .kk-advent-calendar .kk-advent-calendar-leaf-front:has(.kk-advent-calendar-label, .kk-advent-calendar-front-icon) .kk-advent-calendar-lock {
    display: none;
  }
}
.kk-advent-calendar .kk-advent-calendar-slot.is-unlocked:not(.is-open) .kk-advent-calendar-door:hover .kk-advent-calendar-leaf {
  transform: rotateY(-18deg);
}
.kk-advent-calendar .kk-advent-calendar-slot.is-locked .kk-advent-calendar-door:hover .kk-advent-calendar-leaf {
  transform: rotateY(-3deg);
}
.kk-advent-calendar .kk-advent-calendar-slot.is-open .kk-advent-calendar-leaf {
  /* a bit beyond the right angle: the leaf of a small door stays in the gap to its neighbour */
  transform: rotateY(-95deg);
}
/* the leaf of the big door stands out further, it stays inside the margin of the calendar */
.kk-advent-calendar .kk-advent-calendar-slot--big.is-open .kk-advent-calendar-leaf {
  transform: rotateY(-93deg);
}
.kk-advent-calendar .kk-advent-calendar-slot.is-open .kk-advent-calendar-inside img {
  opacity: 1;
  transform: none;
}
.kk-advent-calendar .kk-advent-calendar-slot.is-opening .kk-advent-calendar-inside::after {
  animation: kk-advent-calendar-glow 1.1s ease-out;
}
.kk-advent-calendar .kk-advent-calendar-slot.is-shake .kk-advent-calendar-leaf {
  animation: kk-advent-calendar-shake 0.55s ease;
}
.kk-advent-calendar .kk-advent-calendar-slot.is-today:not(.is-open) .kk-advent-calendar-leaf-front {
  animation: kk-advent-calendar-pulse 2.2s ease-in-out infinite;
}
.kk-advent-calendar-modal,
.kk-advent-calendar-modal * {
  box-sizing: border-box;
}
.kk-advent-calendar-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 14, 11, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.kk-advent-calendar-modal.is-visible {
  opacity: 1;
}
.kk-advent-calendar-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow: auto;
  border-radius: 22px;
  /* white like the page of Nova, the text has the color of the shop */
  background: #fff;
  text-align: left;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(30px) scale(0.92);
  transition: transform 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.kk-advent-calendar-modal.is-visible .kk-advent-calendar-modal-dialog {
  transform: none;
}
.kk-advent-calendar-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* it lies on the head of the content, the script gives it the readable color of the door */
  background: rgba(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255), 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255));
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.kk-advent-calendar-modal-close:hover {
  background: rgba(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255), 0.35);
}
.kk-advent-calendar-m-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px 60px 22px 22px;
  color: rgb(var(--kk-advent-calendar-door-on-rgb, 255, 255, 255));
  background-color: var(--kk-advent-calendar-door, #a4161a);
  background-image: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 55%), radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, rgba(255, 255, 255, 0) 2px);
  background-size: auto, 14px 14px;
}
.kk-advent-calendar-m-day {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--kk-advent-calendar-accent, #f2c14e);
  color: var(--kk-advent-calendar-accent-on, #2b1d00);
  font-size: 1.7rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}
.kk-advent-calendar-m-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
}
.kk-advent-calendar-m-teaser {
  margin-top: 2px;
  font-size: 1.15rem;
  line-height: 1.3;
}
.kk-advent-calendar-m-body {
  padding: 18px 20px 20px;
}
/* the voucher: a light tint of the accent color with dark text, whatever the accent is. The notches of the perforation
   have the white of the popup. */
.kk-advent-calendar-m-code {
  --kk-advent-calendar-code-line: rgba(33, 37, 41, 0.28);
  position: relative;
  display: flex;
  align-items: stretch;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #fff6dc;
  color: #212529;
  box-shadow: inset 0 0 0 1px rgba(33, 37, 41, 0.08);
  overflow: hidden;
}
.kk-advent-calendar-m-code:last-child {
  margin-bottom: 0;
}
/* in its own block: with var() an unknown color-mix() would not fall back to the color above */
@supports (background: color-mix(in srgb, red 50%, #fff)) {
  .kk-advent-calendar-m-code {
    background: color-mix(in srgb, var(--kk-advent-calendar-accent, #f2c14e) 22%, #fff);
  }
}
.kk-advent-calendar-m-code-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 16px;
}
.kk-advent-calendar-m-code-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}
.kk-advent-calendar-m-code code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: 0.12em;
  overflow-wrap: anywhere;
  /* one click selects the whole code */
  -webkit-user-select: all;
  user-select: all;
}
.kk-advent-calendar-m-code-copy {
  position: relative;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 2px dashed var(--kk-advent-calendar-code-line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
/* the notches at both ends of the perforation */
.kk-advent-calendar-m-code-copy::before,
.kk-advent-calendar-m-code-copy::after {
  content: '';
  position: absolute;
  left: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(33, 37, 41, 0.08);
}
.kk-advent-calendar-m-code-copy::before {
  top: -8px;
}
.kk-advent-calendar-m-code-copy::after {
  bottom: -8px;
}
.kk-advent-calendar-m-code-copy:hover {
  background-color: rgba(33, 37, 41, 0.06);
}
.kk-advent-calendar-m-code-copy:focus {
  outline: none;
}
.kk-advent-calendar-m-code-copy:focus-visible {
  outline: 2px solid #212529;
  outline-offset: -6px;
  border-radius: 10px;
}
.kk-advent-calendar-m-code-icon {
  display: inline-flex;
  line-height: 0;
}
.kk-advent-calendar-m-code-icon--done,
.kk-advent-calendar-m-code-copy.is-copied .kk-advent-calendar-m-code-icon {
  display: none;
}
.kk-advent-calendar-m-code-copy.is-copied .kk-advent-calendar-m-code-icon--done {
  display: inline-flex;
  color: #1e7b3c;
  animation: kk-advent-calendar-pop 0.35s ease-out;
}
.kk-advent-calendar-m-product {
  max-width: 260px;
  margin: 0 auto;
}
.kk-advent-calendar-m-cta {
  margin-top: 12px;
}
.kk-advent-calendar-m-card {
  text-align: center;
}
.kk-advent-calendar-m-media {
  margin: 0 auto 14px;
  max-width: 320px;
}
/* in their own size at most (small images of categories and logos of manufacturers would blur), on the white of the popup */
.kk-advent-calendar-m-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  margin: 0 auto;
  border-radius: 14px;
  object-fit: contain;
}
/* font, size, weight and color come from the class h3 of the shop, the margins from the calendar (two classes to win
   over the h3 of the theme) */
.kk-advent-calendar-m-card .kk-advent-calendar-m-title {
  margin: 0 0 6px;
  padding: 0;
}
.kk-advent-calendar-m-text {
  font-size: 0.95rem;
  line-height: 1.5;
}
.kk-advent-calendar-m-text > :last-child {
  margin-bottom: 0;
}
html.kk-advent-calendar-modal-open {
  overflow: hidden;
}
.kk-advent-calendar-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1090;
  max-width: 90vw;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: #1f2a24;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.kk-advent-calendar-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.kk-advent-calendar-confetti {
  position: fixed;
  z-index: 1095;
  line-height: 1;
  pointer-events: none;
  will-change: transform, opacity;
}
@keyframes kk-advent-calendar-twinkle {
  0% {
    opacity: 0.35;
  }
  100% {
    opacity: 0.9;
  }
}
@keyframes kk-advent-calendar-shake {
  0%,
  100% {
    transform: rotateY(0deg);
  }
  20% {
    transform: rotateY(-12deg);
  }
  40% {
    transform: rotateY(7deg);
  }
  60% {
    transform: rotateY(-5deg);
  }
  80% {
    transform: rotateY(2deg);
  }
}
@keyframes kk-advent-calendar-pulse {
  0%,
  100% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(255, 214, 120, 0);
  }
  50% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 26px 6px rgba(255, 214, 120, 0.7);
  }
}
@keyframes kk-advent-calendar-glow {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}
@keyframes kk-advent-calendar-pop {
  0% {
    transform: scale(0.4);
  }
  70% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes kk-advent-calendar-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-4px) rotate(14deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kk-advent-calendar .kk-advent-calendar-leaf,
  .kk-advent-calendar .kk-advent-calendar-inside img {
    transition: none;
  }
  .kk-advent-calendar .kk-advent-calendar-stars,
  .kk-advent-calendar .kk-advent-calendar-stars::after,
  .kk-advent-calendar .kk-advent-calendar-front-icon,
  .kk-advent-calendar .kk-advent-calendar-slot .kk-advent-calendar-leaf,
  .kk-advent-calendar .kk-advent-calendar-slot .kk-advent-calendar-leaf-front,
  .kk-advent-calendar .kk-advent-calendar-slot .kk-advent-calendar-inside::after,
  .kk-advent-calendar-m-code-copy.is-copied .kk-advent-calendar-m-code-icon--done {
    animation: none;
  }
  .kk-advent-calendar-modal,
  .kk-advent-calendar-modal-dialog,
  .kk-advent-calendar-m-code-copy,
  .kk-advent-calendar-toast {
    transition: none;
  }
}