:root {
  --gacha-bg-top: #8b5734;
  --gacha-bg-bottom: #6c4024;
  --gacha-shell-top: #dcc18c;
  --gacha-shell-bottom: #cfaf74;
  --gacha-panel: #fff8ec;
  --gacha-panel-soft: #f6ecd7;
  --gacha-ink: #3f2417;
  --gacha-ink-soft: #5a3422;
  --gacha-line: rgba(92, 52, 28, 0.18);
  --gacha-brown: #7a3f22;
  --gacha-brown-dark: #5b2d19;
  --gacha-green: #355347;
  --gacha-green-dark: #274037;
  --gacha-gold: #f7e2b6;
  --gacha-gold-deep: #b9872f;
  --gacha-shadow: 0 12px 24px rgba(54, 28, 14, 0.16);
  --gacha-radius-xl: 24px;
  --gacha-radius-lg: 18px;
  --gacha-radius-md: 14px;
}

body {
  background: linear-gradient(180deg, var(--gacha-bg-top) 0%, var(--gacha-bg-bottom) 100%);
  color: var(--gacha-ink);
}

.gacha-page {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px;
  background: linear-gradient(180deg, var(--gacha-shell-top) 0%, var(--gacha-shell-bottom) 100%);
  border-left: 3px solid #5d341f;
  border-right: 3px solid #5d341f;
  box-shadow: 0 0 0 2px rgba(255, 233, 186, 0.15) inset;
}

.gacha-page .section {
  margin-bottom: 16px;
}

.gacha-page-status {
  margin: 10px 14px 0;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 14px;
  border: 1px dashed rgba(92, 52, 28, 0.28);
  background: rgba(255, 248, 232, 0.75);
  color: var(--gacha-ink-soft);
}

.gacha-page-status[data-tone="error"] {
  background: rgba(178, 44, 44, 0.12);
  color: #7a1f1f;
  border-color: rgba(178, 44, 44, 0.35);
}

.gacha-page .panel,
.gacha-page .hero-card {
  background: linear-gradient(180deg, #efdcb6 0%, #e3c78f 100%);
  border: 2px solid var(--gacha-line);
  box-shadow: var(--gacha-shadow);
}

/* =========================
 Topbar / 資源列
 ========================= */

.gacha-topbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 14px;
}

.gacha-topbar::-webkit-scrollbar {
  display: none;
}

.gacha-stat {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.88);
  border: 1px solid rgba(92, 52, 28, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 14px;
  color: #4a2416;
}

.gacha-stat strong {
  font-size: 15px;
  color: #3f2417;
}

.gacha-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* =========================
 Hero / 標題區
 ========================= */

.gacha-hero {
  padding: 20px 18px;
  text-align: center;
}

.gacha-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--gacha-brown);
  color: var(--gacha-gold);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.gacha-title {
  margin: 0 0 10px;
  color: #4a2416;
  font-size: 30px;
  line-height: 1.2;
  word-break: keep-all;
}

.gacha-desc {
  margin: 0;
  color: #5a3422;
  font-size: 15px;
  line-height: 1.8;
}

/* =========================
 Machine / 扭蛋機區
 ========================= */

.gacha-machine-panel {
  padding: 16px;
}

.gacha-machine {
  display: grid;
  gap: 0;
  justify-items: center;
}

.gacha-machine-head {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: -18px;
  position: relative;
  z-index: 2;
}

.gacha-machine-glass {
  width: min(290px, 82vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.18) 22%, rgba(255,255,255,0.04) 36%, transparent 37%),
    radial-gradient(circle at 50% 55%, #f9efdc 0%, #edd4a4 58%, #d4a35e 100%);
  border: 10px solid #7a4a24;
  box-shadow:
    inset 0 10px 24px rgba(255,255,255,0.25),
    inset 0 -18px 28px rgba(91, 45, 25, 0.2),
    0 10px 22px rgba(54, 28, 14, 0.16);
  overflow: hidden;
}

.gacha-machine-glass::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  pointer-events: none;
}

.gacha-capsule-field {
  position: absolute;
  inset: 18px;
}

.gacha-capsule {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
background:
    linear-gradient(180deg, rgba(255,255,255,0.85) 0 48%, rgba(0,0,0,0.08) 48% 52%, rgba(255,255,255,0.22) 52% 100%);
  border: 2px solid rgba(92, 52, 28, 0.14);
  box-shadow: 0 6px 10px rgba(54, 28, 14, 0.14);
}

