/* Focimenedzser widget – a fortunajatek.hu játékwidgetjeinek stílusában.
   Minden szabály a #fm konténeren belül érvényes, így beágyazva sem ütközik az oldal stílusaival.
   A színek a #fm változóiban, egy helyen állíthatók. */
#fm {
  --frame: #050506;
  --bg: #0f1114;
  --panel: #16181d;
  --panel2: #1d2027;
  --panel3: #252933;
  --line: #2b2f37;
  --line2: #23262d;
  --ink: #f4f4f2;
  --ink2: #cfd2d7;
  --muted: #8e949d;
  --red: #ff3b4e;
  --red2: #e8283b;
  --red-ink: #1c070a;
  --gold: #f6b72a;
  --orange: #f37b2b;
  --green: #36cf78;
  --blue: #5aa7ff;
  --green-bg: rgba(54, 207, 120, .12);
  --red-bg: rgba(255, 59, 78, .12);
  --gold-bg: rgba(246, 183, 42, .12);
  --pitch1: #3f8a3a;
  --f-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-ui: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  box-sizing: border-box;
  max-width: 660px;
  margin: 0 auto;
  background: var(--frame);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.45;
  border-radius: 20px;
  padding: 16px 14px 18px;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  position: relative;
}
#fm[data-theme="light"] {
  --frame: #ffffff;
  --bg: #f3f2ee;
  --panel: #f7f6f3;
  --panel2: #efeee9;
  --panel3: #e5e3dc;
  --line: #d9d6ce;
  --line2: #e6e4dd;
  --ink: #15171a;
  --ink2: #3a3e44;
  --muted: #6d7178;
  --red: #e5283d;
  --red2: #c61c30;
  --red-ink: #ffffff;
  --gold: #c98a00;
  --orange: #d0610f;
  --green: #1c8a4a;
  --blue: #1f5fa8;
  border: 1px solid var(--line);
  box-shadow: 0 6px 30px rgba(0, 0, 0, .08);
}
#fm *, #fm *::before, #fm *::after { box-sizing: border-box; }
#fm button, #fm input, #fm select { font: inherit; color: inherit; margin: 0; }
#fm a { color: inherit; }
#fm h1, #fm h2, #fm h3, #fm p { margin: 0; }
#fm img { max-width: 100%; }

/* ---------- felső sor ---------- */
#fm .top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
#fm .top .sp { flex: 1; }
#fm .pill {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer; line-height: 1.2; white-space: nowrap;
}
#fm .pill:hover { color: var(--ink); border-color: var(--muted); }
#fm .pill.on { color: var(--ink); border-color: var(--ink); }
#fm .chip { display: inline-block; border: 1.5px solid var(--red); color: var(--red); border-radius: 999px; padding: 4px 12px; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- panelek ---------- */
#fm .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px; }
#fm .panel + .panel { margin-top: 12px; }
#fm .panel.tight { padding: 12px 14px; }
#fm .status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
#fm .status .club { font-family: var(--f-head); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; }
#fm .status .meta { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
#fm .status .meta b { color: var(--ink); }
#fm .status .grow { flex: 1; min-width: 150px; }
#fm .tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#fm .tabs::-webkit-scrollbar { display: none; }
#fm .tabs button, #fm .tabs a { text-decoration: none; flex: 0 0 auto; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink2); border-radius: 8px; padding: 6px 11px; font-family: var(--f-head); font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; position: relative; }
#fm .tabs button:hover, #fm .tabs a:hover { border-color: var(--muted); color: var(--ink); }
#fm .tabs button.on, #fm .tabs a.on { background: var(--red); border-color: var(--red); color: var(--red-ink); }
#fm .tabs .bdg { position: absolute; top: -6px; right: -6px; }

#fm .title { font-family: var(--f-head); font-weight: 700; font-size: clamp(30px, 7vw, 44px); line-height: .98; text-transform: uppercase; letter-spacing: .005em; margin: 12px 0 10px; }
#fm .kicker { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
#fm .lead { font-size: 16.5px; font-weight: 500; color: var(--ink); line-height: 1.55; }
#fm .txt { color: var(--ink2); font-size: 15px; line-height: 1.6; }
#fm h2.sec { font-family: var(--f-head); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .03em; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
#fm h2.sec::before { content: ''; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }
#fm h3 { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; font-size: 17px; letter-spacing: .03em; margin-bottom: 6px; }
#fm .mono { font-family: var(--f-mono); }
#fm .muted { color: var(--muted); }
#fm .small { font-size: 13px; }
#fm .xs { font-size: 11.5px; }
#fm .pos { color: var(--green); }
#fm .neg { color: var(--red); }
#fm .gold { color: var(--gold); }
#fm .center { text-align: center; }
#fm .mt { margin-top: 12px; }
#fm .mt2 { margin-top: 18px; }

