:root {
  --bg: #f3f6f2;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #241913;
  --muted: #6e6b63;
  --line: #d9dccf;
  --green: #276653;
  --red: #b94b2d;
  --blue: #315d7b;
  --yellow: #f5b63f;
  --wood: #6a3f24;
  --shadow: 0 18px 45px rgba(36, 25, 19, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(39, 102, 83, 0.08), transparent 30rem),
    radial-gradient(circle at 88% 4%, rgba(245, 182, 63, 0.14), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid rgba(83, 70, 53, 0.16);
  background: rgba(246, 242, 236, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.top-actions,
.account-button,
.cart-button,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: white;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(38, 30, 20, 0.16);
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.field span,
.stats-strip span,
.game-meta,
.order-meta {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.72);
}

.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.nav a:hover {
  background: var(--surface-strong);
}

.top-actions {
  justify-self: end;
  gap: 10px;
}

.account-button,
.cart-button {
  justify-self: end;
  gap: 10px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  color: white;
}

.account-button {
  background: var(--green);
}

.cart-button {
  background: linear-gradient(135deg, var(--wood), var(--red));
}

.cart-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 330px) 1fr;
  gap: 24px;
  min-height: calc(100vh - 72px);
  padding: clamp(16px, 4vw, 54px);
  max-width: 1480px;
  margin: 0 auto;
}

.filters,
.catalog-area,
.cart-drawer,
.game-dialog,
.legal-dialog,
.account-dialog {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.filters {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100dvh - 116px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  overscroll-behavior: contain;
}

.panel-title h1,
.catalog-head h2,
.section-head h2,
.drawer-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.panel-title h1 {
  font-size: 30px;
  line-height: 1.04;
}

.panel-title p {
  color: var(--muted);
  line-height: 1.5;
}

.quick-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
}

.quick-steps span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field input,
.field select,
.field textarea,
.catalog-head select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  outline: 0;
}

.field input,
.field select,
.catalog-head select {
  height: 44px;
  padding: 0 12px;
}

.field textarea {
  resize: vertical;
  padding: 12px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.pickup-point {
  display: grid;
  gap: 10px;
}

.pickup-point[hidden] {
  display: none;
}

.pickup-point .field {
  margin-top: 4px;
}

.pickup-map {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.pickup-map iframe {
  display: block;
  width: 100%;
  height: 190px;
  border: 0;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(236, 225, 209, 0.86), rgba(255, 253, 248, 0.96));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.map-placeholder strong {
  color: var(--ink);
  font-size: 14px;
}

.map-placeholder[hidden] {
  display: none;
}

.map-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.catalog-head select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 99, 0.16);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.segmented button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.segmented button.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.stats-strip div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

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

.stats-strip strong {
  font-size: 24px;
}

.bonus-widget {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 253, 248, 0.96)),
    radial-gradient(circle at 70% 20%, rgba(245, 182, 63, 0.18), transparent 9rem);
}

.bonus-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bonus-widget-head h2 {
  margin: 0;
  font-size: 20px;
}

.bonus-jar {
  position: relative;
  height: 238px;
  perspective: 520px;
  border: 2px solid rgba(96, 128, 132, 0.34);
  border-top: 14px solid rgba(106, 63, 36, 0.34);
  border-radius: 18px 18px 48px 48px / 14px 14px 38px 38px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.2) 28%, rgba(122, 180, 183, 0.18) 58%, rgba(255, 255, 255, 0.56)),
    linear-gradient(180deg, rgba(232, 252, 255, 0.42), rgba(255, 255, 255, 0.22));
  box-shadow:
    inset 0 0 22px rgba(49, 93, 123, 0.12),
    inset -20px 0 34px rgba(49, 93, 123, 0.08),
    0 18px 30px rgba(38, 30, 20, 0.1);
  overflow: hidden;
  touch-action: none;
}

.bonus-jar::before {
  position: absolute;
  top: -21px;
  left: 50%;
  width: 58%;
  height: 28px;
  border: 2px solid rgba(106, 63, 36, 0.34);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.68);
  content: "";
  transform: translateX(-50%);
}

.bonus-jar::after {
  position: absolute;
  top: 24px;
  left: 22px;
  width: 42px;
  height: 142px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.08));
  content: "";
  pointer-events: none;
}

