/* header */
a img {
    border: 0;
}
.header {
    margin: 0 0 30px 0;

    background: #E5ECFB;
    background: -webkit-gradient(linear, left top, left bottom, from(#E8EEFC), to(#D7DEEA));
    background: -moz-linear-gradient(top,  #E8EEFC,  #D7DEEA);
    background: linear-gradient(top,  #E8EEFC,  #D7DEEA);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#E8EEFC', endColorstr='#D7DEEA');

    border-bottom: 1px solid #AAA;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .6), 0px 2px 2px rgba(0, 0, 0, .15);
}
.header-color {
    margin: 0 auto;
}
.header-inner {
    max-width: 565px;
    margin: 0 auto;
}
.nav, .nav li, .nav-play, .nav-play li {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
    float: left;
}
.nav {
    padding: 15px 6px 15px 6px;
}
.header .nav {
    padding: 15px 0 15px 155px;
}
.header .nav-play {
    padding: 15px 0 15px 10px;
}
.nav .button {
    position: relative;
    padding: 5px 10px;
    margin: 0 -1px 0 0;
    border-radius: 0;
}
.nav .button img {
    position: absolute;
    top: -8px;
    left: -150px;
}
.nav .button.cur,
.nav .button.cur:hover {
    color: #777777;
    background: #f8f8f8;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.nav .button.cur:hover {
    border: solid 1px #888888;
}
.nav .button:hover {
    z-index: 10;
}
.nav .button.nav-first {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
.nav .button.nav-last {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}
.button {
    outline: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255,255,255,.4);
    border-radius: 5px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);
    box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);
    white-space: nowrap;

    /* default colors */
    color: #222222;
    border: solid 1px #AAAAAA;
    background: #e3e3e3;
    background: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
    background: -moz-linear-gradient(top,  #f6f6f6,  #e3e3e3);
    background: linear-gradient(top,  #f6f6f6,  #e3e3e3);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3');
}
.button:hover {
    background: #cfcfcf;
    background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#cfcfcf));
    background: -moz-linear-gradient(top,  #f2f2f2,  #cfcfcf);
    background: linear-gradient(top,  #f2f2f2,  #cfcfcf);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='#cfcfcf');
    border-color: #606060;
}
.button:active {
    background: -webkit-gradient(linear, left top, left bottom, from(#cfcfcf), to(#f2f2f2));
    background: -moz-linear-gradient(top,  #cfcfcf,  #f2f2f2);
    background: linear-gradient(top,  #cfcfcf,  #f2f2f2);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf', endColorstr='#f2f2f2');
}

.greenbutton {
    background: hsl(100,30%,93%);
    background: -webkit-gradient(linear, left top, left bottom, from(hsl(100,30%,97%)), to(hsl(100,30%,84%)));
    background: -moz-linear-gradient(top,  hsl(100,30%,97%),  hsl(100,30%,84%));
    background: linear-gradient(top,  hsl(100,30%,97%),  hsl(100,30%,84%));
    border-color: hsl(100,30%,70%);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3');
}
.greenbutton:hover {
    background: hsl(100,30%,87%);
    background: -webkit-gradient(linear, left top, left bottom, from(hsl(100,30%,94%)), to(hsl(100,30%,77%)));
    background: -moz-linear-gradient(top,  hsl(100,30%,94%),  hsl(100,30%,77%));
    background: linear-gradient(top,  hsl(100,30%,94%),  hsl(100,30%,77%));
    border-color: hsl(100,30%,41%);
}
.greenbutton:active {
    background: hsl(100,30%,77%);
    background: -webkit-gradient(linear, left top, left bottom, from(hsl(100,30%,77%)), to(hsl(100,30%,83%)));
    background: -moz-linear-gradient(top,  hsl(100,30%,77%),  hsl(100,30%,83%));
    background: linear-gradient(top,  hsl(100,30%,77%),  hsl(100,30%,83%));
    border-color: hsl(100,30%,41%);
}

/* general page styling */
html, body {
    font: 10pt Verdana, sans-serif;
    background-color: white;
    color: black;
    margin: 0;
    padding: 0;
    min-width: 100em;
}

.trainer-poks-label {
    margin:  10px 0px;
}

.trainer-pok-list {
    display: flex;
    flex-wrap: wrap;
}

.trainer-pok-list {
    display: flex;
    flex-wrap: wrap;
}

.trainer-pok{
    height:  100%;
    width:  auto;
    margin-right:  10px;
    cursor: pointer;
    box-sizing: border-box;
}

.trainer-pok:hover {
    outline: 2px solid;
    outline-color: #1abc9c;
}

.wrapper {
    padding: 0 1em;
    max-width: 1285px;
    margin: 0 auto;
}
.credits {
    clear: both;
    padding: 20px;
    max-width: 1285px;
    margin: 0px auto;
}
div.wrapper > div > span {
    padding-right: 5px;
}
fieldset {
    float: left;
    background-color: #F1F4F9;
    border: 1px solid #AAAAAA !important;
}
legend {
    font-weight: bold;
    text-align: center;
}
th, td {
    padding: 0;
}
th {
    font-size: 0.8em;
}
.title-text {
    font-weight: bold;
    font-size: 1.5em;
    margin: 0.5em 1em 0.5em 0;
    position: relative;
    top: -5px;
}
.big-text {
    text-align: left;
    font-weight: bold;
    font-size: 1.1em;
    margin: 0.5em 0;
}
.big-text #mainResult:hover {  /* indicates the presence of click-to-copy function */
    cursor: pointer;
    opacity: 0.7;
}
.small-text #damageValues:hover {  /* indicates the presence of click-to-copy function */
    cursor: pointer;
    opacity: 0.7;
}
.tooltipText {
    font-size: 0.8em;
    visibility: hidden;
    border-radius: 5px;
    width: 120px;
    background-color: black;
    color: white;
    text-align: center;
    padding: 5px;
    margin-left: 10px;
}
.small-text {
    font-size: 0.8em;
}
.panel {
    float: left;
    display: inline-block; /* required for honkaculate to work */
}
.poke-info {
    width: 30em;
}
.field-info, .poke-import {
    text-align: center;
    width: 27.5em;
}
.holder-0 {
    position: absolute;
    top: 151px;
}
#holder-2 tr {
    white-space: nowrap;
}

/* general button styling */
.btn {
    text-align: center;
    border: solid 1px #aaaaaa;
    padding: 4px 4px;
    position: relative;
    cursor: pointer;
    color: #555555;
    background: #e9e9e9;
    margin: -1px -3px 0;
    display: inline-block;
    width: 5em;
    border-radius: 8px;
}
.btn-wide {
    width: 7em;
}
.btn-xwide {
    width: 8em;
}
.btn-xxwide {
    width: 9em;
}
.btn-xxxwide {
    width: 10em;
}
.btn-small {
    width: 4em;
}
.btn-xsmall {
    width: 1em;
}
.btn-left {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.btn-right {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.btn-top {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.btn-bottom {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.btn-mid {
    border-radius: 0;
}
.btn-tspikes {
    width: 8.5em;
}

button svg {
 display: block;
 margin: auto;
 position: absolute;
}

.bi-plus {
    bottom: -0.15em;
    right: 6px;
}

.bi-x {
    bottom: 0.3em;
    right: 5px;
}

.btn-range-add {
    height: 1em;
    width: 2.25em;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--background);
    border: 1px solid #aaaaaa;
    cursor: pointer;
    position: relative;
}

.btn-range-compare-body {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--background);
    border: 1px solid #aaaaaa;
    cursor: pointer;
    position: relative;
}

.btn-range-add:active {
    background-color:  var(--button-selected);
}

.btn-range-add.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-range-compare-body:active {
    background-color:  var(--button-selected);
}

.visually-hidden:focus + .btn, /* Add visual indication when focusing on visually hidden elements */
.btn:hover {
    z-index: 10;
    border-color: #777777;
    background: #e3e3e3;
}
.visually-hidden:checked + .btn {
    font-weight: bold;
    color: #111111;
    background: #f5f5f5;
}
.visually-hidden[type="radio"]:checked + .btn {
    cursor: default;
}

.numbersOnly {
    width: 70px;
}

/* Chrome, Safari, Edge, Opera */
#rc-maxHP::-webkit-outer-spin-button,
#rc-maxHP::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
#rc-maxHP[type=number] {
  -moz-appearance: textfield;
}

#range-compare-top-fields {
    display: flex;
}

#range-target-fields {
    justify-content: flex-start;
}

#range-moves {
    display: flex;
    justify-content: flex-end;
}

#range-compare-moves {
    display: flex;
}

.range-move {
    width: auto;
    text-align: center;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    margin: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #3c3c3c;
    transition: all 0.2s ease;
    position: relative;
}

.range-move:hover {
    border-color: #bbb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.range-move-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.range-move-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4px 0;
}

.range-move-name {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 2px;
}

.range-move-damage {
    font-size: 11px;
}

.range-move-crit {
    font-size: 11px;
    color: #d32f2f;
}

.range-move-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.range-copy-move {
    cursor: pointer;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.range-copy-move:hover {
    background: #218838;
}

/* ── Encounter Tracker ──────────────────────────────────────────────────── */

.app-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #555;
    padding-bottom: 6px;
}

.app-tab {
    padding: 6px 16px;
    border-radius: 5px 5px 0 0;
    text-decoration: none;
    color: inherit;
    background: #2a2a2a;
    border: 1px solid #555;
    border-bottom: none;
    font-size: 13px;
    transition: background 0.15s;
}

.app-tab:hover {
    background: #3a3a3a;
    text-decoration: none;
    color: inherit;
}

.app-tab.active {
    background: #1b6ec2;
    color: #fff;
    font-weight: bold;
    border-color: #1b6ec2;
}

.tracker-container {
    padding: 8px 0 16px;
    max-width: 900px;
}

.tracker-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tracker-route-select {
    flex: 1;
    min-width: 180px;
    max-width: 340px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #666;
    font-size: 14px;
}

.tracker-catch-counter {
    margin-left: auto;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.tracker-route-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tracker-route-name {
    font-size: 17px;
    font-weight: bold;
    color: #222;
}

.tracker-selected-display {
    font-size: 13px;
}

.tracker-selected-display.has-selection {
    color: #6dbf67;
}

.tracker-selected-display.no-selection {
    color: #888;
    font-style: italic;
}

.tracker-selected-name {
    color: #6dbf67;
}

/* ── Encounter content area: scrollable when tall ── */
#encounter-content {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

/* ── Category sections rendered as pill grid ── */
.encounter-category-section {
    margin-bottom: 10px;
}

.encounter-category-header {
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 5px;
}

/* Grid of encounter pills */
.encounter-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
}

.encounter-pill {
    flex: 1 1 auto;
    min-width: 130px;
    max-width: 220px;
    justify-content: space-between;
}

.encounter-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px 3px 8px;
    border-radius: 20px;
    border: 1px solid #bbb;
    background: rgba(255,255,255,0.55);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
    color: #333;
    box-sizing: border-box;
}

.encounter-pill:hover {
    background: rgba(255,255,255,0.85);
    border-color: #888;
}

.encounter-pill-selected {
    background: rgba(109, 191, 103, 0.25) !important;
    border-color: #4a9e45 !important;
    color: #1a4a18;
}

.enc-pill-meta {
    font-size: 11px;
    color: #777;
    min-width: 0;
}

.encounter-pill-selected .enc-pill-meta {
    color: #3a7a38;
}

.enc-pill-name {
    font-weight: 600;
    color: #111;
}

.encounter-pill-selected .enc-pill-name {
    color: #1a4a18;
}

/* Previously-caught pill (pokemon already caught in an earlier route) */
.encounter-pill-prev-caught {
    opacity: 0.45;
    cursor: not-allowed !important;
    background: rgba(180,180,180,0.15) !important;
    border-color: #bbb !important;
    pointer-events: none;
}

.encounter-pill-prev-caught:hover {
    background: rgba(180,180,180,0.15) !important;
    border-color: #bbb !important;
}

.enc-pill-caught-label {
    color: #999;
    font-style: italic;
}

.enc-pill-name-caught {
    color: #aaa;
    text-decoration: line-through;
}

.prev-caught-btn {
    color: #bbb !important;
    border-color: #ddd !important;
    cursor: not-allowed !important;
    background: none !important;
}


.encounter-select-btn {
    background: none;
    border: 1px solid #aaa;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 11px;
    color: #888;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    padding: 0;
    flex-shrink: 0;
}

.encounter-select-btn:hover {
    border-color: #6dbf67;
    color: #6dbf67;
}

.encounter-select-btn.selected {
    background: #6dbf67;
    border-color: #6dbf67;
    color: #fff;
    font-size: 11px;
}

.tracker-empty {
    color: #777;
    font-style: italic;
    padding: 8px 0;
    font-size: 13px;
}

.tracker-progress-section {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

.tracker-progress-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.route-progress-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.route-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
    flex-shrink: 0;
}

.route-progress-dot:hover {
    transform: scale(1.4);
    opacity: 0.9;
}

.route-progress-dot.caught {
    background: #6dbf67;
}

.route-progress-dot.empty {
    background: #ccc;
    border: 1px solid #aaa;
}

.route-progress-dot.current {
    outline: 2px solid #555;
    outline-offset: 1px;
}

.tracker-toggle-btn {
    display: block;
    width: 100%;
    padding: 8px 14px;
    margin-bottom: 0;
    background: #F1F4F9;
    border: 1px solid #AAAAAA;
    border-radius: 5px 5px 0 0;
    color: #333;
    font-size: 13px;
    font-family: inherit;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.tracker-toggle-btn:hover {
    background: #e4e9f4;
}

/* When tracker is closed, restore full rounded corners */
#tracker-panel[style*="display:none"] ~ .tracker-toggle-btn,
#tracker-panel-wrapper:not(:has(#tracker-panel[style=""])) .tracker-toggle-btn {
    border-radius: 5px;
}

#tracker-panel-wrapper {
    margin-bottom: 12px;
}

.tracker-reset-btn {
    color: #d9534f;
    border-color: #c9a0a0;
}

.tracker-reset-btn:hover {
    background: rgba(217,83,79,0.1);
    border-color: #d9534f;
}

.tracker-import-label {
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    line-height: normal;
    vertical-align: middle;
}

.pokeball-icon {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.enc-pill-sprite {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    flex-shrink: 0;
    margin: -4px 0;
}

#tracker-panel {
    background: #F1F4F9;
    border: 1px solid #AAAAAA;
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 10px 14px 8px;
    color: #222;
}

/* ── Two-column Tracker Layout ───────────────────────────────────────────── */

.tracker-columns {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tracker-column {
    flex: 1;
    min-width: 0;
}

.tracker-column-encounters {
    flex: 1;
}

.tracker-column-trainers {
    flex: 1;
}

/* ── Trainer Panel ──────────────────────────────────────────────────────── */

.trainer-panel {
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f7f8fa;
    overflow: hidden;
}

.trainer-panel-header {
    background: #566573;
    color: #fff;
    padding: 7px 12px;
    font-weight: bold;
    font-size: 14px;
}

.trainer-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
}

.trainer-split-select {
    flex: 1;
    min-width: 120px;
    max-width: 300px;
    font-size: 13px;
    padding: 3px 4px;
}

.trainer-defeat-counter {
    font-size: 11px;
    font-weight: normal;
    color: #666;
    white-space: nowrap;
}

#trainer-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px 10px;
}

/* Route group within trainer panel */
.trainer-route-group {
    margin-bottom: 12px;
}

.trainer-route-group:last-child {
    margin-bottom: 0;
}

.trainer-route-label {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    padding: 4px 8px;
    background: #e8ecf0;
    border-radius: 3px;
    margin-bottom: 6px;
}

/* ── Trainer Cards ──────────────────────────────────────────────────────── */

.trainer-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 8px;
    background: #fff;
    overflow: hidden;
}

