:root {
  --scratch-green: #00e764;
  --scratch-green-glow: rgba(0, 231, 100, 0.45);
  --scratch-gold: #ffca52;
  --scratch-gold-glow: rgba(255, 202, 82, 0.4);
  --scratch-gold-dark: #b8860b;
  --scratch-bg: #0c0f14;
  --scratch-card-bg: linear-gradient(180deg, rgba(19, 24, 33, 0.96), rgba(10, 14, 20, 0.98));
  --scratch-border: rgba(0, 231, 100, 0.22);
  --scratch-foil: linear-gradient(135deg, #d4af37 0%, #fff2b2 35%, #aa771c 70%, #fef1b8 100%);
}

main.scratch-page {
  padding: 18px 0 38px;
  background: radial-gradient(circle at 50% 20%, rgba(0, 231, 100, 0.08), transparent 45%);
  min-height: calc(100vh - 120px);
}

.scratch-layout {
  display: grid;
  grid-template-columns: minmax(260px, 280px) minmax(0, 1fr) minmax(260px, 280px);
  gap: 18px;
  align-items: start;
}

.scratch-left,
.scratch-right {
  display: grid;
  gap: 14px;
  align-content: start;
}

.scratch-card,
.scratch-stage-card,
.rule-card {
  border: 1px solid var(--scratch-border);
  background: var(--scratch-card-bg);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  position: relative;
  overflow: hidden;
}

.scratch-card {
  padding: 17px;
}

.card-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--scratch-green);
  letter-spacing: 0.4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* TICKET BALANCE CARD */
.ticket-balance-card {
  background: linear-gradient(145deg, rgba(16, 25, 20, 0.95), rgba(10, 14, 20, 0.98));
  border-color: rgba(0, 231, 100, 0.4);
}

.balance-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.ticket-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: radial-gradient(circle at 30% 30%, #0d4a24, #0b1510 70%);
  border: 2px solid var(--scratch-green);
  box-shadow: 0 0 20px rgba(0, 231, 100, 0.25);
  animation: ticketPulse 3s infinite ease-in-out;
}

@keyframes ticketPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 231, 100, 0.2); }
  50% { transform: scale(1.04); box-shadow: 0 0 25px rgba(0, 231, 100, 0.4); }
}

.balance-count {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.balance-count b {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 52px;
  line-height: 0.85;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.balance-count span {
  font-weight: 900;
  font-size: 18px;
  color: var(--scratch-green);
}

.daily-claim-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #00e764, #00b34d);
  color: #0c0f14;
  border: none;
  border-radius: 10px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 231, 100, 0.3);
}

.daily-claim-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 231, 100, 0.5);
}

.daily-claim-btn:disabled {
  background: #252e3d;
  color: #6e7687;
  cursor: not-allowed;
  box-shadow: none;
}

/* LIVE WINNERS LIST */
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title-row h3 {
  margin: 0;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 22px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--scratch-green);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(0, 231, 100, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(0, 231, 100, 0.25);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--scratch-green);
  border-radius: 50%;
  animation: liveBlink 1.5s infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.scratch-winner-list {
  display: grid;
  gap: 7px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.scratch-winner-list::-webkit-scrollbar {
  width: 4px;
}
.scratch-winner-list::-webkit-scrollbar-thumb {
  background: rgba(0, 231, 100, 0.3);
  border-radius: 10px;
}

.scratch-winner-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.scratch-winner-row:hover {
  background: rgba(0, 231, 100, 0.06);
  border-color: rgba(0, 231, 100, 0.2);
}

.winner-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #092815;
  border: 1px solid rgba(0, 231, 100, 0.35);
  color: var(--scratch-green);
  font-size: 14px;
}

