.discovery-item[data-game-id="match-your-mate"] {
  width: calc(var(--landing-tile-height) * 1.415) !important;
  min-width: calc(var(--landing-tile-height) * 1.415) !important;
  height: var(--landing-tile-height) !important;
  min-height: var(--landing-tile-height) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: center / 100% 100% no-repeat url("/assets/img/match_your_mate.png?v=match-your-mate-original-20260907-2") !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.discovery-item[data-game-id="match-your-mate"] .discovery-item-icon { display: none !important; }
.discovery-item[data-game-id="match-your-mate"] .discovery-item-label {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}

.landing.mytm-mode {
  grid-template-rows: minmax(0, 1fr) 0 !important;
}
.landing.mytm-mode .roll-zone { display: none !important; }
.landing.mytm-mode .discovery.is-game-view { min-height: 0; height: 100%; }
.landing.mytm-mode .game-tab-content[data-game-id="match-your-mate"] {
  min-height: 0;
  padding-bottom: 18px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.mytm-game,
.mytm-workspace {
  width: min(100%, 720px);
  margin: 0 auto;
  box-sizing: border-box;
}
.mytm-game {
  display: grid;
  gap: 0;
  padding: 14px 12px 24px;
}
.mytm-workspace { padding: 16px 12px 28px; }

.mytm-machine {
  position: relative;
  width: min(100%, 560px);
  margin: 4px auto 0;
  padding: 18px 54px 20px 20px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 184, 59, .88);
  border-radius: 26px;
  background: radial-gradient(circle at 50% 0%, rgba(255,72,196,.25), transparent 46%), linear-gradient(145deg, rgba(84,24,132,.98), rgba(28,10,55,.98) 58%, rgba(104,27,101,.96));
  box-shadow: 0 0 0 2px rgba(246,94,255,.18) inset, 0 0 28px rgba(205,48,255,.26), 0 18px 42px rgba(0,0,0,.34);
}
.mytm-machine-head {
  margin-bottom: 14px;
  color: #ffd462;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 900;
  letter-spacing: .055em;
  text-align: center;
  text-shadow: 0 0 10px rgba(255,157,51,.7), 0 0 24px rgba(255,80,203,.42);
}
.mytm-reels {
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr);
  align-items: center;
  gap: 8px;
}
.mytm-reel {
  min-width: 0;
  height: 104px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 3px solid #f3b13f;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,229,255,.95) 48%, rgba(255,255,255,.98));
  box-shadow: 0 0 0 3px rgba(120,31,142,.52) inset, 0 0 20px rgba(255,83,216,.28);
  overflow: hidden;
}
.mytm-reel-value {
  max-width: 100%; overflow: hidden; color: #6b1f85;
  font-size: clamp(19px, 5.4vw, 30px); font-weight: 900;
  text-overflow: ellipsis; white-space: nowrap;
}
.mytm-link { color: #ff5fbd; font-size: 28px; text-align: center; text-shadow: 0 0 12px rgba(255,62,191,.82); }

.mytm-lever {
  position: absolute; top: 56px; right: 9px; width: 34px; height: 112px;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.mytm-lever::before {
  content: ""; position: absolute; left: 14px; top: 24px; width: 7px; height: 76px;
  border-radius: 8px; background: linear-gradient(#e0c8ff,#6f4f86 52%,#d8bcf1);
  box-shadow: 0 0 8px rgba(255,255,255,.26); transform-origin: 50% 92%;
}
.mytm-lever span {
  position: absolute; z-index: 2; top: 4px; left: 5px; width: 25px; height: 25px;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%,#ff8a8a,#e21835 52%,#7f0616 100%);
  box-shadow: 0 0 12px rgba(255,49,82,.66);
}
.mytm-machine.is-spinning .mytm-lever span { animation: mytm-lever-return 2s cubic-bezier(.2,.75,.25,1) both; }
.mytm-machine.is-spinning .mytm-lever::before { animation: mytm-lever-arm 2s cubic-bezier(.2,.75,.25,1) both; }
@keyframes mytm-lever-return { 0%{transform:translate(8px,54px)} 100%{transform:translate(0,0)} }
@keyframes mytm-lever-arm { 0%{transform:rotate(16deg)} 100%{transform:rotate(0)} }
.mytm-lever:disabled { cursor: default; }

.mytm-spin {
  width: 100%; min-height: 48px; margin-top: 16px; border-radius: 14px;
  font-weight: 900; letter-spacing: .04em;
}
.mytm-stand {
  position: relative;
  left: 47%;
  width: min(100%, 616px);
  aspect-ratio: 597 / 737;
  margin-top: -8%;
  transform: translate(-49%, 6%);
  isolation: isolate;
  overflow: hidden;
}
.mytm-stand-frame {
  position: absolute;
  z-index: 0;
  left: -45.9%;
  top: -46.3%;
  width: 191.8%;
  height: 186.4%;
  pointer-events: none;
  user-select: none;
}
.mytm-stand-head,
.mytm-stand-body {
  position: absolute;
  z-index: 1;
  left: 10.2%;
  width: 79.6%;
  box-sizing: border-box;
}
.mytm-stand-head {
  top: 6.9%;
  height: 19.3%;
  display: grid;
  place-items: center;
  padding: 2% 4%;
}
.mytm-stand-body {
  top: 32.3%;
  height: 60.8%;
  padding: 7% 5% 5%;
  overflow: hidden;
}
.mytm-status {
  min-height: 0;
  padding: 0;
  color: #2b102a;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  max-width: 100%;
  font-size: clamp(14px, 4.2vw, 27px);
  font-stretch: condensed;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
}
.mytm-status.mytm-status-starter {
  font-size: clamp(19px, 5.8vw, 36px);
}
.mytm-prompt-slot { width: 100%; height: 100%; min-width: 0; min-height: 0; }
.mytm-prompt-card {
  display: grid; grid-template-rows: minmax(0,1fr) auto;
  width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; box-sizing: border-box;
  border: 0; border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #30122e;
}
.mytm-prompt-copy {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mytm-prompt-copy::-webkit-scrollbar { display: none; }
.mytm-prompt-card p { margin: 0; font-size: clamp(17px,4.8vw,31px); font-weight: 700; line-height: 1.25; text-align: center; text-wrap: balance; }
.mytm-prompt-type { display: none !important; }
.mytm-target { margin-top: 8px; color: #661c61; font-weight: 900; text-align: center; }
.mytm-prompt-loader { align-self: center; padding: 12px; font-size: 28px; text-align: center; }
.mytm-punishment-card { border: 0; }

.mytm-round-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 12px; }
.mytm-match, .mytm-no-match, .mytm-primary, .mytm-secondary {
  min-height: 48px; padding: 10px 12px; border-radius: 9px; font: inherit; font-weight: 900; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.62);
}
.mytm-match { border: 2px solid #ffd56a; background: linear-gradient(180deg,#35b965,#087438); color: #fff; box-shadow: 0 0 0 2px #5b1b55, inset 0 2px rgba(255,255,255,.3), 0 4px 0 #4d123e; }
.mytm-no-match { border: 2px solid #ffd56a; background: linear-gradient(180deg,#ee5262,#a70c2b); color: #fff; box-shadow: 0 0 0 2px #5b1b55, inset 0 2px rgba(255,255,255,.28), 0 4px 0 #4d123e; }
.mytm-primary { width: 100%; border: 2px solid #ffd56a; background: linear-gradient(180deg,#9a30ba,#541069); color: #fff; box-shadow: 0 0 0 2px #5b1b55, inset 0 2px rgba(255,255,255,.3), 0 4px 0 #4d123e; }
.mytm-secondary { border: 1px solid rgba(255,112,213,.74); background: rgba(74,23,95,.74); color: #ffd3f1; }
.mytm-error { color: #481444; text-align: center; font-weight: 800; }
.mytm-next { margin-top: 12px; }
.mytm-next::after { content: "  →"; }

.mytm-player-list, .mytm-fixed-pair-list { display: grid; gap: 9px; margin-bottom: 12px; }
.mytm-player-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 42px; align-items: center; gap: 8px; }
.mytm-player-number { color: #ff83d2; font-weight: 900; text-align: center; }
.mytm-player-row input, .mytm-fixed-pair-row input {
  min-width: 0; height: 46px; padding: 0 12px; border: 1px solid rgba(255,105,210,.5);
  border-radius: 12px; background: rgba(29,14,45,.82); color: #fff; font: inherit;
}
.mytm-player-row input:disabled, .mytm-fixed-pair-row input:disabled { opacity: .45; }
.mytm-remove-player {
  width: 42px; height: 42px; border: 1px solid rgba(255,105,210,.5); border-radius: 11px;
  background: rgba(80,23,86,.72); color: #ff9bd9; font-size: 24px;
}
.mytm-add-player, .mytm-add-pair { width: 100%; }
.mytm-player-mode-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.mytm-player-mode-tile { min-height: 58px !important; padding: 10px 12px !important; font-weight: 900; white-space: normal; }
.mytm-player-screen { min-height: 0; }
.mytm-fixed-pair-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px 42px; align-items: center; gap: 8px; }
.mytm-single-toggle {
  width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,105,210,.5); border-radius: 11px;
  background: rgba(80,23,86,.72); color: #ffd3f1; font: inherit; font-size: 20px; line-height: 1;
}
.mytm-single-toggle.is-active { border-color: #ff62c7; background: linear-gradient(135deg,rgba(184,39,209,.9),rgba(255,77,157,.88)); color: #fff; }
.mytm-set-play { width: 100%; min-height: 48px; margin-top: 14px; border-radius: 12px; font-size: 24px; font-weight: 900; }
.mytm-setup-status { min-height: 22px; margin-top: 8px; color: #ff9bd9; font-size: 13px; text-align: center; }
.mytm-note { margin: 12px 0 0; color: var(--text-secondary,#bbb); font-size: 13px; line-height: 1.45; }

.mytm-settings-card { padding: 16px; }
.mytm-setting-group + .mytm-setting-group { margin-top: 18px; }
.mytm-setting-title { margin-bottom: 8px; color: #ffd064; font-size: 13px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.mytm-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.mytm-audience-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
.mytm-topic-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mytm-options .cubiri-option { min-width: 0; min-height: 44px; padding: 8px 6px; white-space: normal; }
.mytm-reset-history { width: 100%; margin-top: 18px; }
.mytm-history-status { min-height: 22px; margin-top: 8px; color: #ff99da; text-align: center; }

@media (max-width: 430px) {
  .discovery-item[data-game-id="match-your-mate"] { padding: 0 !important; }
  .mytm-game { padding-inline: 8px; }
  .mytm-machine { padding: 15px 45px 17px 14px; border-radius: 20px; }
  .mytm-reels { grid-template-columns: minmax(0,1fr) 26px minmax(0,1fr); gap: 5px; }
  .mytm-reel { height: 88px; padding: 7px; border-width: 2px; }
  .mytm-link { font-size: 22px; }
  .mytm-lever { right: 5px; top: 48px; transform: scale(.9); transform-origin: top center; }
  .mytm-prompt-card { border-radius: 0; padding: 0; }
  .mytm-round-actions { gap: 8px; }
  .mytm-match, .mytm-no-match { padding-inline: 6px; }
  .mytm-options, .mytm-audience-options, .mytm-topic-options { grid-template-columns: 1fr 1fr; }
  .mytm-fixed-pair-row input { padding-inline: 9px; }
}

@media (max-width: 360px) {
  .mytm-fixed-pair-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px; }
  .mytm-fixed-pair-row .mytm-remove-player { grid-column: 3; grid-row: 1; }
  .mytm-fixed-pair-row .mytm-single-toggle { grid-column: 1 / span 2; grid-row: 2; width: 100%; }
}
