/* ------------------------------ Screens ------------------------------ */
.screens {
  position: absolute;
  inset: 0;
}
#pf-ui.in-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(14, 8, 6, 0.55) 0%,
    rgba(14, 8, 6, 0) 30%,
    rgba(14, 8, 6, 0) 45%,
    rgba(14, 8, 6, 0.82) 78%,
    rgba(14, 8, 6, 0.95) 100%
  );
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  animation: scrIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  padding: calc(14px + var(--sat)) calc(16px + var(--sar)) calc(14px + var(--sab)) calc(16px + var(--sal));
}
.screen.leaving {
  animation: scrOut 0.25s ease both;
  pointer-events: none;
}
@keyframes scrIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes scrOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}
.screen:not(.menu):not(.results) {
  background: rgba(18, 11, 9, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.scr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex: none;
}
.scr-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(16px, 4.6vw, 24px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.back-btn {
  pointer-events: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 16px 0 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2);
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  transition:
    transform 0.1s,
    background 0.15s;
}
.back-btn .ic {
  font-size: 17px;
  color: var(--primary);
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.back-btn:active {
  transform: scale(0.96);
}
.head-spacer {
  width: 1px;
}
.scr-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px 12px;
  max-width: 760px;
  width: 100%;
  align-self: center;
}
.scr-foot {
  flex: none;
  padding-top: 10px;
  max-width: 760px;
  width: 100%;
  align-self: center;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

/* Menu */
.menu {
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 10px;
}
.menu-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 760px;
}
.best {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(20, 12, 10, 0.55);
}
.best b {
  color: var(--text);
  font-family: var(--f-display);
  font-weight: 400;
}
.logo {
  margin-top: 2vh;
  width: min(84vw, 470px, 56vh);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
  animation: logoIn 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both 0.1s;
  cursor: default;
}
.logo-img {
  width: 100%;
  display: block;
}
.logo-text b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(48px, 15vw, 96px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff3d6;
  -webkit-text-stroke: 3px var(--secondary);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #6b1a14;
  transform: skew(-6deg);
}
.logo-text span {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 16px;
  border-radius: 20px;
  background: var(--secondary);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 13px;
}
@keyframes logoIn {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.menu-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 420px);
  margin-top: auto;
}
.btn-big {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 20px;
  text-align: left;
  background: rgba(36, 24, 21, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 0 1.5px var(--line);
  transition:
    transform 0.08s,
    box-shadow 0.08s;
  animation: scrIn 0.5s both;
}
.btn-big:nth-child(2) {
  animation-delay: 0.06s;
}
.btn-big:nth-child(3) {
  animation-delay: 0.12s;
}
.btn-big:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.btn-big .bb-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  color: var(--primary);
  flex: none;
}
.btn-big .bb-txt {
  display: flex;
  flex-direction: column;
}
.btn-big b {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn-big small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.btn-big.primary {
  background: linear-gradient(180deg, #ffd06a, var(--primary));
  color: #2a1606;
  box-shadow:
    0 5px 0 #a86f12,
    0 10px 30px rgba(242, 181, 58, 0.25);
}
.btn-big.primary .bb-ic {
  background: rgba(42, 22, 6, 0.12);
  color: #2a1606;
}
.btn-big.primary small {
  color: rgba(42, 22, 6, 0.7);
}
.btn-big.primary:active {
  box-shadow: 0 1px 0 #a86f12;
}
.menu-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(100%, 420px);
}
.menu-row .pill {
  height: auto;
  min-height: 50px;
  padding: 7px 4px;
  border-radius: 14px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-size: 12.5px;
  line-height: 1.1;
}
.menu-row .pill .ic {
  font-size: 17px;
  color: var(--primary);
}
/* lane & ball pickers on the main menu */
.loadout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(100%, 420px);
}
.lo-card {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border-radius: 16px;
  background: rgba(20, 12, 10, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1.5px var(--line);
  overflow: hidden;
}
.lo-arrow {
  pointer-events: auto;
  flex: none;
  width: 30px;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 16px;
  transition: background 0.15s;
}
.lo-arrow:hover {
  background: rgba(255, 255, 255, 0.08);
}
.lo-arrow:active {
  background: rgba(255, 255, 255, 0.14);
}
.lo-arrow:disabled {
  opacity: 0.3;
}
.lo-main {
  pointer-events: auto;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  text-align: left;
}
.lo-main:active {
  transform: scale(0.97);
}
.lo-art {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.lo-art-lane {
  width: 44px;
  height: 34px;
  border-radius: 9px;
  position: relative;
  overflow: hidden;
}
.lo-art-lane::after {
  content: '';
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: -4px;
  top: 30%;
  background: linear-gradient(180deg, rgba(255, 220, 160, 0.2), rgba(230, 180, 120, 0.9));
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}
.lo-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.lo-txt small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.lo-txt b {
  font-size: 13.5px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-foot {
  font-size: 12px;
  color: var(--muted);
}

/* Party */
.party-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.party-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 4px 0 0 var(--pc);
}
.swatch {
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pc);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  flex: none;
}
.name-in {
  pointer-events: auto;
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 0;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.3);
  font-weight: 700;
  font-size: 16px;
  user-select: text;
  -webkit-user-select: text;
}
.ball-pick {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ball-thumb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.06);
}
.ball-thumb.sm {
  width: 44px;
  height: 44px;
}
.spacer {
  width: 36px;
}

