.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1rem;
  /* 4 equal columns with 3 gutters between them: each row equals one column's width, so .tile.sm is a perfect square.
     container-type lives on the parent (.lab-grid-wrap) to avoid the container referencing its own size. */
  grid-auto-rows: calc((100cqi - 3rem) / 4);
}

@media screen and (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
    /* single column: each row equals the full column width, so every tile is a full-width square */
    grid-auto-rows: 100cqi;
  }

  .grid .tile,
  .grid .tile.md,
  .grid .tile.lg,
  .grid .tile.xl {
    grid-column-end: span 1;
    grid-row-end: span 1;
  }
}

.tile {
  position: relative;
  background-color: #f7f7f9;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  overflow: hidden;
}


.tile.md {
  grid-column-end: span 2;
  /* grid-row-end: span 2; */
}

.tile.lg {
  /* grid-column-end: span 2; */
  grid-row-end: span 2;
}

.tile.xl {
  grid-column-end: span 2;
  grid-row-end: span 2;
  padding: 32px;
}

.tile.intro {
  align-items: center;
  text-align: left;
}

.tile.intro .content {
  box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px inset;
  background-color: rgb(249, 250, 251);
  text-align: left;
  border-radius: 1rem;
  padding: 1rem;
  transition: 0.3s;
}

.tile.intro .content:hover {
  background-color: rgb(16, 185, 129);
  transform: rotate(-3deg);
}

.tile.intro p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft, #4a484f);
  margin: 0;
  transition: 0.3s;
}

.tile.intro .content:hover p {
  color: #fff;
}

.tile .dock {
  width: auto;
  height: 60px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
}

.tile .dock .dock-container {
  padding: 3px;
  width: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(83, 83, 83, 0.25);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tile .dock .li-bin {
  margin-left: 20px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.4);
  padding: 0px 10px;
}

.tile .dock .li-1 {
  &::after {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    content: "";
    bottom: 2px;
  }
}

.tile .dock li {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  vertical-align: bottom;
  transition: 0.2s;
  transform-origin: 50% 100%;
  &:hover {
    margin: 0px 13px 0px 13px;
  }
}

.tile .dock .name {
  position: absolute;
  top: -70px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.9);
  height: auto;
  padding: 7px 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  visibility: hidden;
  &::after {
    content: "";
    position: absolute;
    bottom: -10px;
    width: 0;
    height: 0;
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(0, 0, 0, 0.5);
  }
}

.tile .dock .ico {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.2s;
}

.tile .dock .ico-bin {
  width: 94% !important;
  height: 94% !important;
  object-fit: cover;
  transition: 0.2s;

  &:hover {
    margin-left: 10px;
  }
}

.tile .dock li:hover .name {
    visibility: visible !important;
}

@media screen and (max-width: 479px) {
  .tile .dock {
    height: auto;
  }

  .tile .dock li {
    width: 35px;
    height: 35px;
  }
}

/* Tile stickers */
.tile.stickers-tile {
  perspective: 500px;
  cursor: pointer;
}

.tile .stickers {
  -webkit-mask-image: url('images/badge.svg');
  -webkit-mask-size: contain;
  height: 200px;
  width: 202px;
  padding: 20px 20px 20px 28px;
  background-image:url('images/holographic.jpg');
  background-size: 150%;
  will-change: transform, background-position;
  transition: transform 0.1s ease-out, background-position 0.1s ease-out;
}

.tile .stickers img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tile.brightness {
  background: url('images/bg-iphone-12.jpg') no-repeat center;
  background-size: cover;
}

.tile .brightness-base {
  height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transform: scale(2);
}

.tile .brightness-base .light-base {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  transform: scale(0.7);
  z-index: 2;
  pointer-events: none;
  bottom: 1rem;
  &.highest {
    animation: pulse 0.2s ease-in-out forwards;
  }
}

