.lnt {
--lnt-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--lnt-bg: #f3efe7;
--lnt-fg: #1d2129;
--lnt-muted: #5d6470;
--lnt-surface: #ffffff;
--lnt-line: rgba(20, 24, 33, .12);
--lnt-hover: rgba(20, 24, 33, .07);
--lnt-accent: #2563eb;
--lnt-accent-fg: #ffffff;
--lnt-ok: #16a34a;
--lnt-hint: #f59e0b;
--lnt-table: #e8e2d6;
--lnt-board: #d6cdbd;
--lnt-board-line: rgba(0, 0, 0, .2);
--lnt-ghost: .24;
--lnt-piece-shadow: rgba(0, 0, 0, .38);
--lnt-tile-bg: #c9c1b2;
--lnt-gap: 2px;
--lnt-radius: 14px;
--lnt-tile-radius: 6px;
--lnt-overlay: rgba(12, 14, 22, .55);
--lnt-shadow: 0 10px 30px rgba(0, 0, 0, .22);
container-type: inline-size;
position: relative;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
min-height: 300px;
overflow: hidden;
box-sizing: border-box;
border-radius: var(--lnt-radius);
background: var(--lnt-bg);
color: var(--lnt-fg);
font: 15px/1.35 var(--lnt-font);
-webkit-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.lnt *, .lnt *::before, .lnt *::after { box-sizing: border-box; }
.lnt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lnt-bar {
display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
padding: 6px 8px; background: var(--lnt-surface);
border-bottom: 1px solid var(--lnt-line);
position: relative; z-index: 3;
}
.lnt-hud { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; padding-left: 4px; }
.lnt-stat { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lnt-stat b { font-weight: 650; }
.lnt-stat .lnt-ico { width: 18px; height: 18px; color: var(--lnt-muted); }
.lnt-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.lnt-btn {
-webkit-appearance: none; appearance: none;
width: 40px; height: 40px; padding: 0; margin: 0;
display: inline-grid; place-items: center;
border: 0; border-radius: 11px; background: transparent; color: var(--lnt-fg);
cursor: pointer; touch-action: manipulation;
transition: background-color .15s, color .15s, transform .12s;
}
.lnt-btn .lnt-ico { width: 22px; height: 22px; }
.lnt-btn:hover { background: var(--lnt-hover); }
.lnt-btn:active { transform: scale(.9); }
.lnt-btn[aria-pressed="true"] { background: var(--lnt-accent); color: var(--lnt-accent-fg); }
.lnt-btn:disabled { opacity: .35; cursor: default; }
.lnt-btn:focus-visible, .lnt-cta:focus-visible, .lnt-ghostbtn:focus-visible, .lnt-stage:focus-visible, .lnt-tile:focus-visible {
outline: 3px solid var(--lnt-accent); outline-offset: 2px;
}
.lnt-stage:focus-visible { outline-offset: -3px; }
.lnt-progress { height: 3px; background: var(--lnt-line); position: relative; z-index: 3; }
.lnt-progress > i { display: block; height: 100%; background: var(--lnt-accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .35s ease; }
@container (max-width: 560px) {
.lnt-bar { padding: 4px 6px; }
.lnt-hud { flex-basis: 100%; justify-content: space-around; padding: 2px 0; }
.lnt-tools { flex-basis: 100%; justify-content: space-between; }
.lnt-btn { width: 38px; height: 38px; }
.lnt-zoom { right: 6px; bottom: 6px; padding: 2px; border-radius: 11px; }
.lnt-zbtn { width: 34px; height: 34px; }
}
@container (max-width: 340px) {
.lnt-btn { width: 34px; height: 34px; border-radius: 9px; }
.lnt-btn .lnt-ico { width: 20px; height: 20px; }
.lnt-hud { font-size: 14px; gap: 8px; }
}
.lnt-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; outline: none; }
.lnt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.lnt-canvas:active { cursor: grabbing; }
.lnt-zoom {
position: absolute; right: 10px; bottom: 10px; z-index: 2;
display: flex; flex-direction: column; gap: 2px; padding: 3px;
background: var(--lnt-surface); border-radius: 13px; box-shadow: var(--lnt-shadow);
}
.lnt-zbtn { width: 38px; height: 38px; }
.lnt-loading {
position: absolute; inset: 0; display: grid; place-items: center;
color: var(--lnt-muted); font-weight: 600; letter-spacing: .02em;
animation: lnt-pulse 1.2s ease-in-out infinite alternate;
}
.lnt-error { animation: none; color: var(--lnt-fg); padding: 24px; text-align: center; }
@keyframes lnt-pulse { from { opacity: .45; } to { opacity: 1; } }
.lnt-toast {
position: absolute; left: 0; right: 0; bottom: 14px; z-index: 4; margin: 0 auto;
width: max-content; max-width: calc(100% - 32px);
transform: translateY(12px); opacity: 0; pointer-events: none;
padding: 9px 16px; border-radius: 999px; background: var(--lnt-fg); color: var(--lnt-bg);
font-size: 13.5px; font-weight: 550; text-align: center; box-shadow: var(--lnt-shadow); line-height: 1.3;
transition: opacity .2s, transform .2s;
}
.lnt-toast.is-on { opacity: .94; transform: none; }
.lnt-preview {
position: absolute; left: 10px; top: 10px; z-index: 3; padding: 0; border: 3px solid var(--lnt-surface);
border-radius: 12px; overflow: hidden; box-shadow: var(--lnt-shadow); cursor: zoom-out; background: var(--lnt-surface);
width: min(46%, 340px); animation: lnt-pop .2s ease-out;
}
.lnt-preview canvas { display: block; width: 100%; height: auto; }
@keyframes lnt-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.lnt-tiles-wrap { position: absolute; inset: 0; display: grid; place-items: center; }
.lnt-tiles {
position: relative; background: var(--lnt-tile-bg); border-radius: calc(var(--lnt-tile-radius) + 2px);
box-shadow: var(--lnt-shadow); touch-action: none; transition: border-radius .5s, box-shadow .5s;
}
.lnt-tile {
position: absolute; left: 0; top: 0;
width: calc(100% / var(--cols)); height: calc(100% / var(--rows));
padding: calc(var(--lnt-gap) / 2);
transition: transform .17s cubic-bezier(.2, .8, .25, 1), padding .5s;
will-change: transform; cursor: pointer; outline: none; touch-action: none;
}
.lnt-tile canvas {
display: block; width: 100%; height: 100%; border-radius: var(--lnt-tile-radius);
transition: transform .15s, box-shadow .15s, border-radius .5s, filter .2s;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.lnt-tiles.no-anim .lnt-tile, .lnt-tiles.no-anim .lnt-tile canvas { transition: none; }
.lnt-tile.is-drag { transition: none; z-index: 5; cursor: grabbing; }
.lnt-tile.is-drag canvas { transform: scale(1.07); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.lnt-tile.is-target canvas { filter: brightness(1.18); box-shadow: inset 0 0 0 3px var(--lnt-accent); }
.lnt-tile.is-sel { z-index: 2; }
.lnt-tile.is-sel canvas { transform: scale(.92); box-shadow: 0 0 0 3px var(--lnt-accent); }
.lnt-tile.is-ok { cursor: default; }
.lnt-tile.is-ok canvas { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lnt-ok) 55%, transparent); }
.lnt-tile.is-blank { opacity: 0; pointer-events: none; transition: transform .17s, opacity .6s .2s; }
.lnt-tile.is-hint canvas { animation: lnt-hint .8s ease-in-out 2; }
.lnt-tile.is-nope canvas { animation: lnt-nope .28s ease-in-out; }
@keyframes lnt-hint { 0%, 100% { box-shadow: 0 0 0 0 var(--lnt-hint); filter: none; } 50% { box-shadow: 0 0 0 4px var(--lnt-hint); filter: brightness(1.2); } }
@keyframes lnt-nope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.lnt-num {
position: absolute; left: 6px; top: 5px; min-width: 20px; padding: 1px 5px; border-radius: 8px;
background: rgba(0, 0, 0, .58); color: #fff; font-size: 12px; font-weight: 700; text-align: center;
opacity: 0; transition: opacity .2s; pointer-events: none;
}
.lnt-tiles.show-nums .lnt-num { opacity: 1; }
.lnt-tiles.is-solved { border-radius: 4px; }
.lnt-tiles.is-solved .lnt-tile { padding: 0; cursor: default; }
.lnt-tiles.is-solved .lnt-tile canvas { border-radius: 0; box-shadow: none; }
.lnt-tiles.is-solved .lnt-tile.is-blank { opacity: 1; }
.lnt-tiles.is-solved .lnt-num { opacity: 0; }
.lnt-win {
position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px;
background: var(--lnt-overlay); opacity: 0; transition: opacity .25s;
}
.lnt-win.is-on { opacity: 1; }
.lnt-card {
position: relative; width: min(100%, 360px); padding: 22px 20px 18px; border-radius: 18px;
background: var(--lnt-surface); color: var(--lnt-fg); box-shadow: var(--lnt-shadow); text-align: center;
transform: translateY(14px) scale(.96); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.lnt-win.is-on .lnt-card { transform: none; }
.lnt-win-title { margin: 0 0 4px; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.lnt-record { margin: 4px 0 6px; color: var(--lnt-ok); font-weight: 700; }
.lnt-dl { margin: 12px 0 16px; display: grid; gap: 6px; }
.lnt-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 10px; background: var(--lnt-hover); }
.lnt-dl dt { color: var(--lnt-muted); }
.lnt-dl dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.lnt-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.lnt-cta, .lnt-ghostbtn {
-webkit-appearance: none; appearance: none; min-height: 44px; padding: 0 18px; border-radius: 12px;
font: inherit; font-weight: 700; cursor: pointer; border: 0;
}
.lnt-cta { background: var(--lnt-accent); color: var(--lnt-accent-fg); flex: 1 1 auto; }
.lnt-ghostbtn { background: transparent; color: var(--lnt-fg); box-shadow: inset 0 0 0 1.5px var(--lnt-line); }
.lnt-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lnt-confetti i {
position: absolute; left: 50%; top: 45%; width: 9px; height: 14px; border-radius: 2px;
background: hsl(calc(var(--i) * 47deg) 85% 60%);
animation: lnt-burst 1.4s cubic-bezier(.15, .7, .3, 1) forwards;
--a: calc(var(--i) * 20deg);
}
@keyframes lnt-burst {
from { transform: rotate(var(--a)) translateY(0) rotate(0); opacity: 1; }
to { transform: rotate(var(--a)) translateY(-46vmin) rotate(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.lnt *, .lnt *::before, .lnt *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