/* lépések (01 02 03) */
#fm .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 18px 0; }
#fm .steps > div { padding: 12px 13px; background: var(--panel2); }
#fm .steps > div + div { border-left: 1px solid var(--line); }
#fm .steps .n { font-family: var(--f-mono); font-size: 11px; color: var(--red); font-weight: 600; }
#fm .steps b { display: block; font-family: var(--f-head); font-size: 17px; text-transform: uppercase; margin: 4px 0 4px; }
#fm .steps span { font-size: 13px; color: var(--muted); line-height: 1.5; display: block; }
/* számsor */
#fm .nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 16px 0 12px; }
#fm .nums > div { padding: 12px 6px; text-align: center; background: var(--panel2); min-width: 0; }
#fm .nums > div + div { border-left: 1px solid var(--line); }
#fm .nums b { display: block; font-family: var(--f-head); font-size: 26px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fm .nums span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
#fm .nums .c1 { color: var(--ink); } #fm .nums .c2 { color: var(--gold); } #fm .nums .c3 { color: var(--orange); } #fm .nums .c4 { color: var(--green); }
#fm .info { display: flex; gap: 10px; align-items: center; background: var(--panel2); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 11px 14px; font-size: 14px; }
#fm .info.red { border-left-color: var(--red); } #fm .info.green { border-left-color: var(--green); } #fm .info.blue { border-left-color: var(--blue); }
#fm .note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 12px; }

/* statisztika-kártyák */
#fm .grid { display: grid; gap: 10px; }
#fm .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#fm .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#fm .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#fm .stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
#fm .stat .l { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
#fm .stat .v { font-family: var(--f-head); font-weight: 700; font-size: 26px; line-height: 1.15; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fm .stat .s { font-size: 12px; color: var(--muted); }
#fm .box { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
#fm .box.acc { border-left: 3px solid var(--green); }
#fm .box.acc-gold { border-left: 3px solid var(--gold); }
#fm .box.acc-red { border-left: 3px solid var(--red); }

/* gombok */
#fm .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--red); background: var(--red); color: var(--red-ink);
  font-family: var(--f-head); font-weight: 700; font-size: 17px; letter-spacing: .05em; text-transform: uppercase; padding: 9px 18px;
  cursor: pointer; text-decoration: none; line-height: 1.1; border-radius: 9px; user-select: none; white-space: nowrap;
}
#fm .btn:hover { background: var(--red2); border-color: var(--red2); }
#fm .btn.ol { background: transparent; color: var(--ink); border-color: var(--line); }
#fm .btn.ol:hover { border-color: var(--ink); }
#fm .btn.green { background: var(--green); border-color: var(--green); color: #07150d; }
#fm .btn.sm { font-size: 14px; padding: 5px 11px; border-width: 1.5px; border-radius: 7px; }
#fm .btn.xs { font-size: 12.5px; padding: 3px 8px; border-width: 1.5px; border-radius: 6px; }
#fm .btn.big { font-size: 22px; padding: 12px 30px; border-radius: 11px; }
#fm .btn.wide { width: 100%; }
#fm .btn { max-width: 100%; }
#fm .btn[disabled] { opacity: .4; pointer-events: none; }
#fm .btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#fm .btns.c { justify-content: center; }
/* választógombok (színes kerettel) */
#fm .choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
#fm .choice { background: var(--panel); border: 2px solid var(--line); border-radius: 10px; padding: 12px 10px; text-align: center; cursor: pointer; color: var(--ink); }
#fm .choice b { display: block; font-family: var(--f-head); font-size: 19px; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; }
#fm .choice span { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
#fm .choice:hover { background: var(--panel2); }
#fm .choice.c-green { border-color: var(--green); } #fm .choice.c-gold { border-color: var(--gold); } #fm .choice.c-orange { border-color: var(--orange); } #fm .choice.c-red { border-color: var(--red); } #fm .choice.c-blue { border-color: var(--blue); }
#fm .choice.sel { background: var(--panel3); box-shadow: 0 0 0 2px var(--ink) inset; }

