/* LSQ-01 login sequence — three skins: military, scifi, school */
#loginseq { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; overflow: hidden; --ls-bg: #0f120c; --ls-ink: #e8e2c8;
  --ls-ac: #d4a017; --ls-panel: #1a1e15; --ls-line: #4a4f3a; --ls-font: "Bebas Neue", var(--head), sans-serif; --ls-mono: ui-monospace, Consolas, monospace;
  background: var(--ls-bg); color: var(--ls-ink); animation: lsIn .4s ease both; }
#loginseq.bye { opacity: 0; transition: opacity .55s; }
@keyframes lsIn { from { opacity: 0; } }
#loginseq .ls-hud { position: absolute; top: 14px; left: 20px; right: 140px; display: flex; gap: 26px; font: 12px var(--ls-mono); letter-spacing: .25em; opacity: .7; }
#loginseq .ls-skip { position: absolute; top: 12px; right: 16px; opacity: .6; } #loginseq .ls-skip:hover { opacity: 1; }
#loginseq .ls-body { width: min(640px, 92vw); }
#loginseq .ls-piece { animation: lsPiece .45s cubic-bezier(.2,.9,.3,1) both; } #loginseq .ls-piece.out { opacity: 0; transform: translateY(-14px); transition: .35s; }
@keyframes lsPiece { from { opacity: 0; transform: translateY(18px); } }
#loginseq h2 { font: 400 clamp(30px, 4.6vw, 50px) var(--ls-font); letter-spacing: .05em; margin: 4px 0 10px; color: var(--ls-ink); }
#loginseq small { letter-spacing: .3em; font-size: 11px; color: var(--ls-ac); display: block; }
#loginseq .ls-row { display: flex; gap: 26px; margin-top: 10px; } #loginseq .ls-row span { font-weight: 600; }
#loginseq button { font-family: inherit; }
/* skins */
#loginseq.ls-military { background: repeating-linear-gradient(0deg, #ffffff04 0 2px, transparent 2px 4px), radial-gradient(ellipse at 50% 30%, #23291b, #0b0d08 70%); }
#loginseq.ls-scifi { --ls-bg: #040b14; --ls-ink: #dff6ff; --ls-ac: #29e0ff; --ls-panel: #08182a; --ls-line: #1b4d6b;
  background: linear-gradient(#29e0ff0d 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, #29e0ff0d 1px, transparent 1px) 0 0 / 40px 40px, radial-gradient(ellipse at 50% 40%, #0b2340, #02060c 70%); }
#loginseq.ls-school { --ls-bg: #fbf6ea; --ls-ink: #2b2b3a; --ls-ac: #e0577a; --ls-panel: #ffffff; --ls-line: #cfc6b4; --ls-font: "Mitr", "Kanit", var(--head), sans-serif;
  background: linear-gradient(#9ec5ff33 1px, transparent 1px) 0 0 / 100% 30px, #fbf6ea; }
#loginseq.ls-school h2 { font-weight: 600; letter-spacing: 0; }
/* ID card */
.ls-card { position: relative; background: var(--ls-panel); border: 1px solid var(--ls-line); border-top: 8px solid var(--lc); padding: 0 0 12px; overflow: hidden;
  box-shadow: 0 20px 60px #0008; max-width: 520px; margin: 0 auto; }
.ls-school .ls-card { border-radius: 16px; box-shadow: 0 10px 30px #0002; }
.ls-card::before { content: ""; position: absolute; top: 8px; left: 50%; width: 56px; height: 9px; margin-left: -28px; border-radius: 6px; background: var(--ls-bg); box-shadow: inset 0 1px 3px #0008; }
.ls-card-top { display: flex; justify-content: space-between; align-items: end; padding: 24px 18px 8px; border-bottom: 1px dashed var(--ls-line); }
.ls-card-top b { font: 400 22px var(--ls-font); letter-spacing: .2em; }
.ls-card-mid { display: flex; gap: 18px; padding: 14px 18px; }
.ls-face { flex: none; width: 130px; height: 160px; background: #2224 center / cover; border: 1px solid var(--ls-line); }
.ls-noface { background: radial-gradient(circle at 50% 35%, #8886 0 18%, transparent 19%), radial-gradient(ellipse at 50% 100%, #8886 0 45%, transparent 46%) !important; }
.ls-card-bot { display: flex; justify-content: space-between; align-items: center; padding: 0 18px; }
.ls-bc { display: inline-flex; gap: 2px; height: 30px; } .ls-bc i { background: var(--ls-ink); display: block; height: 100%; }
.ls-card-bot code { font: 13px var(--ls-mono); letter-spacing: .2em; }
.ls-scan { position: absolute; left: 0; right: 0; height: 40px; top: -40px; background: linear-gradient(transparent, var(--ls-ac) 50%, transparent); opacity: .35; animation: lsScan 1.6s ease-in-out both; }
@keyframes lsScan { to { top: 100%; } }
.ls-ok { text-align: center; margin-top: 18px; font: 400 32px var(--ls-font); letter-spacing: .3em; color: var(--ls-ac); opacity: 0; }
.lk-idscan.granted .ls-ok { opacity: 1; animation: lsBlink .25s steps(2) 3; }
@keyframes lsBlink { 50% { opacity: 0; } }
/* duty stamp */
.ls-sheet { position: relative; background: var(--ls-panel); border: 1px solid var(--ls-line); padding: 26px 28px; text-align: center; }
.ls-clock { font: 400 72px var(--ls-font); letter-spacing: .06em; color: var(--ls-ac); }
.ls-stamp { position: absolute; right: 30px; bottom: 30px; font: 400 44px var(--ls-font); letter-spacing: .12em; color: #d32f2f; border: 5px solid #d32f2f; padding: 2px 16px;
  transform: rotate(-12deg) scale(3); opacity: 0; mix-blend-mode: multiply; pointer-events: none; }
.ls-military .ls-stamp, .ls-scifi .ls-stamp { mix-blend-mode: normal; }
.ls-stamp.ls-stamped, .ls-piece.stamped .ls-stamp { opacity: .9; transform: rotate(-12deg) scale(1); transition: transform .18s cubic-bezier(.5,1.8,.6,1), opacity .1s; }
.ls-piece.stamped .ls-sheet { animation: lsThud .3s .12s; } .ls-piece.stamped .ls-tap { visibility: hidden; }
@keyframes lsThud { 30% { transform: translateY(4px); } }
.ls-tap { margin-top: 16px; }
/* radio */
.ls-radio { background: var(--ls-panel); border: 1px solid var(--ls-line); padding: 18px 22px; }
.ls-st { font: 400 22px var(--ls-font); letter-spacing: .12em; } .ls-live { color: #ff5252; font-size: 14px; animation: lsBlink 1.2s steps(2) infinite; margin-left: 8px; }
.ls-noise { height: 26px; margin: 10px 0; background: repeating-linear-gradient(90deg, var(--ls-ac) 0 2px, transparent 2px 5px); opacity: .35; animation: lsNoise .3s steps(3) infinite; }
@keyframes lsNoise { 50% { transform: scaleY(.4); opacity: .2; } }
.ls-lines div { font: 15px var(--ls-mono); margin: 8px 0; min-height: 1.3em; }
/* question / mood */
.ls-q { text-align: center; } .ls-opts { display: flex; flex-direction: column; gap: 8px; margin: 14px auto; max-width: 460px; }
.ls-opts button { padding: 12px; font-size: 16px; background: var(--ls-panel); color: var(--ls-ink); border: 1px solid var(--ls-line); border-radius: 0; cursor: pointer; }
.ls-opts button:hover, .ls-opts button.on { border-color: var(--ls-ac); background: color-mix(in srgb, var(--ls-ac) 18%, var(--ls-panel)); }
.ls-school .ls-opts button { border-radius: 12px; }
.ls-moods { flex-direction: row; flex-wrap: wrap; justify-content: center; } .ls-moods button { min-width: 120px; }
.ls-bar { position: relative; text-align: left; padding: 10px 12px; border: 1px solid var(--ls-line); background: var(--ls-panel); overflow: hidden; }
.ls-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--ls-ac) 30%, transparent); animation: lsGrow .8s ease both; }
.ls-bar span, .ls-bar b { position: relative; } .ls-bar b { float: right; } .ls-bar.me { border-color: var(--ls-ac); }
@keyframes lsGrow { from { width: 0; } }
/* boot */
.ls-boot { background: var(--ls-panel); border: 1px solid var(--ls-line); padding: 18px 22px; }
.ls-blines div { display: flex; justify-content: space-between; font: 14px var(--ls-mono); margin: 5px 0; } .ls-blines b { visibility: hidden; color: #66bb6a; } .ls-blines .ok b { visibility: visible; }
.ls-prog { height: 6px; background: #0004; margin-top: 12px; } .ls-prog i { display: block; height: 100%; width: 0; background: var(--ls-ac); transition: width .25s; }
.ls-boot.ready h2, .ls-piece.ready h2 { color: #66bb6a; }
/* auth */
.ls-auth { text-align: center; } .ls-code { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
.ls-code i { font: 400 44px var(--ls-font); font-style: normal; width: 52px; padding: 4px 0; border: 1px solid var(--ls-line); background: var(--ls-panel); color: var(--ls-ac); }
.ls-in { font: 400 34px var(--ls-mono); letter-spacing: .5em; text-align: center; width: 280px; background: transparent; color: var(--ls-ink); border: 0; border-bottom: 2px solid var(--ls-ac); outline: none; text-transform: uppercase; }
.ls-piece.wrong .ls-in { animation: lsShake .3s; } .ls-piece.verified .ls-msg { color: #66bb6a; font-weight: 700; letter-spacing: .3em; }
@keyframes lsShake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
/* letter */
.ls-env { position: relative; max-width: 520px; margin: 0 auto; min-height: 300px; }
.ls-paper { background: #fffdf6; color: #2b2b2b; padding: 26px 30px; box-shadow: 0 16px 40px #0007; transform: translateY(60px) scale(.9); opacity: 0; transition: .6s cubic-bezier(.2,.9,.3,1); }
.ls-paper h2 { color: #2b2b2b !important; } .ls-paper p { white-space: pre-wrap; line-height: 1.6; } .ls-paper img { max-width: 100%; margin: 6px 0; }
.ls-paper small { color: #a33 !important; }
.ls-seal { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 70px; cursor: pointer; transition: .4s; }
.ls-flap { position: absolute; inset: 0 0 auto; height: 0; }
.ls-piece.open .ls-paper { transform: none; opacity: 1; } .ls-piece.open .ls-seal { opacity: 0; pointer-events: none; }
/* board */
.ls-boardin { background: var(--ls-panel); border: 1px solid var(--ls-line); padding: 18px 22px; }
.ls-mates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.ls-mates div { display: flex; align-items: center; gap: 8px; } .ls-mates i { width: 8px; height: 8px; border-radius: 50%; background: #777; } .ls-mates .on i { background: #66bb6a; box-shadow: 0 0 6px #66bb6a; }
.ls-mates small { display: inline; letter-spacing: .05em; }
body.reduce-motion #loginseq * { animation: none !important; transition: none !important; }
/* LSQ-02: card reader — drag the card up into the reader, then swipe it through */
.lk-idscan { position: relative; min-height: 520px; touch-action: none; user-select: none; }
.ls-reader { position: relative; margin: 0 auto 26px; width: min(600px, 92vw); padding: 12px 16px 14px; background: linear-gradient(#2a2e33, #15181b);
  border: 1px solid #000; border-radius: 10px; box-shadow: 0 10px 30px #0009, inset 0 1px 0 #ffffff22; }
.ls-school .ls-reader { background: linear-gradient(#e9e4da, #cfc8ba); }
.ls-led { position: absolute; right: 18px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: #a8401f; box-shadow: 0 0 6px #ff3b1f; }
.ls-led.ok { background: #2ecc71; box-shadow: 0 0 12px #2ecc71; } .ls-led.bad { animation: lsBlink .2s steps(2) 4; }
.ls-lcd { font: 15px var(--ls-mono); letter-spacing: .18em; color: #8cff9a; background: #0b1a0d; border: 1px solid #000; padding: 6px 10px; width: 72%; text-shadow: 0 0 6px #8cff9a88; }
.ls-rail { position: relative; height: 22px; margin-top: 12px; background: #050607; border-radius: 4px; box-shadow: inset 0 3px 6px #000; --p: 0; }
.ls-rail::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: linear-gradient(90deg, transparent, var(--ls-ac)); opacity: .35; border-radius: 4px; }
.ls-slot { position: absolute; inset: 9px 8px; background: #000; border-radius: 2px; }
.lk-idscan.near .ls-reader { box-shadow: 0 0 0 2px var(--ls-ac), 0 10px 30px #0009; }
.ls-hand { position: relative; width: min(520px, 90vw); margin: 0 auto; cursor: grab; transition: transform .08s; z-index: 2; }
.ls-hand.held { cursor: grabbing; transition: none; } .ls-hand.held .ls-card { box-shadow: 0 30px 60px #000a; }
.ls-hand .ls-card .ls-scan { display: none; }
.ls-stripe { height: 14px; background: #111; margin: 10px 0 0; }
.ls-school .ls-stripe { background: #444; }
/* in the rail: the card shrinks and stands in the slot, the reader draws it through */
.lk-idscan.inrail .ls-hand { position: absolute; top: 56px; left: 50%; width: min(600px, 92vw); transform: translateX(-50%) !important; height: 130px; overflow: visible; }
.lk-idscan.inrail .ls-hand .ls-card { width: 160px; height: 104px; padding: 0; margin: 0; border-top-width: 5px; transform-origin: left top; }
.lk-idscan.inrail .ls-hand .ls-card > :not(.ls-stripe) { display: none; }
.lk-idscan.inrail .ls-hand .ls-card .ls-stripe { margin: 44px 0 0; }
.lk-idscan.inrail .ls-hand .ls-card::before { display: none; }
.ls-hint { text-align: center; margin-top: 18px; font: 13px var(--ls-mono); letter-spacing: .15em; opacity: .75; }
.lk-idscan.inrail .ls-hint { position: absolute; left: 0; right: 0; top: 250px; }
.lk-idscan.wrong .ls-reader { animation: lsShake .3s; }
.lk-idscan .ls-ok { position: absolute; left: 0; right: 0; bottom: 20px; }
/* granted: the card comes out big and readable */
.lk-idscan.granted.inrail .ls-hand { top: 120px; height: auto; width: min(520px, 90vw); }
.lk-idscan.granted.inrail .ls-hand .ls-card { width: auto; height: auto; padding: 0 0 12px; border-top-width: 8px; transform: none !important; animation: lsPop .45s cubic-bezier(.2,1.4,.4,1) both; }
.lk-idscan.granted.inrail .ls-hand .ls-card > :not(.ls-stripe) { display: revert; } .lk-idscan.granted.inrail .ls-hand .ls-card .ls-card-mid { display: flex; }
.lk-idscan.granted.inrail .ls-hand .ls-card .ls-card-top, .lk-idscan.granted.inrail .ls-hand .ls-card .ls-card-bot { display: flex; }
.lk-idscan.granted.inrail .ls-hand .ls-card .ls-stripe, .lk-idscan.granted .ls-hand .ls-card .ls-scan { display: none; }
.lk-idscan.granted .ls-hint { display: none; }
@keyframes lsPop { from { transform: scale(.4); opacity: 0; } }
