@import url('/pack.css');
@import url('/battle.css');
.gx-profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.gx-profile-identity .gx-heading {
  flex: 1;
  margin: 0;
}
.gx-scene {
  padding: clamp(28px, 4vw, 60px) 0 68px;
  --blue: #a5ceee;
  --orange: #ffb098;
  --gx-control: #44352b;
  --gx-hover: #594337;
  --gx-border: #9b8066;
  --gx-button-ink: #342318;
}
.gx-heading,
.gx-sectionhead,
.gx-rail,
.gx-tabs,
.gx-fields,
.gx-filters,
.gx-sectionhead,
.gx-score,
.gx-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gx-heading {
  justify-content: space-between;
  margin: 0 0 clamp(22px, 3vw, 36px);
  align-items: flex-end;
}
.gx-heading h1 {
  font: 800 clamp(38px, 5.4vw, 82px) / 0.97 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.gx-heading p,
.gx-empty p,
.gx-rulecard p,
.gx-confirm p,
.gx-rules p,
.gx-note,
.gx-settings p,
.gx-result p,
.gx-offer p,
.gx-detail p,
.gx-wait p {
  color: var(--muted);
  max-width: 66ch;
}
.gx-heading p {
  margin-top: 10px;
  font-size: clamp(16px, 1.5vw, 20px);
}
.gx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--gx-border);
  border-radius: 5px;
  background: var(--gx-control);
  color: var(--text);
  font: 600 16px/1.2 var(--sans);
  text-align: center;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.gx-button:hover:not(:disabled) {
  background: var(--gx-hover);
  border-color: var(--lime);
  transform: translateY(-1px);
}
.gx-button.gx-primary,
.gx-button.gx-primary:hover:not(:disabled) {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--gx-button-ink);
}
.gx-button:disabled {
  background: #41352e;
  color: #c6b9ab;
  border-color: #76604d;
}
.gx-rail,
.gx-tabs,
.gx-fields,
.gx-filters {
  flex-wrap: wrap;
}
.gx-rail {
  margin: 16px 0 0;
}
.gx-tabs {
  margin-bottom: 16px;
  gap: 5px;
}
.gx-tabs .gx-button {
  min-height: 37px;
}
.gx-empty,
.gx-wait,
.gx-confirm,
.gx-notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(18px, 3vw, 36px);
}
.gx-empty h2,
.gx-wait h2,
.gx-sectionhead h2,
.gx-rules h2,
.gx-result h2,
.gx-subtitle,
.gx-product h2,
.pk-product h2,
.pk-reveal-info h2 {
  font: 800 clamp(26px, 3vw, 42px) / 1.03 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.gx-empty p,
.gx-wait p {
  margin: 8px 0 16px;
}
.gx-empty .gx-button + .gx-button {
  margin-left: 8px;
}
.gx-note {
  margin: 12px 0;
}
.gx-note a {
  margin-left: 6px;
}
.gx-scene label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.gx-scene input:not([type='checkbox']),
.gx-scene select {
  height: 44px;
  border: 1px solid var(--gx-border);
  border-radius: 5px;
  background: #2d221b;
  color: var(--text);
  font: 400 16px/1.2 var(--sans);
  padding: 8px 12px;
  min-width: 0;
  max-width: 100%;
  caret-color: var(--lime);
}
.gx-scene select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23efcf9e' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 15px;
  background-position: right 9px center;
}
.gx-scene input::placeholder {
  color: #c9b8a3;
}
.gx-scene select:disabled {
  color: var(--muted);
}
.gx-scene .gx-check {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}
.gx-check input {
  width: 18px;
  height: 18px;
}
.gx-form {
  display: grid;
  gap: 18px;
}
.gx-narrow {
  max-width: 420px;
}
.gx-form > .gx-button {
  justify-self: start;
}
.gx-rename { margin-top: 1.5rem; }
.gx-rename summary { cursor: pointer; width: fit-content; padding: .5rem 0; }
.gx-rename form { margin-top: .5rem; }
.gx-error {
  padding: 12px 16px;
  margin: 0 0 18px;
  border: 1px solid #8f6652;
  border-radius: 5px;
  color: #ffe3d2;
  background: #332520;
}
.gx-filters {
  align-items: flex-end;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 18px 0 24px;
}
.gx-search {
  flex: 1 1 210px;
}
.gx-filters select {
  min-width: 128px;
}
.gx-count {
  margin-left: auto;
  align-self: flex-end;
  padding: 9px 0;
  color: var(--muted);
}
.gx-gallery,
.gx-hand-picker {
  display: grid;
  gap: clamp(12px, 2vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(min(155px, 42%), 1fr));
}
.gx-gallery .gx-empty {
  grid-column: 1/-1;
}
.gx-tile,
.gx-pick,
.gx-handcard {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: var(--text);
  transition: transform 0.18s;
}
.gx-tile:hover,
.gx-pick:hover,
.gx-handcard:hover:not(:disabled) {
  transform: translateY(-4px);
}
.gx-tilemeta,
.gx-pick > span:last-child:not(.triad-card),
.pk-summary p {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}
.gx-tile .triad-card,
.gx-pick .triad-card,
.gx-handcard .triad-card {
  display: block;
}
.gx-detail {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(26px, 6vw, 82px);
  margin: 24px 0;
}
.gx-detail .gx-heading {
  margin-bottom: 15px;
}
.gx-detail .gx-heading h1 {
  font-size: clamp(36px, 5vw, 80px);
}
.gx-detailcard {
  width: 100%;
  perspective: 800px;
}
.gx-detailmeta {
  font-weight: 600;
  color: var(--gold) !important;
}
.gx-ranks,
.gx-profile-stats,
.pk-product-info dl {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(15px, 3vw, 48px);
  padding: 17px 0;
  border-block: 1px solid var(--line);
}
.gx-ranks dt,
.gx-profile-stats dt,
.pk-product-info dt {
  color: var(--muted);
  font-size: 14px;
}
.gx-ranks dd,
.gx-profile-stats dd,
.pk-product-info dd {
  margin: 0;
  font: 700 30px/1.2 var(--condensed);
  font-variant-numeric: tabular-nums;
}
.gx-detail .gx-fields {
  margin-top: 17px;
}
.gx-profile-stats {
  margin-top: -6px;
}
.gx-find {
  display: flex;
  align-items: flex-end;
  max-width: 670px;
}
.gx-find label {
  flex: 1;
}
.gx-people {
  margin: 15px 0;
  max-width: 760px;
}
.gx-people > div,
.gx-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.gx-people a:not(.gx-button),
.gx-offer a:not(.gx-button) {
  color: var(--lime);
  font-weight: 600;
}
.gx-people span,
.gx-offer-status {
  color: var(--muted);
  font-size: 14px;
}
.gx-subtitle {
  margin: 34px 0 14px;
}
.gx-offer .gx-rail {
  margin: 0;
}
.gx-exchange {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 36px);
  max-width: 850px;
}
.gx-exchange-side {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.gx-exchange-art {
  width: min(100%, 230px);
  margin: 16px auto 0;
  aspect-ratio: 4/5;
  display: grid;
  place-items: center;
}
.gx-exchange-art > span:not(.triad-card) {
  color: var(--muted);
}
.gx-setup {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 54px);
  align-items: start;
}
.gx-settings {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.gx-modephoto {
  height: 132px;
  background-size: cover;
  background-position: center;
}
.gx-settings .gx-fields {
  display: grid;
  gap: 14px;
  padding: 20px 20px 12px;
}
.gx-settings p {
  margin: 0 20px 15px;
  line-height: 1.45;
}
.gx-sectionhead {
  justify-content: space-between;
  margin-bottom: 12px;
}
.gx-sectionhead > span {
  font-weight: 600;
  color: var(--lime);
  white-space: nowrap;
}
.gx-hand-picker {
  grid-template-columns: repeat(auto-fill, minmax(min(105px, 30%), 1fr));
  gap: 13px;
}
.gx-pick.picked .triad-card,
.gx-handcard.picked .triad-card {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}
.gx-pick.picked,
.gx-handcard.picked {
  position: relative;
}
.gx-pick.picked:after,
.gx-handcard.picked:after {
  content: '';
  position: absolute;
  right: 7px;
  top: 7px;
  width: 15px;
  height: 15px;
  border: 2px solid #3e291b;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 2px var(--lime);
}
.gx-hand-block .gx-rail {
  margin-top: 20px;
}
.gx-notice {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.gx-wait {
  max-width: 700px;
}
.gx-wait label {
  max-width: 580px;
}
.gx-wait-chip {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--lime);
  border-radius: 50%;
  margin-bottom: 15px;
  animation: gx-spin 1s linear infinite;
}
@keyframes gx-spin {
  to {
    transform: rotate(1turn);
  }
}
.gx-table {
  display: grid;
  grid-template-columns: minmax(260px, 510px) minmax(230px, 1fr);
  align-items: start;
  gap: clamp(20px, 5vw, 70px);
  max-width: 1110px;
  margin: auto;
}
.gx-score {
  justify-content: space-between;
  padding: 7px 8px 15px;
  font-weight: 600;
  line-height: 1.1;
}
.gx-score > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.gx-score span {
  overflow-wrap: anywhere;
}
.gx-score strong {
  font: 700 32px/1 var(--condensed);
}
.gx-score .you {
  color: var(--blue);
}
.gx-score .them {
  color: var(--orange);
}
.gx-score i {
  color: var(--muted);
  font-size: 14px;
}
.gx-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid #987855;
  border-radius: 9px;
  background: #392920;
}
.gx-space {
  min-width: 0;
  position: relative;
  aspect-ratio: 4/5;
  display: grid;
  place-items: center;
  padding: 0;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #8b6b4d;
  border-radius: 5px;
  background: #604735;
  color: #f2dfbe;
  font: 600 clamp(14px, 2vw, 20px) / 1 var(--condensed);
  transition:
    background 0.18s,
    border-color 0.18s;
}
.gx-space:nth-child(even) {
  background: #4e392d;
}
.gx-space.available {
  border-style: dashed;
  border-color: #c0a176;
}
.gx-space:not(.occupied):hover:not(:disabled) {
  background: #71533e;
  border-color: var(--lime);
}
.gx-space.occupied {
  border: 2px solid var(--owner);
  background: var(--owner);
}
.gx-space.yours {
  --owner: var(--blue);
}
.gx-space.theirs {
  --owner: var(--orange);
}
.gx-space .triad-card {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 2px;
}
.gx-space.occupied:after {
  content: '';
  position: absolute;
  inset: auto 14% 0;
  height: 4px;
  z-index: 2;
  background: var(--owner);
  border-radius: 4px 4px 0 0;
}
.gx-space.placed {
  animation: gx-place 0.42s cubic-bezier(0.17, 0.7, 0.3, 1) both;
}
.gx-space.captured .triad-card {
  animation: gx-capture 0.65s ease-in-out both;
}
@keyframes gx-place {
  from {
    transform: translateY(-10px) scale(0.91);
    filter: brightness(1.55);
  }
  to {
    transform: none;
    filter: none;
  }
}
@keyframes gx-capture {
  0% {
    transform: perspective(300px) rotateY(0);
  }
  48% {
    transform: perspective(300px) rotateY(85deg);
    filter: brightness(1.8);
  }
  100% {
    transform: perspective(300px) rotateY(0);
  }
}
.gx-command {
  min-width: 0;
  padding-top: 11px;
}
.gx-turn {
  color: var(--lime);
  font-weight: 600;
  margin: 0 0 16px;
}
.gx-hand {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  align-items: start;
}
.gx-handcard {
  aspect-ratio: 4/5;
}
.gx-handcard:disabled {
  cursor: default;
}
.gx-hand-empty {
  aspect-ratio: 4/5;
  display: block;
  border: 1px dashed var(--line);
  border-radius: 5px;
}
.gx-handcard.picked {
  transform: translateY(-4px);
}
.gx-rulecard {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  margin: 21px 0 10px;
}
.gx-rulecard h3,
.gx-rules dt,
.gx-offer h3 {
  font: 700 23px/1.1 var(--condensed);
}
.gx-rulecard p {
  margin: 8px 0 12px;
}
.gx-meta {
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0;
}
.gx-practice-rule {
  margin: 14px 0;
  max-width: 200px;
}
.gx-confirm {
  padding: 13px;
}
.gx-confirm .gx-rail {
  margin-top: 9px;
}
.gx-result {
  border: 1px solid #a48256;
  border-radius: 8px;
  background: #453224;
  padding: 18px 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 0 24px;
}
.gx-result h2 {
  color: var(--lime);
}
.gx-result .gx-rail {
  margin: 0;
}
.gx-rules {
  max-width: 800px;
}
.gx-rules section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.gx-rules h2 {
  margin-bottom: 12px;
}
.gx-rules p + p {
  margin-top: 12px;
}
.gx-rules dl {
  margin: 16px 0;
}
.gx-rules dl > div {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 10px;
  margin: 12px 0;
}
.gx-rules dd {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 800px) {
  .gx-table {
    grid-template-columns: minmax(200px, 1.1fr) minmax(180px, 1fr);
    gap: 17px;
  }
  .gx-hand {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 330px;
  }
  .gx-setup {
    grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1fr);
  }
}
@media (max-width: 620px) {
  .gx-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .gx-heading h1 {
    font-size: 42px;
  }
  .gx-detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .gx-detailcard {
    max-width: 245px;
    margin: auto;
  }
  .gx-filters {
    gap: 9px;
  }
  .gx-filters label {
    flex: 1 1 100px;
  }
  .gx-filters .gx-search {
    flex-basis: 100%;
  }
  .gx-filters select {
    min-width: 0;
  }
  .gx-table,
  .gx-setup {
    grid-template-columns: 1fr;
  }
  .gx-board-area {
    max-width: 370px;
    width: 100%;
    margin: auto;
  }
  .gx-hand {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 100%;
  }
  .gx-board {
    gap: 4px;
    padding: 5px;
  }
  .gx-settings .gx-fields {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    padding: 12px;
  }
  .gx-settings p {
    margin-inline: 12px;
  }
  .gx-modephoto {
    height: 90px;
  }
  .gx-command {
    padding-top: 0;
  }
  .gx-result {
    padding: 15px;
  }
  .gx-exchange-side {
    padding: 8px;
  }
  .gx-exchange {
    gap: 8px;
  }
  .gx-find {
    gap: 9px;
  }
  .gx-hand-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gx-scene {
    padding-top: 26px;
  }
  .gx-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .gx-scene *,
  .gx-scene *:before,
  .gx-scene *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
.gx-detailcard > .gx-button { display:block; margin: .75rem auto 0 }
.gt-biography {
  --ink:#382c23; --rule:#9f8663; --paper:#f5edda;
  width:min(350px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); box-sizing:border-box;
  padding:clamp(22px,6vw,35px); color:var(--ink); background:var(--paper);
  border:3px double var(--rule); border-radius:5px; box-shadow:0 12px 50px #211a19a6;
  font: 16px/1.45 Georgia,serif; text-align:left;
}
.gt-biography[data-edition=fantasy] { --paper:#e6ecf2; --ink:#182f4a; --rule:#4c6985 }
.gt-biography[data-edition=vintage] { --paper:#efe0bd; --ink:#4c3422 }
.gt-biography.gt-bio-gold { border-color:#a2782e }
.gt-biography::backdrop { background:#181411ba }
.gt-biography[open] { animation:gt-bio-open .28s cubic-bezier(.16,.75,.24,1) }
.gt-biography h2 { margin:.55rem 0 .3rem; font:700 1.8rem/1.04 Georgia,serif; text-wrap:balance }
.gt-bio-kicker,.gt-bio-dates,.gt-bio-note,.gt-bio-source {font: 14px/1.35 var(--body,sans-serif)}
.gt-bio-kicker { padding-bottom:.55rem; border-bottom:1px solid var(--rule); margin:0; font-weight:bold }
.gt-bio-dates { margin:0 0 1.15rem }
.gt-bio-text { margin:.7rem 0; font-size:1.08rem; line-height:1.45 }
.gt-bio-game { padding-top:.7rem; border-top:1px solid var(--rule); font-size:.92rem }
.gt-bio-note {font-size:.8rem}
.gt-bio-source { color:inherit; text-underline-offset:3px }
.gt-bio-close { display:block; margin:1.35rem 0 0 }
.pk-summary-card {display:block; width:100%; padding:0; border:0; border-radius:4px; background:transparent; cursor:pointer}
.pk-reveal [data-act=biography][hidden]{display:none}
@keyframes gt-bio-open { from { opacity:0; transform:perspective(600px) rotateY(-38deg) } to { opacity:1; transform:none } }
@media(prefers-reduced-motion:reduce){.gt-biography[open]{animation:none}}