.trainer-card:last-child {
    margin-bottom: 0;
}

.trainer-card.boss {
    border-color: #c0392b;
    border-width: 2px;
}

.trainer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #eef1f5;
    cursor: pointer;
    user-select: none;
}

.trainer-card.boss .trainer-card-header {
    background: #fadbd8;
}

.trainer-card-header:hover {
    background: #dde3ea;
}

.trainer-card.boss .trainer-card-header:hover {
    background: #f1b0a8;
}

.trainer-name {
    font-weight: bold;
    font-size: 13px;
}

.trainer-tag {
    display: inline-block;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: normal;
    vertical-align: middle;
}

.trainer-tag-boss {
    background: #c0392b;
    color: #fff;
}

.trainer-tag-optional {
    background: #7f8c8d;
    color: #fff;
}

.trainer-tag-double {
    background: #2980b9;
    color: #fff;
}

.trainer-defeat-btn {
    font-size: 11px;
    padding: 2px 10px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.trainer-defeat-btn:hover {
    background: #eee;
}

.trainer-defeat-btn.defeated {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
}

.trainer-btn-group {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.trainer-setup-btn {
    font-size: 11px;
    padding: 2px 10px;
    border: 1px solid #3498db;
    border-radius: 3px;
    background: #fff;
    color: #3498db;
    cursor: pointer;
    white-space: nowrap;
}

.trainer-setup-btn:hover {
    background: #3498db;
    color: #fff;
}

.trainer-card.trainer-defeated {
    opacity: 0.55;
}

.trainer-card.trainer-defeated .trainer-name {
    text-decoration: line-through;
}

.trainer-pokemon-list {
    padding: 6px 10px 8px;
}

.trainer-pokemon-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    flex-wrap: wrap;
}

.trainer-pokemon-row:last-child {
    border-bottom: none;
}

.trainer-pok-sprite {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.trainer-pok-info {
    flex: 1;
    min-width: 0;
}

.trainer-pok-name {
    font-weight: bold;
}

.trainer-pok-level {
    color: #666;
    margin-left: 4px;
}

.trainer-pok-detail {
    color: #555;
    font-size: 11px;
}

.trainer-pok-moves {
    color: #444;
    font-size: 11px;
    margin-top: 1px;
}

/* ── Right-panel tabs (Trainer Battles / Items) ─────────────────────────── */

.right-panel-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 0;
}

.right-panel-tab {
    flex: 1;
    padding: 6px 8px;
    background: #e8ecf2;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    font-size: 13px;
    font-family: inherit;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.right-panel-tab:hover {
    background: #d8dfe8;
}

.right-panel-tab.active {
    background: #f7f8fa;
    color: #222;
    border-color: #ccc;
    border-bottom-color: #f7f8fa;
    position: relative;
    z-index: 1;
}

.right-panel-section {
    border: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    background: #f7f8fa;
    overflow: hidden;
}

/* ── Items Panel ────────────────────────────────────────────────────────── */

.items-panel {
    overflow: hidden;
}

.items-panel-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}

.items-collect-counter {
    font-size: 12px;
    color: #666;
}

#items-content {
    max-height: 560px;
    overflow-y: auto;
}

