#gcg-game-root {
  --fr-gold: #f2c76b;
  --fr-gold-strong: #d9a63e;
  --fr-ink: #101724;
  --fr-muted: rgba(235, 242, 255, .68);
  --fr-panel: rgba(10, 16, 29, .82);
  --fr-border: rgba(255, 255, 255, .12);
  --fr-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  min-height: 720px;
  overflow: hidden;
  color: #f7f9ff;
  background: #07101d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#gcg-game-root *,
#gcg-game-root *::before,
#gcg-game-root *::after {
  box-sizing: border-box;
}

#gcg-game-root button,
#gcg-game-root input {
  font: inherit;
}

.fr-game {
  --table-a: #101c32;
  --table-b: #071221;
  --table-c: #172944;
  --accent: #65a9ff;
  --accent-soft: rgba(101, 169, 255, .22);
  --felt-line: rgba(255, 255, 255, .035);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, .1), transparent 34%),
    radial-gradient(circle at 12% 42%, var(--accent-soft), transparent 31%),
    radial-gradient(circle at 92% 65%, rgba(242, 199, 107, .12), transparent 28%),
    linear-gradient(145deg, var(--table-a), var(--table-b) 57%, var(--table-c));
}

.fr-game::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .65;
  background-image:
    linear-gradient(115deg, transparent 0 48%, var(--felt-line) 49% 50%, transparent 51% 100%),
    linear-gradient(25deg, transparent 0 48%, var(--felt-line) 49% 50%, transparent 51% 100%);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000, transparent 90%);
}

.fr-game::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 0 150px rgba(0, 0, 0, .56);
}

.fr-theme-emerald {
  --table-a: #0c3c34;
  --table-b: #05241f;
  --table-c: #145348;
  --accent: #72e0b5;
  --accent-soft: rgba(62, 215, 158, .2);
}

.fr-theme-burgundy {
  --table-a: #4c1727;
  --table-b: #230912;
  --table-c: #6a2034;
  --accent: #ff8da7;
  --accent-soft: rgba(255, 89, 126, .19);
}

.fr-theme-aurora {
  --table-a: #152354;
  --table-b: #0a1533;
  --table-c: #263168;
  --accent: #b188ff;
  --accent-soft: rgba(163, 98, 255, .2);
}

.fr-topbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(5, 10, 19, .94), rgba(7, 13, 24, .82));
  box-shadow: 0 12px 35px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

.fr-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.fr-brand__mark {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(242, 199, 107, .58);
  border-radius: 17px;
  color: #111827;
  background: linear-gradient(145deg, #ffe7a6, #c9912e 70%);
  box-shadow: 0 9px 26px rgba(213, 157, 48, .25), inset 0 1px 0 rgba(255, 255, 255, .68);
}

.fr-brand__mark::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 18px;
  transform: rotate(-35deg) translateY(-30px);
  background: rgba(255, 255, 255, .34);
}

.fr-brand__mark span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 900;
  transform: translateX(-3px);
}

.fr-brand__mark i {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-style: normal;
  font-size: 16px;
}

.fr-brand__copy {
  min-width: 0;
}

.fr-brand small {
  display: block;
  margin-bottom: 2px;
  color: var(--fr-gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.fr-brand h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1;
  letter-spacing: -.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fr-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fr-button,
.fr-icon-button,
.fr-mini-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.fr-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .065);
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}

.fr-button span {
  margin-right: 5px;
  color: var(--fr-gold);
  font-size: 17px;
  vertical-align: -1px;
}

.fr-button:hover,
.fr-icon-button:hover,
.fr-mini-button:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 199, 107, .46);
  background: rgba(255, 255, 255, .11);
}

.fr-button:active,
.fr-icon-button:active,
.fr-mini-button:active {
  transform: translateY(0) scale(.97);
}

.fr-button:focus-visible,
.fr-icon-button:focus-visible,
.fr-mini-button:focus-visible,
.fr-card:focus-visible,
.fr-deal-option:focus-visible,
.fr-theme-swatch:focus-visible,
.fr-toggle-row:focus-visible {
  outline: 3px solid rgba(242, 199, 107, .48);
  outline-offset: 2px;
}

.fr-button:disabled,
.fr-icon-button:disabled,
.fr-mini-button:disabled {
  opacity: .34;
  cursor: not-allowed;
  transform: none;
}

