/* Shared by the Monster Battle lobby, collection and teacher pages */
.ty { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #111; border: 1px solid #0003; }
.ty.type-Normal { background: #c8c8b8; } .ty.type-Fire { background: #ff9c54; } .ty.type-Water { background: #6aa8ff; } .ty.type-Electric { background: #ffd83a; } .ty.type-Grass { background: #86d86a; } .ty.type-Ice { background: #a0e4e4; } .ty.type-Fighting { background: #e0584c; color: #fff; } .ty.type-Poison { background: #b060c8; color: #fff; } .ty.type-Ground { background: #e0c068; } .ty.type-Flying { background: #b0a4f8; } .ty.type-Psychic { background: #ff78a8; } .ty.type-Bug { background: #b4d02c; } .ty.type-Rock { background: #c8b45c; } .ty.type-Ghost { background: #8c78b8; color: #fff; } .ty.type-Dragon { background: #8c5cf8; color: #fff; } .ty.type-Dark { background: #8c7468; color: #fff; } .ty.type-Steel { background: #c0c0d4; } .ty.type-Fairy { background: #f4a8c8; }
.page { height: 100%; display: flex; flex-direction: column; }
.page header { flex: none; display: flex; align-items: center; gap: 18px; padding: 8px 18px; background: #0b0b12; border-bottom: 1px solid #262634; }
.page header h1 { font-size: 24px; color: #ffb347; }
.page header .sp { flex: 1; }
.pts { font-size: 24px; font-weight: 800; color: #ffd23a; }
.rec { color: #9aa3bd; }
.tabs { display: flex; gap: 6px; }
.tabs button, .btn { background: #262634; color: #fff; padding: 8px 16px; font-weight: 700; border: 0; cursor: pointer; border-radius: 8px; }
.tabs button.on, .btn.go { background: #4f8cff; }
.btn.on { background: #4f8cff; }
.btn.warn { background: #b34a4a; }
.btn:disabled { opacity: .4; cursor: default; }
.body { flex: 1; min-height: 0; overflow: auto; padding: 12px 18px 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.card { background: #12151f; border: 1px solid #262b3d; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.card.sel { border-color: #4f8cff; box-shadow: 0 0 0 2px #4f8cff55; }
.card.owned { opacity: .55; }
.card h3 { font-size: 18px; }
.card img.sp { width: 80px; height: 80px; image-rendering: pixelated; align-self: center; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec { margin: 14px 0 6px; font-size: 15px; color: #9aa3bd; text-transform: uppercase; letter-spacing: .06em; }
.stat { display: grid; grid-template-columns: 34px 1fr 34px; gap: 6px; align-items: center; font-size: 13px; }
.stat i { display: block; height: 7px; background: #4f8cff; border-radius: 4px; }
.mini { font-size: 13px; color: #9aa3bd; }
.msg { min-height: 1.4em; color: #ffb347; padding: 4px 18px; }
input, select { background: #fff; color: #111; padding: 8px; border: 1px solid #888; border-radius: 8px; font: inherit; }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.slot { background: #12151f; border: 2px dashed #262b3d; border-radius: 10px; min-height: 130px; padding: 6px; text-align: center; }
.slot.full { border-style: solid; border-color: #4f8cff; }
.two { display: grid; grid-template-columns: 260px 1fr; gap: 14px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.list .card { cursor: pointer; flex-direction: row; align-items: center; }
.list img.sp { width: 44px; height: 44px; }
.moveopt { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; padding: 3px 0; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } .slots { grid-template-columns: repeat(3, 1fr); } }

/* the move picker window */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.mbox { background: #12151f; border: 1px solid #262b3d; border-radius: 12px; padding: 12px; width: min(980px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.mlist { overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.mhead, .mrow { display: grid; grid-template-columns: 170px 82px 70px 52px 62px 40px 1fr; gap: 8px; align-items: center; text-align: left; }
.mhead { font-size: 12px; color: #9aa3bd; text-transform: uppercase; padding: 0 8px; }
.mrow { background: #1a1e2c; color: #fff; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; cursor: pointer; font: inherit; font-size: 15px; }
.mrow:hover, .mrow:focus { border-color: #4f8cff; outline: none; }
.mrow.cur { border-color: #3ddc84; }
.mrow:disabled { opacity: .4; cursor: default; }
.mrow .mdesc { font-size: 13px; color: #9aa3bd; }
.mrow .mcat { font-size: 13px; }
.mnum { text-align: right; }
.slotbtn { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; }
.moveopt { display: block; }
@media (max-width: 760px) {
  .mhead { display: none; }
  .mrow { grid-template-columns: 1fr auto 44px 54px 30px; }
  .mrow .mdesc { grid-column: 1 / -1; }
  .mrow .mcat { display: none; }
  .modal { padding: 0; } .mbox { border-radius: 0; height: 100vh; height: 100dvh; max-height: none; }
}

/* stats, the way Champions shows them */
.slots.wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.slots.wide .slot { text-align: left; display: flex; flex-direction: column; gap: 6px; }
.sblock { display: flex; flex-direction: column; gap: 3px; }
.srow { display: grid; grid-template-columns: 78px 1fr 40px 34px; gap: 6px; align-items: center; font-size: 14px; }
.sblock:has(.btn) .srow { grid-template-columns: 78px minmax(60px, 1fr) 40px 34px auto auto auto; }
.sname { color: #c8cfe4; } .sname .up { color: #3ddc84; margin-left: 4px; } .sname .down { color: #ff6b6b; margin-left: 4px; }
.sbar { height: 10px; background: #1d2233; border-radius: 5px; overflow: hidden; } .sbar i { display: block; height: 100%; background: #4f8cff; }
.sbar i.plus { background: #3ddc84; } .sbar i.minus { background: #ff6b6b; }
.snum { text-align: right; font-size: 16px; } .sdiff { font-size: 12px; } .sdiff.up { color: #3ddc84; } .sdiff.down { color: #ff6b6b; }
.sdots { font-size: 12px; color: #ffd23a; letter-spacing: 1px; text-align: center; }
.stotal { border-top: 1px solid #262b3d; padding-top: 3px; color: #9aa3bd; }
.srow .btn { padding: 2px 10px; }
.mlines { display: flex; flex-direction: column; gap: 3px; } .mline { display: flex; gap: 6px; align-items: center; } .mline .mn { flex: 1; font-size: 14px; }
.savebar { position: sticky; bottom: 0; background: #0b0e17; padding: 8px 0; margin-top: 10px; border-top: 1px solid #262b3d; gap: 12px; }

/* tooltips */
.tipbox { position: fixed; z-index: 900; max-width: min(340px, calc(100vw - 16px)); background: #0b0b12; color: #fff; border: 1px solid #4f8cff; border-radius: 10px; padding: 8px 10px; box-shadow: 0 8px 30px #000a; font-size: 14px; line-height: 1.35; pointer-events: none; display: flex; flex-direction: column; gap: 4px; }
.tipbox[hidden] { display: none; }
.tipbox .ttitle { font-size: 16px; } .tipbox .tdesc { color: #c8cfe4; } .tipbox .tline { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.ty[tabindex]:focus-visible, .why:focus-visible, .tile:focus-visible, [role=button]:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.why { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #262634; color: #9ab6ff; cursor: help; font-size: 15px; flex: none; }
.moveopt.row { flex-wrap: nowrap; } .moveopt .slotbtn { flex: 1; min-width: 0; }
/* the collection: tiles on the left, the chosen Pokémon on the right */
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; background: #12151f; border: 2px solid #262b3d; border-radius: 10px; padding: 6px 4px; cursor: pointer; text-align: center; font-size: 13px; }
.tile:hover { border-color: #4f8cff77; } .tile.sel { border-color: #4f8cff; background: #16203a; }
.tile img.sp { width: 56px; height: 56px; image-rendering: pixelated; }
.tile .ty { font-size: 11px; padding: 0 6px; }
.badge { position: absolute; top: 3px; right: 5px; background: #3ddc84; color: #062; border-radius: 9px; padding: 0 6px; font-weight: 800; font-size: 12px; }
@media (max-width: 760px) {
    .tile img.sp { width: 44px; height: 44px; } .tile { font-size: 12px; }
}
}
.moveopt.row { display: flex; align-items: center; gap: 6px; }

/* the Team page: the team on the left, the whole collection on the right */
.body.teambody { padding: 0; overflow: hidden; display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.msg:empty { display: none; }
.leftcol { border-right: 3px solid #3a4a78; padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; min-height: 0; background: #0d1019; }
.pbar { display: flex; flex-direction: column; gap: 6px; } .pbar .btn { padding: 6px 10px; font-size: 14px; }
.trows { display: grid; grid-template-rows: repeat(6, minmax(46px, 64px)); gap: 6px; min-height: 0; }
.trow { display: flex; align-items: center; gap: 8px; background: #12151f; border: 2px dashed #262b3d; border-radius: 10px; padding: 2px 8px; min-height: 0; overflow: hidden; }
.trow.full { border-style: solid; cursor: pointer; } .trow.sel { border-color: #4f8cff; background: #16203a; }
.trow img.sp { width: 44px; height: 44px; flex: none; image-rendering: pixelated; }
.tname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; } .tname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tname .ty { font-size: 10px; padding: 0 6px; }
.tbtn { display: flex; flex-direction: column; gap: 2px; } .mini2 { background: #262634; color: #fff; border: 0; border-radius: 5px; font-size: 11px; padding: 0 6px; cursor: pointer; } .mini2.x { color: #ff9a9a; } .mini2:disabled { opacity: .3; cursor: default; }
.rightbox { position: relative; min-width: 0; min-height: 0; }
.rightcol { height: 100%; overflow: auto; padding: 10px 12px; display: flex; gap: 12px; align-items: flex-start; }
.cgrid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.dcard { flex: none; width: 320px; position: sticky; top: 0; background: #12151f; border: 1px solid #262b3d; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 100%; overflow: auto; }
.overlay { position: absolute; inset: 0; background: rgba(8, 10, 18, .98); overflow: auto; padding: 14px 18px 24px; z-index: 50; }
.bpanel { max-width: 760px; margin: 0 auto; }
@media (max-width: 900px) {
  .body.teambody { grid-template-columns: 230px minmax(0, 1fr); }
  .rightcol { flex-direction: column; align-items: stretch; } .dcard { width: auto; position: static; order: -1; }
}
@media (max-height: 760px) { .page header { padding-top: 4px; padding-bottom: 4px; } .trows { grid-template-rows: repeat(6, minmax(44px, 56px)); } .trow img.sp { width: 38px; height: 38px; } }

.xpl { border-bottom: 1px dotted #9aa3bd; cursor: help; }
.orow { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: center; text-align: left; background: #1a1e2c; color: #fff; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.orow:hover, .orow:focus { border-color: #4f8cff; outline: none; } .orow.cur { border-color: #3ddc84; }
.orow .mdesc { font-size: 14px; color: #c8cfe4; }
@media (max-width: 760px) { .orow { grid-template-columns: 1fr; gap: 2px; } }

.comp.rank-Sp { background: #ff4d5e; color: #fff; } .comp.rank-S { background: #ffd23a; color: #3a2400; } .comp.rank-A { background: #ff9c54; color: #2a1200; } .comp.rank-B { background: #86d86a; color: #0f2a08; } .comp.rank-C { background: #6aa8ff; color: #06204a; } .comp.rank-D { background: #8c5cf8; color: #fff; }
.comp { min-width: 2.2em; text-align: center; font-size: 15px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: #1d2756; color: #c8cff0; letter-spacing: .04em; }

/* Making your own account (lib/mbGuest.js): the plain version, for the pages
   that are not the big sign-in splash. index.html restyles it to match there. */
.nabox { display: grid; gap: 10px; margin-top: 10px; }
.btn.nanew { margin-top: 10px; background: #262634; }
