:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #64748b;
    --line: #d7e2ea;
    --paper: #fffaf2;
    --mint: #dff7ee;
    --teal: #0f766e;
    --orange: #f97316;
    --yellow: #facc15;
    --blue: #2563eb;
    --rose: #fb7185;
    --shadow: 0 22px 60px rgba(15, 23, 42, .18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(90deg, rgba(255,255,255,.72) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.72) 1px, transparent 1px),
        linear-gradient(135deg, #ddf7ef 0%, #fff4d9 42%, #ffe7eb 100%);
    background-size: 34px 34px, 34px 34px, auto;
}

button {
    font: inherit;
}

.is-hidden {
    display: none !important;
}

.lgs-app {
    min-height: 100vh;
    padding: 10px 14px;
}

.lgs-account-link {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 5;
    border-radius: 999px;
    background: #172033;
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.lgs-start,
.lgs-end {
    min-height: calc(100vh - 36px);
    display: grid;
    place-items: center;
}

.lgs-start-panel,
.lgs-end-card {
    width: min(1120px, 100%);
    border: 2px solid rgba(23, 32, 51, .08);
    border-radius: 28px;
    background: rgba(255, 250, 242, .94);
    box-shadow: var(--shadow);
    padding: clamp(24px, 4vw, 44px);
}

.lgs-start-scene {
    position: absolute;
    top: 18px;
    left: 50%;
    width: min(880px, calc(100vw - 44px));
    height: 78px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, .12);
}

.lgs-awning-stripe:nth-child(1),
.lgs-awning-stripe:nth-child(3) {
    background: #ef4444;
}

.lgs-awning-stripe:nth-child(2),
.lgs-awning-stripe:nth-child(4) {
    background: #fff7ed;
}

.lgs-kicker {
    margin: 0 0 8px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(34px, 5vw, 70px);
    line-height: .95;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: 22px;
}

.lgs-start-copy {
    max-width: 760px;
    color: #475569;
    font-size: 19px;
    line-height: 1.55;
}

.lgs-start-grid {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
    gap: 18px;
    margin-top: 24px;
}

.lgs-choice-panel,
.lgs-checkout,
.lgs-money-side {
    border: 2px solid rgba(23, 32, 51, .08);
    border-radius: 22px;
    background: rgba(255, 255, 255, .72);
    padding: 18px;
}

.lgs-panel-heading,
.lgs-side-head,
.lgs-topbar,
.lgs-feedback,
.lgs-status,
.lgs-tool-row,
.lgs-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lgs-panel-heading,
.lgs-side-head,
.lgs-topbar,
.lgs-feedback {
    justify-content: space-between;
}

.lgs-lock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.lgs-choice-grid {
    display: grid;
    gap: 12px;
}

.lgs-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lgs-choice,
.lgs-primary,
.lgs-secondary,
.lgs-ghost,
.lgs-tool-row button {
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 900;
}

.lgs-choice {
    display: grid;
    gap: 4px;
    justify-items: start;
    padding: 14px;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--line);
    text-align: left;
}

.lgs-choice span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.lgs-choice.is-selected {
    border-color: var(--teal);
    background: var(--mint);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .13);
}

.lgs-choice:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.lgs-start-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.lgs-start-hint {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.lgs-primary {
    padding: 0 22px;
    background: var(--orange);
    color: #fff;
    box-shadow: 0 12px 26px rgba(249, 115, 22, .24);
}

.lgs-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    text-decoration: none;
}

.lgs-primary:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

.lgs-secondary {
    padding: 0 18px;
    background: #fef3c7;
    color: #92400e;
}

.lgs-ghost,
.lgs-tool-row button {
    padding: 0 14px;
    background: #eaf2f7;
    color: #243244;
}

.lgs-game {
    min-height: calc(100vh - 20px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
}

.lgs-topbar,
.lgs-feedback {
    border-radius: 22px;
    background: rgba(255, 250, 242, .94);
    padding: 9px 14px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .12);
}

