/* Shine Cafe — karistirici.css: Aroma Karıştırıcı ortak modülünün (js/karistirici.js) stilleri; /nargile ve ana sayfa yükler.
   Sahne (iki küre + uyum halkası) → seçim (iki aroma + "Şansıma bırak") → tat profili kartı; .kr-compact: ana sayfanın cam kartı.
   Aile renkleri (ShineLib.FAMILY_COLORS) seçime --fam, karıştırıcıya --fa/--fb; sahne çizim renkleri ShineLib.flavorArt (JS yazar).
   Sayfa yerleşimi (ızgara alanı, yapışkan sahne) sayfanın kendi CSS'inde. Renkler token. */
@property --fa { syntax: '<color>'; inherits: true; initial-value: transparent; }
@property --fb { syntax: '<color>'; inherits: true; initial-value: transparent; }
@property --ring { syntax: '<color>'; inherits: true; initial-value: transparent; }

/* ---------- Sahne: iki küre + ortada uyum halkası ---------- */
.mix-stage {
  --ring: var(--neon);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 18px 12px 14px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background:
    radial-gradient(60% 80% at 10% 30%, color-mix(in srgb, var(--fa) 30%, transparent), transparent 70%),
    radial-gradient(60% 80% at 90% 70%, color-mix(in srgb, var(--fb) 26%, transparent), transparent 70%),
    var(--surface);
  transition: --fa .7s var(--ease), --fb .7s var(--ease), --ring .6s var(--ease);
}
/* İki rengin ortada buluşan dumanı: yavaşça yükselen, bulanık iki lekeden */
.mix-stage::before, .mix-stage::after {
  content: '';
  position: absolute;
  z-index: -1;
  bottom: -30%;
  width: 55%;
  height: 90%;
  border-radius: 50%;
  filter: blur(36px);
  opacity: .5;
  pointer-events: none;
  animation: ms-smoke 9s ease-in-out infinite alternate;
}
.mix-stage::before { left: 12%; background: var(--fa); }
.mix-stage::after { right: 12%; background: var(--fb); animation-delay: -4.5s; }
@keyframes ms-smoke { from { translate: 0 10%; scale: .9; } to { translate: 0 -18%; scale: 1.1; } }
.ms-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.ms-orb {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--fam, var(--red)) 38%, var(--surface-2)), var(--bg) 75%);
  box-shadow: 0 0 0 1px var(--glass-border), 0 0 40px -6px color-mix(in srgb, var(--fam, var(--red)) 60%, transparent);
  transition: box-shadow .6s var(--ease);
}
.ms-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: 50%; opacity: 0; transform: scale(.86) rotate(-8deg); transition: opacity .55s var(--ease), transform .6s var(--ease); }
.ms-art.is-on { opacity: 1; transform: none; }
.ms-svg { width: 62%; height: 62%; filter: drop-shadow(0 6px 16px rgba(0,0,0,.45)) drop-shadow(0 0 18px color-mix(in srgb, var(--c) 45%, transparent)); animation: ms-float 5s ease-in-out infinite; }
.ms-side[data-s="b"] .ms-svg { animation-delay: -2.5s; }
@keyframes ms-float { 50% { translate: 0 -5px; rotate: 3deg; } }
.ms-photo { width: 100%; height: 100%; object-fit: cover; }
.ms-badge { position: absolute; right: 8%; bottom: 8%; width: 30%; height: 30%; padding: 5%; border-radius: 50%; background: rgba(11,10,10,.72); box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.ms-name { max-width: 100%; overflow: hidden; color: var(--cream); font-family: var(--font-head); font-size: clamp(.95rem, 2vw, 1.2rem); font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.mix-stage.is-rolling .ms-art { transition-duration: .12s; }
.mix-stage.is-new .ms-orb { animation: ms-pop .7s var(--ease); }
@keyframes ms-pop { 40% { scale: 1.05; } }
.ms-cap { grid-column: 1 / -1; min-height: 1.5em; margin: 6px 0 0; color: var(--gray-light); font-size: .88rem; text-align: center; }
/* Hedef küreler (onTarget; /nargile albümü): etkin küre neon halkalı */
.ms-side[role="button"] { border-radius: 18px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ms-side[role="button"]:focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; }
.ms-side.is-target .ms-orb { box-shadow: 0 0 0 3px var(--neon), 0 0 34px -4px var(--neon); }
.ms-slot { grid-column: 1 / -1; min-width: 0; }

.mix-ring { position: relative; width: clamp(76px, 22vw, 124px); aspect-ratio: 1; margin-bottom: 28px; }
.mix-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: rgba(11,10,10,.55); stroke: rgba(255,255,255,.1); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--ring); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 6px var(--ring)); transition: stroke-dashoffset .9s var(--ease); }
.mix-score { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.mix-score b { font-family: var(--font-head); font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.mix-score small { align-self: flex-end; margin-bottom: 30%; color: var(--gray-light); font-size: .85rem; }

/* ---------- Seçim: iki aroma + "Şansıma bırak" ---------- */
.mix-controls { min-width: 0; }
.mixer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; }
.mixer-field { --fam: var(--red); position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mixer-field > span { color: var(--gray-light); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.mixer-field select {
  width: 100%;
  height: 48px;
  padding: 0 34px 0 34px;
  border: 1px solid var(--cam-border);
  border-radius: 14px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8b2ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--cream);
  font-size: 1rem;
  font-weight: 600;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.mixer-field select:hover { border-color: color-mix(in srgb, var(--fam) 60%, transparent); }
.mixer-field select:focus-visible { outline: none; border-color: var(--neon); box-shadow: 0 0 0 4px var(--neon-soft); background-color: var(--surface-2); }
.mixer-field select option, .mixer-field select optgroup { background: var(--surface); color: var(--cream); }
.mixer-field::after { content: ''; position: absolute; left: 13px; bottom: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--fam); box-shadow: 0 0 10px var(--fam); pointer-events: none; transition: background .4s, box-shadow .4s; }
.mixer-field.is-picked select { animation: mix-picked .9s var(--ease); }
@keyframes mix-picked { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fam) 70%, transparent); } to { box-shadow: 0 0 0 14px transparent; } }
.mixer-plus {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--fa), var(--fb), var(--fa));
  color: var(--cam-on-red);
  font-family: var(--font-head);
  font-size: 1.4rem;
  line-height: 1;
  transition: --fa .6s var(--ease), --fb .6s var(--ease);
}
.mixer-plus::before { content: ''; position: absolute; inset: 3px; z-index: -1; border-radius: 50%; background: var(--bg-2); }
.mixer.is-mixing .mixer-plus { animation: mix-spin .7s var(--ease); }
@keyframes mix-spin { 40% { transform: rotate(120deg) scale(1.14); } to { transform: rotate(180deg); } }
.mixer-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-lucky { flex: 1 1 220px; min-height: 56px; font-size: 1.08rem; box-shadow: 0 10px 30px -10px var(--red-glow); }
.btn-lucky .ic { width: 20px; height: 20px; }
.mixer-tools .btn-sm { min-height: 56px; }
.mix-random[aria-disabled="true"] { opacity: .75; cursor: progress; }
.btn-lucky[aria-disabled="true"] .ic, .kr-lucky[aria-disabled="true"] .kr-dice { animation: mix-spin .9s linear infinite; }

