* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--dd-font-main);
  background: var(--dd-page-bg);
  color: var(--dd-page-text);
  min-height: 100vh;
  overflow-x: hidden;
}
.app {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wrap {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 14px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}
html[data-dd-theme="light"] .wrap {
  gap: 18px;
  padding-top: 14px;
}
.hidden { display: none !important; }
.grid2, .nav-row, .sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.game-header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.game-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.02;
  margin: 0;
}
.game-subtitle {
  font-size: 15px;
  line-height: 1.18;
  margin: 0;
  max-width: 235px;
}
#menuBtn {
  min-width: 108px;
  padding: 11px 12px;
  font-size: 13px;
  border-radius: 20px;
}
.game-card {
  min-height: 57vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.card-title {
  font-size: 21px;
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 9px;
}
.card-title.hidden { display: none; }
.card-text {
  font-size: 14px;
  line-height: 1.44;
}
.card-bottom-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform .25s ease;
  max-width: 430px;
  margin: 0 auto;
  z-index: 20;
}
.sheet.open { transform: translateY(0); }
.sheet-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}
.sheet-text {
  font-size: 15px;
  line-height: 1.42;
  margin-bottom: 12px;
  white-space: pre-wrap;
}
.department { margin-top: 14px; }
html[data-dd-theme="light"] .department { margin-top: 12px; }
html[data-dd-theme="light"] .department::before { margin-bottom: 14px; }
html[data-dd-theme="light"] .section-title { margin-bottom: 10px; }
html[data-dd-theme="light"] .small { margin-bottom: 10px; }
html[data-dd-theme="light"] .card:not(.game-card) { padding: 16px; }
.paywall-backdrop {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  z-index: 40;
  overflow-y: auto;
}
.paywall-backdrop.open { display: flex; }
.paywall {
  width: 100%;
  max-width: 430px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 28px;
  padding: 18px 18px 16px;
}
.paywall-brand-row { display: flex; align-items: center; gap: 0; margin-bottom: 14px; }
.paywall-brand { font-size: 20px; font-weight: 800; line-height: 1.1; }
.paywall-title { font-size: 24px; line-height: 1.06; font-weight: 800; margin: 0 0 12px; }
.paywall-list { margin: 0 0 14px; padding-left: 20px; }
.paywall-list li { font-size: 14px; line-height: 1.44; margin-bottom: 10px; }
.paywall-price { font-size: 28px; font-weight: 800; text-align: center; margin: 4px 0 12px; }
.stripe-buttons { padding: 14px; display: grid; gap: 12px; }
.wallet-btn { min-height: 66px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 19px; font-weight: 800; }
.wallet-sub { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 14px 16px; }
.wallet-logo { width: auto; object-fit: contain; display: block; max-width: none; }
.wallet-logo.apple, .wallet-logo.google { height: 18px; }
.wallet-logo.visa, .wallet-logo.mastercard, .wallet-logo.amex { height: 14px; }
.wallet-logo.unionpay { height: 16px; }
@media (max-width: 390px) {
  .paywall { padding: 16px 16px 14px; }
  .paywall-title { font-size: 22px; }
  .paywall-brand { font-size: 18px; }
  .wallet-btn { min-height: 62px; font-size: 18px; }
}