.lgs-topbar .lgs-kicker {
    display: none;
}

.lgs-topbar h1 {
    margin: 0;
    font-size: clamp(23px, 2vw, 34px);
    line-height: 1;
}

.lgs-status {
    flex-wrap: wrap;
    justify-content: center;
}

.lgs-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lgs-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    text-decoration: none;
}

.lgs-status span {
    min-width: 82px;
    border-radius: 999px;
    background: #fff;
    padding: 7px 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.lgs-board {
    display: grid;
    grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr);
    gap: 12px;
    min-height: 0;
}

.lgs-checkout,
.lgs-money-side {
    min-height: 0;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .1);
}

.lgs-checkout {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto;
    gap: 12px;
    background: #fffaf2;
}

.lgs-shopfront {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 46px;
    overflow: hidden;
    border-radius: 16px 16px 8px 8px;
    border: 2px solid #f59e0b;
}

.lgs-shopfront span:nth-child(odd) {
    background: #f97316;
}

.lgs-shopfront span:nth-child(even) {
    background: #fff7ed;
}

.lgs-till {
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.14), transparent 24%),
        linear-gradient(135deg, #314052, #172033);
    border: 4px solid #0f172a;
    color: #fff;
    padding: 14px;
    box-shadow: inset 0 -10px 0 rgba(0,0,0,.18), 0 16px 28px rgba(15, 23, 42, .2);
    transition: transform .18s ease, box-shadow .18s ease;
}

.lgs-till.is-correct {
    transform: translateY(-2px);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .22);
}

.lgs-register-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lgs-register-light {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .18);
}

.lgs-till p,
.lgs-till span,
.lgs-till button {
    margin: 0;
    color: #dbeafe;
    font-weight: 800;
}

.lgs-register-display {
    margin-top: 14px;
    border-radius: 16px;
    background: #d9f99d;
    border: 3px solid #84cc16;
    padding: 12px 16px;
    color: #1a2e05;
    box-shadow: inset 0 4px 10px rgba(63, 98, 18, .18);
}

.lgs-register-display span {
    display: block;
    color: #3f6212;
    font-size: 12px;
    letter-spacing: .12em;
}

.lgs-register-display strong {
    display: block;
    margin: 4px 0 0;
    color: #1a2e05;
    font-family: "Courier New", ui-monospace, monospace;
    font-size: clamp(34px, 3.4vw, 54px);
    line-height: 1;
}

.lgs-register-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 10px;
    margin-top: 12px;
}

.lgs-receipt {
    min-height: 132px;
    border-radius: 12px 12px 4px 4px;
    background: #fff;
    color: #172033;
    padding: 10px;
    box-shadow: inset 0 -8px 0 rgba(15, 23, 42, .06);
}

