:root {
    --lm-ink: #162c31;
    --lm-deep: #0c2227;
    --lm-jade: #3ba77d;
    --lm-mint: #9de3b4;
    --lm-gold: #efc86a;
    --lm-paper: #f4eed8;
    --lm-glass: rgba(12, 34, 39, .86);
    --lm-line: rgba(210, 239, 214, .24);
}

.site-main:has(.lm-shell) { overflow: hidden; }
.lm-shell { position: relative; min-height: max(420px, calc(100dvh - 68px)); color: #f7f3df; background: var(--lm-deep); font-family: "M PLUS Rounded 1c", sans-serif; }
.lm-shell [hidden] { display: none !important; }
.lm-shell button, .lm-shell input { font: inherit; }
.lm-shell button { color: inherit; }

/* Title */
.lm-title { position: relative; min-height: min(900px, calc(100vh - 68px)); min-height: min(900px, calc(100dvh - 68px)); display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.lm-title-art { position: absolute; inset: 0; z-index: -4; background: url('../images/lumeria/lumeria-world-keyart.png') center 48% / cover no-repeat; transform: scale(1.015); animation: lmTitleDrift 22s ease-in-out infinite alternate; }
.lm-title-vignette { position: absolute; inset: 0; z-index: -3; background: linear-gradient(90deg, rgba(7, 25, 27, .94) 0%, rgba(7, 25, 27, .78) 34%, rgba(7, 25, 27, .18) 68%, rgba(7, 25, 27, .52) 100%), linear-gradient(0deg, rgba(6, 20, 23, .8), transparent 44%, rgba(255, 241, 185, .1)); }
.lm-title::before, .lm-title::after { content: ""; position: absolute; pointer-events: none; border: 1px solid rgba(242, 222, 155, .35); border-radius: 50%; }
.lm-title::before { width: 620px; height: 620px; right: -280px; top: -260px; box-shadow: 0 0 0 28px rgba(242, 222, 155, .04), 0 0 0 76px rgba(242, 222, 155, .03); }
.lm-title::after { width: 300px; height: 300px; right: 11%; bottom: -210px; box-shadow: 0 0 0 22px rgba(157, 227, 180, .05); }
.lm-title-content { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 80px 0 100px; }
.lm-title-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: #d8efc5; letter-spacing: .25em; font: 700 12px/1.4 Nunito, sans-serif; }
.lm-title-kicker::before { content: ""; width: 42px; height: 1px; background: var(--lm-gold); box-shadow: 18px 0 var(--lm-gold); }
.lm-title h1 { max-width: 700px; margin: 0; color: #fff8df; font-family: "Kiwi Maru", serif; font-size: clamp(54px, 8.2vw, 112px); font-weight: 500; line-height: .92; letter-spacing: -.06em; text-shadow: 0 8px 30px rgba(0, 0, 0, .45); }
.lm-title h1 span { display: block; margin: 0 0 8px 8px; color: #d6efbe; font-size: .3em; letter-spacing: .22em; }
.lm-title-lead { max-width: 680px; margin: 28px 0 22px; color: rgba(246, 244, 226, .88); font-size: clamp(14px, 1.6vw, 18px); line-height: 2; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.lm-title-features { display: flex; flex-wrap: wrap; max-width: 760px; gap: 8px; margin-bottom: 30px; }
.lm-title-features span { min-width: 132px; padding: 10px 15px; border: 1px solid rgba(216, 239, 197, .28); border-radius: 4px; background: rgba(13, 40, 39, .55); color: rgba(255, 255, 255, .72); backdrop-filter: blur(8px); font-size: 11px; letter-spacing: .08em; }
.lm-title-features b { display: block; color: #fff1b7; font: 800 17px/1.1 Nunito, sans-serif; letter-spacing: .04em; }
.lm-title-actions { display: flex; align-items: stretch; gap: 12px; }
.lm-enter { position: relative; display: grid; grid-template-columns: 66px 1fr; grid-template-rows: 1fr 1fr; align-items: center; width: min(390px, 100%); min-height: 74px; padding: 12px 24px 12px 16px; border: 1px solid rgba(255, 244, 190, .72); border-radius: 5px; background: linear-gradient(135deg, #367a60, #205648); box-shadow: 0 12px 34px rgba(3, 22, 21, .36), inset 0 0 24px rgba(159, 232, 171, .08); cursor: pointer; transition: transform .2s, filter .2s, box-shadow .2s; text-align: left; }
.lm-enter::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255, 255, 255, .15); pointer-events: none; }
.lm-enter span { grid-row: 1 / 3; display: grid; place-items: center; align-self: stretch; margin-right: 15px; border-right: 1px solid rgba(255, 255, 255, .18); color: #ffe8a0; font: 800 9px Nunito, sans-serif; letter-spacing: .13em; writing-mode: vertical-rl; }
.lm-enter b { align-self: end; color: #fffbed; font-size: 19px; letter-spacing: .06em; }
.lm-enter small { align-self: start; color: rgba(235, 255, 239, .72); font-size: 10px; }
.lm-enter:not(:disabled):hover { transform: translateY(-3px); filter: brightness(1.08); box-shadow: 0 17px 42px rgba(3, 22, 21, .46), 0 0 0 3px rgba(157, 227, 180, .12); }
.lm-enter:disabled, .lm-maker-open:disabled { cursor: wait; opacity: .62; }
.lm-maker-open { min-width: 180px; padding: 12px 19px; border: 1px solid rgba(235, 245, 214, .36); border-radius: 5px; background: rgba(8, 31, 32, .68); backdrop-filter: blur(9px); cursor: pointer; font-weight: 700; transition: background .2s, border-color .2s; }
.lm-maker-open:not(:disabled):hover { border-color: var(--lm-gold); background: rgba(28, 69, 61, .85); }
.lm-save-policy { display: flex; align-items: center; gap: 12px; width: min(585px, 100%); margin-top: 16px; padding: 11px 14px; border-left: 3px solid var(--lm-mint); background: rgba(8, 28, 29, .62); backdrop-filter: blur(8px); }
.lm-save-policy.is-guest { border-left-color: #edbd67; }
.lm-save-policy i { flex: 0 0 14px; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; position: relative; }
.lm-save-policy i::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; inset: 3px; }
.lm-save-policy span { display: grid; gap: 1px; min-width: 0; }
.lm-save-policy b { font-size: 12px; }
.lm-save-policy small { color: rgba(255, 255, 255, .64); font-size: 10px; line-height: 1.5; }
.lm-save-policy a { margin-left: auto; color: #ffe09a; font-size: 11px; white-space: nowrap; }
.lm-title-footer { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 25px; padding: 11px 20px; border-top: 1px solid rgba(255, 255, 255, .14); background: rgba(6, 23, 25, .72); color: rgba(255, 255, 255, .62); backdrop-filter: blur(10px); font: 700 10px Nunito, sans-serif; letter-spacing: .1em; }

/* World */
.lm-world { position: relative; width: 100%; height: calc(100vh - 68px); height: calc(100dvh - 68px); min-height: 420px; overflow: hidden; background: #375f58; user-select: none; }
.lm-world-canvas { display: block; width: 100%; height: 100%; outline: none; cursor: crosshair; }
.lm-world-canvas:focus-visible { box-shadow: inset 0 0 0 3px #fff0a5; }
.lm-world-shade { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 110px rgba(5, 25, 29, .2); }
.lm-hud-top { position: absolute; z-index: 8; left: max(22px, env(safe-area-inset-left)); top: max(18px, env(safe-area-inset-top)); right: max(22px, env(safe-area-inset-right)); display: grid; grid-template-columns: minmax(320px, 440px) 1fr minmax(190px, auto); gap: 16px; align-items: start; pointer-events: none; }
.lm-player-card, .lm-zone-card, .lm-online-card { border: 1px solid var(--lm-line); background: linear-gradient(135deg, rgba(10, 35, 39, .91), rgba(17, 51, 46, .82)); box-shadow: 0 10px 30px rgba(4, 21, 24, .25); backdrop-filter: blur(12px); pointer-events: auto; }
.lm-player-card { display: flex; height: 90px; border-radius: 9px 28px 9px 9px; overflow: hidden; }
.lm-player-card canvas { flex: 0 0 92px; width: 92px; height: 92px; background: radial-gradient(circle at 50% 68%, rgba(154, 220, 154, .35), transparent 65%); }
.lm-player-main { flex: 1; min-width: 0; padding: 10px 15px 8px 8px; }
.lm-player-main > div:first-child { display: flex; align-items: baseline; gap: 9px; margin-bottom: 7px; }
.lm-player-main small { color: #e8cb73; font: 800 10px Nunito, sans-serif; letter-spacing: .1em; }
.lm-player-main strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Kiwi Maru", serif; font-size: 18px; }
.lm-player-main span { margin-left: auto; padding: 2px 6px; border: 1px solid rgba(157, 227, 180, .42); border-radius: 2px; color: #b9ebc4; font: 800 8px Nunito, sans-serif; letter-spacing: .1em; }
.lm-meter { position: relative; height: 13px; margin-top: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; background: rgba(2, 18, 21, .72); }
.lm-meter i { display: block; width: 100%; height: 100%; border-radius: inherit; transition: width .3s; }
.lm-meter b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-shadow: 0 1px 2px #000; font: 800 8px Nunito, sans-serif; letter-spacing: .08em; }
.lm-hp i { background: linear-gradient(90deg, #c44252, #ee8271); box-shadow: 0 0 12px rgba(238, 130, 113, .4); }
.lm-xp i { width: 0; background: linear-gradient(90deg, #3e9f89, #87d9a6); }
.lm-zone-card { justify-self: center; min-width: 230px; padding: 10px 28px; border-radius: 4px 4px 22px 22px; text-align: center; }
.lm-zone-card small { display: block; color: #d4eecb; font-size: 9px; letter-spacing: .15em; }
.lm-zone-card strong { display: block; margin: 2px 0; font-family: "Kiwi Maru", serif; font-size: 20px; letter-spacing: .08em; }
.lm-zone-card span { color: rgba(255, 255, 255, .6); font: 700 9px Nunito, sans-serif; letter-spacing: .12em; }
.lm-online-card { display: flex; align-items: center; gap: 9px; min-height: 58px; padding: 8px 12px; border-radius: 28px 7px 7px 28px; }
.lm-online-light { width: 11px; height: 11px; border-radius: 50%; background: #6ce6a1; box-shadow: 0 0 0 5px rgba(108, 230, 161, .12), 0 0 16px #6ce6a1; }
.lm-shell.is-reconnecting .lm-online-light { background: #efc86a; box-shadow: 0 0 0 5px rgba(239, 200, 106, .14), 0 0 16px #efc86a; animation: lmReconnectPulse .8s ease-in-out infinite alternate; }
.lm-online-card > span:nth-child(2) { display: grid; }
.lm-online-card small { color: rgba(255, 255, 255, .54); font: 700 8px Nunito, sans-serif; letter-spacing: .1em; }
.lm-online-card b { font-size: 12px; }
.lm-online-card b i { color: #a9efbd; font-size: 18px; font-style: normal; }
.lm-online-card button { margin-left: 4px; padding: 7px 9px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 4px; background: rgba(255, 255, 255, .06); cursor: pointer; font-size: 9px; }

.lm-quest-panel { position: absolute; z-index: 7; left: 22px; top: 126px; width: min(300px, calc(100% - 44px)); padding: 15px; border: 1px solid var(--lm-line); border-radius: 7px; background: var(--lm-glass); box-shadow: 0 12px 30px rgba(4, 21, 24, .22); backdrop-filter: blur(11px); transition: width .2s; }
.lm-quest-panel header { display: flex; align-items: center; justify-content: space-between; color: #b8dcbf; font: 800 8px Nunito, sans-serif; letter-spacing: .17em; }
.lm-quest-panel header button { width: 24px; height: 24px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 3px; background: rgba(255, 255, 255, .05); cursor: pointer; }
.lm-quest-panel h2 { margin: 3px 0 10px; font: 500 18px "Kiwi Maru", serif; }
.lm-quest-panel.is-folded { width: 138px; }
.lm-quest-panel.is-folded h2, .lm-quest-panel.is-folded #lmQuestList { display: none; }
#lmQuestList { max-height: min(46vh, 410px); padding-right: 4px; overflow-y: auto; scrollbar-color: rgba(157, 227, 180, .45) transparent; scrollbar-width: thin; }
.lm-quest-entry { display: grid; grid-template-columns: 15px 1fr auto; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.lm-quest-entry > i { width: 11px; height: 11px; margin-top: 3px; border: 1px solid #9ed2a6; border-radius: 50%; }
.lm-quest-entry.is-done > i { background: #8add9c; box-shadow: inset 0 0 0 2px #245a4a; }
.lm-quest-entry span { display: grid; gap: 2px; }
.lm-quest-entry b { font-size: 11px; }
.lm-quest-entry small { color: rgba(255, 255, 255, .55); font-size: 9px; line-height: 1.45; }
.lm-quest-entry em { align-self: center; color: #f0d581; font: 800 9px Nunito, sans-serif; font-style: normal; }

.lm-minimap-wrap { position: absolute; z-index: 7; right: 22px; top: 95px; width: 220px; overflow: hidden; border: 1px solid var(--lm-line); border-radius: 7px; background: var(--lm-glass); box-shadow: 0 12px 30px rgba(4, 21, 24, .22); }
.lm-minimap-wrap canvas { display: block; width: 220px; height: 102px; }
.lm-minimap-wrap > div { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; border-top: 1px solid rgba(255, 255, 255, .1); }
.lm-minimap-wrap span { color: rgba(255, 255, 255, .6); font: 700 8px Nunito, sans-serif; }
.lm-minimap-wrap button { padding: 4px 7px; border: 0; border-radius: 3px; background: rgba(157, 227, 180, .13); cursor: pointer; color: #caeccd; font-size: 9px; }

.lm-target-card { position: absolute; z-index: 8; left: 50%; top: 104px; transform: translateX(-50%); display: flex; align-items: center; width: min(330px, calc(100% - 40px)); padding: 7px 10px; border: 1px solid rgba(255, 213, 142, .38); border-radius: 30px; background: rgba(35, 27, 31, .86); backdrop-filter: blur(10px); }
.lm-target-icon { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle, #d3c879, #615438); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .08); }
.lm-target-card > span { flex: 1; display: grid; margin: 0 12px; }
.lm-target-card small { color: #d4b88b; font: 700 7px Nunito, sans-serif; letter-spacing: .16em; }
.lm-target-card b { font-size: 12px; }
.lm-target-card i { display: block; height: 5px; margin-top: 3px; overflow: hidden; border-radius: 4px; background: #24191c; }
.lm-target-card em { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #bf4650, #ea8465); transition: width .2s; }
.lm-target-card button { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; color: rgba(255, 255, 255, .6); font-size: 18px; }

.lm-zone-banner { position: absolute; z-index: 9; left: 50%; top: 30%; display: grid; min-width: 360px; padding: 14px 50px 17px; transform: translate(-50%, -12px); border-top: 1px solid rgba(255, 239, 176, .55); border-bottom: 1px solid rgba(255, 239, 176, .55); background: linear-gradient(90deg, transparent, rgba(8, 33, 35, .78) 18%, rgba(8, 33, 35, .78) 82%, transparent); opacity: 0; pointer-events: none; text-align: center; transition: opacity .5s, transform .5s; }
.lm-zone-banner.is-visible { opacity: 1; transform: translate(-50%, 0); }
.lm-zone-banner small { color: #e5ca77; font: 800 8px Nunito, sans-serif; letter-spacing: .3em; }
.lm-zone-banner strong { font: 500 30px "Kiwi Maru", serif; letter-spacing: .12em; }
.lm-zone-banner span { color: rgba(255, 255, 255, .66); font-size: 10px; }
.lm-toast-stack { position: absolute; z-index: 20; left: 50%; bottom: 132px; display: grid; gap: 8px; width: min(390px, calc(100% - 40px)); transform: translateX(-50%); pointer-events: none; }
.lm-toast { padding: 11px 16px; border: 1px solid rgba(255, 239, 176, .35); border-radius: 5px; background: rgba(8, 31, 33, .9); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); text-align: center; animation: lmToast .35s both; font-size: 11px; }
.lm-toast.is-reward { color: #ffea9f; }
.lm-toast.is-error { border-color: rgba(255, 132, 126, .55); color: #ffb1aa; }

.lm-action-bar { position: absolute; z-index: 8; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); display: flex; gap: 6px; padding: 8px; transform: translateX(-50%); border: 1px solid var(--lm-line); border-radius: 12px; background: rgba(7, 27, 30, .88); box-shadow: 0 14px 34px rgba(0, 0, 0, .28); backdrop-filter: blur(13px); }
.lm-action-bar button { position: relative; display: grid; grid-template-columns: 43px auto; align-items: center; min-width: 122px; min-height: 54px; padding: 6px 11px 6px 7px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)); cursor: pointer; text-align: left; transition: transform .15s, border-color .15s, background .15s; }
.lm-action-bar button:hover { transform: translateY(-3px); border-color: rgba(255, 229, 143, .6); background: rgba(78, 128, 99, .34); }
.lm-action-bar button.is-cooling { opacity: .52; pointer-events: none; }
.lm-action-bar kbd { position: absolute; right: 4px; top: 3px; padding: 1px 4px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 2px; color: rgba(255, 255, 255, .45); font: 700 7px Nunito, sans-serif; }
.lm-action-bar i { position: relative; display: block; width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; background: rgba(157, 227, 180, .08); }
.lm-action-bar span { display: grid; gap: 1px; }
.lm-action-bar b { font-size: 10px; }
.lm-action-bar small { color: rgba(255, 255, 255, .5); font-size: 8px; }
.lm-action-sword::before { content: ""; position: absolute; left: 15px; top: 5px; width: 4px; height: 22px; border-radius: 3px 3px 1px 1px; background: #dae8df; transform: rotate(38deg); box-shadow: 0 0 5px rgba(255,255,255,.4); }
.lm-action-sword::after { content: ""; position: absolute; left: 8px; top: 21px; width: 18px; height: 4px; border-radius: 3px; background: #e0bc62; transform: rotate(38deg); }
.lm-action-leaf::before { content: ""; position: absolute; inset: 7px 8px 9px 9px; border-radius: 100% 0 100% 0; background: #7ed584; transform: rotate(-18deg); }
.lm-action-leaf::after { content: ""; position: absolute; left: 16px; top: 11px; width: 1px; height: 19px; background: #d7f2b2; transform: rotate(35deg); }
.lm-action-bell::before { content: ""; position: absolute; left: 9px; top: 7px; width: 16px; height: 17px; border-radius: 9px 9px 4px 4px; border: 2px solid #efcc72; border-bottom-width: 4px; }
.lm-action-bell::after { content: ""; position: absolute; left: 15px; top: 25px; width: 5px; height: 5px; border-radius: 50%; background: #efcc72; }
.lm-action-star::before { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: #cfc1ff; font-size: 25px; text-shadow: 0 0 8px #9475e6; }
.lm-action-bag::before { content: ""; position: absolute; left: 8px; top: 12px; width: 18px; height: 16px; border-radius: 3px 3px 7px 7px; background: #a4774e; box-shadow: inset 0 0 0 2px #deb876; }
.lm-action-bag::after { content: ""; position: absolute; left: 12px; top: 7px; width: 10px; height: 9px; border: 2px solid #deb876; border-bottom: 0; border-radius: 7px 7px 0 0; }
.lm-action-person::before { content: ""; position: absolute; left: 12px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #8ed5ca; }
.lm-action-person::after { content: ""; position: absolute; left: 8px; top: 18px; width: 18px; height: 12px; border-radius: 9px 9px 4px 4px; background: #4d9f8a; }

.lm-touch-stick, .lm-touch-action { display: none; }
.lm-drawer { position: absolute; z-index: 22; top: 0; right: 0; bottom: 0; width: min(390px, 92vw); padding: max(26px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) 26px; overflow-y: auto; border-left: 1px solid var(--lm-line); background: rgba(8, 29, 32, .96); box-shadow: -18px 0 45px rgba(0, 0, 0, .3); backdrop-filter: blur(18px); animation: lmDrawer .24s both; }
.lm-drawer header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.lm-drawer header small { color: #afddbc; font: 800 8px Nunito, sans-serif; letter-spacing: .18em; }
.lm-drawer h2 { margin: 3px 0 0; font: 500 24px "Kiwi Maru", serif; }
.lm-drawer header button, .lm-map-board header button { width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; background: rgba(255, 255, 255, .05); cursor: pointer; font-size: 20px; }
.lm-player-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.lm-player-row canvas { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.lm-player-row span { display: grid; }
.lm-player-row b { font-size: 12px; }
.lm-player-row small { color: rgba(255, 255, 255, .5); font-size: 9px; }
.lm-player-row em { color: #bce6bd; font: 800 9px Nunito, sans-serif; font-style: normal; }
.lm-empty-drawer { padding: 48px 15px; color: rgba(255, 255, 255, .58); text-align: center; font-size: 12px; line-height: 1.8; }
.lm-inventory-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.lm-inventory-summary span { display: grid; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: rgba(255,255,255,.04); }
.lm-inventory-summary small { color: rgba(255,255,255,.5); font-size: 9px; }
.lm-inventory-summary b { color: #f2d881; font-size: 16px; }
#lmInventoryGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lm-item { min-height: 76px; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: rgba(255,255,255,.035); }
.lm-item b { display: block; font-size: 11px; }
.lm-item small { display: block; margin-top: 4px; color: rgba(255,255,255,.5); font-size: 8px; line-height: 1.4; }
.lm-item em { float: right; color: #f0d47f; font: 800 12px Nunito, sans-serif; font-style: normal; }

.lm-map-modal { position: absolute; z-index: 25; inset: 0; display: grid; place-items: center; padding: 30px; background: rgba(3, 17, 20, .76); backdrop-filter: blur(8px); }
.lm-map-board { width: min(980px, 100%); max-height: 100%; padding: 22px; overflow: auto; border: 1px solid rgba(240, 221, 151, .38); border-radius: 10px; background: #102f32; box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.lm-map-board header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lm-map-board small { color: #bedcbb; font: 800 8px Nunito, sans-serif; letter-spacing: .18em; }
.lm-map-board h2 { margin: 2px 0 0; font: 500 26px "Kiwi Maru", serif; }
.lm-map-board canvas { display: block; width: 100%; height: auto; border: 1px solid rgba(255,255,255,.12); background: #365d58; }
.lm-map-board footer { display: flex; gap: 20px; padding-top: 11px; color: rgba(255,255,255,.65); font-size: 9px; }
.lm-map-board footer i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.lm-map-board footer .is-you { background: #fff3a8; box-shadow: 0 0 6px #fff3a8; }.lm-map-board footer .is-landmark { background: #e3b95e; }.lm-map-board footer .is-player { background: #8de6d0; }
.lm-recovery { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(76, 119, 105, .58), rgba(5, 20, 24, .92)); backdrop-filter: blur(6px); }
.lm-recovery > div { width: min(480px, calc(100% - 34px)); padding: 35px; border: 1px solid rgba(255,241,176,.42); background: rgba(11, 38, 39, .9); text-align: center; }
.lm-recovery small { color: #e5ca77; font: 800 8px Nunito, sans-serif; letter-spacing: .2em; }
.lm-recovery h2 { margin: 8px 0; font: 500 28px "Kiwi Maru", serif; }
.lm-recovery p { color: rgba(255,255,255,.67); font-size: 12px; line-height: 1.8; }
.lm-recovery button { min-width: 180px; padding: 12px 20px; border: 1px solid #e5d18c; border-radius: 4px; background: #387760; cursor: pointer; font-weight: 700; }

/* Character atelier */
.lm-maker { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; }
.lm-maker-backdrop { position: absolute; inset: 0; background: rgba(4, 19, 22, .83); backdrop-filter: blur(9px); }
.lm-maker-dialog { position: relative; width: min(1240px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: hidden; border: 1px solid rgba(243, 222, 148, .42); border-radius: 12px; background: linear-gradient(145deg, #143b3b, #0c282d); box-shadow: 0 30px 90px rgba(0,0,0,.48); }
.lm-maker-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 17px 22px; border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.025); }
.lm-maker-dialog > header small { color: #bedfbd; font: 800 8px Nunito, sans-serif; letter-spacing: .19em; }
.lm-maker-dialog > header h2 { margin: 3px 0 2px; font: 500 24px "Kiwi Maru", serif; }
.lm-maker-dialog > header p { margin: 0; color: rgba(255,255,255,.53); font-size: 9px; }
.lm-maker-dialog > header button { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; background: rgba(255,255,255,.05); cursor: pointer; font-size: 20px; }
.lm-maker-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); height: min(690px, calc(100vh - 145px)); height: min(690px, calc(100dvh - 145px)); }
.lm-maker-preview { display: flex; flex-direction: column; padding: 18px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.1); background: radial-gradient(circle at 50% 38%, rgba(115, 179, 138, .26), transparent 46%); }
.lm-preview-stage { position: relative; flex: none; width: min(100%, 360px); min-height: 0; aspect-ratio: 360 / 460; margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 180px 180px 12px 12px; background: linear-gradient(rgba(255,255,255,.035), rgba(4,23,26,.35)); }
.lm-preview-stage::before { content: ""; position: absolute; left: 50%; bottom: 27px; width: 240px; height: 50px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(107, 184, 132, .38), transparent 69%); }
.lm-preview-stage span { position: absolute; inset: 40px 55px 80px; border: 1px solid rgba(230,219,159,.16); border-radius: 50%; box-shadow: 0 0 0 18px rgba(230,219,159,.025), 0 0 0 44px rgba(230,219,159,.018); }
.lm-preview-stage canvas { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 360 / 460; }
.lm-preview-model-status { position: absolute; z-index: 3; left: 50%; bottom: 28px; width: max-content; max-width: calc(100% - 36px); padding: 7px 10px; transform: translateX(-50%); border: 1px solid rgba(230,207,126,.35); border-radius: 99px; background: rgba(5,25,28,.82); color: #f2dda0; font-size: 8px; line-height: 1.45; text-align: center; }
.lm-preview-model-status.is-error { border-color: rgba(239,150,131,.48); color: #ffc1b4; }
.lm-maker-preview > label { display: grid; gap: 5px; margin-top: 10px; }
.lm-maker-preview > label span { color: #b7dbb9; font: 800 8px Nunito, sans-serif; letter-spacing: .16em; }
.lm-maker-preview input { width: 100%; padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 5px; outline: 0; background: rgba(4,20,23,.55); color: #fff; }
.lm-maker-preview input:focus { border-color: #e6cf7d; box-shadow: 0 0 0 3px rgba(230,207,125,.1); }
.lm-preview-selector { display: grid; gap: 4px; margin-top: 8px; }
.lm-preview-label { color: #b7dbb9; font: 800 7px Nunito, sans-serif; letter-spacing: .14em; }
.lm-direction-switch, .lm-motion-switch { display: grid; gap: 4px; }
.lm-direction-switch { grid-template-columns: repeat(8, 1fr); }
.lm-motion-switch { grid-template-columns: repeat(5, 1fr); }
.lm-direction-switch button, .lm-motion-switch button { min-width: 0; padding: 6px 2px; border: 1px solid rgba(255,255,255,.1); border-radius: 3px; background: rgba(255,255,255,.04); cursor: pointer; font-size: 8px; }
.lm-direction-switch button.is-active, .lm-motion-switch button.is-active { border-color: #e5cd76; background: rgba(229,205,118,.16); color: #ffe9a4; }
.lm-maker-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 7px; }
.lm-maker-actions button { min-height: 48px; padding: 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 5px; background: rgba(255,255,255,.05); cursor: pointer; font-size: 10px; }
#lmCharacterSave { display: grid; background: linear-gradient(135deg, #3b8969, #28614f); border-color: rgba(234,220,151,.55); }
#lmCharacterSave span { font-weight: 800; }
#lmCharacterSave small { color: rgba(255,255,255,.6); font-size: 8px; }
.lm-maker-controls { min-width: 0; overflow: hidden; }
.lm-maker-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 16px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.lm-maker-tabs button { padding: 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; color: rgba(255,255,255,.56); font-size: 11px; }
.lm-maker-tabs button b { margin-left: 6px; color: #e2ca78; font: 800 10px Nunito, sans-serif; }
.lm-maker-tabs button.is-active { border-bottom-color: #e2ca78; color: #fff; }
.lm-template-pane, .lm-parts-pane { height: calc(100% - 55px); padding: 15px; overflow-y: auto; }
.lm-template-tools { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.lm-template-query { display: grid; flex: 1; grid-template-columns: minmax(180px, 1fr) minmax(145px, .42fr); gap: 9px; }
.lm-template-tools label { display: grid; gap: 4px; color: rgba(255,255,255,.62); font-size: 8px; }
.lm-template-tools input, .lm-template-tools select { width: 100%; padding: 9px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 5px; outline: 0; background: rgba(0,0,0,.22); color: #fff; }
.lm-template-tools input:focus, .lm-template-tools select:focus { border-color: rgba(230,207,126,.72); box-shadow: 0 0 0 3px rgba(230,207,126,.08); }
.lm-template-tools option { background: #123236; color: #fff; }
.lm-template-tools > span { flex: none; color: #e6cf7e; font: 800 10px Nunito, sans-serif; white-space: nowrap; }
.lm-template-grid { display: grid; grid-template-columns: repeat(4, minmax(142px, 1fr)); gap: 11px; }
.lm-template-card { --template-accent: #8bc5a0; position: relative; min-width: 0; padding: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 9px; background: linear-gradient(160deg, rgba(255,255,255,.065), rgba(0,0,0,.08)); cursor: pointer; color: #fff; text-align: left; transition: border-color .15s, transform .15s, background .15s; }
.lm-template-card--cool { --template-accent: #78b9e2; }
.lm-template-card--cute { --template-accent: #ed9cbd; }
.lm-template-card--fashion { --template-accent: #c6a4ef; }
.lm-template-card--menhera { --template-accent: #e276a0; }
.lm-template-card--tsundere { --template-accent: #ef9a72; }
.lm-template-card:hover { transform: translateY(-2px); border-color: rgba(229,205,118,.56); background: rgba(255,255,255,.07); }
.lm-template-card.is-active { border-color: #e6cf7e; box-shadow: inset 0 0 0 1px #e6cf7e; background: rgba(229,205,118,.1); }
.lm-template-portrait { position: relative; display: block; width: 100%; aspect-ratio: 168 / 186; overflow: hidden; border: 1px solid color-mix(in srgb, var(--template-accent) 34%, transparent); border-radius: 7px; background: radial-gradient(circle at 50% 74%, color-mix(in srgb, var(--template-accent) 25%, transparent), rgba(4,22,26,.18) 62%), linear-gradient(155deg, rgba(255,255,255,.035), rgba(0,0,0,.2)); }
.lm-template-portrait::after { content: ""; position: absolute; left: 13%; right: 13%; bottom: 6%; height: 11%; border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--template-accent) 28%, transparent), transparent 72%); pointer-events: none; }
.lm-template-card canvas { position: relative; z-index: 1; display: block; width: 100%; height: auto; transition: opacity .18s; }
.lm-template-portrait.is-loading canvas, .lm-template-portrait.is-error canvas, .lm-template-portrait.is-unavailable canvas { opacity: 0; }
.lm-template-image-status { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; padding: 12px; color: color-mix(in srgb, var(--template-accent) 82%, white); font: 800 8px Nunito, sans-serif; letter-spacing: .08em; text-align: center; }
.lm-template-portrait.is-loading .lm-template-image-status { animation: lmTemplateLoading 1.2s ease-in-out infinite alternate; }
.lm-template-portrait.is-ready .lm-template-image-status { display: none; }
.lm-template-copy { display: grid; gap: 3px; padding: 7px 3px 2px; }
.lm-template-category { justify-self: start; padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--template-accent) 55%, transparent); border-radius: 99px; background: color-mix(in srgb, var(--template-accent) 13%, transparent); color: color-mix(in srgb, var(--template-accent) 80%, white); font-size: 7px; line-height: 1.35; }
.lm-template-card b { display: -webkit-box; min-height: 31px; overflow: hidden; font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lm-template-feature { min-height: 28px; color: rgba(255,255,255,.64); font-size: 8px; line-height: 1.55; }
.lm-template-card small { color: rgba(255,255,255,.42); font: 800 7px Nunito, sans-serif; letter-spacing: .08em; }
.lm-template-pager { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; }
.lm-template-pager button { padding: 8px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 4px; background: rgba(255,255,255,.04); cursor: pointer; font-size: 9px; }
.lm-template-pager button:disabled { opacity: .3; cursor: default; }
.lm-part-group { margin-bottom: 13px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.09); }
.lm-part-group header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.lm-part-group h3 { margin: 0; font-size: 11px; }
.lm-part-group header span { color: #e4cc7b; font-size: 9px; }
.lm-part-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.lm-part-options button { min-height: 34px; padding: 5px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; background: rgba(255,255,255,.035); cursor: pointer; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.lm-part-options button.is-active { border-color: #e5cc77; background: rgba(229,204,119,.14); color: #fff2b1; }
.lm-part-options button[data-color]::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: var(--part-color); }

.lm-loading { position: fixed; z-index: 1100; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; background: radial-gradient(circle at 50% 42%, #27574f, #081f23 70%); color: #f7f1da; transition: opacity .45s, visibility .45s; }
.lm-loading.is-ready { opacity: 0; visibility: hidden; pointer-events: none; }
.lm-loading-ring { width: 64px; height: 64px; margin-bottom: 10px; border: 1px solid rgba(235,218,149,.25); border-top-color: #f0db8d; border-radius: 50%; box-shadow: inset 0 0 0 8px rgba(157,227,180,.03), 0 0 30px rgba(157,227,180,.12); animation: lmSpin 1.5s linear infinite; }
.lm-loading b { font: 500 18px "Kiwi Maru", serif; letter-spacing: .08em; }
.lm-loading small { color: rgba(255,255,255,.53); font-size: 9px; }
.lm-loading button { margin-top: 10px; padding: 10px 18px; border: 1px solid rgba(242,222,145,.6); border-radius: 4px; background: rgba(54,121,91,.75); color: #fff9dd; cursor: pointer; font-weight: 700; }
.lm-loading button:hover { background: rgba(69,145,109,.9); }
.lm-loading.is-error .lm-loading-ring { border-color: rgba(239,150,131,.28); border-top-color: #ef967f; animation: none; }
.lm-loading.is-error small { max-width: min(480px, calc(100vw - 40px)); color: rgba(255,255,255,.72); text-align: center; line-height: 1.7; }

@keyframes lmTitleDrift { to { transform: scale(1.04) translate3d(-.7%, -.4%, 0); } }
@keyframes lmSpin { to { transform: rotate(360deg); } }
@keyframes lmToast { from { opacity: 0; transform: translateY(10px); } }
@keyframes lmDrawer { from { transform: translateX(100%); } }
@keyframes lmReconnectPulse { to { opacity: .45; transform: scale(.86); } }
@keyframes lmTemplateLoading { from { opacity: .52; } to { opacity: 1; } }

@media (max-width: 1100px) {
    .lm-action-bar button { min-width: 76px; grid-template-columns: 38px; justify-items: center; padding-right: 7px; }
    .lm-action-bar button span { display: none; }
    .lm-template-grid { grid-template-columns: repeat(3, minmax(132px, 1fr)); }
    .lm-maker-layout { grid-template-columns: 330px minmax(0,1fr); }
}

@media (max-width: 820px) {
    .lm-title { min-height: 790px; }
    .lm-title-content { width: calc(100% - 30px); padding-top: 54px; }
    .lm-title-vignette { background: linear-gradient(90deg, rgba(7,25,27,.92), rgba(7,25,27,.55)), linear-gradient(0deg, rgba(6,20,23,.9), transparent 50%); }
    .lm-title-actions { flex-direction: column; align-items: flex-start; }
    .lm-maker-open { width: min(390px, 100%); }
    .lm-title-footer { gap: 10px; overflow: hidden; white-space: nowrap; justify-content: flex-start; }
    .lm-world { min-height: 420px; height: calc(100vh - 62px); height: calc(100dvh - 62px); }
    .lm-hud-top { left: 10px; top: 9px; right: 10px; grid-template-columns: 1fr auto; gap: 6px; }
    .lm-player-card { height: 70px; }
    .lm-player-card canvas { width: 70px; height: 70px; flex-basis: 70px; }
    .lm-player-main { padding: 6px 9px 5px 4px; }
    .lm-player-main strong { max-width: 105px; font-size: 14px; }
    .lm-zone-card { display: none; }
    .lm-online-card { min-height: 50px; padding: 6px 9px; }
    .lm-online-card button { display: none; }
    .lm-quest-panel { left: 10px; top: 90px; width: 220px; padding: 10px; }
    #lmQuestList { max-height: 210px; }
    .lm-minimap-wrap { right: 10px; top: 90px; width: 150px; }
    .lm-minimap-wrap canvas { width: 150px; height: 70px; }
    .lm-target-card { top: 168px; }
    .lm-action-bar { bottom: max(12px, env(safe-area-inset-bottom)); gap: 4px; padding: 5px; }
    .lm-action-bar button { min-width: 48px; min-height: 48px; padding: 4px; grid-template-columns: 36px; }
    .lm-action-bar button:nth-child(4) { display: none; }
    .lm-action-bar i { width: 34px; height: 34px; }
    .lm-action-bar kbd { display: none; }
    .lm-touch-stick { position: absolute; z-index: 9; left: max(22px, env(safe-area-inset-left)); bottom: max(92px, calc(env(safe-area-inset-bottom) + 72px)); display: grid; place-items: center; width: 102px; height: 102px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(5,27,30,.36); backdrop-filter: blur(5px); touch-action: none; }
    .lm-touch-stick::before, .lm-touch-stick::after { content: ""; position: absolute; background: rgba(255,255,255,.08); }.lm-touch-stick::before { width: 1px; height: 80%; }.lm-touch-stick::after { width: 80%; height: 1px; }
    .lm-touch-stick i { position: relative; z-index: 1; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(83,157,127,.58); box-shadow: 0 5px 16px rgba(0,0,0,.25); }
    .lm-touch-action { position: absolute; z-index: 9; right: max(28px, env(safe-area-inset-right)); bottom: max(98px, calc(env(safe-area-inset-bottom) + 78px)); display: block; width: 74px; height: 74px; border: 1px solid rgba(255,232,157,.45); border-radius: 50%; background: rgba(54,121,91,.66); backdrop-filter: blur(5px); font: 800 9px Nunito, sans-serif; letter-spacing: .08em; touch-action: manipulation; }
    .lm-maker { padding: 0; }
    .lm-maker-dialog { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
    .lm-maker-dialog > header p { display: none; }
    .lm-maker-layout { display: block; height: calc(100vh - 78px); height: calc(100dvh - 78px); overflow-y: auto; }
    .lm-maker-preview { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: minmax(130px, .78fr) minmax(0, 1.22fr); grid-auto-rows: min-content; column-gap: 12px; min-height: 0; height: min(40vh, 360px); padding: 12px; overflow-y: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); background-color: rgba(10, 39, 42, .97); box-shadow: 0 9px 24px rgba(0,0,0,.25); }
    .lm-preview-stage { grid-column: 1; grid-row: 1 / span 5; align-self: start; justify-self: center; width: min(100%, calc((min(40vh, 360px) - 24px) * .78261)); max-height: 100%; }
    .lm-maker-preview > label, .lm-maker-preview > .lm-preview-selector, .lm-maker-preview > .lm-maker-actions { grid-column: 2; margin-top: 0; }
    .lm-direction-switch { grid-template-columns: repeat(4, 1fr); }
    .lm-motion-switch { grid-template-columns: repeat(3, 1fr); }
    .lm-direction-switch button, .lm-motion-switch button { padding-block: 5px; }
    .lm-maker-controls { height: 720px; overflow: visible; }
    .lm-template-grid { grid-template-columns: repeat(3, minmax(90px,1fr)); }
    .lm-part-options { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 520px) {
    .lm-title h1 { font-size: 52px; }
    .lm-title-lead br { display: none; }
    .lm-title-features span { flex: 1 1 42%; min-width: 0; }
    .lm-save-policy { align-items: flex-start; }
    .lm-save-policy a { display: none; }
    .lm-online-card > span:nth-child(2) small { display: none; }
    .lm-minimap-wrap { display: none; }
    .lm-quest-panel { top: 88px; width: 205px; }
    #lmQuestList { max-height: 160px; }
    .lm-target-card { top: 154px; }
    .lm-template-grid { grid-template-columns: repeat(2, minmax(100px,1fr)); }
    .lm-template-card canvas { height: auto; }
    .lm-maker-preview { grid-template-columns: minmax(108px, .68fr) minmax(0, 1.32fr); column-gap: 9px; height: min(40vh, 340px); padding: 10px; }
    .lm-maker-actions { grid-template-columns: 1fr 1fr; }
    .lm-maker-actions button { min-height: 42px; padding: 6px 3px; font-size: 9px; }
}

@media (max-height: 640px) and (min-width: 821px) {
    .lm-world { min-height: 360px; }
    .lm-hud-top { top: max(8px, env(safe-area-inset-top)); }
    .lm-player-card { height: 72px; }
    .lm-player-card canvas { width: 72px; height: 72px; flex-basis: 72px; }
    .lm-player-main { padding-block: 6px; }
    .lm-quest-panel { top: 98px; padding: 10px; }
    #lmQuestList { max-height: 180px; }
    .lm-minimap-wrap { top: 82px; }
    .lm-action-bar { bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(-50%) scale(.88); transform-origin: bottom center; }
    .lm-target-card { top: 82px; }
    .lm-maker { padding: 8px; }
    .lm-maker-dialog { max-height: calc(100dvh - 16px); }
    .lm-maker-layout { height: calc(100dvh - 100px); }
}

@media (prefers-reduced-motion: reduce) {
    .lm-title-art, .lm-loading-ring, .lm-shell.is-reconnecting .lm-online-light { animation: none; }
    .lm-toast, .lm-drawer { animation-duration: .01ms; }
}