#fm .bdg { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; text-align: center; line-height: 16px; }
#fm .tag { display: inline-block; font-family: var(--f-mono); font-size: 10.5px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; }
#fm .tag.red { color: var(--red); border-color: var(--red); }
#fm .tag.green { color: var(--green); border-color: var(--green); }
#fm .tag.gold { color: var(--gold); border-color: var(--gold); }
#fm .pos-b { display: inline-block; width: 34px; text-align: center; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; padding: 1px 0; border-radius: 4px; color: #fff; }
#fm .pos-GK { background: #b8860b; } #fm .pos-DF { background: #2769b0; } #fm .pos-MF { background: #2e8a44; } #fm .pos-FW { background: #d0283d; }
#fm .ovr { display: inline-block; min-width: 28px; text-align: center; font-family: var(--f-head); font-weight: 700; font-size: 17px; }
#fm .flag { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }
#fm .frm { display: inline-flex; gap: 2px; }
#fm .frm i { min-width: 18px; height: 16px; font-style: normal; font-family: var(--f-mono); font-size: 9.5px; font-weight: 600; color: #fff; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; padding: 0 2px; }
#fm .frm .W { background: #22a55b; } #fm .frm .D { background: #6c727b; } #fm .frm .L { background: #d0283d; }

/* táblázat */
#fm .tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
#fm table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#fm table.t th { font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px 7px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel2); }
#fm table.t td { padding: 7px 7px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
#fm table.t tr:last-child td { border-bottom: 0; }
#fm table.t tr.me td { background: var(--gold-bg); font-weight: 600; }
#fm table.t tr.clk { cursor: pointer; }
#fm table.t tr.clk:hover td { background: var(--panel2); }
#fm table.t td.n, #fm table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
#fm table.t td.c, #fm table.t th.c { text-align: center; }
#fm table.t tr.q0 td:first-child { box-shadow: inset 3px 0 0 var(--green); }
#fm table.t tr.q1 td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
#fm table.t tr.q2 td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
#fm table.t th.sort { cursor: pointer; }
#fm table.t th.sort:hover { color: var(--ink); }
#fm .tname { font-weight: 600; }
#fm .clip { max-width: 120px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
#fm .nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }

/* űrlap */
#fm .fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; min-width: 0; }
#fm .fld label, #fm .lbl { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#fm .inp { border: 1.5px solid var(--line); background: var(--panel2); color: var(--ink); padding: 8px 10px; border-radius: 8px; width: 100%; font-size: 15px; }
#fm .inp:focus { outline: 2px solid var(--gold); outline-offset: 0; }
#fm .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#fm .row.sb { justify-content: space-between; }
#fm .row > .fld { flex: 1 1 120px; }
#fm .seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
#fm .seg button { border: 0; background: transparent; padding: 6px 11px; font-family: var(--f-head); font-weight: 700; text-transform: uppercase; font-size: 14.5px; cursor: pointer; letter-spacing: .03em; color: var(--ink2); }
#fm .seg button + button { border-left: 1.5px solid var(--line); }
#fm .seg button.on { background: var(--ink); color: var(--frame); }
#fm .bar { height: 6px; background: var(--panel3); position: relative; overflow: hidden; border-radius: 3px; }
#fm .bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); border-radius: 3px; }
#fm .bar.red > i { background: var(--red); }
#fm .bar.gold > i { background: var(--gold); }

/* hírek */
#fm .news { list-style: none; margin: 0; padding: 0; }
#fm .news li { padding: 8px 10px; font-size: 14px; border-left: 3px solid var(--line); margin-bottom: 6px; background: var(--panel2); border-radius: 0 8px 8px 0; }
#fm .news li.ok { border-left-color: var(--green); }
#fm .news li.bad { border-left-color: var(--red); }
#fm .news li.offer { border-left-color: var(--gold); }
#fm .news li.info { border-left-color: var(--blue); }
#fm .news .d { font-family: var(--f-mono); font-size: 10px; color: var(--muted); display: block; letter-spacing: .08em; }

/* modális ablak */
#fm .ov { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 9990; display: flex; align-items: flex-start; justify-content: center; padding: 24px 10px; overflow-y: auto; }
#fm .modal { background: var(--panel); border: 1px solid var(--line); width: 100%; max-width: 620px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); position: relative; }
#fm .modal-h { padding: 16px 18px 6px; display: flex; align-items: flex-start; gap: 10px; }
#fm .modal-h h3 { font-size: 24px; margin: 0; flex: 1; line-height: 1.05; }
#fm .modal-b { padding: 6px 18px 18px; }
#fm .x { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
#fm .x:hover { color: var(--red); }
#fm .toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--panel3); color: var(--ink); padding: 10px 16px; z-index: 9999; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; max-width: 92vw; font-size: 14px; }