.lgs-receipt-head {
    border-bottom: 2px dashed #cbd5e1;
    padding-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lgs-receipt-lines {
    display: grid;
    gap: 5px;
    max-height: 108px;
    overflow: auto;
    padding-top: 8px;
    font-family: "Courier New", ui-monospace, monospace;
    font-size: 14px;
    font-weight: 800;
}

.lgs-receipt-lines p {
    margin: 0;
    color: #94a3b8;
    font-family: inherit;
}

.lgs-receipt-line,
.lgs-receipt-total {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.lgs-receipt-line {
    color: #172033;
}

.lgs-receipt-line span {
    color: #172033;
}

.lgs-receipt-line strong {
    color: #0f172a;
}

.lgs-receipt-total {
    border-top: 2px dashed #cbd5e1;
    margin-top: 4px;
    padding-top: 6px;
    color: #0f766e;
}

.lgs-receipt-total strong {
    color: #0f766e;
}

.lgs-receipt-total span {
    color: #0f766e;
}

.lgs-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.lgs-keypad span {
    display: grid;
    place-items: center;
    min-height: 26px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #172033;
    box-shadow: inset 0 -3px 0 rgba(15, 23, 42, .18);
    font-weight: 950;
}

.lgs-keypad span:nth-last-child(-n+3) {
    background: #fed7aa;
}

.lgs-register-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.lgs-register-actions button {
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    background: #0ea5e9;
    color: #fff;
    cursor: pointer;
    font-weight: 950;
}

.lgs-register-actions button:first-child {
    background: #475569;
}

.lgs-play-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.lgs-play-steps span {
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 14px;
    background: #fff;
    border: 2px solid #e2e8f0;
    padding: 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 950;
}

.lgs-play-steps strong {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 13px;
}

.lgs-shop-box {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 82px;
    border: 3px solid #f59e0b;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    padding: 12px;
    color: #172033;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 10px 22px rgba(245, 158, 11, .16);
}

.lgs-shop-box-icon {
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f97316, #ea580c);
    box-shadow: inset 0 -6px 0 rgba(154, 52, 18, .18);
    color: transparent;
    font-size: 0;
    position: relative;
}

.lgs-shop-box-icon::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 20px;
    width: 29px;
    height: 20px;
    border: 4px solid #fff7ed;
    border-top-width: 5px;
    border-radius: 4px 4px 9px 9px;
    transform: skewX(-10deg);
    background:
        linear-gradient(90deg, transparent 0 28%, rgba(255, 247, 237, .95) 28% 36%, transparent 36% 61%, rgba(255, 247, 237, .95) 61% 69%, transparent 69%),
        linear-gradient(0deg, transparent 0 45%, rgba(255, 247, 237, .95) 45% 58%, transparent 58%);
    box-shadow:
        -12px -10px 0 -7px #fff7ed,
        -16px -15px 0 -9px #fff7ed;
}

.lgs-shop-box-icon::after {
    content: "";
    position: absolute;
    left: 26px;
    bottom: 8px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #172033;
    box-shadow:
        inset 0 0 0 3px #fff7ed,
        20px 0 0 #172033,
        20px 0 0 3px #fff7ed;
}

.lgs-shop-box strong {
    display: block;
    font-size: 18px;
}

.lgs-shop-box small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-weight: 800;
}

.lgs-shop-box em {
    justify-self: end;
    border-radius: 999px;
    background: #172033;
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
}

.lgs-shop-catalog {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    overflow: auto;
    background: rgba(15, 23, 42, .48);
    padding: 22px;
}

.lgs-shop-catalog-panel {
    width: min(1180px, 100%);
    max-height: min(860px, calc(100vh - 44px));
    overflow: hidden;
    border: 3px solid #fed7aa;
    border-radius: 24px;
    background: #fffaf2;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .28);
    padding: 18px;
}

.lgs-shop-catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.lgs-shop-catalog-head p {
    margin: 0 0 2px;
    color: #ea580c;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lgs-shop-catalog-head strong {
    color: #172033;
    font-size: 16px;
}

.lgs-shop-catalog-head button {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    background: #e2e8f0;
    color: #172033;
    cursor: pointer;
    padding: 0 12px;
    font-weight: 950;
}

.lgs-shop-catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    min-height: 0;
}

.lgs-shop-catalog-layout h3,
.lgs-basket-preview h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.lgs-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    align-content: start;
    gap: 12px;
    overflow: auto;
    max-height: calc(100vh - 190px);
    padding-right: 4px;
}

.lgs-item-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 12px;
    cursor: pointer;
    text-align: left;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.lgs-item-card > span:last-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lgs-item-card:hover,
.lgs-item-card.is-scanned {
    border-color: #14b8a6;
    box-shadow: 0 8px 18px rgba(20, 184, 166, .15);
}

.lgs-item-card.is-scanned {
    transform: translateX(4px);
    background: #f0fdfa;
}

.lgs-item-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: #dff7ee;
}

.lgs-item-icon::before,
.lgs-item-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.lgs-item-icon:has(.lgs-item-img)::before,
.lgs-item-icon:has(.lgs-item-img)::after {
    content: none;
}

.lgs-item-img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(15, 23, 42, .16));
    position: relative;
    z-index: 1;
}

