:root{color-scheme:light;--ink:#35274c;--soft:#756585;--purple:#64438d;--line:#c7b7d7;--cream:#fff1dc;font-family:"Hiragino Sans","Yu Gothic","Meiryo",system-ui,sans-serif;color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100svh;background-color:#eee7f9;background-image:radial-gradient(ellipse at 8% 17%,#e9d9f3 0,transparent 49%),radial-gradient(ellipse at 94% 84%,#dcdff7 0,transparent 54%),radial-gradient(#baa5ca55 .8px,transparent .9px);background-size:auto,auto,8px 8px}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible,canvas:focus-visible,summary:focus-visible{outline:3px solid #915393;outline-offset:4px}
button:disabled{cursor:default;opacity:.46}button .ico{pointer-events:none}
.ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
button{transition:background .15s,transform .15s,box-shadow .15s}button:active:enabled{transform:translateY(1px)}
.wrap{max-width:1136px;margin:0 auto;padding:0 42px 36px}.mast{height:96px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #65507734}.wordmark{display:flex;align-items:center;gap:12px}.bloom{width:43px;height:43px;image-rendering:pixelated}.brand{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-style:italic;font-size:clamp(29px,3vw,39px);line-height:1.1;letter-spacing:-.07em;color:#412f56}.divider{display:block;width:1px;height:20px;background:#ac95b5;margin:0 2px 0 8px}.brand-ja{font-size:13px;letter-spacing:.12em;color:#73637e;font-weight:650}
.header-buttons{display:flex;align-items:center;gap:9px}.icon-btn,.help-button,.light-btn{border:1px solid #b7a5c6;background:#fcf8ffba;display:inline-flex;align-items:center;justify-content:center;gap:7px;box-shadow:0 2px 0 #b9aac364;font-weight:650}
.icon-btn{width:39px;height:39px;border-radius:13px}.help-button{height:39px;padding:0 14px;border-radius:13px;font-size:13px}.icon-btn:hover,.help-button:hover,.light-btn:hover{background:#fff}
.stage{display:grid;grid-template-columns:minmax(0,1.48fr) minmax(0,1fr);align-items:start;gap:clamp(26px,4vw,58px);padding-top:clamp(32px,5.6vh,64px)}
.board-panel{min-width:0}.board-shell{position:relative;padding:clamp(10px,1.1vw,16px);border:1.5px solid #a78aba;border-radius:19px;background:linear-gradient(145deg,#fbf4ff,#e4d5ee 65%,#d9c6e6);box-shadow:inset 0 2px 0 #fff9,inset 0 -3px 0 #c6b1d3,0 4px 0 #b5a3c4,0 14px 28px -12px #69528080}
.stud{position:absolute;width:4px;height:4px;border-radius:50%;background:#af95bf;box-shadow:inset 0 1px 1px #917a9b,0 1px 0 #fff9}.tl{top:5px;left:6px}.tr{top:5px;right:6px}.bl{bottom:5px;left:6px}.br{bottom:5px;right:6px}
.viewport{width:100%;aspect-ratio:1;position:relative;overflow:hidden;border:2px solid #6e617b;border-radius:6px;background:#475c76;box-shadow:0 0 0 2px #fff9;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ab91b9 #e7d8ec}
.viewport.zoomed{overflow:auto}.board{width:100%;aspect-ratio:1;display:block;cursor:pointer;touch-action:manipulation}.zoomed .board{width:200%;max-width:none;touch-action:pan-x pan-y}
.board-tools{display:flex;align-items:center;justify-content:space-between;margin-top:19px;gap:10px}.chips{display:flex;gap:4px;align-items:center}.chips canvas{display:block;width:15px;height:15px}.board-actions{display:flex;gap:12px}.text-btn{display:inline-flex;gap:6px;align-items:center;justify-content:center;border:0;background:transparent;font-size:13px;font-weight:650;color:#665374;padding:5px 2px}.text-btn:hover{color:#432d65}.text-btn .ico{width:16px;height:16px}
.side{display:flex;flex-direction:column;gap:24px;min-width:0;padding:6px 0}.title-line{display:flex;align-items:center;gap:12px;margin-bottom:13px}.motif{width:52px;height:52px;display:block;image-rendering:pixelated;flex-shrink:0}.title-inner{display:flex;flex-direction:column;gap:5px}.subhead{margin:0;font-size:11px;letter-spacing:.18em;font-weight:750;color:#7b6b88}.puzzle-title{margin:0;font-size:clamp(25px,2.7vw,37px);line-height:1.25;letter-spacing:.035em;font-weight:800}
.score{padding:14px 1px 0;border-top:1px solid #b49fc14d}.scoreline,.score-caption{display:flex;align-items:baseline;justify-content:space-between}.score-label{font-weight:700;font-size:13px;display:flex;align-items:baseline;gap:9px}.percent{font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;font-size:24px;line-height:1;color:#694582;letter-spacing:-.055em;font-weight:800;font-variant-numeric:tabular-nums}.percent small{font-size:13px;margin-left:2px}.moves{font-size:13px;color:#74647d;font-variant-numeric:tabular-nums}.moves strong{color:var(--ink);font-size:15px}
.track{height:10px;border-radius:8px;background:#dbd1e7;box-shadow:inset 0 1px 2px #8c799637;overflow:hidden;margin:10px 0 0}.bar{display:block;height:100%;width:0;border-radius:8px;transition:width .42s;background:repeating-linear-gradient(135deg,#bb8cbe 0 7px,#c69dc9 7px 13px);box-shadow:inset 0 -1px 0 #a97bb1}
.traybox{padding:18px 17px 19px;border:1.5px solid #bea9b2;border-radius:22px;background:linear-gradient(160deg,#fff6e8,#ffead8);box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 #ebd5c4,0 4px 0 #cbb6bb,0 10px 22px -15px #72557099}
.tray-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 14px}.tray-title h2{margin:0;display:flex;gap:8px;align-items:center;color:#624756;font-size:16px;letter-spacing:.055em}.tray-title .ico{width:18px;height:18px}.tray-count{font:650 12px/1.4 ui-monospace,"SFMono-Regular",Consolas,monospace;letter-spacing:.03em;color:#7b6168}
.tray{width:100%;display:block;aspect-ratio:13/5;cursor:pointer;touch-action:manipulation}
.button-row{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:12px}.primary-btn,.light-btn{display:flex;align-items:center;justify-content:center;gap:9px;min-height:45px;border-radius:13px;font-size:14px;font-weight:700}.primary-btn{color:white;background:#71518e;border:1px solid #604378;box-shadow:inset 0 1px 0 #ffffff30,0 3px 0 #51376b}.primary-btn:hover{background:#674681}.light-btn{box-shadow:inset 0 1px 0 #fff,0 3px 0 #c4b4d0}.secondary-actions{display:flex;justify-content:space-between;margin-top:8px}.secondary-actions .text-btn{min-height:36px;padding-inline:8px}
.dialog{padding:0;border:1px solid #bbabc7;border-radius:23px;background:#fffbff;color:var(--ink);width:min(410px,calc(100% - 36px));max-height:88svh;box-shadow:0 8px 0 #b7a5be,0 24px 75px #39294d55}.dialog::backdrop{background:#32284166;backdrop-filter:blur(4px)}.modal-body{position:relative;padding:29px 26px 23px}.modal-close{position:absolute;right:13px;top:13px;border:none;background:#eee7f4;width:32px;height:32px;border-radius:10px;display:grid;place-items:center}.dialog h2{font-size:24px;margin:3px 28px 19px 0;letter-spacing:.025em}.dialog p{font-size:14px;line-height:1.85;margin:12px 0}.dialog ol{list-style:none;padding:0;margin:0 0 20px;counter-reset:steps}.dialog li{position:relative;padding-left:34px;margin:15px 0;font-size:14px;line-height:1.75;counter-increment:steps}.dialog li:before{content:counter(steps);position:absolute;left:0;top:1px;width:23px;height:23px;border-radius:8px;background:#eee5f6;text-align:center;font-size:12px;font-weight:750;color:#805f98;padding-top:1px}.dialog li strong{display:block}.dialog .primary-btn{width:100%}.goal-canvas{display:block;width:100%;aspect-ratio:1;border-radius:5px;border:2px solid #81708a}.modal-actions{display:flex;gap:10px;margin-top:18px}.modal-actions button{flex:1}.dialog .light-btn{padding:0 12px}.modal-flower{width:76px;height:76px;display:block;image-rendering:pixelated;margin:0 auto 10px}.win{text-align:center}.win h2{margin-right:0}.win .primary-btn{margin-top:18px}
#particles{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}.symbol-bank{position:absolute;width:0;height:0;overflow:hidden}
@media(min-width:1250px){.stage{padding-top:clamp(42px,7vh,74px)}}@media(max-width:840px) and (min-width:701px){.wrap{padding-left:22px;padding-right:22px}.stage{gap:22px;grid-template-columns:1.22fr 1fr}.side{gap:15px}.traybox{padding:13px}.board-actions{gap:7px}.chips{gap:2px}.chips canvas{width:12px;height:12px}}
@media(max-width:700px){.wrap{max-width:540px;margin:auto;padding:0 15px max(21px,env(safe-area-inset-bottom))}.mast{height:63px}.wordmark{gap:7px}.bloom{width:33px;height:33px}.brand{font-size:29px}.divider,.brand-ja{display:none}.header-buttons{gap:6px}.help-button,.icon-btn{height:33px;border-radius:10px}.icon-btn{width:34px}.help-button{font-size:12px;padding:0 10px}.help-button .ico,.icon-btn .ico{width:16px;height:16px}
.stage{display:flex;flex-direction:column;gap:0;padding-top:18px}.side{display:contents}.info{order:0;width:100%;display:grid;grid-template-columns:1fr minmax(110px,37%);column-gap:10px;align-items:center;margin-bottom:12px}.title-line{margin:0;gap:8px}.motif{width:33px;height:33px}.title-inner{gap:3px}.puzzle-title{font-size:21px;letter-spacing:.015em}.subhead{font-size:9px}.score{padding:0;border:0}.score-label{font-size:10px;gap:5px}.percent{font-size:17px}.percent small{font-size:10px}.moves{font-size:10px}.moves strong{font-size:11px}.track{height:6px;margin-top:5px}.board-panel{order:1;width:100%}.board-shell{padding:8px;border-radius:13px}.viewport{border-width:1px;border-radius:3px}.stud{width:3px;height:3px}.tl,.tr{top:3px}.bl,.br{bottom:3px}.board-tools{margin:9px 2px 0}.board-actions{gap:12px}.text-btn{font-size:12px;padding:2px}.chips{gap:3px}.chips canvas{width:12px;height:12px}.traybox{order:2;width:100%;margin-top:11px;padding:11px 14px 13px;border-radius:17px}.tray-title{margin:0 2px 6px}.tray-title h2{font-size:14px}.tray-title .ico{width:15px;height:15px}.tray-count{font-size:11px}.play-actions{order:3;width:100%;margin-top:14px}.button-row{margin-top:9px}.primary-btn,.light-btn{min-height:39px;font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}

.level-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(min-width:720px){
  .dialog:has(.level-grid){width:min(720px,calc(100% - 36px))}
  .level-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.level-card{border:1px solid #c9b9d2;border-radius:14px;padding:10px 9px 11px;background:#fbf6fd;text-align:left;display:grid;grid-template-columns:1fr;align-content:start;gap:4px;box-shadow:0 2px 0 #d4c6da}
.level-card[aria-current="true"]{border-color:#846299;box-shadow:inset 0 0 0 1px #846299,0 2px 0 #b7a0c7;background:#f6edf9}.level-card:hover{background:#f3e9f6}
.preview-mosaic{width:100%;max-width:86px;aspect-ratio:1;margin:3px auto 5px;display:block;image-rendering:pixelated}.level-index{font-size:10px;color:#7a6288;letter-spacing:.11em;font-weight:750}.level-name{font-size:14px;line-height:1.4;font-weight:750}.level-detail{font-size:11px;color:#726179;line-height:1.6}.win .text-btn{margin-top:15px}
.level-best{font-size:12px;font-weight:750;color:#594269;font-variant-numeric:tabular-nums}
.board-tools{flex-wrap:wrap}
.board-actions{margin-inline-start:auto}
.board-actions .guides-toggle{padding-inline:7px;border:1px solid #bda8ca;border-radius:7px}
.board-actions .guides-toggle[aria-pressed="true"]{background:#71518e;border-color:#604378;color:white}
@media(max-width:700px){.board-actions{gap:7px}}

.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.points-hud{display:flex;align-items:center;gap:10px;min-height:60px;margin:17px 0 13px;padding:9px 14px;border:1px solid #c9b5cb;border-radius:13px;background:linear-gradient(110deg,#fff7e8,#fbf2fa 80%);box-shadow:inset 0 1px 0 #fff9}
.points-title{display:flex;align-items:center;gap:5px;color:#67516f;font-size:13px;font-weight:720;white-space:nowrap}.points-title .ico{width:21px;height:21px;stroke:#aa7442;fill:#faddaa}
.points-total{display:flex;align-items:baseline;gap:3px;font-variant-numeric:tabular-nums}.points-total strong,.final-points{font-family:ui-rounded,system-ui,sans-serif;font-size:clamp(24px,3vw,35px);font-weight:780;line-height:1;letter-spacing:-.05em;color:#4e355e}.points-total small{font-size:12px;color:#735e7a;font-weight:650}
.points-feedback{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px 8px;margin-left:auto;min-width:0}
.points-change{font:700 13px/1.3 system-ui,sans-serif;color:#397450;text-align:right;font-variant-numeric:tabular-nums}.points-change[data-sign="minus"]{color:#a03e5f}.points-change:empty{display:none}
.best-mark{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:1px solid #d8ad58;border-radius:6px;background:#fff2c5;color:#694616;font-size:11px;font-weight:800;line-height:1.4;white-space:nowrap}
.best-mark[hidden]{display:none}
.score{border-top:0;padding-top:0}.undo-cost{font-size:11px;white-space:nowrap;font-weight:650;opacity:.85}.button-row .light-btn{gap:5px}.play-actions .button-row{margin-top:0}.final-points{display:inline-block;font-size:34px;margin:0 2px 3px}
@media(max-width:700px){.info{position:sticky;top:0;z-index:2;background:#eee6f7;padding:4px 0 6px;grid-template-areas:"title progress" "points points";row-gap:9px}.title-line{grid-area:title}.score{grid-area:progress}.points-hud{grid-area:points;min-height:32px;margin:0;padding:4px 10px;gap:9px;border-radius:9px}.points-title{font-size:12px}.points-title .ico{width:16px;height:16px}.points-total strong{font-size:20px}.points-change{font-size:12px}}

.brand {
  font-family: inherit;
  font-style: normal;
  font-weight: 850;
  font-size: clamp(1.15rem, 3.2vw, 1.9rem);
  letter-spacing: normal;
}
.game-footer { margin-top: 24px; font-size: .82rem; }
.game-footer a { color: var(--purple); text-underline-offset: 3px; }
@media (max-width: 700px) {
  .brand { font-size: clamp(.95rem, 4.4vw, 1.25rem); }
}

.achievement-toast{position:fixed;right:16px;bottom:max(16px,env(safe-area-inset-bottom));z-index:5;display:grid;gap:3px;max-width:min(320px,calc(100% - 32px));padding:9px 15px;border:1px solid #d8ad58;border-radius:10px;background:#fff2c5;color:#573a1a;box-shadow:0 2px 0 #b18a4b70;pointer-events:none;font-size:13px}
.achievement-toast:empty{padding:0;border:0;box-shadow:none}
.achievement-toast strong,.win-achievements strong{color:#805022}
.win .win-achievements{padding:8px 12px;border-radius:9px;background:#fff2c5;color:#573a1a}
.dialog:has(.record-summary){width:min(530px,calc(100% - 36px))}
.record-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;align-items:baseline;padding:11px 12px;border-radius:9px;background:#f3e8f7;font-size:12px;font-weight:700}
.record-summary strong{font-size:24px;color:#4e355e}
.record-summary span:nth-last-child(-n+2){color:#665471;font-size:11px}
.record-summary span:last-child{text-align:right}
.share-x{margin-top:12px;padding:0 16px;color:var(--ink);text-decoration:none}
.share-x[hidden]{display:none}
.share-x:focus-visible,.share-cover a:focus-visible{outline:3px solid #915393;outline-offset:4px}
.record-summary+.share-x:not([hidden]){display:inline-flex;min-height:38px}
.share-cover{width:min(800px,calc(100% - 32px));margin:clamp(22px,8vh,76px) auto;text-align:center}
.share-cover img{display:block;width:100%;height:auto;border-radius:18px;box-shadow:0 12px 30px #69528055}
.share-cover a{width:min(260px,100%);margin:22px auto 0;text-decoration:none}
.record-heading{margin:19px 0 6px;font-size:15px}
.record-heading span{margin-left:6px;color:#6c587a;font-size:12px}
.achievement-list{margin:0}
.achievement-list div{padding:6px 0;border-bottom:1px solid #e3d7e8}
.achievement-list dt{font-size:13px;font-weight:800}
.achievement-list dd{margin:2px 0 0;color:#665471;font-size:12px}
.stage-record-table{width:100%;border-collapse:collapse;font-size:12px}
.stage-record-table th,.stage-record-table td{padding:5px 3px;border-bottom:1px solid #e3d7e8;text-align:right}
.stage-record-table th:first-child{text-align:left;line-height:1.4}
.stage-record-table td{font-variant-numeric:tabular-nums;white-space:nowrap}
.stage-record-table thead th{color:#665471;font-size:10px;white-space:nowrap}
.board-panel[data-stage-kind="tutorial"]{width:100%;max-width:440px;justify-self:center;align-self:center}
.tutorial-hint{margin:12px 2px 0;color:#594269;font-size:13px;font-weight:700;line-height:1.55}
@media(max-width:700px){
  .dialog:has(.record-summary) .modal-body{padding-inline:16px}
}
