/* ==========================================================================
   Window style (body.ux-window, layered on The Family)
   Sharp 1px frames, no rounded corners, no shadows or glows, and a header
   strip on every box, like a classic browser-game window. Fonts and colours
   stay The Family's.
   ========================================================================== */
.ux-window {
  --radius: 0px; --radius-sm: 0px; --shadow: none;
  --win-bg: #13110d;        /* box body */
  --win-strip: #1c1912;     /* header strip */
  --win-edge: #3a3222;      /* frame line */
  --win-rule: #262117;      /* row dividers inside a box */
}

/* ---------- kill rounding + glow everywhere except things that are meant to be round ---------- */
.ux-window *:not(.pf *):not(.pfm *):not(.cz *):not(.gz *):not(.pcard *):not(.avatar):not(.avatar img):not(.me__ring):not(.dot):not(.medal__disc):not(.medal--mini):not(.swatch span):not(.podium__place):not(.fight__vs span):not(.ma-alert__icon):not(.badge):not(.oc-odds):not(.tomb__stone):not(.hq-mem__dot):not(.bj-card):not(.sf__dial):not(.sf__pegs i):not(.rl-ball):not(.rl-chip):not(.dg-dog):not([class*="frame"]):not([class*="nfx"]) {
  border-radius: 0 !important;
}
.ux-window :is(.card, .stat, .rail__card, .district, .ach, .podium__spot, .theme-card, .crime-result, .fight, .medal--big,
  td.ma-alert, td.lockout, .crime, .quick__btn, .tile, .pagehero, .hero, .dash-hero, .crime-list, .board-wrap, .car, .build,
  .listing, .tgood, .citycard, .sidecard, .empty-state, .phone, .authcard, .toast, .tabbar, .vital, .chip, .iconbtn, .tab,
  .dtab, .mtab, .phonetab, .picker__opt, .btn, button, input, select, textarea, td.contenthead, td.contentcontent, .gymcard, .opt) {
  box-shadow: none !important; backdrop-filter: none !important;
}
.ux-window .tile::after { display: none; }
.ux-window :is(.quick__btn, .theme-card, .opt .opt__thumb, .tile, .card):hover { transform: none !important; }

/* ---------- flat surfaces with a hard frame ---------- */
.ux-window.theme-family :is(.card, .stat, .district, .ach, .podium__spot, .theme-card, .crime-result, .fight, .medal--big,
  td.ma-alert, td.lockout, .quick__btn, .car, .build, .listing, .citycard, .sidecard, .empty-state, .gymcard) {
  background: var(--win-bg); border: 1px solid var(--win-edge);
}
.ux-window.theme-family .card:hover { border-color: var(--win-edge); }
.ux-window.theme-family :is(.pagehero, .hero, .dash-hero, .tile) { border: 1px solid var(--win-edge); }
.ux-window.theme-family .pagehero h1, .ux-window.theme-family .hero h1 { text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }

/* ---------- header strip: every card gets a title bar ---------- */
.ux-window.theme-family .card { padding: 0 0 16px; }
.ux-window.theme-family .card > .card__head:first-child {
  margin: 0 0 14px; padding: 9px 14px; background: var(--win-strip); border-bottom: 1px solid var(--win-edge); min-height: 20px;
}
.ux-window.theme-family .card > .card__head:first-child .card__title { font-size: 16px; line-height: 1.2; }
.ux-window.theme-family .card > :not(.card__head) { margin-left: 16px; margin-right: 16px; }
.ux-window.theme-family .card:not(:has(> .card__head:first-child)) { padding: 16px 0; }

/* legacy content tables already have a head row: make it the same strip */
.ux-window.theme-family td.contenthead { background: var(--win-strip); border: 1px solid var(--win-edge); border-bottom-color: var(--win-edge); font-size: 17px; padding: 10px 16px; }
.ux-window.theme-family td.contentcontent { background: var(--win-bg); border-color: var(--win-edge); }

/* a section title sitting on top of a list becomes that list's strip */
.ux-window.theme-family .section-title:has(+ :is(.crime-list, .listings, .tradelist, .cities, .cars, .board-wrap, .list, .tiles)) {
  margin: 18px 0 0; padding: 9px 14px; background: var(--win-strip); border: 1px solid var(--win-edge); border-bottom: 0;
}
.ux-window.theme-family .section-title:has(+ :is(.crime-list, .listings, .tradelist, .cities, .cars, .board-wrap, .list, .tiles))::after { display: none; }

/* ---------- lists of actions: one framed box, rows split by rules ---------- */
.ux-window.theme-family .crime-list { gap: 0; border: 1px solid var(--win-edge); background: var(--win-bg); }
.ux-window.theme-family .crime-list > .crime { border: 0; border-bottom: 1px solid var(--win-rule); background: transparent; margin: 0; }
.ux-window.theme-family .crime-list > .crime:last-child { border-bottom: 0; }
.ux-window.theme-family .crime-list > .crime:hover { background: #1a1711; }
.ux-window.theme-family .crime:not(.crime-list > .crime) { background: var(--win-bg); border: 1px solid var(--win-edge); }

/* ---------- menus + right rail: each group is a small window ---------- */
.ux-window.theme-family .nav__group { border: 1px solid var(--win-edge); background: var(--win-bg); margin-bottom: 10px; padding-bottom: 4px; }
.ux-window.theme-family .nav__group > .nav__label {
  background: var(--win-strip); border-bottom: 1px solid var(--win-edge); padding: 7px 12px; margin-bottom: 4px; color: var(--gold);
}
.ux-window.theme-family .nav__item { padding: 6px 12px; }
.ux-window.theme-family .nav__item.is-active, .ux-window.theme-family .nav__item[aria-current] { box-shadow: inset 2px 0 0 var(--gold) !important; }
.ux-window.theme-family .rail__group.chat { padding-bottom: 0; }

/* ---------- buttons: flat gold, no glow ---------- */
.ux-window.theme-family :is(.btn, input[type=submit], button.btn) { background: #c9a14e; border: 1px solid #8a6a2a; color: #1a1406; }
.ux-window.theme-family :is(.btn, input[type=submit], button.btn):hover { background: #d8b262; }
.ux-window.theme-family :is(.btn--ghost, button.btn--ghost, a.btn--ghost) { background: transparent; color: var(--gold-hi); border-color: var(--win-edge); }
.ux-window.theme-family :is(.btn--ghost, button.btn--ghost, a.btn--ghost):hover { background: var(--win-strip); color: #fff; }
.ux-window.theme-family :is(.btn, input[type=submit]):active { transform: none; box-shadow: none; }

/* ---------- top bar vitals and chips: flat ---------- */
.ux-window.theme-family :is(.vital, .chip, .iconbtn) { background: var(--win-bg); border-color: var(--win-edge); }
.ux-window .crime:hover { transform: none !important; }

.ux-window.theme-family .pbody { background: var(--win-bg); border: 1px solid var(--win-edge); }
.ux-window.theme-family :is(.fr, .fr-shop, .ms__card, .ms__contract, .dash-mission, .hit__list) { background: var(--win-bg); border-color: var(--win-edge); }
