/* Taste motion tokens extend the existing BSS interface without changing its layout. */
.motion-ready .animate-fade-up, .motion-ready .animate-scale-in { animation: none; }
#main-menu .glass-card { transition-duration: 180ms; }
#main-menu .glass-card:focus-visible { outline: 2px solid #fbbf24; outline-offset: 4px; }
#main-menu .glass-card > div:nth-child(2) { transition: transform 240ms var(--m-ease), border-color 150ms; }
.site-social-link span { position: relative; }
.site-social-link span::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 150ms var(--m-ease); }
.site-social-link:is(:hover,:focus-visible) span::after { transform: scaleX(1); }
.m-zoom { overflow: hidden; border-radius: 16px; }
#bee-search { transition: border-color 140ms, box-shadow 140ms; }
#bee-search:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px #fbbf2426; }
input[type="range"] { cursor: ew-resize; }
input[type="range"]:focus-visible { outline: 2px solid #fbbf24; outline-offset: 4px; border-radius: 8px; }
#slot-label, #level-label, #hive-level { display: inline-block; min-width: 2ch; font-variant-numeric: tabular-nums; }
#hive-grid .hive-slot { transition: filter 150ms; }
#hive-grid .hive-slot img { transition: scale 180ms var(--m-ease); }
#bee-catalog .bee-option { transition: background-color 150ms, border-color 150ms, transform 150ms; }
#bee-catalog .bee-face { transition: scale 240ms var(--m-ease); }
@media (hover: hover) and (pointer: fine) {
  #main-menu .glass-card:hover { transform: translateY(-2px); }
  #main-menu .glass-card:hover > div:nth-child(2) { transform: translateY(-2px); }
  #bee-catalog .bee-option:hover .bee-face { scale: 1.03; }
  #hive-grid .hive-slot:hover img { scale: 1.03; }
}
#main-menu .glass-card:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  #main-menu .glass-card, #main-menu .glass-card > div, #hive-grid .hive-slot img, #bee-catalog .bee-face { transform: none !important; scale: 1 !important; }
}

@media (prefers-reduced-motion: no-preference) {
  .book-page { transform-origin: 12px 12px; transform: scaleX(.72); transition: transform 230ms ease; }
  #home-sections .glass-card:is(:hover,:active,:focus-visible) .book-page { transform: scaleX(1.06); }
  .comb-part { fill: transparent; transition: fill 180ms; }
  .comb-part:nth-child(2) { transition-delay: 55ms; }
  .comb-part:nth-child(3) { transition-delay: 110ms; }
  #home-sections .glass-card:is(:hover,:active,:focus-visible) .comb-part { fill: #ffcb6870; }
  #home-sections .glass-card:active :is(.comb-part,.book-page) { transition-duration: 0s; transition-delay: 0s; }
  .gifted-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    clip-path: polygon(0 50%,25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%,5% 50%,27% 95%,73% 95%,95% 50%,73% 5%,27% 5%,5% 50%);
    background: linear-gradient(110deg, transparent 35%, #ffe48c 47%, #fff9dd 50%, transparent 65%) 100% / 250% 100%;
    animation: gifted-glint 600ms ease-out both;
  }
  @keyframes gifted-glint { from { background-position: 100%; } to { background-position: 0%; } }
}

.marked-tabs { position: relative; isolation: isolate; }
.marked-tabs .tab-marker {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, .10);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .16);
  transition-property: transform, width, height;
  transition-timing-function: cubic-bezier(.22,.75,.25,1);
}
.marked-tabs .tab-btn { position: relative; }
.marked-tabs .tab-btn[class~="bg-white/10"] { background: transparent; box-shadow: none; }

.snowflake { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .snowflake {
    display: block;
    position: absolute;
    z-index: 1;
    top: -5px;
    width: calc(var(--size) + 1px);
    height: calc(var(--size) + 1px);
    border-radius: 50%;
    background: #f2f7ff;
    opacity: .72;
    animation: snowfall calc(var(--fall) - 7s) linear var(--delay) infinite;
  }
  .snowflake:nth-child(4n+1) { width: 5px; height: 5px; opacity: .86; box-shadow: 0 0 3px #eff6ff88; }
  @keyframes snowfall {
    from { transform: translate(0, 0); }
    50% { transform: translate(var(--drift), 51vh); }
    to { transform: translate(0, 102vh); }
  }
  @media (max-width: 720px) {
    .snowflake:nth-child(n+13) { display: none; }
  }
}