.bonus-die {
  position: absolute;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.9), transparent 22%),
    linear-gradient(135deg, #fff8d8, var(--yellow) 58%, #d8842c);
  box-shadow:
    inset -6px -7px 0 rgba(106, 63, 36, 0.14),
    inset 3px 3px 0 rgba(255, 255, 255, 0.62),
    0 8px 14px rgba(38, 30, 20, 0.16);
  color: var(--wood);
  cursor: grab;
  transform: translate3d(var(--x), var(--y), 0) rotateX(var(--rx, -16deg)) rotateY(var(--ry, 22deg)) rotateZ(var(--r));
  transform-style: preserve-3d;
  transition: box-shadow 0.16s ease, scale 0.16s ease, filter 0.16s ease;
  animation: cubeDrop 0.42s ease both;
  animation-delay: calc(var(--i) * 0.035s);
  touch-action: none;
  user-select: none;
  z-index: 2;
}

.bonus-die::before,
.bonus-die::after {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  content: "";
  pointer-events: none;
}

.bonus-die::before {
  background: linear-gradient(135deg, rgba(216, 132, 44, 0.72), rgba(126, 76, 32, 0.84));
  transform: translateZ(-8px) translateX(8px) rotateY(90deg);
  transform-origin: right center;
}

.bonus-die::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(245, 182, 63, 0.48));
  transform: translateZ(-8px) translateY(-8px) rotateX(90deg);
  transform-origin: center top;
}

.bonus-die.is-demo {
  opacity: 0.62;
}

.bonus-die.dragging {
  cursor: grabbing;
  filter: saturate(1.08);
  scale: 1.08;
  box-shadow:
    inset -6px -7px 0 rgba(106, 63, 36, 0.14),
    inset 3px 3px 0 rgba(255, 255, 255, 0.62),
    0 14px 24px rgba(38, 30, 20, 0.24);
  z-index: 4;
}

.bonus-die i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--wood);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  z-index: 3;
}

.pip-1 i:nth-child(1) {
  left: 13.5px;
  top: 13.5px;
}

.pip-2 i:nth-child(1),
.pip-3 i:nth-child(1),
.pip-4 i:nth-child(1),
.pip-5 i:nth-child(1),
.pip-6 i:nth-child(1) {
  left: 8px;
  top: 8px;
}

.pip-2 i:nth-child(2),
.pip-3 i:nth-child(3),
.pip-4 i:nth-child(4),
.pip-5 i:nth-child(5),
.pip-6 i:nth-child(6) {
  right: 8px;
  bottom: 8px;
}

.pip-3 i:nth-child(2),
.pip-5 i:nth-child(3) {
  left: 13.5px;
  top: 13.5px;
}

.pip-4 i:nth-child(2),
.pip-5 i:nth-child(2),
.pip-6 i:nth-child(2) {
  right: 8px;
  top: 8px;
}

.pip-4 i:nth-child(3),
.pip-5 i:nth-child(4),
.pip-6 i:nth-child(5) {
  left: 8px;
  bottom: 8px;
}

.pip-6 i:nth-child(3) {
  left: 8px;
  top: 13.5px;
}

.pip-6 i:nth-child(4) {
  right: 8px;
  top: 13.5px;
}

.bonus-copy strong,
.bonus-copy span {
  display: block;
}

.bonus-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.catalog-area {
  min-width: 0;
  padding: 22px;
  border-radius: 8px;
}

.catalog-head,
.section-head,
.drawer-head,
.game-card-top,
.game-card-actions,
.total-row,
.cart-line,
.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(38, 30, 20, 0.12);
}

.game-card:focus-visible {
  outline: 3px solid rgba(39, 102, 83, 0.22);
  outline-offset: 3px;
}

.cover {
  position: relative;
  display: grid;
  height: 210px;
  padding: 12px;
  overflow: hidden;
  background: #f7f4ee;
  color: var(--ink);
  isolation: isolate;
}

.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: white;
}