/* taktikai pálya */
#fm .tpitch { position: relative; width: 100%; max-width: 400px; aspect-ratio: 68 / 100; background: repeating-linear-gradient(0deg, #3f8a3a 0 10%, #377f33 10% 20%); border-radius: 10px; margin: 0 auto; overflow: hidden; }
#fm .tpitch::before { content: ''; position: absolute; left: 6%; right: 6%; top: 4%; bottom: 4%; border: 2px solid rgba(255, 255, 255, .7); }
#fm .tpitch::after { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 2px solid rgba(255, 255, 255, .7); }
#fm .tpitch .box2 { position: absolute; left: 28%; right: 28%; bottom: 4%; height: 14%; border: 2px solid rgba(255, 255, 255, .7); border-bottom: 0; }
#fm .tpitch .box2.t { top: 4%; bottom: auto; border-bottom: 2px solid rgba(255, 255, 255, .7); border-top: 0; }
#fm .tdot { position: absolute; transform: translate(-50%, -50%); width: 64px; text-align: center; cursor: pointer; z-index: 2; }
#fm .tdot .c { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto; background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 19%), #d0283d; border: 2px solid #fff; box-shadow: 0 3px 5px rgba(0, 0, 0, .4); color: #fff; font-family: var(--f-head); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
#fm .tdot.gk .c { background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 19%), #c9960c; }
#fm .tdot .nm2 { font-family: var(--f-head); font-weight: 600; font-size: 12.5px; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fm .tdot .sl { font-family: var(--f-mono); font-size: 9px; color: #e8ffe4; }
#fm .tdot.sel .c { outline: 3px solid var(--gold); }
#fm .tdot.bad .c { border-color: #ffb3b3; }
#fm .tdot.warn .nm2 { color: #ffd76a; }
#fm .benchl .it { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); background: var(--panel2); margin-bottom: 4px; cursor: pointer; border-radius: 8px; }
#fm .benchl .it.sel { outline: 2px solid var(--gold); }
#fm .benchl .it:hover { border-color: var(--muted); }
#fm .benchl .it .nmx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* meccs */
#fm .score { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px 12px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; padding: 10px 12px; gap: 8px; }
#fm .score .tn { font-family: var(--f-head); font-weight: 700; font-size: 17px; text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; min-width: 0; }
#fm .score .tn.r { text-align: right; }
#fm .score .sc { font-family: var(--f-head); font-weight: 700; font-size: 38px; line-height: 1; text-align: center; min-width: 86px; }
#fm .score .clk { font-family: var(--f-mono); font-size: 11.5px; text-align: center; color: var(--gold); }
#fm .kit { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; vertical-align: -1px; margin: 0 5px; }
#fm .pitchwrap { display: flex; justify-content: center; background: #2e6f2b; }
#fm canvas.pitch { display: block; touch-action: manipulation; }
#fm .feed { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
#fm .feed div { padding: 6px 10px; border-bottom: 1px solid var(--line2); font-size: 14px; }
#fm .feed div b.m { font-family: var(--f-mono); font-size: 11px; color: var(--muted); display: inline-block; width: 34px; font-weight: 600; }
#fm .feed div.goal { background: var(--gold-bg); font-weight: 600; }
#fm .feed b.ic { display: inline-block; width: 9px; height: 12px; vertical-align: -1px; margin-right: 4px; border-radius: 1px; }
#fm .feed div.card-y b.ic { background: #f3cf00; } #fm .feed div.card-r b.ic { background: #d0021b; }
#fm .mstats { width: 100%; font-size: 13px; border-collapse: collapse; }
#fm .mstats td { padding: 5px 6px; }
#fm .mstats td.v { font-family: var(--f-head); font-weight: 700; font-size: 17px; width: 50px; }
#fm .mstats td.v.r { text-align: right; }
#fm .mstats td.k { text-align: center; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#fm .ctrlbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; padding: 8px; }