/* Challenges */
.ch-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ch-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform 0.1s;
}
.ch-item:active {
  transform: scale(0.98);
}
.ch-item.done {
  box-shadow: inset 0 0 0 1.5px rgba(242, 181, 58, 0.4);
}
.ch-item.locked {
  opacity: 0.45;
}
.ch-num {
  width: 26px;
  font-family: var(--f-display);
  color: var(--muted);
  text-align: center;
  flex: none;
}
.pin-diag {
  color: var(--text);
  display: inline-flex;
  flex: none;
}
.ch-txt {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ch-txt b {
  font-size: 16px;
}
.ch-txt small {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}
.ch-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}
.reward {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

/* Shop */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  flex: none;
  max-width: 760px;
  width: 100%;
  align-self: center;
  scrollbar-width: none;
}
.tab {
  pointer-events: auto;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.tab.on {
  background: var(--primary);
  color: #2a1606;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.shop-item {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform 0.1s;
}
.shop-item:active {
  transform: scale(0.97);
}
.shop-item.equipped {
  box-shadow:
    inset 0 0 0 2px var(--primary),
    0 0 24px rgba(242, 181, 58, 0.18);
}
.shop-item .art {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 44px;
}
.shop-item .art-lane {
  border-radius: 16px;
  width: 100%;
  height: 92px;
  position: relative;
  overflow: hidden;
}
.shop-item .art-lane::after {
  content: '';
  position: absolute;
  left: 35%;
  right: 35%;
  bottom: -10px;
  top: 30%;
  background: linear-gradient(180deg, rgba(255, 220, 160, 0.2), rgba(230, 180, 120, 0.85));
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}
.shop-item .art-celebration,
.shop-item .art-trail {
  background: rgba(255, 255, 255, 0.06);
}
.shop-item.notowned .art {
  filter: saturate(0.75) brightness(0.85);
}
.si-name {
  font-size: 14px;
  text-align: center;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}
.tag.on {
  background: var(--primary);
  color: #2a1606;
}
.tag.price {
  color: var(--primary);
  background: rgba(242, 181, 58, 0.12);
}
.tag.price.poor {
  opacity: 0.55;
}
.tag.lock {
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

/* Stats */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.tile {
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tile b {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
}
.tile small {
  color: var(--muted);
  font-size: 11.5px;
}
.tile.accent b {
  color: var(--primary);
}
.chart svg {
  width: 100%;
  height: 120px;
  color: var(--muted);
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.ach {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.4;
  text-align: center;
}
.ach.got {
  opacity: 1;
  background: rgba(242, 181, 58, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(242, 181, 58, 0.35);
}
.ach-ic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--f-display);
  font-size: 14px;
  color: var(--primary);
}
.ach small {
  font-size: 11px;
  color: var(--muted);
}
.ach.pop {
  animation: starpop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both 0.8s;
}

/* Settings */
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.set-row .set-l {
  flex: 1 1 140px;
}
.set-row:last-child {
  border-bottom: 0;
}
.set-l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.set-l small {
  color: var(--muted);
  font-size: 12px;
}
.seg {
  pointer-events: auto;
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 12px;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.seg-b {
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.seg-b.on {
  background: var(--primary);
  color: #2a1606;
}
.toggle {
  pointer-events: auto;
  width: 52px;
  height: 30px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  flex: none;
  transition: background 0.2s;
}
.toggle i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.toggle.on {
  background: var(--ok);
}
.toggle.on i {
  transform: translateX(22px);
}
.slider {
  pointer-events: auto;
  width: min(46vw, 200px);
  accent-color: var(--primary);
}
.select {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 700;
}
.settings .card .btn {
  margin-bottom: 8px;
}

/* Help */
.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.help-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.help-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
  flex: none;
  font-size: 17px;
}
.mk {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff3dd;
  color: #2a1606;
  font-family: var(--f-display);
  flex: none;
}
.mk.x {
  background: var(--secondary);
  color: #fff;
}
.mk.s {
  background: var(--accent);
  color: #fff;
}
/* End of css/screens.css (complete file). */
