:root {
  --xp-blue-1: #4d9af5;
  --xp-blue-2: #1c5fd6;
  --xp-blue-3: #0a3fae;
  --xp-blue-edge: #0831d9;
  --xp-face: #ece9d8;
  --xp-face-2: #d9d5c1;
  --xp-white: #ffffff;
  --xp-text: #10120a;
  --xp-text-dim: #4a4a3f;
  --xp-hi: #ffffff;
  --xp-sh: #8c8a7c;
  --xp-green-1: #6fce4c;
  --xp-green-2: #2f8a1e;
  --xp-green-3: #1b5c10;
  --xp-selected: #2a63d6;
  --font: Tahoma, "Segoe UI", Verdana, Geneva, sans-serif;
  --mono: "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--xp-text);
  font-size: 13px;
  min-height: 100vh;
  padding: 22px 22px 64px;
  background:
    linear-gradient(180deg, #3a7bd5 0%, #6fb1e8 38%, #bfe0a8 62%, #6fbf4a 78%, #3f8f2c 100%);
  overflow-x: hidden;
}
a { color: inherit; }
.mono { font-family: var(--mono); }

/* ---------- desktop icons ---------- */
.desktop-icons {
  display: flex; flex-direction: column; gap: 22px;
  width: 84px; float: left; margin-right: 20px;
}
.desktop-icon {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; width: 100%;
}
.desktop-icon__glyph {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(1px 2px 1px rgba(0,0,0,0.5));
}
.desktop-icon__glyph svg { width: 100%; height: 100%; }
.desktop-icon__label {
  color: #fff; font-size: 11.5px; text-align: center; line-height: 1.25;
  text-shadow: 1px 1px 1px #000, 0 0 3px #000;
  padding: 1px 3px;
}
.desktop-icon:hover .desktop-icon__label,
.desktop-icon:focus .desktop-icon__label { background: rgba(20,60,160,0.55); outline: 1px dotted #fff; }
@media (max-width: 760px) {
  .desktop-icons { float: none; flex-direction: row; flex-wrap: wrap; width: 100%; margin: 0 0 18px; justify-content: center; }
  .desktop-icon { width: 76px; }
}

/* ---------- window chrome ---------- */
.desktop-main { overflow: hidden; }

.xp-window {
  background: var(--xp-face);
  border: 1px solid var(--xp-blue-edge);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 3px 4px 14px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.5);
  margin-bottom: 22px;
  max-width: 980px;
}
.xp-window[hidden] { display: none; }

.xp-titlebar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 4px 0 6px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #6fb0ff 0%, #2f7bef 8%, #1c5fd6 45%, #1a58cc 55%, #0e46bf 88%, #0a3fae 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.xp-titlebar__icon { width: 16px; height: 16px; flex-shrink: 0; }
.xp-titlebar__icon svg { width: 100%; height: 100%; }
.xp-titlebar__text {
  flex: 1; color: #fff; font-weight: 700; font-size: 12.5px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xp-titlebar__btns { display: flex; gap: 2px; }
.xp-tbtn {
  width: 21px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, #fdfdfd, #d7d3c4);
  border: 1px solid #7a7864;
  box-shadow: inset 0 1px 0 #fff;
  font-size: 10px; font-weight: 700; color: #333; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.xp-tbtn:active { background: linear-gradient(180deg, #c9c5b4, #efece0); }
.xp-tbtn--close { background: linear-gradient(180deg, #f2897a, #c53a2f); color: #fff; border-color: #8c281f; }
.xp-tbtn--close:active { background: linear-gradient(180deg, #b7291f, #e37060); }

.xp-body { padding: 16px; }
.xp-body--pad-sm { padding: 10px; }

/* ---------- buttons ---------- */
.xp-btn {
  font-family: var(--font); font-size: 12.5px; color: var(--xp-text);
  padding: 6px 18px; min-width: 76px;
  background: linear-gradient(180deg, #fefefe, #ece9d8);
  border: 1px solid #8f8c7a;
  border-top-color: #fff; border-left-color: #fff;
  box-shadow: inset -1px -1px 0 #8f8c7a, inset 1px 1px 0 #fff;
  border-radius: 3px; cursor: pointer;
}
.xp-btn:active { box-shadow: inset 1px 1px 0 #8f8c7a, inset -1px -1px 0 #fff; }
.xp-btn--primary {
  background: linear-gradient(180deg, #7fbaff, #2f6fe0);
  color: #fff; font-weight: 700;
  border: 1px solid #14408f;
  box-shadow: inset -1px -1px 0 #14408f, inset 1px 1px 0 #bfe0ff;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.35);
}
.xp-btn--primary:active { box-shadow: inset 1px 1px 0 #14408f, inset -1px -1px 0 #bfe0ff; }
.xp-btn:disabled { opacity: 0.55; cursor: default; }
.xp-btn--wide { width: 100%; }

/* ---------- generic content bits ---------- */
.xp-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.xp-hero__badge { width: 64px; height: 64px; flex-shrink: 0; }
.xp-hero__badge svg { width: 100%; height: 100%; }
.badge-glow svg { filter: drop-shadow(0 0 4px rgba(45,212,167,0.75)); }
.xp-hero h1 { font-size: 19px; margin-bottom: 8px; }
.xp-hero em { font-style: normal; color: var(--xp-blue-3); }
.xp-hero p { color: var(--xp-text-dim); font-size: 12.5px; line-height: 1.6; max-width: 560px; margin-bottom: 12px; }
.xp-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.xp-fieldset {
  border: 1px solid var(--xp-sh); border-radius: 4px; padding: 10px 12px 12px;
  margin-top: 14px; background: rgba(255,255,255,0.35);
}
.xp-fieldset legend { font-size: 11.5px; font-weight: 700; padding: 0 4px; color: var(--xp-blue-3); }
.xp-eyebrow { font-size: 10.5px; letter-spacing: 1px; color: var(--xp-text-dim); text-transform: uppercase; display: block; margin-bottom: 6px; }

/* ---------- stat grid (system properties style) ---------- */
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.stat-row { display: flex; justify-content: space-between; padding: 6px 8px; background: rgba(255,255,255,0.5); border: 1px solid #cfcabb; border-radius: 3px; }
.stat-row__label { color: var(--xp-text-dim); }
.stat-row__val { font-weight: 700; }
@media (max-width: 560px) { .stat-list { grid-template-columns: 1fr; } }

/* ---------- token panel ---------- */
.token-panel { display: flex; gap: 18px; flex-wrap: wrap; }
.token-panel__main { flex: 1; min-width: 220px; }
.token-panel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px; }
.token-panel__grid div { background: #fff; border: 1px solid #cfcabb; border-radius: 3px; padding: 8px 10px; }
.token-panel__grid span { display: block; font-size: 10px; color: var(--xp-text-dim); text-transform: uppercase; }
.token-panel__grid strong { font-size: 14px; }
.token-panel__side { flex: 1; min-width: 220px; border-left: 1px dashed #b7b39f; padding-left: 18px; }
@media (max-width: 700px) { .token-panel__side { border-left: none; padding-left: 0; border-top: 1px dashed #b7b39f; padding-top: 14px; } }
.token-panel__side p { color: var(--xp-text-dim); font-size: 12px; line-height: 1.6; }

/* ---------- toolbar (explorer style) ---------- */
.xp-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(180deg, #fdfdfb, #e8e6db);
  border: 1px solid #cfcabb; border-radius: 3px;
  padding: 5px 8px; margin-bottom: 10px;
}
.xp-toolbar__label { font-size: 11px; color: var(--xp-text-dim); }
.view-toggle { display: flex; gap: 4px; margin-left: auto; }
.view-toggle button { font-size: 11px; }
.view-toggle button.is-active { box-shadow: inset 1px 1px 0 #8f8c7a, inset -1px -1px 0 #fff; }

/* ---------- icon grid view (large icons) ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid #7f7c68; }
.icon-grid-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 3px; text-align: center; }
.icon-grid-item:hover { background: #dbe8fb; outline: 1px dotted var(--xp-selected); }
.icon-grid-item__badge { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 12px; box-shadow: 1px 2px 2px rgba(0,0,0,0.3); }
.icon-grid-item__name { font-size: 10.5px; line-height: 1.25; word-break: break-word; }
.icon-grid-item__code { font-size: 9px; color: var(--xp-text-dim); }

/* ---------- list view (details / explorer) ---------- */
.list-view { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #7f7c68; font-size: 11.5px; }
.list-view th {
  text-align: left; font-weight: 700; font-size: 11px; padding: 5px 8px;
  background: linear-gradient(180deg, #fdfdfb, #e2ded0); border-bottom: 1px solid #b7b39f; border-right: 1px solid #ddd9c9;
}
.list-view td { padding: 5px 8px; border-bottom: 1px solid #eeece2; border-right: 1px solid #f2f0e8; vertical-align: middle; }
.list-view tr:nth-child(even) td { background: #f3f6fc; }
.list-view tr:hover td { background: var(--xp-selected); color: #fff; }
.list-view__icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; color: #fff; font-size: 9.5px; font-weight: 700; margin-right: 6px; vertical-align: middle; }
.list-view-wrap { max-height: 340px; overflow-y: auto; border: 1px solid #7f7c68; border-top: none; }
.list-view-wrap .list-view { border: none; }

/* ---------- notepad ---------- */
.notepad-body { background: #fff; border: 1px solid #7f7c68; padding: 10px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.7; color: #111; max-height: 220px; overflow-y: auto; white-space: pre-wrap; }

/* ---------- taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 40px; z-index: 500;
  display: flex; align-items: center; gap: 6px; padding: 0 4px;
  background: linear-gradient(180deg, #2a86e8 0%, #1c66d8 12%, #0e46bf 85%, #0a3fae 100%);
  border-top: 1px solid #6fb1ff;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.35);
}
.start-btn {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 14px 0 8px; border-radius: 5px;
  background: linear-gradient(180deg, #7fe06a, #2f8a1e 55%, #1b5c10);
  border: 1px solid #164a0c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  color: #fff; font-weight: 800; font-style: italic; font-size: 14px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  cursor: pointer;
}
.start-btn svg { width: 18px; height: 18px; }
.start-btn.is-open { background: linear-gradient(180deg, #1b5c10, #2f8a1e 55%, #7fe06a); }

.taskbar__sep { width: 1px; align-self: stretch; margin: 6px 2px; background: rgba(255,255,255,0.25); }

.taskbar__windows { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.taskbar__win-btn {
  display: flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 3px;
  background: linear-gradient(180deg, #3d85e0, #1e5cc4);
  border: 1px solid #0a3fae;
  color: #fff; font-size: 11.5px; max-width: 160px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.taskbar__win-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.taskbar__win-btn.is-minimized { background: linear-gradient(180deg, #1e5cc4, #123f96); box-shadow: inset 1px 1px 3px rgba(0,0,0,0.5); }

.tray {
  display: flex; align-items: center; gap: 9px;
  height: 28px; padding: 0 10px; border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, #1e5cc4, #0a3fae);
  border: 1px solid #06306e; color: #fff; font-size: 11.5px;
}
.tray__icon { display: flex; align-items: center; justify-content: center; width: 15px; height: 15px; color: #cfe0ff; }
.tray__icon svg { width: 100%; height: 100%; }
.tray__icon:hover { color: #fff; }

/* ---------- start menu ---------- */
.start-menu {
  position: fixed; left: 6px; bottom: 44px; z-index: 501;
  width: 300px; border-radius: 6px 6px 6px 0;
  background: #fff; border: 1px solid #0a3fae;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.45);
  overflow: hidden;
}
.start-menu[hidden] { display: none; }
.start-menu__header {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: linear-gradient(90deg, #1c5fd6, #4d9af5);
  color: #fff; font-weight: 700; font-size: 13px;
}
.start-menu__header .glyph { width: 30px; height: 30px; border-radius: 4px; overflow: hidden; }
.start-menu__header svg { width: 100%; height: 100%; }
.start-menu__list { display: flex; flex-direction: column; padding: 6px; }
.start-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 7px 10px; border: none; background: none; cursor: pointer;
  font-family: var(--font); font-size: 12.5px; border-radius: 3px; color: var(--xp-text);
}
.start-menu__item svg { width: 20px; height: 20px; flex-shrink: 0; }
.start-menu__item:hover { background: var(--xp-selected); color: #fff; }

/* ---------- launch wizard ---------- */
.wizard-overlay {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); padding: 16px;
}
.wizard-overlay[hidden] { display: none; }
.wizard {
  width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--xp-face); border: 1px solid var(--xp-blue-edge); border-radius: 8px 8px 4px 4px;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.5);
}
.wizard__body { display: flex; flex: 1; min-height: 0; }
.wizard__banner {
  width: 130px; flex-shrink: 0; padding: 16px 10px;
  background: linear-gradient(180deg, #0a3fae, #1c5fd6 60%, #4d9af5);
  color: #fff; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.wizard__banner-icon { width: 46px; height: 46px; }
.wizard__banner-icon svg { width: 100%; height: 100%; }
.wizard__banner-title { font-weight: 800; font-size: 13px; text-align: center; line-height: 1.4; text-shadow: 1px 1px 1px rgba(0,0,0,0.4); }
.wizard__steps { list-style: none; font-size: 10.5px; width: 100%; margin-top: auto; }
.wizard__steps li { padding: 4px 2px; opacity: 0.6; }
.wizard__steps li.is-active { opacity: 1; font-weight: 700; }
.wizard__steps li.is-active::before { content: '► '; }
.wizard__main { flex: 1; padding: 18px 20px; overflow-y: auto; }
.wizard__main h2 { font-size: 15px; margin-bottom: 6px; }
.wizard__main > p.wizard__sub { font-size: 11.5px; color: var(--xp-text-dim); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #cfcabb; }
.wizard-step[hidden] { display: none; }

.xp-field { display: block; margin-bottom: 12px; font-size: 11.5px; }
.xp-field span { display: block; margin-bottom: 4px; font-weight: 700; }
.xp-field i { font-weight: 400; opacity: 0.7; font-style: normal; }
.xp-field input, .xp-field select, .xp-field textarea {
  width: 100%; font-family: var(--font); font-size: 12.5px; color: var(--xp-text);
  padding: 5px 7px; border: 1px solid #7f7c68;
  border-top-color: #4a4a3f; border-left-color: #4a4a3f;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.15);
  background: #fff; resize: vertical;
}
.xp-field input:focus, .xp-field select:focus, .xp-field textarea:focus { outline: 1px dotted var(--xp-selected); }

.wizard-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.wizard-logo-drop {
  width: 52px; height: 52px; flex-shrink: 0; background: #fff;
  border: 1px solid #7f7c68; border-top-color: #4a4a3f; border-left-color: #4a4a3f;
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
}
.wizard-logo-drop img { width: 100%; height: 100%; object-fit: cover; }
.wizard-logo-drop span { font-size: 9px; text-align: center; color: var(--xp-text-dim); }

.wizard-status { background: #fff3cd; border: 1px solid #e0c674; border-radius: 3px; padding: 8px 10px; font-size: 11.5px; margin-bottom: 12px; }
.wizard-status.is-connected { background: #e4f4e0; border-color: #7fc26a; }

.wizard-summary { border: 1px solid #cfcabb; border-radius: 3px; background: #fff; padding: 10px 12px; margin-bottom: 12px; }
.wizard-summary__row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #ddd9c9; font-size: 11.5px; }
.wizard-summary__row:last-child { border-bottom: none; }
.wizard-summary__row span:first-child { color: var(--xp-text-dim); }

.wizard-result { text-align: center; padding: 6px 0 0; }
.wizard-result__icon { width: 54px; height: 54px; border-radius: 10px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 20px; overflow: hidden; background: linear-gradient(180deg, #7fbaff, #2f6fe0); }
.wizard-result__icon img { width: 100%; height: 100%; object-fit: cover; }
.wizard-result h2 { text-align: center; }

.wizard__footer {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 10px 16px; border-top: 1px solid #cfcabb;
  background: linear-gradient(180deg, #f5f3ea, #e5e1d2);
}
.wizard__footer-note { margin-right: auto; font-size: 10.5px; color: var(--xp-text-dim); }

/* ---------- wallet toast ---------- */
.wallet-toast {
  position: fixed; top: 16px; right: 16px; z-index: 700; max-width: 280px;
  background: #fff3cd; border: 1px solid #e0c674; border-radius: 4px; padding: 10px 12px;
  font-size: 11.5px; line-height: 1.5; color: #333;
  box-shadow: 3px 4px 10px rgba(0,0,0,0.35);
  opacity: 0; transform: translateY(-8px); transition: opacity 0.25s ease, transform 0.25s ease; pointer-events: none;
}
.wallet-toast.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  body { padding: 14px 14px 60px; }
  .wizard__banner { display: none; }
  .taskbar__win-btn span.win-label-full { display: none; }
}

/* Company logos in both Grand Exchange views. */
.icon-grid-item__badge { width: 36px; height: 36px; overflow: hidden; }
.icon-grid-item__badge img, .list-view__icon img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.list-view__icon { width: 22px; height: 22px; overflow: hidden; }

/* Classic Windows XP Bliss desktop and supplied GMX brand artwork. */
body { background: #3a7bd5 url('assets/windows-xp-bliss.bmp') center center / cover fixed no-repeat; }
.gmx-logo-frame { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 5px; background: #080808; }
.gmx-logo-frame img { position: absolute; width: 241.15%; height: auto; max-width: none; left: -71.15%; top: -95%; }
.xp-hero__badge .gmx-logo-frame { height: 100%; }
.xp-titlebar__icon .gmx-logo-frame { min-width: 18px; min-height: 16px; }