.lgs-item-icon-apple::before,
.lgs-item-icon-orange::before,
.lgs-item-icon-ball::before {
    inset: 13px;
    border-radius: 999px;
    background: #ef4444;
}

.lgs-item-icon-orange::before {
    background: #fb923c;
}

.lgs-item-icon-banana::before {
    width: 32px;
    height: 18px;
    border: 8px solid #facc15;
    border-top: 0;
    border-left-color: transparent;
    border-radius: 0 0 34px 34px;
    left: 11px;
    top: 16px;
    transform: rotate(-24deg);
}

.lgs-item-icon-juice::before,
.lgs-item-icon-glue::before {
    width: 26px;
    height: 36px;
    left: 15px;
    top: 11px;
    border-radius: 7px;
    background: #38bdf8;
    box-shadow: inset 0 10px 0 #fef3c7;
}

.lgs-item-icon-muffin::before {
    width: 34px;
    height: 22px;
    left: 11px;
    top: 12px;
    border-radius: 18px 18px 8px 8px;
    background: #b45309;
}

.lgs-item-icon-muffin::after {
    width: 28px;
    height: 18px;
    left: 14px;
    bottom: 10px;
    border-radius: 4px 4px 10px 10px;
    background: #f59e0b;
}

.lgs-item-icon-popcorn::before {
    width: 30px;
    height: 34px;
    left: 13px;
    top: 13px;
    border-radius: 4px 4px 10px 10px;
    background: repeating-linear-gradient(90deg, #ef4444 0 6px, #fff 6px 12px);
}

.lgs-item-icon-notebook::before,
.lgs-item-icon-puzzle::before {
    width: 34px;
    height: 40px;
    left: 12px;
    top: 8px;
    border-radius: 5px;
    background: #60a5fa;
    box-shadow: inset 7px 0 0 #2563eb;
}

.lgs-item-icon-pencil::before,
.lgs-item-icon-marker::before,
.lgs-item-icon-ruler::before {
    width: 38px;
    height: 9px;
    left: 9px;
    top: 23px;
    border-radius: 999px;
    background: #facc15;
    transform: rotate(-28deg);
}

.lgs-item-icon-marker::before {
    background: #14b8a6;
}

.lgs-item-icon-ruler::before {
    height: 11px;
    background: #fde68a;
    box-shadow: inset 8px 0 0 rgba(15, 23, 42, .18), inset 18px 0 0 rgba(15, 23, 42, .1);
}

.lgs-item-icon-eraser::before {
    width: 36px;
    height: 22px;
    left: 10px;
    top: 17px;
    border-radius: 7px;
    background: linear-gradient(90deg, #fb7185 0 55%, #e2e8f0 55%);
    transform: rotate(-12deg);
}

.lgs-item-icon-stickers::before {
    width: 34px;
    height: 34px;
    left: 11px;
    top: 11px;
    border-radius: 8px;
    background: #fef3c7;
    box-shadow: inset 0 0 0 3px #f59e0b;
}

.lgs-item-icon-stickers::after {
    width: 12px;
    height: 12px;
    left: 22px;
    top: 22px;
    border-radius: 999px;
    background: #ec4899;
}

.lgs-item-icon-car::before {
    width: 38px;
    height: 18px;
    left: 9px;
    top: 22px;
    border-radius: 10px 12px 6px 6px;
    background: #3b82f6;
}

.lgs-item-icon-car::after {
    width: 34px;
    height: 8px;
    left: 11px;
    bottom: 12px;
    border-radius: 999px;
    background: radial-gradient(circle at 6px 4px, #111827 0 4px, transparent 5px), radial-gradient(circle at 28px 4px, #111827 0 4px, transparent 5px);
}

.lgs-item-icon-puzzle::after {
    width: 14px;
    height: 14px;
    left: 21px;
    top: 21px;
    border-radius: 50%;
    background: #facc15;
}

.lgs-item-card strong {
    font-size: 18px;
}

.lgs-price-tag {
    border-radius: 999px;
    background: #fde68a;
    padding: 8px 12px;
    color: #713f12;
    font-weight: 950;
}

.lgs-scan-tag {
    justify-self: end;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 950;
}

.lgs-item-card.is-scanned .lgs-scan-tag {
    background: #22c55e;
    color: #052e16;
}

.lgs-basket-preview {
    display: grid;
    grid-template-rows: auto minmax(160px, 1fr) auto;
    min-height: 0;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 14px;
}

.lgs-basket-preview [data-basket-preview] {
    display: grid;
    align-content: start;
    gap: 8px;
    overflow: auto;
}

.lgs-basket-preview p {
    margin: 0;
    color: #64748b;
    font-weight: 800;
}

.lgs-basket-preview-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px;
    font-weight: 900;
}

.lgs-basket-preview button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: #0f766e;
    color: #fff;
    cursor: pointer;
    font-weight: 950;
}

.lgs-paid-strip {
    border-radius: 16px;
    padding: 14px;
    font-weight: 900;
}

.lgs-paid-strip {
    display: flex;
    justify-content: space-between;
    background: #e0f2fe;
    color: #075985;
}

.lgs-money-side {
    display: grid;
    grid-template-rows: auto auto auto minmax(220px, 1fr);
    gap: 10px;
    background: rgba(248, 250, 252, .92);
}

.lgs-money-head {
    align-items: baseline;
    flex-wrap: wrap;
}

.lgs-money-head h2 {
    margin: 0;
}

.lgs-side-head p {
    margin: 0;
    color: var(--teal);
    font-size: 20px;
    font-weight: 950;
}

.lgs-tool-row,
.lgs-action-row {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lgs-tray {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    max-height: 235px;
    overflow: auto;
    padding: 4px;
}

.lgs-denom {
    display: grid;
    place-items: center;
    min-height: 78px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: transparent;
    cursor: grab;
    padding: 8px;
    touch-action: none;
}

.lgs-denom:focus-visible {
    border-color: var(--blue);
    outline: 3px solid rgba(37, 99, 235, .2);
}

.lgs-denom.is-dragging {
    opacity: .55;
}

.lgs-denom-drag {
    position: fixed;
    z-index: 9999;
    width: 104px;
    min-height: 78px;
    transform: translate(-50%, -50%) scale(1.04);
    pointer-events: none;
    opacity: .96;
    box-shadow: 0 18px 34px rgba(15, 23, 42, .24);
}

.lgs-denom-drag[data-type="note"] {
    width: 142px;
}

.lgs-denom img {
    max-width: 100%;
    max-height: 58px;
    object-fit: contain;
    pointer-events: none;
}

.lgs-piece img {
    max-width: 100%;
    max-height: 74px;
    object-fit: contain;
    pointer-events: none;
}

.lgs-denom-label,
.lgs-piece-label {
    display: grid;
    place-items: center;
    min-width: 58px;
    min-height: 44px;
    border-radius: 999px;
    background: #fff7ed;
    border: 2px solid #fed7aa;
    color: #9a3412;
    font-weight: 950;
}

.lgs-denom[data-type="note"] .lgs-denom-label,
.lgs-piece[data-type="note"] .lgs-piece-label,
.lgs-paid-piece[data-type="note"] .lgs-piece-label {
    min-width: 82px;
    border-radius: 12px;
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}

.lgs-change-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
}

.lgs-change-board.is-split {
    grid-template-columns: minmax(170px, .38fr) minmax(280px, 1fr);
}

.lgs-paid-visual,
.lgs-answer-area {
    min-height: 0;
}

.lgs-paid-visual {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    border: 2px solid #bae6fd;
    border-radius: 18px;
    background: #eff6ff;
    padding: 12px;
}

.lgs-paid-visual span,
.lgs-answer-prompt {
    display: block;
    color: #475569;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lgs-paid-visual strong {
    display: block;
    margin-top: 3px;
    color: #075985;
    font-size: 26px;
    line-height: 1;
}

.lgs-paid-pieces {
    display: flex;
    align-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    overflow: auto;
}

.lgs-paid-piece {
    display: grid;
    place-items: center;
    min-width: 68px;
    min-height: 52px;
}

.lgs-paid-piece[data-type="note"] {
    min-width: 104px;
}

.lgs-paid-piece img {
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
}

.lgs-answer-area {
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr);
    gap: 8px;
}

