
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakra-petch-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakra-petch-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("fonts/rubik-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #14171c;
  --panel: #232830;
  --panel2: #2b313b;
  --line: #3a414d;
  --edge-l: #454e5c;
  --text: #eceae6;
  --dim: #9aa3af;
  --accent: #ff8000;
  --accent-dk: #b26f10;
  --ok: #57c793;
  --err: #e5484d;
  --head: "Chakra Petch", "Segoe UI", sans-serif;
  --body: "Rubik", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(255, 255, 255, 0.022) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255, 255, 255, 0.022) 31px 32px),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--body);
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

h1, h2, th, .label {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
header h1 svg { flex: none; }

.contact {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--dim);
  text-decoration: none;
}
.contact:hover { color: var(--accent); }

.subtitle { color: var(--dim); margin: 0.45rem 0 0; }
.privacy { color: var(--ok); font-size: 0.85rem; margin: 0.25rem 0 0; }

.hazard {
  height: 6px;
  border-radius: 3px;
  margin: 1.1rem 0 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 12px,
    #1a1d22 12px 24px
  );
  opacity: 0.85;
}

.helpcol code { font-size: 0.82em; }

a:focus-visible, button:focus-visible, summary:focus-visible,
#dropzone:focus-visible, label.dest:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .gear { animation: none; }
}

h2 {
  display: inline-block;
  min-width: 150px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #221a08;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #ffdf8a 0%, #f7c243 60%, #edb32e 100%);
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
  padding: 6px 24px 5px;
  text-align: center;
  margin: 1.9rem 0 0.6rem;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 1px 1px 0 var(--edge-l);
}

.hint { color: var(--dim); font-size: 0.85rem; }

code {
  background: #191d23;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: 0.85em;
}

a { color: var(--accent); }

button {
  font: 600 0.95rem var(--head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #221a08;
  background: linear-gradient(180deg, #ffb340 0%, #ff8000 55%, #e06f00 100%);
  border: 1px solid #b96400;
  border-bottom-color: #96500a;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: filter 0.1s;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:active:not(:disabled) { transform: translateY(1px); border-bottom-width: 2px; }
button:disabled {
  background: var(--panel2);
  color: #5f5f5f;
  border-bottom-color: var(--line);
  opacity: 1;
  cursor: default;
}
button:disabled:hover { filter: none; }

#dropzone {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 1.4rem;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(16, 18, 22, 0.8), rgba(16, 18, 22, 0.8)),
    url("icons/ui/hero-survival.jpg") left center / cover no-repeat,
    #191d23;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
  padding: 2.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
#dropzone:hover, #dropzone.drag, #dropzone:focus-visible {
  border-color: var(--accent);
  background:
    linear-gradient(rgba(20, 23, 28, 0.68), rgba(20, 23, 28, 0.68)),
    url("icons/ui/hero-survival.jpg") left center / cover no-repeat,
    var(--panel);
}
#dropzone p { margin: 0.35rem 0; }
#dropzone .slot-label {
  font-family: var(--head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
}
#dropzone:hover .slot-label, #dropzone.drag .slot-label { color: var(--accent); }

#save-info {
  margin-top: 1.2rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
#save-info strong { color: var(--text); }

.gear { animation: spin 1.4s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.error {
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--err);
  border-radius: 8px;
  color: var(--err);
  background: rgba(229, 72, 77, 0.08);
  white-space: pre-line;
}

.warning {
  position: relative;
  margin-top: 1.4rem;
  padding: 0.8rem 1rem 0.8rem 2.7rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(240, 161, 58, 0.07);
  font-size: 0.9rem;
}
.warning::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 0.75rem;
  width: 22px;
  height: 22px;
  background: url("icons/ui/ui-alert.png") center / contain no-repeat;
}

.filebar {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.55rem 0.55rem 1rem;
  font-size: 0.87rem;
  color: var(--dim);
}
.filebar span { min-width: 0; overflow-wrap: anywhere; }

.btn-small {
  font-size: 0.72rem;
  padding: 0.32rem 0.9rem;
  flex: none;
  background: linear-gradient(180deg, #ffdf8a 0%, #f7c243 60%, #eab02c 100%);
  border: 1px solid #c9920a;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.bench {
  display: grid;
  grid-template-columns: minmax(250px, 320px) 1fr;
  gap: 1.8rem;
  align-items: start;
}
.rail { position: sticky; top: 1rem; }
.helpcol { color: var(--dim); font-size: 0.87rem; }
.helpcol ol, .helpcol ul { margin: 0.2rem 0 0; padding-left: 1.15rem; }
.helpcol li { margin-top: 0.45rem; }
@media (max-width: 899px) {
  .bench { grid-template-columns: 1fr; }
  .rail { position: static; }
}
.main-col { min-width: 0; }
.rail h2, .main-col h2 { margin-top: 1.5rem; }

.main-col table { font-size: 0.95rem; }
.main-col th { padding: 0.5rem 0.75rem 0.55rem; }
.main-col td { padding: 0.65rem 0.75rem; }

table.panel { border-collapse: separate; border-spacing: 0; }
table.panel th:first-child { border-top-left-radius: 6px; }
table.panel th:last-child { border-top-right-radius: 6px; }
table.panel tr:last-child td:first-child { border-bottom-left-radius: 6px; }
table.panel tr:last-child td:last-child { border-bottom-right-radius: 6px; }

label.dest {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
label.dest:hover { background: var(--panel2); }
label.dest:has(input:checked) {
  border-color: var(--accent);
  background: var(--panel2);
}
label.dest input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  background: url("icons/ui/ui-radio-off.png") center / contain no-repeat;
  flex: none;
  cursor: pointer;
}
label.dest input:checked {
  background: url("icons/ui/ui-radio-on.png") center / contain no-repeat;
}
label.dest .name { font-weight: 500; }
label.dest .dist { color: var(--dim); font-size: 0.82rem; margin-left: auto; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dim);
  padding: 0.35rem 0.6rem 0.45rem;
  border-bottom: 2px solid var(--line);
}
td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
.main-col tbody tr:not(.moved):hover { background: var(--panel2); }
td.num { font-variant-numeric: tabular-nums; }

tr.moved td { color: var(--ok); }
tr .exp { color: var(--accent); font-size: 0.78rem; }
.bag-icon { vertical-align: -2px; margin-right: 0.3em; }

#download-row {
  margin-top: 1.4rem;
}
#download-row button { font-size: 1rem; padding: 0.65rem 1.4rem; width: 100%; }
#download-note { margin-top: 0.55rem; line-height: 1.45; }