.tile .brightness-base .light-source {
  width: 1.1rem;
  height: 1.1rem;
  content: "";
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  z-index: 2;
  transition: all 0.2s ease-in-out;
  &.mid {
    transform: scale(1.2);
  }
  &.low-color {
    background: rgba(255, 255, 255, 0.5);
  }
}

.tile .brightness-base .ray {
height: 6rem;
width: 1rem;
content: "";
position: absolute;
z-index: 2;
pointer-events: none;
transition: all 0.2s ease;
&:after {
  position: absolute;
  content: "";
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  width: 0.2rem;
  height: 0.2rem;
  bottom: 4rem;
  border-radius: 50%;
  left: 50%;
  transform: translatex(-50%);
  transition: all 0.2s ease;
}
  &.low {
    &:after {
      height: 0.2rem;
    }
  }
  &.mid {
    &:after {
      height: 0.4rem;
      border-radius: 60px;
    }
  }
  &.high {
    &:after {
      height: 0.6rem;
      border-radius: 60px;
    }
  }
}

 .brightness-base .ray-0 { transform: rotate(0deg); }
 .brightness-base .ray-1 { transform: rotate(45deg); }
 .brightness-base .ray-2 { transform: rotate(90deg); }
 .brightness-base .ray-3 { transform: rotate(135deg); }
 .brightness-base .ray-4 { transform: rotate(180deg); }
 .brightness-base .ray-5 { transform: rotate(225deg); }
 .brightness-base .ray-6 { transform: rotate(270deg); }
 .brightness-base .ray-7 { transform: rotate(315deg); }


.tile .brightness-base .range-base {
  position: absolute;
  transform: rotate(-90deg);
  z-index: 1;
  display: flex;
}

.tile .brightness-base .range-base input {
  -webkit-appearance: none;
  appearance: none;
  height: 5rem;
  width: 12rem;
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(16px);
  background-clip: padding-box;
}

.tile .brightness-base .range-base input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2rem;
  height: 5rem;
  cursor: pointer;
  transition: all 0.2s;
  background-clip: padding-box;
  box-shadow: none !important;
}

.tile.gallery {
  overflow: hidden;
  padding: 0;
}

.tile.gallery .small-app-icon {
  z-index: 2;
  position: absolute;
  top: 20px;
  bottom: auto;
  left: auto;
  right: 20px;
}

.tile.gallery .small-app-icon img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  transition: box-shadow .25s;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}

.tile.gallery .gallery-menu {
  z-index: 2;
  width: 90%;
  height: 48px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background-color: rgba(255,255,255,.5);
  border: 2px solid rgba(255,255,255,.19);
  border-radius: 56px;
  justify-content: space-around;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  display: flex;
  position: absolute;
  top: auto;
  bottom: 24px;
  left: 0%;
  right: 0%;
  transform: translate3d(0px, 170%, 0px);
  transition: .3s;
}

.tile.gallery:hover .gallery-menu {
  transition: transform .3;
  transform: translate3d(0px, 0%, 0px);
}

.tile.gallery .gallery-menu .gallery-floating-indicator {
    z-index: -1;
    width: 62px;
    height: 38px;
    background-color: #fff;
    border-radius: 230px;
    position: absolute;
    left: 4px;
    right: 4px;
}

.tile.gallery .gallery-slider {
  display: flex;
  position: relative;
}

.tile.gallery .gallery-slider img {
  width: 100%;
  transition: opacity .6s;
  opacity: 0;
  object-fit: contain;
}

.tile.gallery .gallery-slider img:first-child {
  opacity: 1;
}

/*
.tile.gallery .gallery-title {
  z-index: 2;
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translate3d(0px, 170%, 0px);
  transition: .3s;
  background-image: linear-gradient(#0000, #000000b3 75%);
  width: 100%;
  padding: 2rem;
}

.tile.gallery:hover .gallery-title {
  transform: translate3d(0px, 0%, 0px);
}

@media (max-width: 768px) {
  .tile.gallery .gallery-title {
    transform: translate3d(0px, 0%, 0px);
  }
}

.tile.gallery .gallery-title p {
  color: #FFF;
  font-size: 24px;
  font-weight: bold;
  text-align: left;
}
*/