.cover span {
  position: relative;
  z-index: 1;
  width: fit-content;
  height: fit-content;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 6px 16px rgba(38, 30, 20, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.game-card-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.game-card h3 {
  margin: 0;
  font-size: 19px;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-meta span,
.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1e9dd;
}

.price {
  font-size: 20px;
}

.secondary-button,
.primary-button,
.small-button,
.icon-button {
  border: 0;
  border-radius: 8px;
}

.secondary-button,
.small-button {
  background: #ece1d1;
  color: var(--ink);
}

.secondary-button,
.primary-button {
  min-height: 42px;
  padding: 0 13px;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: white;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  background: #ece1d1;
  font-size: 24px;
}

.legal-section,
.orders-section {
  padding: 34px clamp(16px, 4vw, 54px);
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.document-card,
.order-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.document-card {
  padding: 20px;
}

.document-card > span {
  color: var(--red);
  font-weight: 800;
}

.document-card h3 {
  margin: 20px 0 8px;
}

.document-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.document-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 4px;
  text-decoration: none;
}

.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.order-card {
  min-width: 0;
  padding: 16px;
}

.order-card h3,
.order-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.order-top > div {
  min-width: 0;
}

.order-meta {
  margin-top: 8px;
}

.status-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
  min-width: 0;
}

.status-current-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.status-current-label strong {
  color: var(--ink);
}

.status-step {
  position: relative;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.status-step::before {
  position: absolute;
  top: 9px;
  right: calc(50% + 13px);
  left: calc(-50% + 13px);
  height: 2px;
  background: var(--line);
  content: "";
}

.status-step:first-child::before {
  display: none;
}

.status-step span {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface-strong);
}

.status-step.done,
.status-step.current {
  color: var(--ink);
}

.status-step.done span,
.status-step.done::before {
  border-color: var(--green);
  background: var(--green);
}

.status-step.current span {
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 0 0 7px rgba(245, 182, 63, 0.18);
  animation: statusPulse 1.35s ease-in-out infinite;
}

.status-step strong {
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: center;
}

.review-form,
.review-state {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.review-state strong {
  color: var(--yellow);
  letter-spacing: 0;
}

.review-state span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(39, 102, 83, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.star-field {
  display: grid;
  gap: 8px;
}

.star-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c4c1b7;
  font-size: 28px;
  line-height: 1;
  transition:
    color 0.16s ease,
    transform 0.16s ease,
    filter 0.16s ease;
}

.star-button.active {
  color: var(--yellow);
  filter: drop-shadow(0 5px 9px rgba(245, 182, 63, 0.3));
}

.star-button:hover {
  transform: translateY(-1px) scale(1.08);
}

.display-stars {
  color: var(--yellow);
  letter-spacing: 0;
}

.game-review-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.game-review-panel h3,
.game-review-panel p {
  margin: 0;
}

.published-reviews {
  display: grid;
  gap: 10px;
}

.published-reviews blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--yellow);
  background: rgba(245, 182, 63, 0.1);
}