/* ---------- Sonuç kartı ---------- */
.mix-result { margin-top: 16px; }
.mix-card {
  --ring: var(--neon);
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background:
    radial-gradient(55% 90% at 0% 0%, color-mix(in srgb, var(--fa) 18%, transparent), transparent 70%),
    radial-gradient(55% 90% at 100% 100%, color-mix(in srgb, var(--fb) 14%, transparent), transparent 70%),
    var(--surface);
  transition: --fa .6s var(--ease), --fb .6s var(--ease), --ring .6s var(--ease);
}
.mix-card.is-new { animation: mix-glow 1s var(--ease); }
@keyframes mix-glow { from { border-color: color-mix(in srgb, var(--ring) 70%, transparent); box-shadow: 0 0 40px -8px color-mix(in srgb, var(--ring) 45%, transparent); } }
.mix-label { margin: 0; color: color-mix(in srgb, var(--ring) 30%, var(--cam-on-red)); font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.15; }
.mix-text { margin: 4px 0 0; color: var(--gray-light); font-size: .94rem; line-height: 1.5; }
.mix-card.is-new .mix-label, .mix-card.is-new .mix-text { animation: mix-in .55s var(--ease) both; }
@keyframes mix-in { from { opacity: 0; translate: 0 8px; } }
.mix-meters { display: grid; gap: 8px; margin-top: 14px; }
.mix-meter { display: grid; grid-template-columns: 76px minmax(0, 1fr) 30px; align-items: center; gap: 12px; font-size: .86rem; }
.mm-bar { position: relative; height: 8px; overflow: hidden; border-radius: 999px; background: var(--glass-border); }
.mm-bar i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--fa), var(--fb)); transform: scaleX(calc(var(--v, 0) / 5)); transform-origin: left; transition: transform .8s var(--ease); }
.mm-val { color: var(--gray-light); font-variant-numeric: tabular-nums; text-align: right; }
.mix-products { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.mix-products:empty { display: none; }
.mix-products-label { color: var(--gray); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
/* "Menüde": eşleşen ürün + şube fiyatı (düz metin) */
.mix-prod { display: inline-flex; align-items: baseline; gap: 6px; color: var(--cream); font-size: .85rem; font-weight: 600; }
.mix-prod::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--fam); align-self: center; }
.mix-prod + .mix-prod { padding-left: 10px; border-left: 1px solid var(--glass-border); }
.mix-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mix-actions:empty { display: none; }
.mix-actions .btn { flex: 1 1 auto; }
.mix-actions .ic { width: 18px; height: 18px; }
.mix-empty { margin: 0; padding: 28px 20px; border: 1px dashed rgba(255,255,255,.18); border-radius: 18px; color: var(--gray-light); font-family: var(--font-head); font-size: 1.25rem; font-style: italic; text-align: center; }
@media (max-width: 420px) { .mixer-field select { padding-right: 28px; background-position: right 8px center; font-size: .95rem; } }

