/* Casting Lots (lots.js) — wooden sticks on a sandy threshing floor under the Game section's night sky. */
.lt-note { margin: 0; color: #e8dcc0; font-size: 14px; background: #ffffff10; border: 1px solid #f4ecd833; border-radius: 12px; padding: 8px 10px; }
.lt-a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 6px; }
.lt-step { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px 0 4px; }
.lt-step .gm-btn { min-width: 56px; min-height: 52px; font-size: 24px; padding: 0; }
.lt-n { font: 700 2.4rem var(--serif); min-width: 2ch; text-align: center; color: #5a3519; }
.lt-range { width: 100%; height: 44px; accent-color: #8a5a32; }
.lt-levels { display: flex; flex-direction: column; gap: 8px; }
.lt-lv { display: flex; align-items: flex-start; gap: 10px; text-align: left; min-height: 60px; padding: 10px 12px; border-radius: 12px; border: 1px solid #c9b07a; background: #fffaf0; color: var(--ink); font: 14px var(--sans); cursor: pointer; }
.lt-lv b { display: block; font-size: 15px; } .lt-lv small { color: #6b5a40; font-size: 13px; }
.lt-lv.on { background: #2c3e75; border-color: #f3c862; color: #fff6e6; box-shadow: 0 0 12px #ffbf4a66; } .lt-lv.on small { color: #e8dcc0; }
.lt-li { font-size: 22px; line-height: 1.2; }
.lt-foot { text-align: center; }
/* the field */
.lt-playv { min-height: calc(100dvh - 24px); }
.lt-field { position: relative; height: calc(100dvh - 210px); min-height: 300px; max-height: 720px; border-radius: 18px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; cursor: grab;
  background: radial-gradient(ellipse at 50% 40%, #d9b77c 0%, #b88f55 55%, #8a6534 100%); box-shadow: inset 0 0 60px #3a220c99, 0 8px 26px #000a; }
.lt-field.holding { cursor: grabbing; }
.lt-field.thrown { cursor: default; }
.lt-field:focus-visible { box-shadow: inset 0 0 60px #3a220c99, 0 0 0 3px #f3c862; }
.lt-ground { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(1.2px 1.2px at 20% 30%, #5a3a1488 50%, transparent 51%), radial-gradient(1px 1px at 70% 60%, #5a3a1488 50%, transparent 51%), radial-gradient(1.5px 1.5px at 40% 80%, #fff3 50%, transparent 51%), radial-gradient(1px 1px at 85% 20%, #fff3 50%, transparent 51%);
  background-size: 37px 41px, 53px 47px, 61px 59px, 43px 67px; }
.lt-stick { position: absolute; left: 0; top: 0; width: var(--lt-l, 160px); height: var(--lt-t, 44px); padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% 50%; will-change: transform; z-index: 2; touch-action: manipulation; border-radius: 17px; }
.lt-field:not(.thrown) .lt-stick { cursor: inherit; pointer-events: none; }
.lt-wood { position: absolute; inset: 9px 0; border-radius: 13px / 50%; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: repeating-linear-gradient(0deg, #0000 0 3px, #6a3f1a22 3px 4px), linear-gradient(180deg, #e9c58a 0%, #c99654 45%, #a87436 80%, #7d5224 100%);
  box-shadow: inset 0 1px 0 #fff6, inset 0 -2px 3px #4a2a0c88, 0 1px 1px #0005; }
.lt-wood::before, .lt-wood::after { content: ""; position: absolute; top: 18%; bottom: 18%; width: 9px; border-radius: 50%; background: radial-gradient(#8a5a2a, #5a3514); opacity: .7; }
.lt-wood::before { left: 6px; } .lt-wood::after { right: 6px; }
.lt-burn { font: 700 13.5px/1 var(--serif); color: #3a1a06; letter-spacing: .02em; white-space: nowrap; padding: 0 16px; text-shadow: 0 0 2px #a0521a88, 0 1px 0 #f3d39a66; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lt-shadow { position: absolute; left: 0; top: 0; width: var(--lt-l, 160px); height: calc(var(--lt-t, 44px) - 18px); margin-top: 9px; border-radius: 13px; background: #2a160699; filter: blur(4px); opacity: 0; pointer-events: none; z-index: 1; transform-origin: 50% 50%; }
.lt-stick:focus-visible { outline: 3px solid #fff6d0; outline-offset: 2px; }
.lt-field.thrown .lt-stick:hover .lt-wood { filter: brightness(1.08); }
.lt-stick.lifted { z-index: 5; } .lt-stick.lifted .lt-wood { transform: scale(1.18) translateY(-6px); box-shadow: 0 14px 18px #0007; transition: transform .25s; }
.lt-stick.done .lt-wood { background: repeating-linear-gradient(0deg, #0000 0 3px, #ffffff14 3px 4px), linear-gradient(180deg, #6b5a48 0%, #4a3c2e 55%, #2e241a 100%); box-shadow: 0 0 12px 3px #ffbf4aaa, inset 0 0 8px #ff8a2a99; }
.lt-stick.done .lt-burn { color: #ffe2a8; text-shadow: 0 0 6px #ff9f2a; }
.lt-ok { position: absolute; right: -6px; top: -8px; width: 24px; height: 24px; border-radius: 50%; background: #f3c862; color: #3a1a06; font: 700 14px/24px var(--sans); box-shadow: 0 0 10px #ffbf4a; }
.lt-stick.lt-back .lt-wood { animation: lt-back .7s ease-out; }
@keyframes lt-back { 0% { transform: scale(1.4) translateY(-14px); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
.lt-hand { position: absolute; left: 50%; bottom: -18px; width: 120px; height: 64px; transform: translateX(-50%); border-radius: 60px 60px 18px 18px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, #7a5230, #4f321a); box-shadow: inset 0 3px 0 #a87a4a, 0 -4px 14px #0006; }
.lt-hand::before { content: ""; position: absolute; left: 12px; right: 12px; top: 10px; height: 6px; border-radius: 4px; background: #3a220c66; }
.lt-hand.toss { transition: transform .25s ease-out, opacity .4s; transform: translate(-50%, -40px) !important; opacity: 0; }
.lt-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 22px; background: #0b1430cc; color: #fff6e6; font: 600 15px var(--sans); white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px #0007; }
.lt-arrow { display: inline-block; color: #f3c862; animation: lt-down 1.6s ease-in-out infinite; } .lt-arrow.up { animation-name: lt-up; }
@keyframes lt-down { 0%, 100% { transform: translateY(-3px); opacity: .6; } 30% { transform: translateY(5px); opacity: 1; } 60% { transform: translateY(5px); opacity: .5; } }
@keyframes lt-up { 0%, 40% { transform: translateY(4px); opacity: .4; } 70% { transform: translateY(-7px); opacity: 1; } 100% { transform: translateY(-3px); opacity: .6; } }
.lt-hint.nudge { animation: lt-nudge .45s; }
@keyframes lt-nudge { 30% { transform: translateX(-50%) scale(1.08); } 100% { transform: translateX(-50%); } }
.lt-dust { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.lt-dust i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #f3e1b8; opacity: 0; animation: lt-dust .85s ease-out forwards; }
@keyframes lt-dust { 0% { opacity: .85; transform: translate(0, 0) scale(var(--s)); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(calc(var(--s) * 2.4)); } }
.lt-bar { min-height: 60px; display: flex; flex-direction: column; justify-content: center; }
.lt-bar .gm-big { margin: 0; }
.lt-msg { margin: 4px 0 0; color: #e8dcc0; font-size: 14px; text-align: center; } .lt-msg span { display: block; color: #cdb98f; font-size: 13px; }
@media (pointer: coarse) { .lt-keys { display: none; } }
/* task card */
.lt-task { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: #05091acc; opacity: 0; transition: opacity .22s; }
.lt-task.open { opacity: 1; } .lt-task[hidden] { display: none; }
.lt-card { width: min(440px, 100%); max-height: 100%; overflow: auto; background: linear-gradient(180deg, #f8f0dc, #efe2c3); border: 1px solid #c9b07a; border-radius: 18px; padding: 18px; box-shadow: 0 20px 50px #000c; color: var(--ink); text-align: center; transform: scale(.7) rotate(-6deg); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3); }
.lt-task.open .lt-card { transform: none; }
.lt-cstick { position: relative; width: 220px; height: 40px; margin: 0 auto 8px; } .lt-cstick .lt-burn { font-size: 16px; }
.lt-cnum { margin: 0; font-size: 13px; color: #6b5a40; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.lt-card h3 { margin: 2px 0; font: 600 1.6rem var(--serif); }
.lt-cpass { margin: 0 0 8px; color: #6b5a40; font-size: 14px; }
.lt-ctask { margin: 0 0 10px; font-size: 15px; } .lt-ctask small { color: #6b5a40; }
.lt-sum { margin: 6px 0 0; padding-left: 1.4em; } .lt-sum li { padding: 6px 0; border-bottom: 1px dashed #d7c49a; } .lt-sref { font: 600 1.05rem var(--serif); } .lt-sum small { display: block; color: #6b5a40; }
/* Memorize banner while a lot's task runs */
.mz-banner { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: #2c3e75; color: #fff6e6; font-size: 14px; font-weight: 600; }
/* dark theme */
html:not(.light) .lt-lv { background: #221d12; border-color: #6a5530; color: #f1e6cf; } html:not(.light) .lt-lv small, html:not(.light) .lt-cnum, html:not(.light) .lt-cpass, html:not(.light) .lt-ctask small, html:not(.light) .lt-sum small { color: #cdb98f; }
html:not(.light) .lt-lv.on { background: #2c3e75; border-color: #f3c862; }
html:not(.light) .lt-n { color: #f3c862; }
html:not(.light) .lt-card { background: linear-gradient(180deg, #221d12, #1a160d); border-color: #6a5530; color: #f1e6cf; }
html:not(.light) .lt-sum li { border-color: #4a3c22; }
html:not(.light) .lt-field { background: radial-gradient(ellipse at 50% 40%, #8a6a3e 0%, #6a4c26 55%, #3e2a12 100%); }
@media (max-height: 460px) and (orientation: landscape) {
  .lt-playv { min-height: 0; } .lt-field { height: calc(100dvh - 130px); min-height: 220px; }
  .lt-bar { min-height: 50px; } .lt-bar .gm-big { min-height: 48px; }
  .lt-hint { top: 8px; font-size: 14px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .lt-arrow, .lt-hint.nudge, .lt-stick.lt-back .lt-wood, .lt-dust i { animation: none; }
  .lt-card { transform: none; transition: none; } .lt-task { transition: opacity .2s; }
  .lt-stick.lifted .lt-wood { transform: none; transition: none; outline: 3px solid #fff6d0; }
}