/* Book tile */
.tile.books { padding: 0; }


.books-scroll {
  padding: 16px;
  display: flex;
  gap: 16px;
  /*
  overflow-x: auto;
  overflow-y: hidden;
  */
  flex: 1;
  align-items: flex-start;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: space-around;
}

@media (max-width: 768px) {
  .books-scroll {
    overflow: auto;
  }
}

.books-scroll::-webkit-scrollbar { display: none; }

/* ========== Book card ========== */
.book-card {
  flex-shrink: 0;
  width: 104px;
  display: flex;
  flex-direction: column;
  cursor: default;
}

/* --- Cover --- */
.book-cover {
  position: relative;
  width: 104px;
  height: 156px; /* ratio 2:3 */
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 2px 0 4px rgba(0,0,0,0.04);
  background: #e4e4e7;
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s ease;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Spine */
.book-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4px;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 1px 0 3px rgba(255, 255, 255, 0.1);
}

/* Shine */
.book-cover::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 35%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 70%, rgba(255,255,255,0.08) 100%);
  z-index: 2;
  pointer-events: none;
}

.book-card:hover .book-cover {
  transform: translateX(-3px) translateY(-13px) scale(1.1) rotate(-1deg);
  box-shadow: 0 10px 24px rgba(0,0,0,0.13), 2px 0 4px rgba(0,0,0,0.04);
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.book-info {
  margin-top: 8px;
  padding: 0 1px;
}

.book-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1f2e;
  line-height: 1.35;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.book-author {
  font-size: 11px;
  color: #a0a0a0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  text-align: left;
}

/* --- Progress bar --- */
.book-progress {
  margin-top: 8px;
  height: 3px;
  background: rgba(0,0,0,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.book-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: #f5d00b;
  transition: width 0.4s ease;
}

/* Tile dots */
.tile.dots {
  flex-direction: column;
  background: #fff;
  padding: 20px;
  user-select: none;
  position: relative;
}

.tile.dots .tile-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 2px;
}

.tile.dots .tile-subtitle {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 16px;
}

/* ── SVG canvas ── */
.tile.dots .drawing-area {
  position: relative;
  width: 100%;
  height: 260px;
}

.tile.dots svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── Lines ── */
.tile.dots .drawn-line {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#sketch);
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawLine 0.35s ease forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* ── Dots ── */
.tile.dots .dot-group {
  cursor: pointer;
}

.tile.dots .dot-circle {
  fill: #1a1a1a;
  transition: transform 0.15s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.tile.dots .dot-group.active .dot-circle {
  fill: #1a1a1a;
}

.tile.dots .dot-group.done .dot-circle {
  fill: #1a1a1a;
}

.tile.dots .dot-group.next .dot-circle {
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { r: 5; opacity: 1; }
  50%       { r: 7; opacity: 0.6; }
}

.tile.dots .dot-label {
  font-size: 11px;
  font-weight: 600;
  fill: #555;
  pointer-events: none;
}

/* ── Pencil ── */
.tile.dots #pencil {
  font-size: 18px;
  position: absolute;
  pointer-events: none;
  transition: left 0.3s cubic-bezier(.4,0,.2,1), top 0.3s cubic-bezier(.4,0,.2,1);
  transform: translate(-6px, -20px);
  z-index: 10;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}

/* ── Success state ── */
.tile.dots .success-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255,255,255,0.85);
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.tile.dots .success-msg.show {
  opacity: 1;
  pointer-events: auto;
}

.tile.dots .success-icon { font-size: 36px; }

.tile.dots .success-text {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.tile.dots .reset-btn {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 99px;
  padding: 7px 18px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tile.dots .reset-btn:hover { opacity: 0.75; }

/* ── Instruction ── */
.tile.dots .hint {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin-top: 2px;
}

/* Tile add cash */
.tile.add-cash {
  background: #0a0a0a;
  flex-direction: column;
  gap: 20px;
}

.tile.add-cash .amount-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* mechanical counter */
.tile.add-cash .money {
  display: flex;
  align-items: baseline;
  font-size: 2.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  overflow: hidden;
}

.tile.add-cash .digit-wrapper {
  display: inline-flex;
  overflow: hidden;
  height: 1.2em;
  align-items: flex-start;
}

.tile.add-cash .digit {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--digit, 0) * -1.2em));
}