.item-category-section {
    border-bottom: 1px solid #e0e0e0;
}

.item-category-section:last-child {
    border-bottom: none;
}

.item-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    user-select: none;
}

.item-category-header:hover {
    filter: brightness(1.08);
}

.item-category-count {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.9;
}

.item-category-arrow {
    font-size: 11px;
    opacity: 0.85;
    flex-shrink: 0;
}

.item-category-body {
    background: rgba(255,255,255,0.6);
}

.item-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 5px 10px;
    border-bottom: 1px solid #ececec;
    font-size: 12px;
    transition: background 0.1s;
}

.item-row:last-child {
    border-bottom: none;
}

.item-row:hover {
    background: rgba(255,255,255,0.8);
}

.item-row.item-collected {
    opacity: 0.5;
}

.item-check-btn {
    background: none;
    border: 1px solid #aaa;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 10px;
    color: #888;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.12s;
    margin-top: 1px;
}

.item-check-btn:hover {
    border-color: #6dbf67;
    color: #6dbf67;
}

.item-check-btn.checked {
    background: #6dbf67;
    border-color: #6dbf67;
    color: #fff;
}

.item-used-btn.checked {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.item-row-info {
    flex: 1;
    min-width: 0;
}

.item-row-name {
    font-weight: 600;
    color: #1a1a1a;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-row.item-collected .item-row-name {
    text-decoration: line-through;
    color: #888;
}

.item-row-location {
    color: #666;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-row-yield {
    color: #888;
    font-size: 10px;
    font-style: italic;
}

.item-row-extras {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.item-used-label {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
}

.item-used-on-input {
    width: 80px;
    font-size: 10px;
    padding: 1px 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    color: #333;
}

/* ── Route-embedded items ────────────────────────────────────────────────── */

.route-items-section {
    margin-top: 10px;
    border-top: 1px dashed #ccc;
    padding-top: 8px;
}

.route-items-header {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #888;
    margin-bottom: 5px;
}

.route-items-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.route-item-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 11px;
    transition: background 0.1s;
}

.route-item-row:hover {
    background: rgba(255,255,255,0.85);
}

.route-item-row.item-collected {
    opacity: 0.45;
}

.route-item-tag {
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.route-item-name {
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    flex-shrink: 0;
}

.route-item-row.item-collected .route-item-name {
    text-decoration: line-through;
    color: #999;
}

.route-item-desc {
    color: #777;
    font-size: 10px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.route-item-collect-btn {
    background: none;
    border: 1px solid #bbb;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    cursor: pointer;
    font-size: 9px;
    color: #999;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.12s;
}

.route-item-collect-btn:hover {
    border-color: #6dbf67;
    color: #6dbf67;
}

.route-item-collect-btn.collected {
    background: #6dbf67;
    border-color: #6dbf67;
    color: #fff;
}

.range-delete-move {
    cursor: pointer;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.range-delete-move:hover {
    background: #cc0000;
}

.range-move-left,
.range-move-right {
    cursor: pointer;
    color: white; 
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.critBold {
    font-weight: 700;
}


/* Hide element visually, but not from screen readers. See http://adrianroselli.com/2017/05/under-engineered-custom-radio-buttons-and-checkboxen.html */
.visually-hidden {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    top: auto;
    white-space: nowrap; /* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe */
}

.visually-hidden:disabled + .btn {
    color: #999999;
}
.btn-group {
    display: inline-block;
    width: 100%;
}
.left {
    float: left;
}
.right {
    float: right;
}
.locked-move:checked + .btn {
    background: #ffff99;
}

.genSelection, .notationSelection {
    display: inline-block;
    position: relative;
    top: -8px;
}

/* header */
.move-result-group {
    min-width: 50em;
    margin: 1em 0 11.5em;
}

.move-result-subgroupL {
    float: left;
    width: 40%;
}

 .move-result-subgroupR {
    float: left;
    width: 60%;
}

/* I love good class names */
.move-result-subgroup-aiPercentageless {
    float: left;
    width: 50%;
}

.ai-options-subgroup {
    /* float: left; */
    width: 80%;
}

.ai-options-subgroup .row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

#disclaims {
    margin-top: 0.75rem;
    margin-right: 15%;
}

#disclaims ul {
    width: fit-content;
    margin: 0 auto;
    padding: 0;
}

#disclaims li {
    color: rgb(236, 56, 56);
}

.row .col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#aiOptionsHeader {
    display: table;
    margin: 0 auto;
    font-size: 1.2em;
}

.move-result-group .btn {
    margin-right: 1em;
}
.main-result-group {
    margin: 1em 0;
}
.result-move-header {
    font-size: 0.8em;
    font-weight: bold;
    margin: 0 0 5px;
}

/* pokemon info */
.poke-info label {
    display: inline-block;
    width: 6em;
}
.top label, .info-selectors label {
    display: inline-block;
    width: 5em;
}
.poke-info input:not([type]), .poke-info input[type="text"], .poke-info span {
    display: inline-block;
    width: 2.5em;
}
.poke-info input[type="number"] {
    display: inline-block;
    width: 3em;
}
.info-group {
    margin: 1em 0;
}
.set-selector {
    width: 100%;
}
.info-selectors select {
    width: 12em;
}
select.toxic-counter {
    width: 5.5em;
}
.move-selector, .move-bp, .move-type, .move-cat, .move-hits {
    font-size: 0.9em;
}
.move-selector {
    width: 11.5em;
}
.poke-info input.move-bp {
    width: 2em;
}
.move-type {
    width: 5.5em;
}
.move-cat {
    width: 6em;
}
.move-hits {
    width: 4.5em;
}
.poke-info .crit-btn {
    font-size: 0.8em;
    width: 5em;
    height: 1em;
    padding: 3px 3px;
    margin: 0px 1px;
}

.small-crit-btn {
    font-size: 0.8em;
    width: 2.5em;
    height: 1em;
    padding: 3px 3px;
    margin: 0px 1px;
}

.small-crit-btn[id*="TopL"] {
    margin-left: 0.8em;
}

/* field info */
.field-info .btn {
    font-size: 0.8em;
}
table.field {
    width: 100%;
}

[hidden], .hide {
    display: none;
}

/* select2 overrides */
.select2-container .select2-choice > .select2-chosen {
    width: 100%;
}
.small-select.select2-container .select2-choice {
    font-size: 0.9em;
    height: 18px;
    line-height: 18px;
}
.small-select.select2-container .select2-choice .select2-arrow b {
    background-position: 0 -4px;
}
.small-select.select2-dropdown-open .select2-choice .select2-arrow b {
    background-position: -18px -4px;
}

/* Bootstrap */
.panel-group > .panel {
    clear: left;
}

/* ColVis */
.clear {
  clear: right;
}

.import-team-text {
    min-width: 27em;
    min-height: 10em;
    resize: vertical;
}

.import-name-text {
	min-width: 26.3em;
    min-height: 1em;
    overflow: auto;
    display: inline;
}

.hpbar {
    height: 4px;
    border-style: solid;
    border-top-width: 2px;
    border-right-width: 1px;
    border-bottom-width: 2px;
    border-left-width: 0.5px;
    border-radius: 3px;
}

.hpbar.hp-green {
    border-top-color: #00dd60;
    background-color: green;
    border-bottom-color: #007734;
    border-right-color: #007734;
}

.hpbar.hp-yellow {
    border-top-color: #f8e379;
    background-color: #f5d538;
    border-bottom-color: #be9f0a;
    border-right-color:#be9f0a;
}

.hpbar.hp-red {
    border-top-color: #f37f67;
    background-color: #ee4928;
    border-bottom-color: #a3260d;
    border-right-color: #a3260d;
}

.pool {
    padding: 15px 0;
}
.ability-pool, .move-pool  {
    padding-bottom: 5px;
}
.extraSetAbilities,
.extraSetItems,
.extraSetMoves {
    width: 100%;
}

/*

    F = Faster 
    T = Speed tie
    S = slower
*/
.mon-speed-F{
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border: solid;
    border-color: #7ee1ff;
    border-radius: 20%;
}
.mon-speed-T{
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border: solid;
    border-color: #894197;
    border-radius: 20%;
}
.mon-speed-S{
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border: solid;
    border-color: #1c1414;;
    border-radius: 20%;
}
.mon-speed-none{
    border: none !important; 
}
.mon-dmg-none{
    background: var(--fieldset-color) !important;
}
.mon-dmg-W{
    /* Is considerable a wall*/
    background: linear-gradient(to right, #0f0bf3 50%, var(--fieldset-color) 0%);
}
.mon-dmg-WMO{
    /* Is considerable a wall that may OHKO*/
    background: linear-gradient(to right, #1295ec 50%, var(--fieldset-color) 0%);
}
.mon-dmg-4{
    /*Gets OHKO*/
    background: linear-gradient(to right, var(--fieldset-color) 50%, #dd0b0b 0%);
}
.mon-dmg-3{
    /*maybe gets OHKO*/
    background: linear-gradient(to right, var(--fieldset-color) 50%, #ff7f16 0%);
}
.mon-dmg-1{
    /*inflicts OHKO*/
    background: linear-gradient(to right, #20d408 50%, var(--fieldset-color) 0%);
}
.mon-dmg-2{
    /*may inflicts OHKO*/
    background: linear-gradient(to right, #daff08 50%, var(--fieldset-color) 0%);
}

.mon-dmg-14{
    /*both sides Gets OHKO*/
    background: linear-gradient(to right, #20d408 50%, #dd0b0b 0%);
}
.mon-dmg-23{
    /*both sides might inflict OHKO*/
    background: linear-gradient(to right, #daff08 50%, #ff7f16 0%);
}
.mon-dmg-13{
    /*inflict OHKO but may Gets OHKO*/
    background: linear-gradient(to right, #20d408 50%, #ff7f16 0%);
}
.mon-dmg-24{
    /*may inflict OHKO but Gets OHKO*/
    background: linear-gradient(to right, #daff08 50%, #dd0b0b 0%);
}

.box-poke{
    min-height: 30px;
}

.deadzone:hover{
    background: #722323;
}
.over{
    background: #373232;
}

.s-arrow{
    border: solid rgb(175, 155, 155);
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px;
}
.arrowdown {
    transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}
.arrowright {
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
}
.arrowtop {
    transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
}
.arrowleft{
    transform: rotate(135deg);
  -webkit-transform: rotate(135deg);
}
.l-side-button, .r-side-button{
    position: absolute;
}
.side-pannel{
    display: grid;
    position: relative;
}
.left-side-pannel{
    float: left;
}
.right-side-pannel{
    float: none;
}

#p2mon, #p1mon, #monSingle, #monDouble {
    min-height: 30px;
}

.info-paragraph > b{
    color: rgb(15, 14, 14);
}
.info-paragraph > b:hover{
    background: var(--fieldset-color);
    color: unset;
}

.resultDamageR{
    margin-right: 1em;
}

.unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.p-noPadding {
    margin-bottom: 0px;
}

/* Changelog */
#changelog-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#changelog-popup {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #141414;
    padding: 20px;
    width: 45vw;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

#changelog-popup h2 {
    color: #fff;
}

#changelog-close {
    float: right;
    cursor: pointer;
    font-size: 22px;
    color: #999;
}

#changelog-close:hover {
    color: #333;
}

#changelog-content {
    margin-top: 7px;
    font-family: Arial, sans-serif;
    font-size: 22px;
    overflow-y: auto;
    max-height: 65vh;
    color: #fff;
    padding-right: 15px;
}

#changelog-content-list {
    padding: 0px 25px;
}

#changelog-content li {
    margin-bottom: 4px;
}

#show-changelog {
    margin-top: 5px;
}

/* Export All */
#massExport-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#massExport-popup {
    position: relative;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #141414;
    padding: 20px;
    width: 45vw;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

#massExport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#massExport-popup h2 {
    color: #fff;
    margin: 0;
}

#massExport-copy {
    gap: 6px;
    padding: 6px 12px;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-right: 30px;
    width: 130px;
}

#massExport-copy svg {
    margin-top: 1px;
}