.rail .warning { margin-top: 1.2rem; }

#help {
  margin-top: 1.8rem;
  max-width: 46rem;
}
.helpcol .warning { margin-top: 0.9rem; }

footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--dim);
  font-size: 0.82rem;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.fine { margin: 0.4rem 0 0; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  background: #22262b;
  border: 1px solid #33383f;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin: 0.1rem 0.15rem 0.1rem 0;
  white-space: nowrap;
}
.chip .exp { margin: 0; }

.icnw {
  width: 30px;
  height: 30px;
  overflow: hidden;
  display: inline-block;
  border-radius: 6px;
  vertical-align: middle;
}
.icnw .icn {
  width: 96px;
  height: 96px;
  display: block;
  background: url("icons/IconMapSurvival.png") no-repeat;
transform: scale(0.4166667);
  transform-origin: 0 0;
}

.conf {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.conf-exact  { background: #1d7a3a; color: #eafff0; }
.conf-high   { background: #2c8a4b; color: #eafff0; }
.conf-medium { background: #9a6b00; color: #fff7dd; }
.conf-review { background: #a04b00; color: #ffeadd; }
.altpick {
  max-width: 9rem;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.05rem 0.2rem;
  margin-right: 0.35rem;
  background: var(--panel, #22262b);
  color: inherit;
  border: 1px solid #444;
  border-radius: 3px;
  vertical-align: middle;
}

.baggrid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
  max-width: 560px;
  padding: 2px 12px;
}
.bslot {
  position: relative;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #2e2e30 0%, #262628 100%);
  border: 1px solid #17181a;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bslot:not(.empty):hover {
  border-color: var(--accent, #f0a13a);
  background:
    url("icons/ui/ui-slot-hover.png") center / 100% 100% no-repeat,
    linear-gradient(180deg, #3d4248 0%, #31363b 100%);
}
.bslot.empty { opacity: 0.45; }
.bslot .icnw { width: 40px; height: 40px; }
.bslot .icnw.noicon {
  background: radial-gradient(circle at 50% 45%, #4a5057 0 35%, transparent 36%);
}
.bslot .q {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  pointer-events: none;
}
.bslot .tip, .bslot::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #14171a;
  color: #e8eaed;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border: 1px solid #3a3f45;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  z-index: 5;
}
.bslot:hover::after { opacity: 1; }
.icnw .icn.a1 { background-image: url("icons/IconMap.png"); }

#bags-list {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (max-width: 899px) {
  #bags-list { grid-template-columns: 1fr; }
}
.bagcard {
  max-width: 610px;
  background: #222 padding-box;
  border: 12px solid transparent;
  border-image: url("icons/ui/ui-frame.png") 14 stretch;
  border-radius: 3px;
}
.bagcard.moved { opacity: 0.72; }
.baghead {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: rgba(42, 46, 51, 0.6);
  border-bottom: 1px solid #3a3f45;
}
.baghead h3 {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.bagnum { color: var(--accent, #f0a13a); }
.bagicon { flex: 0 0 auto; image-rendering: auto; }
.baghead .conf { margin-left: auto; }
.bagmeta {
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  color: #9aa3af;
  border-bottom: 1px solid #31363b;
}
.pile { padding: 0.6rem 0.75rem 0.2rem; }
.pilehead {
  margin: 0 0 0.35rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9aa3af;
}
.likely {
  margin: 0.2rem 0.75rem;
  font-size: 0.72rem;
  color: var(--accent, #f0a13a);
}
.bagfoot {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid #31363b;
}
.regnote { font-size: 0.72rem; color: #9aa3af; margin-right: auto; }
.movednote { color: var(--accent, #f0a13a); font-size: 0.8rem; margin-right: auto; }
.btn-move {
  margin-left: auto;
  background: linear-gradient(180deg, #ffb340 0%, #ff8000 55%, #e06f00 100%);
  color: #221a08;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  border: 1px solid #b96400;
  border-bottom-color: #96500a;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.btn-move:hover { filter: brightness(1.1); }
.btn-move:active { filter: brightness(0.92); }
.bagcard.moved .btn-move { display: none; }
.bslot.empty {
  opacity: 1;
  background: #26292d;
  border-color: #33383d;
  box-shadow: none;
}

.baghead .slots { color: #9aa3af; font-size: 0.72rem; letter-spacing: 0.06em; }

.chip-xworld {
  display: inline-block;
  font-family: var(--head);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9fd8e8;
  background: rgba(87, 199, 147, 0.12);
  border: 1px solid #2c5a4d;
  border-radius: 3px;
  padding: 0.08rem 0.4rem;
  margin-left: auto;
}
.dest-icn { width: 20px; height: 20px; flex: none; align-self: center; }
.dl-summary {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  color: var(--text);
}
.dl-summary strong { color: var(--accent); }
.bagcard.moved .movednote { color: var(--ok); }

