/* Realm Explorer Tools — matches realmexplorer.xyz:
   Press Start 2P headings, Inter body, near-black base, forest-green header. */
/* Self-hosted fonts (SIL Open Font License) */
@font-face { font-family: 'Press Start 2P'; src: url('/assets/fonts/press-start-2p-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('/assets/fonts/pixelify-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('/assets/fonts/pixelify-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0b0a;
  --surface: rgba(20, 20, 21, .88);
  --surface-solid: #141415;
  --surface-hi: #1c1c1e;
  --well: #0e0e0f;
  --line: #262628;
  --line-hi: #34343a;
  --header: #1d4319;
  --header-line: #2a5c24;
  --header-pill: #345630;
  --green: #4ec44e;
  --green-dark: #3da53d;
  --green-light: #85fc7e;
  --text: #ececec;
  --muted: #9a9a9f;
  --faint: #6e6e73;
  --danger: #f26d5b;
  --pixel: 'Press Start 2P', 'Courier New', monospace;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mc: 'Pixelify Sans', 'Press Start 2P', monospace;
  --radius: 8px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Background art: the forest build, kept dark so text stays readable */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(11,11,10,.15), rgba(11,11,10,.7) 80%),
    linear-gradient(rgba(11,11,10,.35), rgba(11,11,10,.6)),
    url('/assets/background.webp') center top / cover no-repeat;
  image-rendering: pixelated;
}
img { max-width: 100%; }
a { color: var(--green-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--green-light); outline-offset: 2px; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
main { flex: 1; padding-block: 2.5rem 5rem; }
main:focus, main:focus-visible { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: #000; padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }

h1, h2 { font-family: var(--pixel); font-weight: 400; line-height: 1.35; margin: 0 0 .75rem; }
h2 { font-size: 1rem; }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.05rem; line-height: 1.3; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.green { color: var(--green); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  border-bottom: 1px solid var(--header-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; flex-wrap: wrap; padding-block: .4rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff; }
.brand img { display: block; width: 48px; height: auto; }
.brand-name { font-family: var(--pixel); font-size: .85rem; color: #fff; }
.brand-tag { font-family: var(--pixel); font-size: .55rem; color: #10300f; background: var(--green); padding: .35rem .5rem .3rem; border-radius: 3px; }
.site-nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #fff; text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: .5rem .8rem; border-radius: 6px;
}
.site-nav a:hover { background: rgba(52, 86, 48, .6); color: #fff; }
.site-nav a.active { background: var(--header-pill); color: #fff; }
.site-nav svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- surfaces ---------- */
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(6px);
}
.block > h2:first-child, .block > h3:first-child { margin-top: 0; }
.block h2 { font-size: .85rem; margin-bottom: 1.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 600 .95rem/1 var(--body);
  color: #0b1a0b;
  background: var(--green);
  border: 0;
  border-bottom: 4px solid var(--green-dark);
  border-radius: 6px;
  padding: .85rem 1.4rem .75rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: #5ad35a; color: #0b1a0b; }
.btn:active { border-bottom-width: 2px; transform: translateY(2px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.alt { background: var(--surface-hi); color: var(--text); border: 1px solid var(--line-hi); border-bottom: 4px solid #0a0a0b; }
.btn.alt:hover { background: #242427; color: #fff; }
.btn.small { font-size: .85rem; padding: .55rem .85rem .5rem; border-bottom-width: 3px; }
.btn svg { width: 16px; height: 16px; }

label { display: block; font-weight: 500; margin-bottom: .4rem; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=number], input[type=search], input[type=time], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--well);
  border: 1px solid var(--line-hi);
  border-radius: 6px;
  padding: .7rem .85rem;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { font-family: var(--mc); font-size: 1.05rem; resize: vertical; min-height: 6rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(78,196,78,.2); }
input[type=number] { -moz-appearance: textfield; }
input[type=range] { width: 100%; accent-color: var(--green); }
input[type=file] { color: var(--muted); font: inherit; }
input[type=file]::file-selector-button { font: 600 .85rem var(--body); background: var(--surface-hi); color: var(--text); border: 1px solid var(--line-hi); border-radius: 6px; padding: .5rem .8rem; margin-right: .75rem; cursor: pointer; }

.field { margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.row > .grow { flex: 1 1 14rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.grid-3 { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }

.seg { display: inline-flex; background: var(--well); border: 1px solid var(--line-hi); border-radius: 6px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  font: 500 .88rem var(--body); padding: .5rem .8rem; background: transparent; color: var(--muted);
  border: 0; border-radius: 4px; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed=true] { background: var(--header-pill); color: #fff; }

.stat { background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: .8rem .95rem; }
.stat .k { display: block; color: var(--faint); font-size: .78rem; font-weight: 500; margin-bottom: .35rem; }
.stat .v { display: block; font-family: var(--pixel); font-size: .95rem; line-height: 1.5; color: var(--green-light); word-break: break-word; }
.stat .v.small { font-family: var(--body); font-weight: 600; font-size: .98rem; }

.copyline { display: flex; gap: .5rem; align-items: stretch; margin-bottom: .9rem; }
.copyline code {
  flex: 1; min-width: 0; margin: 0; background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: .6rem .75rem;
  font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: .85rem; overflow-x: auto; white-space: pre; color: #cfe9cf;
}
.copyline .btn { border-bottom-width: 1px; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--green); background: rgba(78,196,78,.05); border-radius: 6px; padding: .75rem 1rem; margin-bottom: 1rem; color: #d2d2d6; }
.error { border: 1px solid #4a2723; border-left: 3px solid var(--danger); background: rgba(242,109,91,.07); border-radius: 6px; padding: .8rem 1rem; color: #ffd1ca; }
.loading { color: var(--muted); padding: 1rem 0; font-size: .95rem; }
.loading::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: .6em; background: var(--green); animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
table.data th { color: var(--faint); font-weight: 500; font-size: .8rem; }
table.data td.num { font-family: ui-monospace, Consolas, monospace; }
.table-wrap { overflow-x: auto; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 3.5rem 0 3rem; max-width: 54rem; margin-inline: auto; }
.hero-kicker { font-family: var(--pixel); font-size: .62rem; letter-spacing: .04em; color: #fff; display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem; }
.hero-kicker img { width: 22px; height: 22px; }
.hero h1 { font-size: clamp(1.45rem, 5vw, 2.9rem); line-height: 1.3; color: #fff; margin-bottom: 1.5rem; }
.hero-lede { font-size: 1.08rem; color: #b4b4b8; max-width: 36rem; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.8rem; }
.hero-actions .btn { padding: 1rem 1.9rem .9rem; }
.hero-stats { display: flex; gap: clamp(2rem, 7vw, 5rem); justify-content: center; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.hero-stats b { font-family: var(--pixel); font-weight: 400; font-size: 1.6rem; color: var(--green-light); }
.hero-stats span { font-family: var(--pixel); font-size: .5rem; color: #e6e6e6; letter-spacing: .04em; }

.tools-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.75rem; scroll-margin-top: 80px; }
.tools-bar h2 { margin: 0; font-size: 1.05rem; }
.search { position: relative; width: min(22rem, 100%); }
.search input { padding-left: 2.4rem; }
.search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }

.cat { margin-bottom: 2.5rem; }
.cat-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cat-head h2 { margin: 0; font-size: .68rem; color: var(--green); letter-spacing: .04em; }
.cat-head span { color: var(--faint); font-size: .85rem; }
.tool-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); }
.tool-card {
  display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.05rem;
}
.tool-card:hover { border-color: #3c5a3c; background: rgba(28, 32, 28, .92); color: var(--text); }
.tool-card h3 { font-size: 1rem; margin: .1rem 0 .3rem; }
.tool-card p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.tool-card .ext { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--green); margin-top: .45rem; }
.icon-tile { width: 44px; height: 44px; background: #101a10; border: 1px solid #243824; border-radius: 6px; display: grid; place-items: center; }
.icon-tile svg { width: 26px; height: 26px; }
.empty-search { padding: 2rem; text-align: center; color: var(--muted); }

/* ---------- tool page ---------- */
.back { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--muted); margin-bottom: 1.25rem; text-decoration: none; }
.back:hover { color: #fff; }
.back::before { content: '←'; }
.tool-head { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 2rem; }
.tool-head .icon-tile { width: 60px; height: 60px; flex-shrink: 0; }
.tool-head .icon-tile svg { width: 36px; height: 36px; }
.tool-head h1 { font-size: clamp(1.05rem, 3vw, 1.55rem); margin: 0 0 .5rem; }
.tool-head p { margin: 0; color: var(--muted); max-width: 44rem; }
.tool-layout { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }

/* ---------- in-game server list mock ---------- */
.mc-list {
  background-color: #241a12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Crect width='32' height='32' fill='%23211810'/%3E%3Crect x='4' y='2' width='4' height='4' fill='%23291e14'/%3E%3Crect x='18' y='8' width='4' height='4' fill='%231a120c'/%3E%3Crect x='10' y='18' width='4' height='4' fill='%23291e14'/%3E%3Crect x='24' y='22' width='4' height='4' fill='%231a120c'/%3E%3Crect x='2' y='26' width='4' height='4' fill='%231a120c'/%3E%3C/svg%3E");
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .75rem;
  overflow-x: auto;
}
.mc-server {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .6rem;
  min-width: 520px; max-width: 640px;
  padding: 4px;
  border: 2px solid #8a8a8a;
  background: rgba(0,0,0,.6);
  font-family: var(--mc);
  font-size: 17px; line-height: 20px;
}
.mc-server img, .mc-server .noicon { width: 64px; height: 64px; image-rendering: pixelated; display: block; }
.mc-server .noicon { background: #333; display: grid; place-items: center; color: #777; font-size: 12px; }
.mc-server .name { color: #fff; text-shadow: 2px 2px 0 #3f3f3f; margin-bottom: 2px; white-space: nowrap; }
.mc-server .motd { color: #aaa; white-space: pre; }
.mc-server .right { display: flex; gap: 6px; align-items: flex-start; color: #aaa; text-shadow: 2px 2px 0 #2a2a2a; white-space: nowrap; }
.mc-server .bars { display: flex; align-items: flex-end; gap: 1px; height: 14px; margin-top: 2px; }
.mc-server .bars i { width: 2px; background: #55ff55; box-shadow: 1px 1px 0 #153f15; }
.mc-server .bars i.off { background: #3b3b3b; box-shadow: none; }
.mc-server.offline .bars i { background: #ff5555; }
.mc-text { font-family: var(--mc); }
.stat .v.mc-text { font-family: var(--mc); font-size: 1.05rem; }

/* ---------- MOTD creator ---------- */
.palette { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .9rem; }
.palette button {
  width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.15); border-radius: 4px; cursor: pointer; padding: 0;
  font: 600 .8rem var(--body); color: #fff; text-shadow: 1px 1px 0 #000;
}
.palette button.fmt { width: auto; padding: 0 .65rem; background: var(--surface-hi); border-color: var(--line-hi); text-shadow: none; font-weight: 500; }
.palette button:hover { border-color: #fff; }
.line-count { font-size: .82rem; color: var(--faint); margin-top: -.4rem; margin-bottom: .5rem; }
.line-count .over { color: var(--danger); }

/* ---------- canvases ---------- */
.canvas-wrap { width: fit-content; max-width: 100%; overflow: auto; border: 1px solid var(--line-hi); border-radius: 6px; background: var(--well); max-height: 70vh; }
.canvas-wrap canvas { display: block; image-rendering: pixelated; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: .7rem 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border: 1px solid #000; border-radius: 2px; vertical-align: -1px; margin-right: .4rem; }

.big-icon { width: 256px; height: 256px; image-rendering: pixelated; border: 1px solid var(--line-hi); border-radius: 6px; background: repeating-conic-gradient(#1e1e1e 0 25%, #272727 0 50%) 0 0 / 32px 32px; display: block; }
.icon-result { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }

.player-head { width: 96px; height: 96px; image-rendering: pixelated; border: 1px solid var(--line-hi); border-radius: 6px; background: var(--well); }
.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; list-style: none; }
.chip-list li { background: var(--well); border: 1px solid var(--line); border-radius: 4px; padding: .25rem .6rem; }

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #0b1a0b; border-radius: 6px; border-bottom: 3px solid var(--green-dark);
  font: 600 .9rem var(--body); padding: .6rem 1.1rem; z-index: 50;
}

/* ---------- footer ---------- */
.site-footer { background: rgba(10,10,10,.92); border-top: 1px solid var(--line); padding-block: 1.6rem; font-size: .85rem; color: var(--faint); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-inner p { margin: 0; display: flex; gap: .6rem; align-items: center; }
.footer-inner img { border-radius: 3px; }
.footer-inner a { color: var(--muted); }

@media (max-width: 640px) {
  .site-nav a { font-size: .85rem; padding: .4rem .6rem; }
  .brand-name { font-size: .7rem; }
  .hero { padding-top: 2rem; }
  .hero-stats b { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.tool-card .ext svg { width: 12px; height: 12px; }

/* ---------- text editor & gradients ---------- */
.te-tabbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.te-tabs button { font-size: .95rem; padding: .6rem 1rem; }
.te-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .9rem; }
.te-head h2 { margin: 0 !important; }
.te-head select { width: auto; min-width: 12rem; }
.te-preview {
  font-size: 22px; line-height: 1.5; padding: 1rem 1.1rem; min-height: 3.6rem;
  border: 1px solid var(--line); border-radius: 6px; white-space: pre-wrap; word-break: break-word;
  background: rgba(0,0,0,.55);
}
.te-preview[data-bg=chat] { background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)), url('/assets/background.webp') center / cover; }
.te-preview[data-bg=dark] { background: #101010; }
.te-preview[data-bg=light] { background: #e9e9e9; }
.te-preview[data-bg=world] { background: url('/assets/background.webp') center / cover; }
.te-output { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: .85rem; word-break: break-all; min-height: 5.5rem; color: #cfe9cf; }
.te-outinfo { display: flex; gap: 1rem; font-size: .85rem; color: var(--faint); }
.te-outinfo .warn { color: var(--danger); }
.te-input { font-family: var(--mc); font-size: 1.25rem; min-height: 4.5rem; }
.te-code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; min-height: 4.5rem; }
.hint { font-size: .85rem; color: var(--faint); }
.btn-row .hint { align-self: center; margin: 0; }
.te-opts { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.te-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.te-grid-wide { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.25rem; }
.te-grid-wide .block { margin-bottom: 0; }
.tbtn {
  font: 500 .88rem var(--body); color: var(--muted); background: var(--well);
  border: 1px solid var(--line-hi); border-radius: 6px; padding: .5rem .8rem; cursor: pointer;
}
.tbtn:hover { color: #fff; border-color: #4a4a50; }
.tbtn[aria-pressed=true] { background: var(--header-pill); border-color: #4b7a45; color: #fff; }
.char-in { width: 3.4rem !important; text-align: center; padding: .5rem !important; }

.gmap { position: relative; margin: .4rem 0 1.4rem; padding-bottom: 14px; }
.gmap-bar { height: 34px; border-radius: 6px; border: 1px solid var(--line-hi); }
.gmap-markers { position: absolute; inset: 0 0 0 0; pointer-events: none; }
.gmap-marker {
  position: absolute; top: 22px; width: 20px; height: 26px; margin-left: -10px; padding: 0;
  border: 2px solid #fff; border-radius: 4px 4px 10px 10px; box-shadow: 0 0 0 1px #000, 0 2px 4px rgba(0,0,0,.5);
  cursor: grab; pointer-events: auto; touch-action: none;
}
.gmap-marker:active { cursor: grabbing; }
.gmap.locked .gmap-marker { cursor: default; opacity: .75; }
.stop-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.stop-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.stop-num { width: 1.4rem; color: var(--faint); font-size: .85rem; text-align: right; }
.stop-row input[type=color], .te-tool-row input[type=color] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--line-hi); border-radius: 6px; background: var(--well); cursor: pointer; }
.stop-row input[type=text] { width: 7.5rem; font-family: ui-monospace, Consolas, monospace; }
.stop-pos { display: inline-flex; align-items: center; gap: .3rem; color: var(--faint); font-size: .85rem; }
.stop-pos input { width: 5.2rem; }
.iconbtn { width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--line-hi); background: var(--well); color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.iconbtn:hover:not([disabled]) { color: #fff; border-color: var(--danger); }
.iconbtn[disabled] { opacity: .35; cursor: not-allowed; }

.te-toolbar { display: grid; gap: .75rem; margin-bottom: 1rem; }
.te-tool-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.tool-label { font-size: .8rem; color: var(--faint); margin-right: .1rem; }
.divider { width: 1px; height: 28px; background: var(--line-hi); margin: 0 .4rem; }
.hex-in { width: 7.5rem !important; font-family: ui-monospace, Consolas, monospace; }
.te-toolbar .palette { margin: 0; }
.te-toolbar .palette button { width: 30px; height: 30px; }

.te-editor { position: relative; }
.te-back, .te-edit {
  font-family: var(--mc); font-size: 22px; line-height: 1.5; letter-spacing: 0;
  padding: .9rem 1rem; border: 1px solid var(--line-hi); border-radius: 6px;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; tab-size: 4;
  margin: 0; width: 100%; min-height: 9rem;
}
.te-back { position: absolute; inset: 0; overflow: hidden; background: rgba(0,0,0,.55); color: #fff; pointer-events: none; }
.te-edit { position: relative; display: block; resize: vertical; background: transparent; color: transparent; caret-color: #fff; box-shadow: none; }
.te-edit::selection { background: rgba(133, 252, 126, .28); color: transparent; }
.te-edit:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(78,196,78,.2); }
@media (max-width: 640px) { .te-preview, .te-back, .te-edit { font-size: 18px; } }
