/* /aps: glasmeny som txAdmins /tx, till vänster på skärmen. Bara transform/opacity animeras. */
#aps { position: fixed; left: 28px; top: 50%; transform: translateY(-50%); z-index: 9000; width: 430px; max-height: 86vh; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; color: #fff; font-family: 'Inter', 'Poppins', system-ui, sans-serif;
  background: linear-gradient(160deg, rgba(14, 20, 24, .74), rgba(10, 14, 18, .62)); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 46px color-mix(in srgb, var(--fx-a, #38f2a6) 22%, transparent), 0 30px 80px rgba(0, 0, 0, .5); animation: aps-in .22s cubic-bezier(.2, .8, .2, 1); }
#aps.hidden { display: none; }
@keyframes aps-in { from { opacity: 0; transform: translate(-18px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.aps-h { display: flex; align-items: center; gap: 10px; }
.aps-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: linear-gradient(135deg, var(--fx-a, #38f2a6), var(--fx-b, #2dd4bf)); color: var(--fx-ink, #03231a); box-shadow: 0 0 20px color-mix(in srgb, var(--fx-a, #38f2a6) 60%, transparent); flex: none; }
.aps-t { display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; }
.aps-t b { font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.aps-t small { font-size: 11px; opacity: .6; }
.aps-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 13px; background: rgba(255, 255, 255, .08); }
.aps-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 700; cursor: pointer; }
.aps-tabs button.on { background: linear-gradient(135deg, var(--fx-a, #38f2a6), var(--fx-b, #2dd4bf)); color: var(--fx-ink, #03231a); box-shadow: 0 0 16px color-mix(in srgb, var(--fx-a, #38f2a6) 55%, transparent); }
#aps kbd { display: inline-block; min-width: 22px; padding: 2px 7px; margin: 0 3px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .28); border-bottom-width: 2px; background: rgba(255, 255, 255, .1); font: 700 11px/1.3 inherit; text-align: center; }
.aps-list, .aps-plist { display: flex; flex-direction: column; gap: 7px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.aps-row { --c: hsl(var(--hue) 85% 62%); position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 14px; border-radius: 15px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); transition: transform .12s, background .12s, box-shadow .12s; cursor: pointer; }
.aps-row.on { transform: translateX(6px); background: linear-gradient(110deg, color-mix(in srgb, var(--c) 30%, transparent), rgba(255, 255, 255, .07)); border-color: var(--c); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 40%, transparent); }
.aps-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 50%, transparent); flex: none; }
.aps-lb { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aps-st { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.aps-st.on { background: #38f2a6; color: #03231a; box-shadow: 0 0 10px rgba(56, 242, 166, .6); }
.aps-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 5px 8px; border-radius: 10px; background: rgba(0, 0, 0, .25); }
.aps-opt b { min-width: 70px; text-align: center; }
.aps-opt.danger b { color: #ff9aa2; }
.aps-arr { font-size: 11px; opacity: .85; font-style: normal; } .aps-arr.dim { opacity: .2; }
.aps-row.armed { border-color: #ff5d73; background: rgba(255, 93, 115, .22); animation: aps-pulse .7s ease-in-out infinite alternate; }
.aps-row.armed .aps-opt b { color: #fff; }
@keyframes aps-pulse { to { box-shadow: 0 0 26px rgba(255, 93, 115, .6); } }
.aps-dots { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.aps-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .25); } .aps-dots i.on { background: var(--c); box-shadow: 0 0 8px var(--c); } .aps-dots i.act { outline: 1.5px solid #38f2a6; }
.aps-search { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .2); }
.aps-search:focus-within { border-color: var(--fx-a, #38f2a6); box-shadow: 0 0 18px color-mix(in srgb, var(--fx-a, #38f2a6) 35%, transparent); }
.aps-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 14px; }
.aps-n { font-size: 12px; opacity: .6; font-weight: 700; }
.aps-prow { --c: hsl(var(--hue) 85% 62%); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; }
.aps-prow.on { background: linear-gradient(110deg, color-mix(in srgb, var(--c) 26%, transparent), rgba(255, 255, 255, .06)); border-color: var(--c); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 35%, transparent); }
.aps-pid { height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); }
.aps-pn { display: flex; flex-direction: column; min-width: 0; } .aps-pn b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .aps-pn small { opacity: .65; font-size: 11.5px; }
.aps-pg { font-size: 12px; font-weight: 700; } .aps-pg.ok { color: #38f2a6; } .aps-pg.warn { color: #ffd24a; } .aps-pg.bad { color: #ff7a8a; }
.aps-pa { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.aps-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.aps-chip.on { background: linear-gradient(135deg, var(--fx-a, #38f2a6), var(--fx-b, #2dd4bf)); color: var(--fx-ink, #03231a); border-color: transparent; box-shadow: 0 0 14px color-mix(in srgb, var(--fx-a, #38f2a6) 50%, transparent); }
.aps-chip.armed { background: #ff5d73; color: #fff; }
.aps-empty { padding: 22px; text-align: center; opacity: .6; }
.aps-msg { min-height: 0; max-height: 0; overflow: hidden; opacity: 0; font-size: 13px; padding: 0 12px; border-radius: 10px; background: rgba(56, 242, 166, .16); transition: opacity .2s, max-height .2s, padding .2s; }
.aps-msg.on { max-height: 60px; opacity: 1; padding: 8px 12px; }
.aps-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; opacity: .75; padding-top: 2px; }
@media (prefers-reduced-motion: reduce) { #aps, .aps-row.armed { animation: none; } .aps-row { transition: none; } }
.aps-list, .aps-plist { overflow-x: hidden; }

/* ── /aps som txAdmin: tooltip under menyn, spelarsidan som brett kortrutnät, spelarruta med Åtgärder/Info ── */
.aps-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.aps-tip { padding: 10px 14px; border-radius: 13px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.9); }
#aps.wide { left: 28px; right: 28px; top: 28px; width: auto; max-height: calc(100vh - 56px); transform: none; animation: none; }
.aps-pl { display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; }
.aps-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px 6px 0; }
.aps-pt { display: block; font-size: 22px; color: var(--fx-a, #38f2a6); }
.aps-ph small { opacity: .65; font-size: 12.5px; }
.aps-ph .aps-search { width: min(340px, 40vw); }
.aps-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; overflow-y: auto; padding: 4px; scrollbar-width: thin; }
.aps-pc { --c: hsl(var(--hue) 85% 62%); display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 15px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.aps-pc.on { transform: translateY(-2px); background: linear-gradient(120deg, color-mix(in srgb, var(--c) 28%, transparent), rgba(255,255,255,.08)); border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 40%, transparent); }
.aps-modal { position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center; background: rgba(6,16,22,.6); border-radius: 22px; }
.aps-md { width: min(760px, 92%); border-radius: 20px; background: linear-gradient(160deg, rgba(24,44,56,.94), rgba(14,32,40,.94)); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 0 50px color-mix(in srgb, var(--fx-a, #38f2a6) 22%, transparent), 0 30px 80px rgba(0,0,0,.5); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.aps-mh { display: flex; align-items: center; justify-content: space-between; font-size: 17px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.14); }
.aps-x { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; }
.aps-mbody { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 16px; min-height: 230px; }
.aps-mside { display: flex; flex-direction: column; gap: 6px; padding-right: 14px; border-right: 1px solid rgba(255,255,255,.14); }
.aps-mside button { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #fff; font-size: 14px; cursor: pointer; text-align: left; }
.aps-mside button.on { background: linear-gradient(135deg, var(--fx-a, #38f2a6), var(--fx-b, #2dd4bf)); color: var(--fx-ink, #03231a); font-weight: 700; }
.aps-ma h4 { margin: 0 0 8px; font-size: 16px; }
.aps-mg { margin-bottom: 14px; }
.aps-ml { display: block; font-size: 12.5px; opacity: .7; margin-bottom: 6px; }
.aps-mb { display: flex; flex-wrap: wrap; gap: 8px; }
.aps-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--fx-a, #38f2a6) 55%, transparent); background: rgba(255,255,255,.07); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.aps-btn.on { background: linear-gradient(135deg, var(--fx-a, #38f2a6), var(--fx-b, #2dd4bf)); color: var(--fx-ink, #03231a); border-color: transparent; box-shadow: 0 0 16px color-mix(in srgb, var(--fx-a, #38f2a6) 55%, transparent); }
.aps-btn.armed { background: #ff5d73; color: #fff; }
.aps-kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; } .aps-kv span { opacity: .65; }
.aps-mf { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; opacity: .75; }
#aps.wide { height: calc(100vh - 56px); }
.aps-pgrid { flex: 1; align-content: start; }
.aps-modal { position: absolute; }

#aps.wide { background: linear-gradient(160deg, rgba(22,52,62,.72), rgba(16,38,50,.6)); }
.aps-ann { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 15px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,200,70,.4); }
.aps-ann textarea { width: 100%; box-sizing: border-box; resize: none; border-radius: 12px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.28); color: #fff; padding: 10px 12px; font: inherit; font-size: 14px; outline: 0; }
.aps-ann textarea:focus { border-color: var(--fx-a, #38f2a6); box-shadow: 0 0 16px color-mix(in srgb, var(--fx-a, #38f2a6) 35%, transparent); }
.aps-annb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
