.match-game{--match-connection-red:oklch(56% .23 27);--match-paper:oklch(98% .035 90);--match-ink:oklch(32% .07 160);--match-aqua:oklch(67% .15 220);--match-orange:oklch(76% .17 60);--match-purple:oklch(58% .21 305);--match-gold:oklch(88% .18 90);--match-green:oklch(69% .19 145);--match-coral:oklch(66% .21 25);--match-white:oklch(100% 0 0);--match-depth:oklch(35% .09 160);--match-shadow:0 6px 0 color-mix(in oklch,var(--match-depth),transparent 30%),0 12px 20px color-mix(in oklch,var(--match-depth),transparent 75%);background-image:var(--match-scenery);min-height:100dvh;color:var(--match-ink);font-family:var(--font-display);background-position:50%;background-size:cover;background-attachment:fixed;padding:20px 24px 80px}.match-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;max-width:1050px;margin:auto;display:flex}.match-header h1{color:var(--match-white);background:var(--match-purple);border:3px solid var(--match-paper);box-shadow:var(--match-shadow);border-radius:18px;padding:12px 20px;font-size:28px}.match-stats{background:var(--match-paper);border:3px solid var(--match-gold);border-radius:12px;align-items:center;gap:12px;padding:10px 16px;font-size:17px;font-weight:800;display:flex}.match-stats svg{color:var(--match-orange)}.match-controls{align-items:center;gap:7px;display:flex}.match-controls button,.match-controls a{border:2px solid var(--match-paper);background:var(--match-aqua);width:42px;height:42px;color:var(--match-white);box-shadow:var(--match-shadow);border-radius:12px;place-content:center;display:grid}.match-progress{width:min(100%,1050px);height:12px;accent-color:var(--match-green);margin:22px auto 0;display:block}.match-notice{text-align:center;height:38px;color:var(--match-coral);margin:12px auto 0;font-size:22px;font-weight:900}.match-columns{isolation:isolate;grid-template-columns:1fr 1fr;gap:70px;max-width:1000px;margin:12px auto;display:grid;position:relative}.match-column{flex-direction:column;gap:16px;display:flex}.match-column h2{text-align:center;color:var(--match-ink);background:var(--match-paper);border-radius:8px;padding:8px;font-size:15px;font-weight:900}.match-card{white-space:normal;border:4px solid var(--match-aqua);background:linear-gradient(var(--match-white),var(--match-paper));width:100%;min-height:90px;box-shadow:0 6px 0 var(--match-aqua),0 12px 18px color-mix(in oklch,var(--match-depth),transparent 78%);text-align:center;cursor:pointer;border-radius:14px;padding:18px;font-size:22px;font-weight:800;line-height:1.3;transition:transform .2s,border-color .2s;position:relative}.match-column-right .match-card{border-color:var(--match-orange);box-shadow:0 6px 0 var(--match-orange),0 12px 18px color-mix(in oklch,var(--match-depth),transparent 78%)}.match-card[data-selected=true]{border-color:var(--match-gold);outline:3px solid var(--match-gold);transform:translateY(-5px)}.match-card[data-feedback=wrong]{border-color:var(--match-coral);animation:.3s 2 match-shake}.match-card[data-feedback=correct]{border-color:var(--match-green);box-shadow:0 0 24px var(--match-gold);animation:.65s both match-glow}.match-face-content{overflow-wrap:anywhere;zoom:var(--game-text-scale,1);flex-direction:column;justify-content:center;align-items:center;gap:8px;display:flex}.match-face-content img{object-fit:contain;width:140px;max-width:100%;height:115px}.match-speaker{background:var(--match-purple);width:29px;height:29px;color:var(--match-white);cursor:pointer;border-radius:50%;place-items:center;display:grid;position:absolute;bottom:4px;right:4px}.match-speaker svg{width:17px}.match-connection{pointer-events:none;z-index:1;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.match-connection line{stroke:var(--match-connection-red);stroke-width:3px;stroke-linecap:round}.match-connection circle{fill:var(--match-connection-red)}.memory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;max-width:1040px;margin:24px auto;display:grid}.memory-card{aspect-ratio:1.2;perspective:900px;cursor:pointer;white-space:normal;background:0 0;border:0;width:100%;min-height:145px;padding:0;position:relative}.memory-turn{transform-style:preserve-3d;transition:transform .5s cubic-bezier(.2,.6,.2,1);display:block;position:absolute;inset:0}.memory-card[data-flipped=true] .memory-turn{transform:rotateY(180deg)}.memory-back,.memory-front{backface-visibility:hidden;border:4px solid var(--match-paper);box-shadow:var(--match-shadow);border-radius:16px;justify-content:center;align-items:center;display:flex;position:absolute;inset:0;overflow:hidden}.memory-back{background:linear-gradient(var(--match-aqua),var(--match-purple));color:var(--match-white);font-size:48px;font-weight:900}.memory-back:before{content:"";border:2px solid color-mix(in oklch,var(--match-white),transparent 60%);border-radius:10px;position:absolute;inset:10px}.memory-front{background:var(--match-paper);border-color:var(--match-orange);padding:12px;font-size:22px;font-weight:800;line-height:1.25;transform:rotateY(180deg)translateZ(1px)}.memory-front img{object-fit:contain;width:100%;height:100%;max-height:125px}.memory-card[data-matched=true] .memory-front{border-color:var(--match-green);box-shadow:0 0 16px var(--match-gold),var(--match-shadow)}.memory-card[data-matched=true] .match-face-content{filter:blur(.45px)}.memory-check{color:var(--match-green);width:22px;position:absolute;top:6px;right:6px}.memory-card[data-wrong=true] .memory-front{border-color:var(--match-coral)}.match-complete{text-align:center;background:var(--match-paper);border:5px solid var(--match-gold);max-width:700px;box-shadow:var(--match-shadow);border-radius:20px;margin:24px auto;padding:26px}.match-complete h2{font-size:28px;line-height:1.2}.match-complete>img{object-fit:contain;width:145px;height:125px;margin:10px auto;animation:.8s ease-in-out infinite alternate match-hop}.match-complete p{margin:12px 0;font-size:18px}.match-complete-actions{flex-wrap:wrap;justify-content:center;gap:10px;display:flex}.match-complete-actions button,.match-complete-actions a{background:var(--match-aqua);color:var(--match-white);border:2px solid var(--match-paper);border-radius:12px}.match-confetti{pointer-events:none;z-index:10;position:fixed;inset:0;overflow:hidden}.match-confetti i{background:var(--match-gold);width:9px;height:15px;animation:3s linear infinite match-fall;position:absolute;top:-20px}.match-confetti i:nth-child(3n){background:var(--match-coral)}.match-confetti i:nth-child(3n+1){background:var(--match-aqua)}.match-editor-pair{border-bottom:1px solid var(--border);padding:24px 0}.match-editor-faces{grid-template-columns:1fr 1fr;gap:20px;display:grid}.match-editor-preview{z-index:60;background:var(--background);position:fixed;inset:0;overflow:auto}.match-preview-close{z-index:70;position:fixed;bottom:12px;left:50%;transform:translate(-50%)}@keyframes match-shake{25%{transform:translate(-5px)}75%{transform:translate(5px)}}@keyframes match-glow{50%{box-shadow:0 0 24px var(--match-gold)}}@keyframes match-hop{to{transform:translateY(-10px)}}@keyframes match-fall{to{transform:translateY(110vh)rotate(500deg)}}@media (width<=640px){.match-game{padding:12px 10px 75px}.match-header{gap:12px}.match-header h1{padding:9px 12px;font-size:20px}.match-stats{gap:7px;padding:7px;font-size:12px}.match-controls{gap:6px}.match-controls button,.match-controls a{width:35px;height:35px}.match-controls svg{width:18px}.match-columns{gap:18px;margin-top:8px}.match-column{gap:14px}.match-column h2{font-size:11px}.match-card{border-width:3px;border-radius:11px;min-height:94px;padding:12px 7px 28px;font-size:15px}.match-face-content img{width:100%;height:95px}.memory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.memory-card{aspect-ratio:.8;min-height:105px}.memory-front{border-width:3px;padding:6px;font-size:15px}.memory-back{border-width:3px;font-size:30px}.match-complete h2{font-size:23px}.match-editor-faces{grid-template-columns:1fr}.match-notice{font-size:18px}.match-stats svg{width:16px}}@media (prefers-reduced-motion:reduce){.memory-turn,.match-card{transition:none}.match-card[data-feedback],.match-complete>img,.match-confetti i{animation:none}}.match-progress{appearance:none;border:2px solid var(--match-paper);background:var(--match-paper);border-radius:10px;overflow:hidden}.match-progress::-webkit-progress-bar{background:var(--match-paper)}.match-progress::-webkit-progress-value{background:linear-gradient(90deg,var(--match-green),var(--match-gold));border-radius:8px}.match-progress::-moz-progress-bar{background:var(--match-green)}@media (width<=640px){.match-header{z-index:8;background:color-mix(in oklch,var(--match-paper),transparent 6%);border-radius:12px;padding:7px;position:sticky;top:0}.memory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.memory-card{min-height:var(--memory-height,145px)}.memory-card[data-matched=true]{cursor:default}.match-card:disabled,.memory-card:disabled{opacity:1}@media (width<=640px){.memory-card{min-height:var(--memory-mobile-height,105px)}}.match-columns .match-card{z-index:2;align-items:center;gap:10px;display:flex}.match-columns .match-face-content{flex:1;min-width:0}.match-reference{background:var(--match-aqua);min-width:28px;height:28px;color:var(--match-white);border-radius:50%;flex:none;place-items:center;padding:0 4px;font-size:16px;font-weight:900;display:grid}.match-column-right .match-reference{background:var(--match-orange);color:var(--match-ink)}.match-columns .match-card[data-selected=true]{transform:none}.match-columns .match-card[data-matched=true]{border-color:var(--match-connection-red);box-shadow:0 5px 0 var(--match-connection-red);cursor:default;opacity:1}.match-column h2{z-index:2;position:relative}@media (width<=640px){.match-columns .match-card{gap:6px}.match-reference{min-width:23px;height:23px;padding:0 3px;font-size:12px}.match-columns{gap:26px}}
