/* EvaWeb theme — ported from the "EvaWeb Design" pack (style.css, inc/header.php, inc/menu-top.php,
   index/home.php). Classic light-grey MU look: 980px frame, banner header, gradient menu with
   etched separators, grey table heads, Courier body text and gradient buttons.
   Loaded last so it wins over the shared module stylesheets. */

:root {
	--ew-width: 980px;
	--ew-text: #666666;          /* body text and links (style.css: A:link) */
	--ew-ink: #000000;           /* strong text, active menu item */
	--ew-frame: #666666;         /* outer frame and table borders */
	--ew-box-line: #9b9b9b;      /* content frame (#xaxa) */
	--ew-head: #c6c6c6;          /* table header rows */
	--ew-row: #e7e7e7;           /* table body rows */
	--ew-row-alt: #f4f4f4;       /* information box */
	--ew-field: #e4e4e4;         /* fieldset */
	--ew-field-line: #b2b2b2;
	--ew-input-line: #5589aa;    /* .lanyu inputs */
	--ew-hot: #d00000;           /* red menu items and timers */
	--ew-ok: #008000;            /* "Open" / online status */
	--ew-font: "Courier New", Courier, monospace;
	--ew-font-ui: Verdana, Geneva, Tahoma, sans-serif;
	--ew-font-button: "Comic Sans MS", "Comic Sans", cursive;
	--ew-gradient-menu: linear-gradient(#909191 0 1px, #dedede 1px, #fefefe 80%);
	--ew-gradient-button: linear-gradient(#ffffff, #f1f1f1 25%, #d6d6d6 55%, #b5b5b5);
	color-scheme: light;
}

/* ---------- Foundation ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ew {
	margin: 0;
	background: #ffffff url('../img/evaweb/background.gif') 0 0 repeat;
	color: var(--ew-text);
	font: 12px/1.5 var(--ew-font);
	text-align: left;
}
.ew a { color: var(--ew-text); text-decoration: none; }
.ew a:hover { color: var(--ew-ink); border-bottom: 1px dotted; }
.ew img { max-width: 100%; }
.ew :is(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--ew-input-line); outline-offset: 2px; }
.ew h1, .ew h2, .ew h3, .ew h4 { color: var(--ew-ink); font-family: var(--ew-font-ui); }
.ew p { margin: 0 0 8px; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 200; padding: 8px 12px; background: #fff; border: 1px solid var(--ew-frame); color: var(--ew-ink); }
.skip-link:focus { top: 8px; }
.ew [hidden] { display: none !important; }

.ew-wrap {
	width: var(--ew-width);
	max-width: 100%;
	margin: 0 auto;
	background: #fff;
	border-inline: 1px solid var(--ew-frame);
}

/* ---------- Header banner (inc/header.php) ---------- */
.ew-header { position: relative; }
.ew-banner {
	position: relative;
	height: 200px;
	background: #222 url('../img/evaweb/header-clean.png') center / cover no-repeat;
	border-bottom: 1px solid var(--ew-frame);
}
.ew .ew-brand, .ew .ew-brand:hover {
	position: absolute;
	right: 60px;
	top: 46px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	border: 0;
	color: #fff;
	font: italic 700 44px/1.02 var(--ew-font-ui);
	letter-spacing: 2px;
	text-shadow: 0 0 1px #fff, 0 0 8px #ffb347, 0 0 18px #ff4f9a, 0 0 32px #8a3cff, 2px 2px 1px #000;
}
.ew-brand span:last-child { padding-right: 18px; font-size: 38px; }
.ew-banner-status {
	position: absolute;
	right: 14px;
	bottom: 8px;
	margin: 0;
	padding: 2px 8px;
	background: rgba(0, 0, 0, .55);
	border: 1px solid rgba(255, 255, 255, .25);
	color: #eee;
	font-size: 11px;
}
.ew-banner-status b { color: #fff; }
.ew-banner-status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ccf4e; }
.ew-social { position: absolute; left: 196px; top: 20px; display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ew-social a, .ew-social a:hover { display: block; border: 0; }
.ew-social img { display: block; width: 32px; height: 32px; }
.ew-social-discord {
	display: grid !important;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	background: #5865f2;
	color: #fff !important;
	font: 700 16px/1 var(--ew-font-ui);
}

/* ---------- Main menu (inc/menu-top.php) ---------- */
.ew-menu {
	display: flex;
	align-items: stretch;
	min-height: 39px;
	background: var(--ew-gradient-menu);
	background-image: url('../img/evaweb/menu_bg.gif');
	background-repeat: repeat-x;
	border-bottom: 1px solid var(--ew-frame);
}
.ew-menu a {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	color: var(--ew-text);
	font-weight: 700;
	white-space: nowrap;
}
/* Etched separator: menu_1.gif repeated three times, as in the original markup. */
.ew-menu a + a::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	bottom: 0;
	width: 6px;
	margin-left: -3px;
	background: url('../img/evaweb/menu_1.gif') 0 0 repeat-x;
}
.ew-menu a:hover { color: var(--ew-ink); border-bottom: 0; text-decoration: underline dotted; }
.ew-menu a.is-hot { color: var(--ew-hot); }
.ew-menu a.active { color: var(--ew-ink); }
.ew-menu a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; border-bottom: 1px dotted var(--ew-ink); }
.nav-toggle { display: none; }

/* ---------- Shared controls (style.css) ---------- */
.ew .lanyu,
.ew input.lanyu {
	height: 22px;
	padding: 1px 4px;
	border: 1px solid var(--ew-input-line);
	border-radius: 0;
	background: #fff;
	color: var(--ew-ink);
	font: 12px var(--ew-font);
}
.ew .button,
.ew a.button,
.ew button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 21px;
	padding: 1px 8px 3px;
	background: #c6c6c6 var(--ew-gradient-button);
	border: 3px double var(--ew-frame);
	border-radius: 0;
	color: var(--ew-ink);
	font: 11px/1.3 var(--ew-font-button);
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}
.ew .button:hover { background: #ddd linear-gradient(#ffffff, #e5e5e5 50%, #c4c4c4); border-bottom: 3px double var(--ew-ink); border-color: var(--ew-ink); color: var(--ew-ink); }
.ew .button:active { background: linear-gradient(#b5b5b5, #e5e5e5); }

.ew fieldset {
	margin: 10px 0;
	padding: 10px 12px;
	background: var(--ew-field);
	border: 1px solid var(--ew-field-line);
	border-radius: 7px;
}
.ew legend {
	padding: 2px 6px;
	background: var(--ew-field);
	border: 1px solid #a1a1a1;
	border-radius: 3px;
	color: var(--ew-ink);
	font: 13px var(--ew-font-ui);
}

/* ---------- Content frame (#xaxa) ---------- */
.ew-content { padding: 12px; border-top: 0; background: #fff; }
.ew-empty { margin: 0; padding: 10px; color: var(--ew-text); text-align: center; }
.ew-ok { color: var(--ew-ok); font-weight: 700; }

/* Grey header + row tables (index/home.php DS/BC lists) */
.ew-table { width: 100%; border-collapse: collapse; font: 9pt var(--ew-font); }
.ew-table th, .ew-table td { padding: 4px; text-align: center; vertical-align: middle; }
.ew-table thead th { background: var(--ew-head); color: var(--ew-ink); font-weight: 400; }
.ew-table tbody td, .ew-table tbody th { background: var(--ew-row); color: var(--ew-text); font-weight: 400; border-top: 1px solid #fff; }
.ew-table tbody th a { color: var(--ew-ink); }
.ew-table tbody tr:hover > * { background: #dcdcdc; }
.ew-table img { display: inline-block; vertical-align: middle; }
.ew-table .ew-class { display: block; margin: 0 auto; border: 0; }
.ew-table-wide { min-width: 720px; }
.ew-table-wide tbody th { text-align: left; }
.table-scroll { overflow-x: auto; }

.ew-box-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 8px;
	background: var(--ew-head);
	border-bottom: 1px solid #fff;
}
.ew-box-head h2 { margin: 0; font: 700 12px var(--ew-font); }
.ew-box-head h2 a { color: var(--ew-ink); }
.ew-clock { color: var(--ew-hot); font-weight: 700; }

/* ---------- Home row: promo | top | info | events | promo ---------- */
.ew-home-row {
	display: grid;
	grid-template-columns: minmax(0, 310px) 240px minmax(0, 310px);
	justify-content: space-between;
	gap: 20px;
	align-items: start;
	padding: 0 36px;
}

/* Vote banner */
.ew-vote-banner { margin: 0 0 10px !important; padding: 2px 8px; background: var(--ew-row-alt); border: 2px solid #bbb; text-align: center; }
.ew .ew-vote-banner a { color: var(--ew-text); }

.ew-table .ew-table-title th { background: var(--ew-head); color: var(--ew-ink); font-weight: 700; }
.ew-table .ew-table-title th a { color: var(--ew-ink); }
.ew-table .ew-table-title .ew-clock { color: var(--ew-hot); text-align: right; padding-right: 10px; }
.ew-table .ew-table-title .ew-clock.is-open { color: var(--ew-ok); }
.ew-home-row .ew-table tbody tr:nth-child(even) > * { background: var(--ew-row-alt); }
.ew-home-row .ew-table tbody tr:first-child :is(th a, td) { color: #e00000; }
.ew-home-row .ew-table tbody td:last-child { text-align: right; padding-right: 10px; }
.ew-promo, .ew-promo:hover { display: block; border: 0; }
.ew-promo img { display: block; width: 130px; height: 276px; }
.ew-table-box { min-width: 0; }

.ew-info table { width: 100%; border-collapse: collapse; background: var(--ew-row-alt); }
.ew-info td { padding: 4px; border: 1px solid var(--ew-frame); color: var(--ew-text); text-align: left; }
.ew-info td b { color: var(--ew-ink); }

/* Event schedule rendered by javascript/events.js */
.event-schedule-switcher { display: flex; flex-wrap: wrap; background: var(--ew-row); border-bottom: 1px solid #fff; }
.event-schedule-switch {
	flex: 1 1 auto;
	padding: 3px 4px;
	background: transparent;
	border: 0;
	border-right: 1px solid #fff;
	color: var(--ew-text);
	font: 11px var(--ew-font);
	cursor: pointer;
}
.event-schedule-switch:last-child { border-right: 0; }
.event-schedule-switch.is-active { background: var(--ew-head); color: var(--ew-ink); font-weight: 700; }
.event-schedule-list { max-height: 231px; overflow: auto; scrollbar-width: thin; }
.event-schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; background: var(--ew-row); border-top: 1px solid #fff; }
.event-schedule-name { color: var(--ew-ink); }
.event-schedule-main > .smalltext, .event-schedule-next { display: none; }
.event-schedule-meta { color: var(--ew-hot); font-weight: 700; white-space: nowrap; }
.event-schedule-open, .event-schedule-inprogress { color: var(--ew-ok); }
.event-schedule-empty { padding: 8px; text-align: center; }

/* Home countdown (template_displayHomeCountdown) */
.daedalus-home-countdown { margin-top: 8px; padding: 6px; background: var(--ew-field); border: 1px solid var(--ew-field-line); text-align: center; }
.daedalus-home-countdown-title, .daedalus-home-countdown-sub { color: var(--ew-ink); font-size: 11px; }
.daedalus-home-countdown-row { display: flex; justify-content: center; gap: 8px; color: var(--ew-hot); }
.daedalus-home-countdown-row b { font-size: 16px; }

/* ---------- Home sections ---------- */
.ew-section { margin-top: 14px; }
.ew-section-title {
	margin: 0 0 6px;
	padding: 4px 8px;
	background: var(--ew-head);
	color: var(--ew-ink);
	font: 700 12px var(--ew-font);
}
.ew-section-title a { color: var(--ew-ink); }
.ew-section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ew-section-title-row h2 { margin: 0; font: inherit; }

/* News list (modules/home.php) */
.transmission { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 8px; background: var(--ew-row); border-top: 1px solid #fff; }
.transmission-meta { display: flex; flex-direction: column; color: var(--ew-text); font-size: 11px; }
.transmission-meta b { color: var(--ew-hot); font-weight: 700; }
.transmission h3 { margin: 0 0 4px; font: 700 13px var(--ew-font-ui); }
.transmission h3 a { color: var(--ew-ink); }
.transmission p { margin: 0; }
.transmission > a { align-self: center; white-space: nowrap; }



/* ---------- Inner pages: sidebar + module ---------- */
.ew-inner { display: grid; grid-template-columns: 197px minmax(0, 1fr); gap: 12px; align-items: start; }
.ew-side-box { margin-bottom: 12px; background: #fff url('../img/evaweb/left_bg.gif') 0 0 repeat-y; border-bottom: 1px solid #abaaaa; }
.ew-side-title {
	height: 36px;
	margin: 0;
	padding: 9px 12px 0;
	background: url('../img/evaweb/left_top_news.gif') 0 0 no-repeat;
	color: var(--ew-ink);
	font: 700 12px var(--ew-font);
}
.ew-umenu, .ew-umenu ul { margin: 0; padding: 4px 10px 8px !important; list-style: none; }
.ew-umenu li a {
	display: block;
	padding: 3px 0 3px 14px;
	background: url('../img/evaweb/arrow.png') 0 50% no-repeat;
	color: var(--ew-text);
}
.ew-umenu li a:hover { color: var(--ew-ink); border-bottom: 0; text-decoration: underline dotted; }
.ew-umenu .admincp-menu-item a { color: var(--ew-hot); font-weight: 700; }
.ew-side-box.ew-info table { background: var(--ew-row-alt); }
.ew-side-box.ew-info table { width: 197px; }
.ew-side-box.ew-info td { border-color: #abaaaa; }

/* ---------- Module frame: overrides the dark "parchment" shell ---------- */
/* Palette variables read by site-modules.css and the template modules. */
body.ew.site-inner { --paper-ink: #000000; --paper-muted: #666666; --paper-line: #c6c6c6; --paper-card: #e7e7e7; --paper-accent: #d00000; }
body.ew.site-inner .parchment { position: relative; margin: 0; padding: 12px; background: #fff; border: 1px solid var(--ew-box-line); box-shadow: none; clip-path: none; color: var(--ew-text); }
body.ew.site-inner .parchment::before, body.ew.site-inner .parchment::after { display: none; }
body.ew.site-inner .paper-inner { min-height: 300px; }

body.ew.site-inner #content #daedalus-main-module { color: var(--ew-text); font-family: var(--ew-font); font-size: 12px; }
body.ew.site-inner #content #daedalus-main-module :is(h1, h2, h3, h4, .panel-title) { color: var(--ew-ink); font-family: var(--ew-font-ui); text-shadow: none; }
body.ew.site-inner #content #daedalus-main-module :is(.page-title, .rankings-panel-title) {
	margin: 0 0 12px;
	padding: 4px 8px;
	background: var(--ew-head);
	border: 0;
	color: var(--ew-ink);
	font: 700 13px/1.5 var(--ew-font);
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
}
body.ew.site-inner #content #daedalus-main-module a { color: var(--ew-text); font-weight: 700; }
body.ew.site-inner #content #daedalus-main-module a:hover { color: var(--ew-ink); }
body.ew.site-inner #content #daedalus-main-module :is(.panel, .well, .download-card, .login-panel-body) {
	background: var(--ew-field);
	border: 1px solid var(--ew-field-line);
	border-radius: 7px;
	box-shadow: none;
	color: var(--ew-text);
	padding: 10px 12px;
	margin-bottom: 12px;
}
body.ew.site-inner #content #daedalus-main-module :is(.panel-heading, .panel-footer) { background: none; border-color: var(--ew-field-line); color: var(--ew-ink); }
body.ew.site-inner #content #daedalus-main-module :is(.text-muted, .help-block) { color: #777; }

/* Forms */
body.ew.site-inner #content #daedalus-main-module :is(.form-control, .login-form-input, input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], select, textarea) {
	min-height: 24px;
	padding: 2px 6px;
	background: #fff;
	border: 1px solid var(--ew-input-line);
	border-radius: 0;
	box-shadow: none;
	color: var(--ew-ink);
	font: 12px var(--ew-font);
}
body.ew.site-inner #content #daedalus-main-module :is(input, select, textarea):focus { outline: 2px solid var(--ew-input-line); outline-offset: 0; }
body.ew.site-inner #content #daedalus-main-module input::placeholder { color: #999; }
body.ew.site-inner #content #daedalus-main-module :is(.control-label, .login-form-label, .register-form-label, label) { color: var(--ew-ink); font-weight: 400; }

/* Buttons: every module button gets the EvaWeb gradient button */
body.ew.site-inner #content #daedalus-main-module :is(.btn, .btn-primary, .btn-default, .btn-success, .btn-warning, .btn-danger, .btn-info, .login-submit-btn, .download-button, .download-btn, .gold-button, .zone-button, .outline-button, button[type=submit], input[type=submit], input[type=button]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 23px;
	padding: 2px 10px 3px;
	background: #c6c6c6 var(--ew-gradient-button) !important;
	border: 3px double var(--ew-frame) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--ew-ink) !important;
	font: 11px/1.3 var(--ew-font-button) !important;
	letter-spacing: 0;
	text-shadow: none !important;
	text-transform: none;
	cursor: pointer;
}
body.ew.site-inner #content #daedalus-main-module :is(.btn, button[type=submit], input[type=submit], .download-button, .download-btn, .gold-button, .zone-button):hover { border-color: var(--ew-ink) !important; background: #ddd linear-gradient(#ffffff, #e5e5e5 50%, #c4c4c4) !important; }
body.ew.site-inner #content #daedalus-main-module :is(.btn-danger) { color: #900 !important; }
body.ew.site-inner #content #daedalus-main-module :is(button, input)[disabled] { opacity: .55; cursor: not-allowed; }

/* Tables */
body.ew.site-inner #content #daedalus-main-module table { border-collapse: collapse; font: 9pt var(--ew-font); color: var(--ew-text); }
body.ew.site-inner #content #daedalus-main-module :is(thead th, thead td, .rankings-table tr:first-child td, .table > thead > tr > th) { background: var(--ew-head) !important; color: var(--ew-ink) !important; border-color: #fff !important; font-weight: 400; }
body.ew.site-inner #content #daedalus-main-module :is(tbody td, tbody th) { border-color: #fff; }
body.ew.site-inner #content #daedalus-main-module tbody tr { background: var(--ew-row); }
body.ew.site-inner #content #daedalus-main-module tbody tr:nth-child(even) { background: #efefef; }
body.ew.site-inner #content #daedalus-main-module :is(.table-hover tr:hover, tbody tr:hover) { background: #dcdcdc; }

/* Notifications (style.css .notification + attention/information/success/error) */
body.ew.site-inner #content #daedalus-main-module .alert,
.ew .notification {
	position: relative;
	margin: 0 0 12px;
	padding: 10px 10px 10px 36px;
	border: 1px solid;
	border-radius: 6px;
	background-position: 10px 11px;
	background-repeat: no-repeat;
	font: 13px/1.5 Arial, Helvetica, sans-serif;
}
body.ew.site-inner #content #daedalus-main-module :is(.alert-info, .alert) { background-color: #dbe3ff; background-image: url('../img/evaweb/information.png'); border-color: #a2b4ee; color: #585b66; }
body.ew.site-inner #content #daedalus-main-module .alert-warning { background-color: #fffbcc; background-image: url('../img/evaweb/exclamation.png'); border-color: #e6db55; color: #666452; }
body.ew.site-inner #content #daedalus-main-module .alert-success { background-color: #d5ffce; background-image: url('../img/evaweb/information.png'); border-color: #9adf8f; color: #556652; }
body.ew.site-inner #content #daedalus-main-module :is(.alert-danger, .register-error) { background-color: #ffcece; background-image: url('../img/evaweb/exclamation.png'); border-color: #df8f8f; color: #665252; }

/* Tab menus (news types, ranking types) use the EvaWeb button */
html body.ew.site-inner #content #daedalus-main-module :is(.rankings_menu a, .rankings-level-menu-wrap .rankings_menu a, button.rankings-mode-btn) {
	display: inline-flex; align-items: center; min-height: 23px; margin: 0 4px 6px 0; padding: 2px 10px 3px;
	background: #c6c6c6 var(--ew-gradient-button) !important; border: 3px double var(--ew-frame) !important; border-radius: 0 !important;
	box-shadow: none !important; color: var(--ew-ink) !important; font: 11px/1.3 var(--ew-font-button) !important; text-transform: none;
}
html body.ew.site-inner #content #daedalus-main-module :is(.rankings_menu a, .rankings-level-menu-wrap .rankings_menu a, button.rankings-mode-btn):is(.active, :hover) { background: #ddd linear-gradient(#b5b5b5, #e5e5e5) !important; border-color: var(--ew-ink) !important; font-weight: 700 !important; }

html body.ew.site-inner #content #daedalus-main-module :is(.rankings-level-menu-wrap .rankings_menu, .rankings-mode-switch, .rankings-mode-group) { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; gap: 4px; }
html body.ew.site-inner #content #daedalus-main-module .rankings-control-label { color: var(--ew-ink) !important; font: 700 11px var(--ew-font) !important; letter-spacing: 0 !important; }
html body.ew.site-inner #content #daedalus-main-module .rankings-control-label::before { background: var(--ew-frame) !important; }

/* Section navigation used by several modules */
body.ew .section-nav a { background: var(--ew-row); border: 1px solid var(--ew-head); border-radius: 0; color: var(--ew-text); }
body.ew .section-nav a:hover, body.ew .section-nav a[aria-current] { background: var(--ew-head); color: var(--ew-ink); }

/* Pagination */
body.ew.site-inner #content #daedalus-main-module .pagination > li > :is(a, span) { background: var(--ew-row); border-color: var(--ew-head); color: var(--ew-text); }
body.ew.site-inner #content #daedalus-main-module .pagination > .active > :is(a, span) { background: var(--ew-head); color: var(--ew-ink); }

/* Rankings (modules/rankings-*-zone.php): the poster headings become EvaWeb title bars */
body.ew .dz-records-heading { display: block; padding: 0 0 10px; }
body.ew .dz-records-heading .dz-kicker, body.ew .dz-standings-title .dz-kicker { display: none; }
body.ew.site-inner #content #daedalus-main-module .dz-records-heading h1 { margin: 0 0 6px; padding: 4px 8px; background: var(--ew-head); color: var(--ew-ink); font: 700 13px/1.5 var(--ew-font) !important; letter-spacing: 0; }
body.ew .dz-records-heading h1 br { display: none; }
body.ew .dz-records-heading h1 em { color: var(--ew-hot); font-style: normal; }
body.ew .dz-records-heading h1 em::before { content: " "; }
body.ew .dz-records-heading p { margin: 0; color: var(--ew-text); font-size: 12px; }
body.ew .dz-standings-title { display: block; padding: 12px 0 6px; }
body.ew.site-inner #content #daedalus-main-module .dz-standings-title h2 { margin: 0; padding: 4px 8px; background: var(--ew-head); font: 700 12px/1.5 var(--ew-font) !important; letter-spacing: 0; }

/* ---------- User panel (logged in) ---------- */
.ew-side-art { padding: 36px 0 0; background: url('../img/evaweb/left_top_news.gif') 0 0 no-repeat; border-bottom: 1px solid #abaaaa; }
.ew-side-art img { display: block; width: 195px; height: 130px; }
.ew-side-user { padding: 16px 8px 12px; text-align: center; }
.ew-side-user h2 { margin: 0 0 14px; color: var(--ew-ink); font: 700 12px var(--ew-font); }
.ew-side-user p { margin: 0 0 10px; }
.ew-side-logout a { color: var(--ew-ink); }
/* The panel sits on white, separated from the sidebar by a dotted rule (no frame). */

.ew-ucp-menu { padding: 10px 12px 14px; background: var(--ew-head); text-align: center; }
.ew-ucp-menu h1 { margin: 6px 0 14px; font: 700 12px var(--ew-font) !important; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-menu h1 a { color: var(--ew-ink); }
.ew-ucp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; }
.ew-ucp-menu h2 { margin: 0 0 2px; color: var(--ew-ink) !important; font: 700 12px var(--ew-font) !important; }
.ew-ucp-menu ul { margin: 0; padding: 0; list-style: none; }
.ew-ucp-menu li { line-height: 1.3; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-menu li a { color: #555; font-weight: 400; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-menu li a:hover { color: var(--ew-ink); border-bottom: 1px dotted; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-menu li a.is-active { color: var(--ew-ink); font-weight: 700; border-bottom: 1px dotted; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-menu li a.is-staff { color: var(--ew-hot); font-weight: 700; }
.ew-ucp-menu li b { color: var(--ew-ink); }

.ew-ucp-welcome, .ew-ucp-wallet { margin: 14px 0 0 !important; text-align: center; }
.ew-ucp-welcome b, .ew-ucp-wallet b, .ew-ucp-created b { color: var(--ew-ink); }
.ew-ucp-blocked { color: var(--ew-hot); font-weight: 700; }
.ew-ucp .table-scroll { margin-top: 14px; }
.ew-ucp-chars { border-bottom: 3px double #999; }
.ew-ucp-chars thead th { white-space: nowrap; }
.ew-ucp-chars caption { padding: 2px 4px 0; background: var(--ew-row); color: var(--ew-ink); }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-chars thead th { background: var(--ew-row) !important; border-bottom: 3px double #999 !important; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-chars tbody tr { background: #fff; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-chars tbody :is(td, th) { background: #fff; border-top: 0; padding: 6px 4px 2px; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-chars tbody th a { color: #333; font: 400 12px Verdana, sans-serif; }
.ew-ucp-chars tbody th { text-align: center; }
.ew-ucp-status { display: block; color: var(--ew-text); font-style: italic; }
.ew-ucp-status.is-alert { color: var(--ew-hot); }
.ew-ucp-avatar { display: block; margin: 0 auto; width: 32px; height: 32px; object-fit: cover; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-chars tr.ew-ucp-sub td { padding: 0 4px 8px; border-bottom: 1px solid #ccc; font-style: italic; }
.ew-ucp-created { margin: 18px 0 0 !important; }
.ew-ucp-exit { margin: 8px 20px 0 0 !important; text-align: right; font-style: italic; }
body.ew.site-inner #content #daedalus-main-module .ew-ucp-exit a { color: var(--ew-ink); }
.ew-ucp-work { margin-top: 14px; }

/* VIP module (modules/usercp/vip.php): the whole card is the button, "Buy" is its label */
html body.ew.site-inner #content #daedalus-main-module .vip-package-btn { background: var(--ew-row) !important; border: 1px solid var(--ew-field-line) !important; border-radius: 7px !important; box-shadow: none !important; color: var(--ew-text) !important; font-family: var(--ew-font) !important; text-transform: none !important; }
html body.ew.site-inner #content #daedalus-main-module .vip-package-btn:hover { border-color: var(--ew-frame) !important; background: #dcdcdc !important; }
html body.ew.site-inner #content #daedalus-main-module :is(.vip-package-action, .vip-confirm-btn) {
	display: inline-flex; align-items: center; justify-content: center; min-height: 23px; padding: 2px 14px 3px;
	background: #c6c6c6 var(--ew-gradient-button) !important; border: 3px double var(--ew-frame) !important; border-radius: 0 !important;
	box-shadow: none !important; color: var(--ew-ink) !important; font: 11px/1.3 var(--ew-font-button) !important; letter-spacing: 0 !important; text-transform: none !important;
}
html body.ew.site-inner #content #daedalus-main-module .vip-popular-ribbon { background: var(--ew-hot) !important; border-radius: 0 !important; box-shadow: none !important; color: #fff !important; font: 700 10px var(--ew-font) !important; }
html body.ew.site-inner #content #daedalus-main-module .vip-package-discount { background: #d5ffce !important; border-color: #9adf8f !important; color: #556652 !important; border-radius: 0 !important; }

/* ---------- EvaWeb character ranking (modules/rankings-evaweb.php) ---------- */
.ew-rank-head { padding: 22px 12px 4px; background: var(--ew-head); text-align: center; }
.ew-rank-search { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.ew-rank-search label { color: var(--ew-text); }
.ew-rank-search input { width: 140px; }
.ew-rank-letters { margin: 4px 0 0; color: var(--ew-text); word-spacing: 2px; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-letters a { color: var(--ew-text); font-weight: 400; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-letters a.is-active { color: var(--ew-ink); font-weight: 700; border-bottom: 1px dotted; }
.ew-rank-slogan { margin: 14px 0 6px !important; color: #e00060; font: italic 700 15px var(--ew-font-ui); letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 0 6px #fff; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-head h1 { margin: 0; font: 700 12px var(--ew-font) !important; }
.ew-rank .table-scroll { margin-top: 0; }
.ew-rank-table { min-width: 640px; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table thead th { background: var(--ew-head) !important; border-bottom: 3px double #999 !important; padding-top: 2px; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table tbody tr { background: transparent; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table tbody :is(td, th) { background: #fff; border: 0; padding: 4px; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table tbody:nth-of-type(even) :is(td, th) { background: #ededed; }
.ew-rank-table tbody { border-top: 1px solid #999; }
.ew-rank-table tbody + tbody { border-top: 3px double #bbb; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table tbody th a { color: #333; font-weight: 700; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table tbody.is-first :is(td, th, th a) { color: #e00000; }
.ew-rank-table tbody th { text-align: center; white-space: nowrap; }
.ew-rank-guild { display: inline-block; vertical-align: middle; }
.ew-rank-guild img, .ew-rank-guild canvas, .ew-rank-guild table { vertical-align: middle; }
body.ew.site-inner #content #daedalus-main-module .ew-rank-table tr.ew-rank-sub td { padding-top: 0; padding-bottom: 6px; font-size: 12px; }
.ew-rank-table tr.ew-rank-sub td:first-child { color: var(--ew-text); white-space: nowrap; }
.ew-rank-table tr.ew-rank-sub i { color: var(--ew-text); }
.ew-rank-table tr.ew-rank-sub b { color: var(--ew-ink); }

/* Compact top-3 cards above the table (dz-champion markup from rankings-zone.css) */
html body.ew .ew-podium { margin: 0; padding: 12px 40px 10px; background: var(--ew-row); border: 0; border-bottom: 1px solid #bbb; border-radius: 0; box-shadow: none; }
html body.ew .ew-podium::before, html body.ew .ew-podium::after { display: none; }
html body.ew .ew-podium .dz-podium-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); justify-content: center; align-items: end; gap: 14px; }
html body.ew .ew-podium .dz-place-1 { order: 2; } html body.ew .ew-podium .dz-place-2 { order: 1; } html body.ew .ew-podium .dz-place-3 { order: 3; }
html body.ew .ew-podium .dz-champion { display: block; background: #fff; border: 1px solid var(--ew-box-line); border-radius: 0; box-shadow: none; transform: none; overflow: hidden; color: var(--ew-text); }
html body.ew .ew-podium .dz-champion:hover { border-color: var(--ew-ink); }
html body.ew .ew-podium .dz-place-1 { border: 2px solid #e00000; }
html body.ew .ew-podium .dz-champion-art { position: relative; height: 82px; overflow: hidden; }
html body.ew .ew-podium .dz-place-1 .dz-champion-art { height: 104px; }
html body.ew .ew-podium .dz-champion-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: none; opacity: 1; }
html body.ew .ew-podium .dz-champion-art::after { display: none; }
html body.ew .ew-podium .dz-champion-tier { position: absolute; left: 4px; top: 4px; padding: 1px 6px; background: rgba(255,255,255,.85); border: 1px solid var(--ew-frame); color: var(--ew-ink); font: 700 10px var(--ew-font); letter-spacing: 0; }
html body.ew .ew-podium .dz-place-1 .dz-champion-tier { background: #e00000; border-color: #e00000; color: #fff; }
html body.ew .ew-podium .dz-champion-info { padding: 4px 6px 6px; text-align: center; }
html body.ew .ew-podium .dz-champion-info { position: static; margin: 0; background: #fff; }
html body.ew .ew-podium .dz-champion-class { position: static; display: block; margin: 0 0 1px; transform: none; color: var(--ew-text); font: 10px var(--ew-font); letter-spacing: 0; text-transform: none; }
html body.ew.site-inner #content #daedalus-main-module .ew-podium .dz-champion-info h3 { margin: 0 0 4px; color: var(--ew-ink); font: 700 15px var(--ew-font-ui) !important; }
html body.ew .ew-podium .dz-place-1 .dz-champion-info h3 { color: #e00000 !important; }
html body.ew .ew-podium dl { display: flex; justify-content: center; gap: 0; margin: 0; padding: 2px 0 0; border-top: 1px dotted #999; }
html body.ew .ew-podium dl > div { flex: 1; border: 0; padding: 0; }
html body.ew .ew-podium dt { color: var(--ew-text); font: 9px var(--ew-font); letter-spacing: 0; text-transform: none; }
html body.ew .ew-podium dd { margin: 0; color: var(--ew-ink); font: 700 12px var(--ew-font); }

/* Ranking filters in the sidebar: guild link + EvaWeb class banners */
.ew-side-rank { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 8px 16px; }
.ew-side-rank p { align-self: stretch; margin: 0 0 4px; padding-left: 26px; }
.ew .ew-side-guilds { padding-left: 16px; background: url('../img/evaweb/arrow.png') 0 50% no-repeat; color: var(--ew-ink); }
.ew .ew-side-class, .ew .ew-side-class:hover { display: block; border: 0; line-height: 0; }
.ew-side-class img { display: block; width: 110px; height: 22px; border: 1px solid transparent; }
.ew-side-class:hover img, .ew-side-class.is-active img { border-color: var(--ew-ink); box-shadow: 0 0 0 1px #fff, 0 0 4px #000; }
.ew .ew-side-class.is-text { line-height: 1.4; width: 110px; padding: 1px 4px; background: var(--ew-gradient-button); border: 1px solid var(--ew-frame); color: var(--ew-ink); font-size: 11px; text-align: center; }
.ew .ew-side-class.is-text.is-active { font-weight: 700; }

/* ---------- Inner pages like the classic MU layout: sidebar fills the column, dotted rule, unframed content ---------- */
.ew-inner { align-items: stretch; }
.ew-side { display: flex; flex-direction: column; }
.ew-side > .ew-side-box:last-child { flex: 1 0 auto; min-height: 420px; margin-bottom: 0; }
body.ew.site-inner .parchment { border: 0; border-left: 1px dotted #999; border-radius: 0; padding: 0 0 0 12px; }
.ew-side-user h2 a { color: var(--ew-ink); }

/* ---------- News (modules/news.php): all articles in blue information boxes ---------- */
.ew-news { padding-top: 8px; }
body.ew.site-inner #content #daedalus-main-module body.ew.site-inner #content #daedalus-main-module .ew-news-back { margin: 8px 0 12px !important; }
.ew-news-box {
	margin: 0 6px 14px; padding: 14px 16px 14px 40px;
	background: #dbe3ff url('../img/evaweb/information.png') 12px 16px no-repeat;
	border: 1px solid #a2b4ee; border-radius: 6px;
	color: #585b66; font: 13px/1.55 Arial, Helvetica, sans-serif;
}
body.ew.site-inner #content #daedalus-main-module .ew-news-box h2 { margin: 0; font: 700 16px/1.3 Arial, Helvetica, sans-serif !important; }
body.ew.site-inner #content #daedalus-main-module .ew-news-box h2 a { color: #ee0000; font-weight: 700; }
body.ew.site-inner #content #daedalus-main-module .ew-news-box h2 a:hover { color: #a00; }
.ew-news-meta { margin: 2px 0 8px !important; color: #7a7f99; font-size: 11px; }
.ew-news-type { color: #1d7a1d; font-weight: 700; }
.ew-news-body { overflow-wrap: anywhere; }
body.ew.site-inner #content #daedalus-main-module .ew-news-body :is(p, span, div, li, td, strong, b, em, i, h1, h2, h3, h4) { color: inherit; font-family: Arial, Helvetica, sans-serif !important; }
body.ew.site-inner #content #daedalus-main-module .ew-news-body :is(strong, b) { color: #3d4152; }
body.ew.site-inner #content #daedalus-main-module .ew-news-body a { color: #1a4fd0; font-weight: 700; }
.ew-news-body p { margin: 0 0 4px; }
.ew-news-body ul { margin: 4px 0; padding-left: 22px; }
.ew-news-body img { max-width: 100%; height: auto; }

/* ---------- Downloads table ---------- */
.ew-downloads { margin: 6px 0 14px; border: 1px solid #bbb; }
body.ew.site-inner #content #daedalus-main-module .ew-downloads tbody :is(td, th) { padding: 5px 8px; }
.ew-downloads tbody th { text-align: left; color: var(--ew-ink); }

/* ---------- Footer (inc/footer.php) ---------- */
.ew-footer {
	padding: 8px 12px 10px;
	background: linear-gradient(#dedede, #fefefe 34px);
	border-top: 1px solid #909191;
	border-bottom: 1px solid var(--ew-frame);
	text-align: center;
	font-size: 11px;
}
.ew-footer nav { margin: 4px 0; }
.ew-footer nav a { font-weight: 700; }
.ew-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.ew-wrap { border-inline: 0; }
	.ew-home-row { padding: 0; }
}
@media (max-width: 860px) {
	.ew-banner { height: 150px; }
	.ew .ew-brand, .ew .ew-brand:hover { right: 24px; top: 34px; font-size: 32px; }
	.ew-brand span:last-child { font-size: 27px; padding-right: 10px; }
	.ew-social { left: auto; right: 14px; top: 8px; }
	.nav-toggle {
		display: flex;
		width: 100%;
		justify-content: space-between;
		padding: 8px 12px;
		background: url('../img/evaweb/menu_bg.gif') 0 0 repeat-x, #fefefe;
		border: 0;
		border-bottom: 1px solid var(--ew-frame);
		color: var(--ew-ink);
		font: 700 12px var(--ew-font);
		cursor: pointer;
	}
	.ew-menu { display: none; flex-direction: column; background: #fefefe; }
	.ew-menu.is-open { display: flex; }
	.ew-menu a { justify-content: flex-start; padding: 8px 14px; border-top: 1px solid var(--ew-head); }
	.ew-menu a + a::before { display: none; }
	.ew-menu a.active::after { display: none; }
	.ew-home-row { grid-template-columns: 1fr 1fr; }
	.ew-home-row .ew-info { grid-column: 1 / -1; grid-row: 1; }
		.ew-inner { grid-template-columns: 1fr; }
	.ew-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; order: 2; }
	.ew-side-box { margin: 0; background: #fff; border: 1px solid #abaaaa; }
	.ew-side-title { background: var(--ew-head); height: auto; padding: 4px 10px; }
	.ew-side-rank { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
	.ew-side-rank p { flex: 1 1 100%; padding-left: 0; text-align: center; }
	.ew-side-box.ew-info table { width: 100%; }
	body.ew.page-usercp .ew-side { display: none; }
	html body.ew .ew-podium { padding: 10px 6px; }
	html body.ew .ew-podium .dz-podium-grid { gap: 6px; }
	html body.ew .ew-podium .dz-champion-art { height: 60px; }
	html body.ew .ew-podium .dz-place-1 .dz-champion-art { height: 76px; }
	body.ew.site-inner .parchment { border-left: 0; padding-left: 0; }
	.ew-side > .ew-side-box:last-child { min-height: 0; }
	.ew-side-art { display: none; }
	.ew-news-box { margin-inline: 0; }
}
@media (max-width: 560px) {
	.ew-content { padding: 8px; }
	.ew-banner { height: 110px; }
	.ew .ew-brand, .ew .ew-brand:hover { top: 22px; right: 14px; font-size: 24px; }
	.ew-brand span:last-child { font-size: 20px; }
	.ew-social { display: none; }
	.ew-banner-status { font-size: 10px; }
	.ew-home-row { grid-template-columns: 1fr; }
	.ew-side { grid-template-columns: 1fr; }
	.transmission { grid-template-columns: 1fr; gap: 4px; }
	.transmission-meta { flex-direction: row; gap: 8px; }
	body.ew.site-inner .parchment { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Downloads: compact button inside the table */
html body.ew.site-inner #content #daedalus-main-module .ew-downloads .download-btn { width: auto !important; min-width: 0 !important; padding: 1px 12px 2px !important; }
/* Guild ranking: plain numbers, red first row only */
html body.ew.site-inner #content #daedalus-main-module .ew-guild-table tbody td { color: var(--ew-text) !important; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-table tbody.is-first :is(td, th a) { color: #e00000 !important; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-table tbody td a { color: var(--ew-text); font-weight: 400; }

/* ---------- Player profile: in-game style inventory (97D layout) ---------- */
html body.ew.site-inner #content #daedalus-main-module .av-inventory-section {
	width: fit-content; max-width: 100%; margin: 0 auto; padding: 0 14px 14px;
	background: repeating-radial-gradient(circle at 30% 20%, #262626 0 1px, transparent 1px 4px), linear-gradient(#262626, #121212) #1b1b1b !important; min-height: 0 !important; height: auto !important;
	border: 3px solid #3a3a3a !important; border-radius: 4px !important;
	box-shadow: inset 0 0 0 1px #000, inset 0 0 24px #000, 0 2px 6px rgba(0,0,0,.4) !important;
}
html body.ew.site-inner #content #daedalus-main-module .av-inventory-title {
	margin: 0 -14px 12px; padding: 8px 0 9px;
	background: linear-gradient(#050505, #000); border-bottom: 2px solid #3a3a3a;
	color: #f0f0f0 !important; font: 700 13px/1 Tahoma, Verdana, sans-serif !important; text-align: center; text-shadow: 0 1px 0 #000;
}
html body.ew.site-inner #content #daedalus-main-module .av-inv-grid { --cell: 44px; --gap: 5px; grid-template-columns: repeat(9, var(--cell)); }
html body.ew.site-inner #content #daedalus-main-module .av-slot {
	width: 100% !important; height: 100% !important; justify-self: stretch !important; align-self: stretch !important;
	background: radial-gradient(circle at 50% 45%, #3a3a3a, #1c1c1c 70%) !important;
	border: 2px solid #4b4b4b !important; border-color: #6a6a6a #1a1a1a #0a0a0a #585858 !important; border-radius: 3px !important;
	box-shadow: inset 0 0 8px #000, 0 0 0 1px #000 !important; transform: none;
}
html body.ew.site-inner #content #daedalus-main-module .av-slot:hover { border-color: #b8b8b8 #555 #333 #999 !important; }
html body.ew.site-inner #content #daedalus-main-module .av-slot :is(.av-slot-label) { color: #6f6f6f; font: 700 8px Tahoma, sans-serif; letter-spacing: 0; }
html body.ew.site-inner #content #daedalus-main-module .av-slot:has(.av-slot-item-wrap) .av-slot-label { display: none; }
html body.ew.site-inner #content #daedalus-main-module .av-slot-item-wrap img { max-width: 88%; max-height: 88%; filter: drop-shadow(0 0 3px rgba(0,0,0,.9)); }
/* 97D has no pentagram, earring or extra pet slots */
html body.ew.site-inner #content #daedalus-main-module .av-slot:is([data-slot="pentagram"], [data-slot="earring1"], [data-slot="earring2"], [data-slot="pet1"], [data-slot="pet2"]) { display: none !important; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="pet"]    { grid-column: 1 / span 2; grid-row: 1 / span 2; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="helm"]   { grid-column: 4 / span 2; grid-row: 1 / span 2; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="wings"]  { grid-column: 6 / span 4; grid-row: 1 / span 2; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="weapon"] { grid-column: 1 / span 2; grid-row: 3 / span 3; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="pendant"]{ grid-column: 3 / span 1; grid-row: 3 / span 1; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="armor"]  { grid-column: 4 / span 2; grid-row: 3 / span 3; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="shield"] { grid-column: 8 / span 2; grid-row: 3 / span 3; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="gloves"] { grid-column: 1 / span 2; grid-row: 6 / span 2; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="ring1"]  { grid-column: 3 / span 1; grid-row: 6 / span 1; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="pants"]  { grid-column: 4 / span 2; grid-row: 6 / span 2; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="ring2"]  { grid-column: 6 / span 1; grid-row: 6 / span 1; }
html body.ew.site-inner #content #daedalus-main-module .av-slot[data-slot="boots"]  { grid-column: 8 / span 2; grid-row: 6 / span 2; }
/* Item tooltip like the game: black box, centred lines */
html body.ew.site-inner #content #daedalus-main-module .av-slot-item-tooltip { background: rgba(0,0,0,.92) !important; border: 1px solid #555 !important; border-radius: 0 !important; box-shadow: 0 0 0 1px #000 !important; text-align: center; font: 11px/1.45 Tahoma, Verdana, sans-serif !important; }
html body.ew.site-inner #content #daedalus-main-module .av-slot-item-tooltip .name-option { color: #9bd94a !important; text-shadow: none !important; }
html body.ew.site-inner #content #daedalus-main-module .av-slot-item-tooltip .text-gray { color: #e6e6e6 !important; }
html body.ew.site-inner #content #daedalus-main-module .av-slot-item-tooltip .text-blue { color: #7fa5ff !important; }
html body.ew.site-inner #content #daedalus-main-module .av-slot-item-tooltip .text-green { color: #7fa5ff !important; }
@media (max-width: 560px) { html body.ew.site-inner #content #daedalus-main-module .av-inv-grid { --cell: 32px; --gap: 3px; } }

/* ---------- Player profile: in-game inventory (modules/profile/evaweb-inventory.php) ----------
   Classic 0.97d window from the client's Data/Interface (Item_Back01/02, Item_*, Item_box, Item_Money,
   exit_01, repair_01), native 190x433 px, scaled by --s. Coordinates follow the in-game layout. */
.ew-inv {
	--s: 1.8; --cell: calc(20px * var(--s));
	position: relative; flex: none; width: calc(190px * var(--s)); height: calc(433px * var(--s)); margin: 0 auto;
	background: url('../img/game/item-back01.png') 0 0 / 100% calc(256px * var(--s)) no-repeat,
		url('../img/game/item-back02.png') 0 calc(256px * var(--s)) / 100% calc(177px * var(--s)) no-repeat, #2b2b2b;
	font-family: Tahoma, Verdana, sans-serif;
}
html body.ew.site-inner #content #daedalus-main-module .ew-inv-title {
	position: absolute; left: 0; right: 0; top: calc(6px * var(--s)); margin: 0; padding: 0; background: none; border: 0;
	color: #fff !important; font: 700 calc(7px * var(--s)) / calc(14px * var(--s)) Tahoma, Verdana, sans-serif !important; text-align: center; text-shadow: 1px 1px 0 #000;
}
.ew-inv-slot { position: absolute; background: center / 100% 100% no-repeat; outline: none; }
.ew-inv-slot img { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; }
.ew-inv-pet     { left: calc(15px * var(--s));  top: calc(36px * var(--s));  width: calc(40px * var(--s)); height: calc(40px * var(--s)); background-image: url('../img/game/item-fairy.png'); }
.ew-inv-helm    { left: calc(80px * var(--s));  top: calc(36px * var(--s));  width: calc(40px * var(--s)); height: calc(40px * var(--s)); background-image: url('../img/game/item-cap.png'); }
.ew-inv-wings   { left: calc(123px * var(--s)); top: calc(36px * var(--s));  width: calc(60px * var(--s)); height: calc(40px * var(--s)); background-image: url('../img/game/item-wing.png'); }
.ew-inv-weapon  { left: calc(15px * var(--s));  top: calc(87px * var(--s));  width: calc(40px * var(--s)); height: calc(60px * var(--s)); background-image: url('../img/game/item-weapon01.png'); }
.ew-inv-pendant { left: calc(58px * var(--s));  top: calc(88px * var(--s));  width: calc(20px * var(--s)); height: calc(20px * var(--s)); background-image: url('../img/game/item-necklace.png'); }
.ew-inv-armor   { left: calc(80px * var(--s));  top: calc(87px * var(--s));  width: calc(40px * var(--s)); height: calc(60px * var(--s)); background-image: url('../img/game/item-upper.png'); }
.ew-inv-shield  { left: calc(143px * var(--s)); top: calc(87px * var(--s));  width: calc(40px * var(--s)); height: calc(60px * var(--s)); background-image: url('../img/game/item-weapon02.png'); }
.ew-inv-gloves  { left: calc(15px * var(--s));  top: calc(158px * var(--s)); width: calc(40px * var(--s)); height: calc(40px * var(--s)); background-image: url('../img/game/item-gloves.png'); }
.ew-inv-ring1   { left: calc(58px * var(--s));  top: calc(160px * var(--s)); width: calc(20px * var(--s)); height: calc(20px * var(--s)); background-image: url('../img/game/item-ring.png'); }
.ew-inv-pants   { left: calc(80px * var(--s));  top: calc(158px * var(--s)); width: calc(40px * var(--s)); height: calc(40px * var(--s)); background-image: url('../img/game/item-lower.png'); }
.ew-inv-ring2   { left: calc(122px * var(--s)); top: calc(160px * var(--s)); width: calc(20px * var(--s)); height: calc(20px * var(--s)); background-image: url('../img/game/item-ring.png'); }
.ew-inv-boots   { left: calc(143px * var(--s)); top: calc(158px * var(--s)); width: calc(40px * var(--s)); height: calc(40px * var(--s)); background-image: url('../img/game/item-boots.png'); }
.ew-inv-bag {
	position: absolute; left: calc(15px * var(--s)); top: calc(210px * var(--s)); width: calc(var(--cell) * 8); height: calc(var(--cell) * 8);
	background: url('../img/game/item-box.png') 0 0 / var(--cell) var(--cell) repeat;
}
.ew-inv-item { position: absolute; left: calc(var(--c) * var(--cell)); top: calc(var(--r) * var(--cell)); width: calc(var(--w) * var(--cell)); height: calc(var(--h) * var(--cell)); outline: none; }
.ew-inv-item img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ew-inv-item b { position: absolute; left: 1px; bottom: 0; color: #ffd76a; font: 700 calc(6px * var(--s)) Tahoma, sans-serif; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.ew-inv-zen {
	position: absolute; left: calc(20px * var(--s)); top: calc(377px * var(--s)); width: calc(150px * var(--s)); height: calc(18px * var(--s)); margin: 0 !important;
	display: flex; align-items: center; gap: calc(9px * var(--s)); color: #e8e8e8; font: calc(6.5px * var(--s)) Tahoma, sans-serif;
}
.ew-inv-zen b { display: flex; align-items: center; width: calc(113px * var(--s)); height: 100%; padding-left: calc(4px * var(--s)); background: url('../img/game/item-money.png') 0 0 / 100% 100% no-repeat; color: #ff2a2a; font-weight: 400; }
.ew-inv-buttons { position: absolute; left: calc(22px * var(--s)); top: calc(401px * var(--s)); display: flex; gap: calc(10px * var(--s)); }
.ew-inv-buttons span { width: calc(24px * var(--s)); height: calc(24px * var(--s)); background: center / 100% 100% no-repeat; }
.ew-inv-buttons .is-exit { background-image: url('../img/game/exit-01.png'); }
.ew-inv-buttons .is-repair { background-image: url('../img/game/repair-01.png'); }
/* Item tooltip like the game: black box, centred lines, shown on hover / keyboard focus */
.ew-inv-tip {
	position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 50; transform: translateX(-50%);
	min-width: 200px; max-width: 260px; padding: 6px 10px; visibility: hidden; opacity: 0; pointer-events: none;
	background: rgba(0,0,0,.9); border: 1px solid #555; color: #e6e6e6; text-align: center; font: 11px/1.45 Tahoma, Verdana, sans-serif;
}
:is(.ew-inv-slot, .ew-inv-item):is(:hover, :focus-visible) .ew-inv-tip { visibility: visible; opacity: 1; }
:is(.ew-inv-slot.has-item, .ew-inv-item):is(:hover, :focus-visible) { z-index: 40; background-color: rgba(255,255,255,.08); }
html body.ew.site-inner #content #daedalus-main-module .ew-inv-tip :is(div, span) { font-family: Tahoma, Verdana, sans-serif !important; }
html body.ew.site-inner #content #daedalus-main-module .ew-inv-tip .name-option { color: #9bd94a !important; font-size: 12px !important; }
html body.ew.site-inner #content #daedalus-main-module .ew-inv-tip .text-gray { color: #e6e6e6 !important; }
html body.ew.site-inner #content #daedalus-main-module .ew-inv-tip :is(.text-blue, .text-green) { color: #7fa5ff !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-inventory-col { overflow: visible; display: flex; justify-content: center; background: none; border: 0; box-shadow: none; }
@media (max-width: 560px) { .ew-inv { --s: 1.25; } }

/* ---------- Player profile layout: 3D character | inventory | guild + stats, all visible at once ---------- */
body.ew.page-profile .ew-side { display: none; }
body.ew.page-profile .ew-inner { grid-template-columns: 1fr; }
body.ew.page-profile.site-inner .parchment { border-left: 0; padding-left: 0; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-sheet {
	display: grid; grid-template-columns: minmax(300px, 1fr) auto minmax(300px, 1fr); grid-template-rows: auto 1fr; gap: 12px; align-items: start;
	padding: 0; background: none; border: 0; box-shadow: none;
}
html body.ew.site-inner #content #daedalus-main-module .profiles-player-layout { display: contents; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait-col { grid-column: 1; grid-row: 1 / span 2; margin: 0; padding: 0; background: #0d0d0d radial-gradient(ellipse at 50% 40%, #2c2c2c, #0d0d0d 70%); border: 2px solid #3a3a3a; border-color: #6b6b6b #262626 #111 #555; box-shadow: inset 0 0 24px #000; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait { width: 100%; height: auto; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.mu-viewer { position: relative; width: 100%; height: 600px; cursor: grab; touch-action: pan-y; outline: none; }
.mu-viewer:active { cursor: grabbing; }
.mu-viewer canvas { display: block; }
.mu-viewer:not(.is-ready)::after { content: "Loading 3D model..."; position: absolute; inset: auto 0 50%; color: #888; font: 11px Tahoma, sans-serif; text-align: center; }
.mu-viewer:focus-visible { box-shadow: inset 0 0 0 2px #888; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait-name { display: block; width: auto; margin: 0; padding: 8px; background: linear-gradient(#000, #111); border-top: 1px solid #3a3a3a; color: #f2f2f2; font: 700 14px Tahoma, sans-serif; text-align: center; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait-name a { color: #f2f2f2; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-inventory-col { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; }
.ew-inv { --s: 1.45; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-card { grid-column: 3; grid-row: 1; margin: 0; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-panel { grid-column: 3; grid-row: 2; margin: 0; padding: 0; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid,
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid tbody { display: block; width: 100% !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid tr { display: grid !important; grid-template-columns: 42% 58%; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid td { width: auto !important; min-width: 0 !important; max-width: none !important; padding: 4px 8px !important; font-size: 11px; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid td:nth-child(odd) { color: var(--ew-text); }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid td:nth-child(even) { color: var(--ew-ink); }
@media (max-width: 960px) {
	html body.ew.site-inner #content #daedalus-main-module .profiles-player-sheet { grid-template-columns: 1fr; }
	html body.ew.site-inner #content #daedalus-main-module :is(.profiles-player-portrait-col, .profiles-player-inventory-col, .profiles-player-guild-card, .profiles-player-summary-panel) { grid-column: 1; grid-row: auto; }
	.mu-viewer { height: 420px; }
}
/* Profile columns share one height: the 3D box and the stats column stretch to the inventory window. */
html body.ew.site-inner #content #daedalus-main-module .profiles-player-sheet { align-items: stretch; grid-template-rows: auto minmax(0, 1fr); }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait-col { display: flex; flex-direction: column; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait { flex: 1 1 auto; display: flex; min-height: 0; }
.mu-viewer { flex: 1 1 auto; height: auto; min-height: 520px; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-inventory-col { display: flex; align-items: flex-start; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-panel { display: flex; flex-direction: column; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid { flex: 1 1 auto; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-summary-grid td { padding-block: 3px !important; line-height: 1.35; }

/* Inventory icons with +level, same passes as the client (inc/evaweb-itemfx.php, mu-viewer.js updateFx):
   +3/+4 red pulse, +5/+6 blue pulse (body light multiply), +7 Chrome01 x item colour --c (additive),
   +9 + Shiny01 x --c, +11 + Chrome02 x --c2. Layers are clipped to the item shape by masking with the icon. */
.ew-glow { display: none; position: absolute; inset: 0; z-index: 2; pointer-events: none; isolation: isolate;
	-webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; mix-blend-mode: plus-lighter; }
.ew-inv-slot .ew-glow { inset: 4%; }
.ew-glow::before, .ew-glow::after { content: ""; position: absolute; inset: 0; mix-blend-mode: plus-lighter; }
:is(.lv3, .lv5) > .ew-glow { display: block; mix-blend-mode: multiply; animation: ew-pulse 1.57s ease-in-out infinite alternate; }
.lv3 > .ew-glow { background: rgb(255, 153, 153); }
.lv5 > .ew-glow { background: rgb(128, 179, 255); }
:is(.lv7, .lv9, .lv11) > .ew-glow { display: block;
	background: url('../models/tex/fx-chrome01.png') 0 0 / 64px 64px repeat, var(--c, #fff); background-blend-mode: multiply;
	animation: ew-chrome 10s linear infinite; opacity: .8; }
:is(.lv7) > img { filter: brightness(.85); }
:is(.lv9, .lv11) > img { filter: brightness(.92); }
:is(.lv9, .lv11) > .ew-glow::after { background: url('../models/tex/fx-shiny01.png') 40% 35% / 45% 45% no-repeat, var(--c, #fff); background-blend-mode: multiply; opacity: .6; }
.lv11 > .ew-glow::before { background: url('../models/tex/fx-chrome02.png') 0 0 / 160% 160% no-repeat, var(--c2, #fff); background-blend-mode: multiply;
	animation: ew-chrome2 5s linear infinite; opacity: .7; }
@keyframes ew-pulse { from { opacity: .45; } to { opacity: .85; } }
@keyframes ew-chrome { from { background-position: 0 0, 0 0; } to { background-position: 64px 128px, 0 0; } }
@keyframes ew-chrome2 { from { background-position: -60% -90%, 0 0; } to { background-position: 160% 220%, 0 0; } }
@media (prefers-reduced-motion: reduce) { .ew-glow, .ew-glow::before { animation: none !important; } }

/* 3D inventory icons (mu-viewer.js mountInventory): the canvas sits over the window, the 2D gif and its
   CSS glow stay as the fallback when WebGL is missing. */
.ew-inv-3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.is-3d > img, .is-3d > .ew-glow { visibility: hidden; }
.ew-inv-item b { z-index: 4; }
:is(.ew-inv-slot, .ew-inv-item):is(:hover, :focus-visible) { z-index: 40; }
/* With 3D icons the cell must stay under the canvas on hover (its slot frame would hide the model);
   only the options tooltip is lifted above everything. */
.has-3d :is(.ew-inv-slot, .ew-inv-item).is-3d:is(:hover, :focus-visible) { z-index: auto; background-color: transparent; }
.has-3d .ew-inv-tip { z-index: 60; }
.has-3d .is-3d:focus-visible { outline: 1px solid #c8c8c8; outline-offset: -1px; }
/* Profile: character name above the 3D model; guild card text sized like the stats table below it. */
html body.ew.site-inner #content #daedalus-main-module .profiles-player-portrait-name { order: -1; border-top: 0; border-bottom: 1px solid #3a3a3a; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-card-title { font: 11px var(--ew-font) !important; color: var(--ew-text) !important; letter-spacing: 0 !important; text-transform: none !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-card-name,
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-card-name a { font: 700 14px var(--ew-font) !important; color: var(--ew-ink) !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-details span { font: 700 11px/1.4 var(--ew-font) !important; color: var(--ew-ink) !important; padding: 4px 8px !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-details span b { display: block; font: 400 11px/1.4 var(--ew-font) !important; color: var(--ew-text) !important; letter-spacing: 0 !important; text-transform: none !important; }
html body.ew.site-inner #content #daedalus-main-module .profiles-player-guild-details span a { font: inherit !important; color: var(--ew-ink) !important; }

/* ---------- Guild profile (modules/profile/guild.php): guild card + stats table, members table ---------- */
html body.ew.site-inner #content #daedalus-main-module .ew-guild-profile { margin-top: 10px; padding: 10px; background: var(--ew-field); border: 1px solid var(--ew-field-line); font: 11px/1.4 var(--ew-font); }
.ew-guild-top { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.ew-guild-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: #ececec; border: 1px solid #d8d8d8; text-align: center; }
.ew-guild-logo img { display: block; width: 128px; height: 128px; border: 1px solid var(--ew-frame); image-rendering: pixelated; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-card h1 { margin: 0; color: var(--ew-ink); font: 700 16px var(--ew-font); letter-spacing: 0; text-transform: none; text-shadow: none; }
.ew-guild-stats { width: 100%; height: 100%; border-collapse: collapse; background: #ececec; border: 1px solid #d8d8d8; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-stats :is(th, td) { padding: 6px 10px; border-bottom: 1px solid #fff; background: var(--ew-row); font: 11px var(--ew-font); text-align: left; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-stats tr:nth-child(even) :is(th, td) { background: var(--ew-row-alt); }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-stats th { width: 42%; color: var(--ew-text); font-weight: 400; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-stats td,
html body.ew.site-inner #content #daedalus-main-module .ew-guild-stats td a { color: var(--ew-ink); font-weight: 700; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-members caption { padding: 4px 6px; background: var(--ew-head); color: var(--ew-ink); font: 700 11px var(--ew-font); text-align: left; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-members tbody :is(td, th) { background: #fff; border: 0; border-top: 1px solid #ccc; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-members tbody tr:nth-child(even) :is(td, th) { background: #ededed; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-members tbody tr.ew-role-master :is(td, th, th a) { color: #e00000; }
html body.ew.site-inner #content #daedalus-main-module .ew-guild-members tbody tr:is(.ew-role-assistant, .ew-role-battle) td:last-child { color: var(--ew-ink); }
@media (max-width: 640px) {
	.ew-guild-top { grid-template-columns: 1fr; }
}

/* Guild ranking top 3: guild logo on a dark plate in place of the class art */
html body.ew .ew-guild-podium .dz-champion-art { display: flex; align-items: center; justify-content: center; background: #1b1b1b radial-gradient(circle at 50% 45%, #3a3a3a, #111 75%); }
html body.ew .ew-guild-podium .dz-champion-art img { width: 64px; height: 64px; object-fit: contain; border: 1px solid #555; image-rendering: pixelated; }
html body.ew .ew-guild-podium .dz-place-1 .dz-champion-art img { width: 84px; height: 84px; }

/* Inventory hidden by Hide Info: label in the middle of the empty bag */
.ew-inv-bag .ew-inv-hidden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #c9c9c9; font: 700 14px Tahoma, sans-serif; letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 2px #000; pointer-events: none; }