/* ---------- compact: ana sayfa bölümü (cam kart) ---------- */
.kr-compact { padding: 12px 12px 12px; }
.kr-label { margin: 0; color: var(--cam-label); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.kr-compact .mix-stage { padding: 10px 0 0; border: 0; border-radius: 0; background: none; }
.kr-compact .mix-stage::before, .kr-compact .mix-stage::after { opacity: .3; }
.kr-compact .ms-orb { width: min(100%, 112px); }
.kr-compact .mix-ring { width: 60px; margin-bottom: 34px; }
.kr-compact .mix-score b { font-size: 1.35rem; }
.kr-compact .mix-score small { font-size: var(--fs-micro); }
.kr-compact .ms-name { font-family: var(--font-body); font-size: .85rem; font-weight: 700; line-height: 1.25; }
.kr-compact .ms-name small { display: block; overflow: hidden; color: var(--gray-light); font-size: var(--fs-micro); font-weight: 500; text-overflow: ellipsis; }
.kr-compact .ms-cap { min-height: 0; margin: 0; }
.kr-lucky {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--red-dark), var(--red) 55%, color-mix(in srgb, var(--red) 82%, var(--cam-on-red)));
  color: var(--cam-on-red);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 8px 22px var(--red-glow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s var(--ease), box-shadow .25s var(--ease);
}
.kr-lucky:active { transform: scale(.98); }
.kr-dice { display: inline-block; font-size: 1.2rem; line-height: 1; }
.kr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin-top: 8px; }
.kr-pick { min-height: 48px; padding: 0 12px; border: 1px solid var(--cam-border); border-radius: 12px; background: var(--cam-surface); color: var(--cream); font-size: .9rem; font-weight: 600; cursor: pointer; }
.kr-pick span { display: inline-block; transition: transform .25s var(--ease); }
.kr-pick[aria-expanded="true"] span { transform: rotate(180deg); }
.kr-fav, .kr-add { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--cam-border); background: var(--cam-surface); color: var(--cream); font-size: 20px; line-height: 1; cursor: pointer; }
.kr-fav[aria-pressed="true"] { color: var(--red-text); border-color: var(--red-text); box-shadow: 0 0 16px var(--red-glow); }
.kr-add { border-color: var(--red); background: var(--red); color: var(--cam-on-red); font-size: 24px; box-shadow: 0 8px 22px var(--red-glow); }
/* Ana sayfa: tam genişlik "Tepsiye ekle" */
.kr-add.btn-tepsi { grid-column: 1 / -1; width: auto; height: auto; min-height: 48px; border-color: var(--cam-live); border-radius: 12px; background: var(--cam-live); color: var(--bg); font-size: .95rem; font-weight: 700; box-shadow: none; }
.kr-fav:disabled, .kr-add:disabled { opacity: .4; box-shadow: none; cursor: default; }
.kr-add:active, .kr-fav:active { transform: scale(.94); }
.kr-compact .mixer { margin-top: 10px; }
.kr-compact .mix-empty { padding: 20px 12px; font-size: 1.05rem; }

