:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #19191c;
  --border: #2a2a2e;
  --text: #f2f2f2;
  --muted: #9ba0a6;
  --accent: #d1232a;
  --accent-2: #a01820;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.ucp-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.ucp-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(180deg, rgba(10, 10, 11, .78), rgba(10, 10, 11, .96)),
    var(--ucp-bg-image, none);
  background-position: center;
  background-size: cover;
}

body.ucp-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

.ucp-shell {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}

/* min-height, never a fixed height: when the mobile keyboard opens the
   viewport shrinks, and a hard height would clip the submit button. dvh
   tracks the shrinking viewport; the vh line above it is the fallback. */
.ucp-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: 32px 16px;
}

.ucp-login__panel {
  width: min(100%, 460px);
  margin-inline: auto;
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(20, 20, 22, .94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
}

.ucp-login__brand,
.ucp-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ucp-login__brand img,
.ucp-brand img {
  width: 132px;
  height: auto;
}

.ucp-login__brand span,
.ucp-brand span,
.ucp-kicker,
.ucp-card__label,
.ucp-nav,
.ucp-button,
.ucp-login__links {
  font-family: Oswald, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .22em;
}

.ucp-login__brand span,
.ucp-kicker,
.ucp-card__label {
  color: var(--muted);
  font-size: 11px;
}

.ucp-login h1,
.ucp-dashboard h1 {
  margin: 22px 0 0;
  font-family: Anton, system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: .015em;
}

.ucp-login h1 {
  font-size: clamp(3rem, 12vw, 5.6rem);
}

.ucp-dashboard h1 {
  font-size: clamp(2.7rem, 8vw, 5.2rem);
}

.ucp-muted,
.ucp-dashboard__hero p,
.ucp-module-card p,
.ucp-muted {
  margin: 14px 0 0;
}

.ucp-alert {
  margin-top: 22px;
  border: 1px solid rgba(209, 35, 42, .55);
  border-radius: 2px;
  background: rgba(209, 35, 42, .12);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.ucp-form {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.ucp-form label {
  margin-top: 8px;
  color: var(--muted);
  font-family: Oswald, system-ui, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .24em;
}

.ucp-form input,
.ucp-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #0d0d0f;
  color: var(--text);
  padding: 12px 14px;
  font: 500 15px Inter, system-ui, sans-serif;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}

.ucp-form input:focus {
  border-color: var(--accent);
  background: #101013;
}

.ucp-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  /* Makes the native option popup render dark instead of the default
     white/blue system list. Without this the list ignores the rules below. */
  color-scheme: dark;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239BA0A6' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  text-transform: uppercase;
  font-family: Oswald, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
}

.ucp-form select:hover {
  border-color: #3a3a40;
}

/* Longhands only. A `background` shorthand here would reset background-repeat
   to `repeat` and tile the chevron across the whole control. */
.ucp-form select:focus,
.ucp-form select:focus-visible,
.ucp-form select:active {
  border-color: var(--accent);
  background-color: #101013;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23D1232A' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

.ucp-form select option {
  background: #141416;
  color: var(--text);
  text-transform: none;
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

.ucp-form select option:checked {
  background: var(--accent);
  color: #fff;
}

.ucp-form input::placeholder {
  color: #6f747a;
}

.ucp-button,
.ucp-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.ucp-button {
  min-height: 48px;
  text-align: center;
  line-height: 1.2;
  margin-top: 12px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
}

.ucp-button:hover,
.ucp-nav__button:hover {
  background: var(--accent-2);
}

.ucp-button:active,
.ucp-nav__button:active {
  transform: translateY(1px);
}

.ucp-login__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11px;
}

.ucp-login__links a:hover,
.ucp-nav a:hover,
.ucp-lang a.is-active {
  color: var(--text);
}

.ucp-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ucp-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 11, .94);
  backdrop-filter: blur(14px);
}

.ucp-topbar__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ucp-brand,
.ucp-nav {
  min-width: 0;
}

.ucp-brand__product {
  max-width: 180px;
  border-left: 1px solid rgba(155, 160, 166, .28);
  padding-left: 14px;
  color: #b8b7b2;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .24em;
  overflow-wrap: anywhere;
}



.ucp-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ucp-nav__button {
  padding: 9px 13px;
  color: white;
}

.ucp-nav__logout {
  display: contents;
}

/* Mobile nav toggle. Both controls are absent above the breakpoint, so the
   desktop bar keeps its exact layout and tab order. */
