/* One complete brush family, with a small current-UI face for fast first paint. */

@font-face{font-family:GardenCalligraphy;src:url('assets/garden-calligraphy-ui.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;unicode-range:U+20-7E,U+D7,U+2013,U+2019,U+2026,U+2212,U+3000-3002,U+300A-300B,U+4E00,U+4E03,U+4E07,U+4E09-4E0B,U+4E0D-4E0E,U+4E16,U+4E1C-4E1D,U+4E24,U+4E2A,U+4E2D,U+4E39-4E3A,U+4E3D,U+4E45,U+4E48,U+4E4B,U+4E50,U+4E5D,U+4E5F-4E60,U+4E7E,U+4E86,U+4E8B-4E8C,U+4E91,U+4E94,U+4EA4,U+4EAC,U+4EAE,U+4EB2,U+4ECE,U+4EE5,U+4EF6,U+4EFB,U+4F18,U+4F1A,U+4F20,U+4F34,U+4F4D,U+4F4F,U+4F53,U+4F55,U+4F59,U+4F5C,U+4F60,U+4F73,U+4F7F,U+4F9B,U+4F9D,U+4FA7,U+4FBF,U+4FDD,U+4FE1,U+4FEF,U+504F,U+505C,U+5143,U+5145,U+5148-5149,U+5165,U+5168,U+516B-516D,U+5171,U+5173,U+5176-5177,U+517D,U+518C-518D,U+519C,U+51A0,U+51AC,U+51B0,U+51BB,U+51C0,U+51C6,U+51D1,U+51DD,U+51E0,U+51E4,U+51ED,U+51FA-51FB,U+5206,U+5217-5218,U+521A-521B,U+521D,U+522B,U+5230,U+5236,U+523A,U+524D,U+5269,U+52A0,U+52A8,U+52FF,U+5305,U+5316,U+5323,U+5341,U+5343,U+5347,U+534E,U+5355,U+535A,U+5361,U+5370,U+5373,U+5377,U+539F,U+53BB,U+53C8,U+53CB-53CD,U+53D6,U+53E0,U+53E4-53E6,U+53EA,U+53EF-53F0,U+53F3,U+53F6-53F7,U+5408,U+540C,U+540E,U+5411,U+5417,U+542B-542C,U+542F,U+5448,U+5468,U+548C,U+54C1,U+54CD,U+54EA,U+5510,U+552F,U+5546,U+557C,U+56DB,U+56DE,U+56E2,U+56ED,U+56FD-56FE,U+571F,U+5728,U+5730,U+573A,U+5757,U+5782,U+57CE,U+57DF,U+57FA,U+586B,U+5883,U+589E,U+58F0,U+5904,U+5907,U+590D,U+590F,U+5916,U+591A,U+591C,U+5927,U+5929,U+5934,U+594F,U+5974,U+597D,U+5982,U+5986,U+59CB,U+5A07,U+5B50,U+5B57-5B58,U+5B83,U+5B89,U+5B8B-5B8C,U+5B9E,U+5BAB,U+5BB9,U+5BC6,U+5BF9-5BFC,U+5BFF,U+5C01,U+5C04,U+5C06,U+5C0F,U+5C16,U+5C31,U+5C3D-5C3E,U+5C40,U+5C42,U+5C55,U+5C5E,U+5DE6,U+5DEE,U+5DF1-5DF2,U+5E02-5E03,U+5E06,U+5E18,U+5E26,U+5E2E,U+5E38,U+5E45,U+5E84,U+5E94-5E95,U+5EA6-5EA7,U+5EAD,U+5ECA,U+5ED3,U+5EFA,U+5F00,U+5F15,U+5F20,U+5F39,U+5F52-5F53,U+5F55,U+5F62,U+5F69,U+5F71,U+5F84-5F85,U+5F88,U+5F8B,U+5F97,U+5FB5,U+5FC3,U+5FC6,U+5FEB,U+600E,U+6025,U+603B,U+6050,U+6062,U+6070,U+610F,U+6148,U+6162,U+620F-6211,U+6216,U+6218,U+6247,U+624B,U+624D,U+6269,U+627E,U+628A,U+62B1,U+62CD,U+62D6,U+62E9,U+62FC,U+62FE-62FF,U+6302,U+6311,U+6362,U+6367,U+6389,U+6392,U+63A5,U+63CF-63D0,U+63ED,U+6446-6447,U+64A4,U+64AD,U+6536,U+653E,U+6545,U+6570,U+6574,U+6587,U+6591,U+659C,U+65B0,U+65B9,U+65CB,U+65E0,U+65E5,U+65E7,U+65F6,U+660E,U+661F-6620,U+6625,U+662F,U+6653,U+665A,U+6668,U+666F,U+6674,U+6682,U+6696-6697,U+66F2,U+66F4,U+66FF-6700,U+6708-6709,U+671F,U+6728,U+672A-672C,U+672F,U+6731,U+6735,U+674E-674F,U+675C,U+675F,U+6765,U+6768,U+6784,U+6797,U+679A,U+679C-679D,U+67D3,U+67E5,U+67F4,U+6811,U+6816,U+6837,U+683C,U+6843,U+6848,U+6885,U+68A2,U+68A6,U+68CB,U+68E0,U+6A59,U+6B21-6B22,U+6B62-6B65,U+6BB5,U+6BCF,U+6BE1,U+6C05,U+6C34,U+6C5F,U+6CA1,U+6CA7,U+6CBF,U+6CD5,U+6CE2,U+6D41,U+6D45,U+6D4E,U+6D6A,U+6D77,U+6D88,U+6DF1,U+6DFB,U+6E05,U+6E10,U+6E29,U+6E38,U+6E56,U+6EAA,U+6ED1,U+6EE1,U+6F0F,U+6F14,U+706B,U+7070,U+70B9,U+70DB,U+70E7,U+7167,U+71B9,U+71D5,U+7231,U+7247-7248,U+724C,U+7261,U+7269,U+7279,U+72EC,U+72F8,U+732B,U+7384,U+738B,U+73A9,U+73AB,U+73AF-73B0,U+73CD,U+73E0,U+7403,U+7434-7436,U+7470,U+74E3,U+74F6,U+751F,U+7528,U+752B,U+7531,U+753B,U+7554,U+7559,U+7565,U+758F,U+767D-767E,U+7684,U+76C8,U+76D6,U+76D8,U+76EE,U+76F4,U+76F8,U+770B,U+771F,U+7740,U+7761,U+77E5,U+77ED,U+77F3,U+781A,U+7834,U+7840,U+78A7,U+793A,U+7965,U+79B9,U+79BD,U+79CB,U+79CD,U+79D2,U+79FB,U+7A0D,U+7A39,U+7A77,U+7A7A,U+7A97,U+7ACB,U+7AD9,U+7AE0,U+7AF9,U+7B14,U+7B19,U+7B1B,U+7B2C,U+7B49,U+7B52,U+7B5D,U+7BA1,U+7BAB,U+7BAD,U+7C07,U+7C27,U+7C7B,U+7C89,U+7CBE,U+7D20,U+7D27,U+7D2B,U+7D2F,U+7EA2,U+7EA7,U+7EAA,U+7EB8-7EB9,U+7EBF,U+7EC3-7EC4,U+7EC6-7EC7,U+7ED3,U+7ED5,U+7ED9,U+7EDF,U+7EE2-7EE3,U+7EE7,U+7EED,U+7EEF,U+7EFD,U+7EFF,U+7F02,U+7F0E,U+7F18,U+7F29,U+7F6E,U+7FBD,U+7FE0,U+7FE9,U+7FFB-7FFC,U+8001,U+800C,U+805A,U+80CC,U+80DC,U+80E1,U+80ED,U+80FD,U+8102,U+811A,U+81EA,U+81F4,U+8212,U+821E,U+8239,U+8258,U+8272,U+827A,U+8282,U+82B1,U+82B3,U+82CF,U+8309,U+8349,U+8377,U+8389,U+83B2,U+83B7,U+83BA,U+83CA,U+83F1,U+8404,U+843D,U+8461,U+84DD,U+8513,U+854A,U+857E,U+85CF,U+85E4,U+864E,U+86EE,U+8774,U+8776,U+884C,U+8863,U+8865,U+8868,U+886C,U+888B,U+8896,U+88AB,U+88C2,U+8936,U+895F,U+8981,U+89C6,U+89C8,U+89D2,U+89E3,U+8BA1,U+8BA4,U+8BA9,U+8BAE,U+8BB0,U+8BBE,U+8BC6,U+8BD5,U+8BED,U+8BF7,U+8BFB,U+8C03,U+8C0A,U+8C31,U+8D4F,U+8D60,U+8D70,U+8D77,U+8DA3,U+8DDF,U+8DEF,U+8DF3,U+8DF9,U+8E2A,U+8EAB,U+8F66,U+8F6C,U+8F6E-8F6F,U+8F7B-8F7D,U+8F89,U+8FA8,U+8FB9,U+8FC7,U+8FCE,U+8FD1,U+8FD4,U+8FD8-8FD9,U+8FDB,U+8FDE,U+8FF7,U+9000-9001,U+9009,U+9010,U+901A,U+904D,U+9053,U+9065,U+906E,U+90A3,U+90BB,U+90E8,U+90FD,U+914D,U+9152,U+91CC-91CD,U+91CF,U+91D1,U+9488,U+94A2,U+94A5,U+94B1,U+94B4,U+94DC,U+94FA,U+9500-9501,U+9519,U+9521,U+9526,U+952E,U+957F,U+95E8,U+95ED-95EE,U+95F2,U+95F4,U+962E,U+9633,U+9635-9636,U+9646,U+9662,U+9664,U+9676,U+9686,U+968F,U+96BE,U+96C0,U+96C6,U+96CF,U+96E8,U+96EA,U+96F6,U+9700,U+9707,U+971E,U+9732,U+9752,U+975B,U+9762,U+97F3,U+97F5,U+9875,U+9879-987A,U+987E,U+9882,U+9884,U+9886,U+989C-989D,U+98CE,U+98D9,U+98DE,U+9986,U+9988,U+9996,U+9999,U+9AD8,U+9C7C,U+9CDE,U+9E1F,U+9E45,U+9EC4,U+9F50,U+FF01,U+FF0C,U+FF1A-FF1B,U+FF1F}
/* All Chinese interface and poetry text uses the same complete brush family. */
html:lang(zh) body,html:lang(zh) button,html:lang(zh) select,html:lang(zh) option,html:lang(zh) label,html:lang(zh) p,html:lang(zh) cite,html:lang(zh) small,html:lang(zh) h1,html:lang(zh) h2,html:lang(zh) h3,html:lang(zh) a,html:lang(zh) .map-node span,html:lang(zh) .coach p,html:lang(zh) .coach small,html:lang(zh) .tool-caption{font-family:GardenCalligraphy,'KaiTi','STKaiti',serif!important;font-weight:400!important;font-synthesis:none}
html:lang(zh) .flower-poem p{font-family:GardenCalligraphy,'KaiTi',serif!important;font-size:23px;line-height:1.55;letter-spacing:.025em}
html:lang(zh) .flower-poem cite{font-size:14px;line-height:1.5;margin-top:7px}
html:lang(zh) .primary,html:lang(zh) .hub-action{font-family:GardenCalligraphy,'KaiTi',serif!important;font-size:24px}
html:lang(zh) .map-node span{font-size:15px;line-height:1.3}
html:lang(zh) .map-node em{font-family:GardenCalligraphy,'KaiTi',serif;font-size:12px}
html:lang(zh) .game>.status,html:lang(zh) .map-summary{font-size:14px}
html:lang(zh) .hub-inner>small{font-family:GardenSerif,Georgia,serif!important}
.wallet b,.reward-hud b,.coin-reward b,.game footer .tool b{font-family:GardenSerif,Georgia,serif!important;font-weight:400!important}
/* A transient lock must not fade the Home/settings controls. */
.game header .icon-button,.game header .icon-button:disabled{opacity:1;filter:none}
#home svg{width:24px;height:24px;stroke-width:2.15;color:#734520;filter:drop-shadow(0 1px #fff0cb)}
/* Separate complete layers keep entry work bounded even on large late-game boards. */
.tile-layer{position:absolute;inset:0;pointer-events:none;transform-origin:center;overflow:visible}
.tile-layer>.tile{pointer-events:auto}
/* Compact result card; its top-layer balance stays visible during coin collection. */
dialog.won{width:min(90vw,400px);max-height:calc(100svh - 140px);padding:18px 22px;overflow:visible}
dialog.won::backdrop{backdrop-filter:none;background:#39271669}
dialog.won .result-content{max-height:calc(100svh - 180px);overflow:auto;scrollbar-width:thin}
dialog.won .result-content>small{font-size:13px;letter-spacing:1px}
dialog.won .result-content>h2{font-size:33px;margin:7px 0 5px}
dialog.won .result-content>.reward{width:104px;height:104px;margin:7px auto}
dialog.won .flower-poem{margin:8px auto 10px}
dialog.won .coin-reward{border:0;border-radius:0;background:none;box-shadow:none;padding:0;margin:12px auto 10px;gap:8px}
dialog.won .coin-reward>.cash-coin{width:42px;height:42px}
dialog.won .coin-reward>b{font-size:29px}
dialog.won .primary{margin:12px 0 9px;padding:10px 12px;font-size:24px}
dialog.won .restart{margin-top:7px;font-size:15px}
.reward-hud{position:fixed;display:flex;align-items:center;justify-content:center;gap:5px;z-index:8;pointer-events:none;color:#755125;border-radius:5px;background:#f4e7cced;box-shadow:0 0 0 5px #f4e7cced}
.reward-hud>.cash-coin{width:28px;height:28px}
.reward-hud b{font-size:16px}
.reward-flight.cash-coin{z-index:20;width:36px;height:36px;margin:-18px 0 0 -18px;filter:drop-shadow(0 2px 2px #70482166)}
/* Soft petals and little gold stars mark a completed set without adding another sound. */
.match-spark.flower-petal,.match-spark.gold-star{width:8px;height:12px;border-radius:85% 5% 80% 10%;background:linear-gradient(140deg,#fff0c9,hsl(var(--hue) 60% 65%));box-shadow:0 0 3px #f5d49366;animation:petals-in-bloom .78s ease-out both}
.match-spark.gold-star{width:8px;height:8px;border-radius:0;clip-path:polygon(50% 0,62% 35%,100% 50%,62% 64%,50% 100%,36% 64%,0 50%,36% 35%);background:#e5ba5f}
@keyframes petals-in-bloom{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}15%{opacity:1}70%{opacity:.95}100%{transform:translate(var(--dx),var(--dy)) rotate(var(--turn)) scale(.75);opacity:0}}
/* A few quiet stems and petals move at the edge of the cloth, away from the puzzle. */
main{position:relative;z-index:1}
.garden-breeze{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.breeze-sprig{position:absolute;width:70px;height:150px;color:#617b73;opacity:.2;transform-origin:50% 100%;animation:stem-breeze 7.5s ease-in-out infinite alternate}
.breeze-sprig.left{left:-24px;top:38%}.breeze-sprig.right{right:-25px;top:57%;animation-delay:-3.3s;transform:scaleX(-1)}
.drifting-petal{position:absolute;width:6px;height:13px;border-radius:85% 0 85% 0;background:linear-gradient(135deg,#c17360aa,#dfab8a55);opacity:.4;animation:petal-breeze 11s ease-in-out infinite alternate}
.drifting-petal.one{left:5%;top:27%}.drifting-petal.two{right:5%;top:61%;animation-delay:-4s}
@keyframes stem-breeze{from{rotate:-1.5deg;translate:0 0}to{rotate:2deg;translate:1px -2px}}
@keyframes petal-breeze{from{transform:translate(0,0) rotate(-25deg);opacity:.25}to{transform:translate(6px,9px) rotate(25deg);opacity:.5}}
@media(max-width:380px){.reward-hud>.cash-coin{width:24px;height:24px}.reward-hud b{font-size:14px}dialog.won{padding:14px 17px}dialog.won .result-content>.reward{width:86px;height:86px}html:lang(zh) dialog.won .flower-poem p{font-size:21px}dialog.won .primary{font-size:22px}}
@media(max-height:650px){dialog.won .result-content>.reward{width:78px;height:78px}dialog.won .flower-poem{margin:5px auto}dialog.won .coin-reward{margin:7px auto}dialog.won .result-content>h2{font-size:29px;margin:4px 0}dialog.won .primary{margin:8px 0 6px}html:lang(zh) dialog.won .flower-poem p{font-size:21px}}
@media(prefers-reduced-motion:reduce){.breeze-sprig,.drifting-petal,.match-spark.flower-petal,.match-spark.gold-star{animation:none!important}.garden-breeze{display:none}}
/* The unlocked/reward flower is immediately visible; the panel already provides the transition. */
dialog.won .reward{animation:none!important}
/* The burst lives inside the dialog's top layer, so its backdrop cannot hide it. */
.victory-bloom{position:fixed;inset:0;pointer-events:none;z-index:6;overflow:hidden}
.victory-petal,.victory-glint,.victory-ripple{position:absolute;display:block;pointer-events:none}
.victory-petal{width:10px;height:16px;border-radius:85% 10% 80% 20%;background:var(--petal);box-shadow:inset 1px 1px 2px #ffe5c7aa;animation:victory-scatter 1.55s cubic-bezier(.15,.55,.35,1) var(--delay) both}
.victory-glint{width:9px;height:9px;background:#bf8c38;clip-path:polygon(50% 0,61% 37%,100% 50%,61% 63%,50% 100%,39% 63%,0 50%,39% 37%);animation:victory-scatter 1.4s ease-out var(--delay) both}
.victory-ripple{width:100px;height:100px;border:1px solid #c3a16488;border-radius:50%;background:radial-gradient(circle,transparent 55%,#efcb8266 70%,transparent 74%);animation:victory-ripple 1.3s ease-out both}
@keyframes victory-scatter{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}12%{opacity:.85}65%{opacity:.8}100%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy) + 35px)) rotate(var(--turn)) scale(.7);opacity:0}}
@keyframes victory-ripple{from{transform:translate(-50%,-50%) scale(.65);opacity:0}20%{opacity:.75}to{transform:translate(-50%,-50%) scale(2.6);opacity:0}}
@media(prefers-reduced-motion:reduce){.victory-bloom{display:none}}

/* Crop both entry pictures inside the same frame; image proportions never size a card. */
.hub-picture{contain:size}
.hub-scenery{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hub-card:nth-child(2) .hub-scenery{object-position:center 52%}
@media(max-width:600px){
 .hub-card,html[lang=en] .hub-card{grid-template-columns:36% minmax(0,1fr);grid-template-rows:22px 34px 42px 40px;column-gap:17px;row-gap:6px;padding:18px 15px}
 .hub-picture,html[lang=en] .hub-picture{grid-row:1/5;align-self:stretch;height:auto;min-height:0;margin:0}
 .hub-card h2{font-size:27px}
 html[lang=en] .hub-card small{font-size:9px;white-space:normal}
 html[lang=en] .hub-card{grid-template-rows:22px 34px 64px 46px}
 html[lang=en] .hub-card h2{font-size:21px;white-space:normal}
 html[lang=en] .hub-action{font-size:15px!important;padding:8px 9px;white-space:normal}
}
@media(max-width:380px){
 .hub-card,html[lang=en] .hub-card{grid-template-columns:32% minmax(0,1fr);column-gap:12px;padding:16px 12px}
 .hub-card h2{font-size:24px}
 .hub-card p,html[lang=en] .hub-card p{font-size:12px}
 html[lang=en] .hub-card h2{font-size:19px}
 .hub-action{padding:7px 12px}
 .hub-flowers img{width:27px;height:33px}
}



/* Let the illustrations, game names and actions carry the home screen. */
.hub-inner{max-width:980px;padding:96px 28px 32px}.hub-brand{display:block;font:22px Georgia,serif;letter-spacing:4px;margin:0 0 35px}.hub-title{margin:0 0 28px!important}.hub-choices{gap:28px}.hub-card{display:flex;flex-direction:column;align-items:stretch;padding:22px;gap:20px;min-height:0}#game-hub .hub-picture{width:100%;min-height:0;height:260px;aspect-ratio:auto;margin:0;flex:none}.hub-card h2{margin:0;line-height:1.2;white-space:normal}.hub-action{align-self:center;min-width:140px;margin:0;padding:10px 26px}.composer-entry{display:block;width:fit-content;margin:28px auto 0;font-size:19px}.map-header:has(>small:empty){padding-top:16px}
@media(max-width:650px){.hub-inner{padding:88px 20px 28px}.hub-brand{font-size:18px;margin-bottom:26px}.hub-card,html[lang=en] .hub-card{display:grid;grid-template-columns:38% minmax(0,1fr);grid-template-rows:1fr 1fr;column-gap:16px;row-gap:8px;padding:16px;min-height:162px;align-items:center}#game-hub .hub-picture{grid-column:1;grid-row:1/3;align-self:stretch;width:100%;height:142px;margin:0}.hub-card h2,html[lang=en] .hub-card h2{grid-column:2;grid-row:1;font-size:24px;margin:0;align-self:end}.hub-action,html[lang=en] .hub-action{grid-column:2;grid-row:2;justify-self:center;align-self:start;min-width:94px;font-size:18px!important;padding:7px 17px;margin:7px 0 0}.composer-entry{font-size:18px;margin-top:24px}}
@media(max-width:380px){.hub-card,html[lang=en] .hub-card{grid-template-columns:34% minmax(0,1fr);column-gap:13px;padding:12px}.hub-card h2,html[lang=en] .hub-card h2{font-size:21px}#game-hub .hub-picture{height:128px}.hub-action,html[lang=en] .hub-action{font-size:17px!important;min-width:84px}}
#game-hub .hub-brand{font-size:18px;line-height:1.5;letter-spacing:4px}

/* Quiet play header: Home on the left, wallet and settings on the right. */
.game header .header-actions{margin-left:auto}
#home{position:relative;padding:0}
#home svg{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);display:block;margin:0}
/* Each couplet keeps two complete lines; fit() sizes the text to its real width. */
.flower-poem{width:100%;max-width:none}
.flower-poem .poem-line{display:block;white-space:nowrap}

/* Keep every slot inside the illustrated tray's cloth well and above its flowers. */
.game>#tray{aspect-ratio:1600/368;min-height:0;height:auto;padding:3% 3.8% 5.6%;gap:3px;align-items:center}
.game>#tray>.slot{position:relative;min-width:0;min-height:0;width:100%;aspect-ratio:1;align-self:center}
.game>#tray .held-card{inset:0}
.difficulty-rise{position:fixed;inset:0;z-index:2050;display:grid;place-items:center;pointer-events:none;background:radial-gradient(ellipse,#f5e6cbbb,transparent 68%)}
.difficulty-rise span{max-width:min(88vw,620px);padding:18px 22px;border-block:3px solid #924b32;color:#8e3f2b;background:#f5e5cbe8;text-align:center;font:600 clamp(28px,5vw,54px)/1.12 GardenSerif,Georgia,serif;letter-spacing:.035em;text-shadow:0 2px #fff4d8;box-shadow:0 4px 30px #58351722}
html:lang(zh) .difficulty-rise span{font-family:GardenCalligraphy,'KaiTi',serif;font-size:clamp(38px,7vw,66px)}
.music-fields .volume-control{display:grid;align-content:space-between;gap:8px}
.music-volume{width:100%;height:34px;accent-color:#95613f;margin:0}



/* Mystery tiles conceal only their fixed motif; the wooden body stays readable. */
.mystery-mark{position:absolute;inset:8% 12% 20%;display:block;pointer-events:none;color:#214e60}
.mystery-mark svg{width:100%;height:100%;overflow:visible;transform:rotate(-7deg)}.mystery-brush{fill:currentColor}
.tile.pattern-covered .mystery-mark{visibility:hidden}

/* Wooden covers borrow the tray's warm walnut and brass; an opened lid reveals ivory. */
.wood-lid{position:absolute;inset:4% 5% 13%;display:block;pointer-events:none;filter:drop-shadow(0 2px 1px #39221466)}
.wood-lid svg{display:block;width:100%;height:100%}
.tile.wood-box{filter:none;cursor:default}
.tile.wood-box.covered{filter:brightness(.86)}
.tile.pattern-covered .wood-lid{visibility:hidden}
.box-lid-flight{position:fixed;z-index:1005;pointer-events:none;transform-origin:50% 8%}
.box-revealed{outline:2px solid #d5ac53;outline-offset:1px}
/* Three distinct, high-contrast bursts stay anchored to the matched tile positions. */
.match-flare{position:fixed;display:block;z-index:1102;pointer-events:none;background:#fff8d5;filter:drop-shadow(0 0 4px #fff4c1) drop-shadow(0 1px 1px #a26320);clip-path:polygon(50% 0,60% 35%,93% 12%,68% 44%,100% 50%,66% 60%,87% 90%,58% 67%,50% 100%,40% 67%,10% 88%,33% 57%,0 50%,35% 40%,12% 10%,42% 35%);animation:match-flare-pop .6s ease-out both}
.match-spark.gold-star{background:#fff0a9;box-shadow:none;filter:drop-shadow(0 1px 1px #995b22) drop-shadow(0 0 3px #f2c66b);animation:matched-stars .72s cubic-bezier(.1,.6,.25,1) both}
.match-spark.flower-petal{background:linear-gradient(140deg,#ffe8bb,#b95b49);animation:matched-stars .72s cubic-bezier(.1,.6,.25,1) both}
@keyframes match-flare-pop{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}15%{transform:translate(-50%,-50%) scale(1);opacity:1}45%{opacity:1}100%{transform:translate(-50%,-50%) scale(1.3) rotate(35deg);opacity:0}}
@keyframes matched-stars{0%{transform:translate(-50%,-50%) scale(.25);opacity:0}10%{opacity:1}65%{opacity:1}100%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(var(--turn)) scale(.65);opacity:0}}
@media(prefers-reduced-motion:reduce){.match-flare{animation:none;transform:translate(-50%,-50%);opacity:.9}.match-spark{display:none}}

.lesson-box{display:block;position:relative;width:68px;height:68px;margin:0 auto 10px}
.pair-ribbon{position:absolute;display:block;pointer-events:none;transform:translate(-50%,-50%);filter:drop-shadow(0 1px 1px #6b372877)}
.pair-ribbon.vertical{transform:translate(-50%,-50%) rotate(90deg)}
.pair-ribbon svg{display:block;width:100%;height:100%;overflow:visible}
.linked-tile:not(.covered){outline:1px solid #bd7855;outline-offset:-3px}
.ice-shell{position:absolute;inset:3% 4% 12%;display:block;pointer-events:none;filter:drop-shadow(0 1px 1px #6097af77)}
.ice-shell svg{display:block;width:100%;height:100%}
.ice-shell.cracked{background:radial-gradient(ellipse,#edfaff22,#9fcfe522);border-radius:12%}
.ice-flight{position:fixed;z-index:1006;pointer-events:none}
.ice-chip{position:fixed;z-index:1100;width:9px;height:13px;background:#d4effbcc;clip-path:polygon(10% 0,100% 25%,80% 100%,0 75%);pointer-events:none;animation:ice-scatter .44s ease-out both}
.ice-revealed{outline:2px solid #a3d9ed;outline-offset:-2px}
@keyframes ice-scatter{from{transform:translate(-50%,-50%) rotate(0);opacity:1}to{transform:translate(var(--dx),var(--dy)) rotate(85deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.ice-chip{display:none}}


/* A shared satin binding and substantial knot make the pair read as one object. */
.linked-tile:not(.covered){outline:2px solid #c16a43;outline-offset:-3px;box-shadow:0 2px 3px #60331c77,0 0 0 2px #f1d59d66}
.pair-ribbon{filter:drop-shadow(0 2px 1px #672c2599)}
.pair-ribbon svg{overflow:visible}
/* Small staggered firework centres; varied embers arc and fall instead of identical stars. */
.match-flare.firework-core{border-radius:50%;clip-path:none;background:#fff4c9;filter:none;box-shadow:0 0 8px 3px #edc97599;animation:firework-core .32s ease-out var(--delay) both}
.firework-ring{position:fixed;z-index:1101;pointer-events:none;border:1px solid #efcf84;border-radius:50%;animation:firework-ring .46s ease-out var(--delay) both}
.match-spark.firework-ember{background:var(--spark);border-radius:35%;box-shadow:0 0 3px var(--spark);filter:drop-shadow(0 1px 1px #8a572766);animation:firework-flight var(--duration) cubic-bezier(.12,.5,.3,1) var(--delay) both}
.match-spark.firework-ember.gold-star{border-radius:0;clip-path:polygon(50% 0,62% 35%,100% 50%,62% 64%,50% 100%,36% 64%,0 50%,36% 35%)}
@keyframes firework-core{0%{transform:translate(-50%,-50%) scale(.4);opacity:0}20%{transform:translate(-50%,-50%) scale(1);opacity:.9}100%{transform:translate(-50%,-50%) scale(1.8);opacity:0}}
@keyframes firework-ring{from{transform:translate(-50%,-50%) scale(.15);opacity:.7}to{transform:translate(-50%,-50%) scale(1.5);opacity:0}}
@keyframes firework-flight{0%{transform:translate(-50%,-50%) rotate(var(--turn)) scale(.3);opacity:0}12%{opacity:1}55%{transform:translate(calc(-50% + var(--mx)),calc(-50% + var(--my))) rotate(var(--turn)) scale(1);opacity:.95}100%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(var(--turn)) scale(.3);opacity:0}}
@media(prefers-reduced-motion:reduce){.firework-ring,.firework-ember{display:none}.match-flare.firework-core{animation:none;transform:translate(-50%,-50%);box-shadow:none;opacity:.65}}



@font-face{font-family:GardenCalligraphy;src:url("assets/garden-calligraphy-collection.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap;unicode-range:U+300C-300D,U+4E1A,U+4E3E,U+4E66,U+4E8E,U+4E92,U+4E9B,U+4EBA,U+4ECB,U+4ED3,U+4ED6,U+4ED9,U+4EE3,U+4F0F,U+4F38,U+4F46,U+4F5B,U+503C,U+50CF,U+5112,U+5185,U+5207,U+5219,U+523B,U+5251,U+5254,U+52BF,U+52FE,U+5349,U+5386,U+53CA,U+53E3,U+5404,U+5409,U+540D,U+5438,U+547C,U+559C,U+5668,U+56E0,U+56F4,U+5706,U+5708,U+5747,U+578B,U+58A8,U+58C1,U+591F,U+592E,U+59FF,U+5B98,U+5B9A,U+5B9D,U+5BA3,U+5BB4,U+5BB6,U+5BBD,U+5BC4,U+5BCC,U+5BDF,U+5C71,U+5C81,U+5DDE,U+5E76,U+5E78,U+5E7F,U+5E86,U+5E9C,U+5EF6,U+5F0F,U+5F26-5F27,U+5FB7,U+5FBD,U+606F,U+613F,U+623F-6240,U+6258,U+62E2,U+6390,U+63D2,U+6491,U+652F,U+653F,U+6559,U+6563,U+658B,U+6599,U+65C1,U+670D,U+671B,U+671D,U+6761,U+676F,U+677F,U+67B6,U+67F1,U+67FF,U+6807,U+6838,U+6846,U+68A8,U+68B5,U+695A,U+69B4,U+6A80,U+6B3E,U+6BD4,U+6C14,U+6C49,U+6CE8,U+6E90,U+6F06,U+7259,U+7280,U+72B6,U+7389,U+73D0,U+7405,U+74F7,U+76D2,U+7814,U+788E,U+7897,U+789F,U+798F,U+79F0,U+7A57,U+7A76,U+7A91,U+7AEF,U+7B56,U+7B80,U+7E41,U+7EA6,U+7EB3,U+7EBD,U+7ECD,U+7ED8,U+7EF5,U+7F00,U+7F16,U+7F1A,U+7F20,U+7F38,U+7F50,U+7F8E,U+8005,U+80A0,U+81F3,U+8482,U+84C4,U+87BA,U+87E0,U+88C5,U+897F,U+89C1-89C2,U+89C4,U+8BB8,U+8BCD,U+8BE5,U+8BF4,U+8C61,U+8C8C,U+8D28,U+8D44,U+8DB3,U+8F74,U+8F83,U+8FD0,U+9020,U+9192,U+91C9,U+94AE,U+94BF,U+94FE,U+9508,U+955C,U+9576,U+9605,U+9614,U+9648,U+9650,U+96D5,U+975E,U+9888,U+9898,U+9970,U+9AA8,U+9C9C,U+9E21,U+9E7F,U+9E92,U+9E9F,U+9ED1,U+9F99}
