/* TrickPvP store: components. Needs tokens.css. Put .pixel-ui on <body>. */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { background: var(--night); color-scheme: dark; scrollbar-color: var(--button-hi) var(--night); }

.pixel-ui {
  font: var(--text-body)/1.5 var(--font-body);
  color: var(--ink);
  /* Essential: sizes Jersey to Inter's cap height and stops fake bolding. */
  font-size-adjust: cap-height 0.727;
  font-synthesis: none;
  image-rendering: pixelated;
}
/* never set overflow on body: the browser passes it to the page and blocks wheel scrolling */
.pixel-ui > main, .pixel-ui > section { overflow-x: clip; }
.pixel-ui ::selection { background: var(--ruby-hover); color: var(--on-ruby); }
.pixel-ui :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pixel-ui button, .pixel-ui input { font: inherit; color: inherit; }
.pixel-ui button { cursor: pointer; background: none; border: 0; padding: 0; }
.pixel-ui ul { list-style: none; padding: 0; }
.wrap { width: min(var(--wrap), 100% - 36px); margin-inline: auto; }

/* Buttons: every size is at least the 44px tap target */
.pixel-ui .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--hit); min-width: var(--hit); padding: 0 var(--space-4);
  font: var(--text-button) var(--font-pixel); white-space: nowrap; text-decoration: none; color: var(--ink);
  background: var(--button); box-shadow: var(--bevel-button);
}
.pixel-ui .btn:hover { background: var(--button-hover); }
.pixel-ui .btn:active { transform: translateY(2px); }
.pixel-ui .btn.sm { padding: 0 var(--space-3); font-size: var(--text-button-sm); }
.pixel-ui .btn.discord { color: #fff; background: var(--discord); box-shadow: var(--bevel-discord); }
.pixel-ui .btn.discord:hover { background: var(--discord-lo); }
.pixel-ui .btn:disabled { filter: saturate(0.3) brightness(0.6); cursor: not-allowed; transform: none; }

/* Window panel */
.pixel-ui .win { background: linear-gradient(var(--panel-top), var(--panel-bottom)); box-shadow: var(--frame-window); }
.win-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 14px 20px; border-bottom: 4px solid var(--bevel-lo);
}
.win-title h2 { margin-right: auto; font: 400 var(--text-window)/1 var(--font-display); }
.win-body { padding: var(--space-5); }

/* Sunken wells: item slot and text input */
.slot { flex: none; display: grid; place-items: center; width: 64px; height: 68px; background: var(--well); box-shadow: var(--bevel-well); }
.pixel-ui input {
  flex: 1; min-width: 0; height: var(--hit); padding: 0 var(--space-3);
  background: var(--well); border: 0; box-shadow: var(--bevel-well);
  font: 17px var(--font-pixel); caret-color: var(--ruby);
}
.pixel-ui input::placeholder { color: var(--ink-placeholder); opacity: 1; }

/* Header and tabs */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 12px; background: var(--bar);
  box-shadow: 0 4px 0 var(--edge), inset 0 -4px 0 var(--bevel-lo);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: var(--hit); font: 23px var(--font-pixel); white-space: nowrap; }
.tabs { display: flex; gap: 9px; margin-inline: auto; }
.pixel-ui .btn.tab { padding: 0 14px; color: var(--ink-muted); background: var(--slate); box-shadow: var(--bevel-tab); }
.pixel-ui .btn.tab:hover { color: var(--ink); }

/* Notched card: the cut corners and top notch are the store's repeated shape */
.notched {
  position: relative; isolation: isolate;
  clip-path: polygon(var(--notch) 0, calc(100% - 66px) 0, calc(100% - 59px) 7px, calc(100% - 52px) 0, 100% 0,
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  background: linear-gradient(135deg, var(--ruby), #4a252d 18%, #2a1519 78%, var(--ruby));
}
.notched::before { content: ""; position: absolute; inset: 2px; z-index: -1; clip-path: inherit; background: linear-gradient(160deg, #1d0e12, #0e0709); }

/* Server address chip */
.status { display: inline-flex; align-items: center; gap: 12px; padding: 5px 5px 5px 14px; background: rgb(8 2 3 / 0.86); box-shadow: var(--outline); font: 16px var(--font-pixel); }

/* Dialog: native element, so focus trap and Esc work */
.pixel-ui dialog { width: min(430px, 100% - 32px); margin: auto; border: 0; padding: 0; color: var(--ink); overflow: visible; }
.pixel-ui dialog::backdrop { background: rgb(4 1 2 / 0.82); }
.pixel-ui dialog .win-body { display: grid; gap: 14px; }
.summary { display: flex; align-items: center; gap: var(--space-3); }
.summary b { display: block; font: 400 21px/1.1 var(--font-pixel); }
.summary small { font-size: var(--text-small); color: var(--ink-muted); }
.summary strong { margin-left: auto; font: 400 26px var(--font-display); color: var(--ink); }