.fr-button--gold {
  border-color: rgba(255, 222, 139, .7);
  color: #1a2130;
  background: linear-gradient(145deg, #ffe49a, #d7a43f);
  box-shadow: 0 8px 22px rgba(215, 164, 63, .21), inset 0 1px 0 rgba(255, 255, 255, .76);
}

.fr-button--gold span {
  color: #1a2130;
}

.fr-button--gold:hover {
  background: linear-gradient(145deg, #ffeca9, #e6b552);
  box-shadow: 0 10px 27px rgba(215, 164, 63, .3);
}

.fr-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  min-width: 230px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(0, 0, 0, .18);
}

.fr-metrics div {
  min-height: 52px;
  padding: 8px 11px;
  text-align: center;
}

.fr-metrics div + div {
  border-left: 1px solid rgba(255, 255, 255, .08);
}

.fr-metrics span,
.fr-metrics strong {
  display: block;
}

.fr-metrics span {
  margin-bottom: 2px;
  color: var(--fr-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.fr-metrics strong {
  color: #fff;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.fr-actions--utility {
  gap: 8px;
}

.fr-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .065);
  font-size: 19px;
}

.fr-subbar {
  position: relative;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 2fr) minmax(190px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  background: rgba(4, 9, 17, .52);
  backdrop-filter: blur(12px);
}

.fr-subbar__left,
.fr-subbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fr-subbar__right {
  justify-content: flex-end;
}

.fr-mode-chip,
.fr-deal-number {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fr-mode-chip {
  border-color: rgba(242, 199, 107, .35);
  color: #f7d98e;
  background: rgba(242, 199, 107, .09);
}

.fr-deal-number {
  color: rgba(255, 255, 255, .67);
  background: rgba(255, 255, 255, .04);
  font-variant-numeric: tabular-nums;
}

.fr-subbar__center {
  overflow: hidden;
  color: rgba(255, 255, 255, .77);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fr-mini-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .045);
  font-size: 10px;
  font-weight: 800;
}

.fr-board-shell {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  min-height: 570px;
  padding: 16px clamp(8px, 1.8vw, 26px) 10px;
}

.fr-board {
  --card-w: 92px;
  --card-h: 132px;
  --fan-y: 35px;
  --cascade-gap: 9px;
  --column-h: 500px;
  position: relative;
  width: min(100%, 1420px);
  min-height: 100%;
  margin: 0 auto;
}

.fr-upper-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, .25fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(8px, 2vw, 28px);
  margin-bottom: 22px;
}

.fr-upper-group {
  min-width: 0;
}

.fr-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding: 0 4px;
}

.fr-group-title span {
  color: rgba(255, 255, 255, .78);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.fr-group-title small {
  color: rgba(255, 255, 255, .5);
  font-size: 9px;
  font-weight: 700;
}

.fr-pile-row {
  display: grid;
  grid-template-columns: repeat(4, var(--card-w));
  justify-content: start;
  gap: var(--cascade-gap);
}

.fr-upper-group--foundation .fr-pile-row {
  justify-content: end;
}

.fr-pile {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: calc(var(--card-w) * .105);
}

.fr-pile--empty {
  border: 1px dashed rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .11);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .16);
}

.fr-pile--empty::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: inherit;
}

.fr-pile__ghost,
.fr-foundation__ghost {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .16);
  font-size: clamp(7px, calc(var(--card-w) * .09), 11px);
  font-weight: 900;
  letter-spacing: .15em;
}

.fr-foundation__ghost {
  font-family: Georgia, serif;
  font-size: calc(var(--card-w) * .42);
  letter-spacing: 0;
}

.fr-foundation__ghost--red {
  color: rgba(255, 106, 120, .22);
}

.fr-center-crest {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 4px;
  opacity: .68;
}

.fr-center-crest__diamond {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  transform: rotate(45deg);
  border: 1px solid rgba(242, 199, 107, .4);
  color: var(--fr-gold);
  background: rgba(0, 0, 0, .12);
  box-shadow: inset 0 0 20px rgba(242, 199, 107, .06);
}

.fr-center-crest__diamond::first-letter {
  transform: rotate(-45deg);
}

.fr-center-crest__diamond {
  font-size: 21px;
}

.fr-center-crest span {
  color: rgba(242, 199, 107, .65);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .18em;
}

.fr-cascades {
  display: grid;
  grid-template-columns: repeat(8, var(--card-w));
  justify-content: space-between;
  gap: var(--cascade-gap);
  min-height: var(--column-h);
}

.fr-column {
  position: relative;
  width: var(--card-w);
  height: var(--column-h);
  min-height: calc(var(--card-h) * 2.2);
  border-radius: calc(var(--card-w) * .12);
}

.fr-column__number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .28);
  font-size: 8px;
  font-weight: 900;
}

.fr-column__slot {
  position: absolute;
  inset: 0 auto auto 0;
  display: grid;
  width: var(--card-w);
  height: var(--card-h);
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, .13);
  border-radius: calc(var(--card-w) * .105);
  color: rgba(255, 255, 255, .11);
  background: rgba(0, 0, 0, .08);
  font-size: calc(var(--card-w) * .07);
  font-weight: 900;
  letter-spacing: .14em;
}

.fr-column:not(.fr-column--empty) .fr-column__slot span {
  opacity: 0;
}

.fr-column__cards {
  position: absolute;
  inset: 0;
}

.fr-card {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: var(--card-w);
  height: var(--card-h);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(22, 31, 43, .28);
  border-radius: calc(var(--card-w) * .105);
  color: #17202c;
  cursor: default;
  user-select: none;
  touch-action: none;
  transform: translateY(calc(var(--card-index, 0) * var(--fan-y)));
  background:
    radial-gradient(circle at 75% 16%, rgba(255, 255, 255, .95), transparent 28%),
    linear-gradient(150deg, #fff 0%, #f5f2ec 64%, #dedbd4 100%);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .23), 0 1px 0 rgba(255, 255, 255, .9) inset;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.fr-card::before {
  content: "";
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(25, 35, 49, .075);
  border-radius: calc(var(--card-w) * .075);
  pointer-events: none;
}

.fr-card--red {
  color: #c51e39;
}

.fr-card--movable {
  cursor: grab;
}

.fr-card--movable:active {
  cursor: grabbing;
}

.fr-card--movable:hover {
  filter: brightness(1.035);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .32), 0 0 0 2px rgba(242, 199, 107, .25);
}

