/* r56: native metal controls reconstructed from design/menu-target-r56.png.
   The generated emblem is decoration; text, portraits and state remain live. */
body:not(.playing) {
  --metal-cut: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
  --metal-edge: linear-gradient(
    135deg,
    #d0dce2,
    #657783 24%,
    #a0afb8 48%,
    #35434f 80%,
    #a7b5bd
  );
  --metal-face: linear-gradient(155deg, #31404e 0, #1c2935 25%, #101923 80%);
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button,
    .selection-screen .dino-card,
    .shop-item,
    .selection-screen .preview-inspect,
    .screen-heading .back,
    .utilities button,
    .primary,
    .secondary,
    .mode-card
  ) {
  isolation: isolate;
  position: relative;
  border: 0;
  border-radius: 0;
  clip-path: var(--metal-cut);
  background: var(--metal-edge);
  color: #f2f2e9;
  box-shadow: none;
  text-shadow: 0 2px 2px #000;
  transition:
    filter 0.12s,
    translate 0.12s;
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button,
    .selection-screen .dino-card,
    .shop-item,
    .selection-screen .preview-inspect,
    .screen-heading .back,
    .utilities button,
    .primary,
    .secondary,
    .mode-card
  )::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  clip-path: var(--metal-cut);
  background: var(--metal-face);
  box-shadow:
    inset 0 2px #eff8ff33,
    inset 0 -4px #02070b;
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button[aria-current="page"],
    .selection-screen .dino-card.selected,
    .shop-item.selected,
    .primary
  ) {
  background: linear-gradient(
    135deg,
    #fff2ae,
    #ffbc20 45%,
    #ffe6a2 70%,
    #8c590a
  );
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button[aria-current="page"],
    .selection-screen .dino-card.selected,
    .shop-item.selected
  )::before {
  background: linear-gradient(145deg, #88570e, #342708 45%, #111a21 90%);
  box-shadow:
    inset 0 0 0 2px #ffba26,
    inset 0 2px #fff2bb;
}
body:not(.playing) :is(.screen, .panel, .result) .primary {
  color: #171b1b;
  text-shadow: 0 1px #fff3b5;
}
body:not(.playing) :is(.screen, .panel, .result) .primary::before {
  background: linear-gradient(#ffd965, #ffbd25 55%, #e79a09);
  box-shadow:
    inset 0 2px #fff4bf,
    inset 0 -4px #995c08,
    inset 0 0 0 2px #ffdf80;
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button,
    .dino-card,
    .preview-inspect,
    .back,
    .utilities button,
    .primary,
    .secondary,
    .mode-card
  ):hover:not(:disabled) {
  filter: brightness(1.15);
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button,
    .dino-card,
    .preview-inspect,
    .back,
    .utilities button,
    .primary,
    .secondary,
    .mode-card
  ):active:not(:disabled) {
  translate: 0 2px;
  filter: brightness(0.85);
}
body:not(.playing)
  :is(
    [id="workshop-nav"] button,
    .dino-card,
    .preview-inspect,
    .back,
    .utilities button,
    .primary,
    .secondary,
    .mode-card
  ):focus-visible::before {
  outline: 3px solid #fff;
  outline-offset: -5px;
}
body:not(.playing) button:disabled {
  filter: grayscale(0.65) brightness(0.6);
  cursor: not-allowed;
}
body:not(.playing) #mast {
  padding: 14px 3vw;
  min-height: 74px;
  align-items: center;
}
body:not(.playing) .brand {
  gap: 9px;
}
body:not(.playing) .brand-mark {
  display: flex;
  width: 50px;
  height: 50px;
  font-size: 0;
}
body:not(.playing) .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body:not(.playing) .brand strong {
  color: #fff0c3;
  font-size: 20px;
  letter-spacing: -1px;
  text-shadow: 0 2px #03080c;
}
body:not(.playing) .brand small {
  font-size: 12px;
  color: #ffdc8b;
  letter-spacing: 0.6px;
}
body:not(.playing) .utilities {
  gap: 9px;
  align-items: center;
}
body:not(.playing) .utilities button {
  min-height: 44px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 800;
}
body:not(.playing) #wallet {
  padding: 9px 17px;
  color: #ffcf54;
  font-weight: 900;
  font-size: 19px;
  border: 1px solid #7d8f9d;
  background: #101923e8;
  clip-path: var(--metal-cut);
}
body:not(.playing) #connection {
  font-size: 11px;
  color: #b6c4cc;
}
#home-preview-space {
  display: block;
  position: absolute;
  left: 32vw;
  right: 3vw;
  top: max(96px, 12vh);
  bottom: calc(7vh + clamp(82px, 13vh, 108px) + 170px);
  width: auto;
  height: auto;
  margin: 0;
  pointer-events: none;
}
body[data-screen="home"] .brand {
  padding: 9px 18px;
  border: 1px solid #8998a4;
  background: linear-gradient(130deg, #22313e, #09111b);
  clip-path: var(--metal-cut);
}
body[data-screen="home"] .brand-mark {
  display: none;
}
body[data-screen="home"] .brand small {
  font-size: 17px;
  letter-spacing: 0.3px;
}
.home-copy {
  display: flex;
  align-items: center;
  top: 16vh;
  left: 3vw;
  width: min(34vw, 450px);
  max-width: none;
}
.home-emblem {
  width: 35%;
  flex: 0 0 35%;
  filter: drop-shadow(0 5px 3px #0009);
  z-index: 1;
}
.home-copy h1 {
  font-size: clamp(28px, 3.8vw, 58px);
  line-height: 1.04;
  margin: 0 0 0 -3%;
  padding: 14px 16px 18px 4%;
  width: 70%;
  background: linear-gradient(130deg, #2c3946ed, #0a111bea);
  border-top: 2px solid #a1aeba;
  border-bottom: 3px solid #657684;
  clip-path: var(--metal-cut);
  letter-spacing: -2px;
  transform: skew(-4deg);
  text-shadow:
    2px 3px #0b0e12,
    0 5px 4px #000b;
}
.home-copy h1 span {
  color: #fff1cf;
  font-size: 0.75em;
}
.home-copy h1 em {
  color: #ffc633;
  font-style: normal;
  white-space: nowrap;
}
.main-menu {
  left: 3vw;
  bottom: 7vh;
  width: min(26vw, 350px);
  gap: 15px;
}
.menu-command {
  height: clamp(76px, 12vh, 108px);
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  filter: drop-shadow(0 5px 2px #000b);
}
.menu-command .button-face {
  inset: 0 0 4px;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  clip-path: var(--metal-cut);
  background: var(--metal-edge);
  padding: 6px 16px 8px 6px;
  gap: 12px;
  color: #f7f3e4;
  box-shadow: none;
}
.menu-command .button-face::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  clip-path: var(--metal-cut);
  background: linear-gradient(145deg, #334452, #111b24 55%);
  box-shadow:
    inset 0 2px #d7e7f84d,
    inset 0 -5px #030a10;
}
.menu-command .button-face::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid #8b9ba64d;
  clip-path: var(--metal-cut);
}
.menu-command img {
  width: 38%;
  height: 100%;
  object-fit: contain;
  border-right: 2px solid #728593;
  padding-right: 8px;
  filter: drop-shadow(0 3px 3px #000);
}
.menu-command .button-face > span:not(.play-glyph) {
  font-size: clamp(19px, 2.25vw, 32px);
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow: 0 3px 2px #000;
}
.menu-command:hover {
  filter: brightness(1.14) drop-shadow(0 5px 2px #000b);
}
.menu-command:active .button-face {
  translate: 0 3px;
  filter: brightness(0.85);
}
.menu-command:focus-visible {
  outline: none;
}
.menu-command:focus-visible .button-face::after {
  border: 3px solid white;
}
.deploy-command {
  width: min(31vw, 410px);
  height: clamp(82px, 13vh, 108px);
  right: 3vw;
  left: auto;
  bottom: 7vh;
}
.deploy-command .button-face {
  justify-content: center;
  gap: 18px;
  background: linear-gradient(
    135deg,
    #fff4bf,
    #c19443 28%,
    #f1daa1 55%,
    #71501f
  );
  color: #171d22;
  padding: 8px 16px;
}
.deploy-command .button-face::before {
  inset: 5px;
  background: linear-gradient(#ffda66, #ffc52b 45%, #efa10d);
  box-shadow:
    inset 0 3px #fff3bd,
    inset 0 -5px #ad710d;
}
.deploy-command .button-face::after {
  border-color: #ffe9a3;
}
.deploy-command .button-face > span:not(.play-glyph) {
  font-size: clamp(27px, 3vw, 42px);
  color: #17202a;
  text-shadow: 0 1px #fff2ac;
}
.deploy-command .play-glyph {
  color: #29333c;
  font-size: 30px;
}
.featured {
  right: 3vw;
  bottom: calc(7vh + clamp(82px, 13vh, 108px) + 18px);
  width: min(31vw, 410px);
  padding: 12px 15px 12px 84px;
  text-align: left;
  background: linear-gradient(120deg, #172835ed, #0d1720ad);
  border-left: 4px solid #ffc32d;
  border-bottom: 1px solid #8093a0;
}
.featured #home-portrait {
  position: absolute;
  left: 5px;
  top: 10px;
  width: 72px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px #000);
}
.featured h2 {
  font-size: clamp(24px, 2.5vw, 35px);
  margin: 0;
}
#home-dino-level {
  color: #ffd875;
  font-size: 12px;
  font-weight: 800;
}
.featured #home-traits {
  justify-content: flex-start;
  margin: 7px 0 5px;
}
.featured .trait-chip {
  border-color: #728694;
  color: #d6e0e4;
  font-size: 11px;
  background: #101a24;
}
.featured #home-weapons {
  color: #bdcbd3;
  font-size: 11px;
  line-height: 1.5;
}
body:not(.playing)
  :is(.selection-screen .dino-detail, .equipment-panel, .shop-detail) {
  border-radius: 2px;
  border-color: #8496a3;
  background: linear-gradient(140deg, #263441f5, #101a24f2 65%);
  box-shadow:
    inset 0 2px #c8d5df38,
    0 5px 8px #0005;
}
body:not(.playing) .selection-screen .dino-card {
  padding: 4px;
}
body:not(.playing) .selection-screen .dino-card::before {
  display: block;
  width: auto;
  height: auto;
  transform: none;
  opacity: 1;
  border: 0;
}
body:not(.playing) .selection-screen .dino-card strong {
  padding: 6px 2px;
  background: linear-gradient(transparent, #060e17ee);
}
body:not(.playing) [id="workshop-nav"] button {
  font-weight: 900;
}
body:not(.playing) #workshop-nav button {
  border: 0;
  border-radius: 0;
  background: var(--metal-edge);
  box-shadow: none;
}
body:not(.playing) #workshop-nav button[aria-current="page"] {
  background: linear-gradient(135deg, #fff2ae, #ffbc20 45%, #ffe6a2 70%, #8c590a);
  box-shadow: none;
}
body:not(.playing) .field-card {
  gap: 12px;
  padding: 22px;
}
body:not(.playing) .field-card p {
  margin: 0;
  line-height: 1.5;
}
body:not(.playing) .field-card #pve {
  display: grid;
  grid-template-columns: 1fr 43%;
  grid-template-rows: 22px 1fr 32px;
  min-height: 170px;
  flex-shrink: 0;
  padding: 14px 18px;
  text-align: left;
}
body:not(.playing) #pve .mode-index {
  color: #684410;
  grid-column: 1;
  font-size: 11px;
  align-self: center;
}
body:not(.playing) #pve strong {
  font-size: 30px;
  margin: 0;
  grid-column: 1;
  align-self: center;
}
body:not(.playing) #pve .mode-art {
  grid-column: 2;
  grid-row: 1 / 3;
  opacity: 1;
  margin: 0;
  width: 100%;
  height: 100%;
}
body:not(.playing) #pve .mode-art img {
  width: 100%;
  height: 95px;
  object-fit: contain;
}
body:not(.playing) #pve .mode-bottom {
  grid-column: 1 / 3;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #3e321c;
}
@media (max-width: 1100px) and (min-width: 601px) {
  .main-menu {
    width: 27vw;
    gap: 10px;
  }
  .menu-command .button-face {
    gap: 6px;
    padding-right: 9px;
  }
  .menu-command img {
    padding-right: 5px;
  }
  .menu-command .button-face > span:not(.play-glyph) {
    font-size: 21px;
  }
  .deploy-command {
    width: 32vw;
  }
  .deploy-command .button-face > span:not(.play-glyph) {
    font-size: 28px;
  }
  .featured {
    width: 32vw;
    padding-left: 64px;
    padding-right: 7px;
  }
  .featured #home-portrait {
    width: 52px;
  }
}
@media (max-width: 600px) {
  body:not(.playing) #mast {
    padding: 9px 12px;
    min-height: 64px;
  }
  body:not(.playing) .brand-mark {
    width: 36px;
    height: 36px;
  }
  body:not(.playing) .brand strong {
    font-size: 14px;
  }
  body:not(.playing) .brand small {
    font-size: 10px;
    letter-spacing: 0;
  }
  body[data-screen="home"] .brand {
    padding: 9px 11px;
  }
  body[data-screen="home"] .brand small {
    font-size: 12px;
  }
  body[data-screen="home"] .brand {
    padding: 9px 7px;
    flex-shrink: 0;
  }
  body[data-screen="home"] .brand small {
    font-size: 11px;
    white-space: nowrap;
    letter-spacing: 0;
  }
  body:not(.playing) #wallet {
    font-size: 12px;
    padding: 10px 7px;
    white-space: nowrap;
  }
  body:not(.playing) .utilities {
    gap: 4px;
  }
  body:not(.playing) .utilities button {
    width: 50px;
    min-height: 44px;
    padding: 3px;
    font-size: 10px;
    word-break: keep-all;
  }
  #home-preview-space {
    display: block;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 190px;
    bottom: calc(280px + env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    margin: 0;
    pointer-events: none;
  }
  .home-copy {
    top: 80px;
    left: 13px;
    width: min(76vw, 320px);
  }
  .home-copy h1 {
    font-size: 35px;
    padding-top: 8px;
    padding-bottom: 10px;
  }
  .home-copy h1 span {
    font-size: 0.7em;
  }
  .main-menu {
    left: 12px;
    right: 12px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    width: auto;
    gap: 7px;
  }
  .menu-command {
    height: 80px;
    min-height: 80px;
  }
  .menu-command .button-face {
    padding: 3px;
    gap: 0;
    flex-direction: column;
  }
  .menu-command img {
    width: 72px;
    height: 46px;
    border: 0;
    padding: 0;
  }
  .menu-command .button-face > span:not(.play-glyph) {
    font-size: 15px;
    letter-spacing: -0.5px;
  }
  .deploy-command {
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: auto;
    height: 70px;
    min-height: 70px;
  }
  .deploy-command .button-face {
    flex-direction: row;
    gap: 14px;
  }
  .deploy-command .button-face > span:not(.play-glyph) {
    font-size: 28px;
  }
  .featured {
    right: 12px;
    bottom: calc(187px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 190px;
    max-width: calc(100vw - 24px);
    padding: 7px 10px 7px 57px;
  }
  .featured #home-portrait {
    left: 2px;
    top: 3px;
    width: 50px;
    height: 64px;
  }
  .featured h2 {
    font-size: 22px;
  }
  .featured #home-traits {
    display: none;
  }
  #home-dino-level {
    font-size: 11px;
  }
  .featured #home-weapons {
    font-size: 10px;
    max-width: 245px;
  }
}
@media (min-width: 601px) and (max-height: 620px) {
  body:not(.playing) #mast {
    padding: 6px 3vw;
    min-height: 50px;
  }
  body:not(.playing) .brand-mark {
    width: 32px;
    height: 32px;
  }
  body:not(.playing) .utilities button {
    min-height: 38px;
    padding: 6px 10px;
  }
  body[data-screen="home"] .brand {
    padding: 6px 12px;
  }
  body[data-screen="home"] .brand small {
    font-size: 13px;
  }
  .home-copy {
    top: 70px;
    width: 29vw;
  }
  .home-copy h1 {
    font-size: 28px;
    padding: 7px 10px 9px 4%;
  }
  .main-menu {
    bottom: 20px;
    width: 25vw;
    gap: 6px;
  }
  .menu-command {
    height: 57px;
    min-height: 57px;
  }
  .menu-command .button-face > span:not(.play-glyph) {
    font-size: 18px;
  }
  .deploy-command {
    width: 30vw;
    height: 66px;
    bottom: 20px;
  }
  .deploy-command .button-face > span:not(.play-glyph) {
    font-size: 25px;
  }
  .featured {
    bottom: 100px;
    width: 30vw;
  }
  .featured h2 {
    font-size: 22px;
  }
  .featured #home-traits {
    display: none;
  }
}
@media (max-width: 360px) {
  body:not(.playing) .brand {
    gap: 4px;
  }
  body:not(.playing) .brand-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
  body:not(.playing) .brand strong {
    font-size: 11px;
    white-space: nowrap;
    letter-spacing: -0.4px;
  }
  body:not(.playing) .brand small {
    font-size: 8.5px;
    white-space: nowrap;
    letter-spacing: 0;
  }
  body[data-screen="home"] .brand small {
    font-size: 11px;
  }
  .home-copy {
    top: 76px;
    width: 230px;
  }
  .home-copy h1 {
    font-size: 29px;
  }
  #home-preview-space {
    top: 157px;
  }
}