.ucp-nav-toggle,
.ucp-nav-burger {
  display: none;
}

.ucp-nav__logout .ucp-nav__button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.ucp-dashboard {
  padding: 30px 0 64px;
}

.ucp-page-heading {
  padding: 24px 0 24px;
  border-bottom: 1px solid var(--border);
}

.ucp-page-heading__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.ucp-page-heading h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.ucp-page-heading p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.ucp-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(155, 160, 166, .32);
  border-radius: 2px;
  padding: 6px 10px;
  color: #d7d4ce;
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}


.ucp-dashboard__hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 42px 0 34px;
  border-bottom: 1px solid var(--border);
}

.ucp-dashboard__hero p {
  max-width: 620px;
  margin-top: 16px;
}

.ucp-module-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.ucp-card {
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(25, 25, 28, .98), rgba(18, 18, 20, .98));
  padding: 22px;
}

.ucp-card__label {
  display: block;
}

/* Now holds only the eyebrow kicker; the display-type section heading it
   used to sit beside is gone, so the margins no longer need to clear it. */
.ucp-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 12px;
}


.ucp-module-card h3 {
  margin: 18px 0 10px;
  font-family: Anton, system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .015em;
}

.ucp-module-card p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 860px) {
  /* .ucp-topbar__inner is no longer here: the bar stays a single row of
     brand + burger, with the nav lifted out into an overlay panel. */
  .ucp-dashboard__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Visually hidden but still focusable and Space-toggleable. */
  .ucp-nav-toggle {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  .ucp-nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px 9px;
    cursor: pointer;
  }

  .ucp-nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: var(--text);
  }

  .ucp-nav-toggle:focus-visible ~ .ucp-nav-burger {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  /* Overlays the page instead of pushing it down: absolute against the
     sticky .ucp-topbar, which already carries z-index 20. */
  .ucp-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 11, .98);
    backdrop-filter: blur(14px);
    padding: 20px 16px 24px;
  }

  .ucp-nav-toggle:checked ~ .ucp-nav {
    display: flex;
  }

  .ucp-brand__product {
    max-width: 190px;
    letter-spacing: .2em;
  }

  .ucp-module-grid {
    grid-template-columns: 1fr;
  }

  .ucp-login__links {
    align-items: flex-start;
    flex-direction: column;
  }
}

.ucp-nav__link.is-active {
  color: var(--text);
}

.ucp-nav__link.is-active::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 6px;
  background: var(--accent);
}

.ucp-button--small {
  min-height: 38px;
  margin-top: 0;
  padding: 10px 13px;
  font-size: 11px;
}

.ucp-hero-stat {
  align-self: end;
  min-width: 148px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(20, 20, 22, .9);
  padding: 18px;
  text-align: right;
}

.ucp-hero-stat span,
.ucp-character-facts dt,
.ucp-back-link {
  color: var(--muted);
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.ucp-hero-stat strong {
  display: block;
  margin-top: 4px;
  font-family: Anton, system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
}

.ucp-character-module {
  display: grid;
  grid-template-columns: minmax(220px, .52fr) minmax(0, 1.48fr);
  align-items: stretch;
  gap: 16px;
}

.ucp-character-module__summary {
  min-height: 184px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(25, 25, 28, .98), rgba(18, 18, 20, .98));
  padding: 20px;
}


.ucp-character-module__summary strong {
  display: block;
  margin-top: 12px;
  font-family: Anton, system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.55rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}


.ucp-character-module__summary p {
  max-width: 340px;
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.ucp-character-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 14px;
}


.ucp-character-preview,
.ucp-character-preview-empty {
  min-height: 186px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #101013;
}

.ucp-character-preview {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  transition: border-color .2s ease, transform .15s ease;
}

.ucp-character-preview:hover {
  border-color: rgba(209, 35, 42, .8);
  transform: translateY(-1px);
}

.ucp-character-preview__render,
.ucp-character-card__media,
.ucp-profile-render {
  display: grid;
  place-items: end center;
  min-height: 150px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(209, 35, 42, .12), rgba(10, 10, 11, .22)),
    radial-gradient(ellipse at 50% 96%, rgba(209, 35, 42, .42), rgba(91, 0, 0, .2) 34%, transparent 68%),
    #0c0c0e;
}

.ucp-character-preview__render img,
.ucp-character-card__media img,
.ucp-profile-render img {
  width: auto;
  max-width: 88%;
  height: var(--skin-render-height, 150px);
  max-height: calc(100% - 22px);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .55));
}