.fr-card--selected {
  filter: brightness(1.06);
  box-shadow: 0 0 0 3px var(--fr-gold), 0 13px 25px rgba(0, 0, 0, .38);
}

.fr-card__corner {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 27%;
  line-height: .86;
}

.fr-card__corner--top {
  top: 6%;
  left: 3.5%;
}

.fr-card__corner--bottom {
  right: 3.5%;
  bottom: 6%;
  transform: rotate(180deg);
}

.fr-card__corner b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(var(--card-w) * .21);
  font-weight: 900;
  letter-spacing: -.07em;
}

.fr-card__corner i {
  margin-top: calc(var(--card-w) * .02);
  font-family: Georgia, serif;
  font-size: calc(var(--card-w) * .16);
  font-style: normal;
}

.fr-card__center {
  position: absolute;
  inset: 22% 22%;
  display: grid;
  place-items: center;
}

.fr-card__center > i {
  font-family: Georgia, serif;
  font-size: calc(var(--card-w) * .54);
  font-style: normal;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, .8));
}

.fr-card--royal .fr-card__center {
  inset: 25% 24%;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: calc(var(--card-w) * .12);
  background:
    linear-gradient(135deg, transparent 0 42%, currentColor 43% 45%, transparent 46% 100%),
    linear-gradient(45deg, rgba(242, 199, 107, .25), transparent 60%);
}

.fr-card--royal .fr-card__center::before,
.fr-card--royal .fr-card__center::after {
  content: "";
  position: absolute;
  width: 75%;
  height: 75%;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: .25;
}

.fr-card--royal .fr-card__center em {
  position: relative;
  z-index: 2;
  color: currentColor;
  font-family: Georgia, serif;
  font-size: calc(var(--card-w) * .38);
  font-style: normal;
  font-weight: 900;
  text-shadow: 0 1px 0 #fff;
}

.fr-card--royal .fr-card__center i {
  position: absolute;
  right: 7%;
  bottom: 4%;
  z-index: 2;
  font-size: calc(var(--card-w) * .18);
}

.fr-cards-modern .fr-card {
  border-radius: calc(var(--card-w) * .16);
  background:
    radial-gradient(circle at 75% 12%, rgba(255, 255, 255, .94), transparent 25%),
    linear-gradient(145deg, #ffffff, #eef2f7);
}

.fr-cards-modern .fr-card::before {
  border-radius: calc(var(--card-w) * .12);
}

.fr-cards-modern .fr-card__corner b {
  font-family: Inter, ui-sans-serif, sans-serif;
  font-weight: 900;
}

.fr-cards-modern .fr-card--royal .fr-card__center {
  border-radius: 50%;
  background: rgba(15, 23, 42, .035);
}

.fr-hint-source {
  animation: fr-hint-source 1s ease-in-out infinite;
  box-shadow: 0 0 0 3px #ffe18a, 0 0 28px rgba(255, 218, 112, .8) !important;
}

.fr-hint-target,
.fr-drop-active {
  border-color: rgba(111, 255, 181, .9) !important;
  box-shadow: inset 0 0 0 3px rgba(111, 255, 181, .44), 0 0 26px rgba(74, 255, 164, .28) !important;
  background: rgba(62, 230, 146, .12) !important;
}

@keyframes fr-hint-source {
  50% { filter: brightness(1.12); transform: translateY(calc(var(--card-index, 0) * var(--fan-y))) scale(1.025); }
}

.fr-footer {
  position: relative;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-height: 36px;
  padding: 6px 18px;
  border-top: 1px solid rgba(255, 255, 255, .065);
  color: rgba(255, 255, 255, .48);
  background: rgba(4, 8, 16, .43);
  font-size: 9px;
  font-weight: 700;
}

.fr-footer kbd {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 5px;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
  font-family: inherit;
  font-size: 8px;
}

.fr-footer > span {
  margin-left: auto;
  color: rgba(242, 199, 107, .68);
  letter-spacing: .04em;
}

.fr-toast {
  position: fixed;
  z-index: 100000;
  left: 50%;
  bottom: 26px;
  max-width: min(440px, calc(100vw - 30px));
  padding: 11px 16px;
  transform: translate(-50%, 24px);
  border: 1px solid rgba(242, 199, 107, .35);
  border-radius: 12px;
  opacity: 0;
  color: #fff5d4;
  background: rgba(8, 13, 23, .92);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 750;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.fr-toast--show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.fr-drag-layer {
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
}

.fr-drag-stack {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card-w);
  height: var(--card-h);
  will-change: transform;
}

.fr-drag-stack .fr-card {
  transform: translateY(calc(var(--drag-index, 0) * min(var(--fan-y), 34px)));
  box-shadow: 0 15px 32px rgba(0, 0, 0, .44);
  opacity: .96;
}

body.fr-is-dragging,
body.fr-is-dragging * {
  cursor: grabbing !important;
}

.fr-modal-backdrop[hidden] {
  display: none !important;
}

.fr-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  background: rgba(1, 5, 12, .72);
  backdrop-filter: blur(12px);
  transition: opacity .16s ease;
}

.fr-modal-backdrop--open {
  opacity: 1;
}

