/* Coupon treasury. Scoped presentation only; odds, rewards and POST handling stay in the game. */
body #mg-title-game.cf-game .tc-reveal[data-kind] {
  --treasury-ink:#f8efd9; --treasury-muted:#c4cddd;
  box-sizing:border-box; width:min(1100px,calc(100vw - 24px)); height:min(860px,calc(100dvh - 24px));
  color:var(--treasury-ink); border:1px solid #bea16b; border-radius:22px;
  background:radial-gradient(ellipse at 50% 0,#34405c80,transparent 55%),radial-gradient(ellipse at 50% 95%,#6a461b35,transparent 60%),#080e1c;
  box-shadow:0 30px 100px #000b,inset 0 0 0 5px #101827,inset 0 0 0 6px #b8995733;
}
body #mg-title-game.cf-game .tc-reveal-heading { padding:12px 0 8px; }
body #mg-title-game.cf-game .tc-reveal[data-kind] h2 { color:#ffe4a7; font-weight:800; letter-spacing:.05em; text-shadow:0 2px 18px #dfa64533; }
body #mg-title-game.cf-game .tc-reveal-kicker { display:block; color:#cbb37f; font-size:9px; letter-spacing:.3em; margin:0 0 5px; }
body #mg-title-game.cf-game .cf-ornate-guide { color:var(--treasury-muted); font-size:12px; margin:7px 0 0; }
body #mg-title-game.cf-game .cf-tier-legend { display:flex; justify-content:center; flex-wrap:wrap; gap:7px 18px; margin:12px 0 0; font-size:11px; }
body #mg-title-game.cf-game [data-grade="1"] { --fx-color:#8cf0b6; --coupon-crest:url('enchant_crests/advanced-thumb.webp'); }
body #mg-title-game.cf-game [data-grade="2"] { --fx-color:#94d3ff; --coupon-crest:url('enchant_crests/rare-thumb.webp'); }
body #mg-title-game.cf-game [data-grade="3"] { --fx-color:#ffadb1; --coupon-crest:url('enchant_crests/heroic-thumb.webp'); }
body #mg-title-game.cf-game [data-grade="4"] { --fx-color:#dfb9ff; --coupon-crest:url('enchant_crests/legendary-thumb.webp'); }
body #mg-title-game.cf-game [data-grade="5"] { --fx-color:#ffe49c; --coupon-crest:url('enchant_crests/mythic-thumb.webp'); }
body #mg-title-game.cf-game [data-grade="0"] { --fx-color:#bac5d6; --coupon-crest:url('coupon_icons/miss-v1.webp'); }
body #mg-title-game.cf-game .cf-tier-legend span { color:var(--fx-color); font-weight:700; }
body #mg-title-game.cf-game .tc-reveal-stage { padding:18px 14px; scrollbar-width:thin; scrollbar-color:#776442 transparent; }
body #mg-title-game.cf-game .tc-reveal-stage::-webkit-scrollbar { display:block; width:4px; }
body #mg-title-game.cf-game .tc-reveal-stage::-webkit-scrollbar-thumb { background:#776442; border-radius:4px; }
body #mg-title-game.cf-game .tc-reveal-grid { gap:18px; max-width:960px; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-card { height:clamp(178px,calc((100dvh - 340px)/2),230px); aspect-ratio:3/4; border-radius:11px; container-type:inline-size; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-back {
  justify-content:flex-end; gap:4px; padding:0 6px 13%; box-sizing:border-box;
  background:radial-gradient(ellipse at 50% 30%,#66503188,transparent 68%),linear-gradient(150deg,#1c2537,#070d18 65%,#302313);
  border:1px solid #d9b875; box-shadow:inset 0 0 0 4px #101522,inset 0 0 0 5px #a3864e,0 7px 18px #0006;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-back::before {
  inset:3% -4% 11%; border:0; border-radius:0; opacity:1;
  background:url('enchant_crests/mythic-thumb.webp') center 36% / 100% auto no-repeat;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-back::after { inset:8px; border:1px solid #d0a94b33; border-radius:7px; background:none; opacity:1; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-monogram {
  position:absolute; left:0; right:0; top:30%; text-align:center; color:#ffe6a6;
  font:500 clamp(28px,22cqw,46px)/1 Georgia,serif; text-shadow:0 2px 6px #000;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-crest { display:none; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-seal { color:#f2d596; font-size:clamp(8px,5cqw,10px); letter-spacing:.14em; z-index:1; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-front {
  display:flex; flex-direction:column; justify-content:flex-end; align-items:center;
  padding:12px 7px 12px; gap:4px; box-sizing:border-box; overflow:hidden;
  background:#0b1322; color:var(--fx-color);
  border:1px solid var(--fx-color); box-shadow:inset 0 0 0 4px #101827,inset 0 0 0 5px #889bb544,0 8px 22px #0006;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-front::before { inset:7px; border:1px solid currentColor; border-radius:7px; opacity:.3; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .cf-ornate-emblem {
  position:absolute; inset:10% -2% auto; aspect-ratio:3/2;
  background:var(--coupon-crest) center / contain no-repeat;
  display:block; pointer-events:none; isolation:isolate;
}
/* A foreground copy of the frame covers the item edges. The opening is fixed
   to the artwork's own aspect ratio, so it stays aligned at every card size. */
body #mg-title-game.cf-game .tc-reveal[data-kind] .cf-ornate-emblem::after {
  content:""; position:absolute; inset:0; z-index:2;
  background:var(--coupon-crest) center / contain no-repeat;
  -webkit-mask-image:radial-gradient(ellipse 18% 26% at 50% 45%,transparent 98%,#000 100%);
  mask-image:radial-gradient(ellipse 18% 26% at 50% 45%,transparent 98%,#000 100%);
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .cf-ornate-emblem b {
  position:absolute; left:0; right:0; top:27%; text-align:center;
  color:var(--fx-color); font:bold clamp(22px,18cqw,37px)/1 Georgia,serif; text-shadow:0 2px 5px #000;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .cf-reward-icon {
  position:absolute; width:46%; height:64%; left:27%; top:13%; z-index:1;
  display:block; object-fit:contain; filter:drop-shadow(0 2px 3px #000b);
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .cf-ornate-grade {
  position:absolute; top:5%; left:10%; right:10%; z-index:2;
  color:var(--fx-color); font-size:clamp(10px,7cqw,13px); font-weight:800; text-align:center;
  line-height:1.4; letter-spacing:.12em; text-shadow:0 1px 3px #000;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-front strong {
  position:relative; margin:0; width:100%; color:#fff5df; background:#0b1322;
  font-size:clamp(12px,8cqw,17px); line-height:1.35; letter-spacing:-.04em; text-align:center; z-index:1;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-front small {
  position:relative; color:var(--fx-color); background:#0b1322; font-size:clamp(12px,8cqw,16px); line-height:1.3; font-weight:800; z-index:1;
}
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-caption { position:relative; color:#c4cddd; font-size:10px; line-height:1.3; margin:1px 0 0; z-index:1; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-stars { display:none; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-open[data-grade="0"] .tc-fx-front { border-color:#56647a; background:#101725; box-shadow:inset 0 0 0 4px #101827; }
body #mg-title-game.cf-game .tc-reveal[data-kind] [data-grade="0"] .cf-ornate-emblem { inset:10% 4% auto; }
body #mg-title-game.cf-game .tc-reveal[data-kind] [data-grade="0"] .cf-ornate-emblem::after { content:none; }
body #mg-title-game.cf-game .tc-reveal[data-kind] [data-grade="0"] :is(.cf-ornate-emblem b,.tc-fx-aura,.cf-card-light) { display:none; }
body #mg-title-game.cf-game .tc-reveal:not(.cf-share-capture) .cf-time-art { position:absolute; width:38%; height:34%; left:31%; top:23%; object-fit:contain; z-index:1; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .cf-time-card .cf-ornate-emblem b { visibility:hidden; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-reveal-bottom { background:#0b1322; padding:10px 0 2px; border-top:1px solid #a98b4a55; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-reveal-again:not(:disabled) { color:#241805; border-color:#f5db9f; background:linear-gradient(110deg,#c49a4e,#ffe9ae 48%,#c69e58); box-shadow:0 3px 17px #d6a84322,inset 0 1px #fff2c8; font-weight:800; }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-reveal-again:disabled { color:#b5bfd0; border-color:#4a5871; background:#253146; opacity:1; box-shadow:none; }
body #mg-title-game.cf-game .tc-reveal[data-kind] button:focus-visible { outline:3px solid #99d3ff; outline-offset:3px; }
@media (prefers-reduced-motion:no-preference) {
  body #mg-title-game.cf-game .tc-reveal:not(.tc-fx-instant) .tc-fx-open:is([data-grade="4"],[data-grade="5"]) .cf-ornate-emblem { animation:cf-crest-awaken 1.3s ease-out both; }
}
@keyframes cf-crest-awaken { from { opacity:.35; transform:scale(.8); } to { opacity:1; transform:scale(1); } }
body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-open[data-grade] .tc-fx-front { background:#0b1322; opacity:1; }
@media (forced-colors:active) {
  body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-open[data-grade] .tc-fx-front { background:Canvas; }
  body #mg-title-game.cf-game .tc-reveal[data-kind] .tc-fx-front { color:CanvasText; background:Canvas; border:1px solid CanvasText; }
  body #mg-title-game.cf-game .tc-reveal[data-kind] :is(.cf-ornate-grade,.tc-fx-front strong,.tc-fx-front small,.tc-fx-caption) { color:CanvasText; background:Canvas; text-shadow:none; }
}

body #mg-title-game.cf-game .tc-reveal:not(.cf-share-capture) .cf-time-card .tc-fx-front { display:flex; flex-direction:column; justify-content:flex-end; padding:12px 7px; gap:4px; }



/* Size both rows from the actual remaining dialog space, including during reveal. */
body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-stage { display:grid; grid-template-rows:minmax(0,1fr); align-content:stretch; min-height:0; overflow:clip; container-type:size; }
body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-grid { width:min(100%,calc((100cqh - 18px)*1.875 + 72px)); height:100%; min-height:0; grid-template-rows:repeat(2,minmax(0,1fr)); }
body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-card { height:100%; min-height:0; width:auto; max-width:100%; aspect-ratio:3/4; justify-self:center; }
body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .cf-ornate-emblem { inset:8% 3% auto; }

/* Compact side-by-side content is reserved for phones, including touch landscape. */
@media (max-width:600px), (max-width:900px) and (max-height:500px) and (pointer:coarse) {
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] {
    box-sizing:border-box; width:calc(100vw - 12px); height:calc(100dvh - 12px);
    max-height:calc(100dvh - 12px); border-radius:14px;
    padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-heading { padding:2px 0 4px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] :is(.cf-ornate-guide,.tc-reveal-kicker,.cf-tier-legend) { display:none; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-stage {
    display:grid; grid-template-rows:minmax(0,1fr); padding:6px 2px; align-content:stretch;
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-grid {
    width:100%; height:100%; min-height:0; grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(5,minmax(0,1fr)); gap:6px;
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-card { height:100%; min-height:0; width:100%; aspect-ratio:auto; border-radius:7px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"]:not(.cf-share-capture) .tc-fx-card .tc-fx-front {
    display:flex; flex-direction:column; justify-content:center; align-items:center;
    padding:4px 5px 4px 45%; gap:3px;
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-card .cf-ornate-emblem {
    inset:auto; left:2px; top:calc(50% - 16cqw); width:42%; aspect-ratio:3/2;
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .cf-ornate-grade {
    inset:auto; left:2px; bottom:4px; width:42%; letter-spacing:0;
    font-size:.625rem; line-height:1.1;
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-front strong {
    font-size:clamp(.625rem,.55rem + .4vw,.75rem); line-height:1.2;
    word-break:keep-all; overflow-wrap:normal; letter-spacing:-.04em;
  }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-front small { font-size:.75rem; line-height:1.2; word-break:keep-all; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-caption { display:none; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-back { padding:0; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-back::before { inset:1px; background-position:center; background-size:auto 100%; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-monogram { top:50%; transform:translateY(-50%); font-size:clamp(16px,3.5dvh,27px); }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-seal { display:none; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-bottom { padding-top:5px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-status { font-size:.75rem; min-height:16px; margin-bottom:2px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-repeat { margin-top:4px; }
}
@media (max-width:900px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse) {
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-grid { grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); }
}

/* The same inset medallion is used by the landing preview, fragments and wallet. */
body #mg-title-game.cf-game .cf-medallion { position:relative; display:block; width:100%; aspect-ratio:3/2; isolation:isolate; background:var(--coupon-crest) center/contain no-repeat; pointer-events:none; }
body #mg-title-game.cf-game .cf-medallion img { position:absolute; width:46%; height:64%; left:27%; top:13%; object-fit:contain; z-index:1; }
body #mg-title-game.cf-game .cf-medallion::after { content:""; position:absolute; inset:0; z-index:2; background:var(--coupon-crest) center/contain no-repeat; -webkit-mask-image:radial-gradient(ellipse 18% 26% at 50% 45%,transparent 98%,#000 100%); mask-image:radial-gradient(ellipse 18% 26% at 50% 45%,transparent 98%,#000 100%); }
/* Restore the original three-card fan: legendary, mythic, enchant scroll. */
body #mg-title-game.cf-game .cf-summon-body { grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); }
body #mg-title-game.cf-game .cf-prize-showcase { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.12fr) minmax(0,1fr); align-items:center; gap:0; height:auto; min-height:246px; width:100%; max-width:520px; margin:0 auto; padding:16px 10px; box-sizing:border-box; }
body #mg-title-game.cf-game .cf-prize-card { position:relative; inset:auto; box-sizing:border-box; width:100%; min-width:0; height:auto; min-height:184px; padding:12px 4px; gap:4px; border:1px solid var(--fx-color); border-radius:11px; background:repeating-linear-gradient(130deg,transparent 0 10px,#ffffff04 10px 11px),linear-gradient(155deg,#283b52,#101927 75%); box-shadow:0 12px 25px #0007,inset 0 0 0 4px #101927,inset 0 0 0 5px var(--fx-color); color:var(--fx-color); }
body #mg-title-game.cf-game .cf-prize-card[data-grade="4"] { transform:translateX(4px) rotate(-10deg); }
body #mg-title-game.cf-game .cf-prize-card[data-grade="3"] { transform:translateX(-4px) rotate(10deg); }
body #mg-title-game.cf-game .cf-prize-card[data-grade="5"] { transform:translateY(-10px); min-height:210px; z-index:2; background:repeating-linear-gradient(130deg,transparent 0 10px,#ffffff05 10px 11px),radial-gradient(ellipse at 50% 33%,#66502c,#252134 68%); box-shadow:0 14px 30px #0008,0 0 26px #e6bb6b22,inset 0 0 0 4px #262033,inset 0 0 0 5px #ddbb72; }
body #mg-title-game.cf-game .cf-prize-card::before { border-radius:28px 0; inset:8px; }
body #mg-title-game.cf-game .cf-showcase-grade { color:var(--fx-color); font-weight:800; font-size:11px; line-height:1.3; }
body #mg-title-game.cf-game .cf-prize-card strong { color:#fff3d7; font-size:clamp(11px,1.5vw,16px); line-height:1.3; margin:0; }
body #mg-title-game.cf-game .cf-prize-card b { color:var(--fx-color); font-size:12px; line-height:1.35; font-weight:800; }
body #mg-title-game.cf-game .cf-prize-card>small { color:#c4cddd; font-size:10px; margin:0; }
body #mg-title-game.cf-game .cf-collection .tc-fusion { border-color:var(--fx-color); }
/* The theme's dark-mode a { color:... !important } must not wash out this gold button. */
body.dark-mode #mg-title-game.cf-game .cf-wallet a.cf-time-link { color:#332514 !important; }
body #mg-title-game.cf-game .cf-collection .cf-medallion { width:min(100%,180px); margin:8px auto 0; }
body #mg-title-game.cf-game .cf-inventory [data-category="attendance"] :is(h4,.cf-count) { padding-right:0; }
body:not(.dark-mode) #mg-title-game.cf-game .cf-collection .cf-showcase-grade { color:#293b57; }
body #mg-title-game.cf-game .cf-form-row form { display:flex; gap:6px; width:100%; }
body #mg-title-game.cf-game .cf-form-row form button { flex:1; }
body #mg-title-game.cf-game [hidden] { display:none !important; }
/* Keep the already reserved repeat area during result animation. */
body #mg-title-game.cf-game .tc-reveal .tc-repeat[hidden] { display:grid !important; visibility:hidden; }
body #mg-title-game.cf-game .tc-reveal .tc-repeat { display:grid; grid-template-columns:1fr 1fr; gap:4px 8px; }
body #mg-title-game.cf-game .tc-reveal .tc-repeat p { grid-column:1/-1; }
body #mg-title-game.cf-game .tc-reveal .tc-repeat button { min-width:0; width:100%; font-size:13px; padding:7px 8px; }
body #mg-title-game.cf-game .tc-reveal .cf-fuse-repeat form { display:flex; justify-content:center; gap:6px; }
body #mg-title-game.cf-game .tc-reveal [data-cf-auto-stop] { border-color:#d69a8d; color:#ffddcf; background:#4c292b; }
body #mg-title-game.cf-game .tc-reveal-top [data-cf-auto-stop] { min-height:40px; padding:5px 8px; font-size:12px; }
body #mg-title-game.cf-game #cf-auto-dialog { width:min(420px,calc(100vw - 28px)); box-sizing:border-box; max-height:calc(100dvh - 28px); margin:auto; padding:22px; border:1px solid #cfb477; border-radius:16px; background:#111b2b; color:#f5eedf; }
body #mg-title-game.cf-game #cf-auto-dialog:modal { overscroll-behavior:contain; }
body #mg-title-game.cf-game #cf-auto-dialog::backdrop { background:#020811c9; overflow:hidden; overscroll-behavior:contain; }
body #mg-title-game.cf-game #cf-auto-dialog h1 { font-size:22px; margin:0 0 10px; color:#ffe3a1; }
body #mg-title-game.cf-game #cf-auto-dialog p { font-size:13px; line-height:1.6; margin:8px 0; color:#d0d9e7; }
body #mg-title-game.cf-game #cf-auto-dialog label { display:flex; align-items:center; gap:10px; margin:18px 0; font-size:14px; color:#f5eedf; }
body #mg-title-game.cf-game .cf-auto-count-picker { min-width:0; margin:18px 0; padding:0; border:0; }
body #mg-title-game.cf-game .cf-auto-count-picker legend { margin-bottom:8px; padding:0; font-size:14px; color:#f5eedf; }
body #mg-title-game.cf-game .cf-auto-stepper { display:grid; grid-template-columns:52px 1fr 52px; align-items:center; gap:12px; }
body #mg-title-game.cf-game #cf-auto-count-display { text-align:center; font-size:26px; font-weight:800; font-variant-numeric:tabular-nums; color:#ffe3a1; }
body #mg-title-game.cf-game #cf-auto-dialog input[type="checkbox"] { width:20px; height:20px; accent-color:#e3bf76; }
body #mg-title-game.cf-game .cf-auto-dialog-actions { display:flex; gap:8px; margin-top:20px; }
body #mg-title-game.cf-game #cf-auto-dialog button { min-height:48px; flex:1; padding:8px; border:1px solid #78869e; border-radius:7px; background:#26344c; color:#fff; font:inherit; touch-action:manipulation; }
body #mg-title-game.cf-game #cf-auto-dialog [data-cf-auto-step] { font-size:24px; }
body #mg-title-game.cf-game #cf-auto-dialog button:disabled { opacity:.4; cursor:default; }
body #mg-title-game.cf-game #cf-auto-dialog [data-cf-auto-confirm] { flex:2; color:#231909; background:#f0d08f; border-color:#ffe6ad; font-weight:800; }
body #mg-title-game.cf-game #cf-auto-dialog :is(button,input):focus-visible { outline:3px solid #99d3ff; outline-offset:3px; }
@media (max-width:600px) {
  body #mg-title-game.cf-game .cf-prize-card strong { font-size:11px; }
  body #mg-title-game.cf-game .cf-prize-card b { font-size:10px; }
  body #mg-title-game.cf-game .cf-prize-card>small { font-size:9px; }
  body #mg-title-game.cf-game .cf-collection .cf-inventory article { flex-basis:calc(50% - 12px); padding:12px 9px; }
  body #mg-title-game.cf-game .cf-form-row form { flex-wrap:wrap; }
  body #mg-title-game.cf-game .cf-form-row form button { min-width:65px; font-size:12px; }
}
body:not(.dark-mode) #mg-title-game.cf-game .cf-prize-card .cf-showcase-grade { color:#293b57; }
body #mg-title-game.cf-game .cf-summon-copy [data-cf-draw-entry] { display:flex; align-items:stretch; justify-content:center; gap:8px; }
body #mg-title-game.cf-game .cf-summon-copy [data-cf-draw-entry] .cf-summon-draw { flex:1; }
body #mg-title-game.cf-game .cf-auto-entry { min-height:48px; padding:8px 16px; border:1px solid #dab971; border-radius:10px; color:#ffe2a0; background:#263247; font-size:14px; font-weight:800; }

@media (max-width:700px) {
  body #mg-title-game.cf-game .cf-summon-body { grid-template-columns:minmax(0,1fr); }
  body #mg-title-game.cf-game .cf-prize-showcase { min-height:222px; margin-top:12px; padding:14px 8px; }
  body #mg-title-game.cf-game .cf-prize-card { min-height:166px; padding:10px 3px; gap:3px; }
  body #mg-title-game.cf-game .cf-prize-card[data-grade="5"] { min-height:190px; }
}

body:not(.dark-mode) #mg-title-game.cf-game .cf-prize-card[data-grade="5"] { background:radial-gradient(ellipse at 50% 30%,#fff2bd,#fffaf0 75%); box-shadow:0 14px 30px #805f2433,0 0 26px #e6bb6b33,inset 0 0 0 4px #fff4d3,inset 0 0 0 5px #ddbb72; }

body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-fx-aura { inset:0; }
body #mg-title-game.cf-game [data-cf-auto-stop] { white-space:nowrap; word-break:keep-all; }
/* Keep every coupon action label on one line; let button rows wrap instead. */
body #mg-title-game.cf-game button { white-space:nowrap; word-break:keep-all; }
body #mg-title-game.cf-game .cf-form-row form button { min-width:max-content; }
body #mg-title-game.cf-game .tc-reveal .cf-fuse-repeat { width:min(100%,300px); grid-template-columns:minmax(0,1fr); }
body #mg-title-game.cf-game .tc-reveal .cf-fuse-repeat form { flex-wrap:wrap; }
body #mg-title-game.cf-game .tc-reveal .cf-fuse-repeat form button { flex:1 1 auto; width:auto; min-width:max-content; }

/* Fusion keeps the shared gold M back until the result card turns over. */
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-stage { overflow:clip; }
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-fx-materials { container-type:size; }
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .cf-fusion-material {
  --cf-fusion-reach:min(140px,30cqh); container-type:inline-size;
  width:min(96px,24cqh); height:min(134px,34cqh); left:50%; top:50%; margin:0;
  translate:-50% -50%; box-sizing:border-box; display:flex; flex-direction:column; justify-content:flex-end; align-items:center;
  padding:0; border:0; border-radius:8px; background:transparent; box-shadow:none; font:inherit;
}
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .cf-ornate-emblem { font-style:normal; }
@media (prefers-reduced-motion:no-preference) {
  body #mg-title-game.cf-game .tc-fx-running[data-kind="fuse"] .tc-fx-materials .cf-fusion-material { animation:cf-material-gather 1.5s ease-in both; }
}
@keyframes cf-material-gather {
  0% { opacity:0; transform:rotate(var(--angle)) translateY(calc(-1 * var(--cf-fusion-reach))) rotate(calc(-1 * var(--angle))) scale(.7); }
  25%,70% { opacity:1; transform:rotate(var(--angle)) translateY(calc(-1 * var(--cf-fusion-reach))) rotate(calc(-1 * var(--angle))); }
  100% { opacity:0; transform:rotate(calc(var(--angle) + 90deg)) translateY(0) scale(.1); }
}
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-stage { display:grid; grid-template-rows:minmax(0,1fr); align-content:stretch; }
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-grid { height:100%; min-height:0; align-items:center; }
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-fx-card { height:min(240px,100%); width:auto; max-width:100%; aspect-ratio:3/4; justify-self:center; }
@media (max-height:500px) {
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-stage { padding:4px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-grid.tc-reveal-single { grid-template-columns:minmax(0,280px); }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-fx-card { width:100%; height:min(180px,100%); aspect-ratio:auto; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"]:not(.cf-share-capture) .tc-fx-card .tc-fx-front { padding:6px 6px 6px 45%; justify-content:center; gap:3px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-fx-card .cf-ornate-emblem { inset:auto; left:2%; top:calc(50% - 14cqw); width:42%; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-fx-card .cf-ornate-grade { inset:auto; left:2%; bottom:3px; width:42%; font-size:10px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-fx-caption { font-size:9px; }
}
@media (max-height:500px) {
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] { padding:8px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-heading { padding:2px 0; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-kicker { display:none; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] h2 { font-size:18px; line-height:1.3; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-bottom { padding-top:4px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .tc-reveal-status { min-height:16px; margin-bottom:2px; font-size:12px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .cf-fuse-repeat button { min-height:36px; padding:5px 10px; }
}

body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .cf-material-back { font-style:normal; border-radius:inherit; }
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .cf-material-back .tc-fx-monogram { font-size:clamp(8px,22cqw,28px); }
body #mg-title-game.cf-game .tc-reveal[data-kind="fuse"] .cf-material-back .tc-fx-seal { font-size:min(7px,5cqw); }
/* Short PC windows keep portrait cards; only surrounding copy and spacing tighten. */
@media (min-width:601px) and (max-height:740px) {
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-heading { padding:4px 0; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] :is(.cf-ornate-guide,.tc-reveal-kicker,.cf-tier-legend) { display:none; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] h2 { font-size:24px; line-height:1.3; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-stage { padding:8px 4px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-bottom { padding-top:5px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-reveal-status { font-size:12px; min-height:16px; margin-bottom:2px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-repeat { margin-top:4px; }
  body #mg-title-game.cf-game .tc-reveal[data-kind="draw"] .tc-repeat :is(#tc-repeat-info,#cf-ready-info) { font-size:11px; line-height:1.3; }
}