.capsule-a {
  top: 24px;
  left: 34px;
  background-color: #f3d06c;
}

.capsule-b {
  top: 42px;
  right: 28px;
  background-color: #d9896b;
}

.capsule-c {
  top: 96px;
  left: 88px;
  background-color: #85a89a;
}

.capsule-d {
  bottom: 78px;
  left: 22px;
  background-color: #c98db2;
}

.capsule-e {
  bottom: 58px;
  right: 44px;
  background-color: #7ca2d3;
}

.capsule-f {
  bottom: 18px;
  left: 112px;
  background-color: #e1b85c;
}

.gacha-machine-body {
  width: min(320px, 88vw);
  background: linear-gradient(180deg, #8f5730 0%, #6d4125 100%);
  border: 3px solid #5a311c;
  border-radius: 28px;
  padding: 24px 16px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 14px 26px rgba(54, 28, 14, 0.18);
  position: relative;
}

.gacha-machine-brand {
  margin: 0 auto 16px;
  width: fit-content;
  min-width: 180px;
  padding: 8px 14px;
  text-align: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4d38e 0%, #d8a850 100%);
  color: #4a2416;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.gacha-machine-slot {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.gacha-drop-zone {
  width: min(220px, 68vw);
  min-height: 86px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8ead0 0%, #ead0a0 100%);
  border: 2px solid rgba(92, 52, 28, 0.18);
  box-shadow: inset 0 10px 18px rgba(91, 45, 25, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.gacha-drop-placeholder {
  font-size: 14px;
  color: #6b432f;
  text-align: center;
  line-height: 1.6;
}

.gacha-machine-handle-wrap {
  display: flex;
  justify-content: center;
}

.gacha-handle-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--gacha-green) 0%, var(--gacha-green-dark) 100%);
  color: var(--gacha-gold);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 14px rgba(39, 64, 55, 0.18);
}

/* =========================
 Controls / 操作區
 ========================= */

.gacha-controls {
  padding: 14px;
}

.gacha-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gacha-action-row .btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

/* =========================
 Result / 結果區
 ========================= */

.gacha-result-panel,
.gacha-recent-panel {
  padding: 16px;
}

.gacha-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.gacha-section-title {
  margin: 0 0 12px;
  color: #4a2416;
  font-size: 20px;
  line-height: 1.3;
}

.gacha-panel-head .gacha-section-title {
  margin-bottom: 0;
}

.gacha-result {
  min-height: 180px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8ec 0%, #f5e5c5 100%);
  border: 2px solid rgba(92, 52, 28, 0.12);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gacha-result-empty {
  text-align: center;
  color: #6b432f;
  font-size: 15px;
  line-height: 1.8;
}

.gacha-text-link {
  color: #5b2d19;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* =========================
 Recent / 最近抽到
 ========================= */

.gacha-recent-list {
  display: grid;
  gap: 10px;
}

.gacha-empty-inline {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 248, 236, 0.75);
  border: 1px solid rgba(92, 52, 28, 0.1);
  color: #6b432f;
  font-size: 14px;
  line-height: 1.7;
}

/* =========================
 Mobile
 ========================= */

@media (max-width: 900px) {
  .gacha-page {
    padding: 12px 10px 24px;
  }

  .gacha-title {
    font-size: 28px;
  }
.gacha-desc {
    font-size: 14px;
  }

  .gacha-machine-glass {
    width: min(276px, 82vw);
  }

  .gacha-machine-body {
    width: min(310px, 88vw);
  }

  .gacha-action-row {
    flex-direction: column;
  }

  .gacha-action-row .btn,
  .gacha-handle-btn {
    width: 100%;
  }

  .gacha-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .gacha-page {
    max-width: 720px;
    padding: 20px;
  }

  .gacha-machine-body {
    width: 360px;
  }

  .gacha-machine-glass {
    width: 320px;
  }
}
/* =========================
 Gacha UI Polish / 結果卡、膠囊、最近抽到補強
 直接貼在 gacha.css 最下面
 ========================= */

.gacha-machine.is-drawing .gacha-machine-glass {
  animation: gachaMachineGlow 0.9s ease-in-out infinite alternate;
}

.gacha-machine.is-drawing .gacha-capsule {
  animation: gachaCapsuleShake 0.7s ease-in-out infinite;
}

.gacha-machine.is-drawing .gacha-machine-brand {
  filter: brightness(1.08);
}

.gacha-machine.is-drawing .gacha-handle-btn {
  transform: translateY(1px) scale(0.985);
}

@keyframes gachaMachineGlow {
  from {
    box-shadow:
      inset 0 10px 24px rgba(255,255,255,0.25),
      inset 0 -18px 28px rgba(91, 45, 25, 0.2),
      0 10px 22px rgba(54, 28, 14, 0.16);
  }
  to {
    box-shadow:
      inset 0 10px 24px rgba(255,255,255,0.32),
      inset 0 -18px 28px rgba(91, 45, 25, 0.24),
      0 0 0 6px rgba(247, 226, 182, 0.16),
      0 14px 28px rgba(54, 28, 14, 0.2);
  }
}

@keyframes gachaCapsuleShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1px, 1px) rotate(-3deg); }
  50% { transform: translate(1px, -1px) rotate(2deg); }
  75% { transform: translate(-1px, 0) rotate(-2deg); }
  100% { transform: translate(1px, 1px) rotate(3deg); }
}