.published-reviews blockquote span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(60px, auto) minmax(0, 1fr);
  width: min(360px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  padding: 12px;
  overflow: hidden;
  transform: translateX(105%);
  transition: transform 0.22s ease;
  overscroll-behavior: contain;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-items {
  min-height: 0;
  max-height: 16dvh;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.cart-line {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line strong,
.cart-line span {
  display: block;
}

.cart-line span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.checkout {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  padding-right: 4px;
  padding-bottom: 14px;
  overscroll-behavior: contain;
}

.checkout .field {
  gap: 5px;
  margin-top: 0;
}

.checkout .field input,
.checkout .field select {
  height: 34px;
  padding: 0 10px;
}

.checkout .field textarea {
  min-height: 58px;
  padding: 9px 10px;
}

.checkout .field-hint,
.checkout .map-link {
  font-size: 11px;
}

.checkout .pickup-point {
  gap: 6px;
}

.checkout .pickup-map {
  min-height: 82px;
}

.checkout .pickup-map iframe {
  height: 82px;
}

.checkout .account-hint {
  padding: 8px 10px;
  font-size: 12px;
}

.rental-terms,
.price-breakdown {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.rental-terms strong {
  font-size: 13px;
}

.rental-terms ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.price-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.price-breakdown strong {
  color: var(--ink);
  white-space: nowrap;
}

.account-hint,
.account-note,
.account-summary {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(39, 102, 83, 0.08);
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-hint,
.account-summary {
  padding: 12px;
}

.account-note {
  margin: 0 0 14px;
  padding: 12px;
}

.account-summary strong,
.account-summary span,
.account-summary em {
  display: block;
}

.account-summary strong {
  color: var(--ink);
}

.account-summary em {
  margin-top: 6px;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.bonus-level,
.bonus-progress {
  margin-top: 4px;
  font-size: 12px;
}

.consent-group {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.consent-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 0;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.consent-check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.consent-check a,
.site-footer a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.total-row {
  margin: 4px 0 0;
  padding: 7px 0 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

.checkout > .primary-button[type="submit"] {
  width: 100%;
  min-height: 42px;
  margin: 0;
  box-shadow: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(29, 27, 25, 0.35);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(16px, 4vw, 54px) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.game-dialog,
.legal-dialog,
.account-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  overflow-x: hidden;
}

.game-dialog {
  position: relative;
  max-height: calc(100dvh - 28px);
  padding: 18px;
  overflow-y: auto;
}

.game-dialog::backdrop,
.legal-dialog::backdrop,
.account-dialog::backdrop {
  background: rgba(29, 27, 25, 0.48);
}

.dialog-close {
  position: sticky;
  top: 0;
  z-index: 5;
  float: right;
  width: 44px;
  height: 44px;
  margin: -4px -4px 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: 0 8px 20px rgba(56, 43, 28, 0.14);
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) 1fr;
  gap: 22px;
}

.dialog-layout .cover {
  height: 100%;
  min-height: 310px;
  border-radius: 8px;
}

.dialog-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.legal-dialog {
  width: min(980px, calc(100vw - 28px));
  padding: 18px;
}

.account-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 18px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
}

.success-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: center;
}

.bonus-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.bonus-dialog::backdrop {
  background: rgba(29, 27, 25, 0.48);
}

.bonus-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.success-dialog::backdrop {
  background: rgba(29, 27, 25, 0.48);
}

.success-mark {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 34px;
  font-weight: 900;
  animation: successPop 0.45s ease both;
}

.success-dialog h2,
.success-dialog p {
  margin: 0;
}

.success-dialog p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.success-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.success-actions .link-button {
  width: 100%;
  margin-top: 0;
}

.legal-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.legal-dialog-head h2 {
  margin: 0;
}

.legal-dialog iframe {
  display: block;
  width: 100%;
  height: min(68vh, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.legal-dialog .link-button {
  margin-top: 12px;
}

.account-form,
.account-panel {
  display: grid;
  gap: 14px;
}

.account-form .primary-button[type="submit"] {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  min-height: 52px;
  margin: 0 -18px -18px;
  border-radius: 0 0 8px 8px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(241, 233, 221, 0.72);
}

.auth-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-switch button.active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(38, 30, 20, 0.1);
}

.text-button {
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.auth-code-row .field {
  margin-top: 0;
}

.auth-code-hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(39, 102, 83, 0.36);
  border-radius: 8px;
  background: rgba(39, 102, 83, 0.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.password-field input {
  min-width: 0;
}

.password-field button {
  min-width: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ece1d1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.account-actions,
.account-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-actions button,
.account-edit-actions button {
  flex: 1 1 160px;
}

.account-edit-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.78);
}

.danger-button {
  min-height: 44px;
  border: 1px solid rgba(164, 57, 57, 0.34);
  border-radius: 8px;
  background: rgba(164, 57, 57, 0.1);
  color: #8c2d2d;
  font-weight: 900;
}

.account-panel[hidden],
.account-form[hidden],
.auth-login-field[hidden],
.auth-register-field[hidden],
.auth-reset-field[hidden],
.account-edit-form[hidden],
.consent-check[hidden] {
  display: none;
}

.compact-head {
  margin-top: 4px;
}

.empty-state {
  margin-top: 18px;
  padding: 28px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: 320px;
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  width: min(720px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner strong,
.cookie-banner p {
  margin: 0;
}

.cookie-banner p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cookie-banner a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
}

.cookie-actions .primary-button,
.cookie-actions .secondary-button {
  width: auto;
  white-space: nowrap;
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

@keyframes successPop {
  from {
    opacity: 0;
    transform: scale(0.72);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cubeDrop {
  from {
    opacity: 0;
    transform: translate3d(var(--x), calc(var(--y) - 18px), 0) rotateX(-40deg) rotateY(36deg) rotateZ(0deg);
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .document-grid,
  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    gap: 12px;
  }

  .top-actions {
    gap: 6px;
  }

  .account-button,
  .cart-button {
    min-height: 40px;
    padding: 9px 10px;
  }

  .cart-button span {
    display: none;
  }

  .brand small {
    display: none;
  }

  .workspace,
  .catalog-area,
  .filters,
  .orders-section {
    padding: 14px;
  }

  .catalog-head,
  .game-card-actions,
  .order-top,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .status-step {
    gap: 0;
  }

  .status-step strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .date-row,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .cart-drawer {
    width: 100vw;
    padding: 10px;
  }

  .cart-items {
    max-height: 14dvh;
  }

  .checkout .pickup-map,
  .checkout .pickup-map iframe {
    min-height: 70px;
    height: 70px;
  }

  .cookie-actions {
    grid-template-columns: 1fr;
  }

  .cookie-actions .primary-button,
  .cookie-actions .secondary-button {
    width: 100%;
  }
}
