.shop-toggle, .shop-button {
  font-weight: 750;
  color: #39251a;
  border: 1px solid #aa7748;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: linear-gradient(#fff4d5, #e8ccb3);
  box-shadow: inset 0 0 0 1px #fff8df8f, 0 1px 2px #41230f31;
}
.shop-toggle { padding: 3px 12px; white-space: nowrap; }
.shop-toggle:hover, .shop-button:hover:not(:disabled) { border-color: #82532e; filter: brightness(1.05); }

#shop-dialog {
  width: min(640px, calc(100% - 22px));
  max-height: min(780px, calc(100dvh - 20px));
  background: #f8f0df;
}
.shop-shell { display: grid; gap: 12px; }
.shop-head { position: relative; padding: 15px 48px 14px 18px; color: #fff2d4; background: linear-gradient(155deg, #305b44, #1e3b2d); border-bottom: 2px solid #b48a58; }
.shop-head h2 { font: 800 24px var(--serif); }
.shop-head p { margin-top: 5px; font-size: 14px; color: #f6db9e; }
.shop-switch { display: flex; margin: 0 15px; padding: 4px; gap: 4px; border: 1px solid #d6b894; border-radius: 8px; background: #ecd8bd; }
.shop-switch button { flex: 1; padding: 6px 9px; border: 1px solid transparent; border-radius: 5px; font-weight: 750; color: #65412a; background: transparent; }
.shop-switch button[aria-pressed="true"] { border-color: #b58153; color: #342a20; background: #fff6e8; box-shadow: 0 1px 2px #8352283b; }
.shop-note, .shop-feedback { margin-inline: 16px; font-size: 13px; color: #624833; }
.shop-feedback { color: #31533c; font-weight: 700; }
.shop-feedback.is-error { color: #8b372f; }
.shop-market, .shop-inventory { display: grid; gap: 7px; margin: 0 15px 15px; }
.shop-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; background: #fff9ed; border: 1px solid #dfc8a5; border-radius: 8px; }
.shop-item h3, .shop-seat-tools h3 { font-size: 15px; }
.shop-item p { margin-top: 3px; color: #624834; font-size: 12px; line-height: 1.45; }
.shop-item-art { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; background: #efdfc4; border: 1px solid #deb888; }
.shop-item-art .prop-icon { scale: 1.35; }
.shop-button { min-height: 34px; padding: 5px 8px; font-size: 13px; white-space: nowrap; }
.shop-button.shop-buy { color: #fcf2d9; background: linear-gradient(#3e6d52, #2a4e3b); border-color: #8b794a; box-shadow: inset 0 0 0 1px #c5a16e75; }
.shop-seat-tools { display: grid; gap: 7px; padding: 9px; border-radius: 7px; border: 1px solid #bca575; background: #f0e8d0; }
.shop-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.shop-tools .shop-button, .shop-seat-entry { display: inline-flex; align-items: center; gap: 4px; }
.shop-seat-entry { min-height: 30px; padding: 3px 5px; font-size: 13px; }
.shop-recipient { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; font-weight: 700; }
.shop-recipient select { min-height: 34px; max-width: 100%; padding-inline: 6px; border: 1px solid #ba956a; border-radius: 5px; background: #fffbf3; }
.shop-stock { display: grid; gap: 5px; }
.shop-stock-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 5px; border: 1px solid #e0c7a0; border-radius: 6px; background: #fff9ee; font-size: 14px; }
.shop-stock-item .shop-item-art { width: 31px; height: 31px; }
.shop-stock-item .shop-item-art .prop-icon { scale: 1; }
.shop-quantity { font: 700 13px var(--mono); }
.shop-empty { padding: 10px 4px; color: var(--muted); font-size: 14px; }

.table-props { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.seat-props { --base-object: clamp(35px, 7.3cqh, 66px); --object: calc(var(--base-object) * var(--model-fit, 1)); position: absolute; width: max-content; left: var(--px); top: var(--py); transform: translate(-50%, -50%); }
.props-pos-0 { --px: 63%; --py: 79%; }
.props-pos-1 { --px: 10%; --py: 70%; }
.props-pos-2 { --px: 9%; --py: 47%; }
.props-pos-3 { --px: 62%; --py: 22%; }
.props-pos-4 { --px: 91%; --py: 47%; }
.props-pos-5 { --px: 90%; --py: 70%; }
.prop-models { display: grid; grid-template-columns: repeat(3, max-content); align-items: end; justify-items: center; gap: 1px 6px; }
.model-line .prop-models { display: flex; column-gap: 2px; }
.table-prop {
  position: relative; display: grid; place-items: end center; width: var(--object); height: calc(var(--object) * .92);
  border: 0; border-radius: 8px; padding: 0; color: #ffe7b0; background: none;
  filter: drop-shadow(0 3px 2px #070e0bcf); white-space: nowrap;
}
.table-prop.prop-kind-smoke { grid-column: span 2; width: calc(var(--object) * 1.75); height: calc(var(--object) * .78); }
button.table-prop { pointer-events: auto; touch-action: manipulation; }
button.table-prop:not(:disabled):hover { filter: brightness(1.15) drop-shadow(0 0 5px #efcc8a87); }
button.table-prop:disabled { opacity: .83; }
button.table-prop[data-smoke-stage] { touch-action: none; user-select: none; -webkit-touch-callout: none; }
.model-vase, .model-coffee, .model-vodka, .model-pack, .model-ashtray { position: relative; display: block; }
.model-counter { position: absolute; right: -.18em; bottom: -.12em; z-index: 2; font: 800 clamp(10px, 2.35cqh, 14px) var(--mono); color: #ffefb5; text-shadow: 1px 1px 2px #1c1209, -1px -1px 2px #1c1209; }
.model-vase { width: 67%; height: 98%; }
.vase-glass { position: absolute; inset: auto 18% 4% 18%; height: 43%; border-radius: 18% 18% 38% 38% / 12% 12% 31% 31%; border: 1px solid #dfebcdef; background: linear-gradient(100deg, #c8f2d887, #6fb39673 25%, #a5e9c63c 40%, #336d5bb5 86%, #c1edd69e); box-shadow: inset 2px 0 3px #effbd29f, 0 2px 2px #141c11; }
.vase-glass::before { content: ""; position: absolute; inset: -8% -1% auto; height: 25%; border: 1px solid #e5f2d1; border-radius: 50%; background: #315846c9; }
.rose-stem { position: absolute; height: 68%; width: 6%; left: 48%; bottom: 16%; border-radius: 9px; background: linear-gradient(90deg, #6ea54e, #305334); transform-origin: 50% 100%; transform: rotate(-18deg); }
.rose-stem:nth-child(2) { height: 76%; transform: rotate(4deg); }
.rose-stem:nth-child(3) { height: 66%; transform: rotate(27deg); }
.rose-stem::before { content: ""; position: absolute; width: calc(var(--object) * .32); aspect-ratio: 1.03; left: 50%; top: 0; transform: translate(-50%, -18%); border-radius: 46% 41% 44% 42%; background: radial-gradient(ellipse at 40% 38%, #ffb0a9 0 8%, #a92043 12% 28%, #e65461 31% 40%, #9a1832 47% 60%, #68112a 73%); box-shadow: 0 1px 2px #541126; }
.rose-stem::after { content: ""; position: absolute; width: calc(var(--object) * .15); height: 17%; left: 45%; top: 57%; border-radius: 5% 80% 4% 80%; transform: rotate(-26deg); background: #77a758; }

.model-coffee { width: 94%; height: 78%; }
.coffee-saucer { position: absolute; inset: auto 1% 4% 1%; height: 43%; border-radius: 50%; background: radial-gradient(ellipse at 45% 42%, #bfac82 24%, #e1c998 37%, #fff4d5 52%, #f6e1b7 66%, #8d6d46 70%); box-shadow: 0 2px 2px #22190d; }
.coffee-cup { position: absolute; inset: 12% 22% 27% 18%; border-radius: 15% 15% 42% 42%; background: linear-gradient(102deg, #fff9df, #f1d9ab 51%, #b7905f); box-shadow: inset 0 -2px 2px #80644399; }
.coffee-handle { position: absolute; inset: 30% 9% 36% auto; width: 27%; border: max(2px, .52cqh) solid #d8b785; border-radius: 45%; box-shadow: 0 1px 1px #4b341c; }
.coffee-foam { position: absolute; inset: 5% 20% auto 17%; height: 30%; border: 1px solid #fff0ca; border-radius: 50%; background: radial-gradient(ellipse at 48% 47%, #f6ddac 0 18%, #bd8956 31%, #f5ddb0 37% 52%, #8d592f 58%, #b87840 76%); }
.model-vodka { width: 62%; height: 84%; border-radius: 8% 8% 29% 29%; border: 1px solid #b7e2dfd4; background: linear-gradient(105deg, #d2eeee79, #548b9163 25%, #b6fcf23d 62%, #406e73ac 86%, #e2fcf689); box-shadow: inset 2px 0 2px #e4ffffb5, 0 1px 2px #152120; }
.model-vodka::before { content: ""; position: absolute; inset: -6% -2% auto; height: 26%; border: 1px solid #d3f1e8; border-radius: 50%; background: #24494b65; }
.vodka-liquid { position: absolute; inset: 45% 9% 7%; border-radius: 14% 14% 27% 27%; background: linear-gradient(96deg, #91cfd281, #d4f8ef93 42%, #498c9bbe); box-shadow: inset 0 2px #cdffffb5; }
.model-pack { width: 65%; height: 86%; transform: rotate(-12deg); border: 1px solid #f0c790; border-radius: 4px; background: linear-gradient(100deg, #f1d8ad 0 7%, transparent 8%), linear-gradient(#f6e0be 0 16%, #af533e 17% 55%, #7e2f2d 56% 86%, #dfa579 87%); box-shadow: inset -3px -2px #64261e80, 2px 3px #56362a; }
.pack-lid { position: absolute; inset: 10% 10% auto; height: 24%; border-radius: 3px; background: repeating-linear-gradient(90deg, #90633e 0 1px, #f3dfc1 1px 4px); box-shadow: 0 2px #512d22; }
.model-pack .model-counter { right: 4%; bottom: 4%; }

.model-ashtray { width: 95%; height: 89%; }
.model-ashtray::before, .model-ashtray::after { content: ""; position: absolute; border-radius: 50%; }
.model-ashtray::before { inset: 9% 10% 12%; border: 1px solid #d8b477; background: linear-gradient(#a78551, #483021 72%, #8d663e); box-shadow: 0 3px 2px #22150e; }
.model-ashtray::after { inset: 13% 13% 21%; background: radial-gradient(ellipse at 52% 46%, #30241e 10% 33%, #694731 52%, #cfac70 64%, #e9c78e 71%, #684729 76%); }
.model-ashtray .prop-smoking { position: absolute; z-index: 1; inset: 25% 2% auto; display: grid; justify-items: center; gap: calc(var(--object) * .06); }
.model-ashtray .prop-stick { width: 79%; height: clamp(6px, 1.56cqh, 12px); padding-right: 21%; transform: rotate(-8deg); }
.model-ashtray .cigar .prop-stick { width: 86%; height: clamp(8px, 1.85cqh, 14px); }
.model-ashtray .prop-filter { width: 21%; }
.model-ashtray .prop-timer { font-size: clamp(10px, 2.4cqh, 15px); color: #fff1c7; text-shadow: 0 1px 3px #17120c, 0 -1px 3px #17120c; }
.prop-hint { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); padding: 3px 5px; border-radius: 5px; font-size: 11px; color: #ffefd1; background: #211813ee; visibility: hidden; pointer-events: none; }
button.table-prop:focus-visible .prop-hint, button.table-prop:hover .prop-hint { visibility: visible; }
button.table-prop.is-holding .model-ashtray { animation: prop-hold .58s linear both; }
@keyframes prop-hold { from { filter: brightness(1); } to { filter: brightness(1.55) drop-shadow(0 0 6px #ffbf65); } }

.prop-effects { position: absolute; inset: 0; pointer-events: none; }
.prop-effect { position: absolute; width: var(--object); height: var(--object); translate: -50% -50%; pointer-events: none; }
.prop-effect > i { position: absolute; z-index: 2; left: 46%; top: 36%; width: 4px; height: 4px; border-radius: 50%; transform-origin: center; --dx: -12px; }
.prop-effect > i:nth-child(2) { --dx: 3px; }
.prop-effect > i:nth-child(3) { --dx: 16px; }
.effect-light > i, .effect-cut-light > i { background: #ffbd63; box-shadow: 0 0 8px 3px #fe843c; animation: prop-sparks .53s ease-out both; }
.effect-cut-light > i { animation-delay: .18s; }
.effect-cut-light::after, .effect-cut::after { content: "✂"; position: absolute; left: 25%; top: 13%; color: #eee0be; text-shadow: 0 2px 2px #291d11; animation: prop-snip .28s ease-out both; }
.effect-ash > i { background: #d7cab0; box-shadow: 0 1px 1px #302415; animation: prop-flakes .58s ease-out both; }
.effect-drink { animation: prop-sip .65s ease-in-out both; filter: drop-shadow(0 3px 1px #171109); }
.effect-draw > i:first-child, .effect-place > i:first-child { inset: 20% 20% auto; width: 60%; height: auto; aspect-ratio: 1; border: 1px solid #f7d280; animation: prop-ripple .45s ease-out both; }
@keyframes prop-sparks { from { opacity: 1; transform: scale(.65); } to { opacity: 0; transform: translate(var(--dx), -19px) scale(1.25); } }
@keyframes prop-snip { from { opacity: 1; transform: translateX(-7px) rotate(-20deg); } to { opacity: 0; transform: translateX(7px) rotate(14deg); } }
@keyframes prop-flakes { from { opacity: 1; } to { opacity: 0; transform: translate(var(--dx), 22px) scale(.55); } }
@keyframes prop-sip { from { opacity: 1; } to { opacity: 0; transform: translateY(-22px) rotate(-21deg) scale(.9); } }
@keyframes prop-ripple { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(1.7); } }

.prop-icon { flex: none; position: relative; display: inline-block; width: 20px; height: 19px; vertical-align: middle; }
.prop-bouquet { display: inline-flex; }
.prop-bouquet .prop-icon + .prop-icon { margin-left: -11px; transform: translateY(-2px) rotate(10deg); }
.prop-icon::before, .prop-icon::after, .prop-icon i { content: ""; position: absolute; }
.icon-rose::before { inset: 1px 4px auto; height: 11px; border-radius: 50% 52% 44% 48%; background: radial-gradient(ellipse at 43% 40%, #f8a0a0 0 17%, #ad233f 23% 53%, #851e32 64%); box-shadow: inset -2px -1px #64192c7a; z-index: 1; }
.icon-rose::after { width: 3px; height: 12px; top: 7px; left: 9px; background: #4a8e53; border-radius: 2px; transform: rotate(15deg); }
.icon-rose i { width: 6px; height: 4px; bottom: 2px; left: 3px; border-radius: 1px 70%; background: #82b26c; transform: rotate(18deg); z-index: 1; }
.icon-cappuccino::before { width: 13px; height: 10px; bottom: 3px; left: 2px; border-radius: 2px 2px 6px 6px; background: linear-gradient(#966437 0 22%, #fff7df 29%, #cda97a); box-shadow: -1px 2px #61462554; }
.icon-cappuccino::after { width: 7px; height: 6px; bottom: 6px; right: 2px; border: 2px solid #e5c7a0; border-radius: 50%; }
.icon-cappuccino i { width: 6px; height: 4px; top: 0; left: 5px; border-radius: 50%; border-top: 1px solid #ad805a; }
.icon-vodka::before { inset: 2px 5px 2px; border-radius: 0 0 4px 4px; background: linear-gradient(#d8f4f34a 0 34%, #7dc7d2a8 36% 82%, #d7eeeb); border: 1px solid #b8e2e2; box-shadow: 1px 1px 3px #123347b3; }
.icon-vodka::after { width: 6px; height: 1px; top: 7px; left: 7px; background: #ffffffd9; }
.icon-cigarettes::before { inset: 1px 4px; background: linear-gradient(#f4e6ca 0 28%, #973c39 29% 69%, #b75b46); border-radius: 2px; border: 1px solid #98342e; box-shadow: 2px 1px #30251e9e; }
.icon-cigarettes::after { left: 6px; right: 6px; top: 8px; height: 1px; background: #e8c388; }
.icon-cigar::before { width: 18px; height: 6px; top: 7px; left: 1px; border-radius: 4px; background: linear-gradient(90deg, #b28943 0 16%, #5c321c 17% 22%, #9e5634 23% 82%, #75442c); box-shadow: 0 2px #31221b; transform: rotate(-15deg); }

.prop-smoking { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 4px; vertical-align: middle; }
.prop-stick { position: relative; display: flex; justify-content: flex-end; width: 30px; height: 6px; padding-right: 8px; }
.prop-filter { position: absolute; right: 0; top: 0; width: 8px; height: 100%; border-radius: 0 2px 2px 0; background: repeating-linear-gradient(125deg, #ad7039 0 2px, #d4a05d 2px 4px); }
.prop-burning { position: relative; display: block; height: 100%; width: var(--burn-left, 100%); border-radius: 2px 0 0 2px; background: linear-gradient(#fff8e9, #b9ae9f); }
.prop-smoking.cigar .prop-stick { width: 35px; height: 8px; }
.prop-smoking.cigar .prop-burning { background: linear-gradient(#b17549, #5c3127); }
.prop-smoking.cigar .prop-filter { background: linear-gradient(#b88057, #5c3127); border-left: 2px solid #d5af67; }
.prop-smoking:not(.lit) .prop-ember, .prop-smoking:not(.lit) .prop-ash, .prop-smoking:not(.lit) .prop-wisp { display: none; }
.prop-ash, .prop-ember, .prop-wisp { position: absolute; }
.prop-ash { right: 100%; width: var(--ash-width, 0px); top: 0; bottom: 0; border-radius: 2px 0 0 2px; background: repeating-linear-gradient(90deg, #8f8880 0 1px, #c3b5a7 1px 3px); }
.prop-ember { left: 0; top: 0; bottom: 0; width: 3px; background: #e85d38; box-shadow: 0 0 5px #ff9d57; }
.prop-wisp { top: -3px; left: 0; width: 5px; height: 5px; border: 1px solid #c5bdb1; border-radius: 50%; animation: prop-smoke-rise 1.65s ease-out infinite; }
.prop-timer { font: 700 11px var(--mono); font-variant-numeric: tabular-nums; }
@keyframes prop-smoke-rise { from { opacity: .65; transform: translateY(0) scale(.6); } to { opacity: 0; transform: translate(2px, -13px) scale(1.7); } }

@media (max-width: 540px) {
  .shop-toggle { padding-inline: 5px; font-size: 12px; }
  .shop-item { gap: 6px; padding: 6px; }
  .shop-item-art { width: 30px; height: 31px; }
  .shop-button { padding-inline: 5px; }
  .shop-stock-item .shop-tools { grid-column: 1 / -1; justify-content: flex-end; }
  .seat-props { --base-object: clamp(22px, 7.4cqw, 34px); }
  .props-pos-0 { --px: 66%; --py: 72%; }
  .props-pos-1 { --px: 13%; --py: 71%; }
  .props-pos-2 { --px: 13%; --py: 40%; }
  .props-pos-3 { --px: 73%; --py: 17%; }
  .props-pos-4 { --px: 87%; --py: 40%; }
  .props-pos-5 { --px: 87%; --py: 72%; }
  .prop-models { column-gap: 1px; }
}
@media (orientation: landscape) and (max-height: 570px) and (max-width: 1100px) {
  .shop-toggle { padding: 2px 8px; font-size: 12px; }
  .shop-shell { gap: 7px; }
  .shop-head { padding-block: 8px; }
  .shop-market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-item { grid-template-columns: auto 1fr; }
  .shop-item .shop-button { grid-column: 2; justify-self: start; }
  .seat-props { --base-object: clamp(25px, 9.8cqh, 42px); }
  .props-pos-0 { --px: 68%; --py: 79%; }
  .props-pos-1 { --px: 20%; --py: 93%; }
  .props-pos-2 { --px: 10.5%; --py: 54%; }
  .props-pos-3 { --px: 64%; --py: 22%; }
  .props-pos-4 { --px: 89.5%; --py: 54%; }
  .props-pos-5 { --px: 80%; --py: 93%; }
  .prop-models { column-gap: 2px; }
  .seat-props:is(.props-pos-1, .props-pos-5) .prop-models { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .prop-wisp { animation: none; opacity: .3; } }
