:root {
  --glaze-ink: #33253a;
  --glaze-plum: #65465f;
  --glaze-pink: #e99ab5;
  --glaze-pink-deep: #bd5f83;
  --glaze-blush: #f8d9e1;
  --glaze-blue: #a9d9e8;
  --glaze-blue-deep: #548ca4;
  --glaze-cream: #fff7e8;
  --glaze-vanilla: #f2e2bd;
  --glaze-mint: #c9e4d7;
}

*,
*::before,
*::after {
  border-radius: 0 !important;
}

body {
  background: var(--glaze-cream);
}

.glaze-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6rem);
  color: var(--glaze-ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(145deg, #f8d6df 0%, #e9d5e8 46%, #c9e5ed 100%);
  border-bottom: 3px solid var(--glaze-ink);
}

.glaze-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.72), transparent 45%);
}

.jelly {
  position: absolute;
  z-index: -1;
  border: 2px solid rgba(51, 37, 58, 0.22);
  opacity: 0.72;
  filter: drop-shadow(10px 14px 0 rgba(77, 52, 72, 0.1));
  transform: rotate(-12deg) skewX(-6deg);
  pointer-events: none;
}

.jelly::after {
  content: "";
  position: absolute;
  top: 14%;
  left: 16%;
  width: 38%;
  height: 14%;
  background: rgba(255, 255, 255, 0.58);
  transform: skewX(-18deg);
}

.jelly--pink {
  top: 7%;
  left: -65px;
  width: 190px;
  height: 245px;
  background: linear-gradient(135deg, #f4b6ca, #d9799d);
}

.jelly--blue {
  right: -90px;
  bottom: 13%;
  width: 235px;
  height: 180px;
  background: linear-gradient(135deg, #d0edf3, #8dc7dd);
  transform: rotate(16deg) skewX(8deg);
}

.jelly--cream {
  right: 9%;
  top: 3%;
  width: 92px;
  height: 68px;
  background: linear-gradient(135deg, #fff8df, #e9cfa1);
  transform: rotate(28deg);
}

.glaze-intro {
  margin: 0 auto clamp(2rem, 4vw, 3.25rem);
  max-width: 800px;
  text-align: center;
}

.glaze-kicker {
  margin: 0 0 0.55rem;
  color: #89536c;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.glaze-intro h1 {
  margin-bottom: 0.8rem;
  color: var(--glaze-ink);
  font-size: clamp(3rem, 9vw, 7.2rem);
  letter-spacing: -0.075em;
  line-height: 0.84;
  text-shadow: 0 5px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(93, 60, 82, 0.13);
}

.glaze-intro h1 span {
  color: var(--glaze-pink-deep);
}

.glaze-intro > p:last-child {
  margin: 0 auto;
  max-width: 56ch;
  color: #604d62;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.glaze-game {
  margin: 0 auto;
  padding: 0;
  max-width: 1040px;
  overflow: hidden;
  border: 3px solid var(--glaze-ink);
  background: var(--glaze-cream);
  box-shadow: 11px 13px 0 rgba(73, 49, 70, 0.18), 0 30px 60px rgba(74, 51, 70, 0.18);
}

.game-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 13px 20px;
  gap: 1rem;
  border-bottom: 3px solid var(--glaze-ink);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.12), transparent 32%),
    var(--glaze-plum);
  color: white;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.07), inset 0 -6px 0 rgba(38, 21, 37, 0.16);
}

.game-mast > div:first-child,
.game-mast__balance {
  display: grid;
}

.game-mast__label,
.game-mast__balance span {
  color: #efd5e2;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game-mast__balance {
  min-width: 122px;
  padding-left: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  text-align: right;
}

.game-mast__balance strong {
  color: #d9f0f5;
  font-family: var(--font-mono);
  font-size: 1.22rem;
  font-variant-numeric: tabular-nums;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  min-height: 610px;
}

.card-salon {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border-right: 3px solid var(--glaze-ink);
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.28) 42% 43%, transparent 43%),
    linear-gradient(155deg, #f4c4d3, #c8e5ed);
}

.card-salon::before,
.card-salon::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(51, 37, 58, 0.13);
  background: rgba(255, 247, 232, 0.28);
  transform: rotate(45deg);
}

.card-salon::before {
  top: -74px;
  right: -25px;
}

.card-salon::after {
  bottom: 45px;
  left: -82px;
}

.salon-label {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #65516a;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.card-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(72%, 300px);
  margin: 1rem auto;
  aspect-ratio: 0.7;
  perspective: 1100px;
}

.card-shadow {
  position: absolute;
  inset: 8% -8% -8% 10%;
  border: 3px solid rgba(51, 37, 58, 0.42);
  background: #9b7189;
  transform: rotate(5deg) translateZ(-30px);
  box-shadow: 10px 16px 25px rgba(76, 49, 70, 0.24);
}