.tile.add-cash .digit.rolling {
  animation: rollDigit 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tile.add-cash .digit span {
  height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile.add-cash .static-char {
  display: inline-flex;
  align-items: baseline;
}

@keyframes rollDigit {
  0%   { transform: translateY(calc(var(--from-digit, 0) * -1.2em)); }
  100% { transform: translateY(calc(var(--digit, 0)      * -1.2em)); }
}

/* ── Floating "+100 €" badge ────────────────────── */
.tile.add-cash .floating-amount {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  color: #4ade80;
  pointer-events: none;
  opacity: 0;
}

.tile.add-cash .floating-amount.enter {
  animation: floatIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.tile.add-cash .floating-amount.exit {
  animation: floatOut 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-0.4rem); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes floatOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-0.6rem); }
}

/* ── Add cash button ────────────────────────────── */
.tile.add-cash .add-cash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tile.add-cash .add-cash-btn:hover  { background: rgba(255, 255, 255, 0.16); }
.tile.add-cash .add-cash-btn:active { transform: scale(0.96); }
.tile.add-cash .add-cash-btn { touch-action: manipulation; }

.tile.add-cash .add-cash-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Tile Chrono */
/* Bande de sélection */
.tile.chrono {
  background-color: f2f2f7;
  padding: 0; overflow: hidden;
}

.tile.chrono .selection-band {
  position: absolute;
  top: 50%; left: 12px; right: 12px;
  height: 52px;
  transform: translateY(-50%);
  background: rgba(116, 116, 128, 0.1);
  border-radius: 11px;
  pointer-events: none;
  z-index: 2;
}

/* Dégradés masque */
.tile.chrono .mask-top, .tile.chrono .mask-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 42%;
  pointer-events: none;
  z-index: 3;
}
.tile.chrono .mask-top {
  top: 0;
  background: linear-gradient(to bottom,
    rgba(242,242,247,1) 0%,
    rgba(242,242,247,0.9) 30%,
    rgba(242,242,247,0) 100%
  );
}
.tile.chrono .mask-bottom {
  bottom: 0;
  background: linear-gradient(to top,
    rgba(242,242,247,1) 0%,
    rgba(242,242,247,0.9) 30%,
    rgba(242,242,247,0) 100%
  );
}

/* Rouleaux */
.tile.chrono .drums {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 4px;
  position: absolute; inset: 0
}

.tile.chrono .drum {
  flex: 1;
  align-self: stretch;
  overflow: hidden;
  position: relative;
  cursor: ns-resize;
  -webkit-tap-highlight-color: transparent;
}

.tile.chrono .drum-track {
  position: absolute;
  top: 0; left: 0; right: 0;
  will-change: transform;
  /* pas de transition ici — gérée en JS */
}

.tile.chrono .drum-item {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 300;
  color: #1c1c1e;
  letter-spacing: -0.02em;
  user-select: none;
  -webkit-user-select: none;
}

/* Séparateur ":"  */
.tile.chrono .colon {
  font-size: 34px;
  font-weight: 300;
  color: #1c1c1e;
  letter-spacing: -0.02em;
  line-height: 1;
  padding-bottom: 3px;
  flex-shrink: 0;
  z-index: 4;
  position: relative;
}

/* Tile nice day txt */
.tile.nice-day {
  background: #f7f7f9;
  padding: 32px;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}

.tile.nice-day .nice-day-text { text-align: left; }

.tile.nice-day .nice-day-text p {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: #1a1a1a;
  letter-spacing: -0.03em;
}