#massExport-copy:hover {
    background: #3a3a3a;
    border-color: #777;
}

#massExport-copy:active {
    background: #1a1a1a;
}

#massExport-copy svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#massExport-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 22px;
    color: #999;
    z-index: 1;
}

#massExport-close:hover {
    color: #333;
}

#massExport-div {
    margin-top: 7px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    overflow-y: auto;
    max-height: 65vh;
    color: #fff;
    padding-right: 15px;
}

#massExport-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    padding: 0px 25px;
    font-family: Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.215;
}

.team-legend {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

#team-box-legend {
    min-width: 6em;
    padding: 2px 6px;
    flex-shrink: 0;
    text-align: left;
}

#search-inline {
    margin-left: 8em;
    flex-shrink: 0;
}

#search {
    min-width: 14em;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #AAAAAA;
}

#trashFieldset {
    margin-top: 5px;
    width: 400px;
}

.select2-container.set-selector {
    display: block;
    width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.select2-choice {
    padding-right: 8px !important;
}

.range-compare fieldset {
    width: 1244px;
}

/* Range Compare: selection/highlight */
body.rc-selecting-target .trainer-pok,
body.rc-selecting-target .trainer-pok-opposing {
    cursor: crosshair;
}
.rc-selectable {
    outline: 2px dashed #90caf9;
    outline-offset: 2px;
}

#range-target.rc-need-target {
    box-shadow: inset 0 0 0 3px #ff9800;
    animation: rcPulse 0.6s ease-in-out 2;
}
@keyframes rcPulse {
    0% { box-shadow: inset 0 0 0 0 rgba(255,152,0,.7); }
    100% { box-shadow: inset 0 0 0 6px rgba(255,152,0,0); }
}

