:root {
  --bg: #161821;
  --panel: #1f2330;
  --accent: #4ea1ff;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --link: #8eb1e1;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
}

footer a {
  font-weight: bold;
}
a {
  text-decoration: none;
  color: var(--link);
}
a:hover {
  color: var(--accent);
}

* {
  box-sizing: border-box;
}

hr {
  margin: 16px 0;
  opacity: 0.5;
}

html,
body {
  overflow-x: hidden;
  background: var(--bg);
}

body {
  height: 100%;
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
}

.wrap {
  max-width: 900px;
  margin: auto;
  padding: 16px;
}

header {
  text-align: center;
  margin-bottom: 16px;
}

.mkii {
  width: 0;
}

h1 {
  font-size: 20px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  text-wrap: balance;
  text-transform: uppercase;
}

h1 > span:first-child {
  line-height: 30px;
}

#change-generator {
  text-align: left;
  width: fit-content;
  margin: auto;
  font-size: 110%
}
#change-generator a.active {
  pointer-events: none;
  color: var(--text);
  font-weight: bold;;
}

.panel {
  background: var(--panel);
  border: 1px solid #2b3246;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px 16px;
  align-items: center;
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: bold;
}

#text-in {
  font-size: 150%;
}

#text-in,
#x-pos,
#y-pos {
  text-transform: uppercase;
}

textarea {
  outline: none;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a3044;
  background: #121523;
  color: var(--text);
  outline: none;
  font-size: 14px;
}

input[type="text"]::placeholder {
  color: #667;
  text-transform: none;
}

input[type="button"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a3044;
  background: #121523;
  color: var(--text);
  outline: none;
  font-size: 14px;
  opacity: 0.8;
  cursor: pointer;
}

input[type="button"]:hover {
  opacity: 1;
}

input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

#status-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#status.error, #status.warning.error {
  color: red;
  font-weight: bold;
}

#status.warning {
  color: darkorange;
  font-weight: bold;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.row.lc {
  justify-content: start;
  align-items: center;
  gap: 0 6px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  margin-left: 4px;
  opacity: 0.65;
}

.out {
  margin: 16px 0;
}

#text-out, .codebox {
  margin: 0;
  padding: 14px 16px;
  background: #0e1020;
  border: 1px solid #2a3044;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  height: 140px;
  min-width: 100%;
  max-width: 100%;
  resize: vertical;
  color: var(--text);
  tab-size: 8;
}

#location-guide {
  align-items: center;
  justify-content: space-around;
  width: 100%;
}

#location-guide dd {
  margin: 0
}

#location-guide dl {
  margin: 0;
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #2a3044;
  color: var(--muted);
}

.small {
  font-size: 12px;
  color: var(--muted);
}

footer {
  text-align: center;
  margin: 12px;
  font-size: 12px;
  color: var(--muted);
}

@media only screen and (max-aspect-ratio: 3/2) {
  h1 {
    flex-direction: column;
  }
  
  .mkii {
    width: auto !important;
  }
  
  #text-in {
    font-size: 100%;
  }
  
  #location-guide {
    justify-content: start;
  }
}

body {
  --sb-track-color: #1f2330;
  --sb-thumb-color: #9aa4b2;
  --sb-size: 14px;
}

body::-webkit-scrollbar {
  width: var(--sb-size)
}

body::-webkit-scrollbar-track {
  background: var(--sb-track-color);
  border-radius: 3px;
}

body::-webkit-scrollbar-thumb {
  background: var(--sb-thumb-color);
  border-radius: 3px;
  
}

@supports not selector(::-webkit-scrollbar) {
  body {
    scrollbar-color: var(--sb-thumb-color)
                     var(--sb-track-color);
  }
}