/* Ennusteet – prediction market. Uses the site's colour variables (color_scheme.css). All classes start with pm-. */

.pm {
  --pm-yes: var(--color-green, #07DB77);
  --pm-yes-text: #1d7a52;
  --pm-yes-bar: #8fdcb8;
  --pm-no-bar: #f0b3ae;
  --pm-no-text: #b3382f;
  --pm-no: var(--color-red, #dd0000);
  --pm-ink: var(--color-dark-gray, #2b2c2d);
  --pm-line: var(--color-mid-gray, #e3e4eb);
  --pm-panel: var(--color-light-gray-blue, #f9f9fb);
  --pm-navy: var(--color-cyan-dark, #378cb4);
  --pm-sel: #2b2c2d;
  --pm-deep: var(--color-cyan-extra-dark, #00557d);
  --pm-accent: var(--color-cyan-mid, #5cd4ff);
  --pm-muted: #6b6f7a;
  --pm-muted-2: #52555e;
  font-family: "Anek Devanagari", sans-serif;
  color: var(--pm-ink);
  max-width: var(--content-width, 1280px);
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.45;
  min-height: 75vh;
  transition: opacity .12s;
}
body { font-family: "Anek Devanagari", sans-serif; }
.pm, .pm * { font-family: "Anek Devanagari", sans-serif; }
.pm *, .pm *::before, .pm *::after { box-sizing: border-box; }
.pm a { color: inherit; }
.pm h1 { font-size: 1.9em; margin: 0 0 24px; color: var(--pm-deep); }
.pm h2 { font-size: 1.15em; margin: 0 0 10px; }
.pm .pm-muted { color: var(--pm-muted); }
.pm .pm-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.pm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px; margin-bottom: 24px; background: var(--pm-panel); padding: 12px 16px; border-bottom: 1px solid #ccc;}
.pm-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pm-tabs a { padding: 7px 14px 4px; border-radius: 20px; text-decoration: none; background: var(--pm-panel); border: 1px solid var(--pm-line); font-weight: 600; font-size: .92em; }
.pm-tabs a.is-active { background: var(--pm-sel); color: #fff; border-color: var(--pm-sel); }

.pm-layout { display: grid; grid-template-columns: 290px 1fr; gap: 20px; align-items: start; }
.pm-layout-trade { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .pm-layout, .pm-layout-trade { grid-template-columns: 1fr; } }

.pm-card { background: #fff; border: 1px solid var(--pm-line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.pm-card.is-panel { background: var(--pm-panel); }
.pm-card.is-navy { background: #eaf6fb; color: var(--color-cyan-extra-dark, #00557d); border-color: #cfe9f4; }
.pm-card.is-navy .pm-muted { color: #4a6b7a; }

.pm-big { font-size: 2em; font-weight: 700; line-height: 1.1; }
.pm-label { display: none; font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--pm-muted); font-weight: 600; }
.pm-card.is-navy .pm-label { color: var(--color-cyan-extra-dark, #00557d); }
.pm-card.pm-prize { background: var(--pm-sel); border-color: var(--pm-sel); color: #fff; display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.pm-prize-ico { width: 42px; height: 42px; border-radius: 10px; background: rgba(92,212,255,.14); border: 1px solid rgba(92,212,255,.35); display: flex; align-items: center; justify-content: center; flex: none; color: var(--pm-accent); }
.pm-prize-body { min-width: 0; }
.pm-prize .pm-label { color: var(--pm-accent); }
.pm-prize .pm-statprize { font-size: 1.1em; margin: 2px 0 8px; }
.pm-prize-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82em; color: #c9ccd2; }
.pm-prize-pill { display: inline-block; padding: 3px 10px 0px 10px; margin-bottom: 6px; border-radius: 8px; background: #eaf6fb; border: 1px solid #cfe9f4; font-weight: 540; font-size: 1.1em; color: var(--color-cyan-extra-dark, #00557d); }

.pm-cats { list-style: none; margin: 0; padding: 0; }
.pm-cats a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; text-decoration: none; }
.pm-cats a:hover { background: var(--pm-panel); }
.pm-cats a.is-active { background: var(--pm-sel); color: #fff; }

.pm-top { list-style: none; margin: 0; padding: 0; }
.pm-top li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--pm-line); }
.pm-top li:last-child { border: 0; }

/* Market rows */
.pm-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: center; background: #fff; border: 1px solid var(--pm-line); border-radius: 10px; padding: 14px 18px 8px 16px; margin-bottom: 10px; }
.pm-row:hover { border-color: #b6c8d8; }
.pm-q { font-weight: 700; font-size: 1.3em; text-decoration: none; display: block; margin-bottom: 0px; padding-right: 90px; }
.pm-cat { position: absolute; top: 0; right: 0; font-size: .75em; font-weight: 540; line-height: 1.5; padding: 5px 14px 0; background: #f6f7f9; color: #4a4f57; border: 0 solid var(--pm-line); border-width: 0 0 1px 1px; border-radius: 0 9px 0 10px; }
.pm-meta .pm-players { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.pm-meta .pm-players span { padding-top: 1px; }
.pm-meta .pm-players svg { position: relative; top: -3px; }
.pm-row .pm-meta { margin-top: 18px; }
.pm-row .pm-players { position: absolute; right: 18px; bottom: 9px; margin: 0; }
.pm-row .pm-meta .pm-badge { font-size: .92em; font-weight: 540; margin-bottom: 2px; padding: 3px 10px 1px; color: var(--pm-ink); }
.pm-row .pm-meta .pm-badge.yes { color: var(--pm-yes-text); }
.pm-row .pm-meta .pm-badge.no { color: var(--pm-no-text); }
.pm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .85em; color: var(--pm-muted); margin-top: 12px; }
.pm-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--pm-line); }
.pm-bar > i { display: block; background: var(--pm-yes-bar); }
.pm-bar > b { display: block; background: var(--pm-no-bar); flex: 1; }
.pm-pct { display: flex; justify-content: space-between; font-weight: 700; font-size: 1em; margin-bottom: 4px; }
.pm-pct .y, .pm-pct .n { display: inline-flex; align-items: center; gap: 4px; }
.pm-pct .y { color: var(--pm-yes-text); }
.pm-pct .n { color: var(--pm-no-text); }
.pm-win { width: 18px; height: 18px; margin-bottom: 2px; flex: none; }
.pm-pct .pm-win { display: block; }
.pm-quick { display: flex; gap: 8px; }
@media (min-width: 1101px) {
  .pm-quick .pm-btn.yes, .pm-quick .pm-btn.no { width: 108px; text-align: center; }
  .pm-quick .pm-own { font-size: 12px; font-weight: 700; top: 3px; right: 7px; }
}
@media (max-width: 640px) { .pm-row { grid-template-columns: 1fr; } .pm-quick .pm-btn { flex: 1; } }

.pm-btn { display: inline-block; border: 0; border-radius: 8px; padding: 9px 18px 6px; font-weight: 700; font-size: .95em; cursor: pointer; text-decoration: none; text-align: center; font-family: inherit; }
.pm-btn.yes { background: #e3f7ed; color: var(--pm-yes-text); border: 1px solid #bfe9d3; }
.pm-btn.no { background: #fdeceb; color: var(--pm-no-text); border: 1px solid #f5cbc8; }
.pm-btn.main { background: #ccc; color: #1b1b1b; }
.pm-btn.ghost { background: #fff; border: 1px solid var(--pm-line); color: var(--pm-ink); padding: 3px 12px 0px 12px; }
.pm-btn[disabled] { opacity: .45; cursor: not-allowed; }

.pm-badge { display: inline-block; font-size: .75em; font-weight: 700; padding: 3px 9px 0; margin-bottom: 4px; border: 1px solid #d3d7de; border-radius: 10px; background: var(--pm-line); }
.pm-badge.open { background: transparent; color: #14633f; border-color: transparent; font-weight: 540; font-size: .85em; padding: 0; margin: 0 -6px 0 0; }
.pm-badge.open::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 6px 8px 1px 0; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 3px rgba(61,220,151,.25); }
.pm-badge.yes { background: #e3f7ed; color: var(--pm-yes-text); border-color: #bfe9d3; }
.pm-badge.no { background: #fdeceb; color: var(--pm-no-text); border-color: #f5cbc8; }

/* Trade panel */
.pm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 0px; }
.pm-seg button { padding: 9px; border-radius: 8px; border: 1px solid var(--pm-line); background: #fff; font-weight: 700; cursor: pointer; font-family: inherit; font-size: .95em; }
.pm-seg button.is-on { border-color: var(--pm-navy); background: var(--pm-navy); color: #fff; }
.pm-seg button.is-on.yes { background: #e3f7ed; border-color: var(--pm-yes-bar); color: var(--pm-yes-text); }
.pm-seg button.is-on.no { background: #fdeceb; border-color: var(--pm-no-bar); color: var(--pm-no-text); }
.pm-input { width: 100%; padding: 10px 12px; border: 1px solid var(--pm-line); border-radius: 8px; font-size: 1.1em; font-family: inherit; }
.pm-chips { display: flex; gap: 6px; margin: 0px 0px 0px 0px !important; }
.pm-chips button { flex: 1; padding: 6px 0; border: 1px solid var(--pm-line); border-radius: 16px; background: #fff; cursor: pointer; font-family: inherit; }
.pm-sum { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.pm-sum td { padding: 5px 0; border-bottom: 1px solid var(--pm-line); }
.pm-sum td:last-child { text-align: right; font-weight: 600; }
.pm-msg { margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: .92em; display: none; }
.pm-msg.ok { display: block; background: #e3f7ed; color: #14563a; }
.pm-msg.err { display: block; background: #fdeceb; color: #8f2a22; }
#pm-nick-msg.ok, #pm-nick-msg.err { margin-bottom: 12px; }

/* Chart */
.pm-chart { width: 100%; height: auto; }
.pm-chart-grid { stroke: var(--pm-line); stroke-width: 1; }
.pm-chart-grid.is-mid { stroke-dasharray: 4 4; stroke: #b6c8d8; }
.pm-chart-line { fill: none; stroke: var(--pm-deep); stroke-width: 2.5; stroke-linejoin: round; }
.pm-chart-dot { fill: var(--pm-accent); stroke: var(--pm-deep); stroke-width: 2; }
.pm-chart-label { font-size: 11px; fill: var(--pm-muted); }
.pm-chart-now { font-size: 13px; font-weight: 700; fill: var(--pm-ink); }

/* Tables */
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table th { text-align: left; font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--pm-muted); padding: 6px 8px; border-bottom: 2px solid var(--pm-line); }
.pm-table td { padding: 9px 8px; border-bottom: 1px solid var(--pm-line); }
.pm-table .r { text-align: right; }
.pm-table tr.is-me td { background: #e3f6fd; font-weight: 700; }
.pm-layout-trade main .pm-table td:first-child { width: 1%; white-space: nowrap; padding-right: 16px; }
.pm-scroll { overflow-x: auto; }
.pos { color: var(--pm-yes-text); }
.neg { color: var(--pm-no-text); }

.pm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1100px) { .pm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pm-stats .pm-card { margin-bottom: 0; }
.pm-notice { background: #e3f6fd; border: 1px solid #9fdcf5; border-radius: 8px; padding: 10px 14px 7px 14px; margin-bottom: 14px; }
.pm-notice a { text-decoration: underline; text-underline-offset: 3px; }
.pm-notice a:hover { color: var(--pm-deep); }
.pm-small { font-size: 1.0em; }
.pm-form-row { display: flex; gap: 8px; flex-wrap: nowrap; }
.pm-form-row .pm-input { flex: 1; min-width: 0; }

/* Trade panel (Osta / Myy) */
.pm-tr { padding: 0; overflow: hidden; }
.pm-tr-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 8px 18px; border-bottom: 1px solid var(--pm-line); }
.pm-tr-tabs { display: flex; gap: 16px; margin-top: 9px;}
.pm-tr-tabs button { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; font-size: .95em; letter-spacing: .06em; text-transform: uppercase; color: #a3a8b0; }
.pm-tr-tabs button:hover { color: var(--pm-ink); text-decoration: underline; text-underline-offset: 5px; }
.pm-tr-tabs button.is-on { color: var(--pm-ink); }
.pm-tr-free { font-size: .85em; color: var(--pm-muted); }
.pm-tr-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.pm-pill { display: grid; grid-template-columns: 1fr 1fr; background: #f1f2f4; border-radius: 999px; padding: 0px; }
.pm-pill button { border: 0; background: none; border-radius: 999px; padding: 10px 0 7px; font-weight: 700; font-size: .95em; cursor: pointer; color: #4a4f57; }
.pm-pill button.is-on.yes { background: #e3f7ed; color: var(--pm-yes-text); box-shadow: inset 0 0 0 1.5px var(--pm-yes-bar); }
.pm-pill button.is-on.no { background: #fdeceb; color: var(--pm-no-text); box-shadow: inset 0 0 0 1.5px var(--pm-no-bar); }
.pm-tr-input { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--pm-line); border-radius: 10px; padding: 3px 18px 0px 12px; cursor: text; color: var(--pm-muted); }
.pm-tr-input input { border: 0; outline: 0; background: none; text-align: right; font-size: 1.5em; font-weight: 700; width: 100%; color: var(--pm-ink); padding: 4px 0; font-family: inherit; }
.pm-tr-input input::-webkit-inner-spin-button, .pm-tr-input input::-webkit-outer-spin-button { margin-left: 3px; margin-bottom: 3px; }
.pm-tr-input:focus-within { border-color: var(--pm-navy); }
.pm-tr .pm-chips { margin: -6px 6px 0px 6px !important; gap: 12px; }
.pm-tr .pm-chips button { flex: none; border: 0; background: none; padding: 0; font-weight: 600; color: var(--pm-navy); }
.pm-tr .pm-sum { margin: 0; font-size: 1em; color: var(--pm-ink); }
.pm-tr .pm-sum td { border-bottom: 0; padding: 4px 0; }
.pm-tr .pm-sum { border-top: 1px solid var(--pm-line); padding-top: 17px; }
.pm-tr .pm-sum td:last-child { color: var(--pm-ink); font-size: .92em; }
.pm-tr-max { margin-top: -6px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--pm-line); padding-top: 12px; }
.pm-tr-maxnum { font-size: 2em; font-weight: 700; line-height: 1; }
.pm-tr-cta { width: 100%; padding: 14px 0 11px; border-radius: 999px; background: var(--pm-accent); color: #0b2b3a; font-size: 1.05em; }
.pm-tr-cta[disabled] { opacity: .45; }

/* Front page: stats row, category pills, list + top card */
.pm-stat { padding: 12px 16px; }
.pm-statnum { font-size: 1.7em; font-weight: 700; line-height: 1.15; }
.pm-statprize { font-weight: 700; line-height: 1.3; }
.pm-catpills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 24px 3px 12px 3px !important; }
.pm-catpills .pm-muted { margin-right: 4px; }
.pm-catpills a { padding: 6px 13px 3px; border-radius: 999px; background: #fff; border: 1px solid var(--pm-line); font-weight: 600; font-size: .9em; text-decoration: none; }
.pm-catpills a span { color: var(--pm-muted); font-weight: 500; }
.pm-catpills a.is-active { background: var(--pm-sel); border-color: var(--pm-sel); color: #fff; }
.pm-catpills a.is-active span { color: #cfd3d9; }
/* Same 4-column grid as .pm-stats: content takes 3 columns, the side card exactly the 4th. */
.pm-split { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pm-split > main, .pm-split > .pm-split-main { grid-column: span 3; min-width: 0; }
.pm-split > aside { grid-column: span 1; min-width: 0; }
@media (max-width: 1100px) { .pm-split { grid-template-columns: minmax(0, 1fr); } .pm-split > main, .pm-split > .pm-split-main, .pm-split > aside { grid-column: auto; } }
.pm-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 560px) { .pm-stats-3 { grid-template-columns: minmax(0, 1fr) !important; } }

.pm-pos-pill { font: inherit; font-size: .9em; font-weight: 700; padding: 3px 10px 1px; border-radius: 999px; border: 1px solid #d3d7de; background: #eef0f3; color: var(--pm-ink); cursor: pointer; }
.pm-pos-pill.yes { background: #e3f7ed; border-color: #bfe9d3; color: var(--pm-yes-text); }
.pm-pos-pill.no { background: #fdeceb; border-color: #f5cbc8; color: var(--pm-no-text); }
.pm-pos-pill:hover { filter: brightness(.97); }
.pm-listhead { margin: 24px 6px 3px 6px !important; }
.pm-foot { margin-left: 10px; margin-right: 16px; display: none;}

.pm-btn.dark { background: var(--pm-sel); color: #fff; padding: 9px 16px 6px; align-self: center; }
.pm-btn.dark:hover { background: #000; }
.pm-nick { margin: 0 0 14px 2px; }
.pm-nick-name { font-size: 2.1em; font-weight: 700; line-height: 1.1; }
.pm-nick-bar { width: 48px; height: 4px; border-radius: 2px; background: var(--pm-accent); margin-top: 6px; }
a.pm-nick-link, .pm-nick { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
a.pm-nick-link:hover { text-decoration: none; }
a.pm-nick-link:hover .pm-nick-text { text-decoration: underline; text-underline-offset: 3px; }
.pm-week-wins { display: inline-flex; align-items: center; gap: 3px; color: #c3922a; flex: none; margin-bottom: 3px; line-height: 1; }
.pm-week-wins svg { display: block; }
.pm-week-wins b { font-size: .78em; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.pm-prof-head .pm-week-wins { margin-bottom: 3px; }
.pm-prof-head .pm-week-wins svg { width: 18px; height: 18px; }
.pm-prof-head .pm-week-wins b { font-size: .55em; }

.pm-mkt-top { margin-top: 0; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pm-tr .pm-chips button:hover { text-decoration: underline; text-underline-offset: 4px; }
.pm-tr-cta:not([disabled]):hover { background: #3fc4f0; }
.pm-tr-cta[disabled] { cursor: not-allowed; }
.pm-btn.yes:hover { background: #d3f2e2; }
.pm-btn.no:hover { background: #fadad8; }
/* Trade popup (front page). The host is a second .pm element appended to <body>. */
.pm.pm-modal { position: fixed; inset: 0; z-index: 100000; max-width: none; min-height: 0; margin: 0; padding: 16px; display: flex; align-items: center; justify-content: center; background: rgba(20, 24, 30, .5); }
.pm.pm-modal[hidden] { display: none; }
.pm-modal-box { position: relative; width: 100%; max-width: 400px; max-height: 94vh; overflow-y: auto; background: #fff; border-radius: 14px; padding: 16px 0 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.pm-modal-q { font-weight: 700; font-size: 1.2em; line-height: 1.3; padding: 0 44px 12px 18px; }
.pm-modal-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--pm-muted); }
.pm-modal-x:hover { color: var(--pm-ink); }
.pm-modal-box .pm-tr { border: 0; border-top: 1px solid var(--pm-line); border-radius: 0; margin: 0; }
.pm-modal-more { display: block; padding: 10px 18px 2px; margin-bottom: 6px;}

/* Prosentit / Kertoimet switch */
.pm-seg { display: inline-flex; background: #eceef1; border: 1px solid var(--pm-line); border-radius: 999px; padding: 0px; margin-left: auto; }
.pm-seg button { border: 0; background: none; padding: 4px 12px 1px; border-radius: 999px; font-size: .82em; font-weight: 540; color: var(--pm-muted); cursor: pointer; }
.pm-seg button:hover { color: var(--pm-ink); }
.pm-seg button.is-on { background: var(--pm-sel); color: #fff; }
.pm-modal-sw { padding: 0 18px 12px; display: flex; }
.pm-prob-note { text-align: right; margin-top: -17px; }
.pm-tr-cta { display: flex; align-items: center; justify-content: center; gap: 7px; }
.pm-tr-cta span { font-weight: 700; }
.pm-tr-cta b { font-weight: 700; text-decoration: underline;}

/* Totals: several Yes/No lines on one card */
.pm-row-tot .pm-q { padding-right: 90px; }
.pm-tot-lines { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 4px; }
.pm-tot-line { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px 14px; align-items: center; }
.pm-tot-lab { font-weight: 700; text-decoration: none; line-height: 1.2; white-space: nowrap; }
a.pm-tot-lab:hover { text-decoration: underline; }
.pm-tot-line .pm-barline { min-width: 0; margin-top: 0 !important; align-items: center; }
.pm-tot-sibs h2 { margin-bottom: 8px; }
.pm-tot-sib { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--pm-line); }
.pm-tot-sib:last-child { border-bottom: 0; }
.pm-tot-sib.is-on .pm-tot-lab { color: var(--pm-deep); }
.pm-tot-sib .y { display: inline-flex; align-items: center; gap: 4px; color: var(--pm-yes-text); font-weight: 700; }
.pm-tot-sib .pm-win { display: block; }

/* Multi-outcome markets (1X2 etc.) */
.pm-row-multi { grid-template-columns: minmax(0, 1fr); }
.pm-bar3 { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin: 18px 0px 10px 0px; }
.pm-bar3 > i { display: block; min-width: 4px; transition: width .3s; }
.pm-outs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.pm-out { position: relative; display: flex; align-items: center; gap: 6px; border: 1px solid var(--pm-line); border-radius: 10px; padding: 8px 10px; line-height: 1.3; font-weight: 600; font-size: .95em; background: #fff; }
.pm-out.is-win { background: #f4fbfe; border-color: #d7eaf3; }
.pm-out-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; position: relative; top: 1px; margin: 0 0 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.pm-out-l { position: relative; top: 1px; padding-top: 2px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.pm-out b { position: relative; top: 1px; padding-top: 2px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.pm-out-cover { display: none; position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; margin: 0; background: transparent; border-radius: inherit; cursor: pointer; }
.pm-out-btn { appearance: none; margin: 0; line-height: 1.15; background: #eaf6fb; color: var(--pm-deep); border: 1px solid #cfe9f4; padding: 4px 12px 0; font-size: 1.0em; }
.pm-out-btn:hover { background: #d8eef8; }
.pm-more { display: inline-block; margin-top: 8px; }
.pm-pill.multi { display: flex; }
.pm-pill.multi button { flex: 1; padding: 10px 6px 7px; line-height: 1.2; }
.pm-pill.multi button.is-on { background: #fff; color: var(--pm-deep); box-shadow: inset 0 0 0 2px var(--pm-accent); }
.pm-pill.multi.as-list { flex-direction: column; gap: 8px; padding: 0; background: transparent; border-radius: 0; }
.pm-pill.multi.as-list button { text-align: left; padding: 9px 14px 6px; border-radius: 12px; display: flex; justify-content: space-between; background: #f1f2f4; }
.pm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 8px; font-size: .88em; color: var(--pm-muted); }
.pm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.pm-card .pm-bar3 { margin-top: 12px; }
.pm-pill.multi:not(.as-list) button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.pm-pill.multi:not(.as-list) .pm-pl { font-size: .82em; font-weight: 600; }
.pm-pill.multi.as-list .pm-pl { flex: 1; text-align: left; }

.pm-mkt-top .pm-muted { font-size: 1em; }

/* Tables inside cards without side padding (profile) */
.pm-flush { margin-top: 12px; }
.pm-flush .pm-table th:first-child, .pm-flush .pm-table td:first-child { padding-left: 0; }
.pm-flush .pm-table th:last-child, .pm-flush .pm-table td:last-child { padding-right: 0; }
span.pm-pos-pill { cursor: default; display: inline-block; margin: 1px 0; }
.pm-arrow { font-size: .7em; margin-right: 6px; position: relative; top: -1px; }
.pm-arrow.up { color: var(--pm-yes-text); }
.pm-arrow.down { color: var(--pm-no-text); }
.pm-flush .pm-table th { white-space: nowrap; }

.pm-form-row { align-items: stretch; }
.pm-form-row .pm-input { padding-top: 0; padding-bottom: 0; }
.pm-form-row .pm-btn.dark { align-self: stretch; }
a.pm-pos-more { background: #fff; text-decoration: none; cursor: pointer; color: var(--pm-ink); display: inline-block; }

/* Profile name bar (dark) */
.pm-namebar { background: var(--pm-sel); color: #fff; border-radius: 10px; padding: 14px 0 14px 18px; display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.pm-nb-main { flex: 1; min-width: 220px; }
.pm-nb-name { display: flex; align-items: center; gap: 10px; font-size: 1.75em; font-weight: 700; line-height: 1.1; }
.pm-nb-pen { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #555; background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin-bottom: 5px;}
.pm-nb-pen:hover { background: #3a3c40; }
.pm-nb-col { padding: 0 18px; border-left: 1px solid #43454a; }
.pm-nb-cap { font-size: .72em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa0a8; }
.pm-nb-val { font-size: 1.3em; font-weight: 700; line-height: 1.2; }
.pm-nb-col.is-total .pm-nb-val { color: var(--pm-accent); }
.pm-nb-edit { padding-right: 6px; }
.pm-nb-edit .pm-input { border: 2px solid var(--pm-accent); }
.pm-nb-cancel { background: transparent; color: #fff; border: 1px solid #555; align-self: stretch; }
.pm-nb-hint { font-size: .8em; color: #c9ccd2; margin-top: 8px; }
@media (max-width: 700px) { .pm-nb-col { border-left: 0; padding: 0 18px 0 0; } .pm-namebar { padding-right: 18px; } }
.pm-nb-name[hidden], .pm-nb-edit[hidden] { display: none; }
.pm-nb-name #pm-nb-name { position: relative; top: 6px; color: var(--pm-accent); }
.pm-nb-edit .pm-form-row .pm-input { flex: 0 0 auto; width: 280px; max-width: 100%; }

/* Own shares in the corner of buy buttons */
.pm-btn { position: relative; }
.pm-own { position: absolute; top: 2px; right: 6px; font-size: 9px; font-weight: 600; line-height: 1; opacity: .85; }
.pm-own[hidden] { display: none; }
.pm-out-btn .pm-own { top: 1px; right: 4px; font-size: 8px; }

td.pm-pos-cell { cursor: pointer; }
td.pm-pos-cell:hover .pm-pos-pill { filter: brightness(.96); }
a.pm-pos-pill { text-decoration: none; color: inherit; display: inline-block; margin: 1px 0; }
a.pm-pos-pill.yes { color: var(--pm-yes-text); }
a.pm-pos-pill.no { color: var(--pm-no-text); }
.pm-tr .pm-sum tr:first-child td { padding-top: 10px; }

/* Card header with action */
.pm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pm-card-head h2 { margin: 0; }
.pm-sellall { padding: 7px 14px 4px; font-size: .9em; }
.pm-sellbtn { font-size: .8em; font-weight: 700; color: var(--pm-deep, #00557d); background: #eaf6fb; border: 1px solid #cfe9f4; border-radius: 8px; padding: 3px 10px 1px; text-decoration: none; display: inline-block; }
.pm-sellbtn:hover { background: #d8eef8; }
.pm-confirm { max-width: 420px; padding: 22px 22px 20px; }
.pm-confirm h3 { margin: 0px 0px 6px 0px !important; font-size: 1.3em; }
.pm-confirm p { margin: 0 0 12px; }
.pm-confirm-est { display: flex; justify-content: space-between; background: #f6f7f9; border: 1px solid var(--pm-line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.pm-confirm-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* Trades list: day rows */
.pm-trades tr.pm-day td { font-size: .72em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pm-ink); background: none; padding: 10px 0 4px; border-bottom: 0; }
.pm-trades td { font-size: .92em; }
.pm-tk { font-weight: 540; }
.pm-tk.pos, .pm-trades td.pos { color: var(--pm-yes-text); }
.pm-tk.neg, .pm-trades td.pm-neg { color: var(--pm-no-text); }
.pm-num.pos { color: var(--pm-yes-text); }

/* Pagination: 10 / 25 / 50 on the left, numbered pages on the right */
.pm-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: .85em; color: var(--pm-muted); }
.pm-pager-size { display: inline-flex; align-items: center; gap: 8px; }
.pm-seg-mini { display: inline-flex; background: #eef0f3; border-radius: 999px; padding: 3px; font-weight: 540; }
.pm-seg-mini a { padding: 3px 10px 1px; border-radius: 999px; color: var(--pm-muted); text-decoration: none; }
.pm-seg-mini a.is-on { background: var(--pm-sel); color: #fff; }
.pm-pager-pages { display: inline-flex; align-items: center; gap: 4px; }
.pm-pg { min-width: 30px; height: 30px; padding: 2px 4px 0px 4px; box-sizing: border-box; border-radius: 8px; border: 1px solid #d3d7de; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--pm-ink); text-decoration: none; }
a.pm-pg:hover { background: var(--pm-panel); }
.pm-pg.is-cur { background: var(--pm-sel); color: #fff; border-color: var(--pm-sel); }
.pm-pg.is-off { color: #c0c4cc; }
.pm-pg-gap { padding: 0 2px; color: var(--pm-muted); }

/* Popup: holdings inside the side buttons */
.pm-pill button:has(.pm-hold:not([hidden])) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1.15; padding-top: 7px; padding-bottom: 5px; }
.pm-hold { font-size: 11px; font-weight: 600; opacity: .75; }
.pm-hold b { font-weight: 700; }
.pm-pill.multi.as-list button:has(.pm-hold:not([hidden])) { flex-direction: row; align-items: center; padding: 9px 14px 6px; }
.pm-pill.multi.as-list .pm-pl { order: 0; }
.pm-pill.multi.as-list .pm-hold { order: 1; margin: 0 14px 0 0; }
.pm-pill.multi.as-list [data-pv] { order: 2; }
.pm-pill:not(.multi) button:has(.pm-hold:not([hidden])) { flex-flow: row wrap; column-gap: .3em; }
.pm-pill:not(.multi) .pm-hold { flex-basis: 100%; text-align: center; }
.pm-modal .pm-tr-tabs { position: relative; top: -3px; }

/* Prize card: header + stacked prize rows */
.pm-card.pm-prize { background: #fff; border-color: var(--pm-line); color: var(--pm-ink); padding: 12px 14px; display: flex; flex-direction: column; gap: 0; align-items: stretch; flex: none; }
.pm-prize-head { display: flex; align-items: center; gap: 8px; margin: 0; margin-bottom: 3px !important; font-size: 1.15em; color: var(--pm-ink); padding-bottom: 6px; }
.pm-prize-head svg { flex: none; color: #00709c; display: block; margin-bottom: 6px; }
.pm-prize-list { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.pm-prize-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; align-items: center; text-decoration: none !important; color: inherit; min-width: 0; padding: 8px 8px; border-top: 1px solid var(--pm-line); }
.pm-prize-row:nth-child(odd) { background: #f3f4f7; }
.pm-prize-row:hover { text-decoration: none !important; }
.pm-prize-row:hover .pm-statprize { text-decoration: underline; text-underline-offset: 3px; }
.pm-prize-row:last-child { padding-bottom: 8px; }
.pm-prize-kind { display: block; grid-column: 1; font-size: 1.0em; font-weight: 600; color: var(--pm-muted); letter-spacing: .02em; }
.pm-prize-line { grid-column: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: .98em; line-height: 1.25; color: var(--pm-muted); }
.pm-prize .pm-statprize { margin: 0; font-weight: 600; white-space: normal; color: var(--pm-yes-text); }
.pm-prize-sub { grid-column: 1 / -1; font-size: .9em; color: var(--pm-muted); margin-top: 6px; padding-top: 12px; border-top: 1px dotted #ccc;}
.pm-prize-pill { grid-column: 2; grid-row: 1 / 3; margin-left: 0; padding: 2px 8px 0; border-radius: 9px; background: #eef0f3; border-color: transparent; color: #4a4f57; font-size: .82em; white-space: nowrap; align-self: center; }


.pm-row-special { border-color: #00709c; border: 2px solid #00709c;}
.pm-row-special .pm-cat { background: #eaf6fb; color: #00557d; }
.pm-special-chip { display: inline-block; padding: 3px 10px 0px 10px; border: 1px solid #00557d; border-radius: 6px; background: #eaf6fb; color: #00557d; font-size: .78em; font-weight: 700; letter-spacing: .02em; margin-bottom: 6px;}
.pm-special-note { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 1.0em; color: var(--pm-muted); margin: 4px 0 8px; }
.pm-row-special .pm-special-note { margin: 0px 0 10px; }
.pm-special-prize { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 0px 6px; border-radius: 8px; background: #f8edd0; color: #6b4e16; font-weight: 600; font-size: .95em; }
.pm-special-prize .pm-special-ico { position: relative; top: 0px; }
.pm-special-prize b { font-weight: 700; }
.pm-special-picked { font-size: .95em; font-weight: 650; color: #00709c; margin: 10px 0 0; }
.pm-special-actions { display: flex; gap: 8px; margin: 12px 0 8px; }
.pm-special-actions .pm-btn { flex: 1; }
.pm-special-panel { border-color: #00709c; }
.pm-special-panel h2 { margin: 0 0 8px; color: #00557d; }
.pm-special-cost { margin: 6px 0px; }
.pm-special-prizeblock { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: #eaf6fb; }
.pm-special-prize-k { font-size: 1.0em; font-weight: 700; color: #00557d; margin-bottom: 2px; }
.pm-special-rules { margin: 12px 6px 0px 6px; padding: 0 0 0 1.1em; color: var(--pm-muted); font-size: 1.0em; }
.pm-special-rules li { margin: 3px 0; }

/* Front page: 70 / 30, side column starts level with the category chips */
.pm-home { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 0; align-items: stretch; }
.pm-home > .pm-home-top { grid-column: 1; grid-row: 1; min-width: 0; }
.pm-home > main { grid-column: 1; grid-row: 2; min-width: 0; }
.pm-home > aside { grid-column: 2; grid-row: 1 / span 2; margin-top: 24px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-home > aside .pm-card { margin-bottom: 0; }
@media (max-width: 1100px) {
  .pm-home { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .pm-home > .pm-home-top, .pm-home > main { grid-column: 1; grid-row: auto; }
  .pm-home > aside { display: contents; margin-top: 0; }
  .pm-home > .pm-home-top { order: 0; }
  .pm-home .pm-me, .pm-home .pm-how { order: 1; margin-bottom: 12px; }
  .pm-home .pm-karki { margin-top: 2px; }
  .pm-home > main { order: 2; }
  .pm-home .pm-karki { order: 3; }
  .pm-home .pm-prize { order: 4; }
  .pm-home .pm-rules-link { order: 5; }
}
.pm-how h2 { margin: 0 0 6px; }
.pm-how p { margin: 0; font-size: .92em; color: var(--pm-muted); line-height: 1.35; }
.pm-how p + p { margin-top: 10px; }
.pm-how-rules { margin-top: 10px; }
.pm-how a { font-weight: 540; text-decoration: underline; text-underline-offset: 3px; }
.pm-me { padding: 12px 14px 12px; }
.pm-me-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pm-me-rank { display: inline-flex; align-items: center; gap: 5px; background: #eef0f3; border-radius: 9px; padding: 3px 9px 1px; font-size: .78em; font-weight: 700; color: #4a4f57; white-space: nowrap; text-decoration: none; }
.pm-me-rank svg { flex: none; display: block; margin-bottom: 4px; color: #00709c; }
a.pm-me-rank:hover { filter: brightness(.97); }
.pm-me-num { font-size: 1.7em; font-weight: 700; line-height: 1.15; margin-top: 4px; }
.pm-me-num small { font-size: .42em; font-weight: 600; color: var(--pm-muted); }
.pm-me-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 8px; background: #00709c; }
.pm-me-bar i { display: block; background: #c5c8d0; }
.pm-me-legend { display: flex; justify-content: space-between; gap: 8px; font-size: .78em; color: var(--pm-muted); margin-top: 5px; }

/* Heading block on the left, category chips on the right of the same row */
.pm-home-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
.pm-home-head { margin: 24px 0 9px 6px; min-width: 0; }
.pm-home .pm-listhead { margin: 0 !important; line-height: 1.15; }
.pm-listdate { font-size: 1.2em !important; font-weight: 540; color: var(--pm-ink); margin-top: 2px; }
.pm-home-status { margin-top: 10px; }
.pm-home-row .pm-catpills { margin: 24px 3px 9px 3px !important; justify-content: flex-end; }

.pm-home .pm-listhead,
.pm h2.pm-sechead { font-size: 1.6em; line-height: 1.15; }
.pm h2.pm-sechead { margin: 24px 6px 9px !important; color: var(--pm-ink); }
.pm-me-nick { display: inline-flex; align-items: center; gap: 5px; font-size: 1.05em; font-weight: 700; line-height: 1.2; }
.pm-home .pm-special-picked { margin: 0; align-self: center; }

/* Leaderboard: same 70/30 shell as the home page so the side column sits on the heading row. */
.pm-board { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 0; align-items: stretch; }
.pm-board > .pm-board-top { grid-column: 1; grid-row: 1; min-width: 0; }
.pm-board > main { grid-column: 1; grid-row: 2; min-width: 0; }
.pm-board > aside { grid-column: 2; grid-row: 1 / span 2; margin-top: 24px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-board > aside .pm-card { margin-bottom: 0; }
.pm-board .pm-listhead { margin: 0 !important; line-height: 1.15; font-size: 1.6em; }
.pm-board-pills { margin: 24px 3px 9px auto; align-self: flex-start; }
.pm-prof-stats .pm-nb-val a { color: inherit; text-decoration: none; }
.pm-prof-stats .pm-nb-val a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pm-karki h2 a { color: inherit; text-decoration: none; }
.pm-karki h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1100px) {
  .pm-board { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; align-items: start; }
  .pm-board > .pm-board-top, .pm-board > main, .pm-board > aside { grid-column: 1; grid-row: auto; }
  .pm-board > aside { margin-top: 0; display: flex; flex-direction: column; gap: 16px; min-height: 0; height: auto; }
  .pm-board > aside > .pm-card { flex: none; }
  .pm-board-pills { margin: 0 6px 12px; }
}

/* Profile: name and figures, then a two-column row (positions | profit) and trades full width. */
.pm-prof-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin: 24px 6px 12px; }
.pm-prof-head { min-width: 0; }
.pm-prof-head .pm-nb-name { gap: 8px; font-size: 1em; font-weight: 400; margin-top: 3px; }
.pm-prof-head .pm-listhead { margin: 3px 0 0 !important; line-height: 1.15; font-size: 1.3em; }
.pm-prof-head .pm-nb-name #pm-nb-name { top: 0; color: var(--pm-ink); font-size: 1.8em;}
.pm-prof-head .pm-nb-pen { border-color: var(--pm-line); color: var(--pm-muted); background: #fff; }
.pm-prof-head .pm-nb-pen:hover { background: #f6f7f9; }
.pm-prof-head .pm-nb-cancel { color: var(--pm-ink); border-color: var(--pm-line); background: #fff; }
.pm-prof-head .pm-nb-hint { color: var(--pm-muted); }
.pm-prof-stats { display: flex; align-items: center; }
.pm-prof-stats .pm-nb-col { border-left-color: var(--pm-line); padding: 0 16px; }
.pm-prof-stats .pm-nb-col:first-child { border-left: 0; padding-left: 0; }
.pm-prof-stats .pm-nb-col:last-child { padding-right: 0; }
.pm-prof-stats .pm-nb-cap { color: var(--pm-muted); }
.pm-prof-stats .pm-nb-val { font-size: 1.15em; }
.pm-prof-stats .pm-nb-col.is-total .pm-nb-val { color: #00709c; }
.pm-prof-stats .pm-nb-col.is-rank { text-align: center; }
.pm-prof-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.85fr); gap: 12px; align-items: stretch; }
.pm-prof-grid > .pm-card { margin-bottom: 0; }
.pm-prof-wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .pm-prof-grid { grid-template-columns: minmax(0, 1fr); } .pm-prof-wide { grid-column: auto; } }
.pm-pills { display: inline-flex; flex-wrap: wrap; background: #eceef1; border: 0px solid var(--pm-line); border-radius: 999px; padding: 2px; }
.pm-pills button, .pm-pills a { border: 0; background: none; padding: 5px 12px 2px 12px; border-radius: 999px; font: inherit; font-size: 1.0em; font-weight: 540; color: var(--pm-muted); cursor: pointer; text-decoration: none; }
.pm-pills button:hover, .pm-pills a:hover { color: var(--pm-ink); }
.pm-pills button.is-on, .pm-pills a.is-on { background: var(--pm-sel); color: #fff; }
.pm-pills button.is-on:hover, .pm-pills a.is-on:hover { color: #fff; }
.pm-prof-positions .pm-card-head { flex-wrap: nowrap; }
.pm-prof-positions td:first-child a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#pm-sell-all.is-off { visibility: hidden; pointer-events: none; }
.pm-pnl-chart .pm-chart-label { font-size: 18px; }
.pm-pnl-chart .pm-chart-now { font-size: 20px; }
.pm-prof-head .pm-nb-edit .pm-btn { align-self: center; padding: 4px 14px 2px; }
.pm-tabs a[href$="rules.php"] { display: none; }
.pm h1.pm-mkt-q { margin-bottom: 0px !important; color: var(--pm-ink); line-height: 1.45 !important;}
.pm-barline { display: flex; align-items: flex-end; gap: 20px;  margin-top: 18px !important;}
.pm-barmid { flex: 1; min-width: 0; }

#pm-pnl-ranges button { font-size: 0.82em !important; }

@media (max-width: 640px) { .pm-barline { flex-direction: column; align-items: stretch; gap: 10px; } }
.pm-pnl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 12px; margin-bottom: 4px; }
.pm-pnl-num { font-size: 1.7em; font-weight: 700; line-height: 1.1; color: var(--pm-ink); }
.pm-pnl-num.is-up { color: #00709c; }
.pm-pnl-num.is-neg { color: var(--pm-no-text); }
.pm-rules { margin: 0; padding-left: 1.2em; }
.pm-rules li { margin: 6px 0; padding-left: 0.2em; }
.pm-rules-link { margin: 2px 8px 0; background: none; text-align: center; }
.pm-rules-link a { color: var(--pm-muted); text-decoration: underline; text-underline-offset: 3px; }
.pm-rules-link a:hover { color: var(--pm-ink); }
.pm-mark { display: none; margin: 0; }
@media (min-width: 1101px) {
  .pm-prof-col { display: flex; flex-direction: column; min-height: 100%; }
  .pm-prof-col > .pm-pnl { margin-bottom: 0; }
  .pm-mark { container-type: size; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; background: transparent; }
  .pm-mark span { color: rgba(43, 44, 45, 0.28); font-size: 1.55rem; font-weight: 700; letter-spacing: 0.01em; line-height: 1; user-select: none; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 -1px 0 rgba(43, 44, 45, 0.08); }
}
@container (max-height: 36px) { .pm-mark span { visibility: hidden; } }
.pm-pager:not(:has(.pm-pager-size)) { justify-content: flex-end; }

/* Phone layout (up to 1100px). Desktop stays as it is. Bottom sheets slide up over the page. */
.pm-switch, .pm-m-tools, .pm-m-bar, .pm-tlist, .pm-tab-s { display: none; }
.pm-m-tools[hidden], .pm-switch[hidden], .pm-tlist[hidden], .pm-tab-s[hidden] { display: none !important; }
@media (min-width: 1101px) {
  .pm-mkt-actions, .pm-out-btn { display: none !important; }
  .pm-special-actions-main { display: none; }
  .pm-out-cover { display: block; }
  .pm-out b { margin-right: 28px; }
  .pm-out > .pm-own { font-size: 13px; font-weight: 700; top: 4px; right: 8px; z-index: 2; pointer-events: none; opacity: 1; }
  .pm-out:has(.pm-out-cover):hover { border-color: #b6c8d8; }
}
.pm-sheet[hidden] { display: none !important; }
.pm-sheet-handle { display: none; width: 36px; height: 4px; border-radius: 2px; background: #c5c8d0; margin: 2px auto 12px; touch-action: none; position: relative; }
.pm-sheet-handle::before { content: ""; position: absolute; left: -48px; right: -48px; top: -14px; bottom: -14px; }
.pm-sheet.is-open { display: block; position: fixed; inset: 0; z-index: 100000; }
.pm-sheet.is-open .pm-sheet-handle { display: block; }
.pm-sheet-bg { position: absolute; inset: 0; background: rgba(20, 24, 30, .5); }
.pm-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 88vh; max-height: 88dvh; overflow: auto; }
.pm-sheet-panel h3 { margin: 0 0 10px; font-size: 1.2em; }
.pm-sheet .pm-catpills { margin: 10px 0 0 !important; justify-content: flex-start; }
.pm-sheet .pm-catpills a { padding: 8px 14px 6px; }
.pm-sheet-go { display: block; width: 100%; margin-top: 16px; border: 0; border-radius: 10px; background: #e4e6eb; color: var(--pm-ink); padding: 12px 0 10px; font-weight: 700; cursor: pointer; }
.pm-sheet-go:hover { background: #d5d8de; }
.pm-filter-btn { position: relative; flex: none; width: 42px; height: 42px; padding: 0; border: 1px solid var(--pm-line); border-radius: 12px; background: #fff; color: #8b909a; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pm-filter-btn[data-open-sheet="pm-prize-sheet"] { color: #00709c; }
.pm-filter-btn svg { display: block; }
.pm-filter-btn.is-on::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #378cb4; }

@media (max-width: 1100px) {
  .pm { padding: 0 3px 16px; font-size: 17px; }
  .pm .pm-chart-label { font-size: 24px; }
  .pm .pm-chart-now { font-size: 32px; }
  .pm .pm-chart-line, .pm .pm-chart polyline, .pm .pm-pnl-line { stroke-width: 4.5; }
  .pm .pm-pnl-chart .pm-chart-label { font-size: 28px; }
  .pm .pm-pnl-chart .pm-chart-now { font-size: 34px; }
  .pm-tr-tabs button { font-size: 1.15em; }
  .pm-pill button { font-size: 1.15em; }
  .pm-tr .pm-chips button { font-size: 1.15em; }
  .pm-tr .pm-sum { font-size: 1.15em; }
  .pm-tr-max { font-size: 1.12em; }
  .pm-tr-maxnum { font-size: 1.7em; }
  .pm-modal-more { display: none; }
  .pm-tr-cta { font-size: 1.25em; }
  .pm-head { margin: 0 -3px 12px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  .pm-head .pm-muted { display: none; }
  .pm h1 { font-size: 1.65em; margin-bottom: 0; width: 100%; text-align: center; }
  .pm-tabs { display: none; }
  .pm-switch[hidden] { display: inline-flex !important; }
  .pm-switch { width: auto; margin: 6px auto 0; padding: 0px; border: 1px solid var(--pm-line); border-radius: 999px; background: #fff; }
  .pm-switch a { flex: none; text-align: center; text-decoration: none; font-weight: 540; font-size: 1em; color: var(--pm-muted); padding: 6px 16px 4px; border-radius: 999px; background: #fff; }
  .pm-switch a.is-active { background: var(--pm-sel); color: #fff; }

  .pm-home-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 8px; margin: 0 9px; }
  .pm-home-row { grid-column: 1; min-width: 0; }
  .pm-m-tools { grid-column: 2; grid-row: 1; }
  .pm-home-top > .pm-notice { grid-column: 1 / -1; margin-left: -6px; margin-right: -6px; }
  .pm-home-head { margin: 4px 0 8px; }
  .pm-home-status { margin-top: 8px; }
  .pm-board-top { margin: 0 9px; }
  .pm-home .pm-how, .pm-home > aside .pm-how { margin-bottom: 12px; }
  .pm-outs { grid-template-columns: 1fr; }
  .pm-home .pm-listhead,
  .pm-board .pm-listhead,
  .pm h2.pm-sechead { font-size: 1.4em; }
  .pm-home-row .pm-catpills { display: none; }
  .pm-m-tools[hidden] { display: block !important; }
  .pm-m-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
  .pm-sheet .pm-prize { margin: 0; border: 0; padding: 0; }
  .pm-sheet .pm-prize-head { margin-bottom: 4px !important; }
  .pm-home-side .pm-me, .pm-home-side .pm-karki, .pm-home-side .pm-prize { display: none; }
  .pm-home-side .pm-how { display: block; }

  .pm-row { padding: 12px 12px 10px; }
  .pm-cat { position: static; float: right; margin: -12px -12px 6px 10px; }
  .pm-q, .pm-row-tot .pm-q { font-size: 1.08em; padding-right: 0; margin-bottom: 6px; }
  .pm-row .pm-players { position: static; }
  .pm-row .pm-meta { margin-top: 10px; }
  .pm-barline { flex-direction: column; align-items: stretch; gap: 10px;}
  .pm-tot-line { grid-template-columns: 1fr; gap: 8px; }
  .pm-tot-line .pm-barline { align-items: stretch; }
  .pm-tot-line .pm-barmid { width: 100%; }
  .pm-tot-line .pm-pct { width: 100%; }
  .pm-quick .pm-btn { flex: 1; padding: 9px 28px 6px; }
  .pm-out-btn { display: none !important; }
  .pm-out-cover { display: block; }
  .pm-out b { margin-right: 28px; }
  .pm-out > .pm-own { z-index: 2; pointer-events: none; opacity: 1; }

  aside .pm-special-panel { display: none; }
  .pm .pm-mkt-actions { display: flex !important; gap: 8px; margin-top: 14px; }
  .pm .pm-mkt-actions.is-multi { display: none !important; }
  .pm-mkt-actions .pm-btn { flex: 1; padding: 9px 28px 6px; }
  .pm-own { font-size: 14px; font-weight: 700; top: 3px; right: 8px; }
  .pm-layout-trade, .pm-layout-trade > main, .pm-layout-trade .pm-card { width: 100%; min-width: 0; }
  .pm-layout-trade aside .pm-tr { display: none; }
  .pm-layout-trade aside.is-sheet::before { content: ""; position: fixed; inset: 0; background: rgba(20, 24, 30, .5); z-index: 100000; }
  .pm-layout-trade aside.is-sheet .pm-tr { display: block; position: fixed; z-index: 100001; left: 0; right: 0; bottom: 0; margin: 0; max-height: 92vh; max-height: 92dvh; overflow: auto; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .pm-layout-trade aside.is-sheet .pm-tr-handle { display: block; }
  .pm h1.pm-mkt-q { font-size: 1.35em; margin-top: 12px; margin-bottom: 18px !important; text-align: left !important; line-height: 1.1 !important;}

  .pm.pm-modal { align-items: flex-end; padding: 0; }
  .pm-modal-box { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
  .pm-modal .pm-sheet-handle, .pm.is-nick .pm-nb-edit .pm-sheet-handle { display: block; }
  .pm-confirm { max-width: none; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
  .pm-confirm-btns { flex-direction: column; }
  .pm-confirm-btns .pm-btn { width: 100%; }

  .pm-prof-row { display: block; margin: 4px 9px 12px; }
  .pm-prof-head .pm-listhead,
  .pm-prof-head .pm-nb-name #pm-nb-name { font-size: 1.4em; }
  .pm-prof-head .pm-nb-pen { width: 34px; height: 34px; margin-bottom: 0; }
  .pm-prof-head .pm-nb-pen svg { width: 18px; height: 18px; }
  .pm-prof-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
  .pm-prof-stats .pm-nb-col { border: 0; padding: 0; }
  .pm-prof-stats .pm-nb-col.is-rank { text-align: left; }
  .pm-tab-l { display: none !important; }
  .pm-tab-s[hidden] { display: inline !important; }
  .pm-prof-positions .pm-pills button { padding: 4px 10px 1px; }
  .pm-prof-positions [data-ptab-panel="open"] .pm-table th:nth-child(3),
  .pm-prof-positions [data-ptab-panel="open"] .pm-table td:nth-child(3) { display: none; }
  .pm-prof-positions .pm-pos-cell .pm-pos-pill:not(:first-child) { display: none; }
  .pm-prof-positions .pm-pos-cell:has(> .pm-pos-pill ~ .pm-pos-pill) > .pm-pos-pill:first-child { font-size: 0; line-height: 0; background: #eef0f3; border-color: #d3d7de; color: var(--pm-ink); }
  .pm-prof-positions .pm-pos-cell:has(> .pm-pos-pill ~ .pm-pos-pill) > .pm-pos-pill:first-child::after { content: "Useita"; font-size: 15px; font-weight: 700; line-height: 1.3; }
  .pm-pnl-num { font-size: 1.35em; }
  .pm-pnl .pm-pnl-chart { max-height: 150px; }
  .pm-trades-wide { display: none; }
  .pm-tlist[hidden] { display: block !important; }
  .pm-tlist-day { font-size: .72em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 12px 0 4px; }
  .pm-tlist-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--pm-line); text-decoration: none; }
  .pm-tlist-q { grid-column: 1 / -1; color: var(--pm-muted); font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-pager { font-size: 1em; }
  .pm-seg-mini a { padding: 6px 14px 4px; }
  .pm-pg { min-width: 38px; height: 38px; }

  .pm.is-nick .pm-nb-edit { display: flex; flex-direction: column; justify-content: flex-end; position: fixed; z-index: 100001; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; border-radius: 0; background: rgba(20, 24, 30, .5); touch-action: none; }
  .pm.is-nick .pm-nb-sheet { background: #fff; border-radius: 16px 16px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); touch-action: auto; }
  .pm.is-nick .pm-nb-edit .pm-form-row { flex-wrap: wrap; }
  .pm.is-nick .pm-nb-edit .pm-input { width: 100% !important; flex: 1 1 100%; }
  .pm.is-nick .pm-nb-edit .pm-btn { flex: 1; padding: 9px 14px 7px; }
}
