/* Mission Passed public site: the chosen D1 "pause menu" design (Amendment 28).
   GTA V pause-menu UI primitives (our own CSS) over official GTA VI art; reference:
   docs/design/d1-pause-menu/ (d1-pause-menu.html + base.css). Applies only when
   <html data-skin="pause"> (the public profile); the local operator console is unchanged. */
@font-face { font-family: Yellowtail; src: url("/fonts/yellowtail.ttf") format("truetype"); font-display: swap; }
[data-skin="pause"] {
  --pink: #ff4fa3; --teal: #22d3c5; --orange: #ff8a3d; --gold: #e8c14e; --gold-2: #c9a23a;
  --menu: rgba(0, 0, 0, .72); --row: rgba(0, 0, 0, .55); --sel: #f1f1f1; --txt: #f1f1f1;
  --mute: #b9b9b9; --blue: #9fd5ff; --green: #72d572; --red: #e8524a; --mp-red: #c8352d;
  --hud: "Barlow Condensed", "Arial Narrow", sans-serif; --price: Pricedown, Impact, sans-serif;
  --script: Yellowtail, cursive; --mono: "IBM Plex Mono", monospace;
}
[data-skin="pause"] body { background: #0b0710; color: var(--txt); font-family: var(--hud); font-weight: 600; margin: 0; -webkit-font-smoothing: antialiased; }
[data-skin="pause"] #app { min-height: 100vh; }
[data-skin="pause"] .site-footer { display: none; }
.pm { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 30px clamp(16px, 4.4vw, 64px) 18px; gap: 0; box-sizing: border-box; }
.pm *, .pm *::before, .pm *::after { box-sizing: border-box; }
.pm a { color: inherit; text-decoration: none; }
.pm button { font-family: inherit; font-weight: inherit; color: inherit; cursor: pointer; }
.pm-bg { position: fixed; inset: -4%; width: 108%; height: 108%; object-fit: cover; filter: blur(7px) brightness(.42) saturate(1.2); z-index: 0; pointer-events: none; }
.pm-bgp { display: contents; }
.pm > :not(.pm-bg, .pm-bgp) { position: relative; z-index: 1; }

/* "mission passed": GTA V's mission-complete title, literally (Pricedown, gold, dark edge). */
.pm-wordmark { font-family: var(--price); font-weight: 400; text-transform: lowercase; line-height: .86; letter-spacing: -.01em; white-space: nowrap;
  background: linear-gradient(180deg, #f3d36a 0%, var(--gold) 46%, var(--gold-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #111; filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, .7)); }
.pm-wordmark.failed { background: linear-gradient(180deg, #e2483f 0%, var(--mp-red) 55%, #9f231d 100%); -webkit-background-clip: text; background-clip: text; }

/* Header */
.pm-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 14px; }
.pm-brand { display: flex; align-items: flex-end; gap: 18px; }
.pm-brand .pm-wordmark { font-size: clamp(40px, 4.6vw, 66px); }
.pm-brand img { height: clamp(40px, 3.8vw, 54px); width: auto; }
.pm-who { text-align: right; font-size: 20px; line-height: 1.25; letter-spacing: .5px; text-transform: uppercase; color: #cfcfcf; }
.pm-who b { font-size: 24px; color: #fff; }
.pm-who .pm-bal { font-family: var(--mono); font-size: 20px; color: #fff; }
.pm-who { position: relative; }
.pm-walletbtn { display: inline-flex; align-items: center; gap: 6px; }
.pm-walletbtn:hover b, .pm-walletbtn[aria-expanded="true"] b { color: var(--pink); }
/* Every .pm child is z-index 1, so the header is a stacking context the later tab strip paints over.
   While the wallet menu is open the header itself is lifted above the page (not above dialogs: it
   closes on any action), so Switch / Disconnect are on top and clickable. */
.pm > .pm-top.menu-open { z-index: 1000; }
.pm-wmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1000; min-width: 220px; display: flex; flex-direction: column; background: #0b0b0b; border-top: 4px solid var(--pink); text-align: left; }
.pm-wmenu button { font-size: 19px !important; text-transform: none !important; padding: 12px 14px !important; text-align: left; color: #f1f1f1 !important; border-top: 1px solid rgba(255, 255, 255, .06) !important; }
.pm-wmenu button:hover, .pm-wmenu button:focus { background: var(--sel) !important; color: #000 !important; outline: 0; }
.pm-fixlinks p { margin: 0; padding: 12px 14px 4px; font-size: 17px; color: #f1f1f1; }
.pm-bal .sol::before { content: " · "; }
.pm-change { background: none; border: 1px solid currentColor; padding: 1px 8px; font-size: 14px; letter-spacing: .6px; text-transform: uppercase; }
.pm-row.on .pm-change, .pm-row:focus-within .pm-change { color: #000; }
.pm-who button { background: none; border: 0; padding: 0; font-size: 24px; color: #fff; letter-spacing: .5px; text-transform: uppercase; font-weight: 700; }
.pm-net { color: var(--teal); }
.pm-ttwo { color: var(--gold); font-size: 16px; letter-spacing: .6px; }
.pm-pair { display: flex; flex-direction: column; gap: 4px; background: rgba(232, 193, 78, .1); border-left: 4px solid var(--gold); padding: 10px 12px; font-size: 17px; color: #eee; }
.pm-pair b { color: var(--gold); font-size: 19px; letter-spacing: .4px; }

/* Tab strip: selected tab white with dark text; pink rule under the strip */
.pm-tabs { display: flex; gap: 4px; }
.pm-tab { flex: 1; background: rgba(0, 0, 0, .66); color: #d6d6d6; font-size: 19px; letter-spacing: .6px; padding: 10px 0; text-align: center; text-transform: uppercase; }
.pm-tab[aria-current="page"] { background: var(--sel); color: #000; }
.pm-strip { height: 5px; margin-top: 4px; background: var(--pink); }

/* Body: menu list | panel (art + info) */
.pm-body { flex: 1; display: grid; grid-template-columns: minmax(380px, 500px) 1fr; gap: 14px; margin-top: 14px; min-height: 0; }
.pm-menu { display: flex; flex-direction: column; }
.pm-menu-inner { background: var(--menu); }
.pm-mhead { position: relative; height: 96px; overflow: hidden; }
.pm-mhead picture { display: contents; }
.pm-mhead img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(1.15); display: block; }
.pm-mhead .pm-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-family: var(--script); font-weight: 400; font-size: 52px; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .45); white-space: nowrap; }
.pm-msub { background: #000; display: flex; justify-content: space-between; padding: 9px 14px; font-size: 17px; letter-spacing: .8px; color: var(--blue); text-transform: uppercase; }
.pm-msub .n { color: #ddd; }
.pm-row { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; background: var(--row); font-size: 20px; color: var(--txt); border-top: 1px solid rgba(255, 255, 255, .04); width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; }
.pm-row .r { margin-left: auto; display: flex; gap: 14px; align-items: center; min-width: 0; }
.pm-row.on { background: var(--sel); color: #000; }
.pm-row .tag { font-size: 14px; letter-spacing: .8px; padding: 2px 6px; border: 1px solid currentColor; color: var(--blue); white-space: nowrap; }
.pm-row.on .tag { color: #1b4f7a; }
.pm-row.cat { color: var(--blue); background: rgba(0, 0, 0, .78); font-size: 16px; letter-spacing: 1.2px; min-height: 34px; text-transform: uppercase; }
.pm-row .mono { font-family: var(--mono); font-size: 17px; }
.pm-row .q { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pm-row .dim { color: var(--mute); }
.pm-row.on .dim { color: #555; }
.pm-check { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 2px solid currentColor; font-size: 16px; line-height: 1; flex: none; }
.pm-check.done::after { content: "✓"; }
.pm-mdesc { background: rgba(0, 0, 0, .82); border-top: 3px solid #000; padding: 12px 14px; font-size: 18px; color: #ddd; line-height: 1.3; }
.pm-mdesc.warn { color: #ffd1d1; }
/* Inline editable rows (LAUNCH tab) */
.pm-row input, .pm-row textarea { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; font-size: 19px; text-align: right; padding: 0; height: 40px; }
.pm-row textarea { resize: none; height: 40px; line-height: 1.25; padding-top: 9px; text-align: left; }
.pm-form .pm-row { height: 44px; min-height: 0; }
.pm-form .pm-row.cat { height: 30px; }
.pm-row:focus-within { background: var(--sel); color: #000; }
.pm[data-tab="launch"] .pm-mhead { height: 84px; }
.pm[data-tab="launch"] .pm-menu > .pm-mdesc { display: none; }
.pm-row input::placeholder, .pm-row textarea::placeholder { color: #8d8d8d; }
.pm-row.on input::placeholder, .pm-row.on textarea::placeholder { color: #777; }
.pm-row .lab { flex: none; min-width: 112px; }
.pm-row.err { box-shadow: inset 4px 0 0 var(--red); }
.pm-row.file { position: relative; cursor: pointer; }
.pm-row .pm-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pm-row .pm-x { background: transparent; border: 1px solid currentColor; color: inherit; font: inherit; font-size: 15px; padding: 2px 8px; cursor: pointer; }
.pm-portrait-coin { background: #0b0710; }
.pm-portrait-coin > img { object-fit: contain; object-position: 50% 40%; }
.pm-err { color: #ff9a92; font-size: 15px; padding: 4px 14px 6px; background: rgba(0, 0, 0, .7); }
.pm-row.sub { min-height: 40px; font-size: 17px; padding-left: 28px; }
.pm-row.sub .lab { min-width: 96px; }

/* Panel: art | info */
.pm-panel { background: rgba(0, 0, 0, .66); display: grid; grid-template-columns: minmax(240px, 330px) 1fr; min-height: 0; }
.pm-portrait { position: relative; overflow: hidden; min-height: 420px; }
.pm-portrait > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 0; }
.pm-portrait .lab { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); }
.pm-portrait .lab .big { font-family: var(--price); font-size: 44px; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; text-transform: lowercase; line-height: .9; }
.pm-small { font-size: 14px; letter-spacing: .6px; color: var(--mute); text-transform: uppercase; }
.pm-portrait .pm-small { color: #ffb3d6; }
.pm-info { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Narrower desktop windows (laptops, split screens): menu (500) + art (330) + info do not fit, and the
   info column was squeezed against the right edge. Drop the art there; the info takes the column. */
@media (min-width: 601px) and (max-width: 1240px) {
  .pm-panel { grid-template-columns: 1fr; }
  .pm-panel > .pm-portrait { display: none; }
  .pm .pm-panel .pm-kv .pm-cabox b { font-size: 12px; }
}
/* Tablets: menu and panel stack in one column (as on phones, art kept off). */
@media (min-width: 601px) and (max-width: 900px) {
  .pm-body { grid-template-columns: 1fr; }
}
.pm-coinhead { display: flex; gap: 18px; align-items: center; }
.pm-tick { font-family: var(--price); font-size: clamp(40px, 3.8vw, 54px); color: #fff; line-height: .9; -webkit-text-stroke: 1px #000; overflow-wrap: anywhere; }
.pm-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pm-kv > div { background: rgba(255, 255, 255, .07); padding: 10px 12px; min-width: 0; }
.pm-kv b { display: block; font-family: var(--mono); font-size: clamp(17px, 1.45vw, 22px); color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-kv .wide { grid-column: 1 / -1; }
.pm-kv .wide b { font-size: 34px; }
/* BOARD: CA box, label + copy button on top, the full address on its own line. */
.pm-cahead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pm .pm-kv .pm-cabox b { font-size: 14px; text-overflow: clip; }
.pm .pm-copy { color: #000; font-weight: 800; }
.pm-kv .pm-cabox .pm-ca { display: flex; font-size: 1em; }
.pm-kv b.ok { color: var(--green); } .pm-kv b.bad { color: var(--red); }
.pm-stat { display: grid; grid-template-columns: 150px 1fr 64px; align-items: center; gap: 12px; font-size: 18px; text-transform: uppercase; letter-spacing: .6px; color: #e6e6e6; }
.pm-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; height: 12px; }
.pm-bars i { background: rgba(255, 255, 255, .18); } .pm-bars i.f { background: var(--sel); }
.pm-stat .v { font-family: var(--mono); font-size: 15px; color: #bbb; text-align: right; }
.pm-details summary { cursor: pointer; color: var(--blue); font-size: 15px; letter-spacing: .8px; text-transform: uppercase; }
.pm-details table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 15px; }
.pm-details td { padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); vertical-align: top; }
.pm-details td:last-child { text-align: right; font-family: var(--mono); }
.pm-details code { font-family: var(--mono); font-size: 12px; color: #aaa; word-break: break-all; }
.pm-go { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; background: var(--pink); color: #000 !important; border: 0; font-size: 24px; letter-spacing: .6px; font-weight: 800; text-transform: none; margin-top: auto; }
.pm-go:disabled { background: #5a3346; color: #c9a9b9 !important; cursor: default; }
.pm-go.pending { background: #b33a76; }
.pm-fine { font-size: 15px; color: var(--mute); line-height: 1.35; }
.pm-feed { display: flex; flex-direction: column; gap: 8px; }
.pm-feed .fr { display: flex; gap: 10px; align-items: center; font-size: 18px; color: #ddd; }
.pm-feed .fr .q { min-width: 0; overflow-wrap: anywhere; }
.pm-empty { padding: 28px 14px; text-align: center; font-size: 22px; color: #eee; background: var(--row); }

/* Coin icon: our caption card in miniature (never Rockstar art) */
.pm-cc { position: relative; flex: none; width: 118px; height: 118px; background: #2a0f3d; container-type: size; }
.pm-cc > div { position: absolute; inset: 9%; background: var(--pink); border: 2px solid #000; box-shadow: 3px 3px 0 #000; display: flex; align-items: center; padding: 7cqw; font-family: var(--price); color: #0b0710; text-transform: uppercase; line-height: .9; overflow: hidden; font-size: 20cqw; }
.pm-cc.sm { width: 34px; height: 34px; } .pm-cc.sm > div { box-shadow: none; border-width: 1px; font-size: 26cqw; padding: 4cqw; }
.pm-cc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* BOARD rows: a small square picture left of the name. */
.pm-rowcoin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-rowcoin .pm-cc.sm { width: 30px; height: 30px; }
/* BOARD coin detail */
.pm-coin { gap: 12px; }
.pm-desc { margin: 0; font-size: 18px; color: #fff; line-height: 1.25; }
.pm-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-social { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 16px; text-decoration: none; }
.pm-social:hover, .pm-social:focus-visible { background: var(--sel); color: #000; outline: 0; }
.pm-kv.pm-market { grid-template-columns: repeat(3, 1fr); }
.pm-kv.pm-market b { font-size: 17px; }
.pm-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; font-size: 16px; color: #fff; }
.pm-facts > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 4px 0; min-width: 0; }
.pm-facts a { color: #fff; }
.pm-links { display: flex; gap: 16px; }
/* BUY / SELL */
.pm-trade { background: rgba(255, 255, 255, .05); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.pm-trade-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pm-trade-tabs button { min-height: 40px; background: rgba(0, 0, 0, .5); color: #d6d6d6; border: 0; font: inherit; font-size: 18px; text-transform: uppercase; letter-spacing: .6px; }
.pm .pm-trade-tabs button.on { background: var(--sel); color: #000; }
.pm .pm-trade[data-side="sell"] .pm-trade-tabs button.on { background: var(--pink); }
.pm-trade-amt { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .55); padding: 0 12px; min-height: 48px; }
.pm-trade-amt input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font-family: var(--mono); font-size: 22px; outline: 0; }
.pm-trade-amt span { color: var(--mute); font-size: 17px; }
.pm-trade-quick { display: flex; gap: 6px; }
.pm .pm-trade-quick button { flex: 1; min-height: 36px; background: rgba(255, 255, 255, .1); color: #fff; border: 0; font: inherit; font-size: 16px; }
.pm .pm-trade-quick button:disabled { opacity: .4; }
.pm-trade-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; color: #d6d6d6; }
.pm-trade-meta input { width: 46px; background: rgba(0, 0, 0, .55); border: 0; color: #fff; font-family: var(--mono); font-size: 15px; text-align: right; padding: 4px 6px; }
.pm-trade-fee { margin: 0; }
.pm-trade .pm-trade-go { position: static; width: 100%; }
.pm-trade-msg { margin: 0; font-size: 16px; }
.pm-trade-msg.ok { color: var(--teal, #22d3c5); } .pm-trade-msg.bad { color: #ff9a92; }
.pm-trade-msg a { color: #fff; }
.pm-official { flex: none; padding: 1px 6px; background: var(--gold, #e8c14e); color: #000; font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; line-height: 1.4; }
/* MISSION PASSED: the coin's picture next to its name. */
.pm-mp-coin { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.pm-mp-coin .pm-mp-name { margin-top: 0; }
.pm-cc.mp { width: 56px; height: 56px; background: none; }

/* Button-prompt bar (GTA V instructional buttons) */
.pm-prompts { align-self: flex-end; display: flex; gap: 22px; font-size: 19px; color: #eee; background: rgba(0, 0, 0, .7); padding: 8px 16px; margin-top: 14px; }
.pm-prompts button, .pm-prompts a { background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.pm-key { display: inline-block; background: var(--sel); color: #000; font-size: 16px; padding: 1px 7px; border-radius: 3px; margin: 0 2px; font-weight: 800; transform: translateY(-1px); font-family: var(--hud); }
.pm-phone-only { display: none !important; }
.pm-foot { position: relative; z-index: 1; font-size: 13px; color: #9a9a9a; letter-spacing: .4px; margin-top: 10px; }
.pm-notice { background: rgba(0, 0, 0, .86); border-left: 4px solid var(--pink); padding: 10px 14px; font-size: 17px; color: #fff; }

/* MISSION PASSED / MISSION FAILED: GTA V's mission-complete screen */
.pm-mp { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.pm-mp.pm-enter { animation: pm-fade .9s ease-out both; }
.pm-mp-bg { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; filter: blur(9px) brightness(.5) saturate(1.15); }
.pm-mp-band { position: relative; width: 100%; padding: 26px 0 22px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .62) 22%, rgba(0, 0, 0, .62) 78%, transparent); }
.pm-mp.pm-enter .pm-mp-band { animation: pm-in 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.pm-mp-title { font-size: clamp(44px, 9.4vw, 136px); }
.pm-mp-name { font-family: var(--hud); font-weight: 600; font-size: clamp(24px, 2.3vw, 32px); color: #fff; margin-top: 8px; letter-spacing: .3px; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.pm-mp-rule { width: min(460px, 82vw); height: 2px; background: rgba(255, 255, 255, .85); margin: 16px 0 10px; }
.pm-mp-rows { width: min(600px, 86vw); display: flex; flex-direction: column; gap: 8px; }
.pm-mp-rows > div { display: flex; justify-content: space-between; align-items: center; font-size: clamp(19px, 1.7vw, 23px); color: #fff; font-weight: 600; }
.pm-mp-rows .v { display: flex; align-items: center; gap: 10px; font-family: var(--hud); }
.pm-mp-rows > div > span:first-child { flex: none; margin-right: 16px; }
.pm-mp-rows .v { min-width: 0; }
.pm-ca { display: inline-flex; min-width: 0; font-family: var(--mono); font-size: .74em; }
.pm-ca .h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 3ch; }
.pm-ca .t { flex: none; }
.pm-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; background: #fff; color: #000; border: 0; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; cursor: pointer; }
.pm-copy:hover, .pm-copy:focus-visible { background: var(--gold, #e8c14e); outline: 0; }
.pm-copy.done { background: var(--teal, #22d3c5); }
.pm-mp[data-dismiss] { cursor: pointer; }
.pm-box { width: 22px; height: 22px; background: #fff; color: #000; display: inline-grid; place-items: center; font-size: 18px; font-weight: 900; line-height: 1; }
.pm-mp-completion { display: flex; align-items: center; gap: 12px; font-size: clamp(22px, 2vw, 27px); color: #fff; margin-top: 2px; }
.pm-medal { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffe7a0, var(--gold) 45%, #a8822a 100%); color: #5a420c; font-family: var(--price); font-size: 21px; box-shadow: inset 0 0 0 2px #8a6a1f, 0 2px 4px rgba(0, 0, 0, .5); }
.pm-mp-live { margin-top: 14px; font-family: var(--price); font-size: clamp(26px, 2.6vw, 38px); color: #fff; -webkit-text-stroke: 1px #000; letter-spacing: .5px; }
.pm-mp-reason { font-size: clamp(22px, 2vw, 28px); color: #fff; margin-top: 4px; }
.pm-mp-actions { position: fixed; right: clamp(16px, 3vw, 44px); bottom: clamp(16px, 3vw, 36px); display: flex; gap: 10px; z-index: 51; }
.pm-mp.pm-enter + .pm-mp-actions { animation: pm-fade 1.4s ease-out both; }
.pm-mp-actions a, .pm-mp-actions button { display: inline-flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .82); color: #fff; border: 0; padding: 10px 14px; font-size: 21px; font-family: var(--hud); font-weight: 600; }
.pm-mp-actions .main { background: rgba(0, 0, 0, .9); outline: 1px solid rgba(255, 255, 255, .25); }
@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-in { 0% { opacity: 0; transform: scale(1.12); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }

/* Phone (<= 600px): the interaction menu */
@media (max-width: 600px) {
  .pm { padding: 14px 12px 84px; }
  /* D1 phone: the art is sharp (no blur), just darkened; the home crop is the mockup's 40% 0. */
  .pm-bg { inset: 0; width: 100%; height: 100%; filter: brightness(.55) saturate(1.2); }
  .pm[data-tab="launch"] .pm-bg { object-position: 40% 0; }
  .pm[data-tab="launch"] .pm-mhead img { object-position: 50% 30%; }
  .pm-top { align-items: flex-start; margin-bottom: 10px; }
  .pm-brand { gap: 8px; align-items: center; }
  .pm-brand .pm-wordmark { font-size: 32px; -webkit-text-stroke: 1.5px #111; }
  .pm-brand img { display: none; }
  .pm-who b, .pm-who button { white-space: nowrap; }
  .pm-who { font-size: 13px; line-height: 1.2; }
  .pm-who b, .pm-who button { font-size: 18px; }
  .pm-who .pm-bal { font-family: var(--price); font-size: 26px; text-transform: lowercase; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; }
  .pm-who .pm-clock { display: none; }
  /* Anchor the wallet menu to the full-width header (the wallet block can overflow the phone edge). */
  .pm-who { position: static; }
  .pm-wmenu { right: 0; max-width: calc(100vw - 24px); }
  .pm-tabs { overflow-x: auto; scrollbar-width: none; gap: 3px; }
  .pm-tab { flex: none; font-size: 15px; padding: 8px 12px; }
  .pm-strip { height: 4px; }
  .pm-body { grid-template-columns: 1fr; margin-top: 10px; gap: 10px; }
  .pm-mhead { height: 84px; } .pm-mhead .pm-title { font-size: 44px; }
  .pm-row { min-height: 52px; font-size: 19px; }
  .pm-row .lab { min-width: 92px; }
  .pm-panel { grid-template-columns: 1fr; background: rgba(0, 0, 0, .8); }
  .pm-portrait { display: none; }
  /* After Review, the exact cost comes first on a phone. */
  .pm[data-review] .pm-panel { order: -1; }
  .pm-info { padding: 12px; gap: 12px; }
  .pm-coinhead .pm-cc { width: 74px; height: 74px; }
  .pm-tick { font-size: 34px; }
  .pm-kv b { font-size: 17px; } .pm-kv .wide b { font-size: 26px; }
  .pm .pm-panel .pm-kv .pm-cabox b { font-size: 13px; }
  .pm-kv > div { padding: 8px 10px; }
  .pm-stat { grid-template-columns: 110px 1fr 56px; font-size: 16px; }
  .pm-go { min-height: 58px; font-size: 22px; }
  /* One-handed: the LAUNCH tab's action stays under the thumb, above the prompt row. */
  .pm[data-tab="launch"] { padding-bottom: 150px; }
  .pm[data-tab="launch"] .pm-info .pm-go { position: fixed; left: 12px; right: 12px; bottom: 62px; width: auto; z-index: 6; box-shadow: 0 -8px 24px rgba(0, 0, 0, .55); }
  .pm-desk-only { display: none !important; }
  .pm-phone-only { display: inline-flex !important; }
  .pm > .pm-prompts { position: fixed; }
  .pm-prompts { position: fixed; left: 12px; right: 12px; bottom: 14px; justify-content: space-between; font-size: 17px; background: rgba(0, 0, 0, .86); padding: 10px 12px; margin: 0; z-index: 5; }
  .pm-foot { font-size: 11px; }
  .pm-mp { padding-top: 18vh; }
  .pm-mp-title { -webkit-text-stroke: 1.5px #111; }
  .pm-mp-actions { left: 12px; right: 12px; bottom: 14px; flex-direction: column; }
  .pm-mp-actions a, .pm-mp-actions button { justify-content: space-between; font-size: 20px; padding: 12px 14px; }
}

/* ---- Amendment 38: phones look great (audited at 390x844, 430x932, 375x667) ---- */
@media (max-width: 600px) {
  html, body { overflow-x: hidden; }
  .pm { padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(84px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  /* Compact header: wordmark + one wallet pill. */
  .pm-top { align-items: center; gap: 10px; margin-bottom: 8px; }
  .pm-brand { min-height: 44px; flex: 1 1 auto; min-width: 0; }
  .pm-brand .pm-wordmark { font-size: clamp(24px, 7.6vw, 31px); }
  .pm-who { flex: none; max-width: 54vw; }
  .pm-who > br, .pm-who .pm-net { display: none; }
  .pm-who > button { min-height: 44px; padding: 0 14px; background: rgba(0, 0, 0, .72); border: 1px solid rgba(255, 255, 255, .2); border-radius: 22px; max-width: 54vw; font-size: 16px; }
  .pm-who .pm-walletbtn .pm-bal { display: block; font-family: var(--mono); font-size: 14px; font-weight: 600; text-transform: none; -webkit-text-stroke: 0; text-shadow: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pm-wmenu { min-width: 210px; }
  .pm-wmenu button { min-height: 50px; }
  /* Tabs: momentum scroll, 44px targets, the active tab is kept in view (app.js). */
  .pm-tabs { -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; overscroll-behavior-x: contain; margin: 0 calc(-1 * max(12px, env(safe-area-inset-left))); padding: 0 12px; scroll-padding: 0 12px; }
  .pm-tab { min-height: 44px; display: flex; align-items: center; padding: 0 14px; scroll-snap-align: start; }
  /* Rows and chips: 44px+ tap targets; inputs >= 16px (no iOS zoom). */
  .pm-row, .pm-form .pm-row { min-height: 52px; height: auto; }
  .pm-row input, .pm-row textarea { font-size: 17px; min-height: 44px; }
  .pm-change, .pm-x { min-height: 44px; min-width: 64px; display: inline-flex; align-items: center; justify-content: center; }
  .pm-details summary { min-height: 44px; display: flex; align-items: center; }
  /* LAUNCH: one-handed. The action button is pinned to the bottom (safe area); the prompt row hides. */
  .pm[data-tab="launch"] .pm-prompts { display: none; }
  .pm[data-tab="launch"] { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .pm[data-tab="launch"] .pm-info .pm-go { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); }
  .pm-prompts { bottom: calc(10px + env(safe-area-inset-bottom)); min-height: 48px; align-items: center; }
  .pm-prompts button, .pm-prompts a { min-height: 44px; }
  /* MISSION PASSED / FAILED fill the phone: title band up top, the actions in flow at the bottom. */
  .pm-mp { flex-direction: column; justify-content: space-between; align-items: stretch; padding: max(9vh, env(safe-area-inset-top)) 0 calc(12px + env(safe-area-inset-bottom)); overflow-y: auto; }
  .pm-mp-band { flex: none; background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .66) 12%, rgba(0, 0, 0, .66) 88%, rgba(0, 0, 0, .35)); }
  .pm-mp-rows { width: min(430px, 86vw); }
  .pm-mp-rows > div { font-size: 18px; }
  .pm-mp-actions { position: relative; left: auto; right: auto; bottom: auto; margin: 18px max(12px, env(safe-area-inset-left)) 0; }
  .pm-mp-actions a, .pm-mp-actions button { min-height: 52px; }
  .pm-copy { min-height: 44px; min-width: 44px; padding: 0 10px; }
  .pm-kv.pm-market { grid-template-columns: repeat(2, 1fr); } .pm-kv.pm-market > div:first-child { grid-column: 1 / -1; }
  .pm-facts { grid-template-columns: 1fr; }
  .pm-social { min-height: 44px; }
  .pm-trade-tabs button, .pm .pm-trade-quick button, .pm-trade-amt { min-height: 44px; }
  .pm-trade-amt input { font-size: 18px; }
  .pm-trade-meta input { font-size: 16px; min-height: 36px; }
  .pm-mp-rows > div > span:first-child { margin-right: 10px; }
  /* Inline links get a full 44px target too. */
  .pm-info a:not(.pm-go), .pm-details a, a.pm-fine { display: inline-flex; align-items: center; min-height: 44px; }
  /* CHARACTERS: the launch button stays visible above the prompt row. */
  .pm[data-tab="characters"] { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .pm[data-tab="characters"] .pm-info .pm-go { position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(66px + env(safe-area-inset-bottom)); width: auto; z-index: 6; box-shadow: 0 -8px 24px rgba(0, 0, 0, .55); }
  /* The header (and its wallet menu) stays above the tab strip. */
  .pm > .pm-top { z-index: 20; }
  /* Pill: balance when known (address otherwise); the wordmark keeps its room. */
  .pm-who { max-width: 42vw; }
  .pm-who > button { max-width: 42vw; }
  .pm-who .pm-walletbtn .pm-bal .addr + .sol { margin-left: 0; }
  .pm-who .pm-walletbtn .pm-bal:has(.sol) .addr { display: none; }
  .pm-who .pm-walletbtn .pm-bal:has(.sol) .sol::before { content: none; }
  .pm-wmenu { background: #0b0710; box-shadow: 0 12px 30px rgba(0, 0, 0, .7); }
  .pm-who .pm-walletbtn .pm-bal .sol { white-space: nowrap; }
  .pm-brand .pm-wordmark { font-size: clamp(22px, 7vw, 30px); }
  /* The admin page uses one column on a phone. */
  .pm[data-tab="admin"] .pm-body { grid-template-columns: 1fr !important; }
}
/* Short phones (iPhone SE): MISSION PASSED keeps every row and action on screen. */
@media (max-width: 600px) and (max-height: 700px) {
  .pm-mp { padding-top: max(4vh, env(safe-area-inset-top)); }
  .pm-mp-band { padding: 16px 0 14px; }
  .pm-mp-title { font-size: 40px; }
  .pm-mp-rule { margin: 10px 0 8px; }
  .pm-mp-rows { gap: 4px; }
  .pm-mp-rows > div { font-size: 17px; }
  .pm-mp-live { margin-top: 8px; font-size: 24px; }
  .pm-mp-actions { margin-top: 12px; gap: 8px; }
  .pm-mp-actions a, .pm-mp-actions button { min-height: 48px; padding: 8px 14px; }
}
/* Launch progress modal (GTA loading style): numbered steps, spinner / check / x. No entry
   animation: it is re-rendered on every status update and must not flash. */
.pm-prog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, .74); padding: 16px; }
.pm-prog-box { width: min(460px, 100%); background: #0b0b0b; border-top: 5px solid var(--pink); box-shadow: 0 18px 60px rgba(0, 0, 0, .7); padding: 18px 20px 16px; }
.pm-prog-title { font-family: var(--price); font-size: 34px; color: #fff; text-transform: lowercase; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; margin-bottom: 12px; }
.pm-prog-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pm-prog-steps li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; background: var(--row); color: var(--mute); font-size: 20px; }
.pm-prog-steps li.run { background: var(--sel); color: #000; }
.pm-prog-steps li.done { color: #fff; }
.pm-prog-steps li.x { color: #ff9a92; box-shadow: inset 4px 0 0 var(--red); }
.pm-prog-steps .n { font-family: var(--mono); font-size: 15px; width: 18px; }
.pm-prog-steps .l { flex: 1; }
.pm-prog-steps .st { width: 22px; height: 22px; display: inline-grid; place-items: center; font-weight: 800; }
.pm-prog-steps .st.done { color: var(--teal, #4ee0c2); }
.pm-prog-steps .st.run { border: 3px solid rgba(0, 0, 0, .25); border-top-color: #000; border-radius: 50%; animation: pm-spin .8s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-prog-err { color: #ff9a92; font-size: 17px; margin: 12px 0 0; }
.pm-prog-note { color: var(--mute); font-size: 15px; margin: 12px 0 0; }
.pm-prog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.pm-prog-actions button { background: rgba(255, 255, 255, .08); color: #fff; border: 0; font: inherit; font-size: 19px; padding: 8px 16px; cursor: pointer; }
.pm-prog-actions button.main { background: var(--pink); color: #000; font-weight: 800; }

/* First load (index.html): GTA-style loading screen, small spinner bottom-right. */
.pm-boot { position: fixed; inset: 0; background: #050307; }
.pm-boot-spin { position: fixed; right: 28px; bottom: 28px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .16); border-top-color: #fff; animation: pm-spin .9s linear infinite; }

/* "Holders earn TTWO" switch row */
.pm-row.pm-switch { cursor: pointer; font: inherit; font-size: 20px; }
.pm-toggle { display: inline-grid; place-items: center; min-width: 48px; padding: 2px 8px; font-size: 15px; letter-spacing: .8px; border: 2px solid currentColor; color: var(--mute); }
.pm-toggle.on { background: var(--pink); border-color: var(--pink); color: #000; }

/* MISSION PASSED: the coin is live but its dev buy (tx3) didn't go through */
.pm-mp-buy { margin-top: 10px; color: #ffd27a; font-size: 18px; text-align: center; }
.pm-mp-buy button { margin-left: 10px; background: var(--pink); color: #000; border: 0; font: inherit; font-weight: 800; padding: 4px 12px; cursor: pointer; }