.ucp-character-preview__render {
  --skin-render-height: 148px;
}


.ucp-character-preview__copy {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.ucp-character-preview__copy strong,
.ucp-character-card h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: Oswald, system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

.ucp-character-preview__copy small {
  color: var(--muted);
  line-height: 1.5;
}

.ucp-character-preview-empty {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--muted);
}

.ucp-character-preview-empty strong {
  color: var(--text);
  font-family: Oswald, system-ui, sans-serif;
  text-transform: uppercase;
}

.ucp-empty-state {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(20, 20, 22, .92);
  padding: 32px;
}

.ucp-empty-state h2 {
  margin: 12px 0 8px;
  font-family: Anton, system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  text-transform: uppercase;
}

.ucp-empty-state p {
  margin: 0;
  color: var(--muted);
}

/* Vertical cards are narrow, so the column count is stepped explicitly
   instead of auto-fit: three tiles must fit a row before the viewport is
   wide enough for auto-fit's old 520px minimum to allow it. */
.ucp-character-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  margin-top: 20px;
}

@media (min-width: 760px) {
  .ucp-character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .ucp-character-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ucp-character-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(25, 25, 28, .98), rgba(18, 18, 20, .98));
  overflow: hidden;
}

/* Render box spans the full card width. height:100% feeds the shared
   img rule, whose max-height: calc(100% - 22px) keeps the ground line
   clear of the card edge.

   Child combinator on purpose: character-create.php's review frame
   reuses the .ucp-character-card__media class outside any card, and it
   must keep its own fixed --skin-render-height sizing. */
.ucp-character-card > .ucp-character-card__media {
  --skin-render-height: 100%;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  /* Never let a tall sibling row squash the render box out of ratio. */
  flex-shrink: 0;
}

.ucp-character-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  padding: 14px 18px 16px;
}

/* Free creation slot. Same box as a real card so a short row still reads
   as a full grid, but recessive: dashed border, flat background, and the
   CJ render (skin 0) desaturated down to a silhouette. */
.ucp-character-card--empty {
  border: 1px dashed rgba(155, 160, 166, .28);
  background: rgba(14, 14, 16, .72);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.ucp-character-card--empty .ucp-character-card__media {
  background: none;
  opacity: .25;
  filter: grayscale(1);
  transition: opacity .2s ease;
}

/* Top-aligned, not centred: the label occupies the same line box the
   real card's name does, so a mixed row reads on one baseline. */
.ucp-character-card--empty .ucp-character-card__body {
  align-items: center;
  justify-content: flex-start;
}

.ucp-character-card__empty-label {
  display: flex;
  align-items: center;
  min-height: 2rem;
  color: var(--muted);
  font-family: Oswald, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  text-align: center;
}

.ucp-character-card--empty:hover {
  border-color: rgba(209, 35, 42, .55);
  background: rgba(20, 20, 22, .82);
}

.ucp-character-card--empty:hover .ucp-character-card__media {
  opacity: .42;
}

.ucp-character-card--empty:hover .ucp-character-card__empty-label {
  color: var(--text);
}

/* Sized down from the old 40px: at a ~379px column a long Ime_Prezime
   wrapped and added a line to one card only, leaving its neighbours
   short. Scoped to .ucp-character-card, so character.php's own h2 and
   the creation review heading are untouched. */
.ucp-character-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 1.75rem);
  line-height: 1.15;
}

.ucp-character-card__name:hover {
  color: var(--accent);
}

.ucp-character-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.ucp-character-facts div {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.ucp-character-facts dt,
.ucp-character-facts dd {
  margin: 0;
}

.ucp-character-facts dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.ucp-skin-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 150px;
  padding: 18px;
  color: var(--muted);
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  text-align: center;
}

/* CSS-only tabs on character.php: the radios stay in the DOM (focusable,
   arrow-key switchable) but are visually hidden, and :checked sibling
   selectors drive both the active tab and which panel is displayed. */
.ucp-tabs {
  padding: 6px 0 0;
}

.ucp-tabs__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.ucp-tabs__list {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.ucp-tabs__tab {
  cursor: pointer;
  padding-bottom: 10px;
  color: var(--muted);
  font-family: Oswald, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  transition: color .2s ease;
}

.ucp-tabs__tab:hover {
  color: var(--text);
}

/* Underline matches .ucp-nav__link.is-active in the header. */
.ucp-tabs__tab::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  background: transparent;
}