/* 結果訊息框 */
.gacha-result-message {
  width: 100%;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}

.gacha-result-message--warning {
  border-style: dashed;
}

.gacha-result-message--notice {
  border-style: solid;
}

/* 掉落膠囊 */
.gacha-drop-capsule {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 6px;
  background: rgba(255, 255, 255, 0.35);
  animation: gachaDropBounce 0.45s ease-out;
}

.gacha-drop-capsule-core {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(92, 52, 28, 0.14);
  box-shadow:
    inset 0 2px 8px rgba(255,255,255,0.32),
    0 6px 12px rgba(54, 28, 14, 0.14);
}

@keyframes gachaDropBounce {
  0% {
    transform: translateY(-10px) scale(0.9);
    opacity: 0.2;
  }
  65% {
    transform: translateY(4px) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* 結果卡 */
.gacha-result-card {
  width: 100%;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff8ec 0%, #f3dfbb 100%);
  border: 2px solid rgba(92, 52, 28, 0.14);
}

.gacha-result-visual {
  position: relative;
  padding-top: 8px;
}

.gacha-result-mascot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fffaf0;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(54, 28, 14, 0.12);
  margin-bottom: 12px;
}

.gacha-result-mascot {
  min-height: 140px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0.08) 40%, transparent 41%),
    linear-gradient(180deg, #f9efdc 0%, #ead0a0 100%);
  border: 2px solid rgba(92, 52, 28, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gacha-result-mascot-placeholder {
  text-align: center;
  color: #6a3f28;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
}

.gacha-result-content {
  display: grid;
  gap: 10px;
}

.gacha-result-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(122, 63, 34, 0.1);
  color: #7a3f22;
  border: 1px solid rgba(122, 63, 34, 0.16);
  font-size: 12px;
  font-weight: 800;
}

.gacha-result-name {
  margin: 0;
  color: #4a2416;
  font-size: 24px;
  line-height: 1.25;
}

.gacha-result-title {
  margin: 0;
  color: #7a3f22;
font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.gacha-result-desc {
  margin: 0;
  color: #5a3422;
  font-size: 14px;
  line-height: 1.8;
}

.gacha-result-rewards {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.gacha-result-reward {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 248, 236, 0.8);
  border: 1px solid rgba(92, 52, 28, 0.1);
  color: #5a3422;
  font-size: 14px;
}

.gacha-result-reward strong {
  color: #3f2417;
  font-size: 16px;
}

/* 稀有度視覺 */
.gacha-result-card.rarity-N {
  border-color: rgba(139, 106, 67, 0.22);
}

.gacha-result-card.rarity-R {
  border-color: rgba(79, 122, 140, 0.24);
}

.gacha-result-card.rarity-SR {
  border-color: rgba(122, 79, 140, 0.24);
}

.gacha-result-card.rarity-SSR {
  border-color: rgba(185, 135, 47, 0.34);
  background: linear-gradient(180deg, #fff8ec 0%, #f0ddb0 100%);
}

/* 最近抽到 */
.gacha-recent-item {
  display: grid;
  gap: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8ec 0%, #f4e2bf 100%);
  border: 1px solid rgba(92, 52, 28, 0.12);
}

.gacha-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gacha-recent-name {
  color: #4a2416;
  font-size: 15px;
  line-height: 1.5;
}

.gacha-recent-rarity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fffaf0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.gacha-recent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #5a3422;
  font-size: 13px;
  line-height: 1.6;
}

.gacha-recent-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.72);
  border: 1px solid rgba(92, 52, 28, 0.08);
}