.tile.nice-day .word-have {
  color: #5B9CF6;
  transition: color 0.3s ease;
}

.tile.nice-day .word-nice {
  display: inline-block;
  font-size: inherit;
  transition: font-size 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tile.nice-day .word-day {
  border-radius: 10px;
  padding: 0px 8px;
  margin: 0 -8px;
  transition: background 0.25s ease;
}

.tile.nice-day .nice-day-controls {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}

/* Color picker pill */
.tile.nice-day .nd-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
}

.tile.nice-day .nd-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
  flex-shrink: 0;
}

.tile.nice-day .nd-color-dot:hover { transform: scale(1.12); }

.tile.nice-day .nd-color-dot.active {
  box-shadow: 0 0 0 2.5px #f7f7f9, 0 0 0 4.5px var(--dot-color);
}

/* Aa size toggle pill */
.tile.nice-day .nd-size-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
}

.tile.nice-day .nd-aa {
  font-size: 0.88rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.02em;
}

.tile.nice-day .nd-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.tile.nice-day .nd-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.tile.nice-day .nd-toggle-track {
  position: absolute;
  inset: 0;
  background: #d1d1d6;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s;
}

.tile.nice-day .nd-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tile.nice-day .nd-toggle input:checked + .nd-toggle-track { background: #8e8e93; }
.tile.nice-day .nd-toggle input:checked + .nd-toggle-track::after { transform: translateX(18px); }

/* Highlight pill */
.tile.nice-day .nd-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.tile.nice-day .nd-highlight-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4DEEEA;
  flex-shrink: 0;
  transition: box-shadow 0.2s;
}

.tile.nice-day .nd-highlight-pill.active .nd-highlight-swatch {
  box-shadow: 0 0 0 2.5px #f7f7f9, 0 0 0 4.5px #4DEEEA;
}

.tile.nice-day .nd-highlight-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 0.01em;
}

/* Tile selection */
.tile.selection {
  /* background-color: #fff; */
}

.tile.selection .selection-rect {
  position: absolute;
  border: 1.5px solid rgba(0, 100, 255, 0.55);
  background: rgba(0, 100, 255, 0.10);
  border-radius: 4px;
  pointer-events: none;
  display: none;
  will-change: transform;
}

/* Tile rainbow btn */
.tile.rainbow-btn .btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 52px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  background: #ececf2;
  box-shadow:
    7px 7px 16px rgba(0,0,0,.11),
    -5px -5px 12px rgba(255,255,255,.9),
    inset 1px 1px 2px rgba(255,255,255,.95),
    inset -1px -1px 2px rgba(0,0,0,.04);
  transition: all .4s ease;
}

.tile.rainbow-btn .btn span {
  z-index: 2;
  font-size: 18px;
  font-weight: 500;
  color: rgba(80,70,110,.65);
}

.tile.rainbow-btn .btn:hover {
  box-shadow:
    4px 4px 10px rgba(0,0,0,.08),
    -3px -3px 8px rgba(255,255,255,.75);
}

.tile.rainbow-btn .btn-aurora::before {
  content: '';
  position: absolute;
  width: 50%; height: 150%;
  top: 50%; right: -20%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(94,174,255,1),
    rgba(124,111,255,1),
    rgba(214,90,255,1),
    rgba(255,110,180,1),
    rgba(255,122,90,1),
    rgba(255,191,63,1)
  );
  filter: blur(22px);
  opacity: .88;
  transition: width .65s cubic-bezier(.22,1,.36,1),
              height .65s cubic-bezier(.22,1,.36,1),
              right  .65s cubic-bezier(.22,1,.36,1),
              filter .5s ease;
}
.tile.rainbow-btn .btn-aurora:hover::before {
  width: 165%; height: 270%; right: -32%;
  filter: blur(15px); opacity: 1;
}
.tile.rainbow-btn .btn-aurora:hover span { color: rgba(255,255,255,.9); }