/* Ana sayfa (2 Kasım): neon çerçeve, kırmızı/yeşil ters zamanda yanıp söner (hh-blink: home.css) */
#home-mix :is(.kr-lucky, .kr-pick, .kr-add.btn-tepsi) { position: relative; background: rgba(11,10,10,.35); box-shadow: none; }
#home-mix .kr-lucky { border: 2px solid var(--red); color: rgb(255,96,100); }
#home-mix .kr-pick { border-color: rgba(245,239,230,.45); }
.kr-row:has(.kr-fav[hidden]) .kr-pick { grid-column: 1 / -1; }
#home-mix .kr-add.btn-tepsi { border-width: 2px; color: var(--cam-live); }
#home-mix :is(.kr-lucky, .kr-add.btn-tepsi)::after { content: ''; position: absolute; inset: -2px; border: 2px solid var(--red); border-radius: inherit; box-shadow: 0 0 14px rgba(227,18,27,.75); pointer-events: none; animation: hh-blink 1.6s ease-in-out infinite; }
#home-mix .kr-add.btn-tepsi::after { border-color: var(--cam-live); box-shadow: 0 0 14px rgba(34,197,94,.7); animation-delay: -.8s; }
/* ---------- Azaltılmış hareket: geçişler anında, sahne durağan ---------- */
@media (prefers-reduced-motion: reduce) {
  .mixer.is-mixing .mixer-plus, .mix-card.is-new, .mix-random .ic, .kr-dice, .mix-card.is-new .mix-label, .mix-card.is-new .mix-text, .mixer-field.is-picked select,
  .mix-stage::before, .mix-stage::after, .ms-svg, .mix-stage.is-new .ms-orb { animation: none; }
  .ring-fill, .mm-bar i, .mix-card, .mix-stage, .mixer-plus, .ms-art, .ms-orb, .kr-lucky, .kr-pick span { transition: none; }
  .ms-art { transform: none; }
  .kr-lucky:active, .kr-add:active, .kr-fav:active { transform: none; }
  #home-mix :is(.kr-lucky, .kr-add)::after { animation: none; }
}