.playing-card {
  position: relative;
  width: 100%;
  height: 100%;
  border: 3px solid var(--glaze-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), transparent 30%),
    var(--glaze-cream);
  color: var(--glaze-ink);
  transform: rotate(-2deg) translateZ(20px);
  transform-style: preserve-3d;
  box-shadow:
    inset 8px 0 0 rgba(255, 255, 255, 0.68),
    inset -8px -10px 0 rgba(185, 132, 150, 0.13),
    0 8px 0 #b98296,
    0 14px 18px rgba(64, 42, 60, 0.2);
  transition: transform 0.32s ease, opacity 0.2s ease;
}

.playing-card.is-dealing {
  opacity: 0;
  transform: translateX(35%) rotate(9deg) translateZ(20px);
}

.playing-card.is-red {
  color: #bd5579;
}

.card-gloss {
  position: absolute;
  top: 4%;
  left: 8%;
  width: 58%;
  height: 9%;
  background: rgba(255, 255, 255, 0.74);
  transform: skewX(-24deg);
}

.card-corner {
  position: absolute;
  display: grid;
  justify-items: center;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 0.82;
}

.card-corner strong {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.card-corner span {
  margin-top: 0.2rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.card-corner--top {
  top: 7%;
  left: 9%;
}

.card-corner--bottom {
  right: 9%;
  bottom: 7%;
  transform: rotate(180deg);
}

.card-pip {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5.5rem, 15vw, 9.5rem);
  line-height: 1;
  text-shadow: 4px 5px 0 rgba(80, 48, 70, 0.1);
  transform: translate(-50%, -50%);
}

.streak-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--glaze-ink);
  background: rgba(255, 249, 238, 0.78);
  box-shadow: 5px 6px 0 rgba(51, 37, 58, 0.1);
}

.streak-strip > div {
  display: grid;
  min-width: 0;
  padding: 10px 12px;
}

.streak-strip > div + div {
  border-left: 2px solid rgba(51, 37, 58, 0.22);
}

.streak-strip span {
  color: #766074;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.streak-strip strong {
  overflow: hidden;
  color: var(--glaze-ink);
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(100, 70, 95, 0.045) 28px),
    #fff6e8;
  box-shadow: inset 10px 0 18px rgba(85, 58, 80, 0.09);
}

.call-panel h2 {
  margin-bottom: 1.2rem;
  color: var(--glaze-ink);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.stake-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.stake-control label {
  color: #76596d;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stake-control select {
  width: 100%;
  min-height: 46px;
  padding: 7px 10px;
  border: 2px solid var(--glaze-ink);
  background: white;
  color: var(--glaze-ink);
  font-family: var(--font-mono);
  font-weight: 700;
}

.start-button,
.cash-button,
.call-button {
  cursor: pointer;
}

.start-button {
  width: 100%;
  min-height: 67px;
  margin-bottom: 0.9rem;
  padding: 10px 14px 14px;
  border: 3px solid #713d58;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 36%),
    var(--glaze-pink);
  color: #3f2938;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 -7px 0 #c7698a, 0 6px 0 #713d58;
}

.start-button small {
  display: block;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 0.59rem;
  letter-spacing: 0.06em;
  opacity: 0.78;
}

.start-button:hover {
  background-color: #f2aac0;
}

.call-buttons {
  display: grid;
  gap: 0.65rem;
}

.call-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  padding: 9px 12px;
  gap: 0.65rem;
  border: 2px solid var(--glaze-ink);
  color: var(--glaze-ink);
  text-align: left;
  box-shadow: 4px 4px 0 rgba(51, 37, 58, 0.15);
}

.call-button--higher {
  background: var(--glaze-blue);
}

.call-button--lower {
  background: var(--glaze-blush);
}

.call-button__key,
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  min-height: 25px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 2px 2px 0 rgba(51, 37, 58, 0.15);
}

.call-button strong,
.call-button small {
  display: block;
}

.call-button strong {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
}

.call-button small {
  color: #65536a;
  font-size: 0.7rem;
}

.call-button__arrow {
  font-size: 1.55rem;
  font-weight: 900;
}

.cash-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  margin-top: 0.85rem;
  padding: 8px 11px;
  gap: 0.5rem;
  border: 2px solid var(--glaze-ink);
  background: var(--glaze-mint);
  color: var(--glaze-ink);
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(51, 37, 58, 0.15);
}

.cash-button span {
  color: #416c61;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.start-button:active:not(:disabled),
.call-button:active:not(:disabled),
.cash-button:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(51, 37, 58, 0.2);
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.48;
}

.result-box {
  min-height: 76px;
  margin-top: 1rem;
  padding: 10px 12px;
  border: 2px solid #9a7b8e;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 0 0 3px rgba(233, 154, 181, 0.12);
}

