/* Find My Match v3 (Boss 2026-11-24): one phone screen - three small rows of choices, every bottle as a small cut-out picture
   (no card, no background), a bottle that doesn't fit turns see-through in place */
.mg{--ink:#151b0d;--yel:#fff21a;max-width:980px;margin:0 auto;padding:0 0 12px}
.mg-title{margin:0 0 6px;font-size:19px;line-height:1.1;letter-spacing:-.01em}
.mg-controls{display:flex;flex-direction:column;gap:5px;margin-bottom:4px}
.mg-row{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:6px}
.mg-row>span{font-size:10.5px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#7a8670}
.mg-row>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.mg-row3>div{grid-template-columns:repeat(3,minmax(0,1fr))}
/* small see-through buttons */
.mg-c{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;height:29px;padding:0 4px;border:1.5px solid rgba(21,27,13,.16);border-radius:999px;background:rgba(255,255,255,.4);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:var(--ink);font:inherit;font-size:12px;font-weight:800;white-space:nowrap;cursor:pointer;transition:transform .16s cubic-bezier(.3,1.6,.5,1),background .2s,border-color .2s,box-shadow .2s}
.mg-c:active{transform:scale(.93)}
.mg-c.is-on{border-color:var(--ink);background:var(--yel);box-shadow:0 0 0 3px rgba(255,242,26,.45);animation:mg-pick .4s cubic-bezier(.3,1.6,.5,1)}
@keyframes mg-pick{0%{transform:scale(.9)}60%{transform:scale(1.06)}100%{transform:scale(1)}}
.mg-pw{display:inline-flex;align-items:flex-end;gap:1.5px;height:10px;font-style:normal}
.mg-pw b{display:block;width:3px;border-radius:1px;background:#d3d8cc}.mg-pw b:nth-child(1){height:4px}.mg-pw b:nth-child(2){height:7px}.mg-pw b:nth-child(3){height:10px}.mg-pw b.on{background:#e4572e}
.mg-tip{display:flex;align-items:center;gap:6px;padding:4px 6px 4px 8px;border:1.5px solid #f0a020;border-radius:12px;background:#fff6dc;font-size:10.5px;font-weight:700;line-height:1.25;color:#5a4300;animation:mg-tip .45s cubic-bezier(.3,1.6,.5,1)}
.mg-tip span{flex:1;min-width:0}
.mg-tip button{flex:none;height:24px;padding:0 8px;border:0;border-radius:999px;background:var(--ink);color:var(--yel);font:inherit;font-size:11.5px;font-weight:900;cursor:pointer}
@keyframes mg-tip{from{opacity:0;transform:translateY(-4px) scale(.97)}to{opacity:1;transform:none}}
.mg-status{display:flex;align-items:center;gap:6px;min-height:22px;font-size:11.5px;color:#56664d}
.mg-status b{font-size:17px;color:var(--ink);font-variant-numeric:tabular-nums}
.mg-status em{display:inline-flex;align-items:center;gap:1px;font-style:normal;font-size:10.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.mg-status em i{font-style:normal;font-size:12px;display:inline-block;animation:mg-bob 1.8s ease-in-out infinite}.mg-status em i:nth-child(2){animation-delay:.2s}.mg-status em i:nth-child(3){animation-delay:.4s}
.mg-clear{margin-left:auto;height:24px;padding:0 10px;border:1px solid #dfe3d8;border-radius:999px;background:#fff;color:var(--ink);font:inherit;font-size:11px;font-weight:800;cursor:pointer}
/* v4 (Boss 2026-11-24): the bottles packed close, a bit crooked like a real pile; same-height trimmed pictures, 30/40ml taller */
.mg-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mg-sound{width:32px;height:32px;border:1px solid #dfe3d8;border-radius:50%;background:#fff;font-size:15px;line-height:1;cursor:pointer}
.mg-grid{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:0;align-items:end;padding:6px 4px 0;overflow-x:clip;overflow-y:visible}
.mg{overflow-x:clip}
.mg-b{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;padding:10px 0 2px;border:0;background:none;color:var(--ink);font:inherit;cursor:pointer;animation:mg-deal .55s calc(var(--i,0)*11ms) cubic-bezier(.2,.8,.2,1) backwards;transition:opacity .35s var(--d,0ms),filter .35s var(--d,0ms),transform .35s var(--d,0ms) cubic-bezier(.4,0,.2,1);-webkit-tap-highlight-color:transparent}
@keyframes mg-deal{from{opacity:0;transform:translateY(-18px) scale(.8)}to{opacity:1;transform:none}}
.mg-b img{display:block;width:auto;max-width:150%;height:44px;object-fit:contain;pointer-events:none;-webkit-touch-callout:none;user-select:none;filter:drop-shadow(1px 3px 2px rgba(21,27,13,.25));transition:transform .2s}
.mg-b.s30 img{height:52px}.mg-b.s40 img{height:58px}.mg-b.ssolid img{height:46px}
.mg-b:hover img{transform:translateY(-3px) scale(1.08)}
.mg-b small{display:block;max-width:100%;margin-top:1px;overflow:hidden;font-size:6.5px;font-weight:800;line-height:1.1;color:#56664d;white-space:nowrap}
.mg-b.is-gone{opacity:.13;filter:grayscale(1);transform:scale(.86)}
.mg-b.is-nostock img{filter:grayscale(1) brightness(1.08);opacity:.4}
.mg-b.is-clink{animation:mg-clink .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes mg-clink{0%{transform:none}35%{transform:translateY(-4px)}65%{transform:translateY(1px)}100%{transform:none}}/* Boss 2026-11-25: straight hop, no tilt */
.mg-marks{position:absolute;top:2px;right:-3px;z-index:2;display:flex;flex-direction:column;gap:0;font-size:8px;line-height:1}
.mg-sym{font-style:normal;cursor:pointer;animation:mg-bob 1.8s ease-in-out infinite}
.mg-sym+.mg-sym{animation-delay:.3s}
/* top 3 sellers: badge + the bottle grows and shrinks */
.mg-b.is-rank img{animation:mg-zoom 1.3s ease-in-out infinite}
@keyframes mg-zoom{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}}
.mg-b.r2.is-rank img{animation-delay:.2s}.mg-b.r3.is-rank img{animation-delay:.4s}
.mg-legend{display:inline-flex;align-items:center;gap:2px;min-width:0}
.mg-legend button{height:22px;padding:0 5px;border:1px solid #e6e1c8;border-radius:999px;background:#fffbe6;font-size:11px;line-height:1;cursor:pointer}
.mg-legend small{font-size:9.5px;color:#7a8670;white-space:nowrap}
.mg-pop{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(21,27,13,.35)}
.mg-pop[hidden]{display:none}
.mg-pop:has(.mg-symtip){align-items:flex-end;padding-bottom:110px;background:transparent;pointer-events:none}
.mg-symtip{position:relative;max-width:340px;padding:10px 34px 10px 12px;border-radius:14px;background:#151b0d;color:#fff;font-size:12.5px;font-weight:700;line-height:1.4;box-shadow:0 12px 30px -10px rgba(0,0,0,.5);pointer-events:auto;animation:mg-tip .35s cubic-bezier(.3,1.6,.5,1)}
.mg-symtip button{position:absolute;top:4px;right:6px;width:24px;height:24px;border:0;background:none;color:#fff;font-size:16px;cursor:pointer}
/* the CAUTION window for 30ml / 40ml: a short moving film */
.mg-caution{width:min(340px,100%);padding:14px 16px 16px;border:2px solid #f0a020;border-radius:20px;background:#fffdf3;text-align:center;box-shadow:0 24px 60px -20px rgba(0,0,0,.55);animation:mg-tip .45s cubic-bezier(.3,1.6,.5,1)}
.mg-caution-film{margin:0 auto 8px;border-radius:14px;background:repeating-linear-gradient(135deg,#fff3c4 0 14px,#ffe48a 14px 28px);overflow:hidden}
.mg-caution-film svg{display:block;width:100%;height:auto}
.mg-caution b{display:block;font-size:20px;font-weight:900;color:#c0392b;letter-spacing:.04em;animation:mg-blink 1.2s steps(2) infinite}
.mg-caution p{margin:6px 0 0;font-size:13.5px;font-weight:700;line-height:1.4;color:#3d2a00}
.mg-caution-btns{display:flex;gap:8px;justify-content:center;margin-top:12px}
.mg-caution-btns button{min-height:38px;padding:0 14px;border-radius:999px;font:inherit;font-weight:900;cursor:pointer}
.mg-caution-more{border:1px solid #d9d2b8;background:#fff;color:#151b0d}
.mg-caution-ok{border:0;background:#151b0d;color:#fff21a}
.cz-bottle{transform-origin:99px 112px;animation:cz-shake 1.6s ease-in-out infinite}
@keyframes cz-shake{0%,55%,100%{transform:rotate(0)}60%{transform:rotate(-14deg)}65%{transform:rotate(14deg)}70%{transform:rotate(-14deg)}75%{transform:rotate(14deg)}80%{transform:rotate(-8deg)}85%{transform:rotate(0)}}
.cz-waves{opacity:0;animation:cz-waves 1.6s ease-in-out infinite}
@keyframes cz-waves{0%,58%{opacity:0;transform:scale(.8)}70%{opacity:1;transform:scale(1)}90%,100%{opacity:0;transform:scale(1.15)}}
.cz-waves{transform-origin:99px 66px}
.cz-burst{opacity:0;transform-origin:99px 18px;animation:cz-burst 1.6s ease-in-out infinite}
@keyframes cz-burst{0%,78%{opacity:0;transform:scale(.3)}84%{opacity:1;transform:scale(1.3)}96%,100%{opacity:0;transform:scale(1.6)}}
.cz-sun{transform-origin:186px 30px;animation:cz-spin 6s linear infinite}
@keyframes cz-spin{to{transform:rotate(360deg)}}
.cz-x{animation:mg-blink 1s steps(2) infinite}
@keyframes mg-blink{50%{opacity:.35}}
.mg-care-link{border:0;background:none;padding:0;color:#2f6f5e;font:inherit;font-weight:800;text-decoration:underline;cursor:pointer}

/* top 3 sellers badge (kept from v3) */
.mg-rk{position:absolute;top:-2px;left:50%;z-index:3;transform:translateX(-50%);font-size:11px;line-height:1;cursor:pointer}
.mg-rk:empty{display:none}
.mg-b.r1 .mg-rk{animation:mg-crown 1.6s ease-in-out infinite}.mg-b.r2 .mg-rk{animation:mg-swing 2s ease-in-out infinite;transform-origin:50% 0}.mg-b.r3 .mg-rk{animation:mg-pulse 1.4s ease-in-out infinite}
.mg-rk.pop{animation:mg-rkpop .5s cubic-bezier(.3,1.6,.5,1)!important}
@keyframes mg-crown{0%,100%{transform:translate(-50%,0) rotate(-10deg)}50%{transform:translate(-50%,-3px) rotate(10deg)}}
@keyframes mg-swing{0%,100%{transform:translateX(-50%) rotate(-14deg)}50%{transform:translateX(-50%) rotate(14deg)}}
@keyframes mg-pulse{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.25)}}
@keyframes mg-rkpop{0%{transform:translateX(-50%) scale(0)}70%{transform:translateX(-50%) scale(1.4)}100%{transform:translateX(-50%) scale(1)}}
@keyframes mg-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
.mg-note{margin:8px 0 0;font-size:11px;color:#7a8670;text-align:center}

/* size button with no stock: grey, "OUT OF STOCK" in see-through words over the size (Boss: "要透明看到后面的字") */
.mg-c{position:relative;overflow:hidden}
.mg-c.is-oos{color:#9aa190;background:rgba(235,237,231,.7);border-color:rgba(21,27,13,.1)}
.mg-oos{position:absolute;left:50%;top:50%;z-index:3;transform:translate(-50%,-50%) rotate(-12deg);font-size:7px;font-weight:900;letter-spacing:.02em;line-height:1;white-space:nowrap;pointer-events:none;color:rgba(160,40,30,.45)}
.mg-tip-go{display:flex;gap:4px;flex:none}
.mg-tip-go button.is-oos{background:#c9ccc4;color:#fff}
@media(min-width:761px){
  .mg-grid{grid-template-columns:repeat(auto-fill,minmax(54px,1fr))!important}.mg-b img{height:80px}.mg-b.s30 img{height:94px}.mg-b.s40 img{height:104px}.mg-b small{font-size:9px}
  .mg-oos{font-size:8px}
  .mg-title{font-size:30px}.mg-row{grid-template-columns:60px minmax(0,460px)}.mg-c{height:36px;font-size:13px}
  .mg-grid{grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:10px 6px}
  .mg-b img{height:80px}.mg-b small{font-size:10px}.mg-rk{font-size:18px}
}
@media(prefers-reduced-motion:reduce){.mg *{animation:none!important;transition:none!important}}