.fr-modal {
  position: relative;
  width: min(680px, 100%);
  max-height: min(90vh, 780px);
  padding: 30px;
  overflow: auto;
  transform: translateY(12px) scale(.98);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 24px;
  color: #edf2ff;
  background:
    radial-gradient(circle at 80% 0, rgba(242, 199, 107, .13), transparent 32%),
    linear-gradient(155deg, rgba(24, 34, 52, .98), rgba(7, 13, 24, .985));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .16s ease;
}

.fr-modal-backdrop--open .fr-modal {
  transform: translateY(0) scale(1);
}

.fr-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  font-size: 22px;
}

.fr-modal__eyebrow {
  margin-bottom: 7px;
  color: var(--fr-gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .2em;
}

.fr-modal h3 {
  margin: 0 45px 7px 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.fr-modal__lead {
  max-width: 560px;
  margin: 0 0 24px;
  color: rgba(234, 240, 255, .64);
  font-size: 13px;
  line-height: 1.65;
}

.fr-modal__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.fr-deal-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.fr-deal-option {
  appearance: none;
  min-height: 155px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.fr-deal-option:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 199, 107, .42);
  background: rgba(255, 255, 255, .075);
}

.fr-deal-option--featured {
  border-color: rgba(242, 199, 107, .32);
  background: linear-gradient(145deg, rgba(242, 199, 107, .13), rgba(255, 255, 255, .04));
}

.fr-deal-option__icon {
  display: grid;
  width: 45px;
  height: 45px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(242, 199, 107, .3);
  border-radius: 14px;
  color: var(--fr-gold);
  background: rgba(242, 199, 107, .08);
  font-size: 20px;
  font-weight: 900;
}

.fr-deal-option strong,
.fr-deal-option small {
  display: block;
}

.fr-deal-option strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.fr-deal-option small {
  color: rgba(235, 242, 255, .53);
  font-size: 10px;
  line-height: 1.45;
}

.fr-numbered-entry {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  background: rgba(0, 0, 0, .15);
}

.fr-numbered-entry label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fr-numbered-entry > div {
  display: flex;
  gap: 8px;
}

.fr-numbered-entry input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 11px;
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  font-variant-numeric: tabular-nums;
}

.fr-numbered-entry input:focus {
  border-color: rgba(242, 199, 107, .55);
  box-shadow: 0 0 0 3px rgba(242, 199, 107, .1);
}