.result-box > span {
  display: block;
  color: #8c6b80;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.result-box strong {
  display: block;
  margin-top: 3px;
  color: var(--glaze-ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.result-box.is-good {
  border-color: #527d71;
  background: #e0f2e8;
}

.result-box.is-wrong {
  border-color: #a24566;
  background: #f9dce4;
}

.keyboard-note {
  margin: 0.75rem 0 0;
  color: #786678;
  font-size: 0.68rem;
  text-align: center;
}

.keyboard-note kbd {
  display: inline-grid;
  min-width: 21px;
  min-height: 21px;
  margin: 0 2px;
  padding: 1px 4px;
}

.glaze-info {
  background:
    linear-gradient(90deg, transparent 49%, rgba(95, 71, 92, 0.05) 50%, transparent 51%) 0 0 / 36px 36px,
    #f8ebdd;
}

.glaze-info__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
}

.glaze-rules,
.responsible-card {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 3px solid var(--glaze-ink);
  background: #fffaf0;
  box-shadow: 7px 8px 0 rgba(72, 49, 68, 0.13);
}

.glaze-rules h2,
.responsible-card h2 {
  color: var(--glaze-ink);
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.glaze-rules ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: glaze-step;
}

.glaze-rules li {
  position: relative;
  padding: 3.1rem 1rem 0 0;
  counter-increment: glaze-step;
}

.glaze-rules li::before {
  content: "0" counter(glaze-step);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--glaze-pink-deep);
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
}

.glaze-rules li + li {
  padding-left: 1rem;
  border-left: 2px solid #ead5d9;
}

.glaze-rules li + li::before {
  left: 1rem;
}

.glaze-rules li strong,
.glaze-rules li span {
  display: block;
}

.glaze-rules li span,
.glaze-rules > p:last-child,
.responsible-card p {
  color: #655664;
  font-size: 0.9rem;
}

.glaze-rules li span {
  margin-top: 0.35rem;
}

.responsible-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.4rem;
  background: var(--glaze-blue);
}

.responsible-card__age {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 92px;
  padding: 0.8rem;
  border-right: 3px solid var(--glaze-ink);
  color: var(--glaze-ink);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.reset-button {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--glaze-ink);
  background: rgba(255, 255, 255, 0.25);
  color: var(--glaze-ink);
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
}

.reset-button:hover {
  background: rgba(255, 255, 255, 0.48);
}

.age-band {
  background: var(--glaze-plum);
}

.age-band p {
  color: #fff7ed;
}

.age-band a {
  color: #d5edf4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .brand,
.site-footer .footer-nav a {
  color: var(--ink);
}

.footer-meta {
  max-width: none;
}

@media (max-width: 860px) {
  .game-layout,
  .glaze-info__grid {
    grid-template-columns: 1fr;
  }

  .card-salon {
    min-height: 650px;
    border-right: 0;
    border-bottom: 3px solid var(--glaze-ink);
  }

  .card-stage {
    width: min(55%, 280px);
  }

  .call-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1rem;
  }

  .call-panel > .glaze-kicker,
  .call-panel h2,
  .result-box,
  .keyboard-note {
    grid-column: 1 / -1;
  }

  .call-panel h2,
  .stake-control,
  .start-button,
  .cash-button,
  .result-box,
  .keyboard-note {
    margin: 0;
  }
}

@media (max-width: 600px) {
  .glaze-hero {
    padding-top: 2.2rem;
  }

  .jelly {
    opacity: 0.35;
  }

  .glaze-game {
    width: calc(100% + 1rem);
    margin-left: -0.5rem;
  }

  .game-mast {
    padding-inline: 13px;
  }

  .card-salon {
    min-height: 500px;
    padding: 1rem;
  }

  .card-stage {
    width: min(72%, 245px);
  }

  .streak-strip span {
    letter-spacing: 0.03em;
  }

  .streak-strip > div {
    padding: 9px 7px;
  }

  .call-panel {
    display: flex;
    padding: 1.3rem;
  }

  .call-panel h2 {
    margin-bottom: 1rem;
  }

  .stake-control,
  .start-button,
  .cash-button,
  .result-box {
    margin-bottom: 0.85rem;
  }

  .glaze-rules ol {
    grid-template-columns: 1fr;
  }

  .glaze-rules li,
  .glaze-rules li + li {
    min-height: 76px;
    padding: 0 0 1rem 3.5rem;
    border-left: 0;
  }

  .glaze-rules li + li {
    padding-top: 1rem;
    border-top: 2px solid #ead5d9;
  }

  .glaze-rules li::before,
  .glaze-rules li + li::before {
    top: -0.25rem;
    left: 0;
  }

  .glaze-rules li + li::before {
    top: 0.75rem;
  }

  .responsible-card {
    grid-template-columns: 1fr;
  }

  .responsible-card__age {
    min-width: 0;
    border-right: 0;
    border-bottom: 3px solid var(--glaze-ink);
    writing-mode: initial;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .playing-card {
    transition: none;
  }
}