.winner-user {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.winner-prize {
  font-size: 11px;
  font-weight: 700;
  color: var(--scratch-gold);
  line-height: 1.1;
  margin-top: 3px;
}

.winner-time {
  font-size: 10px;
  color: #8b92a0;
  background: #18202b;
  border-radius: 12px;
  padding: 4px 7px;
  white-space: nowrap;
}

/* CENTER STAGE (THE SCRATCH TICKET) */
.scratch-stage-card {
  padding: 24px 20px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 15%, rgba(0, 231, 100, 0.12), transparent 45%),
    linear-gradient(180deg, #101722, #0b0f15);
}

.scratch-stage-head {
  margin-bottom: 20px;
}

.scratch-title {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 38px;
  letter-spacing: 0.8px;
  color: #fff;
  margin: 0 0 6px;
  text-shadow: 0 3px 20px rgba(0, 231, 100, 0.3);
}

.scratch-title span {
  color: var(--scratch-green);
}

.scratch-subtitle {
  font-size: 13px;
  color: #9da5b5;
  margin: 0;
}

/* LUXURY SCRATCH TICKET CONTAINER */
.scratch-ticket-wrap {
  position: relative;
  max-width: 540px;
  margin: 0 auto 22px;
  background: linear-gradient(145deg, #18231c, #0d141b);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(0, 231, 100, 0.15);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.scratch-ticket-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, #00e764, #ffca52, #00e764, #18231c);
  z-index: -1;
  animation: borderShimmer 6s linear infinite;
}

@keyframes borderShimmer {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  margin-bottom: 16px;
}

.ticket-serial {
  font-family: monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 1.5px;
}

.ticket-badge {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--scratch-gold);
  background: rgba(255, 202, 82, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 202, 82, 0.3);
  letter-spacing: 0.5px;
}

/* 3x2 SCRATCH GRID */
.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.scratch-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 110px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #141c26, #0e141c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
  user-select: none;
  cursor: grab;
}

.scratch-cell:active {
  cursor: grabbing;
}

.scratch-cell.is-revealed {
  cursor: default;
}

/* UNDERLYING CONTENT */
.cell-underlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(0, 231, 100, 0.08), transparent 75%);
}

.cell-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cell-title {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.cell-type {
  font-size: 10px;
  font-weight: 700;
  color: var(--scratch-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* WINNING CELL HIGHLIGHT */
.scratch-cell.is-matching {
  border-color: var(--scratch-green) !important;
  background: linear-gradient(145deg, rgba(0, 231, 100, 0.25), rgba(12, 40, 22, 0.8)) !important;
  box-shadow: 0 0 22px rgba(0, 231, 100, 0.55), inset 0 0 15px rgba(0, 231, 100, 0.4) !important;
  animation: winPulse 1.2s infinite ease-in-out;
}

.scratch-cell.is-matching .cell-icon {
  transform: scale(1.18);
  filter: drop-shadow(0 0 12px rgba(0, 231, 100, 0.8));
}

@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* TOP CANVAS FOIL */
.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  touch-action: none;
  border-radius: 14px;
  transition: opacity 0.3s ease;
}

.scratch-canvas.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* TICKET FOOTER INSTRUCTIONS */
.ticket-footer {
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #949ca9;
}

.ticket-rule-tip {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ticket-rule-tip span {
  color: var(--scratch-gold);
}

/* CONTROLS & ACTIONS */
.scratch-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 12px;
}

.scratch-main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #00e764 0%, #00b850 100%);
  color: #0c0f14;
  border: none;
  border-radius: 12px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(0, 231, 100, 0.4);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scratch-main-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 231, 100, 0.6);
}

.scratch-main-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.scratch-main-btn:disabled {
  background: #252e3d;
  color: #6e7687;
  cursor: not-allowed;
  box-shadow: none;
}

.scratch-auto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scratch-auto-btn:hover:not(:disabled) {
  background: rgba(255, 202, 82, 0.15);
  border-color: var(--scratch-gold);
  color: var(--scratch-gold);
}

.scratch-auto-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.scratch-status-msg {
  font-size: 13px;
  color: #9299a6;
  margin-top: 4px;
}

/* RIGHT PRIZE PANEL */
.prize-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.prize-panel-head h3 {
  margin: 0;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 22px;
  color: #fff;
}

.scratch-prize-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}

.scratch-prize-list::-webkit-scrollbar {
  width: 4px;
}
.scratch-prize-list::-webkit-scrollbar-thumb {
  background: rgba(0, 231, 100, 0.3);
  border-radius: 10px;
}

.scratch-prize-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.scratch-prize-row:hover {
  background: rgba(0, 231, 100, 0.06);
  border-color: rgba(0, 231, 100, 0.25);
}

.prize-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prize-symbol {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #141c26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
}

.prize-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.prize-tag {
  font-size: 10px;
  color: #8c93a1;
  text-transform: uppercase;
}

.prize-badge {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--scratch-green);
  background: rgba(0, 231, 100, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 231, 100, 0.2);
}

/* HOW TO GET RIGHTS CARD */
.howto-card {
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.95), rgba(12, 17, 24, 0.98));
}

.howto-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.howto-item:last-child {
  border-bottom: none;
}

.howto-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--scratch-green);
  color: #0c0f14;
  font-weight: 900;
  font-size: 11px;
  flex-shrink: 0;
}