/* csapatválasztó */
#fm .tpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#fm .tcard { background: var(--panel2); border: 1.5px solid var(--line); border-left: 5px solid var(--c, var(--line)); border-radius: 10px; padding: 10px 12px; cursor: pointer; min-width: 0; }
#fm .tcard:hover { border-color: var(--gold); border-left-color: var(--c, var(--gold)); }
#fm .tcard .tnm { font-family: var(--f-head); font-weight: 700; font-size: 19px; text-transform: uppercase; line-height: 1.05; }
#fm .stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; }

/* draft-lapok */
#fm .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#fm .pcard { aspect-ratio: 3 / 4; perspective: 700px; cursor: pointer; }
#fm .pcard .in { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); transform-style: preserve-3d; }
#fm .pcard.open .in { transform: rotateY(180deg); }
#fm .pcard .f, #fm .pcard .b { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; text-align: center; }
#fm .pcard .f { background: repeating-linear-gradient(45deg, #1f2229 0 8px, #242831 8px 16px); border: 2px solid var(--gold); }
#fm .pcard .f .q { font-family: var(--f-head); font-size: 40px; color: var(--gold); line-height: 1; }
#fm .pcard .b { transform: rotateY(180deg); background: linear-gradient(160deg, #2b2210, #151208); border: 2px solid var(--gold); color: #fff; }
#fm .pcard .b.silver { background: linear-gradient(160deg, #2a2d34, #15171b); border-color: #c8ccd4; }
#fm .pcard .b .r { font-family: var(--f-head); font-weight: 700; font-size: 44px; line-height: 1; color: var(--gold); }
#fm .pcard .b.silver .r { color: #e3e6ec; }
#fm .pcard .b .pn { font-family: var(--f-head); font-weight: 700; font-size: 15px; text-transform: uppercase; line-height: 1.05; margin-top: 4px; }
#fm .pcard.dim { opacity: .55; }
#fm .pcard.pick .b { box-shadow: 0 0 0 3px var(--green); }
#fm .dlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px; }
#fm .dl { display: flex; gap: 6px; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); font-size: 13px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; min-width: 0; }
#fm .dl.show { opacity: 1; transform: none; }
#fm .dl .nmx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* szerencsekerék */
#fm .wheel { position: relative; width: min(320px, 82vw); aspect-ratio: 1; margin: 6px auto 12px; }
#fm .wheel canvas { width: 100%; height: 100%; display: block; }
#fm .wheel .ptr { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid var(--red); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); z-index: 2; }

#fm .attr { display: grid; grid-template-columns: 86px 1fr 30px; gap: 8px; align-items: center; font-size: 13px; margin: 3px 0; }
#fm .attr .n { text-align: right; font-family: var(--f-head); font-weight: 700; font-size: 15px; }
#fm .chart { width: 100%; height: 170px; display: block; }
#fm .bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
#fm .bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
#fm .tie { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
#fm .tie div { display: flex; justify-content: space-between; padding: 4px 8px; gap: 6px; }
#fm .tie div + div { border-top: 1px solid var(--line2); }
#fm .tie .w { font-weight: 700; }
#fm .tie.me { outline: 2px solid var(--gold); }
#fm .empty { padding: 18px; text-align: center; color: var(--muted); }
#fm .spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: fmsp .8s linear infinite; vertical-align: -3px; }
@keyframes fmsp { to { transform: rotate(360deg); } }
#fm .hide { display: none !important; }
#fm details summary { cursor: pointer; }
@media (max-width: 520px) {
  #fm { padding: 12px 10px 14px; border-radius: 16px; font-size: 14px; }
  #fm .panel { padding: 14px 12px; }
  #fm .steps { grid-template-columns: 1fr; }
  #fm .steps > div + div { border-left: 0; border-top: 1px solid var(--line); }
  #fm .nums b { font-size: 22px; }
  #fm .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fm .g3 { grid-template-columns: 1fr 1fr; }
  #fm .tpick { grid-template-columns: 1fr; }
  #fm .stack-m { grid-template-columns: 1fr; }
  #fm .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fm .hide-m { display: none; }
  #fm .btn.big { font-size: 18px; padding: 10px 18px; white-space: normal; text-align: center; }
  #fm .score .tn { font-size: 14px; }
  #fm .score .sc { font-size: 30px; min-width: 66px; }
  #fm table.t { font-size: 12.5px; }
  #fm table.t td, #fm table.t th { padding: 6px 5px; }
  #fm .stat .v { font-size: 22px; }
}

#fm svg.crest { display: inline-block; vertical-align: middle; flex: 0 0 auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
#fm .tname svg.crest { margin-right: 5px; vertical-align: -4px; }