#ucp-tab-overview:checked ~ .ucp-tabs__list label[for="ucp-tab-overview"],
#ucp-tab-backstory:checked ~ .ucp-tabs__list label[for="ucp-tab-backstory"] {
  color: var(--text);
}

#ucp-tab-overview:checked ~ .ucp-tabs__list label[for="ucp-tab-overview"]::after,
#ucp-tab-backstory:checked ~ .ucp-tabs__list label[for="ucp-tab-backstory"]::after {
  background: var(--accent);
}

#ucp-tab-overview:focus-visible ~ .ucp-tabs__list label[for="ucp-tab-overview"],
#ucp-tab-backstory:focus-visible ~ .ucp-tabs__list label[for="ucp-tab-backstory"] {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  color: var(--text);
}

.ucp-tabs__panel {
  display: none;
}

#ucp-tab-overview:checked ~ .ucp-tabs__panel--overview,
#ucp-tab-backstory:checked ~ .ucp-tabs__panel--backstory {
  display: block;
}

/* Tab 2 holds a single panel, deliberately outside .ucp-dossier-grid so
   character-create's review step keeps that shared 2-column rule. */
.ucp-tabs__panel--backstory {
  margin-top: 18px;
}

.ucp-profile-hero {
  padding: 24px 0 0;
}

/* The tab column is narrower than the old full-bleed hero, and 96px Anton
   overflowed it. Scoped to this page's hero only. */
.ucp-character-profile .ucp-profile-copy h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}


.ucp-back-link {
  display: inline-flex;
  margin-bottom: 18px;
}

.ucp-back-link:hover {
  color: var(--text);
}

.ucp-profile-hero__inner {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr);
  min-height: 430px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(25, 25, 28, .98), rgba(12, 12, 14, .98));
  overflow: hidden;
}

.ucp-profile-render {
  --skin-render-height: 394px;
  min-height: 430px;
}




.ucp-profile-copy {
  align-self: center;
  padding: clamp(24px, 5vw, 48px);
}

.ucp-profile-copy h1 {
  margin: 16px 0 0;
  overflow-wrap: anywhere;
  font-family: Anton, system-ui, sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  line-height: .95;
  text-transform: uppercase;
}

.ucp-profile-copy p {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.ucp-dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.ucp-dossier-panel {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(20, 20, 22, .94);
  padding: 24px;
}

.ucp-character-facts.is-profile {
  margin-top: 20px;
}

@media (max-width: 980px) {
  /* .ucp-character-card and .ucp-character-grid are no longer here: the
     card is a flex column and the grid steps its own columns via
     min-width queries, which this rule would override at 760-980px. */
  .ucp-character-module,
  .ucp-profile-hero__inner,
  .ucp-dossier-grid {
    grid-template-columns: 1fr;
  }

  .ucp-character-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .ucp-dashboard {
    padding-top: 22px;
  }

  .ucp-page-heading__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ucp-hero-stat {
    align-self: stretch;
    text-align: left;
  }

  .ucp-character-preview-list,
  .ucp-character-facts {
    grid-template-columns: 1fr;
  }

  /* .ucp-character-card__media dropped from both rules: the grid card is
     sized by aspect-ratio now, and a fixed min-height/img height would
     override it. .ucp-profile-render (character.php) is unchanged. */
  .ucp-profile-render {
    min-height: 300px;
  }

  .ucp-profile-render img {
    height: 280px;
  }
}

/* Review step (8/8): skin render framed as a card beside the summary. */
.ucp-create-review {
  align-items: stretch;
}

.ucp-create-render {
  display: grid;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(25, 25, 28, .98), rgba(12, 12, 14, .98));
}

.ucp-create-render__frame {
  --skin-render-height: 300px;
  min-height: 0;
  place-items: center;
  border-radius: 2px;
}

@media (max-width: 980px) {
  .ucp-create-render__frame {
    --skin-render-height: 260px;
    min-height: 280px;
  }
}

@media (max-width: 620px) {
  .ucp-create-render {
    padding: 12px;
  }

  /* Overrides the generic .ucp-character-card__media img height in this
     breakpoint so the framed render scales instead of overflowing. */
  .ucp-create-render__frame {
    --skin-render-height: 220px;
    min-height: 240px;
  }

  .ucp-create-render__frame img {
    height: 220px;
  }
}

.ucp-module-card.is-active {
  border-color: rgba(209, 35, 42, .55);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(209, 35, 42, .16), transparent 48%),
    linear-gradient(180deg, rgba(25, 25, 28, .98), rgba(18, 18, 20, .98));
}


