:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1210;
  color: #e8edf4;
  --panel: rgba(12, 17, 22, 0.93);
  --panel-border: rgba(255, 255, 255, 0.13);
  --muted: #aeb8c5;
  --accent: #5586cc;
  --danger: #b9474f;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #0d1210; }
button, input, select { font: inherit; }
button { user-select: none; }

#world { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.panel, .hud, .log-pane, .quickbar, .map-toolbar, .map-readout, .session-menu-popover {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 13px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.hidden { display: none !important; }
.subtle, .muted { color: var(--muted); }
.compact { margin: 0; font-size: 0.75rem; }
hr { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 16px 0; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 1.42rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: .9rem; margin-bottom: 6px; }

.login-panel {
  width: min(430px, calc(100vw - 32px));
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 23px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-title-row .muted { margin: 5px 0 16px; }
.version-badge { padding: 4px 7px; border-radius: 7px; background: rgba(85,134,204,.18); color: #a9c8f4; font-size: .7rem; }
label { display: grid; gap: 6px; margin: 11px 0; color: #c7d0dc; font-size: 0.86rem; }
input, select {
  width: 100%; border-radius: 8px; border: 1px solid #374151; background: #101720;
  color: #f5f7fa; padding: 9px 11px; outline: none;
}
input:focus, select:focus { border-color: #7aa2d8; }
input[type="checkbox"] { width: auto; margin: 0; padding: 0; accent-color: #648fd0; }
input[type="range"] { padding: 0; }
.columns, .bounds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.compact-buttons { margin-top: 8px; }
.login-actions { grid-template-columns:minmax(160px,186px); justify-content:center; }
.login-actions button { width:100%; }
button {
  border: 0; border-radius: 8px; padding: 10px 13px; background: #4b76b8; color: white; cursor: pointer;
}
button:hover { filter: brightness(1.1); }
button:active { transform: translateY(1px); }
button.secondary { background: #354052; }
button:disabled { opacity: .55; cursor: progress; }
.link-button { background: transparent; color: #a9c7ef; padding: 9px 0 0; text-align: left; }
.probe-result { min-height: 0; max-height: 130px; overflow: auto; color: #b7c3d4; white-space: pre-wrap; font-size: 0.76rem; }
.warning { margin: 11px 0; padding: 9px 11px; border: 1px solid rgba(239,187,94,.45); border-radius: 8px; background: rgba(110,72,12,.3); color: #f2d393; font-size: .8rem; }

.hud { left: 12px; top: 12px; width: 292px; padding: 12px; z-index: 22; }
.hud-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.hud-heading strong { display: block; }
#player-meta { font-size: .72rem; }
#coordinates, #status { color: #aeb8c5; font-size: .78rem; }
.stat-row { display: grid; grid-template-columns: 22px 1fr 78px; align-items: center; gap: 7px; margin: 4px 0; font-size: .67rem; }
.stat-row > span { color: #aeb8c5; font-weight: 700; }
.stat-row b { text-align: right; font-weight: 500; color: #cdd6e2; }
.stat-bar { height: 7px; overflow: hidden; background: #252b31; border-radius: 999px; }
.stat-bar i { display: block; height: 100%; width: 0; transition: width 160ms linear; }
.cp-row i { background: linear-gradient(90deg, #b89631, #e8cc65); }
.hp-row i { background: linear-gradient(90deg, #a7363f, #e85f68); }
.mp-row i { background: linear-gradient(90deg, #3567a7, #6aa4ec); }
.hud-status-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 8px; }
#world-summary { font-size: .69rem; margin-top: 2px; }
.hud-button { padding: 5px 8px; font-size: .72rem; background: #354052; }
.hud-actions { display: flex; align-items: center; gap: 5px; }
.hud-button.danger { background: #74363b; }

.combat-dock {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 24;
  width: min(460px, calc(100vw - 760px));
  min-width: 330px;
  display: grid;
  justify-items: center;
  gap: 5px;
  pointer-events: none;
}
.combat-dock > * { pointer-events: auto; }
.combat-dock .target-panel {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
}
.target-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.target-heading > div { min-width: 0; }
.target-heading strong { display: block; max-width: 390px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
#target-meta { font-size: .66rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button { background: transparent; padding: 1px 6px; font-size: 1.15rem; color: #bdc7d4; }
.target-hp { height: 8px; overflow: hidden; background: #35191d; border-radius: 99px; margin: 6px 0 4px; }
.target-hp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#a7363f,#e85f68); }
.target-footer { display: block; }
.target-hp-value { text-align: left; font-size: .66rem; color: #b9c2cf; white-space: nowrap; }

.buff-strip {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  padding: 4px 5px;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  background: rgba(12, 17, 22, .9);
  box-shadow: 0 12px 30px rgba(0,0,0,.36);
  backdrop-filter: blur(10px);
}
.buff-icons { display: flex; gap: 4px; max-width: min(390px, calc(100vw - 90px)); overflow-x: auto; scrollbar-width: thin; padding: 1px; }
.buff-icon {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(173,198,230,.38);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(75,118,184,.82), rgba(30,42,59,.96));
  color: #f4f7fb;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.buff-icon.debuff { border-color: rgba(223,100,111,.68); background: linear-gradient(145deg, rgba(148,49,59,.9), rgba(48,23,28,.98)); }
.buff-icon.dance { border-color: rgba(207,176,92,.68); background: linear-gradient(145deg, rgba(131,92,30,.92), rgba(45,35,21,.98)); }
.buff-icon .buff-glyph { display: grid; place-items: center; height: 100%; font-weight: 800; font-size: .72rem; letter-spacing: -.03em; }
.buff-icon .buff-level { position: absolute; left: 2px; bottom: 1px; padding: 0 2px; border-radius: 3px; background: rgba(0,0,0,.58); font-size: .48rem; line-height: 1.25; }
.buff-icon .buff-clock { position: absolute; right: 2px; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: #dce8f7; box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
.buff-details-button { flex: 0 0 auto; min-width: 42px; height: 36px; margin-left: 4px; padding: 0 7px; background: #303b49; font-size: .67rem; }
#buff-count { display: inline-block; min-width: 14px; margin-left: 1px; font-size: .58rem; }

.map-toolbar { top: 12px; right: 12px; display: flex; gap: 5px; padding: 5px; }
.tool-button { width: 35px; height: 35px; padding: 0; background: #27313e; font-weight: 700; font-size: 1rem; }
.tool-button.active { background: #4b76b8; }
.side-panel { right: 12px; top: 61px; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 125px); overflow: auto; padding: 14px; }
.side-panel .panel-title-row { align-items: center; margin-bottom: 10px; }
.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.toggle-grid label { display: flex; align-items: center; gap: 7px; margin: 4px 0; font-size: .78rem; }
.layer-list { display: grid; gap: 6px; margin-bottom: 10px; }
.layer-row { display: grid; grid-template-columns: auto 1fr 74px; align-items: center; gap: 7px; font-size: .77rem; }
.layer-row input[type="range"] { min-width: 0; }
.file-label input { font-size: .72rem; padding: 7px; }
.bounds-grid label { margin: 4px 0; font-size: .72rem; }
.bounds-grid input { padding: 7px 8px; }

.nearby-list { display: grid; gap: 5px; margin-top: 9px; }
.nearby-entry { display: grid; grid-template-columns: 13px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; background: rgba(255,255,255,.045); text-align: left; }
.nearby-entry:hover, .nearby-entry.selected { background: rgba(85,134,204,.24); }
.kind-dot { width: 9px; height: 9px; border-radius: 50%; }
.kind-dot.player { background: #83d4af; }
.kind-dot.npc { background: #e2c56d; }
.kind-dot.mob { background: #e06569; }
.kind-dot.item { background: #c793e8; }
.nearby-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nearby-distance { color: #98a4b3; font-size: .69rem; }
.shortcut-list { display: grid; grid-template-columns: 118px 1fr; gap: 7px 10px; font-size: .78rem; }
.shortcut-list dt { color: #dbe5f2; }
.shortcut-list dd { margin: 0; color: #aeb8c5; }

.map-readout { right: 12px; bottom: 12px; padding: 7px 10px; display: flex; align-items: center; gap: 14px; font-size: .68rem; color: #b8c3d0; }
#scale-bar { display: flex; align-items: center; gap: 7px; }
#scale-bar i { display: block; width: 80px; border-top: 2px solid #dbe4ee; border-left: 1px solid #dbe4ee; border-right: 1px solid #dbe4ee; height: 5px; }

.quickbar { left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 5px; padding: 5px; }
.quickbar button { padding: 7px 10px; font-size: .72rem; background: #2f3946; }
.skill-buttons { display: flex; gap: 5px; }
.skill-button { min-width: 38px; max-width: 94px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #4b5267 !important; }

/* Chat a systém mají pevné, navzájem oddělené pozice. */
.communication-dock {
  position: absolute;
  inset: 0;
  z-index: 21;
  pointer-events: none;
}
.communication-dock > * { pointer-events: auto; }
.log-pane {
  position: absolute !important;
  left: 12px;
  width: min(430px, calc(100vw - 24px));
  padding: 8px;
  overflow: hidden;
}
.chat-pane { bottom: 12px; max-height: 220px; }
.system-pane { bottom: 244px; max-height: 132px; }
.chat-heading { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; padding: 0 3px 4px; }
.unread-badge { min-width: 17px; margin-left: 3px; padding: 1px 4px; border-radius: 999px; background: #8a4a50; font-size: .64rem; }
.log-view { min-height: 48px; overflow: auto; font-size: .75rem; color: #d3dbe6; padding: 4px 4px 7px; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-pane .log-view { height: 108px; }
.system-pane .log-view { height: 76px; color: #d9c68d; }
.log-view div { margin: 3px 0; }
#chat-form { display: grid; grid-template-columns: 92px 1fr; gap: 5px; }
#chat-form.tell-mode { grid-template-columns: 92px 110px 1fr; }
#chat-form input, #chat-form select { padding: 7px 8px; font-size: .75rem; }
.log-pane.collapsed .log-view, .log-pane.collapsed #chat-form { display: none !important; }

.entity-tooltip { position: absolute; pointer-events: none; z-index: 20; padding: 7px 9px; border: 1px solid var(--panel-border); border-radius: 8px; background: rgba(8,12,16,.95); font-size: .72rem; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 260px; }
/* Herní menu vpravo dole; odpojení není součástí HUDu. */
.session-menu { position: absolute; right: 12px; bottom: 12px; z-index: 35; }
.session-menu-toggle { width: 40px; height: 40px; padding: 0; border-radius: 10px; background: #27313e; font-size: 1.1rem; box-shadow: 0 12px 28px rgba(0,0,0,.38); }
.session-menu-popover { position: absolute; right: 0; bottom: 48px; min-width: 150px; padding: 7px; }
.session-menu-popover button { width: 100%; text-align: left; background: #74363b; }
.map-readout { right: 64px; }

@media (max-width: 760px) {
  .hud { left: 8px; top: 8px; width: calc(100vw - 62px); }
  .combat-dock { top: 156px; width: calc(100vw - 16px); min-width: 0; }
  .combat-dock .target-panel { width: min(420px, 100%); }
  .buff-icons { max-width: calc(100vw - 76px); }
  .map-toolbar { top: 8px; right: 8px; flex-direction: column; }
  .side-panel { right: 8px; top: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); z-index: 25; }
  .communication-dock { inset: 0; }
  .log-pane { left: 8px; width: calc(100vw - 68px); }
  .chat-pane { bottom: 8px; }
  .system-pane { bottom: 232px; }
  .npc-dialog { left: 8px; top: 156px; width: calc(100vw - 16px); max-height: calc(100vh - 405px); }
  .session-menu { right: 8px; bottom: 8px; }
  .quickbar { bottom: 165px; max-width: calc(100vw - 16px); overflow-x: auto; }
  .map-readout { display: none !important; }
}

.inline-check { display: flex; align-items: center; gap: 7px; }
.chat-line.system { color: #d9c68d; }
.chat-line.error { color: #f0a0a0; }
.chat-line.chat { color: #d4dde8; }
.chat-line.action { color: #9fd3ad; }
.chat-line.combat { color: #e8b98f; }

.npc-dialog { left: clamp(310px, 28vw, 470px); top: 122px; transform: none; width: min(440px, calc(100vw - 330px)); max-height: calc(100vh - 270px); overflow: auto; padding: 15px; z-index: 23; }
.npc-dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 10px; margin-bottom: 12px; }
#npc-dialog-meta { font-size: .72rem; margin-top: 3px; }
.npc-dialog-content { color: #d8e0e8; font-size: .84rem; line-height: 1.48; overflow-wrap: anywhere; }
.npc-dialog-content .l2-center { text-align: center; }
.npc-dialog-content .l2-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.npc-dialog-content .l2-cell { flex: 1 1 auto; }
.npc-dialog-content .l2-level { color: #e2cf79; }
.npc-dialog-content .l2-action { display: inline-block; margin: 5px 4px; padding: 8px 12px; background: #455f82; }
.npc-dialog-content .l2-unsupported { color: #929eaa; font-style: italic; }


.buff-list { display: grid; gap: 7px; margin-top: 10px; }
.buff-entry { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.045); }
.buff-entry.debuff { border-left: 3px solid #b65d65; }
.buff-entry .buff-name { color: #e2e9f2; font-size: .78rem; }
.buff-entry .buff-meta { color: #9da9b7; font-size: .69rem; }
.buff-entry .buff-time { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #c4ceda; font-size: .7rem; }
.npc-action-status { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: rgba(85,134,204,.16); color: #bdd2ef; font-size: .75rem; }
.npc-action-status.ok { background: rgba(68,129,83,.22); color: #b9e0c2; }
.npc-action-status.warn { background: rgba(148,105,39,.24); color: #eed29f; }
.toast-stack { position: fixed; right: 12px; bottom: 62px; z-index: 60; display: grid; gap: 7px; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 10px 12px; border: 1px solid var(--panel-border); border-radius: 9px; background: rgba(10,15,20,.96); box-shadow: 0 12px 32px rgba(0,0,0,.45); font-size: .78rem; animation: toast-in 160ms ease-out; }
.toast.ok { border-color: rgba(102,181,121,.45); }
.toast.warn { border-color: rgba(218,168,79,.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Finální responsivní přepis musí být až za základním pravidlem NPC dialogu. */
@media (max-width: 760px) {
  .log-pane { left: 8px; width: calc(100vw - 68px); }
  .chat-pane { bottom: 8px; }
  .system-pane { bottom: 232px; }
  .npc-dialog { left: 8px; top: 156px; width: calc(100vw - 16px); max-height: calc(100vh - 405px); }
}

/* ===== Lineage II-like layout foundation ===== */
:root {
  --l2-panel: rgba(14, 18, 24, 0.88);
  --l2-gold: #d7c58c;
  --l2-gold-dark: #8b7440;
  --l2-blue: #6ea2ff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.panel, .hud, .log-pane, .quickbar, .map-toolbar, .map-readout, .session-menu-popover {
  background: linear-gradient(180deg, rgba(28,33,41,.90), rgba(10,13,18,.92));
  border: 1px solid rgba(188, 160, 94, 0.35);
  border-radius: 8px;
}

.hud {
  width: 240px;
  padding: 8px 10px 10px;
  background: linear-gradient(180deg, rgba(35,41,49,.92), rgba(10,13,17,.95));
}
.hud-heading { margin-bottom: 6px; }
.hud-heading strong { font-size: 1.05rem; }
#coordinates { color: #d8c47d; font-size: .74rem; }
#player-meta { font-size: .68rem; }
.stat-row { grid-template-columns: 24px 1fr 64px; font-size: .7rem; margin: 3px 0; }
.stat-row > span { color: #f4deb4; }
.stat-bar { height: 10px; border: 1px solid rgba(255,255,255,.08); background: #181b20; }
.cp-row i { background: linear-gradient(90deg,#8d6c1b,#d2b55a); }
.hp-row i { background: linear-gradient(90deg,#932f35,#e3535e); }
.mp-row i { background: linear-gradient(90deg,#23508d,#5e9ef3); }
#status, #world-summary { color: #a8b2c0; }

.combat-dock {
  top: 8px;
  width: min(380px, calc(100vw - 520px));
  min-width: 280px;
  gap: 2px;
}
.combat-dock .target-panel {
  padding: 8px 10px 6px;
  background: linear-gradient(180deg, rgba(24,29,37,.92), rgba(8,11,15,.95));
}
.target-heading strong { color: #f7f8fb; font-size: 1rem; }
#target-meta { color: #b2becb; font-size: .67rem; }
.target-hp { height: 12px; border: 1px solid rgba(255,255,255,.08); margin: 6px 0 3px; }
.target-hp-value { color: #d7c58c; font-size: .68rem; }
#target-close { padding: 0 4px; font-size: 1rem; }

.buff-strip {
  min-height: 42px; padding: 2px 4px; background: rgba(12, 16, 22, 0.92);
}
.buff-icons { gap: 3px; }
.buff-icon {
  width: 32px; height: 32px; flex-basis: 32px; border-radius: 4px;
  border-color: rgba(190,164,106,.45);
  background: linear-gradient(180deg, rgba(94,96,108,.92), rgba(38,41,49,.98));
}
.buff-icon .buff-glyph { font-size: .66rem; }
.buff-icon.dance { background: linear-gradient(180deg, rgba(120,97,41,.95), rgba(48,37,20,.98)); }
.buff-icon.debuff { background: linear-gradient(180deg, rgba(124,50,55,.95), rgba(44,20,24,.98)); }
.buff-details-button { height: 32px; }

.quickbar {
  bottom: 8px; padding: 0; background: transparent; border: 0; box-shadow: none;
}
.hotkey-frame {
  display: flex; align-items: end; gap: 4px; padding: 0;
}
.quickbar-utility, .skill-button {
  height: 42px; min-width: 42px; border-radius: 4px; padding: 2px 6px;
  border: 1px solid rgba(169,139,79,.45); background: linear-gradient(180deg, rgba(47,53,65,.95), rgba(18,22,29,.98)) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.skill-buttons { display: flex; gap: 4px; }
.skill-button {
  width: 48px; max-width: 48px; min-width: 48px; color: #f1f3f6; font-size: .62rem; line-height: 1.1; white-space: normal;
  text-overflow: clip; overflow: hidden;
}
.quickbar-utility { color: #d3d9e2; font-size: .62rem; }

.communication-dock { z-index: 24; }
.log-pane {
  left: 8px; width: 360px; padding: 6px; background: linear-gradient(180deg, rgba(26,30,38,.95), rgba(10,12,17,.96));
}
.system-pane { bottom: 258px; height: 110px; max-height: none; }
.chat-pane { bottom: 8px; height: 246px; max-height: none; }
.chat-heading { padding: 0 2px 5px; }
.chat-tabs { display: flex; gap: 2px; flex-wrap: nowrap; }
.chat-tab {
  padding: 3px 7px; border-radius: 4px; font-size: .68rem; line-height: 1.2;
  background: linear-gradient(180deg, rgba(56,61,70,.95), rgba(18,21,27,.98));
  border: 1px solid rgba(176,150,95,.28); color: #d9dce2;
}
.chat-tab.active { color: #fff2c6; border-color: rgba(206,175,93,.55); }
.chat-pane .log-view { height: 170px; }
.system-pane .log-view { height: 74px; }
#chat-form { grid-template-columns: 1fr; }
#chat-form input { padding: 6px 8px; }
#chat-form.tell-mode { grid-template-columns: 110px 1fr; }
#chat-form.tell-mode #chat-target { display: block !important; }
#chat-target { margin-bottom: 4px; }

.npc-dialog {
  left: 12px; top: 390px; width: 320px; max-height: calc(100vh - 520px);
  padding: 0; overflow: hidden; background: linear-gradient(180deg, rgba(25,29,36,.96), rgba(8,10,15,.97));
  z-index: 25;
}
.npc-dialog-header {
  padding: 8px 10px; margin: 0; border-bottom: 1px solid rgba(188,160,94,.25);
  background: linear-gradient(180deg, rgba(60,67,82,.8), rgba(27,31,40,.88));
}
#npc-dialog-title { font-size: 1rem; }
#npc-dialog-meta { display: none; }
#npc-dialog-content { padding: 10px 12px 14px; font-size: .82rem; line-height: 1.35; }
#npc-dialog-content .l2-action, #npc-dialog-content .l2-footer-link {
  display: inline; margin: 0; padding: 0; border: 0; background: transparent !important;
  color: #78a6ff; text-decoration: underline; cursor: pointer; border-radius: 0;
}
#npc-dialog-content .l2-dialog-links { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
#npc-dialog-content p { margin: 0 0 8px; }
#npc-dialog-content .l2-level { color: #ffdb7a; }
#npc-action-status { margin: 8px 10px 0; }

.main-menu {
  position: absolute; right: 10px; bottom: 8px; display: grid; grid-template-columns: repeat(4, 44px); gap: 4px; z-index: 30;
}
.menu-tile, .session-menu-toggle {
  width: 44px; height: 44px; padding: 0; font-weight: 700; font-size: .82rem;
  background: linear-gradient(180deg, rgba(54,58,66,.96), rgba(20,22,29,.98));
  border: 1px solid rgba(176,150,95,.34); border-radius: 4px;
}
.session-menu { right: 10px; bottom: 104px; z-index: 31; }
.session-menu-popover { min-width: 180px; padding: 6px; }
.session-menu-popover button { width: 100%; text-align: left; margin-bottom: 4px; background: #364152; }
.session-menu-popover button.danger { background: #74363b; }
.session-menu-popover button:last-child { margin-bottom: 0; }

.map-toolbar { top: 8px; right: 8px; }
.map-readout { right: 210px; bottom: 8px; }

@media (max-width: 900px) {
  .combat-dock { width: calc(100vw - 300px); min-width: 220px; }
  .log-pane { width: calc(100vw - 210px); max-width: 360px; }
  .npc-dialog { top: auto; bottom: 260px; max-height: 230px; }
}
@media (max-width: 760px) {
  .hud { width: calc(100vw - 16px); }
  .combat-dock { width: calc(100vw - 16px); top: 116px; }
  .log-pane { width: calc(100vw - 72px); }
  .system-pane { bottom: 238px; }
  .chat-pane { bottom: 8px; height: 220px; }
  .npc-dialog { left: 8px; bottom: 236px; width: calc(100vw - 16px); top: auto; max-height: 190px; }
  .main-menu { grid-template-columns: repeat(4, 40px); right: 8px; }
  .menu-tile, .session-menu-toggle { width: 40px; height: 40px; }
  .session-menu { right: 8px; bottom: 96px; }
}

/* ===== Lineage II-like HUD layout ===== */
:root {
  --l2-frame: rgba(202, 176, 111, .44);
  --l2-frame-soft: rgba(202, 176, 111, .22);
  --l2-bg-top: rgba(43, 47, 55, .94);
  --l2-bg-bottom: rgba(8, 10, 14, .96);
  --l2-text: #e6e4de;
  --l2-muted: #aaa9a3;
}

body {
  font-family: Tahoma, "Segoe UI", sans-serif;
}

.panel, .hud, .log-pane, .map-readout, .session-menu-popover {
  border-radius: 4px;
  border-color: var(--l2-frame);
  background: linear-gradient(180deg, var(--l2-bg-top), var(--l2-bg-bottom));
  box-shadow: 0 3px 12px rgba(0, 0, 0, .72), inset 0 0 0 1px rgba(255,255,255,.035);
  backdrop-filter: none;
}

/* Character status: upper-left, compact like the original status window. */
.hud {
  left: 8px;
  top: 8px;
  width: 228px;
  padding: 8px 9px 9px;
}
.hud-heading { margin-bottom: 5px; }
.hud-heading strong { color: #f1ead6; text-shadow: 0 1px 1px #000; }
#coordinates { color: #c9b87f; }
.stat-row { grid-template-columns: 22px 1fr 60px; gap: 5px; margin: 2px 0; }
.stat-row > span { color: #e5d9b5; }
.stat-bar { height: 9px; border-radius: 1px; border: 1px solid rgba(0,0,0,.72); }
.stat-row b { font-size: .65rem; }
.hud-status-row { margin-top: 5px; }
#status, #world-summary { font-size: .64rem; }

/* Target and active effects: upper-center. */
.combat-dock {
  top: 6px;
  width: min(430px, calc(100vw - 520px));
  min-width: 300px;
  gap: 3px;
}
.combat-dock .target-panel {
  border-radius: 4px;
  padding: 7px 9px 6px;
  border-color: var(--l2-frame);
}
.target-heading strong { color: #f2ead4; }
.target-hp { height: 9px; border-radius: 1px; margin: 5px 0 3px; }
.target-hp-value { color: #c8b77d; }
.buff-strip {
  min-height: 39px;
  padding: 3px;
  border-radius: 3px;
  border-color: var(--l2-frame-soft);
  background: rgba(10, 12, 16, .91);
}
.buff-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 2px;
}
.buff-details-button { height: 32px; min-width: 34px; border-radius: 2px; }

/* NPC / quest window: left side between player status and communication windows. */
.npc-dialog {
  left: 8px;
  top: 142px;
  bottom: 356px;
  width: 390px;
  max-height: none;
  padding: 0;
  overflow: hidden;
  z-index: 27;
}
.npc-dialog-header {
  min-height: 37px;
  padding: 7px 9px;
  margin: 0;
  align-items: center;
  border-bottom-color: var(--l2-frame-soft);
  background: linear-gradient(180deg, rgba(72,76,85,.9), rgba(25,28,34,.94));
}
.npc-dialog-heading { min-width: 0; }
#npc-dialog-title { color: #eee6cf; font-size: .88rem; }
#npc-dialog-meta { display: block; margin-top: 1px; color: #aaa99f; font-size: .61rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npc-dialog-controls { display: flex; align-items: center; gap: 2px; }
.npc-dialog-controls .icon-button { min-width: 24px; height: 24px; padding: 0 5px; border-radius: 2px; }
.dialog-page { min-width: 30px; text-align: center; color: #baa970; font-size: .62rem; }
.dialog-nav:disabled { opacity: .35; }
#npc-dialog-content {
  height: calc(100% - 38px);
  padding: 10px 12px 14px;
  overflow: auto;
  color: var(--l2-text);
  font-size: .79rem;
  line-height: 1.35;
}
#npc-action-status { margin: 7px 9px 0; }
#npc-dialog-content .l2-action,
#npc-dialog-content .l2-footer-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #76a6f4;
  text-decoration: underline;
  text-align: left;
}
#npc-dialog-content .l2-action:hover { color: #a9c8ff; filter: none; }
#npc-dialog-content .l2-row { margin: 2px 0; }
#npc-dialog-content .l2-unsupported { color: #888b90; }

/* Communication: two fixed, non-overlapping windows in the lower-left. */
.communication-dock { position: absolute; inset: 0; z-index: 25; pointer-events: none; }
.communication-dock > * { pointer-events: auto; }
.log-pane {
  left: 8px;
  width: 390px;
  padding: 5px 6px;
  border-radius: 3px;
}
.chat-pane {
  bottom: 8px;
  height: 230px;
  max-height: none;
}
.system-pane {
  bottom: 246px;
  height: 100px;
  max-height: none;
}
.chat-pane .log-view { height: 164px; }
.system-pane .log-view { height: 67px; }
.chat-heading { min-height: 24px; padding: 0 1px 4px; }
.chat-tabs { align-items: center; gap: 1px; }
.chat-tab {
  padding: 3px 6px;
  border-radius: 1px;
  font-size: .62rem;
  color: #d8d2c4;
  border-color: var(--l2-frame-soft);
}
.chat-tab.active { color: #fff0b8; border-color: var(--l2-frame); background: rgba(83,70,42,.78); }
.log-view { font-family: Tahoma, sans-serif; font-size: .69rem; line-height: 1.25; }
#chat-form input { border-radius: 2px; background: rgba(5,7,10,.92); }

/* Twelve-slot hotkey bar in the lower-center. */
.quickbar { left: 50%; bottom: 8px; transform: translateX(-50%); padding: 0; border: 0; background: transparent; box-shadow: none; }
.hotkey-frame { display: flex; align-items: flex-end; gap: 3px; }
.skill-buttons { display: grid; grid-template-columns: repeat(12, 43px); gap: 2px; }
.skill-button, .quickbar-utility {
  position: relative;
  width: 43px;
  min-width: 43px;
  height: 43px;
  padding: 0;
  border-radius: 2px;
  border: 1px solid var(--l2-frame);
  background: linear-gradient(180deg, rgba(59,62,70,.96), rgba(16,18,23,.98)) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 2px 5px rgba(0,0,0,.6);
}
.skill-button.empty { opacity: .58; }
.skill-button:disabled { cursor: default; }
.hotkey-label {
  position: absolute;
  left: 2px;
  top: 1px;
  color: #d7c78d;
  font-size: .52rem;
  line-height: 1;
}
.skill-glyph { display: grid; place-items: center; height: 100%; color: #e9edf4; font-size: .7rem; font-weight: 700; }
.quickbar-utility { width: 34px; min-width: 34px; color: #bbb8ae; font-size: .55rem; }

/* Original-style 2x4 game menu in the lower-right. */
.main-menu {
  right: 8px;
  bottom: 8px;
  grid-template-columns: repeat(4, 52px);
  gap: 3px;
}
.menu-tile {
  width: 52px;
  height: 48px;
  padding: 2px 1px;
  display: grid;
  grid-template-rows: 27px 1fr;
  place-items: center;
  border-radius: 2px;
  border-color: var(--l2-frame);
  color: #ddd8ca;
}
.menu-tile .menu-icon { font-size: 1.05rem; line-height: 1; color: #e7dfc6; }
.menu-tile > span:last-child { font-size: .48rem; line-height: 1.05; white-space: nowrap; }
.session-menu {
  right: 8px;
  bottom: 111px;
  z-index: 36;
}
.session-menu-popover { right: 0; bottom: 0; min-width: 178px; border-radius: 3px; }
.session-menu-popover button { border-radius: 2px; }
.map-readout { right: 224px; bottom: 8px; }

@media (max-width: 1180px) {
  .skill-buttons { grid-template-columns: repeat(6, 43px); grid-template-rows: repeat(2, 43px); }
  .quickbar { bottom: 8px; }
}

@media (max-width: 760px) {
  .hud { width: calc(100vw - 16px); }
  .combat-dock { top: 126px; width: calc(100vw - 16px); min-width: 0; }
  .npc-dialog { left: 8px; top: 232px; bottom: 288px; width: calc(100vw - 16px); }
  .log-pane { width: calc(100vw - 16px); }
  .chat-pane { height: 184px; }
  .chat-pane .log-view { height: 118px; }
  .system-pane { bottom: 198px; height: 82px; }
  .system-pane .log-view { height: 50px; }
  .main-menu { grid-template-columns: repeat(4, 44px); }
  .menu-tile { width: 44px; height: 43px; }
  .session-menu { bottom: 101px; }
  .quickbar { display: none !important; }
}
.npc-dialog { display: flex; flex-direction: column; }
.npc-dialog-header, #npc-action-status { flex: 0 0 auto; }
#npc-dialog-content { flex: 1 1 auto; height: auto; min-height: 0; }

/* ===== 0.5.6: staged login and functional Lineage-style game windows ===== */
.login-selection { display: grid; gap: 12px; min-height: 220px; }
.selection-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.selection-heading p { margin: 4px 0 0; font-size: .82rem; }
.selection-step { flex: 0 0 auto; min-width: 38px; padding: 4px 7px; border: 1px solid var(--l2-frame-soft); background: rgba(16,18,22,.72); color: #d8c68b; text-align: center; font-size: .72rem; }
.selection-options { display: grid; gap: 7px; max-height: 360px; overflow: auto; padding: 1px; }
.selection-card { display: grid; grid-template-columns: 42px minmax(0,1fr) 20px; gap: 10px; align-items: center; width: 100%; padding: 9px; border: 1px solid var(--l2-frame-soft); border-radius: 3px; background: linear-gradient(180deg,rgba(56,60,68,.95),rgba(18,20,25,.97)); text-align: left; }
.selection-card:hover { border-color: var(--l2-frame); background: linear-gradient(180deg,rgba(73,75,78,.98),rgba(27,27,27,.98)); }
.selection-card.unavailable, .selection-card:disabled { cursor:not-allowed; opacity:.5; filter:saturate(.35); border-color:rgba(140,130,105,.3); }
.selection-card.unavailable:hover, .selection-card:disabled:hover { border-color:rgba(140,130,105,.3); background:linear-gradient(180deg,rgba(56,60,68,.95),rgba(18,20,25,.97)); }
.selection-card.unavailable .selection-card-marker { color:#a66f6f; }
.selection-card-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(207,187,126,.42); background: radial-gradient(circle at 35% 30%,#607692,#202733 72%); color: #f1e6c2; font-weight: 800; font-size: 1rem; }
.selection-card.character .selection-card-icon { border-radius: 50%; background: radial-gradient(circle at 35% 30%,#8c7a5c,#29231d 72%); }
.selection-card-text { display: grid; gap: 3px; min-width: 0; }
.selection-card-text strong { color: #f0e8d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selection-card-text small { color: #a9a99f; font-size: .71rem; line-height: 1.25; }
.selection-card-marker { color: #d8c68b; font-size: 1.25rem; }
.selection-empty { padding: 18px; border: 1px dashed var(--l2-frame-soft); color: #c7bfa9; text-align: center; line-height: 1.45; }
.selection-actions { display: flex; justify-content: flex-end; }
.selection-actions button { width: auto; }

.game-window { position: absolute; right: 228px; bottom: 66px; width: min(390px,calc(100vw - 470px)); max-height: min(720px,calc(100vh - 92px)); z-index: 38; color: var(--l2-text); filter: drop-shadow(0 7px 12px rgba(0,0,0,.7)); }
.game-window-frame { display: flex; flex-direction: column; max-height: inherit; border: 1px solid rgba(208,188,126,.65); border-radius: 4px; background: linear-gradient(180deg,rgba(52,54,60,.97),rgba(12,13,17,.98)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); overflow: hidden; }
.game-window-header { position: relative; min-height: 31px; display: flex; align-items: center; justify-content: center; padding: 5px 34px; border-bottom: 1px solid rgba(196,174,105,.35); background: linear-gradient(180deg,rgba(74,77,84,.98),rgba(27,29,34,.98)); color: #e8e2d2; text-shadow: 0 1px #000; }
.game-window-header::before,.game-window-header::after { content:""; position:absolute; top:6px; width:40px; height:14px; opacity:.38; background: linear-gradient(90deg,transparent,#bca86d,transparent); }
.game-window-header::before { left:7px; }.game-window-header::after { right:7px; }
.game-window-close { position: absolute; right:4px; top:3px; width:25px; height:25px; padding:0; border-radius:1px; background:transparent; color:#d7c99f; font-size:1rem; z-index:2; }
.game-window-tabs { display:flex; gap:2px; padding:5px 6px 0; border-bottom:1px solid rgba(191,171,108,.26); background:rgba(18,20,25,.8); overflow-x:auto; scroll-padding-left:6px; }
.game-tab { flex:0 0 auto; min-width:max-content; padding:4px 10px; border-radius:2px 2px 0 0; border:1px solid rgba(178,160,105,.4); border-bottom:0; background:linear-gradient(180deg,#2d486b,#18263b); color:#e7e3d8; font-size:.72rem; }
.game-tab.active { background:linear-gradient(180deg,#4673aa,#233a58); color:#fff; }
.game-window-body { flex:1 1 auto; min-height:160px; max-height:calc(100vh - 170px); overflow:auto; padding:8px; background:rgba(10,11,15,.75); }
.game-window-footer { padding:6px; border-top:1px solid var(--l2-frame-soft); text-align:center; }
.game-window-footer button { min-width:150px; padding:6px 14px; border:1px solid rgba(190,171,111,.5); border-radius:2px; background:linear-gradient(180deg,#4c5057,#202328); color:#eee7d4; }
.game-empty { min-height:140px; display:grid; place-items:center; padding:18px; color:#999a9d; text-align:center; line-height:1.45; }
.game-note { color:#a8a59a; font-size:.68rem; line-height:1.4; }
.game-section { margin:0 0 7px; border-top:1px solid rgba(199,181,124,.2); }
.game-section h3 { margin:-8px 0 4px 7px; width:max-content; padding:0 6px; background:#15171b; color:#d8d0bb; font-size:.74rem; font-weight:500; }
.character-summary { display:grid; grid-template-columns:48px 1fr; align-items:center; gap:9px; margin-bottom:12px; }
.character-avatar { display:grid; place-items:center; width:46px; height:54px; border:1px solid var(--l2-frame); background:radial-gradient(circle at 50% 32%,#9e8964,#27231e 67%,#0e0f12); color:#f4e7c3; font-size:1.2rem; }
.character-summary strong,.character-summary small { display:block; }.character-summary small { margin-top:3px;color:#a8a69f;font-size:.69rem; }
.game-stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.attribute-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:2px 9px; }
.game-stat { display:flex; justify-content:space-between; gap:8px; min-height:20px; padding:2px 4px; color:#bab7ae; font-size:.72rem; }
.game-stat b { color:#d7c89b; font-weight:500; }
.inventory-grid { display:grid; grid-template-columns:repeat(5,minmax(48px,1fr)); gap:4px; }
.inventory-item { position:relative; min-height:70px; padding:3px; display:grid; grid-template-rows:42px auto; border:1px solid rgba(164,153,119,.35); border-radius:1px; background:linear-gradient(145deg,#292c31,#101216); color:#ded9cb; }
.inventory-item.equipped { border-color:#d9bd65; box-shadow:inset 0 0 8px rgba(229,188,74,.25); }
.inventory-glyph { display:grid; place-items:center; background:radial-gradient(circle,#6b6658,#25262b 72%); color:#f0e5c6; font-size:.72rem;font-weight:700; }
.inventory-item small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.54rem; }
.inventory-count,.inventory-enchant { position:absolute; padding:0 2px; background:rgba(0,0,0,.64); font-size:.52rem; }.inventory-count{right:2px;bottom:17px}.inventory-enchant{left:2px;top:2px;color:#92dbff}
.action-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; }
.action-entry { min-height:63px; padding:4px; display:grid; place-items:center; gap:3px; border:1px solid rgba(160,152,121,.36); border-radius:1px; background:linear-gradient(145deg,#28455f,#111a22); }
.action-entry > span { font-size:1.25rem;color:#d9eef8}.action-entry small{font-size:.55rem;color:#ddd9cb;text-align:center}
.skills-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:4px; }
.skill-entry { position:relative; min-height:61px; padding:3px; display:grid; grid-template-rows:36px auto; border:1px solid rgba(159,150,116,.36); border-radius:1px; background:linear-gradient(145deg,#31496a,#111722); }
.skill-entry > span { display:grid;place-items:center;font-size:.76rem;font-weight:800;color:#f0f5ff}.skill-entry small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.52rem}.skill-entry em{position:absolute;right:2px;top:2px;font-size:.48rem;color:#d8ca99}.skill-entry.disabled{filter:grayscale(1);opacity:.5}.skill-entry.passive{cursor:default;background:linear-gradient(145deg,#3b3b4d,#17171f)}
.quest-list { display:grid;gap:5px}.quest-entry{display:grid;gap:3px;text-align:left;padding:8px;border:1px solid rgba(174,159,108,.34);border-radius:1px;background:rgba(35,36,38,.82)}.quest-entry strong{color:#dfd4b7}.quest-entry small{color:#b7b7b2;line-height:1.35}.quest-entry em{color:#86898d;font-size:.58rem}
.map-panel-preview { min-height:210px; display:grid; place-items:center; align-content:center; gap:7px; border:1px solid rgba(173,157,104,.4); background:linear-gradient(rgba(24,37,35,.35),rgba(24,37,35,.35)),repeating-linear-gradient(0deg,transparent 0 49px,rgba(185,169,111,.15) 50px),repeating-linear-gradient(90deg,transparent 0 49px,rgba(185,169,111,.15) 50px),#6c715f; color:#20231e;text-shadow:0 1px rgba(255,255,255,.25)}.map-preview-cross{font-size:2rem}.map-panel-preview small{color:#282b25}.game-button-row{display:flex;gap:4px;margin-top:6px}.game-button-row button{flex:1;padding:6px;border-radius:1px;background:linear-gradient(#525247,#22231f);border:1px solid var(--l2-frame-soft);font-size:.65rem}
.system-action-list { display:grid;gap:1px}.system-action-list button{display:grid;grid-template-columns:25px 1fr;gap:7px;text-align:left;padding:6px 8px;border-radius:0;border-bottom:1px solid rgba(255,255,255,.04);background:linear-gradient(90deg,rgba(75,66,50,.55),rgba(20,21,24,.82));color:#ddd8ca}.system-action-list button span{text-align:left}.system-action-list button.danger{color:#efb0a8}

@media (max-width:1050px){.game-window{right:8px;bottom:112px;width:min(390px,calc(100vw - 16px))}.inventory-grid{grid-template-columns:repeat(4,1fr)}.skills-grid{grid-template-columns:repeat(5,1fr)}}
@media (max-width:760px){.game-window{left:8px;right:8px;bottom:105px;width:auto}.game-window-body{max-height:55vh}.inventory-grid{grid-template-columns:repeat(4,1fr)}.action-grid{grid-template-columns:repeat(4,1fr)}}

/* Quest log: accepted quest list, server condition and actions. */
.game-window.quest-window{width:min(700px,calc(100vw - 470px))}
.quest-toolbar{display:flex;align-items:center;gap:8px;padding:5px 7px;margin:-2px -2px 7px;border:1px solid rgba(191,171,108,.25);background:rgba(22,24,29,.84);color:#cfc7b2}.quest-toolbar span{flex:1}.quest-toolbar b{color:#d8bd74}.quest-toolbar button{width:28px;min-height:24px;padding:1px}
.quest-workspace{display:grid;grid-template-columns:minmax(185px,.82fr) minmax(300px,1.35fr);gap:7px;min-height:360px}
.quest-column{min-width:0;border:1px solid rgba(174,159,108,.34);background:rgba(21,22,27,.72);overflow:hidden}.quest-column-list{display:flex;flex-direction:column}.quest-tree-title{padding:7px 9px;border-bottom:1px solid rgba(174,159,108,.25);color:#cfc5a7;background:rgba(42,43,47,.72)}
.quest-column .quest-list{padding:5px;overflow:auto}.quest-entry.active{border-color:rgba(221,194,113,.85);background:linear-gradient(180deg,rgba(83,76,55,.78),rgba(38,38,39,.9));box-shadow:inset 0 0 0 1px rgba(255,235,170,.08)}
.quest-detail{display:flex;flex-direction:column;padding:8px;gap:7px}.quest-detail>header{display:flex;align-items:flex-start;gap:8px;padding-bottom:7px;border-bottom:1px solid rgba(174,159,108,.25)}.quest-detail>header>div{flex:1;min-width:0}.quest-detail h3{margin:0;color:#eee5cc;font-size:1rem}.quest-detail header small{display:block;margin-top:2px;color:#aaa89f}.quest-state-badge{white-space:nowrap;padding:3px 6px;border:1px solid rgba(209,184,108,.48);background:rgba(75,65,39,.45);color:#e4ca79;font-size:.68rem}
.quest-meta-line{display:flex;flex-wrap:wrap;gap:5px 12px;color:#c3c0b7;font-size:.7rem}.quest-description{min-height:90px;max-height:180px;overflow:auto;padding:7px;border:1px solid rgba(255,255,255,.08);background:rgba(4,5,7,.45);color:#deddd8;line-height:1.42;white-space:normal}.quest-target{display:grid;gap:2px;padding:6px 7px;border-left:3px solid rgba(211,183,100,.72);background:rgba(73,65,43,.25)}.quest-target b{font-size:.65rem;color:#bcb08f}.quest-target span{color:#ece4cc}
.quest-stage-picker{display:grid;grid-template-columns:auto minmax(150px,1fr);align-items:center;gap:4px 8px;padding:6px 7px;border:1px solid rgba(174,159,108,.26);background:rgba(28,30,34,.72);color:#cfc7b2;font-size:.68rem}.quest-stage-picker span{font-weight:700;color:#d6c9a7}.quest-stage-picker select{min-width:0;padding:4px 6px;border:1px solid rgba(195,176,113,.42);background:#17191d;color:#e5dec9}.quest-stage-picker small{grid-column:2;color:#8f918f;font-size:.58rem}.quest-target small{color:#92958f;font-size:.61rem}.quest-objectives,.quest-overview{padding:6px 7px;border:1px solid rgba(174,159,108,.22);background:rgba(21,23,27,.52)}.quest-objectives h4,.quest-overview h4{margin:0 0 5px;color:#d2c6a4;font-size:.72rem}.quest-objectives>div,.quest-overview>div{display:grid;grid-template-columns:minmax(90px,.42fr) minmax(0,1fr);gap:8px;padding:3px 0;border-top:1px solid rgba(255,255,255,.045);font-size:.66rem}.quest-objectives>div:first-of-type,.quest-overview>div:first-of-type{border-top:0}.quest-objectives span,.quest-overview span{min-width:0;color:#d5d2c8;line-height:1.35}.quest-objectives b,.quest-overview b{color:#bbae89;font-weight:600}.quest-objectives>div{grid-template-columns:minmax(0,1fr) auto}.quest-objectives>div>b{color:#e0c675;text-align:right}
.quest-rewards,.quest-state-history{padding-top:3px;border-top:1px solid rgba(174,159,108,.24)}.quest-rewards h4,.quest-state-history h4{margin:0 0 5px;color:#d2c6a4;font-size:.72rem}.quest-reward{display:inline-flex;align-items:center;gap:6px;min-width:110px;margin:0 6px 4px 0;padding:5px 7px;border:1px solid rgba(174,159,108,.3);background:rgba(33,34,37,.82)}.quest-reward>span{display:grid;place-items:center;width:30px;height:24px;border:1px solid rgba(209,184,108,.55);color:#e1bd55;font-size:.62rem}.quest-reward div{display:grid}.quest-reward b{font-size:.62rem;color:#d9d2bf}.quest-reward small{font-size:.72rem;color:#f0e5c5}.quest-state-history>div{display:flex;justify-content:space-between;gap:8px;padding:3px 2px;color:#c6c3ba;font-size:.66rem}.quest-state-history time{color:#85878b}.quest-state-history>small,.quest-rewards>small{color:#92938f}
.quest-options{display:flex;flex-wrap:wrap;gap:12px;margin-top:auto;padding:6px 2px;border-top:1px solid rgba(174,159,108,.24)}.quest-options label{display:flex;align-items:center;gap:5px;color:#c7c3b8;font-size:.68rem}.quest-options input{accent-color:#b39a56}.quest-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.quest-controls button{min-height:29px}.quest-controls button.danger{border-color:rgba(171,86,72,.7);color:#e3b2a8}.quest-empty-state .game-button-row{justify-content:center;margin:7px 0 12px}
@media (max-width:1050px){.game-window.quest-window{width:min(700px,calc(100vw - 16px))}}
@media (max-width:650px){.quest-workspace{grid-template-columns:1fr;min-height:0}.quest-column-list{max-height:180px}.quest-description{max-height:150px}.quest-controls{grid-template-columns:1fr}.game-window.quest-window{width:auto}}

/* Server-originated confirmation/invitation dialog. */
.server-request {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .34);
  pointer-events: auto;
}
.server-request-frame {
  width: min(430px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid #756c53;
  border-radius: 3px;
  background: linear-gradient(#25272a, #121417);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .08);
  color: #e9e3d4;
}
.server-request-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.server-request-header strong { font-family: Georgia, serif; font-size: 1.02rem; }
.server-request-counter { color: #bcaa73; font-size: .72rem; }
.server-request-message { padding: 16px 4px 12px; line-height: 1.45; white-space: pre-wrap; }
.server-request-time { min-height: 20px; color: #aaa99f; font-size: .72rem; text-align: center; }
.server-request-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.server-request-actions button { min-height: 36px; font-weight: 700; }
.server-request-accept { background: #435f8b; color: #eff5ff; }
.server-request-decline { background: #493a3a; color: #f3dddd; }
.server-request.hidden { display: none; }

/* Chat channel colours and clickable sender names (0.5.26). */
.chat-line.chat { color: #d8dde5; }
.chat-line.channel-say { color: #d8dde5; }
.chat-line.channel-shout { color: #f1a35b; }
.chat-line.channel-tell { color: #ef9ad8; }
.chat-line.channel-party, .chat-line.channel-party-room { color: #65d782; }
.chat-line.channel-clan { color: #8fd6a2; }
.chat-line.channel-ally { color: #b7d97c; }
.chat-line.channel-trade { color: #e6b36f; }
.chat-line.channel-hero { color: #63d9ea; }
.chat-line.channel-announcement { color: #55e6e6; }
.chat-line.channel-gm { color: #ff7676; }
.chat-line.channel-npc, .chat-line.channel-npc-shout { color: #d8c58c; }
.chat-sender {
  display: inline;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.chat-sender:hover { text-decoration: underline; filter: brightness(1.18); }
.chat-sender.announcement { cursor: default; text-decoration: none; }
.chat-message-text { color: inherit; }

/* Party window populated from PartySmallWindow* packets. */
.party-panel {
  position: absolute;
  left: 12px;
  top: 154px;
  z-index: 23;
  width: 240px;
  padding: 7px 8px 8px;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(30,35,43,.94), rgba(9,12,16,.96));
}
.party-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(188,160,94,.24);
  color: #eee6d1;
  font-size: .78rem;
}
.party-list { display: grid; gap: 5px; }
.party-member {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 7px;
  padding: 3px 4px 4px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 4px;
  background: rgba(5,8,12,.38);
}
.party-member.dead { opacity: .58; }
.party-member-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f1eee5;
  font-size: .72rem;
  font-weight: 700;
}
.party-member-meta { color: #c9b775; font-size: .61rem; white-space: nowrap; }
.party-member-bars { grid-column: 1 / -1; display: grid; gap: 2px; }
.party-mini-bar { height: 5px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); background: #14171c; }
.party-mini-bar i { display: block; height: 100%; width: 0; }
.party-mini-bar.hp i { background: linear-gradient(90deg,#8f3036,#df515b); }
.party-mini-bar.mp i { background: linear-gradient(90deg,#23508d,#5e9ef3); }
.party-mini-bar.cp i { background: linear-gradient(90deg,#8d6c1b,#d2b55a); }

@media (max-width: 760px) {
  .party-panel { left: 8px; top: 126px; width: min(240px, calc(100vw - 16px)); }
}

/* 0.5.27 interaction and hotbar refinements. */
.chat-line.channel-announcement,
.chat-line.channel-announcement .chat-sender,
.chat-line.channel-announcement .chat-message-text { color: #55e6e6 !important; }

.hotbar-rows { display: flex !important; flex-direction: column; gap: 2px; }
.hotbar-row { display: grid; grid-template-columns: repeat(12, 43px); gap: 2px; }
.hotbar-row:not(.primary) .hotkey-label { color: #8fa8bd; }
.hotbar-slot.drag-over,
.inventory-item.drag-over,
.paperdoll-drop.drag-over { border-color: #73d7e7 !important; box-shadow: inset 0 0 10px rgba(83,216,232,.35), 0 0 8px rgba(83,216,232,.25); }
.hotbar-bars-button { color: #e7d28e !important; font-size: .8rem !important; font-weight: 700; }
.inventory-item.selected { outline: 1px solid #67cfe0; box-shadow: inset 0 0 8px rgba(64,205,225,.24); }
.paperdoll-drop { min-height: 105px; display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; padding: 8px; border: 1px dashed rgba(201,181,112,.55); background: radial-gradient(circle at 50% 30%,rgba(94,81,52,.25),rgba(12,14,18,.72)); }
.paperdoll-drop > span { display:grid; place-items:center; min-height:54px; border:1px solid rgba(173,155,101,.3); color:#bdb59d; font-size:.62rem; }
.paperdoll-drop > small { grid-column:1/-1; color:#95938b; text-align:center; }
.equipped-list { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.equipped-list button { padding:4px 7px; font-size:.62rem; }

@media (max-width:1180px) {
  .hotbar-row { grid-template-columns: repeat(12, 39px); }
  .hotbar-row .skill-button { width:39px; min-width:39px; }
}

/* 0.5.29 channel and inventory refinements. */
.chat-line.exp-sp { color:#ef9a3d; }
.chat-line.welcome { color:#71d88a; }
.chat-line.drop-message { color:#f2d45c; }
.paperdoll-drop { position:relative; min-height:260px; grid-template-columns:repeat(3,1fr); align-content:center; }
.paperdoll-drop::before { content:""; position:absolute; left:50%; top:18px; width:76px; height:190px; transform:translateX(-50%); border:2px solid rgba(213,193,126,.48); border-radius:40% 40% 28% 28%; background:radial-gradient(circle at 50% 15%,rgba(220,201,143,.22),transparent 28%),linear-gradient(90deg,transparent 47%,rgba(220,201,143,.2) 48%,rgba(220,201,143,.2) 52%,transparent 53%); pointer-events:none; }
.inventory-actions { display:flex; gap:6px; margin-top:8px; }
.inventory-actions button { flex:1; }
.action-entry.pending { opacity:.55; pointer-events:none; }

/* 0.5.29 stable drag/drop and inventory paperdoll. */
#world.drag-over { outline: 3px solid rgba(242, 212, 92, .9); outline-offset: -5px; cursor: copy; }
.inventory-workspace { display:grid; grid-template-columns:minmax(230px, 0.75fr) minmax(320px, 1.5fr); gap:12px; align-items:start; }
.inventory-bag { min-width:0; display:flex; flex-direction:column; min-height:540px; }
.inventory-paperdoll { position:relative; min-height:540px; border:1px solid #4a473f; background:radial-gradient(circle at 50% 30%, rgba(85,112,122,.15), transparent 45%), #111619; overflow:hidden; }
.paperdoll-silhouette { position:absolute; inset:64px 67px 52px; opacity:.22; pointer-events:none; }
.paperdoll-silhouette i { position:absolute; left:50%; top:0; width:54px; height:54px; transform:translateX(-50%); border-radius:50%; background:#a7b2b4; }
.paperdoll-silhouette b { position:absolute; left:50%; top:52px; width:78px; height:195px; transform:translateX(-50%); border-radius:36px 36px 26px 26px; background:#a7b2b4; }
.paperdoll-silhouette em { position:absolute; left:50%; top:222px; width:112px; height:210px; transform:translateX(-50%); clip-path:polygon(24% 0, 48% 0, 45% 100%, 8% 100%, 22% 18%, 78% 18%, 92% 100%, 55% 100%, 52% 0, 76% 0); background:#a7b2b4; }
.paperdoll-slot { position:absolute; width:68px; min-height:52px; padding:4px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:1px solid #555042; background:rgba(24,28,29,.92); color:#d6d3c9; font-size:10px; z-index:2; }
.paperdoll-slot span { font-weight:700; font-size:13px; color:#e2d394; }
.paperdoll-slot small { font-size:9px; opacity:.78; }
.paperdoll-slot.filled { border-color:#8f7c45; box-shadow:inset 0 0 8px rgba(221,190,91,.16); }
.paperdoll-slot.drag-over { border-color:#e5d15b; background:#3b3926; }
.slot-head { left:50%; top:8px; transform:translateX(-50%); }
.slot-neck { left:50%; top:66px; transform:translateX(-50%); }
.slot-ear-left { left:8px; top:20px; } .slot-ear-right { right:8px; top:20px; }
.slot-chest { left:50%; top:132px; transform:translateX(-50%); }
.slot-legs { left:50%; top:324px; transform:translateX(-50%); }
.slot-gloves { left:8px; top:190px; } .slot-feet { right:8px; top:382px; }
.slot-weapon { left:8px; top:260px; } .slot-shield { right:8px; top:260px; }
.slot-ring-left { left:8px; top:120px; } .slot-ring-right { right:8px; top:120px; }
.slot-belt { left:50%; top:200px; transform:translateX(-50%); }
.slot-underwear { left:50%; top:258px; transform:translateX(-50%); }
.slot-cloak { right:8px; top:190px; }
.slot-bracelet-left { left:8px; top:450px; } .slot-bracelet-right { right:8px; top:450px; }
@media (max-width: 840px) { .inventory-workspace { grid-template-columns:1fr; } .inventory-paperdoll { min-height:520px; } }

/* 0.5.30 wider inventory and explicit quest source. */
.game-window.inventory-window { width:min(760px,calc(100vw - 470px)); }
.game-window.inventory-window .game-window-body { overflow-x:hidden; }
.game-window.inventory-window .inventory-workspace { grid-template-columns:minmax(270px,.9fr) minmax(380px,1.35fr); }
.game-window.inventory-window .inventory-grid { grid-template-columns:repeat(6,minmax(52px,1fr)); }
.quest-detail-source { display:block; margin-top:-3px; color:#858b8b; font-size:.58rem; }
@media (max-width:1050px) {
  .game-window.inventory-window { width:min(760px,calc(100vw - 16px)); }
}
@media (max-width:840px) {
  .game-window.inventory-window { width:min(620px,calc(100vw - 16px)); }
  .game-window.inventory-window .inventory-workspace { grid-template-columns:1fr; }
  .game-window.inventory-window .inventory-grid { grid-template-columns:repeat(5,minmax(48px,1fr)); }
}


/* 0.5.33 pressed hotbar feedback, bottom inventory totals and clean logout. */
.inventory-summary { grid-column:1/-1; margin-top:auto; padding:9px 10px; border:1px solid #49463d; background:#111719; display:grid; gap:6px; }
.inventory-summary > div:not(.inventory-exp-track) { display:flex; justify-content:space-between; gap:12px; font-size:.72rem; }
.inventory-summary span { color:#9da5a4; }
.inventory-summary strong { color:#e2d394; font-variant-numeric:tabular-nums; }
.inventory-exp-track { height:5px; border:1px solid #3d4748; background:#080c0d; overflow:hidden; }
.inventory-exp-track i { display:block; height:100%; background:linear-gradient(90deg,#7a9e42,#d5c35a); }
.hotkey-label { min-width:1.75em; }

.hotbar-slot.hotbar-pressed {
  transform: translateY(1px) scale(.96);
  border-color: #f1d973 !important;
  background: linear-gradient(180deg, rgba(116,105,57,.98), rgba(45,38,20,.98)) !important;
  box-shadow: inset 0 0 12px rgba(255,231,123,.5), 0 0 8px rgba(237,207,96,.42) !important;
}


/* 0.5.34 inventory trash drop target. */
.inventory-bag { min-height:540px; display:flex; flex-direction:column; }
.inventory-drop-dock { margin-top:auto; padding-top:10px; display:flex; justify-content:flex-end; }
.inventory-trash { width:48px; height:48px; padding:10px; display:grid; place-items:center; border:1px solid #5b5547; border-radius:4px; background:linear-gradient(180deg,#2d3032,#141719); color:#b9b5aa; cursor:pointer; transition:border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease; }
.inventory-trash svg { width:25px; height:25px; fill:currentColor; pointer-events:none; }
.inventory-trash:hover { color:#e1d28d; border-color:#8f7c45; background:linear-gradient(180deg,#3a392d,#1a1b18); }
.inventory-trash.drag-over { color:#ffe37a; border-color:#f2d45c; background:#493d20; box-shadow:0 0 12px rgba(242,212,92,.48), inset 0 0 10px rgba(242,212,92,.22); transform:scale(1.08); }
@media (max-width:840px) { .inventory-bag { min-height:320px; } }


/* 0.5.35: compact hotbar, fully visible game tabs and no map readout. */
.game-window-tabs {
  flex: 0 0 30px;
  min-height: 30px;
  align-items: flex-end;
  padding: 5px 6px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.game-tab {
  height: 24px;
  min-height: 24px;
  padding: 2px 10px 3px;
  line-height: 17px;
  transform: none !important;
}
.game-tab.active { position: relative; z-index: 1; }
.hotkey-frame { grid-template-columns: auto minmax(0, 1fr); }

/* 0.5.36: complete L2 HTML/admin rendering and multisell window. */
.npc-dialog.admin-dialog { width:min(420px,calc(100vw - 330px)); }
.npc-dialog.admin-dialog #npc-dialog-content { text-align:center; padding:8px 9px 14px; }
.npc-dialog.admin-dialog #npc-dialog-content .l2-row { justify-content:center; gap:3px; margin:2px 0; }
.npc-dialog.admin-dialog #npc-dialog-content .l2-cell { flex:0 1 auto; min-width:0; }
#npc-dialog-content .l2-button {
  min-height:22px;
  margin:2px 1px;
  padding:2px 7px;
  border:1px solid #606873;
  border-radius:2px;
  background:linear-gradient(180deg,#3c4652,#171b20);
  color:#e4e3df;
  text-decoration:none;
  line-height:16px;
  box-shadow:inset 0 1px rgba(255,255,255,.07);
}
#npc-dialog-content .l2-button:hover { color:#fff2b4; border-color:#8c8160; background:linear-gradient(180deg,#50545a,#25272a); }
#npc-dialog-content .l2-link { margin:3px 7px; padding:1px 2px; background:transparent; color:#8fc3ff; text-decoration:underline; }
#npc-dialog-content .l2-edit { height:23px; margin:2px 4px; padding:2px 5px; border:1px solid #60656d; background:#111419; color:#eee8d8; }
.hud.gm-invisible { border-color:#9e72bd; box-shadow:0 0 10px rgba(183,119,224,.28),inset 0 0 0 1px rgba(207,162,235,.08); }

.game-window.multisell-window { width:min(720px,calc(100vw - 470px)); }
.multisell-toolbar { display:flex;align-items:center;gap:10px;padding:7px 9px;margin:-2px -2px 8px;border:1px solid rgba(191,171,108,.25);background:rgba(22,24,29,.84);color:#cfc7b2; }
.multisell-toolbar span { flex:1; }
.multisell-toolbar b { color:#e2ca7f; }
.multisell-toolbar em { color:#9ea4a1;font-size:.65rem; }
.multisell-list { display:grid;gap:7px; }
.multisell-entry { display:grid;grid-template-columns:minmax(150px,1fr) 26px minmax(170px,1.2fr) 72px 72px;gap:7px;align-items:center;padding:8px;border:1px solid rgba(174,159,108,.34);background:rgba(25,27,31,.82); }
.multisell-products,.multisell-ingredients { display:grid;gap:4px; }
.multisell-arrow { text-align:center;color:#d2bc75;font-size:1.15rem; }
.multisell-item { display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:6px;align-items:center;min-width:0;padding:4px;border:1px solid rgba(255,255,255,.08);background:rgba(7,9,11,.48); }
.multisell-item>span { display:grid;place-items:center;width:28px;height:28px;border:1px solid rgba(190,171,111,.4);color:#e8d99f;font-size:.65rem;font-weight:700; }
.multisell-item>div { display:grid;min-width:0; }
.multisell-item strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dfddd5;font-size:.69rem; }
.multisell-item small { color:#8e9292;font-size:.55rem; }
.multisell-item>b { color:#e4ce82;font-size:.68rem;white-space:nowrap; }
.multisell-amount { display:grid;gap:3px;color:#aaa99f;font-size:.58rem; }
.multisell-amount input { width:100%;padding:4px;border:1px solid #55534b;background:#111418;color:#e7e1d3; }
.multisell-entry>button { min-height:29px;padding:4px; }
@media(max-width:1050px){.game-window.multisell-window{width:min(720px,calc(100vw - 16px));}}
@media(max-width:700px){.multisell-entry{grid-template-columns:1fr 22px 1fr}.multisell-amount,.multisell-entry>button{grid-column:auto}.game-window.multisell-window{width:auto;}}

/* 0.5.38 login and skill panel fixes. */
.skill-enchant-note { margin-bottom:7px; padding:6px 8px; border:1px solid rgba(190,171,111,.28); background:rgba(75,63,35,.24); color:#d5c89d; font-size:.66rem; line-height:1.35; }

/* 0.5.39: separate retail-style skill enchant window. */
.skill-enchant-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 9, .46);
  backdrop-filter: blur(1px);
}
.skill-enchant-dialog.hidden { display: none !important; }
.skill-enchant-frame {
  width: min(790px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  border: 1px solid #68604a;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(35,38,43,.98), rgba(14,17,20,.99));
  color: #ddd9cf;
  box-shadow: 0 16px 48px rgba(0,0,0,.72), inset 0 0 0 1px rgba(232,209,139,.05);
}
.skill-enchant-header {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #4e4a3f;
  background: linear-gradient(180deg,#3a3e45,#20242a);
}
.skill-enchant-header strong { display:block; color:#f0e8d5; font-size:1rem; }
.skill-enchant-header small { display:block; margin-top:3px; color:#aaa79f; font-size:.68rem; }
.skill-enchant-status { margin:9px 10px 0; padding:8px 10px; border:1px solid #414941; background:#1b2924; color:#b7d7c4; font-size:.72rem; }
.skill-enchant-status.warn { border-color:#71613d; background:#30291b; color:#ead59a; }
.skill-enchant-status.error { border-color:#713f3f; background:#321d1d; color:#efb0aa; }
.skill-enchant-status.ok { border-color:#42634f; background:#1d3025; color:#b8e2c4; }
.skill-enchant-layout { min-height:0; flex:1; display:grid; grid-template-columns:230px minmax(0,1fr); gap:10px; padding:10px; overflow:hidden; }
.skill-enchant-selector,.skill-enchant-content { min-height:0; border:1px solid #46463f; background:rgba(17,20,23,.88); }
.skill-enchant-selector { display:flex; flex-direction:column; }
.skill-enchant-selector h3,.skill-enchant-block h3 { margin:0; padding:7px 9px; border-bottom:1px solid #45443d; color:#d3cdbd; font-size:.76rem; font-weight:500; background:rgba(44,45,43,.55); }
.skill-enchant-list { min-height:0; overflow:auto; padding:5px; display:grid; align-content:start; gap:4px; }
.skill-enchant-skill { width:100%; min-height:48px; padding:5px 7px; display:flex; align-items:center; gap:8px; text-align:left; border:1px solid #444842; background:linear-gradient(180deg,#282d30,#171b1d); color:#d4d1c9; }
.skill-enchant-skill > span { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border:1px solid #615b48; background:#111619; color:#e2c96c; font-weight:700; }
.skill-enchant-skill div { min-width:0; display:grid; gap:2px; }
.skill-enchant-skill strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.72rem; }
.skill-enchant-skill small { color:#969c98; font-size:.6rem; }
.skill-enchant-skill:hover,.skill-enchant-skill.selected { border-color:#9c8648; background:linear-gradient(180deg,#45422f,#242318); color:#fff0b4; }
.skill-enchant-content { overflow:auto; padding:8px; }
.skill-enchant-comparison { display:grid; grid-template-columns:1fr 26px 1fr; align-items:center; gap:6px; }
.skill-enchant-comparison > b { text-align:center; color:#bdab70; }
.skill-enchant-comparison section > small { display:block; margin-bottom:4px; color:#bbb5a8; }
.skill-enchant-card { min-height:74px; padding:8px; display:flex; align-items:center; gap:9px; border:1px solid #4a4941; background:#171a1d; }
.skill-enchant-card > span { width:45px; height:45px; display:grid; place-items:center; flex:0 0 auto; border:1px solid #6f6240; background:#0b1012; color:#efd46e; font-size:1.05rem; }
.skill-enchant-card div { min-width:0; display:grid; gap:5px; }
.skill-enchant-card strong { font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.skill-enchant-card em { color:#d9c578; font-style:normal; }
.skill-enchant-card.modified { background:radial-gradient(circle at 20% 50%,rgba(195,161,68,.13),transparent 55%),#171a1d; }
.skill-enchant-block { margin-top:9px; border:1px solid #46463f; }
.skill-enchant-routes { padding:6px; display:grid; grid-template-columns:repeat(4,minmax(76px,1fr)); gap:5px; }
.skill-enchant-route { min-height:47px; padding:4px; display:grid; gap:2px; border:1px solid #4d4c44; background:linear-gradient(180deg,#292c2e,#17191b); color:#d7d2c6; }
.skill-enchant-route strong { color:#e0c56c; }
.skill-enchant-route small { font-size:.56rem; color:#8f9692; }
.skill-enchant-route:hover,.skill-enchant-route.selected { border-color:#d2b65c; background:linear-gradient(180deg,#4b4226,#272217); box-shadow:inset 0 0 9px rgba(226,193,87,.14); }
.skill-enchant-costs { min-height:68px; padding:7px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.skill-enchant-cost { min-width:0; padding:5px; display:flex; align-items:center; gap:7px; border:1px solid #424640; background:#15191b; }
.skill-enchant-cost > span { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border:1px solid #5b5541; color:#dac36e; background:#0d1112; font-size:.64rem; font-weight:700; }
.skill-enchant-cost div { min-width:0; display:grid; gap:2px; }
.skill-enchant-cost strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.67rem; }
.skill-enchant-cost small { color:#9da39f; font-size:.6rem; }
.skill-enchant-cost.missing,.skill-enchant-summary .missing { color:#ef9c91; border-color:#70403b; }
.skill-enchant-placeholder { padding:16px 10px; color:#8e9692; font-size:.68rem; text-align:center; }
.skill-enchant-summary { margin-top:9px; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.skill-enchant-summary > div { padding:7px 8px; display:flex; justify-content:space-between; gap:8px; border:1px solid #44443d; background:#15191b; font-size:.67rem; }
.skill-enchant-summary span { color:#9da29e; }
.skill-enchant-summary strong { color:#e1d097; font-variant-numeric:tabular-nums; }
.skill-enchant-footer { min-height:50px; padding:8px 10px; display:flex; justify-content:flex-end; gap:8px; border-top:1px solid #4b493f; background:#171a1e; }
.skill-enchant-footer button { min-width:130px; }
@media (max-width:700px) {
  .skill-enchant-dialog { padding:8px; }
  .skill-enchant-frame { width:calc(100vw - 16px); max-height:calc(100vh - 16px); }
  .skill-enchant-layout { grid-template-columns:1fr; overflow:auto; }
  .skill-enchant-selector { max-height:190px; }
  .skill-enchant-content { overflow:visible; }
  .skill-enchant-routes { grid-template-columns:repeat(2,1fr); }
}

/* 0.5.51 grouped skills and protocol-backed utility panels. */
.skill-groups { display:grid; gap:9px; }
.skill-group { border:1px solid rgba(184,166,109,.25); background:rgba(15,18,21,.48); padding:5px; }
.skill-group > h3 { margin:0 0 5px; padding:2px 4px; color:#d8d2c5; font-size:.78rem; font-weight:500; border-bottom:1px solid rgba(184,166,109,.2); }
.skill-group > h3::before { content:"−"; margin-right:8px; color:#d4c47a; }

.community-board-panel { min-height:420px; display:flex; flex-direction:column; gap:8px; }
.community-board-nav { display:flex; flex-wrap:wrap; gap:5px; padding:5px; border:1px solid rgba(184,166,109,.28); background:#14181d; }
.community-board-nav button { padding:4px 9px; font-size:.7rem; }
.community-board-content { flex:1; min-height:360px; padding:10px; overflow:auto; border:1px solid rgba(184,166,109,.28); background:linear-gradient(180deg,#20252b,#101419); color:#ddd8cc; }
.community-board-content .l2-row { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
.community-board-content .l2-cell { display:inline-flex; align-items:center; min-width:0; }

.mailbox-layout,.macro-layout { display:grid; grid-template-columns:minmax(210px,.8fr) minmax(300px,1.3fr); gap:9px; min-height:430px; }
.mail-list-panel,.mail-detail-panel,.macro-list-panel,.macro-detail-panel { min-width:0; border:1px solid rgba(184,166,109,.28); background:#11161a; padding:7px; overflow:auto; }
.mail-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; color:#aaa99f; font-size:.68rem; }
.mail-list,.macro-list { display:grid; gap:4px; }
.mail-entry { display:grid; grid-template-columns:1fr auto; gap:2px 8px; text-align:left; padding:7px; border:1px solid #3d4242; background:#191e21; color:#d7d2c7; }
.mail-entry strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mail-entry span { color:#b8b8ad; font-size:.66rem; }
.mail-entry small { grid-column:1/-1; color:#7f8987; }
.mail-entry.unread { border-color:#8c7946; box-shadow:inset 3px 0 #c7a951; }
.mail-entry.selected,.macro-entry.selected { background:#302d1d; border-color:#b59a49; }
.mail-detail-panel header,.macro-detail-panel header { display:flex; flex-direction:column; gap:3px; padding-bottom:8px; border-bottom:1px solid #424238; }
.mail-content { min-height:180px; margin:9px 0; padding:9px; white-space:normal; background:#0c1114; border:1px solid #343a3a; line-height:1.45; }
.mail-attachments { display:flex; flex-wrap:wrap; gap:5px; padding:7px; border:1px solid #464437; }
.mail-attachments strong { width:100%; }
.mail-attachments span { padding:4px 7px; background:#202522; border:1px solid #55503d; }
.mail-compose,.macro-detail-panel form { display:grid; gap:8px; }
.mail-compose label,.macro-detail-panel label { display:grid; gap:4px; color:#c7c2b5; font-size:.72rem; }
.mail-compose textarea,.macro-detail-panel textarea { resize:vertical; min-height:150px; }
.macro-entry { display:grid; grid-template-columns:34px 1fr; align-items:center; gap:7px; text-align:left; padding:6px; border:1px solid #3d4242; background:#191e21; color:#d7d2c7; }
.macro-entry span { display:grid; place-items:center; width:30px; height:30px; border:1px solid #71613b; color:#e2cb76; background:#101416; }
.macro-commands { margin:10px 0; padding-left:28px; min-height:240px; }
.macro-commands li { padding:4px; border-bottom:1px solid rgba(255,255,255,.05); }
@media (max-width:850px) { .mailbox-layout,.macro-layout { grid-template-columns:1fr; } }

.game-window.utility-window { width:min(780px,calc(100vw - 470px)); }
.game-window.utility-window .game-window-body { overflow-x:hidden; }
@media (max-width:1050px) {
  .game-window.utility-window { width:min(780px,calc(100vw - 32px)); left:16px; right:auto; }
}
@media (max-width:700px) {
  .game-window.utility-window { width:calc(100vw - 12px); left:6px; }
  .community-board-panel { min-height:360px; }
  .community-board-content { min-height:300px; }
}

.mail-compose-attachments { display:grid; gap:6px; padding:7px; border:1px solid #45453d; background:#101519; }
.mail-compose-attachments h3 { margin:0; display:flex; justify-content:space-between; font-size:.72rem; color:#d3cbb8; }
.mail-compose-attachments h3 small { color:#858d8a; font-weight:400; }
.mail-compose-item-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; max-height:180px; overflow:auto; }
.mail-compose-item { display:grid !important; grid-template-columns:auto minmax(0,1fr) 64px; align-items:center; gap:6px !important; padding:5px; border:1px solid #3a4040; background:#181d20; }
.mail-compose-item > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mail-compose-item > span small { color:#8d9591; }
.mail-compose-item input[type="number"] { width:64px; padding:3px; }
@media (max-width:700px) { .mail-compose-item-list { grid-template-columns:1fr; } }

/* 0.5.51 utility UI refinements. */
.pc-points-widget {
  position:absolute;
  right:8px;
  left:auto;
  top:50%;
  transform:translateY(-50%);
  z-index:24;
  min-width:142px;
  height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 9px;
  border:1px solid rgba(202,181,111,.68);
  border-radius:3px;
  background:linear-gradient(180deg,rgba(52,55,60,.96),rgba(17,19,23,.97));
  color:#e8e0c8;
  box-shadow:0 4px 12px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.04);
  pointer-events:none;
}
.pc-points-icon { width:30px;height:30px;display:grid;place-items:center;border:1px solid #8b7744;background:radial-gradient(circle,#645525,#171812 72%);color:#f1d86f;font-weight:800;font-size:.68rem; }
.pc-points-widget div { display:grid;gap:1px; }
.pc-points-widget small { color:#a9aaa3;font-size:.58rem;text-transform:uppercase;letter-spacing:.06em; }
.pc-points-widget strong { color:#f0df9b;font-size:.8rem;font-variant-numeric:tabular-nums; }

.notification-stack {
  position:absolute;
  left:8px;
  bottom:382px;
  z-index:26;
  display:flex;
  align-items:center;
  gap:6px;
}
.game-notification {
  position:relative;
  width:42px;
  height:34px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #b89a4a;
  border-radius:3px;
  background:linear-gradient(180deg,#5c5134,#282315);
  color:#ffe89a;
  box-shadow:0 0 14px rgba(222,182,69,.25);
  animation:notificationPulse 1.8s ease-in-out infinite;
}
.game-notification span { font-size:1.08rem; line-height:1; }
.game-notification b { position:absolute;right:-5px;top:-6px;min-width:17px;height:17px;padding:0 4px;display:grid;place-items:center;border-radius:9px;background:#a33b35;color:#fff;font-size:.55rem; }
.quest-notification { color:#f4d985; }
.class-notification { font-family:Georgia,serif;font-size:1.2rem;font-weight:800;color:#ffe271; }
@keyframes notificationPulse { 0%,100%{filter:brightness(1)} 50%{filter:brightness(1.35)} }


.community-board-panel {
  min-height:470px;
  padding:8px;
  border:1px solid rgba(198,176,107,.36);
  background:radial-gradient(circle at 50% 0,rgba(93,81,47,.16),transparent 34%),linear-gradient(180deg,#181a1d,#0d0f12);
}
.community-board-nav { justify-content:center;padding:7px;border-color:#5a5138;background:linear-gradient(180deg,#25282c,#15171a); }
.community-board-nav button {
  min-width:76px;
  padding:5px 10px;
  border:1px solid #716342;
  border-radius:2px;
  background:linear-gradient(180deg,#41464d,#202328);
  color:#e8dfc7;
  font-size:.68rem;
}
.community-board-content {
  min-height:410px;
  padding:16px 20px;
  border-color:#504936;
  background:linear-gradient(180deg,rgba(34,36,39,.98),rgba(14,16,19,.99));
  color:#ded8ca;
  font-family:Tahoma,Arial,sans-serif;
  font-size:.76rem;
  line-height:1.45;
}
.community-board-content .l2-center { text-align:center; }
.community-board-content .l2-row { justify-content:center;gap:5px;margin:4px 0; }
.community-board-content .l2-cell { flex:0 1 auto;justify-content:center; }
.community-board-content .l2-button {
  min-width:92px;
  min-height:25px;
  margin:2px;
  padding:4px 10px;
  border:1px solid #6e654e;
  border-radius:2px;
  background:linear-gradient(180deg,#45494f,#222428);
  color:#ece5d3;
  text-decoration:none;
}
.community-board-content .l2-link {
  margin:3px 8px;
  padding:1px 2px;
  border:0;
  background:transparent;
  color:#8fc4ff;
  text-decoration:underline;
}
.community-board-content .l2-unsupported { display:none; }
.community-board-content h3 { margin:10px 0 5px;color:#e7d38a;font-size:.84rem;text-align:center; }

.mail-recipient-row { display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:5px; }
.mail-recipient-row button { padding:0;min-width:36px; }

.recipient-dialog {
  position:absolute;inset:0;z-index:72;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.35);
}
.recipient-dialog-frame {
  width:min(520px,calc(100vw - 24px));max-height:min(620px,calc(100vh - 24px));display:flex;flex-direction:column;
  border:1px solid rgba(203,182,112,.75);border-radius:4px;background:linear-gradient(180deg,#30333a,#101318);box-shadow:0 12px 32px rgba(0,0,0,.75);overflow:hidden;color:#e6dfcc;
}
.recipient-dialog-frame>header { display:flex;justify-content:space-between;align-items:flex-start;padding:9px 11px;border-bottom:1px solid #544c37;background:linear-gradient(180deg,#494c52,#24262b); }
.recipient-dialog-frame>header div { display:grid;gap:2px; }
.recipient-dialog-frame>header small { color:#aaa99f;font-size:.62rem; }
.recipient-dialog-tabs { display:flex;gap:3px;padding:6px;border-bottom:1px solid #454137;background:#191c20; }
.recipient-dialog-tabs button { flex:1;padding:5px;border-radius:2px;background:#282c31;color:#d6d1c6;border-color:#545447; }
.recipient-dialog-tabs button.active { color:#ffe69b;border-color:#a98d42;background:#42391f; }
.recipient-dialog-list { min-height:260px;max-height:430px;overflow:auto;padding:7px;display:grid;align-content:start;gap:4px;background:#0d1114; }
.recipient-entry { display:flex;justify-content:space-between;align-items:center;padding:7px 9px;text-align:left;border:1px solid #3f4546;background:#191e21;color:#ddd8cc; }
.recipient-entry small { color:#8e9895; }
.recipient-entry.selected { border-color:#b79b4c;background:#36301e;color:#fff0b3; }
.recipient-dialog-frame>footer { display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:5px;padding:8px;border-top:1px solid #4c4738;background:#181b1f; }

.macro-icon-picker { margin:0;padding:7px;border:1px solid #49483f; }
.macro-icon-picker legend { padding:0 5px;color:#c7c2b5;font-size:.7rem; }
.macro-icon-picker>div { display:grid;grid-template-columns:repeat(8,1fr);gap:4px; }
.macro-icon-picker button { min-width:0;height:34px;padding:0;border:1px solid #4d514d;background:#151a1d;color:#bcd7e5;font-size:1rem; }
.macro-icon-picker button.selected { border-color:#d2b35b;background:#4a4024;color:#fff0a4;box-shadow:inset 0 0 8px rgba(239,201,83,.2); }
.macro-preview-icon { display:inline-grid;place-items:center;width:28px;height:28px;margin-right:7px;border:1px solid #75633b;background:#111619;color:#edd577;vertical-align:middle; }

.petition-panel { display:grid;gap:10px;min-height:390px; }
.petition-info,.petition-status { padding:10px;border:1px solid #4a493f;background:#15191c;color:#cfcabc; }
.petition-info strong { color:#ead98f; }
.petition-info p { margin:5px 0 0;line-height:1.45; }
.petition-status { border-color:#665a35;background:#292419;color:#e7d28b; }
.petition-panel form { display:grid;gap:9px; }
.petition-panel label { display:grid;gap:4px;color:#c7c2b5;font-size:.72rem; }
.petition-panel textarea { min-height:180px;resize:vertical; }
.petition-panel label small { text-align:right;color:#8f9693; }

@media(max-width:700px){
  .pc-points-widget{right:5px;left:auto;top:44%;min-width:122px}
  .notification-stack{left:6px;bottom:286px}
  .recipient-dialog-frame>footer{grid-template-columns:1fr 1fr}.recipient-dialog-frame>footer input{grid-column:1/-1}
  .macro-icon-picker>div{grid-template-columns:repeat(6,1fr)}
}


/* 0.5.53 Community Board table fidelity and interactive effect cancellation. */
.buff-icon { cursor: pointer; }
.buff-icon[disabled] { opacity: .52; }
.community-board-content .l2-table {
  width: auto;
  max-width: 100%;
  margin: 5px auto;
  border-collapse: separate;
  border-spacing: 5px 3px;
  table-layout: auto;
}
.community-board-content .l2-table .l2-row { display: table-row; }
.community-board-content .l2-table .l2-cell {
  display: table-cell;
  padding: 2px 5px;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.35;
}
.community-board-content .l2-table th.l2-cell { color: #d9c878; font-weight: 600; }
.community-state {
  display: inline-block;
  width: 54px;
  height: 9px;
  margin: 0 3px;
  border: 1px solid #4c4f4d;
  border-radius: 2px;
  vertical-align: middle;
  box-shadow: inset 0 0 3px rgba(0,0,0,.8);
}
.community-state.off { background: linear-gradient(180deg,#b84637,#6d211a); }
.community-state.on { background: linear-gradient(180deg,#6fba4b,#315f27); }
.community-board-content .l2-edit { min-width: 130px; min-height: 25px; }


/* 0.5.54 session isolation and compact utility refinements. */
.buff-entry:not(.debuff) { cursor:pointer; }
.buff-entry:not(.debuff):hover { background:rgba(100,88,50,.24); }
.buff-entry.cancelling { opacity:.48; filter:saturate(.4); }

/* PC Points are attached directly to the character HUD. */
.hud { overflow:visible; }
.hud .pc-points-widget {
  position:absolute;
  left:calc(100% + 7px);
  right:auto;
  top:0;
  transform:none;
  min-width:118px;
  height:42px;
}

/* Community Board uses the available viewport instead of a nested scrolling window. */
.game-window.utility-window.community-window {
  top:6px;
  bottom:auto;
  height:calc(100vh - 12px);
  max-height:none;
}
.game-window.utility-window.community-window .game-window-frame { height:100%; max-height:none; }
.game-window.utility-window.community-window .game-window-body { min-height:0; max-height:none; overflow:hidden; padding:5px; }
.community-window .community-board-panel { min-height:0; height:100%; padding:5px; gap:5px; }
.community-window .community-board-nav { flex:0 0 auto; padding:4px; }
.community-window .community-board-nav button { padding:4px 8px; }
.community-window .community-board-content {
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  padding:7px 10px;
  font-size:.68rem;
  line-height:1.2;
}
.community-window .community-board-content .l2-table { margin:2px auto; border-spacing:3px 1px; }
.community-window .community-board-content .l2-table .l2-cell { padding:1px 3px; line-height:1.2; }
.community-window .community-board-content .l2-button { min-height:22px; padding:2px 7px; margin:1px; }
.community-window .community-board-content h3 { margin:4px 0 2px; }

/* Keep the trash immediately above the Adena/EXP footer. */
.inventory-summary { margin-top:0; }
.inventory-drop-dock { margin-top:auto; padding-top:6px; padding-bottom:4px; }

@media(max-width:700px) {
  .hud .pc-points-widget { left:auto; right:0; top:calc(100% + 5px); }
  .game-window.utility-window.community-window { top:auto; bottom:105px; height:calc(100vh - 111px); }
  .community-window .community-board-content { overflow:auto; }
}


/* 0.5.55 wider, shorter Community Board. */
.game-window.utility-window.community-window {
  width:min(1120px,calc(100vw - 24px));
  height:min(590px,calc(100vh - 72px));
  max-height:min(590px,calc(100vh - 72px));
  left:50%;
  right:auto;
  top:36px;
  bottom:auto;
  transform:translateX(-50%);
}
.game-window.utility-window.community-window .game-window-frame { height:100%; }
.community-window .community-board-content { overflow:hidden; }
@media(max-width:700px) {
  .game-window.utility-window.community-window {
    width:calc(100vw - 8px);
    height:calc(100vh - 112px);
    max-height:calc(100vh - 112px);
    left:4px;
    top:auto;
    bottom:106px;
    transform:none;
  }
  .community-window .community-board-content { overflow:auto; }
}

/* 0.5.56 persistent top effect strip and compact wide Community Board. */
.combat-dock { top:4px; }
.combat-dock .buff-strip { order:-1; }
.game-window.utility-window.community-window {
  width:min(1240px,calc(100vw - 16px));
  height:min(520px,calc(100vh - 88px));
  max-height:min(520px,calc(100vh - 88px));
  top:28px;
}
.community-window .community-board-content { font-size:.66rem; }
.community-state.on { background:linear-gradient(180deg,#56a34b,#23631f)!important; box-shadow:0 0 5px rgba(86,184,73,.55); }
.community-state.off { background:linear-gradient(180deg,#b34a3e,#6b211b)!important; }
.buff-entry.cancelling,.buff-icon:disabled { opacity:.55; filter:brightness(1.35); }
@media(max-width:700px) {
  .game-window.utility-window.community-window { width:calc(100vw - 8px); height:calc(100vh - 112px); max-height:calc(100vh - 112px); top:auto; }
}

/* 0.5.57: fit the complete Community Board into the window. */
.game-window.utility-window.community-window {
  width:calc(100vw - 8px);
  max-width:1360px;
  height:min(560px,calc(100vh - 48px));
  max-height:min(560px,calc(100vh - 48px));
  top:20px;
}
.community-board-scaler { width:100%; transform-origin:top left; }
.community-board-scaler.scaled {
  transform:scale(var(--community-scale));
  width:calc(100% / var(--community-scale));
}
.community-window .community-board-content { overflow:hidden; }
.community-window .community-board-content .l2-table { max-width:100%; }
.community-window .community-board-content .l2-multiedit { display:block; max-width:100%; resize:none; }
.community-state { min-width:58px; padding:2px 7px; color:#f4efe4; font-size:.62rem; text-align:center; border:1px solid rgba(255,255,255,.18); }
.community-state.on { background:linear-gradient(180deg,#56a34b,#23631f)!important; }
.community-state.off { background:linear-gradient(180deg,#b34a3e,#6b211b)!important; }

/* Retail-like class master tutorial window. */
.npc-dialog.tutorial-dialog {
  width:min(340px,calc(100vw - 20px));
  min-height:360px;
  max-height:min(520px,calc(100vh - 50px));
}
.npc-dialog.tutorial-dialog .npc-dialog-content {
  min-height:300px;
  padding:10px 12px;
  background:linear-gradient(180deg,rgba(30,32,35,.96),rgba(12,15,18,.98));
  font-size:.86rem;
  line-height:1.55;
}
.npc-dialog.tutorial-dialog .l2-link {
  display:block;
  width:max-content;
  max-width:100%;
  margin:3px 0;
  padding:0;
  border:0;
  background:transparent;
  color:#70adff;
  text-align:left;
  text-decoration:underline;
}


/* 0.5.57: the player effect strip is independent from target selection. */
.combat-dock { top:54px; }
.combat-dock .buff-strip {
  position:fixed;
  left:50%;
  top:3px;
  transform:translateX(-50%);
  z-index:31;
  width:max-content;
  max-width:calc(100vw - 12px);
  order:initial;
}
.combat-dock .buff-icons { max-width:min(920px,calc(100vw - 70px)); }
@media(max-width:700px) {
  .combat-dock { top:52px; }
  .combat-dock .buff-strip { left:4px; right:4px; transform:none; width:auto; }
  .combat-dock .buff-icons { max-width:calc(100vw - 64px); }
}


/* 0.5.61: active effects are the first row; the target panel is always below them. */
.combat-dock {
  top:3px;
  width:min(1000px,calc(100vw - 12px));
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.combat-dock .buff-strip {
  position:relative;
  left:auto;
  right:auto;
  top:auto;
  transform:none;
  order:0;
  width:max-content;
  max-width:100%;
}
.combat-dock .buff-icons {
  max-width:min(920px,calc(100vw - 70px));
}
.combat-dock .target-panel {
  order:1;
  width:min(430px,100%);
}
@media(max-width:700px) {
  .combat-dock { top:3px; width:calc(100vw - 8px); }
  .combat-dock .buff-strip { left:auto; right:auto; width:max-content; max-width:100%; }
  .combat-dock .buff-icons { max-width:calc(100vw - 64px); }
  .combat-dock .target-panel { width:min(430px,100%); }
}


/* 0.5.65: radar/minimap built from the original Lineage II client textures. */
.minimap {
  position: absolute;
  top: 10px;
  right: 58px;
  z-index: 18;
  width: 202px;
  padding: 4px;
  border: 1px solid rgba(194, 178, 126, .65);
  border-radius: 50% 50% 8px 8px;
  background: linear-gradient(180deg, rgba(22, 26, 25, .95), rgba(9, 13, 14, .92));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .48), inset 0 0 0 1px rgba(255,255,255,.04);
  pointer-events: auto;
}
.minimap-heading {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 18px;
  top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e7ddbf;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.minimap-heading button {
  width: 21px;
  height: 21px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border-color: rgba(203, 187, 137, .55);
  background: rgba(19, 25, 25, .78);
  color: #e8dfc3;
  font-size: .72rem;
  line-height: 1;
  pointer-events: auto;
}
#minimap-canvas {
  width: 196px;
  height: 196px;
  display: block;
  border-radius: 50%;
  background: #1a2827;
}
.minimap-coords {
  min-height: 15px;
  padding: 2px 5px 1px;
  color: #b8b29f;
  font-size: .55rem;
  line-height: 1.25;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .minimap { width: 158px; right: 8px; top: 134px; }
  #minimap-canvas { width: 152px; height: 152px; }
  .minimap-heading { left: 18px; right: 14px; }
}
@media (max-width: 620px), (max-height: 620px) {
  .minimap { display: none !important; }
}

/* 0.5.66: original High Five skill and abnormal-effect icons. */
.client-skill-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
  user-select: none;
}
.buff-icon .buff-glyph {
  overflow: hidden;
  background: rgba(4, 6, 9, .82);
}
.buff-icon .client-skill-icon { object-fit: cover; }
.buff-icon .buff-level,
.buff-icon .buff-clock { z-index: 2; }
.skill-entry > .skill-icon-frame {
  width: 34px;
  height: 34px;
  place-self: center;
  overflow: hidden;
  border: 1px solid rgba(221, 205, 148, .38);
  background: rgba(5, 7, 10, .88);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, .7);
}
.skill-entry > .skill-icon-frame .client-skill-icon { object-fit: cover; }
.skill-glyph {
  overflow: hidden;
  padding: 2px;
}
.skill-glyph .client-skill-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
}

/* 0.5.75 */
body:not(.game-active) #world { visibility:hidden; }
body:not(.game-active) { background:#0b0f12; }
#special-map-select { font-size:.78rem; }

/* 0.5.76 original High Five item icons and texture-derived entity portraits. */
.inventory-client-icon,.paperdoll-item-icon,.multisell-client-icon { display:block; width:100%; height:100%; object-fit:contain; image-rendering:auto; }
.inventory-glyph { overflow:hidden; }
.inventory-client-icon { width:40px; height:40px; filter:drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.inventory-client-icon.fallback,.paperdoll-item-icon.fallback,.multisell-client-icon.fallback { display:grid;place-items:center;color:#f0e5c6;font-weight:700; }
.paperdoll-item-icon { width:34px; height:34px; filter:drop-shadow(0 1px 2px #000); }
.paperdoll-slot > span.paperdoll-item-icon { font-size:11px; }
.multisell-client-icon { width:26px; height:26px; }
.character-avatar canvas,.character-avatar img { width:100%;height:100%;object-fit:cover; }

/* 0.5.77 client action icons, character faces and clearer entity markers. */
.selection-card.character .selection-card-icon { overflow:hidden; }
.selection-card.character .selection-card-icon img { display:block; width:100%; height:100%; object-fit:cover; image-rendering:auto; }
.action-entry { grid-template-rows:42px auto; }
.action-icon-frame { display:grid; place-items:center; width:38px; height:38px; border:1px solid rgba(211,194,132,.48); background:#11171c; box-shadow:inset 0 0 8px rgba(0,0,0,.75); overflow:hidden; }
.action-client-icon { display:block; width:100%; height:100%; object-fit:contain; image-rendering:auto; }
.action-fallback-glyph { font-size:.78rem; color:#d9eef8; font-weight:800; }

/* 0.5.78: robust retail action icons and clearer entity portraits */
.action-icon-frame { position:relative; overflow:hidden; }
.action-icon-frame .action-fallback-glyph { position:absolute; inset:0; display:grid; place-items:center; }
.action-client-icon { position:relative; z-index:1; background:rgba(7,11,13,.9); }
.selection-card.character .selection-card-icon { overflow:hidden; background:linear-gradient(145deg,#22343d,#111a20); }
.selection-card.character .selection-card-icon img { min-width:100%; min-height:100%; object-position:center 18%; filter:contrast(1.08) saturate(1.08); }
.character-avatar { overflow:hidden; }
.character-avatar img { width:100%; height:100%; object-fit:cover; object-position:center 18%; }

/* 0.5.86 floating focus + Nevit HUD */
.nevit-widget { position:absolute; left:0; top:calc(100% + 5px); min-width:145px; display:flex; gap:7px; align-items:center; padding:5px 8px; border:1px solid rgba(126,164,214,.55); background:linear-gradient(180deg,rgba(39,55,82,.95),rgba(13,18,28,.96)); box-shadow:0 3px 8px rgba(0,0,0,.5); }
.nevit-icon { width:30px;height:30px;display:grid;place-items:center;border:1px solid #6d8fc1;background:radial-gradient(circle,#6b85bb,#182238 72%);color:#edf5ff;font-size:1.2rem; }
.nevit-widget div {display:grid;gap:1px}.nevit-widget small{color:#b8c9e6;font-size:.58rem;text-transform:uppercase}.nevit-widget strong{color:#e7f0ff;font-size:.76rem}
.hud .nevit-widget:not(.hidden) + .pc-points-widget { top:calc(100% + 48px); }
#minimap-toggle.active { color:#f0df9b; border-color:#9c8750; }


/* 0.5.89: Nevit + PC Points form one vertical stack beside the HUD. */
.hud .nevit-widget,
.hud .pc-points-widget {
  left:calc(100% + 7px);
  right:auto;
  top:0;
  transform:none;
  min-width:145px;
}
.hud .nevit-widget:not(.hidden) + .pc-points-widget { top:52px; }
@media(max-width:700px) {
  .hud .nevit-widget,
  .hud .pc-points-widget { left:calc(100% + 7px); right:auto; }
  .hud .nevit-widget:not(.hidden) + .pc-points-widget { top:52px; }
}


/* 0.5.96 – original High Five audio mixer */
.audio-settings-panel{display:grid;gap:14px;max-width:620px;margin:0 auto;padding:4px}
.audio-setting-card{padding:15px 16px;border:1px solid rgba(220,195,128,.35);background:linear-gradient(180deg,rgba(36,32,27,.96),rgba(18,17,15,.96));box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)}
.audio-setting-card>header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;color:#ead7a2}
.audio-switch{display:flex;align-items:center;gap:8px;color:#d8d1c3;font-size:12px;cursor:pointer}.audio-switch input{accent-color:#c7a85b}
.audio-volume-row{display:grid;grid-template-columns:70px 1fr 52px;align-items:center;gap:10px;font-size:12px;color:#aaa39a}.audio-volume-row input[type=range]{width:100%;accent-color:#c7a85b}.audio-volume-row output{text-align:right;color:#e4dac3;font-variant-numeric:tabular-nums}
.audio-now-playing{display:flex;justify-content:space-between;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:#918b81}.audio-now-playing strong{max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c9b989}
.audio-assets-note{margin:0;padding:9px 12px;border-left:2px solid #927b47;background:rgba(0,0,0,.18);color:#969086;font-size:11px;line-height:1.5}
@media(max-width:700px){.audio-volume-row{grid-template-columns:62px 1fr 48px}.audio-settings-panel{padding:0}}


/* ===== 0.5.109 clean Freya login / EULA ===== */
body { background:#030000; }
#world { background:#030000; }
.login-panel {
  width:100vw; height:100vh; max-height:none; padding:0; overflow:hidden;
  border:0; border-radius:0; background:#100000;
  box-shadow:none; isolation:isolate;
}
.freya-login-scene { position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(176,28,10,.62) 0 18%, transparent 52%),
    radial-gradient(ellipse at 77% 31%, rgba(166,0,0,.25), transparent 30%),
    repeating-linear-gradient(92deg, transparent 0 126px, rgba(255,44,28,.065) 127px 129px, transparent 130px 242px),
    linear-gradient(180deg,#230307 0%,#160104 35%,#3a0201 70%,#100000 100%);
}
.freya-login-scene::before { content:""; position:absolute; inset:0; opacity:.72; mix-blend-mode:screen;
  background:
    radial-gradient(circle at 16% 69%, rgba(255,86,26,.34), transparent 15%),
    radial-gradient(ellipse at 52% 45%, rgba(185,5,0,.22), transparent 34%),
    linear-gradient(111deg, transparent 0 17%, rgba(255,45,22,.08) 17.1% 17.3%, transparent 17.4% 100%);
}
.freya-login-moon { position:absolute; right:5.8vw; top:14vh; width:min(21vw,290px); aspect-ratio:1; border-radius:50%;
  background:
    radial-gradient(circle at 46% 48%, transparent 0 27%, rgba(35,0,0,.32) 28% 31%, transparent 32%),
    radial-gradient(circle at 55% 43%, rgba(90,0,0,.5) 0 12%, transparent 13%),
    radial-gradient(circle at 40% 62%, rgba(80,0,0,.35) 0 8%, transparent 9%),
    radial-gradient(circle at 48% 48%, #a40a07 0 54%, #e42114 71%, rgba(255,75,38,.9) 77%, rgba(255,43,23,.18) 81%, transparent 84%);
  filter:drop-shadow(0 0 26px rgba(255,33,12,.85)); opacity:.95;
}
.freya-login-tree { position:absolute; left:5vw; bottom:8vh; width:min(34vw,500px); height:48vh; filter:drop-shadow(0 0 16px rgba(205,35,7,.5)); }
.freya-login-tree::before { content:""; position:absolute; left:34%; bottom:-4%; width:7%; height:63%; background:linear-gradient(90deg,#130604,#4b1307 45%,#1c0805); transform:rotate(7deg); transform-origin:bottom; border-radius:60% 35% 18% 22%; }
.freya-login-tree::after { content:""; position:absolute; left:0; right:10%; bottom:26%; height:52%;
  background:
    radial-gradient(ellipse at 18% 63%,#7b1508 0 10%,transparent 11%),
    radial-gradient(ellipse at 35% 54%,#9d1f0c 0 14%,transparent 15%),
    radial-gradient(ellipse at 53% 42%,#6d1008 0 15%,transparent 16%),
    radial-gradient(ellipse at 64% 65%,#9a230c 0 13%,transparent 14%),
    radial-gradient(ellipse at 42% 77%,#c43d12 0 12%,transparent 13%),
    radial-gradient(ellipse at 74% 48%,#731108 0 11%,transparent 12%),
    radial-gradient(ellipse at 28% 33%,#5e0d08 0 11%,transparent 12%);
  filter:blur(.2px);
}
.freya-login-tree i { position:absolute; left:36%; bottom:31%; width:4%; height:34%; background:#2c0a06; transform-origin:bottom; border-radius:99px; opacity:.8; }
.freya-login-tree i:nth-child(1){transform:rotate(-42deg);height:28%}.freya-login-tree i:nth-child(2){transform:rotate(-25deg);height:36%}.freya-login-tree i:nth-child(3){transform:rotate(24deg);height:40%}.freya-login-tree i:nth-child(4){transform:rotate(47deg);height:30%}.freya-login-tree i:nth-child(5){transform:rotate(68deg);height:22%}
.freya-chronicle-mark { position:absolute; left:3vw; top:2.7vh; color:#fff; transform:skew(-8deg); text-shadow:0 0 12px rgba(255,255,255,.35),0 2px 2px #000; }
.freya-chronicle-mark b { display:block; font-family:Georgia,serif; font-size:clamp(2rem,5vw,4.8rem); letter-spacing:.04em; font-style:italic; }
.freya-chronicle-mark span { display:block; margin-top:-.75em; margin-left:3.5em; font:700 clamp(.42rem,.7vw,.72rem)/1 Georgia,serif; letter-spacing:.18em; }
.freya-lineage-logo { position:absolute; left:50%; top:11vh; transform:translateX(-50%); width:min(370px,42vw); color:#f6f7fb; text-align:center; font-family:Georgia,'Times New Roman',serif; text-shadow:0 0 13px rgba(255,255,255,.28),0 2px 2px #000; }
.freya-lineage-logo span { display:block; font-size:clamp(2rem,4vw,4.2rem); letter-spacing:.18em; }
.freya-lineage-logo b { position:absolute; left:50%; top:-.5em; transform:translateX(-50%); font-size:clamp(6rem,13vw,13rem); font-weight:300; opacity:.96; line-height:1; }
.freya-lineage-logo small { display:block; margin-top:.15em; font-size:clamp(.42rem,.62vw,.7rem); letter-spacing:.16em; }
.login-panel .panel-title-row { position:absolute; inset:12px 14px auto 14px; z-index:8; pointer-events:none; }
.login-panel .panel-title-row h1 { position:absolute; opacity:0; width:1px; height:1px; overflow:hidden; }
.login-panel .version-badge { margin-left:auto; background:rgba(0,0,0,.32); color:#e7dfcc; border:1px solid rgba(212,191,132,.32); }
#transport-warning { position:absolute; left:50%; bottom:80px; transform:translateX(-50%); width:min(520px,calc(100% - 32px)); z-index:9; }
.lineage-login-credentials { position:absolute; left:50%; top:55%; width:min(258px,32vw); transform:translate(-50%,-50%); z-index:5; padding:16px 18px 12px; border:1px solid #7b6b50; border-radius:4px; background:linear-gradient(180deg,rgba(56,48,40,.96),rgba(25,21,19,.97)); box-shadow:0 12px 26px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.06); }
.lineage-login-credentials::before { content:""; position:absolute; inset:3px; border:1px solid rgba(185,160,103,.28); pointer-events:none; }
.lineage-login-credentials label { grid-template-columns:58px 1fr; align-items:center; gap:7px; margin:4px 0; color:#ece8dc; font:12px Arial,sans-serif; }
.lineage-login-credentials input { height:23px; padding:2px 6px; border:1px solid #242421; border-radius:0; background:#202322; box-shadow:inset 0 0 0 1px rgba(174,163,130,.16); color:#eee; font:12px Arial,sans-serif; }
.lineage-login-credentials .login-actions { grid-template-columns:92px; justify-content:center; gap:10px; margin-top:12px; }
.lineage-login-credentials .login-actions button { width:92px; min-height:24px; padding:2px 7px; border:1px solid #73664e; border-radius:1px; background:linear-gradient(#686354,#39352d); color:#eee9dc; font:12px Arial,sans-serif; text-shadow:0 1px #000; }
.login-selection { position:absolute; left:50%; top:57%; transform:translate(-50%,-50%); width:min(490px,calc(100% - 44px)); min-height:250px; padding:14px; z-index:6; border:1px solid rgba(190,165,106,.55); border-radius:3px; background:linear-gradient(180deg,rgba(57,49,42,.96),rgba(18,15,14,.97)); box-shadow:0 16px 34px rgba(0,0,0,.64),inset 0 1px rgba(255,255,255,.05); }
.selection-heading h2 { color:#eee6d2; font-size:1rem; }.selection-heading p{color:#c6bda8}.selection-options{max-height:310px}.selection-card{border-color:rgba(197,173,111,.42);background:linear-gradient(180deg,rgba(78,66,53,.94),rgba(31,26,22,.97))}.selection-card:hover{border-color:#d8bf77;background:linear-gradient(180deg,rgba(94,79,61,.97),rgba(39,32,26,.98))}.selection-card-icon{background:radial-gradient(circle at 35% 30%,#756243,#2b2119 72%);border-color:rgba(205,186,132,.44)}.selection-card-text strong{color:#f1e7cd}.selection-card-text small{color:#beb39a}.selection-card-marker{color:#ddc57d}.selection-actions button{border:1px solid rgba(198,172,104,.44);border-radius:2px;background:linear-gradient(#655b49,#302a23);color:#eee6d1}
.eula-modal { position:fixed; inset:0; display:grid; place-items:center; z-index:120; background:rgba(0,0,0,.64); }
.eula-frame { width:min(600px,calc(100vw - 20px)); height:min(510px,calc(100vh - 20px)); display:grid; grid-template-rows:auto minmax(0,1fr) auto; border:1px solid #756445; background:linear-gradient(180deg,rgba(43,36,30,.98),rgba(11,9,8,.99)); box-shadow:0 18px 48px rgba(0,0,0,.78),inset 0 0 0 1px rgba(255,255,255,.04); color:#eee8dc; }
.eula-titlebar { padding:8px 11px; border-bottom:1px solid rgba(190,163,100,.32); background:linear-gradient(#51473b,#28221e); color:#f2ead8; font:13px Arial,sans-serif; text-shadow:0 1px #000; }
.eula-body { min-height:0; padding:8px 10px; overflow:hidden; background:repeating-linear-gradient(180deg,rgba(75,61,45,.2) 0 22px,rgba(29,23,18,.14) 22px 44px),rgba(10,9,8,.84); }
.eula-copy { height:100%; overflow-y:auto; padding:3px 10px 20px 1px; color:#f0ece3; line-height:1.34; font:12px Arial,sans-serif; scrollbar-color:#75664e #201b17; }.eula-copy p{margin:0 0 11px}.eula-copy h3{margin:16px 0 5px;color:#fff3d3;font:700 12px Arial,sans-serif}.eula-copy hr{border:0;border-top:1px solid rgba(196,169,102,.3);margin:14px 0}.eula-copy a{color:#d8e1ef}
.eula-actions { display:flex; justify-content:center; gap:14px; padding:8px 12px 10px; }.eula-actions button{min-width:82px;padding:4px 12px;border:1px solid #73664e;border-radius:1px;background:linear-gradient(#686354,#39352d);color:#eee9dc;font:12px Arial,sans-serif;text-shadow:0 1px #000}
@media(max-width:720px){.freya-login-tree{left:-7vw;width:58vw}.freya-login-moon{right:-4vw;width:34vw}.freya-lineage-logo{top:9vh;width:58vw}.lineage-login-credentials{width:min(280px,74vw);top:58%}.login-selection{top:60%;width:min(94vw,490px)}.selection-step{display:none}.eula-frame{height:calc(100vh - 16px)}}

/* ===== 0.5.109 authentic Freya lobby assets ===== */
.freya-login-scene {
  background:#120000;
}
.freya-login-scene::before {
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:radial-gradient(ellipse at 50% 80%,transparent 0 35%,rgba(0,0,0,.25) 76%,rgba(0,0,0,.58) 100%);
}
.freya-client-sky {
  position:absolute; inset:-4%; z-index:0;
  background:#180000 url('/ui/freya/BloodLobbySky.png?v=0.5.109') center 64% / cover no-repeat;
  filter:saturate(1.22) brightness(.92) contrast(1.08);
  transform:scale(1.06);
}
.freya-client-moon {
  position:absolute; z-index:2; right:5.8vw; top:8.8vh;
  width:clamp(180px,28vw,355px); height:auto;
  opacity:.98; filter:saturate(1.18) brightness(1.05) drop-shadow(0 0 24px rgba(239,34,8,.42));
}
.freya-client-tree {
  position:absolute; z-index:3; left:-4vw; bottom:7vh;
  width:clamp(410px,54vw,760px); height:clamp(390px,67vh,690px);
  transform-origin:left bottom;
}
.freya-tree-glow {
  position:absolute; left:5%; bottom:0; width:76%; height:auto;
  mix-blend-mode:screen; opacity:.82; filter:saturate(1.5) brightness(1.22) contrast(1.2);
  transform:scaleX(1.12) scaleY(1.2);
}
.freya-tree-trunk {
  position:absolute; left:31%; bottom:-7%; width:19%; height:63%;
  background:url('/ui/freya/7thsbark01.png?v=0.5.109') center / 175px 175px repeat;
  clip-path:polygon(32% 100%,48% 42%,26% 13%,41% 4%,59% 34%,76% 0,84% 8%,66% 47%,74% 100%);
  filter:brightness(.48) saturate(1.28) sepia(.22) drop-shadow(10px 7px 8px rgba(0,0,0,.56));
  opacity:.95;
}
.freya-tree-main {
  position:absolute; left:-1%; top:-7%; width:75%; height:auto;
  filter:saturate(1.45) brightness(.74) drop-shadow(4px 9px 6px rgba(0,0,0,.62));
  transform:rotate(-7deg) scale(1.08);
}
.freya-tree-branch {
  position:absolute; left:19%; top:5%; width:71%; height:auto;
  filter:saturate(1.45) brightness(.7) drop-shadow(4px 7px 5px rgba(0,0,0,.55));
  transform:rotate(-7deg);
}
.freya-tree-leaf21 {
  position:absolute; left:5%; top:18%; width:39%; height:auto;
  filter:hue-rotate(-17deg) saturate(1.65) brightness(.72); transform:rotate(9deg) scale(1.18);
}
.freya-tree-leaf23 {
  position:absolute; left:45%; top:24%; width:38%; height:auto;
  filter:hue-rotate(-14deg) saturate(1.7) brightness(.66); transform:rotate(-12deg) scale(1.38);
}
.freya-client-ground {
  position:absolute; z-index:2; left:-3%; right:-3%; bottom:-6%; height:34%;
  background:
    linear-gradient(180deg,rgba(31,1,0,0) 0%,rgba(63,8,2,.68) 26%,rgba(46,4,1,.88) 53%,rgba(20,1,0,.96) 100%),
    url('/ui/freya/tbl04.png?v=0.5.109') center 30% / 310px 310px repeat;
  filter:saturate(1.35) brightness(.72);
  transform:perspective(700px) rotateX(61deg) scale(1.23); transform-origin:center bottom;
  opacity:.9;
}
.freya-client-rain {
  position:absolute; z-index:4; inset:-10% 0 0; opacity:.18; pointer-events:none;
  background:repeating-linear-gradient(98deg,transparent 0 72px,rgba(255,70,48,.34) 73px,transparent 74px 124px);
  background-size:220px 180px;
  animation:freya-rain-slide 5.5s linear infinite;
  mask-image:linear-gradient(180deg,#000,transparent 92%);
}
@keyframes freya-rain-slide { from{background-position:0 -180px} to{background-position:-75px 180px} }
.freya-chronicle-mark,.freya-lineage-logo { z-index:6; }
.eula-copy {
  display:block; margin:0; width:100%; height:100%; overflow:auto;
  white-space:pre-wrap; overflow-wrap:anywhere; padding:3px 10px 20px 1px;
  color:#f0ece3; line-height:1.34; font:12px Arial,sans-serif;
  scrollbar-color:#75664e #201b17;
}
.eula-copy::selection { background:#765b2e; color:#fff; }
@media(max-width:720px){
  .freya-client-tree{left:-15vw;bottom:8vh;width:78vw;height:58vh}
  .freya-client-moon{right:-2vw;top:10vh;width:38vw}
}

/* Memorium custom login background – supplied artwork. */
.freya-login-scene {
  background: #100000 url('/ui/freya/memorium-login-background.png?v=0.5.109') center center / contain no-repeat !important;
}
.freya-login-scene::before {
  background: none !important;
}
.freya-client-sky,
.freya-client-moon,
.freya-client-tree,
.freya-client-ground,
.freya-client-rain,
.freya-chronicle-mark,
.freya-lineage-logo {
  display: none !important;
}