.howto-text {
  font-size: 12px;
  color: #b5bcc9;
  line-height: 1.4;
}

.howto-text b {
  color: #fff;
}

/* BOTTOM RULES GRID */
.scratch-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.rule-card {
  padding: 16px;
}

.rule-card h3 {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 20px;
  color: var(--scratch-green);
  margin: 0 0 10px;
}

.rule-card ul {
  margin: 0;
  padding-left: 18px;
  color: #a4abb8;
  font-size: 12px;
  line-height: 1.6;
}

.rule-card ul li {
  margin-bottom: 4px;
}

.last-prize-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100px;
}

.last-prize-box strong {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 28px;
  color: var(--scratch-gold);
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(255, 202, 82, 0.3);
}

.last-prize-box p {
  font-size: 12px;
  color: #8c94a2;
  margin: 0;
}

/* WIN RESULT MODAL */
.scratch-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scratch-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.scratch-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.scratch-modal-box {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  background: linear-gradient(180deg, #151e2a 0%, #0c1118 100%);
  border: 2px solid var(--scratch-green);
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 231, 100, 0.3);
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scratch-modal.is-open .scratch-modal-box {
  transform: scale(1);
}

.scratch-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.scratch-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modal-glow-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 44px;
  background: radial-gradient(circle at 35% 30%, #0e4c25, #081a10 70%);
  border: 2px solid var(--scratch-green);
  box-shadow: 0 0 35px rgba(0, 231, 100, 0.5);
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(0, 231, 100, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 45px rgba(0, 231, 100, 0.7); }
}

.modal-sub {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--scratch-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scratch-modal-box h2 {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 32px;
  color: #fff;
  margin: 4px 0 10px;
}

.scratch-modal-box strong {
  display: block;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 36px;
  color: var(--scratch-green);
  text-shadow: 0 2px 15px rgba(0, 231, 100, 0.5);
  margin-bottom: 12px;
}

.scratch-modal-box p {
  font-size: 13px;
  color: #a4abb8;
  line-height: 1.5;
  margin-bottom: 22px;
}

.modal-confirm-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #00e764, #00b34d);
  color: #0c0f14;
  border: none;
  border-radius: 12px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 231, 100, 0.4);
  transition: all 0.25s ease;
}

.modal-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 231, 100, 0.6);
}

/* ALERT MODAL STYLES */
.scratch-modal-box.alert-style {
  border-color: var(--scratch-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(255, 202, 82, 0.25);
}

.modal-glow-icon.alert-gold {
  background: radial-gradient(circle at 35% 30%, #523e0c, #1a1405 70%);
  border-color: var(--scratch-gold);
  box-shadow: 0 0 35px rgba(255, 202, 82, 0.45);
}

.modal-glow-icon.alert-green {
  background: radial-gradient(circle at 35% 30%, #0e4c25, #081a10 70%);
  border-color: var(--scratch-green);
  box-shadow: 0 0 35px rgba(0, 231, 100, 0.45);
}

.modal-glow-icon.alert-red {
  background: radial-gradient(circle at 35% 30%, #4d1212, #1a0808 70%);
  border-color: #ef4444;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.45);
}

.scratch-alert-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.scratch-alert-actions .alert-primary-btn {
  flex: 1;
  margin-top: 0;
  background: linear-gradient(135deg, #ffca52 0%, #e0a312 100%);
  color: #0c0f14;
  box-shadow: 0 4px 20px rgba(255, 202, 82, 0.35);
}

.scratch-alert-actions .alert-primary-btn:hover {
  box-shadow: 0 6px 25px rgba(255, 202, 82, 0.55);
}

.scratch-alert-actions .alert-secondary-btn {
  flex: 1;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scratch-alert-actions .alert-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .scratch-layout {
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    gap: 14px;
  }
}

@media (max-width: 1024px) {
  .scratch-layout {
    grid-template-columns: 1fr;
  }
  .scratch-left,
  .scratch-right {
    grid-template-columns: 1fr 1fr;
  }
  .scratch-stage-card {
    order: -1;
  }
  .scratch-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .scratch-left,
  .scratch-right {
    grid-template-columns: 1fr;
  }
  .scratch-grid {
    gap: 8px;
  }
  .scratch-cell {
    min-height: 90px;
  }
  .cell-icon {
    font-size: 26px;
  }
  .cell-title {
    font-size: 13px;
  }
  .scratch-title {
    font-size: 28px;
  }
  .scratch-actions {
    flex-direction: column;
  }
  .scratch-main-btn,
  .scratch-auto-btn {
    width: 100%;
  }
}