/* Range Compare */
#range-moves {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 60%;
    
}
.rc-move-pill {
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
}
#range-chart {
    margin-top: 8px;
}
.rc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}
.rc-label {
    width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.rc-track {
    position: relative;
    flex: 1;
    height: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.08) 100%);
    border: 1px solid #555;
    border-radius: 8px;
}
.rc-track .rc-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 8px;
}
.rc-pct {
    width: 110px;
    text-align: right;
    font-size: 12px;
}

.rc-range-ui {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rc-range-ui > div:first-child {
    font-weight: bold;
    margin-right: 5px;
}

#rc-range-hp {
    width: 80px;
}

#rc-range-result {
    margin-top: 6px;
}

.rc-gauge-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 15px;
    justify-content: center;
    align-items: flex-start;
}

.rc-gauge-wrapper {
    flex: 0 0 auto;
    width: 300px;
    height: 150px;
}

.rc-gauge-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

.btn-target-select {
    height: 1.6em;
    width: 2.25em;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--background);
    border: 1px solid #aaaaaa;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-left: 0.8em;
    flex-shrink: 0;
}

/* Ensure proper alignment with level input - use flexbox on parent divs containing level inputs */
.poke-info .info-group > div:has(input.level) {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.poke-info .info-group > div:has(input.level) label {
    flex-shrink: 0;
}

.poke-info .info-group > div:has(input.level) input.level {
    flex-shrink: 0;
}