/* 桌面版微調 */
@media (min-width: 768px) {
  .gacha-result-card {
    grid-template-columns: 220px 1fr;
    align-items: start;
    padding: 18px;
  }

  .gacha-result-mascot {
    min-height: 180px;
  }

  .gacha-result-name {
    font-size: 26px;
  }
}
/*  UI 新增了幾個 class */
.gacha-result-mascot-image {
  width: 100%;
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.gacha-recent-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gacha-recent-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ec 0%, #efd7ab 100%);
  border: 1px solid rgba(92, 52, 28, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  overflow: hidden;
}

.gacha-recent-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gacha-recent-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a3f28;
  font-size: 14px;
  font-weight: 800;
}

.gacha-recent-body {
  min-width: 0;
  flex: 1 1 auto;
}

.gacha-recent-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adbox {
  margin-top: 18px;
  padding: 18px 16px;
  border: 1.5px solid rgba(118, 82, 45, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff7ea 0%, #f3e3c0 100%);
  box-shadow: 0 10px 24px rgba(92, 59, 34, 0.08);
}

.adbox h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  color: #6f4b2f;
  letter-spacing: 0.02em;
}

.ad-slot {
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255, 251, 242, 0.88);
  border: 1px solid rgba(118, 82, 45, 0.12);
  color: #6a4b35;
  font-size: 14px;
  line-height: 1.8;
}

.ad-slot strong {
  color: #9a6537;
  font-weight: 800;
}

.ad-remaining {
  margin-top: 12px;
  font-size: 13px;
  color: #5e6b3f;
  font-weight: 700;
}

#adRemaining {
  color: #2f6b45;
  font-weight: 800;
}

.adbox .board-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

.btn-coin {
  min-width: 150px;
  min-height: 42px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #8a5a38 0%, #c58a48 100%);
  color: #fffaf1;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(123, 82, 45, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-coin:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(123, 82, 45, 0.24);
}

.btn-coin:active {
  transform: translateY(0);
}

.btn-coin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 768px) {
  .adbox {
    margin-top: 16px;
    padding: 16px 14px;
    border-radius: 18px;
  }

  .adbox h3 {
    font-size: 17px;
  }

  .ad-slot {
    font-size: 13px;
    line-height: 1.75;
  }

  .adbox .board-actions {
    justify-content: stretch;
  }

  .btn-coin {
    width: 100%;
    min-width: 0;
  }
}

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

.ad-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.ad-modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(44, 30, 20, 0.62);
  backdrop-filter: blur(4px);
}

.ad-modal-dialog {
  position: relative;
  width: min(100%, 560px);
  border-radius: 24px;
  padding: 20px 18px 18px;
  background: linear-gradient(180deg, #fff9ef 0%, #f1dfbb 100%);
  border: 1.5px solid rgba(118, 82, 45, 0.2);
  box-shadow: 0 24px 48px rgba(47, 31, 19, 0.22);
  overflow: hidden;
}

.ad-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(111, 75, 47, 0.1);
  color: #6f4b2f;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.ad-modal-close:hover {
  background: rgba(111, 75, 47, 0.16);
  transform: scale(1.04);
}

.ad-modal-close:active {
  transform: scale(0.98);
}

.ad-modal-head {
  padding-right: 42px;
  margin-bottom: 14px;
}

.ad-modal-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.4;
  color: #6a472f;
  letter-spacing: 0.02em;
}

.ad-modal-desc {
  margin: 0;
  color: #7a5a43;
  font-size: 14px;
  line-height: 1.7;
}

.ad-modal-video-wrap {
  border-radius: 18px;
  overflow: hidden;
  background: #201812;
  border: 1px solid rgba(118, 82, 45, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ad-modal-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #120e0b;
}

.ad-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.ad-modal-reward-btn {
  min-width: 180px;
  min-height: 44px;
  padding: 10px 18px;
}

.ad-modal-reward-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
}

body.ad-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .ad-modal-backdrop {
    padding: 16px;
  }

  .ad-modal-dialog {
    width: 100%;
    border-radius: 20px;
    padding: 18px 14px 16px;
  }

  .ad-modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .ad-modal-head {
    padding-right: 38px;
    margin-bottom: 12px;
  }

  .ad-modal-title {
    font-size: 18px;
  }

  .ad-modal-desc {
    font-size: 13px;
    line-height: 1.7;
  }

  .ad-modal-video-wrap {
    border-radius: 16px;
  }

  .ad-modal-actions {
    margin-top: 14px;
  }

  .ad-modal-reward-btn {
    width: 100%;
    min-width: 0;
  }
}