.fr-text-button {
  display: block;
  margin: 16px auto 0;
  border: 0;
  color: rgba(242, 199, 107, .76);
  background: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.fr-settings-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.fr-setting-group,
.fr-toggle-row {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
}

.fr-setting-group > span {
  display: block;
  margin-bottom: 11px;
  color: rgba(255, 255, 255, .63);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fr-theme-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fr-theme-swatch {
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255, 255, 255, .55);
  background: transparent;
  cursor: pointer;
}

.fr-theme-swatch i {
  display: block;
  height: 34px;
  margin-bottom: 5px;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.fr-theme-swatch b {
  font-size: 8px;
  font-weight: 800;
  text-transform: capitalize;
}

.fr-theme-swatch.is-active {
  border-color: rgba(242, 199, 107, .5);
  color: #fff;
  background: rgba(242, 199, 107, .07);
}

.fr-theme-swatch--obsidian i { background: linear-gradient(135deg, #172944, #071221); }
.fr-theme-swatch--emerald i { background: linear-gradient(135deg, #145348, #05241f); }
.fr-theme-swatch--burgundy i { background: linear-gradient(135deg, #6a2034, #230912); }
.fr-theme-swatch--aurora i { background: linear-gradient(135deg, #443278, #0a1533); }

.fr-segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 4px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .2);
}

.fr-segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, .57);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.fr-segmented button.is-active {
  color: #151b27;
  background: linear-gradient(145deg, #ffe49a, #d8a642);
}

.fr-toggle-row {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.fr-toggle-row span,
.fr-toggle-row strong,
.fr-toggle-row small {
  display: block;
}

.fr-toggle-row strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.fr-toggle-row small {
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
}

.fr-switch {
  position: relative;
  flex: 0 0 43px;
  width: 43px;
  height: 24px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  transition: background .16s ease;
}

.fr-switch b {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .32);
  transition: transform .16s ease;
}

.fr-switch.is-on {
  background: linear-gradient(145deg, #f6d47d, #bf8628);
}

.fr-switch.is-on b {
  transform: translateX(19px);
}

.fr-stats-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: center;
  gap: 10px;
  margin: 24px 0 14px;
}

.fr-stats-hero > div {
  display: grid;
  min-height: 108px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 17px;
  background: rgba(255, 255, 255, .035);
  text-align: center;
}

.fr-stats-hero strong,
.fr-stats-hero span {
  display: block;
}

.fr-stats-hero strong {
  color: #fff;
  font-size: 25px;
}

.fr-stats-hero span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .46);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.fr-stats-ring {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, #101929 0 48%, transparent 49%),
    conic-gradient(var(--fr-gold) calc(var(--percent) * 1%), rgba(255, 255, 255, .08) 0) !important;
}

.fr-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fr-stats-grid > div {
  min-height: 84px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(0, 0, 0, .13);
}

.fr-stats-grid strong,
.fr-stats-grid span {
  display: block;
}

.fr-stats-grid strong {
  margin-bottom: 6px;
  color: #fff;
  font-size: 18px;
}

.fr-stats-grid span {
  color: rgba(255, 255, 255, .45);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.fr-help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.fr-help-grid article {
  display: flex;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .035);
}

.fr-help-grid article > span {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  color: #161c27;
  background: linear-gradient(145deg, #ffe49a, #d5a13b);
  font-size: 11px;
  font-weight: 900;
}

.fr-help-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.fr-help-grid p,
.fr-capacity-help p {
  margin: 0;
  color: rgba(255, 255, 255, .53);
  font-size: 10px;
  line-height: 1.55;
}

.fr-capacity-help {
  margin-top: 11px;
  padding: 14px;
  border: 1px solid rgba(242, 199, 107, .17);
  border-radius: 15px;
  background: rgba(242, 199, 107, .055);
}

.fr-capacity-help strong {
  display: block;
  margin-bottom: 4px;
  color: #f6d98d;
  font-size: 11px;
}

.fr-win-crown {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid rgba(242, 199, 107, .5);
  border-radius: 26px;
  color: #1c2431;
  background: linear-gradient(145deg, #fff0b5, #d6a03a);
  box-shadow: 0 20px 45px rgba(219, 166, 64, .25);
  font-size: 38px;
}

.fr-modal--win {
  width: min(560px, 100%);
  text-align: center;
}

.fr-modal--win h3 {
  margin-right: 0;
}

.fr-modal--win .fr-modal__lead {
  margin-right: auto;
  margin-left: auto;
}

.fr-win-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.fr-win-stats > div {
  position: relative;
  min-height: 103px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
}

.fr-win-stats span,
.fr-win-stats strong,
.fr-win-stats small {
  display: block;
}

.fr-win-stats span {
  color: rgba(255, 255, 255, .46);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.fr-win-stats strong {
  margin: 5px 0;
  color: #fff;
  font-size: 22px;
}

.fr-win-stats small {
  color: var(--fr-gold);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.fr-win-deal {
  margin-top: 13px;
  color: rgba(255, 255, 255, .45);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fr-modal--win .fr-modal__actions {
  justify-content: center;
}

.fr-reduced-motion *,
.fr-reduced-motion *::before,
.fr-reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

@media (max-width: 1180px) {
  .fr-topbar {
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 10px;
  }

  .fr-actions--main {
    order: 4;
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, .07);
  }

  .fr-topbar {
    padding-bottom: 8px;
  }
}

@media (max-width: 820px) {
  #gcg-game-root,
  .fr-game {
    min-height: 660px;
  }

  .fr-topbar {
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 9px 10px;
  }

  .fr-brand__mark {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .fr-brand__mark span { font-size: 26px; }
  .fr-brand h2 { font-size: 19px; }
  .fr-brand small { font-size: 7px; }

  .fr-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .fr-metrics div {
    min-height: 42px;
    padding: 5px;
  }

  .fr-metrics strong { font-size: 14px; }
  .fr-actions--utility { grid-column: 2; grid-row: 1; }

  .fr-actions--main {
    grid-row: 3;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 7px 0 0;
    scrollbar-width: none;
  }

  .fr-actions--main::-webkit-scrollbar { display: none; }
  .fr-button { flex: 0 0 auto; min-height: 37px; padding: 0 11px; font-size: 10px; }

  .fr-subbar {
    grid-template-columns: 1fr auto;
    padding: 6px 10px;
  }

  .fr-subbar__center {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .fr-mini-button[data-action="sound"] { display: none; }
  .fr-board-shell { padding: 14px 4px 8px; }
  .fr-upper-row { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 19px; }
  .fr-center-crest { display: none; }
  .fr-group-title small { display: none; }
  .fr-group-title span { font-size: 7px; }
  .fr-footer > div { display: none; }
  .fr-footer > span { margin-left: 0; }
  .fr-modal { padding: 25px 18px; border-radius: 20px; }
  .fr-deal-options { grid-template-columns: 1fr; }
  .fr-deal-option { min-height: 90px; display: grid; grid-template-columns: 48px 1fr; align-content: center; column-gap: 12px; }
  .fr-deal-option__icon { grid-row: 1 / 3; margin: 0; }
  .fr-deal-option strong { align-self: end; }
  .fr-theme-picker { grid-template-columns: repeat(2, 1fr); }
  .fr-stats-hero { grid-template-columns: 1.3fr 1fr 1fr; }
  .fr-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .fr-help-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .fr-actions--main .fr-button span { display: none; }
  .fr-actions--main .fr-button { padding: 0 9px; }
  .fr-subbar__right .fr-mini-button { padding: 0 8px; }
  .fr-mode-chip, .fr-deal-number { padding: 0 7px; font-size: 8px; }
  .fr-upper-row { margin-bottom: 16px; }
  .fr-group-title { margin-bottom: 4px; }
  .fr-column__number { display: none; }
  .fr-footer { min-height: 30px; }
  .fr-stats-hero { grid-template-columns: 1fr 1fr; }
  .fr-stats-ring { grid-column: 1 / -1; min-height: 130px !important; }
  .fr-win-stats { grid-template-columns: 1fr; }
  .fr-win-stats > div { min-height: 72px; }
  .fr-numbered-entry > div { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .fr-game *,
  .fr-game *::before,
  .fr-game *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* =========================================================
   GRANDMASTER EDITION 2.0 — premium visual and UX layer
   ========================================================= */
#gcg-game-root {
  --fr-gold: #f4ca73;
  --fr-gold-strong: #c98f2e;
  --fr-glow: rgba(244, 202, 115, .26);
  --fr-success: #70e5b5;
}

.fr-game {
  background:
    radial-gradient(circle at 50% -18%, rgba(119, 170, 255, .18), transparent 34%),
    radial-gradient(circle at 7% 48%, var(--accent-soft), transparent 29%),
    radial-gradient(circle at 95% 60%, rgba(244, 202, 115, .16), transparent 25%),
    linear-gradient(145deg, var(--table-a), var(--table-b) 60%, var(--table-c));
}

.fr-game::before {
  opacity: .72;
  background-image:
    linear-gradient(115deg, transparent 0 48%, rgba(255,255,255,.035) 49% 50%, transparent 51% 100%),
    linear-gradient(25deg, transparent 0 48%, rgba(255,255,255,.025) 49% 50%, transparent 51% 100%),
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.04) 0 1px, transparent 1.5px);
  background-size: 42px 42px, 42px 42px, 24px 24px;
}

.fr-topbar {
  min-height: 82px;
  border-bottom-color: rgba(244, 202, 115, .13);
  background:
    linear-gradient(180deg, rgba(4, 9, 18, .97), rgba(6, 12, 22, .9)),
    radial-gradient(circle at 22% 0, rgba(244, 202, 115, .08), transparent 28%);
}

.fr-brand__mark {
  border-color: rgba(255, 226, 154, .72);
  background:
    linear-gradient(145deg, rgba(255,255,255,.42), transparent 38%),
    linear-gradient(145deg, #ffe9a9, #c98e29 72%);
  box-shadow: 0 12px 30px rgba(210, 151, 43, .28), inset 0 1px 0 rgba(255,255,255,.82);
}

.fr-brand small {
  color: #efca78;
  letter-spacing: .21em;
}

.fr-button {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.fr-button::after {
  content: "";
  position: absolute;
  top: -80%;
  left: -35%;
  width: 34%;
  height: 260%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  transition: left .42s ease;
}

.fr-button:hover::after { left: 115%; }
.fr-button--compact { padding-inline: 11px; }

.fr-button--gold {
  border-color: rgba(255, 226, 151, .82);
  background:
    linear-gradient(145deg, rgba(255,255,255,.3), transparent 37%),
    linear-gradient(145deg, #ffe79e, #cf922e);
  box-shadow: 0 10px 28px rgba(213, 156, 54, .27), inset 0 1px 0 rgba(255,255,255,.8);
}

.fr-subbar {
  min-height: 49px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background: rgba(5, 11, 21, .64);
  backdrop-filter: blur(12px);
}

.fr-difficulty,
.fr-legal-moves {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  color: rgba(255,255,255,.68);
  background: rgba(255,255,255,.035);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.fr-difficulty[data-level="relaxed"] { color: #91ebc7; border-color: rgba(112,229,181,.25); }
.fr-difficulty[data-level="strategic"] { color: #f6d486; border-color: rgba(244,202,115,.26); }
.fr-difficulty[data-level="expert"] { color: #ff9caf; border-color: rgba(255,111,139,.27); }
.fr-legal-moves i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fr-success);
  box-shadow: 0 0 12px rgba(112,229,181,.7);
}
.fr-legal-moves b { color: #fff; font-size: 9px; }

.fr-board-shell {
  padding-top: 8px;
}

.fr-progress {
  width: min(100%, 1480px);
  margin: 0 auto 8px;
  padding: 0 11px;
}
.fr-progress__copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: rgba(255,255,255,.42);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .13em;
}
.fr-progress__copy strong { color: var(--fr-gold); }
.fr-progress__rail {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.065);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.34);
}
.fr-progress__rail i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b97721, #f6d780 58%, #fff0b7);
  box-shadow: 0 0 14px rgba(244,202,115,.48);
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}

.fr-board {
  padding: 14px 16px 18px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(0,0,0,.035)),
    radial-gradient(circle at 50% 0, rgba(255,255,255,.025), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 26px 70px rgba(0,0,0,.16);
}

.fr-pile {
  border-radius: 13px;
  background: rgba(1, 8, 18, .2);
  box-shadow: inset 0 0 28px rgba(0,0,0,.12);
}
.fr-pile--empty {
  border-color: rgba(255,255,255,.19);
}
.fr-foundation.fr-pile--empty {
  background: radial-gradient(circle at center, rgba(244,202,115,.055), rgba(0,0,0,.08));
}

.fr-center-crest__diamond {
  border-color: rgba(244,202,115,.35);
  background: rgba(4,10,20,.3);
  box-shadow: 0 0 30px rgba(244,202,115,.06), inset 0 0 20px rgba(244,202,115,.04);
}

.fr-card {
  border-color: rgba(20, 28, 39, .23);
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.95), transparent 43%),
    linear-gradient(145deg, #fff, #f4f1e9 72%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -1px 0 rgba(13,20,30,.08) inset,
    0 7px 16px rgba(0,0,0,.22),
    0 1px 2px rgba(0,0,0,.25);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, filter .18s ease;
}

.fr-card::after {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  border: 1px solid rgba(17,24,39,.055);
  border-radius: calc(12px - 2px);
}

.fr-card--movable:hover {
  transform: translateY(-4px);
  filter: brightness(1.025);
  box-shadow: 0 13px 24px rgba(0,0,0,.28), 0 0 0 2px rgba(244,202,115,.21);
}

.fr-card--selected {
  box-shadow: 0 16px 32px rgba(0,0,0,.32), 0 0 0 3px rgba(244,202,115,.92), 0 0 25px rgba(244,202,115,.32) !important;
}

.fr-card--recent {
  animation: fr-card-arrive .38s cubic-bezier(.2,.85,.25,1);
}
@keyframes fr-card-arrive {
  0% { transform: translateY(-10px) scale(.96); filter: brightness(1.24); }
  60% { transform: translateY(2px) scale(1.012); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

.fr-cards-royal .fr-card {
  border-color: rgba(157,105,27,.3);
  background:
    linear-gradient(135deg, rgba(245,198,94,.11), transparent 24%, transparent 76%, rgba(245,198,94,.08)),
    radial-gradient(circle at 50% 20%, #fff, #f5f0e4 74%);
}
.fr-cards-royal .fr-card::before {
  background-image:
    linear-gradient(45deg, rgba(191,136,39,.035) 25%, transparent 25%, transparent 75%, rgba(191,136,39,.035) 75%),
    linear-gradient(45deg, rgba(191,136,39,.035) 25%, transparent 25%, transparent 75%, rgba(191,136,39,.035) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
}
.fr-cards-royal .fr-card__center { font-family: Georgia, "Times New Roman", serif; }
.fr-cards-royal .fr-card--royal .fr-card__center {
  border-color: currentColor;
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 0 0 2px rgba(190,135,36,.08);
}

.fr-hint-source {
  animation: fr-source-halo .9s ease-in-out infinite alternate;
}
@keyframes fr-source-halo {
  from { box-shadow: 0 0 0 2px rgba(244,202,115,.5), 0 0 13px rgba(244,202,115,.2); }
  to { box-shadow: 0 0 0 4px rgba(244,202,115,.95), 0 0 30px rgba(244,202,115,.58); }
}

.fr-hint-target,
.fr-drop-active {
  box-shadow: 0 0 0 3px rgba(112,229,181,.7), 0 0 26px rgba(112,229,181,.3) !important;
}

.fr-game.fr-invalid-pulse .fr-board {
  animation: fr-invalid .34s ease;
}
@keyframes fr-invalid {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); box-shadow: inset 0 0 0 1px rgba(255,93,122,.28); }
  55% { transform: translateX(4px); }
  78% { transform: translateX(-2px); }
}

.fr-modal {
  border-color: rgba(244,202,115,.17);
  background:
    radial-gradient(circle at 50% -10%, rgba(244,202,115,.09), transparent 37%),
    linear-gradient(160deg, rgba(19,29,46,.985), rgba(7,13,24,.99));
  box-shadow: 0 35px 100px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.06);
}

.fr-modal--stats { width: min(760px, 100%); }
.fr-stats-grid { grid-template-columns: repeat(4, 1fr); }

.fr-achievements {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(0,0,0,.12);
}
.fr-achievements__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.fr-achievements__title strong { font-size: 11px; }
.fr-achievements__title span { color: rgba(255,255,255,.42); font-size: 9px; font-weight: 800; }
.fr-achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.fr-achievement {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 12px;
  color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.02);
  filter: grayscale(1);
}
.fr-achievement i {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  font-style: normal;
}
.fr-achievement span { font-size: 9px; font-weight: 800; }
.fr-achievement.is-unlocked {
  color: #f7dc96;
  border-color: rgba(244,202,115,.22);
  background: rgba(244,202,115,.055);
  filter: none;
}
.fr-achievement.is-unlocked i { color: #1b2330; background: linear-gradient(145deg, #ffe8a4, #ce9130); }

.fr-modal--win { position: relative; width: min(620px, 100%); overflow: hidden; }
.fr-win-grade {
  position: absolute;
  top: 22px;
  right: 24px;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(244,202,115,.48);
  border-radius: 50%;
  color: #18202d;
  background: linear-gradient(145deg, #fff1b8, #d29a38);
  box-shadow: 0 12px 30px rgba(210,154,55,.23);
}
.fr-win-grade span { font-family: Georgia, serif; font-size: 26px; font-weight: 900; line-height: .95; }
.fr-win-grade small { font-size: 6px; font-weight: 950; letter-spacing: .15em; }
.fr-win-stats { grid-template-columns: repeat(4, 1fr); }

.fr-pause-emblem {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid rgba(244,202,115,.42);
  border-radius: 22px;
  color: #18202d;
  background: linear-gradient(145deg, #ffebad, #cf9331);
  font-size: 24px;
  font-weight: 950;
}
.fr-modal--pause { width: min(510px, 100%); text-align: center; }
.fr-modal--pause h3 { margin-right: 0; }
.fr-modal--pause .fr-modal__lead { margin-inline: auto; }
.fr-pause-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.fr-pause-summary div { padding: 13px 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.035); }
.fr-pause-summary span, .fr-pause-summary strong { display: block; }
.fr-pause-summary span { color: rgba(255,255,255,.42); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.fr-pause-summary strong { margin-top: 5px; font-size: 18px; }
.fr-modal--pause .fr-modal__actions { justify-content: center; }

.fr-celebration {
  position: fixed;
  inset: 0;
  z-index: 95;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}
.fr-celebration.is-active { visibility: visible; }
.fr-celebration i {
  position: absolute;
  top: -8%;
  left: var(--x);
  color: #f4ca73;
  font-style: normal;
  font-size: clamp(14px, 1.6vw, 25px);
  text-shadow: 0 2px 8px rgba(0,0,0,.36);
  opacity: 0;
  animation: fr-confetti var(--duration) var(--delay) cubic-bezier(.15,.72,.25,1) forwards;
}
.fr-celebration i:nth-child(4n+2), .fr-celebration i:nth-child(4n+3) { color: #ff6d88; }
.fr-celebration i:nth-child(5n) { color: #78d8ff; }
@keyframes fr-confetti {
  0% { transform: translate3d(0,-8vh,0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate3d(var(--drift),112vh,0) rotate(760deg); opacity: .85; }
}

.fr-focus-mode .fr-brand__copy,
.fr-focus-mode .fr-subbar__center,
.fr-focus-mode .fr-footer,
.fr-focus-mode .fr-progress__copy { display: none; }
.fr-focus-mode .fr-topbar { grid-template-columns: auto 1fr auto auto; }
.fr-focus-mode .fr-actions--main { justify-content: center; }
.fr-focus-mode .fr-progress { margin-top: 3px; }

@media (max-width: 1180px) {
  .fr-button--compact { display: none; }
  .fr-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 820px) {
  .fr-progress { padding-inline: 5px; }
  .fr-board { padding: 9px 5px 14px; border-radius: 13px; }
  .fr-difficulty { display: none; }
  .fr-legal-moves { min-height: 25px; padding-inline: 7px; }
  .fr-achievement-grid { grid-template-columns: repeat(2, 1fr); }
  .fr-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .fr-win-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .fr-legal-moves { display: none; }
  .fr-progress__copy { font-size: 6px; }
  .fr-achievement-grid { grid-template-columns: 1fr; }
  .fr-win-grade { width: 48px; height: 48px; top: 16px; right: 16px; }
  .fr-win-grade span { font-size: 21px; }
  .fr-pause-summary { grid-template-columns: 1fr; }
  .fr-pause-summary div { padding: 9px; }
}
.fr-legal-moves.is-stuck { color: #ff9caf; border-color: rgba(255,111,139,.28); }
.fr-legal-moves.is-stuck i { background: #ff6f8b; box-shadow: 0 0 12px rgba(255,111,139,.7); }
.fr-is-paused .fr-board { filter: saturate(.72) brightness(.72); }


/* =========================================================
   2.1.0 — card layout, dealing and mobile readability fixes
   ========================================================= */
.fr-card {
  --fr-card-lift: 0px;
  transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) - var(--fr-card-lift)), 0);
  will-change: transform;
}

.fr-card--movable:hover {
  --fr-card-lift: 5px;
  transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) - var(--fr-card-lift)), 0);
}

.fr-card--selected {
  --fr-card-lift: 6px;
  transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) - var(--fr-card-lift)), 0);
}

.fr-card--recent {
  animation: fr-card-settle .34s cubic-bezier(.2,.82,.22,1) both;
}

@keyframes fr-card-settle {
  0% {
    opacity: .35;
    filter: brightness(1.16);
    transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) - 12px), 0) scale(.975);
  }
  70% {
    opacity: 1;
    transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) + 2px), 0) scale(1.006);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
    transform: translate3d(0, calc(var(--card-index, 0) * var(--fan-y)), 0) scale(1);
  }
}

.fr-card--dealing {
  opacity: 0;
  animation: fr-card-deal .42s cubic-bezier(.18,.78,.22,1) both;
  animation-delay: calc(var(--deal-order, 0) * 14ms);
}

@keyframes fr-card-deal {
  0% {
    opacity: 0;
    filter: brightness(1.18);
    transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) - 22px), 0) scale(.94);
  }
  68% {
    opacity: 1;
    transform: translate3d(0, calc((var(--card-index, 0) * var(--fan-y)) + 3px), 0) scale(1.012);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
    transform: translate3d(0, calc(var(--card-index, 0) * var(--fan-y)), 0) scale(1);
  }
}

.fr-column {
  isolation: isolate;
}

.fr-column__cards .fr-card {
  backface-visibility: hidden;
}

@media (max-width: 700px) {
  .fr-board-shell {
    overflow-x: auto;
    overflow-y: visible;
    padding-inline: 8px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(244,202,115,.55) rgba(255,255,255,.06);
    overscroll-behavior-x: contain;
  }

  .fr-board-shell::-webkit-scrollbar {
    height: 7px;
  }

  .fr-board-shell::-webkit-scrollbar-track {
    border-radius: 99px;
    background: rgba(255,255,255,.055);
  }

  .fr-board-shell::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: rgba(244,202,115,.55);
  }

  .fr-progress,
  .fr-board {
    width: 690px;
    min-width: 690px;
    margin-left: 0;
    margin-right: 0;
  }

  .fr-board {
    padding: 12px 10px 16px;
  }

  .fr-upper-row {
    gap: 14px;
  }

  .fr-group-title span {
    font-size: 8px;
  }

  .fr-card__corner b {
    font-size: calc(var(--card-w) * .205);
  }

  .fr-card__corner i {
    font-size: calc(var(--card-w) * .155);
  }
}

@media (max-width: 420px) {
  .fr-progress,
  .fr-board {
    width: 660px;
    min-width: 660px;
  }
}

.fr-reduced-motion .fr-card--dealing,
.fr-reduced-motion .fr-card--recent {
  animation: none !important;
  opacity: 1;
}