/* Account status is two pills under the page heading rather than a panel
   of display-type tiles: only email + ban state are real per-account
   data, and both fit on one line each. */
.ucp-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ucp-account-panel {
  min-height: 0;
  margin-top: 18px;
}

.ucp-account-facts,
.ucp-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 0;
}

.ucp-account-facts div,
.ucp-session-grid div {
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.ucp-account-facts dt,
.ucp-account-facts dd,
.ucp-session-grid dt,
.ucp-session-grid dd {
  margin: 0;
}

.ucp-account-facts dt,
.ucp-session-grid dt {
  color: var(--muted);
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.ucp-account-facts dd,
.ucp-session-grid dd {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-weight: 600;
  line-height: 1.45;
}

.ucp-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 8px;
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.ucp-status-pill.is-good {
  border-color: rgba(51, 170, 51, .45);
  color: #8de28d;
}

.ucp-status-pill.is-warn {
  border-color: rgba(232, 163, 61, .55);
  color: #e8c16b;
}

.ucp-status-pill.is-danger {
  border-color: rgba(209, 35, 42, .7);
  color: #ff888c;
}

.ucp-account-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.ucp-ban-note {
  margin-top: 18px;
  border: 1px solid rgba(209, 35, 42, .5);
  border-radius: 2px;
  background: rgba(209, 35, 42, .1);
  padding: 16px;
}

.ucp-ban-note p {
  margin: 10px 0 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .ucp-account-facts,
  .ucp-session-grid {
    grid-template-columns: 1fr;
  }
}

.ucp-alert.is-success {
  border-color: rgba(51, 170, 51, .45);
  background: rgba(51, 170, 51, .1);
}

.ucp-button--secondary {
  border: 1px solid rgba(155, 160, 166, .34);
  background: #101013;
  color: var(--text);
}

.ucp-button--secondary:hover {
  border-color: rgba(209, 35, 42, .65);
  background: #18181b;
}

.ucp-character-backstory {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ucp-character-backstory.is-profile {
  margin-top: 22px;
}

.ucp-backstory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .36fr);
  align-items: start;
  gap: 18px;
  margin-top: 20px;
}

.ucp-backstory-main {
  min-width: 0;
}

.ucp-backstory-side {
  min-width: 0;
}

.ucp-backstory-form {
  gap: 18px;
}

.ucp-backstory-field {
  min-width: 0;
}

.ucp-backstory-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.ucp-backstory-field__label-row label,
.ucp-backstory-field__label-row span,
.ucp-field-errors {
  font-family: Oswald, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.ucp-backstory-field__label-row label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ucp-backstory-field__label-row span {
  color: #757a80;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.ucp-form textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #0d0d0f;
  color: var(--text);
  padding: 12px 14px;
  font: 500 15px/1.55 Inter, system-ui, sans-serif;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}

.ucp-form textarea:focus {
  border-color: var(--accent);
  background: #101013;
}

.ucp-form input[readonly],
.ucp-form textarea[readonly] {
  color: #c8c8c8;
  background: #101013;
  cursor: default;
}

.ucp-backstory-field.is-invalid input,
.ucp-backstory-field.is-invalid textarea {
  border-color: rgba(209, 35, 42, .82);
}

.ucp-field-errors {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: #ff888c;
  font-size: 10px;
  font-weight: 700;
}

.ucp-backstory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.ucp-backstory-actions .ucp-button {
  margin-top: 0;
}

.ucp-backstory-feedback {
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  .ucp-backstory-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ucp-backstory-field__label-row,
  .ucp-backstory-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .ucp-backstory-field__label-row span {
    text-align: left;
  }

  .ucp-backstory-actions .ucp-button {
    width: 100%;
  }
}

body.ucp-login-page {
  position: relative;
}

body.ucp-login-page::before {
  background-image: linear-gradient(180deg, rgba(10, 10, 11, .78), rgba(10, 10, 11, .96));
}

.ucp-login-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #050506;
}

.ucp-login-bg__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 2200ms ease-in-out;
  will-change: opacity;
}

.ucp-login-bg__slide.is-active {
  opacity: 1;
}

.ucp-login-page .ucp-login h1 {
  font-size: clamp(2.6rem, 10vw, 4.7rem);
}

@media (prefers-reduced-motion: reduce) {
  .ucp-login-bg__slide {
    transition: none;
  }

  .ucp-login-bg__slide:not(:first-child) {
    display: none;
  }
}
