:root{--bg:#f3f1ed;--card:#fff;--ink:#202124;--muted:#686b70;--line:#deddd9;--soft:#f7f6f3;--blue:#1264a3;--blue-dark:#0b4f83;--blue-soft:#eef6fc;--green:#16845b;--green-soft:#edf8f3;--red:#b33a3a;--red-soft:#fff2f1;--shadow:0 8px 28px rgba(35,37,39,.07)}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button{font:inherit;cursor:pointer}
.page-shell{width:min(100% - 28px,660px);margin:0 auto;padding:22px 0 42px}
.topbar{display:flex;align-items:center;justify-content:space-between;min-height:52px;margin-bottom:18px;padding:0 4px}
.brand{display:flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;font-weight:800;font-size:23px;letter-spacing:.06em}
.brand-mark{width:12px;height:15px;border:2px solid var(--ink);border-radius:3px;position:relative;margin-top:5px}.brand-mark:before{content:"";position:absolute;width:7px;height:7px;border:2px solid var(--ink);border-bottom:0;border-radius:7px 7px 0 0;left:50%;top:-8px;transform:translateX(-50%)}
.game-stats{display:flex;align-items:center;gap:20px}.stat{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.stat-label{font-size:11px;color:var(--muted)}.stat strong{font-variant-numeric:tabular-nums;font-size:14px}.attempts-stat strong{color:var(--blue);letter-spacing:2px;font-size:12px}
.puzzle-card{background:var(--card);border:1px solid #e3e1dc;border-radius:16px;box-shadow:var(--shadow);padding:clamp(22px,6vw,42px)}
.intro{text-align:center;margin-bottom:34px}.puzzle-number{margin:0 0 8px!important;color:var(--blue)!important;font-size:12px!important;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.intro h1{font-size:clamp(25px,6vw,32px);line-height:1.15;letter-spacing:-.025em;margin:0 0 9px}.intro p{color:var(--muted);font-size:15px;margin:0;line-height:1.5}
.section-title-row{display:flex;align-items:end;justify-content:space-between;margin-bottom:13px}.section-title-row h2,.clue-section h2{font-size:15px;margin:0;font-weight:700}.section-title-row span{font-size:11px;color:var(--muted)}
.pieces{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}
.piece{min-width:0;aspect-ratio:1/1.08;border:1px solid var(--line);border-radius:10px;background:var(--soft);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--ink);transition:border-color .15s,background .15s,transform .15s,box-shadow .15s;touch-action:manipulation}
.piece:hover{border-color:#a9adb2;background:#fff}.piece:active{transform:scale(.97)}.piece.selected{border-color:var(--blue);background:var(--blue-soft);box-shadow:0 0 0 2px rgba(18,100,163,.12)}.piece.dragging{opacity:.4}.piece>span{font-size:clamp(28px,7vw,40px);line-height:1}.piece small{max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.position-labels{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;text-align:center;margin-top:7px;color:#96989b;font-size:10px}
.clue-section{margin-top:34px}.clue-section h2{padding-bottom:11px;border-bottom:1px solid var(--line)}.clues{list-style:none;margin:0;padding:0;counter-reset:clue}.clues li{counter-increment:clue;display:grid;grid-template-columns:30px 1fr;align-items:center;min-height:55px;border-bottom:1px solid #ebeae6}.clue-index{font-size:0}.clue-index:after{content:counter(clue);display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:#f0efec;color:var(--muted);font-size:11px;font-weight:700}.clues p{margin:0;font-size:14px;line-height:1.4}.inline-piece{font-size:18px;margin-right:4px}.clue-name{font-weight:650;margin-right:3px}
.hint-message,.message{margin-top:19px;padding:12px 14px;border-radius:8px;text-align:center;font-size:13px;line-height:1.4}.hint-message{background:#fff8e5;border:1px solid #f0d891;color:#725610}.message{color:var(--muted);background:var(--soft)}.message.error{background:var(--red-soft);color:var(--red)}.message.success{background:var(--green-soft);color:var(--green)}
.actions{display:grid;grid-template-columns:minmax(110px,.38fr) 1fr;gap:10px;margin-top:12px}.actions button{height:49px;border-radius:9px;font-weight:700}.hint-button{background:#fff;border:1px solid #b9b9b5;color:#3e4144}.hint-button:hover:not(:disabled){background:var(--soft)}.hint-button:disabled{color:#96989b;background:#f2f1ee;border-color:#dfded9;cursor:default}.primary{border:1px solid var(--blue);background:var(--blue);color:#fff;letter-spacing:.025em}.primary:hover:not(:disabled){background:var(--blue-dark)}.primary:disabled{opacity:.5;cursor:not-allowed}
.result{margin-top:22px;padding:22px;border-radius:10px;text-align:center;background:var(--green-soft);border:1px solid #c6e8d8}.result.failure{background:var(--red-soft);border-color:#f0cccc}.result-title{font-size:23px;font-weight:800;margin-bottom:7px}.result p{margin:4px 0;color:var(--muted);font-size:14px}.answer{display:flex;align-items:center;justify-content:center;gap:9px;margin:17px 0}.mini-piece{font-size:29px}.result-new{margin-top:4px;border:1px solid var(--line);border-radius:8px;background:white;padding:10px 16px;font-weight:600}
.developer-tools{margin-top:16px;border-top:1px solid #d6d4cf;color:var(--muted)}.developer-tools summary{list-style:none;display:flex;justify-content:space-between;padding:16px 4px;cursor:pointer;font-size:12px}.developer-tools summary::-webkit-details-marker{display:none}.developer-tools[open] summary span{transform:rotate(180deg)}.tools-body{background:#eae8e3;border-radius:10px;padding:15px}.tools-body dl{display:grid;grid-template-columns:1fr 1fr;margin:0;gap:10px}.tools-body dl div{background:#f5f4f1;border-radius:7px;padding:10px}.tools-body dt{font-size:10px;text-transform:uppercase;letter-spacing:.05em}.tools-body dd{margin:5px 0 0;color:var(--ink);font-size:11px;word-break:break-word}.dev-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.dev-actions button{border:1px solid #cac8c3;background:#fff;border-radius:6px;padding:8px 10px;font-size:11px;color:var(--ink)}pre{max-height:330px;overflow:auto;padding:12px;background:#fff;border-radius:7px;font-size:10px;line-height:1.5;color:var(--ink)}
.new-puzzle{display:block;margin:18px auto 0;border:0;background:transparent;color:var(--muted);font-size:12px;text-decoration:underline;text-underline-offset:3px}.hidden{display:none!important}
@media(max-width:520px){.page-shell{width:100%;padding:10px 0 30px}.topbar{padding:0 16px;margin-bottom:7px}.puzzle-card{border-left:0;border-right:0;border-radius:0;padding:25px 16px;box-shadow:0 4px 18px rgba(35,37,39,.05)}.intro{margin-bottom:29px}.pieces{gap:5px}.piece{border-radius:8px;aspect-ratio:1/1.22}.piece>span{font-size:30px}.piece small{font-size:7px}.actions{grid-template-columns:112px 1fr}.tools-body dl{grid-template-columns:1fr}.developer-tools{margin-left:16px;margin-right:16px}.new-puzzle{margin-top:16px}.section-title-row span{font-size:10px}}
body:has(.modal:not(.hidden))::before{content:"";position:fixed;z-index:20;inset:0;background:rgba(0,0,0,.4)}.modal{position:fixed;z-index:21;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;margin:auto;width:min(92vw,440px);height:max-content;max-height:92vh;overflow:auto;padding:34px 30px 28px;background:#fff;opacity:1;border-radius:16px;box-shadow:0 22px 70px #0004}.modal-close{position:absolute;right:14px;top:12px;border:0;background:transparent;color:#73767a;font-size:27px}.modal-accent{width:44px;height:4px;border-radius:2px;background:var(--green);margin-bottom:22px}.modal.loss .modal-accent{background:var(--red)}.modal h2{font-size:26px;margin:0 0 7px}.modal-subtitle{color:var(--muted);font-size:14px;margin:0 0 22px}.modal-stats{display:grid;grid-template-columns:repeat(3,1fr);width:100%;border:1px solid var(--line);border-radius:10px;overflow:hidden}.modal-stats div{padding:12px 5px;border-right:1px solid var(--line)}.modal-stats div:last-child{border:0}.modal-stats span,.countdown span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}.modal-stats strong{font-size:17px}.modal-order-label{font-size:12px;font-weight:650;margin:22px 0 10px}.modal-order{display:flex;justify-content:center;gap:8px}.modal-order .mini-piece{display:grid;place-items:center;width:46px;height:46px;background:var(--soft);border:1px solid var(--line);border-radius:9px;font-size:27px}.modal-share{width:100%;height:46px;border-radius:8px;font-weight:700;border:1px solid var(--blue);background:var(--blue);color:#fff}.share-status{min-height:16px;font-size:11px;color:var(--green);margin-top:8px}.view-results{margin-top:12px;border:0;background:transparent;color:var(--blue);font-weight:700;text-decoration:underline;text-underline-offset:3px}.tomorrow-message{font-size:13px;color:var(--muted);margin:20px 0 13px}.countdown{padding:10px 20px;background:var(--soft);border-radius:8px}.countdown strong{font-variant-numeric:tabular-nums;font-size:19px}.modal>.modal-share{margin-top:18px}@media(max-width:520px){.modal{padding:30px 20px 24px}.modal-order .mini-piece{width:42px;height:42px}}
