/* ============================ The match table HUD ============================ */
.mt { position: relative; width: 100%; height: 100%; overflow: hidden; user-select: none; }
.mt-stage { position: absolute; inset: 0; }
.mt-canvas { width: 100%; height: 100%; display: block; }
.mt-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mt-fx { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.mt.busy .mt-card.playable { cursor: progress; }

/* ---------------- unit plates (projected under each hologram) ---------------- */
.tb-plate { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 4px; will-change: transform; transition: opacity .3s; }
.tb-plate .tb-atk, .tb-plate .tb-hp { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: 25px; line-height: 1; font-variant-numeric: lining-nums tabular-nums;
  color: #1a1206; background: radial-gradient(circle at 35% 28%, #fff4cf, #e7c877 45%, #a9812f 100%); box-shadow: 0 0 0 2px #0b0c0f, 0 0 0 3px rgba(243, 223, 162, .7), 0 4px 10px rgba(0, 0, 0, .85); }
.tb-plate .tb-hp { color: #fff; background: radial-gradient(circle at 35% 28%, #ffb3a3, #d4493b 45%, #7e1d16 100%); text-shadow: 0 1px 2px rgba(0, 0, 0, .75); box-shadow: 0 0 0 2px #0b0c0f, 0 0 0 3px rgba(255, 180, 160, .6), 0 4px 10px rgba(0, 0, 0, .85); }
.tb-plate .tb-atk::after, .tb-plate .tb-hp::after { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font-size: 11px; line-height: 1; padding: 1px 4px; border-radius: 99px; background: #0b0c0f; color: var(--g-gold); }
.tb-plate .tb-atk::after { content: "⚔"; }
.tb-plate .tb-hp::after { content: "♥"; color: #ff9c8a; }
.tb-plate.hurt .tb-hp { box-shadow: 0 0 0 2px #0b0c0f, 0 0 0 3px #ff7a61, 0 0 16px rgba(255, 100, 80, .8); }
.tb-plate.buffed .tb-atk { box-shadow: 0 0 0 2px #0b0c0f, 0 0 0 3px #9fe6ff, 0 0 16px rgba(140, 220, 255, .8); }
.tb-plate .tb-name { font-family: var(--g-display); font-weight: 700; font-size: 13.5px; letter-spacing: .06em; color: var(--g-ink); padding: 3px 9px; border-radius: 99px; background: rgba(10, 11, 14, .82); box-shadow: inset 0 0 0 1px var(--g-hair-soft); white-space: nowrap; max-width: 116px; overflow: hidden; text-overflow: ellipsis; }
.tb-plate.you .tb-name { box-shadow: inset 0 0 0 1px rgba(127, 211, 255, .45); }
.tb-plate.them .tb-name { box-shadow: inset 0 0 0 1px rgba(255, 154, 108, .45); }
.tb-tags { grid-column: 1 / -1; display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; max-width: 170px; }
.tb-tags i { font-style: normal; font-size: 10px; letter-spacing: .06em; font-family: var(--g-display); font-weight: 700; padding: 1px 6px; border-radius: 99px; background: rgba(8, 9, 12, .78); color: var(--g-ink-2); }
.tb-tags .t-anchor { color: #1b1308; background: var(--g-gold); }
.tb-tags .t-sick, .tb-tags .t-acted { color: var(--g-ink-3); }
.tb-tags .t-recall { color: #bfe7ff; }
.tb-tags .t-snare { color: #ffc3a9; }
.tb-tags .t-inf { color: #9fe6ff; }
.tb-tags .t-kw { color: var(--g-gold); }
.tb-plate.dying { opacity: 0; }
.tb-plate.attacking .tb-name { background: rgba(120, 30, 20, .88); }
.tb-plate[data-stance]:not([data-stance=""])::before { position: absolute; left: 50%; bottom: calc(100% + 118px); translate: -50% 0; /* not transform: the rise animation owns transform */ font-family: var(--g-display); font-weight: 700; letter-spacing: .18em; font-size: 13px; padding: 7px 14px 6px; border-radius: 6px; white-space: nowrap;
  animation: g-rise .25s var(--g-ease) both; }
.tb-plate[data-stance="hold"]::before { content: "HOLD"; color: var(--g-ink-2); background: rgba(16, 18, 22, .92); box-shadow: inset 0 0 0 1px var(--g-hair-soft); }
.tb-plate[data-stance="charge"]::before { content: "CHARGE"; color: #fff1e8; background: linear-gradient(180deg, #d0553b, #8b2718); box-shadow: 0 0 22px rgba(255, 90, 60, .6), inset 0 0 0 1px rgba(255, 210, 190, .5); }
.tb-plate[data-blocking]:not([data-blocking=""])::after { content: attr(data-blocking); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-family: var(--g-display); letter-spacing: .08em; color: #06141c; background: #9fe6ff; padding: 2px 8px; border-radius: 99px; }

.mt-shardnum { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 4px; pointer-events: none; }
.mt-shardnum b { font-family: var(--g-display); font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.mt-shardnum span { font-family: var(--g-display); letter-spacing: .14em; font-size: 12px; color: var(--g-ink-2); }
.mt-shardnum.you b { color: #d9f3ff; } .mt-shardnum.them b { color: #ffe0d2; }
.mt-decknum { position: absolute; left: 0; top: 0; font-family: var(--g-display); letter-spacing: .1em; font-size: 12px; color: var(--g-ink-3); white-space: nowrap; }

/* ---------------- player bars ---------------- */
.mt-bar { position: absolute; z-index: 20; display: grid; grid-template-columns: 58px auto auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 4px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 40px 16px 16px 40px;
  background: linear-gradient(180deg, rgba(30, 31, 36, .9), rgba(16, 17, 20, .92)); box-shadow: var(--g-shadow), inset 0 0 0 1px var(--g-hair-soft); backdrop-filter: blur(4px); min-width: 330px; }
.mt-them { left: 16px; top: 14px; }
.mt-you { left: 16px; bottom: 16px; }
.mt-avatar { grid-row: 1 / 3; position: relative; width: 58px; height: 58px; border-radius: 50%; padding: 2px; background: var(--g-gilt); }
.mt-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 22%; background: #0b0c0f; display: block; }
.mt-you .mt-avatar { box-shadow: 0 0 0 2px rgba(127, 211, 255, .6), 0 0 18px rgba(127, 211, 255, .35); }
.mt-them .mt-avatar { box-shadow: 0 0 0 2px rgba(255, 154, 108, .55), 0 0 18px rgba(255, 154, 108, .3); }
.mt-init { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; color: #1b1308; background: radial-gradient(circle at 35% 30%, #fff2c8, #d6b263 60%, #8c6a2c); box-shadow: 0 2px 6px rgba(0, 0, 0, .8); animation: mt-glint 2.4s ease-in-out infinite; }
@keyframes mt-glint { 50% { box-shadow: 0 0 16px rgba(255, 220, 150, .9); } }
.mt-id { min-width: 0; }
.mt-name { font-family: var(--g-display); font-weight: 700; font-size: 19px; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.mt-token { color: var(--g-gold); font-size: 13px; }
.mt-sub { font-size: 13px; color: var(--g-ink-3); white-space: nowrap; }
.mt-biome { color: var(--g-gold); }
.mt-sp { grid-row: 1 / 3; grid-column: 3; display: flex; flex-direction: column; align-items: center; padding-left: 12px; border-left: 1px solid var(--g-hair-soft); }
.mt-sp b { font-family: var(--g-display); font-size: 34px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.mt-sp span { font-size: 11px; letter-spacing: .16em; color: var(--g-ink-3); font-family: var(--g-display); }
.mt-flow { grid-column: 2; display: flex; gap: 4px; }
.mt-flow i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.mt-flow i.on { background: radial-gradient(circle at 35% 30%, #fff, #9fe6ff 45%, #2f8fc4); box-shadow: 0 0 8px rgba(127, 211, 255, .7); }
.mt-them .mt-flow i.on { background: radial-gradient(circle at 35% 30%, #fff, #ffc2a3 45%, #c4592f); box-shadow: 0 0 8px rgba(255, 154, 108, .6); }
.mt-state { position: absolute; left: 76px; bottom: -11px; font-family: var(--g-display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--g-gold); background: #121317; padding: 1px 8px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--g-hair-soft); }
.mt-state:empty { display: none; }
.mt-you .mt-state { bottom: auto; top: -11px; } /* the tag sits on the side of the bar facing the table, never off-screen */
.mt-clock { position: absolute; right: 12px; top: -12px; font-family: var(--g-display); font-size: 13px; letter-spacing: .08em; color: var(--g-ink-2); background: #121317; padding: 1px 8px; border-radius: 99px; }
.mt-clock:empty { display: none; }
.mt-clock.low { color: #ffd0c4; background: #6e241b; animation: mt-glint 1s infinite; }

/* ---------------- ribbon, tools, log ---------------- */
.mt-ribbon { position: absolute; z-index: 20; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; align-items: center; padding: 5px; border-radius: 99px; background: rgba(12, 13, 16, .82); box-shadow: inset 0 0 0 1px var(--g-hair-soft); }
.mt-ribbon span { font-family: var(--g-display); font-weight: 700; font-size: 13px; letter-spacing: .12em; padding: 5px 13px; border-radius: 99px; color: var(--g-ink-3); transition: all var(--g-t); }
.mt-ribbon .mt-round { color: var(--g-gold); padding-right: 16px; border-right: 1px solid var(--g-hair-soft); border-radius: 99px 0 0 99px; }
.mt-ribbon .mt-ph.on { color: #1b1308; background: linear-gradient(180deg, #f1dc9c, #c89f4c); box-shadow: 0 0 18px rgba(214, 170, 96, .45); }
.mt-opp-hand { position: absolute; z-index: 15; top: 58px; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; height: 70px; }
.mt-oppcard { margin: 0 -9px; transform: rotate(calc(var(--i) * -4deg)) translateY(calc(var(--i) * var(--i) * 1.5px)); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .7)); transition: transform var(--g-t) var(--g-ease); }
.mt-oppcard:hover { transform: translateY(8px) scale(1.4); z-index: 2; }
.mt-tools { position: absolute; z-index: 25; top: 14px; right: 14px; display: flex; gap: 6px; }
.mt-tool { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; font-size: 18px; color: var(--g-ink-2); background: rgba(14, 15, 18, .85); box-shadow: inset 0 0 0 1px var(--g-hair-soft); }
.mt-tool:hover { color: var(--g-ink); box-shadow: inset 0 0 0 1px var(--g-hair); }
.mt-tool.off { opacity: .4; text-decoration: line-through; }
.mt-log { position: absolute; z-index: 30; top: 64px; right: 14px; bottom: 170px; width: 320px; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: rgba(14, 15, 18, .93); box-shadow: var(--g-shadow), inset 0 0 0 1px var(--g-hair-soft); transform: translateX(calc(100% + 30px)); transition: transform var(--g-t-slow) var(--g-ease); }
.mt-log.open { transform: none; }
.mt-log-head { font-family: var(--g-display); font-weight: 700; letter-spacing: .14em; font-size: 13px; color: var(--g-gold); padding: 12px 16px; border-bottom: 1px solid var(--g-hair-soft); }
.mt-log-list { flex: 1; overflow: auto; padding: 8px 16px 16px; font-size: 14px; line-height: 1.45; }
.mt-log-line { padding: 3px 0; color: var(--g-ink-2); }
.mt-log-line.you { color: #cdeeff; } .mt-log-line.them { color: #ffd9c9; }
.mt-log-line.sys { color: var(--g-ink); font-style: italic; }
.mt-log-line.round { font-family: var(--g-display); font-weight: 700; letter-spacing: .12em; color: var(--g-gold); margin-top: 10px; border-top: 1px solid var(--g-hair-soft); padding-top: 8px; }
.mt-log-line.dim { color: var(--g-ink-3); font-size: 13px; }
.mt-log-line.hurt { color: #ff9f8c; } .mt-log-line.good { color: #a8e3b0; }

/* ---------------- preview ---------------- */
.mt-preview { position: absolute; z-index: 35; left: 18px; top: 50%; transform: translate(-30px, -50%); opacity: 0; pointer-events: none; transition: opacity var(--g-t), transform var(--g-t) var(--g-ease); filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .8)); }
.mt-preview.on { opacity: 1; transform: translate(0, -50%); }
.mt-prev-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.mt-prev-stats span { font-family: var(--g-display); font-size: 12px; letter-spacing: .1em; padding: 3px 9px; border-radius: 99px; background: rgba(10, 11, 14, .9); box-shadow: inset 0 0 0 1px var(--g-hair-soft); }

/* ---------------- hand ---------------- */
.mt-handwrap { position: absolute; z-index: 22; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 30px; pointer-events: none; }
.mt-hand { display: flex; justify-content: center; align-items: flex-end; min-height: 120px; pointer-events: auto; }
.mt-card { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 12px; transition: transform var(--g-t) var(--g-ease), filter var(--g-t); }
.mt-hand .mt-card { margin: 0 -16px; transform: translateY(38%) rotate(calc(var(--i) * 3deg)) translateY(calc(var(--i) * var(--i) * 3px)); transform-origin: 50% 120%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .8)) brightness(.8) saturate(.8); }
.mt-hand .mt-card:hover, .mt-hand .mt-card.selected { transform: translateY(-4px) scale(1.18); z-index: 5; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .8)); }
.mt-card.playable { filter: drop-shadow(0 0 10px rgba(127, 211, 255, .9)) drop-shadow(0 10px 14px rgba(0, 0, 0, .8)) !important; }
.mt-card.playable::after { content: ""; position: absolute; inset: -3px; border-radius: 16px; box-shadow: 0 0 0 2px rgba(159, 230, 255, .95); animation: mt-breathe 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes mt-breathe { 50% { box-shadow: 0 0 0 2px rgba(159, 230, 255, .45), 0 0 26px rgba(127, 211, 255, .5); } }
.mt-card.selected::after { box-shadow: 0 0 0 3px #fff, 0 0 30px rgba(255, 255, 255, .6); animation: none; }
.mt-card.spent { filter: grayscale(.8) brightness(.5) !important; }
.mt-empty { font-family: var(--g-italic); font-style: italic; color: var(--g-ink-3); padding: 0 0 26px; pointer-events: none; }
.mt-anchor { pointer-events: auto; padding-bottom: 12px; }
.mt-anchor-card { transform: rotate(4deg); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .8)) brightness(.85); }
.mt-anchor-card:hover { transform: translateY(-10px) scale(1.12) rotate(0deg); }
.mt-anchor-card.onfield { filter: grayscale(.7) brightness(.45); }
.mt-anchor-tag { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); white-space: nowrap; font-family: var(--g-display); font-weight: 700; font-size: 11px; letter-spacing: .16em; color: #1b1308; background: var(--g-gold); padding: 2px 9px; border-radius: 99px; }

/* ---------------- prompt + the one big button ---------------- */
.mt-prompt { position: absolute; z-index: 24; right: 24px; bottom: 186px; width: min(400px, 36vw); text-align: right; pointer-events: none; }
.mt-prompt .mt-prompt-controls { justify-content: flex-end; }
.mt-prompt > * { pointer-events: auto; }
.mt-prompt-text { font-family: var(--g-display); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: .04em; text-shadow: 0 2px 12px rgba(0, 0, 0, .95); }
.mt-prompt.mine .mt-prompt-text { color: #eaf8ff; }
.mt-prompt.mine { padding: 14px 26px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(14, 16, 20, .9), rgba(10, 11, 14, .94)); box-shadow: var(--g-shadow), inset 0 0 0 1px rgba(127, 211, 255, .28); backdrop-filter: blur(6px); }
.mt-prompt.mine.picking { background: none; box-shadow: none; backdrop-filter: none; }
.mt-prompt:not(.mine) .mt-prompt-text { font-size: 18px; color: var(--g-ink-2); font-style: italic; font-family: var(--g-italic); font-weight: 600; }
.mt-prompt-sub { margin-top: 4px; color: var(--g-ink-2); font-size: 15px; text-shadow: 0 1px 8px rgba(0, 0, 0, 1); }
.mt-prompt-controls { margin-top: 12px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.mt-act { position: absolute; z-index: 26; right: 34px; bottom: 34px; width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #06141c; background: radial-gradient(circle at 40% 30%, #eefaff, #8fdcff 42%, #2a86bd 100%);
  box-shadow: 0 0 0 4px #0c0d10, 0 0 0 6px rgba(201, 162, 78, .7), 0 0 40px rgba(127, 211, 255, .55), 0 18px 30px rgba(0, 0, 0, .7); transition: transform var(--g-t) var(--g-ease), filter var(--g-t); animation: mt-act 2.6s ease-in-out infinite; }
.mt-act:hover { transform: scale(1.05); filter: brightness(1.08); }
.mt-act:disabled { filter: grayscale(.8) brightness(.6); animation: none; cursor: progress; }
.mt-act b { font-family: var(--g-display); font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.mt-act small { font-family: var(--g-display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.mt-act.attack { color: #fff4ee; background: radial-gradient(circle at 40% 30%, #ffd9c9, #e2603f 45%, #7d2415 100%); box-shadow: 0 0 0 4px #0c0d10, 0 0 0 6px rgba(201, 162, 78, .7), 0 0 40px rgba(255, 110, 70, .55), 0 18px 30px rgba(0, 0, 0, .7); }
@keyframes mt-act { 50% { box-shadow: 0 0 0 4px #0c0d10, 0 0 0 6px rgba(201, 162, 78, .9), 0 0 60px rgba(127, 211, 255, .75), 0 18px 30px rgba(0, 0, 0, .7); } }
.mt-stepper { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border-radius: 99px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px var(--g-hair-soft); }
.mt-stepper button { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; color: var(--g-ink); background: var(--g-slate-2); font-size: 16px; }
.mt-stepper b { min-width: 50px; text-align: center; font-family: var(--g-display); }

/* bid */
.mt-bid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mt-bid-beads { display: flex; gap: 8px; align-items: center; }
.mt-bead { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); color: var(--g-ink-3); font-family: var(--g-display); transition: transform var(--g-t-fast) var(--g-ease); }
.mt-bead:hover { transform: scale(1.15); }
.mt-bead.on { background: radial-gradient(circle at 35% 30%, #fff, #9fe6ff 45%, #2f8fc4); box-shadow: 0 0 14px rgba(127, 211, 255, .8); color: #06141c; }
.mt-bead.zero { font-size: 13px; }
.mt-bid-read { font-family: var(--g-display); letter-spacing: .08em; color: var(--g-ink-2); }
.mt-bid-read b { font-size: 26px; color: var(--g-ink); }

/* unlock */
.mt-unlock { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 12px; border-radius: 16px; background: rgba(8, 9, 12, .7); box-shadow: inset 0 0 0 1px var(--g-hair-soft); max-width: 72vw; }
.mt-unlock .mt-card:hover { transform: translateY(-10px) scale(1.06); }

/* unit menu */
.mt-menu { position: absolute; z-index: 45; width: 290px; padding: 8px; border-radius: 14px; background: rgba(16, 17, 21, .97); box-shadow: var(--g-shadow), inset 0 0 0 1px var(--g-hair); animation: g-rise .2s var(--g-ease) both; }
.mt-menu-head { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px 10px; border-bottom: 1px solid var(--g-hair-soft); margin-bottom: 4px; }
.mt-menu-head b { font-family: var(--g-display); font-size: 17px; letter-spacing: .04em; } .mt-menu-head span { font-size: 13px; color: var(--g-ink-3); }
.mt-mi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--g-ink); cursor: pointer; font: inherit; }
button.mt-mi:hover { background: rgba(127, 211, 255, .1); }
.mt-mi span { font-family: var(--g-display); font-weight: 700; font-size: 16px; letter-spacing: .03em; }
.mt-mi small { font-size: 13px; color: var(--g-ink-3); }
.mt-mi-infuse { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mt-mi-infuse > div:first-child { display: flex; flex-direction: column; }

[hidden].mt-act, [hidden].mt-menu, [hidden].mt-dock, .mt-prompt:empty { display: none !important; }
.mt-prompt.picking { right: auto; left: 50%; width: auto; bottom: 50%; transform: translate(-50%, 50%); max-width: 90vw; text-align: center; }
.mt-prompt.picking .mt-prompt-controls { justify-content: center; }
.mt-prompt.picking::before { content: ""; position: fixed; inset: -100vh -100vw; background: radial-gradient(circle at 50% 50%, rgba(6, 6, 8, .8), rgba(6, 6, 8, .9)); z-index: -1; }
.mt-prompt.picking .mt-prompt-text, .mt-prompt.picking .mt-prompt-sub { text-shadow: 0 2px 10px #000, 0 0 2px #000; }

/* ---------------- effects ---------------- */
.mt-float { position: absolute; transform: translate(-50%, -50%); font-family: var(--g-display); font-weight: 700; font-size: 26px; text-shadow: 0 2px 8px rgba(0, 0, 0, .95); animation: mt-float 1.3s var(--g-ease) forwards; white-space: nowrap; }
.mt-float.dmg { color: #ff8a6d; } .mt-float.gain { color: #9ff0b8; } .mt-float.word { color: #f3dfa2; font-size: 20px; letter-spacing: .08em; }
.mt-float.big { font-size: 40px; }
@keyframes mt-float { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.mt-banner { position: absolute; z-index: 41; left: 0; right: 0; top: 38%; pointer-events: none; display: flex; justify-content: center; }
.mt-banner-in { padding: 14px 70px; font-family: var(--g-display); font-weight: 700; font-size: 38px; letter-spacing: .22em; text-transform: uppercase; color: #f3dfa2;
  background: linear-gradient(90deg, transparent, rgba(10, 10, 12, .85) 20%, rgba(10, 10, 12, .85) 80%, transparent); animation: mt-banner .5s var(--g-ease) both; transition: opacity .5s, transform .5s; }
.mt-banner-in span { background: var(--g-gilt); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mt-banner-in.battle span { background: linear-gradient(180deg, #ffd9c9, #e2603f); -webkit-background-clip: text; background-clip: text; }
.mt-banner-in.out { opacity: 0; transform: scale(1.05); }
@keyframes mt-banner { from { opacity: 0; transform: scaleX(.6); letter-spacing: .5em; } to { opacity: 1; transform: none; } }
.mt-castcard { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(.6); opacity: 0; animation: mt-cast .45s var(--g-ease) forwards; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .8)); }
.mt-castcard.them { animation-name: mt-cast-them; }
.mt-castcard.out { transition: opacity .25s, transform .25s; opacity: 0 !important; transform: translate(-50%, -50%) scale(.8) !important; }
@keyframes mt-cast { from { opacity: 0; transform: translate(-50%, 10%) scale(.5); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes mt-cast-them { from { opacity: 0; transform: translate(-50%, -120%) scale(.5); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.mt-bidreveal { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: grid; grid-template-columns: 1fr auto 1fr; gap: 34px; align-items: center; padding: 26px 40px; border-radius: 18px;
  background: rgba(10, 11, 14, .92); box-shadow: var(--g-shadow), inset 0 0 0 1px var(--g-hair); animation: g-rise .4s var(--g-ease) both; transition: opacity .3s; min-width: 560px; }
.mt-bidreveal.out { opacity: 0; }
.mt-bidside { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mt-bidside b { font-family: var(--g-display); font-size: 40px; line-height: 1; }
.mt-bidside.you b { color: #cdeeff; } .mt-bidside.them b { color: #ffd9c9; }
.mt-eyebrow { font-family: var(--g-display); letter-spacing: .18em; font-size: 12px; color: var(--g-ink-3); text-transform: uppercase; }
.mt-beads { display: flex; gap: 5px; min-height: 16px; }
.mt-beads i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e6cb84 45%, #8c6a2c); animation: g-rise .3s var(--g-ease) both; }
.mt-beads em { font-size: 13px; color: var(--g-ink-3); }
.mt-bidmid { text-align: center; font-family: var(--g-display); font-weight: 700; font-size: 20px; letter-spacing: .04em; max-width: 240px; }
.mt-bidmid small { display: block; margin-top: 6px; font-family: var(--g-body); font-weight: 400; font-size: 14px; color: var(--g-ink-2); letter-spacing: 0; }
.mt-crest { font-size: 34px; color: var(--g-gold); margin-bottom: 4px; }

/* result */
.mt-result { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(10, 10, 12, .82), rgba(4, 4, 6, .96)); animation: g-fade .6s both; backdrop-filter: blur(3px); }
.mt-result-in { text-align: center; }
.mt-result-title { font-family: var(--g-display); font-weight: 700; font-size: clamp(64px, 10vw, 128px); letter-spacing: .12em; line-height: 1; background: var(--g-gilt); -webkit-background-clip: text; background-clip: text; color: transparent; animation: mt-banner .9s var(--g-ease) both; filter: drop-shadow(0 6px 30px rgba(214, 170, 96, .4)); }
.mt-result.lost .mt-result-title { background: linear-gradient(180deg, #c9c4bb, #6b665e); -webkit-background-clip: text; background-clip: text; filter: none; }
.mt-result-sub { font-family: var(--g-italic); font-style: italic; font-size: 22px; color: var(--g-ink-2); margin-top: 8px; }
.mt-result-sp { display: flex; gap: 22px; justify-content: center; margin: 18px 0 30px; font-family: var(--g-display); letter-spacing: .08em; color: var(--g-ink-3); }
.mt-result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .mt-hand .g-cardbox { --w: 96px !important; }
  .mt-anchor .g-cardbox { --w: 84px !important; }
  .mt-hand .mt-card { transform: translateY(30%) rotate(calc(var(--i) * 3deg)); }
  .mt-unlock { flex-wrap: nowrap; overflow-x: auto; max-width: 92vw; justify-content: flex-start; }
  .mt-unlock .g-cardbox { --w: 112px !important; }
  .mt-prompt { right: 12px; width: calc(100vw - 150px); bottom: 150px; }
  .mt-prompt.mine { padding: 10px 14px 12px; }
  .mt-prompt-text { font-size: 17px; }
  .mt-prompt-sub { font-size: 13px; }
  .mt-opp-hand { display: none; }
  .mt-tools { top: auto; bottom: 150px; left: 12px; right: auto; flex-direction: column; }
  .tb-plate .tb-name, .tb-plate .tb-tags { display: none; }
  .tb-plate .tb-atk, .tb-plate .tb-hp { width: 28px; height: 28px; font-size: 17px; }
  .tb-plate { gap: 2px; }
  .mt-shardnum b { font-size: 24px; }
  .mt-bar { min-width: 0; transform: scale(.82); transform-origin: left top; }
  .mt-you { transform-origin: left bottom; }
  .mt-act { width: 104px; height: 104px; right: 16px; bottom: 16px; }
  .mt-prompt { bottom: 140px; max-width: 92vw; }
  .mt-ribbon { display: none; }
  .mt-hand .mt-card { margin: 0 -26px; }
}

body:has(.mt) .g-toasts { bottom: auto; top: 76px; }

/* ============================ COA alternatives (app/coa.js) ============================ */
/* hand: side rack */
[data-coa-hand="rack"] .mt-handwrap { left: auto; right: 20px; bottom: auto; top: 46%; transform: translateY(-50%); z-index: 23; flex-direction: column-reverse; align-items: flex-end; gap: 16px; }
[data-coa-hand="rack"] .mt-hand { flex-direction: column; align-items: flex-end; min-height: 0; max-height: 64vh; }
[data-coa-hand="rack"] .mt-hand .mt-card { margin: -34px 0; transform: none; }
[data-coa-hand="rack"] .mt-hand .mt-card:hover, [data-coa-hand="rack"] .mt-hand .mt-card.selected { transform: translateX(-24px) scale(1.08); }
[data-coa-hand="rack"] .mt-hand .g-cardbox { --w: 104px !important; }
[data-coa-hand="rack"] .mt-prompt { right: 170px; }
[data-coa-hand="rack"] .mt-log.open { right: 170px; }
[data-coa-hand="rack"] .mt-act { bottom: 24px; right: 150px; }
/* hand: flat tray */
[data-coa-hand="tray"] .mt-handwrap { bottom: 10px; padding: 10px 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(24, 25, 30, .92), rgba(12, 13, 16, .96)); box-shadow: var(--g-shadow), inset 0 0 0 1px var(--g-hair-soft); pointer-events: auto; }
[data-coa-hand="tray"] .mt-hand .mt-card { margin: 0 4px; transform: none; }
[data-coa-hand="tray"] .mt-hand .mt-card:hover, [data-coa-hand="tray"] .mt-hand .mt-card.selected { transform: translateY(-14px) scale(1.06); }
[data-coa-hand="tray"] .mt-hand .g-cardbox, [data-coa-hand="tray"] .mt-anchor .g-cardbox { --w: 92px !important; }
[data-coa-hand="tray"] .mt-hand { min-height: 0; }
/* guidance: top banner */
/* the banner fits between the two player bars (346px each incl. gutter, in the zoomed space where % resolves) and wraps when it must */
[data-coa-prompt="top"] .mt-prompt { right: auto; left: 50%; top: 58px; bottom: auto; transform: translateX(-50%); width: clamp(360px, calc(100% - 730px), 860px); text-align: center; padding: 7px 20px 9px; }
[data-coa-prompt="top"] .mt-prompt .mt-prompt-text { font-size: 18px; }
[data-coa-prompt="top"] .mt-prompt .mt-prompt-sub { font-size: 14px; }
[data-coa-prompt="top"] .mt-prompt .mt-prompt-controls { justify-content: center; }
[data-coa-prompt="top"] .mt-opp-hand { top: 14px; left: auto; right: 214px; transform: scale(.8); /* clear of the four tool buttons */ transform-origin: right top; }
/* action control: gilt plaque */
[data-coa-orb="plaque"] .mt-act { width: 220px; height: 64px; border-radius: 12px; animation: none; flex-direction: row; gap: 10px; color: #1b1308; background: linear-gradient(180deg, #f1dc9c, #c89f4c 60%, #9c7632);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 5px rgba(0, 0, 0, .12), 0 14px 26px -10px rgba(0, 0, 0, .8); }
[data-coa-orb="plaque"] .mt-act.attack { color: #fff4ee; background: linear-gradient(180deg, #e3876a, #9b3321); }
[data-coa-orb="plaque"] .mt-act small { opacity: .7; }
[data-coa-orb="plaque"]:not([data-coa-prompt="top"]) .mt-prompt { bottom: 108px; }

/* ---------------- the coach (guided first match) ---------------- */
.coach { position: absolute; z-index: 55; width: min(360px, calc(100vw - 32px)); padding: 16px 18px 14px; border-radius: 14px; pointer-events: auto;
  background: linear-gradient(180deg, rgba(22, 30, 38, .97), rgba(12, 16, 22, .98)); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(134, 214, 255, .55), 0 0 40px -10px rgba(127, 211, 255, .45);
  animation: g-rise .35s var(--g-ease) both; transition: left .35s var(--g-ease), top .35s var(--g-ease); }
.coach-title { font-family: var(--g-display); font-weight: 700; font-size: 18px; letter-spacing: .05em; color: #dff4ff; margin-bottom: 6px; }
.coach p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--g-ink); }
.coach-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.coach-skip { background: none; border: 0; color: var(--g-ink-3); font-family: var(--g-display); letter-spacing: .08em; font-size: 12px; cursor: pointer; padding: 4px 0; }
.coach-skip:hover { color: var(--g-ink-2); }
.coach-ring { position: absolute; z-index: 54; pointer-events: none; border-radius: 16px; box-shadow: 0 0 0 2px rgba(159, 230, 255, .95), 0 0 0 6px rgba(127, 211, 255, .18), 0 0 34px rgba(127, 211, 255, .55);
  animation: coach-pulse 1.6s ease-in-out infinite; transition: left .3s var(--g-ease), top .3s var(--g-ease), width .3s, height .3s; }
@keyframes coach-pulse { 50% { box-shadow: 0 0 0 2px rgba(159, 230, 255, .5), 0 0 0 10px rgba(127, 211, 255, .08), 0 0 20px rgba(127, 211, 255, .3); } }

/* ---------------- controls dock (beside the action orb) ---------------- */
.mt-dock { position: absolute; z-index: 26; right: 24px; bottom: 176px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; max-width: 460px;
  padding: 12px 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(16, 20, 26, .94), rgba(10, 12, 16, .96)); box-shadow: var(--g-shadow), inset 0 0 0 1px rgba(134, 214, 255, .28); animation: g-rise .25s var(--g-ease) both; }
[data-coa-prompt="orb"] .mt-dock { bottom: 300px; }
.mt-dock .mt-bid { align-items: flex-end; }
/* the orb is calm while plays remain */
.mt-act.calm { animation: none; filter: saturate(.45) brightness(.78); box-shadow: 0 0 0 4px #0c0d10, 0 0 0 6px rgba(201, 162, 78, .45), 0 12px 24px rgba(0, 0, 0, .7); }
.mt-act.calm:hover { filter: saturate(.8) brightness(.95); }
/* a card used this round says so */
.mt-spent-tag { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); white-space: nowrap; z-index: 2; pointer-events: none;
  font-family: var(--g-display); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; color: var(--g-ink); padding: 3px 10px; border-radius: 99px; background: rgba(8, 9, 12, .9); box-shadow: inset 0 0 0 1px var(--g-hair-soft); }
[data-coa-prompt="top"] .mt-prompt.picking { top: auto; bottom: 50%; transform: translate(-50%, 50%); width: auto; max-width: 90vw; }

/* ---------------- one interface scale (app/scale.js) ---------------- */
.mt-bar, .mt-ribbon, .mt-prompt, .mt-dock, .mt-handwrap, .mt-act, .mt-tools, .mt-log, .mt-menu, .mt-banner, .mt-result-in, .coach,
.mt-opp-hand, .mt-bidreveal, .mt-castcard, .mt-float { zoom: var(--ui); }
/* readable minimums (before scaling) */
.tb-tags i { font-size: 12px; padding: 2px 7px; }
.tb-plate .tb-name { font-size: 14px; max-width: 132px; }
.mt-state, .mt-clock { font-size: 12.5px; }
.mt-anchor-tag { font-size: 12px; }
.mt-sub { font-size: 14px; }
.mt-ribbon span { font-size: 14px; }
.mt-prompt-sub { font-size: 15.5px; }
.mt-log-list { font-size: 15px; }
.mt-log-line.dim { font-size: 14px; }
.mt-mi small { font-size: 14px; }
.mt-act small { font-size: 12px; }
.mt-shardnum span, .mt-decknum { font-size: 13px; }
.coach p { font-size: 15.5px; }
/* readable floors (display face labels) */
.tb-tags i { font-size: 13px; }
.tb-plate .tb-atk::after, .tb-plate .tb-hp::after { font-size: 12px; }
.tb-plate[data-stance]:not([data-stance=""])::before { font-size: 15px; }
.tb-plate[data-blocking]:not([data-blocking=""])::after { font-size: 13.5px; }
.mt-shardnum span, .mt-decknum { font-size: 14px; }
.mt-token { font-size: 14px; }
.mt-sp span { font-size: 13px; }
.mt-state, .mt-clock { font-size: 13.5px; }
.mt-ribbon span { font-size: 15px; }
.mt-log-head { font-size: 14.5px; }
.mt-anchor-tag { font-size: 13.5px; }
.mt-act small { font-size: 13px; }
.mt-mi small { font-size: 14.5px; }
.mt-eyebrow { font-size: 13.5px; }
.coach-skip { font-size: 13.5px; }

/* ---------------- compact creature plates (2026-10-02): numbers together, name below ---------------- */
.tb-plate { grid-template-columns: 1fr auto auto 1fr; grid-template-areas: ". atk hp ." "name name name name" "tags tags tags tags"; justify-items: center; column-gap: 6px; row-gap: 3px; }
.tb-plate .tb-atk { grid-area: atk; } .tb-plate .tb-hp { grid-area: hp; }
.tb-plate .tb-name { grid-area: name; max-width: 116px; padding: 2px 8px; font-size: 13px; }
.tb-plate .tb-tags { grid-area: tags; max-width: 150px; }
.tb-plate .tb-atk, .tb-plate .tb-hp { width: 36px; height: 36px; font-size: 23px; }
.tb-plate[data-stance]:not([data-stance=""])::before { bottom: calc(100% + 66px); }

.mt-result-tip { max-width: 560px; margin: -14px auto 26px; font-size: 16.5px; line-height: 1.5; color: var(--g-ink-2); }
.mt-result-tip b { font-family: var(--g-display); letter-spacing: .06em; color: var(--g-gold); }

/* ---------------- phones held sideways (short landscape, 2026-10-02) ---------------- */
@media (max-height: 520px) and (orientation: landscape) {
  .mt-bar { transform: scale(.68); }
  .mt-tools { top: 6px; right: 6px; bottom: auto; left: auto; flex-direction: row; transform: scale(.8); transform-origin: right top; }
  [data-coa-prompt="top"] .mt-prompt { top: 6px; width: clamp(260px, calc(100% - 520px), 560px); padding: 5px 12px 6px; }
  [data-coa-prompt="top"] .mt-prompt .mt-prompt-text { font-size: 14px; }
  [data-coa-prompt="top"] .mt-prompt .mt-prompt-sub { display: none; }
  .mt-hand .g-cardbox { --w: 74px !important; }
  .mt-anchor .g-cardbox { --w: 66px !important; }
  .mt-hand .mt-card { transform: translateY(40%) rotate(calc(var(--i) * 3deg)); margin: 0 -18px; }
  .mt-hand .mt-card:hover, .mt-hand .mt-card.selected { transform: translateY(-4%); }
  .mt-act { width: 84px; height: 84px; right: 10px; bottom: 10px; }
  .mt-dock { right: 10px; bottom: 102px; padding: 8px 10px; gap: 6px; transform: scale(.82); transform-origin: right bottom; }
  .mt-spent-tag { font-size: 10px; padding: 2px 6px; }
}
/* portrait phones: the table needs the long side of the screen */
.mt-rotate { display: none; }
@media (max-width: 600px) and (orientation: portrait) {
  .mt-rotate { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; text-align: center; background: rgba(6, 6, 8, .94); }
  .mt-rotate h2 { margin: 18px 0 6px; font-family: var(--g-display); letter-spacing: .08em; font-size: 22px; }
  .mt-rotate p { margin: 0; color: var(--g-ink-2); font-size: 16px; line-height: 1.5; }
  .mt-rotate-icon { width: 56px; height: 92px; margin: 0 auto; border-radius: 12px; box-shadow: inset 0 0 0 3px var(--g-gold); animation: mt-turn 2.4s var(--g-ease) infinite; }
}
@keyframes mt-turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