.lgs-answer-prompt {
    color: #0f766e;
}

.lgs-workspace {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border: 3px dashed #94a3b8;
    border-radius: 22px;
    background:
        radial-gradient(circle at 16px 16px, rgba(20, 184, 166, .18) 0 3px, transparent 4px),
        #fff;
    background-size: 32px 32px;
}

.lgs-workspace.is-drop-target {
    border-color: #14b8a6;
    box-shadow: inset 0 0 0 4px rgba(20, 184, 166, .12);
}

.lgs-workspace-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    color: #94a3b8;
    font-size: 22px;
    font-weight: 950;
    pointer-events: none;
}

.lgs-piece {
    position: absolute;
    display: grid;
    place-items: center;
    width: 118px;
    min-height: 78px;
    padding: 6px;
    border: 3px solid transparent;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.lgs-piece[data-type="note"] {
    width: 168px;
}

.lgs-piece.is-selected {
    border-color: var(--blue);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

.lgs-piece.is-new {
    animation: lgs-drop .28s ease-out;
}

.lgs-piece-delete {
    position: absolute;
    top: -9px;
    right: -9px;
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc2626;
    color: transparent;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(127, 29, 29, .26);
}

.lgs-piece-delete::before,
.lgs-piece-delete::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 9px;
    width: 10px;
    height: 3px;
    border-radius: 999px;
    background: #fff;
    transform: rotate(45deg);
}

.lgs-piece-delete::after {
    transform: rotate(-45deg);
}

.lgs-piece.is-selected .lgs-piece-delete {
    display: block;
}

@keyframes lgs-drop {
    from {
        transform: translateY(-16px) scale(.94);
    }
    to {
        transform: translateY(0) scale(1);
    }
}

.lgs-feedback {
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.lgs-feedback strong {
    display: block;
    font-size: 16px;
    line-height: 1.1;
}

.lgs-feedback span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    max-width: 46ch;
}

.lgs-feedback .lgs-action-row {
    gap: 8px;
}

.lgs-feedback .lgs-ghost,
.lgs-feedback .lgs-secondary,
.lgs-feedback .lgs-primary {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
}

.lgs-feedback.is-good {
    background: #ecfdf5;
}

.lgs-feedback.is-warn {
    background: #fff7ed;
}

.lgs-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.lgs-summary-card {
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 16px;
}

.lgs-summary-card span {
    color: var(--muted);
    font-weight: 800;
}

.lgs-summary-card strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
}

@media (max-width: 980px) {
    .lgs-start-grid,
    .lgs-board {
        grid-template-columns: 1fr;
    }

    .lgs-topbar,
    .lgs-feedback,
    .lgs-start-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .lgs-status,
    .lgs-action-row {
        justify-content: flex-start;
    }

    .lgs-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .lgs-app {
        padding: 10px;
    }

    .lgs-start,
    .lgs-end {
        min-height: calc(100vh - 20px);
    }

    .lgs-mode-grid,
    .lgs-summary {
        grid-template-columns: 1fr;
    }

    .lgs-side-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .lgs-tray {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lgs-play-steps,
    .lgs-shop-box {
        grid-template-columns: 1fr;
    }

    .lgs-register-body {
        grid-template-columns: 1fr;
    }

    .lgs-keypad {
        grid-template-columns: repeat(6, 1fr);
    }

    .lgs-shop-catalog-layout {
        grid-template-columns: 1fr;
    }

    .lgs-change-board.is-split {
        grid-template-columns: 1fr;
    }

    .lgs-items {
        max-height: 46vh;
    }
}
