/* The map workshop (/editor). Colours, buttons and fields come from ../ui/base.css (.panel, .seg, .primary). */
/* Both workshops are set in the system's plain face, as NetRadiant is: the game's own face stays on the start page and in the game. */
:root { --face: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.site-menu, .site-menu :is(button, a, small, b, span, div) { font-family: Xolonium, 'Trebuchet MS', system-ui, sans-serif; }   /* the site's own menu keeps the game's face */
html, body { margin: 0; height: 100%; background: var(--space); overflow: hidden; }
#app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 6px; padding: 6px 10px; }
#menubar { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 -4px; min-height: calc(1lh + 6px); } /* the height of its buttons, which the script adds: nothing below moves when they come */
#menubar button { padding: 3px 9px; border: 0; border-radius: 3px; background: none; color: inherit; font: inherit; cursor: pointer; }
#menubar button:hover, #menubar button.is-open { background: var(--fill-hover); }
#menubar .site-menu { order: 9; margin-left: auto; } #menubar .site-menu > .top { padding: 2px 9px 2px 6px; border: 1px solid var(--line); background: var(--well); } /* the way to the rest of the site, at the right end of the row */
#bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#bar .gap { flex: 1 1 0; }
#bar select { max-width: 11em; }
#bar .grid { color: var(--haze); font-size: 13px; }
#foot { display: flex; align-items: center; gap: 14px; min-height: 24px; font-size: 13px; }
#foot .status { flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#coords { color: var(--haze); font: 12px var(--mono); white-space: nowrap; }
#console-b { padding: 1px 9px; font-size: 12px; }
#console { position: relative; height: var(--con, 24vh); border: 1px solid var(--line-soft); border-radius: 4px; background: var(--deep); overflow: hidden; }
#log { height: 100%; box-sizing: border-box; margin: 0; padding: 6px 10px; overflow: auto; font: 11px/1.4 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
#log .warn { color: var(--sun); } #log .stage { color: var(--limb); }

/* a panel on each side, the four views between them, as Radiant lays them out */
#work { display: flex; gap: 0; min-height: 0; }
#left { flex: 0 0 var(--left, 270px); } #right { flex: 0 0 var(--right, 248px); } #views { flex: 1 1 0; }
#left, #right { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
#entlist, #right .card { display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; }
#props { flex: 0 1 auto; overflow-y: auto; min-height: 90px; }
.card { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 4px; background: var(--card); }
.card h2 { margin: 0 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.list { overflow-y: auto; min-height: 0; margin: 0 -6px; }
.list button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 6px; border: 0; border-radius: 3px; background: none; color: inherit; font: 12px/1.3 var(--mono); text-align: left; cursor: pointer; }
.list button:hover { background: var(--fill-hover); }
.list button.is-current { background: var(--fill); outline: 1px solid var(--limb); outline-offset: -1px; }
.list button span { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list button small { color: var(--haze); }
.list i { flex: none; width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--line-soft); }
.list p { margin: 0 6px; color: var(--haze); font-size: 12px; }

#views { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; min-width: 0; min-height: 0; }
.pane { position: relative; min-width: 0; min-height: 0; border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; background: var(--paper); }
.pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; outline: 0; }
.pane:focus-within { border-color: var(--limb); }
.pane .tag { position: absolute; left: 6px; top: 5px; display: flex; align-items: center; gap: 6px; color: var(--tagc, var(--haze)); font-size: 12px; pointer-events: none; text-shadow: 0 0 4px var(--tagsh, var(--deep)), 0 0 4px var(--tagsh, var(--deep)); }
#p-cam .tag { color: var(--haze); text-shadow: 0 0 4px var(--paper), 0 0 4px var(--paper); } /* the camera's picture is not the scheme's paper */
.pane .tag button { pointer-events: auto; padding: 0 5px; font-size: 13px; line-height: 1.3; opacity: .7; }
.pane .tag button:hover { opacity: 1; }
#views.has-max .pane:not(.is-max) { display: none; }
#views.has-max .pane.is-max { grid-area: 1 / 1 / 3 / 3; }
#views .pane.is-off { display: none; }
#c3 { cursor: grab; }

#props { display: grid; gap: 8px; }
#props h2 { margin: 0; font-size: 15px; }
#props p { margin: 0; color: var(--haze); font-size: 13px; }
#props .kv { display: grid; grid-template-columns: minmax(0, 5.5em) minmax(0, 1fr) auto; gap: 4px; align-items: center; }
#props .kvp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 4px; align-items: center; margin-bottom: 4px; }
#props .kvp.has-aid { grid-template-columns: minmax(0, 1fr) 26px auto; }
#props .kvp-name { grid-column: 1 / -1; font-size: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
#props .kvp-name small { font: 11px var(--mono); opacity: .55; }
#props .kvp input { width: 100%; box-sizing: border-box; min-width: 0; font: 12px/1.3 var(--mono); padding: 4px 6px; }
#props .kvp input[type=color] { padding: 0; height: 24px; border: 0; background: none; }
#props .kvp button { padding: 2px 7px; }
#props .kv-note { font-size: 12px; opacity: .75; margin: 4px 0; }
#props .kv-foot { display: inline-flex; gap: 6px; align-items: center; }
#props .kv input { width: 100%; box-sizing: border-box; min-width: 0; font: 12px/1.3 var(--mono); padding: 4px 6px; }
#props .kv button { padding: 2px 7px; }
#props .row { display: flex; flex-wrap: wrap; gap: 6px; }
#props label.wide { display: grid; gap: 4px; color: var(--haze); font-size: 12px; }
#props label.wide :is(input, select) { width: 100%; box-sizing: border-box; }

/* a dropped menu, and the entity menu of a right click */
#menu { position: fixed; z-index: 100; min-width: 190px; max-height: calc(100vh - 70px); box-sizing: border-box; color: var(--cloud); font: 400 14px/1.4 var(--face); overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); box-shadow: 0 8px 24px rgb(0 0 0 / .5); }
#menu[hidden] { display: none; }
#menu h3 { margin: 6px 8px 2px; font-size: 11px; font-weight: 600; color: var(--haze); }
#menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
#menu button kbd { float: right; margin-left: 24px; color: var(--haze); font: inherit; }
#menu button:disabled { color: var(--haze); opacity: .55; cursor: default; background: none; }
#menu button { display: block; width: 100%; padding: 4px 8px; border: 0; border-radius: 3px; background: none; color: inherit; font: 12px/1.3 var(--mono); text-align: left; cursor: pointer; }
#menu button:hover, #menu button:focus-visible { background: var(--fill-hover); }

#keys { color-scheme: dark; max-width: min(980px, 94vw); max-height: 90vh; box-sizing: border-box; overflow: auto; font: 400 14px/1.4 var(--face); color: var(--cloud); padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: inherit; }
#keys::backdrop { background: var(--veil); }
#keys h2 { margin: 0 0 4px; font-size: 18px; }
#keys p { margin: 0 0 12px; color: var(--haze); }
#keys .cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 28px; margin-bottom: 14px; }
#keylist { display: block; columns: 2; column-gap: 28px; } #keylist tr { display: flex; break-inside: avoid; } #keylist th { flex: 0 0 9em; }
#keys table { border-collapse: collapse; font-size: 13px; }
#keys caption { text-align: left; font-weight: 600; padding-bottom: 4px; }
#keys th { text-align: left; font-weight: 400; color: var(--sun); padding: 2px 14px 2px 0; white-space: nowrap; }
#keys td { padding: 2px 0; }

/* a narrow screen: panels under the views, the page scrolls */
@media (max-width: 1000px) {
	html, body { overflow: auto; height: auto; }
	#app { position: static; min-height: 100vh; }
	#work { flex-direction: column; }
	#left, #right { flex: none; }
	#views { order: -1; flex: none; height: 86vh; }
	#entlist, #right .card { max-height: 40vh; flex: none; }
}
@media (max-width: 600px) {
	#views { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)); height: 180vh; }
	#views.has-max { height: 70vh; }
}

/* the texture browser */
#right .card { container-type: inline-size; }
.texwrap { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; gap: 6px; }
#textree { flex: 0 1 34%; min-height: 70px; overflow-y: auto; margin: 0 -6px; }
.texmain { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; }
#texfind { box-sizing: border-box; width: 100%; padding: 4px 6px; font-size: 12px; margin-bottom: 8px; }
/* wide enough: the folders beside the pictures, as in Radiant */
@container (min-width: 430px) { .texwrap { flex-direction: row; gap: 10px; } #textree { flex: 0 0 190px; margin: 0 0 0 -6px; } }
/* a tree of folders: the maps under the toolbar button, the texture folders */
.tree { font: 12px/1.3 var(--mono); }
.tree details > :not(summary) { margin-left: 12px; }
.tree summary, .tree button { display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; padding: 3px 6px; border: 0; border-radius: 3px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tree summary { list-style: none; } .tree summary::-webkit-details-marker { display: none; }
.tree summary::before { content: '▸'; color: var(--haze); width: 9px; flex: none; } .tree details[open] > summary::before { content: '▾'; } .tree details.leaf > summary::before { content: ''; }
.tree summary:hover, .tree button:hover { background: var(--fill-hover); }
.tree .is-current { background: var(--fill); outline: 1px solid var(--limb); outline-offset: -1px; }
.tree small { margin-left: auto; color: var(--haze); }
.drop { position: relative; }
#maptree { position: absolute; z-index: 90; left: 0; top: calc(100% + 4px); width: 260px; max-height: 70vh; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); box-shadow: 0 8px 24px rgb(0 0 0 / .5); }
#maptree[hidden] { display: none; }
#texes { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; align-content: start; overflow-y: auto; min-height: 0; }
#texes p { grid-column: 1 / -1; margin: 0; color: var(--haze); font-size: 12px; }
.tile { display: grid; gap: 2px; padding: 3px; border: 1px solid transparent; border-radius: 3px; background: none; color: inherit; cursor: pointer; min-width: 0; }
.tile:hover { background: var(--fill-hover); }
.tile.is-current { border-color: var(--sun); background: var(--fill); }
.tile :is(img, i) { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 2px; background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 12px 12px; }
.tile span { font: 10px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texink, var(--haze)); }   /* --texink: set with a scheme's own texture background, to read on it */
.tile.is-current span { color: inherit; }

/* the surface inspector */
#right #surf, #right #patchpanel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; flex: none; }
#surf h2, #patchpanel h2 { margin: 0; } #surf p, #patchpanel p { margin: 0; color: var(--haze); font-size: 12px; }
#patchpanel .srow input { width: 4.2em; } #patchpanel .srow select { padding: 3px 5px; }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.srow span { flex: 0 0 3.2em; color: var(--haze); font-size: 12px; }
.srow input { width: 3.6em; min-width: 0; padding: 3px 5px; font: 12px var(--mono); }
.srow button { padding: 2px 7px; min-width: 2em; }

/* bars to drag */
.split { flex: 0 0 8px; cursor: col-resize; position: relative; touch-action: none; }
.split::after, .vbar::after, .hbar::after, .hsplit::after { content: ''; position: absolute; inset: 0; margin: auto; border-radius: 2px; background: transparent; }
.split::after { width: 2px; height: 100%; } .split:hover::after, .split.is-held::after { background: var(--limb); }
.vbar, .hbar { position: absolute; z-index: 2; touch-action: none; }
.vbar { left: calc(var(--vx, 50%) - 4px); top: 0; bottom: 0; width: 8px; cursor: col-resize; } .vbar::after { width: 2px; height: 100%; }
.hbar { top: calc(var(--vy, 50%) - 4px); left: 0; right: 0; height: 8px; cursor: row-resize; } .hbar::after { height: 2px; width: 100%; }
.vbar:hover::after, .hbar:hover::after, .vbar.is-held::after, .hbar.is-held::after, .hsplit:hover::after, .hsplit.is-held::after { background: var(--limb); }
#views.has-max .vbar, #views.has-max .hbar { display: none; }
.hsplit { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 8px; cursor: row-resize; touch-action: none; } .hsplit::after { height: 2px; width: 100%; }
@media (max-width: 1000px) { .split, .vbar, .hbar { display: none; } }

#keys header { position: sticky; top: -18px; z-index: 1; display: flex; align-items: center; gap: 12px; margin: -18px -20px 10px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line-soft); }
#keys header h2 { margin: 0; } #keyfind { flex: 1 1 0; min-width: 0; padding: 5px 8px; }
#keys tr[hidden], #keys table[hidden] { display: none !important; }

/* the New map and Mapinfo dialogs */
.sheet { color-scheme: dark; width: min(720px, 94vw); max-height: 90vh; box-sizing: border-box; overflow: auto; font: 400 14px/1.4 var(--face); color: var(--cloud); padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.sheet::backdrop { background: var(--veil); }
.sheet header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .sheet header h2 { margin: 0; font-size: 18px; flex: 1 1 0; }
.sheet p { margin: 0 0 12px; color: var(--haze); }
.sheet label { display: grid; gap: 3px; margin-bottom: 10px; font-size: 13px; color: var(--haze); }
.sheet input:not([type=checkbox]), .sheet textarea { font: inherit; color: var(--cloud); background: var(--deep); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }
.sheet textarea { font-family: ui-monospace, monospace; font-size: 12px; resize: vertical; }
.sheet fieldset { border: 1px solid var(--line-soft); border-radius: 4px; margin: 0 0 10px; padding: 8px 10px; } .sheet legend { font-size: 13px; color: var(--haze); padding: 0 4px; }
#info-types { display: flex; flex-wrap: wrap; gap: 4px 16px; } #info-types label { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--cloud); }
/* New map: kinds down the left, a search, cards that scroll by themselves. Made to hold many templates: pictures are drawn only when their card comes into view. */
#starters { width: min(1120px, calc(100vw - 32px)); height: min(760px, 90vh); overflow: hidden; }
#starters[open] { display: flex; flex-direction: column; }
#starters header input { flex: 0 1 260px; min-width: 0; }
#starterbody { flex: 1; min-height: 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
#starternav, #prefs-nav { display: flex; flex-direction: column; gap: 2px; overflow: auto; }
#starternav button, #prefs-nav button { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 7px 10px; border: 0; background: none; font-weight: 400; color: var(--cloud); border-radius: 3px; }
#starternav h3 { margin: 12px 10px 4px; font-size: 12px; font-weight: 600; color: var(--haze); }
#starternav button small { color: var(--haze); font-size: 12px; }
#starternav button:hover, #prefs-nav button:hover { background: var(--now); }
#starternav button.is-current, #prefs-nav button.is-current { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); }
#starterside { min-height: 0; overflow: auto; padding-right: 4px; }
#starterlist h3 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--haze); }
#starterlist h3:first-child { margin-top: 0; }
#starterlist .starter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
#starterlist canvas { width: 100%; height: auto; aspect-ratio: 232 / 124; background: var(--well); border-radius: 3px; }
#starterlist button small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#starterlist .none { color: var(--haze); }
@media (max-width: 700px) { #starterbody { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } #starternav { flex-direction: row; flex-wrap: wrap; } }
#starterlist button { display: grid; gap: 4px; text-align: left; padding: 10px 12px; height: 100%; align-content: start; }
#starterlist button small { color: var(--haze); font-size: 12px; font-weight: 400; white-space: normal; }
.sheet label.tick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--cloud); margin-bottom: 6px; } .sheet select { font: inherit; }
.sheet fieldset p { margin: 0 0 8px 22px; font-size: 12px; }
#classpick header input { flex: 2 1 0; min-width: 0; } #cp-list { display: grid; gap: 4px; }
#cp-list button { display: grid; grid-template-columns: 15em minmax(0, 1fr); gap: 10px; text-align: left; padding: 6px 10px; align-items: baseline; }
#cp-list button small { color: var(--haze); font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#props .desc { font-size: 12px; color: var(--haze); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#props .flags { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; margin: 4px 0 8px; } #props .flags label { display: flex; align-items: center; gap: 4px; }
#props select.addkey { max-width: 11em; }
#is-list { display: grid; gap: 4px; } #is-list button { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 10px; text-align: left; padding: 7px 10px; align-items: baseline; }
#is-list button b { color: var(--sun); text-align: right; } #is-list button span { white-space: normal; font-weight: 400; } #is-list button small { grid-column: 2; color: var(--haze); font-size: 12px; font-weight: 400; white-space: normal; }
#texes { background: var(--texback, transparent); }

#stats { position: absolute; left: 6px; bottom: 5px; margin: 0; padding: 4px 7px; font: 11px/1.45 ui-monospace, monospace; color: var(--haze); background: rgb(7 12 22 / .72); border-radius: 4px; pointer-events: none; }
#props .kv.has-aid { grid-template-columns: minmax(0, 5.5em) minmax(0, 1fr) 26px auto; }
#props .kv input[type=color] { padding: 0; height: 24px; border: 0; background: none; }
.sheet select { color: var(--cloud); background: var(--deep); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
/* the CSG tool: stays open beside the views while brushes are picked and changed */
.sheet.float { position: fixed; inset: 96px 24px auto auto; width: 350px; margin: 0; z-index: 30; box-shadow: 0 8px 30px rgb(0 0 0 / .5); }
.sheet .row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; } .sheet .row input[type=number] { width: 6em; padding: 3px 6px; } .sheet .row label { margin: 0; }
.sheet label.tick { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-bottom: 4px; cursor: pointer; white-space: nowrap; } .sheet label.tick input { flex: none; } .sheet.float fieldset { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 4px; }
#texes.is-natural { display: flex; flex-wrap: wrap; align-items: flex-end; } #texes.is-natural .tile :is(img, i) { aspect-ratio: auto; }
#texes.is-opaque .tile img { filter: url(#opaque); }
#views.is-outlined .pane:focus-within { outline: 1px solid var(--limb); outline-offset: -1px; }
/* the "new texture" window (texmake.js), in both workshops */
#texmake { width: min(820px, 96vw); } .tm-cols { display: flex; flex-wrap: wrap; gap: 16px; } .tm-see { flex: 0 1 384px; min-width: 200px; } .tm-see canvas { width: 100%; aspect-ratio: 1; border: 1px solid var(--line-soft); border-radius: 4px; cursor: crosshair; touch-action: none; display: block; margin-bottom: 6px; }
.tm-set { flex: 1 1 260px; min-width: 0; } .tm-set label { grid-template-columns: 9em 1fr; align-items: center; } .tm-set h3 { margin: 14px 0 4px; font-size: 14px; } .tm-set input[type=color] { width: 3.2em; padding: 0; height: 1.9em; } .tm-pair { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; } .tm-pair label { grid-template-columns: auto auto; }

/* "Wait" (busy.js): over everything while something large is read or written. Shown late, so quick work shows nothing. */
#busy { position: fixed; inset: 0; width: auto; height: auto; margin: 0; padding: 0; border: 0; z-index: 1000; display: none; place-items: center; background: var(--veil); color: var(--cloud); cursor: progress; opacity: 0; }
#busy.is-on { display: grid; animation: busy-in .18s .25s both; }
#busy > div { display: flex; align-items: center; gap: 14px; max-width: min(86vw, 460px); padding: 16px 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font: 15px/1.35 var(--face); box-shadow: 0 12px 40px rgb(0 0 0 / .5); }
#busy i { flex: none; width: 22px; height: 22px; border: 3px solid var(--line-soft); border-top-color: var(--limb); border-radius: 50%; animation: busy-turn .8s linear infinite; }
#busy span { overflow-wrap: anywhere; }
@keyframes busy-in { to { opacity: 1; } }
@keyframes busy-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #busy i { animation-duration: 2.4s; } }
#props h3 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--haze); }

/* the Track panel: takes the entity list's place while it is on show */
#entlist[hidden], #trackpanel[hidden] { display: none; }
#trackpanel { flex: 1 1 55%; min-height: 55%; overflow-y: auto; }   /* the inspector above it gives way and scrolls */
#trackpanel h2 { display: flex; align-items: center; } #trackpanel .shut { margin-left: auto; padding: 0 8px; }
#trackpanel .desc { margin: 4px 0 6px; font-size: 12px; color: var(--haze); white-space: normal; }
#trackpanel .desc.lacks { color: var(--sun); }
#trackpanel details { border-top: 1px solid var(--line, rgb(255 255 255 / .09)); padding: 2px 0 6px; }
#trackpanel summary { padding: 6px 0 4px; font-size: 13px; font-weight: 600; color: var(--cloud); cursor: pointer; user-select: none; }
#trackpanel summary:focus-visible { outline: 2px solid var(--now-line); outline-offset: 2px; }
#trackpanel .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 2px 0 6px; }
#trackpanel .tiles button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; font-size: 11px; line-height: 1.15; text-align: center; white-space: normal; }
html.icons #trackpanel .tiles button::before { width: 22px; height: 22px; margin: 0; }
#trackpanel .seg button { min-width: 32px; padding: 4px 0; font-size: 15px; }
#trackpanel button[aria-pressed="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); color: var(--cloud); }
#trackpanel .row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0; }
#trackpanel label.inline { display: flex; gap: 5px; align-items: center; font-size: 12px; color: var(--haze); white-space: nowrap; } #trackpanel label.inline input { width: 64px; }
#trackpanel label.inline input[type="checkbox"] { width: 16px; height: 16px; flex: none; margin: 0; }
#trackpanel .last { margin-top: 4px; padding: 6px 8px 2px; border-radius: 6px; background: var(--zebra); }
#trackpanel .last h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--cloud); } #trackpanel .last h3 button { font-size: 11px; padding: 2px 8px; }
#trackpanel label.field { display: grid; grid-template-columns: 1fr 88px; gap: 6px; align-items: center; font-size: 12px; margin: 3px 0; } #trackpanel label.field input { width: 100%; box-sizing: border-box; }

/* the Terrain window: the picture beside the settings, under them on a narrow page */
.sheet .tn { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.tn > canvas { width: 100%; max-width: 320px; aspect-ratio: 1; background: #070c16; border: 1px solid var(--line); border-radius: 4px; }
.tn-set .seg { display: flex; margin-bottom: 12px; } .tn-set .seg button { flex: 1 1 0; padding: 6px 4px; font-size: 13px; }
.tn-set button[aria-pressed="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); color: var(--cloud); }
.tn-set label > span { display: flex; justify-content: space-between; } .tn-set output { color: var(--cloud); }
.tn-set input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--now-line); }
.tn-set .row { display: flex; gap: 8px; align-items: center; } .tn-set .row input { flex: 1 1 0; min-width: 0; }
.tn-set select { font: inherit; color: var(--cloud); background: var(--deep); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }
.tn-set label.tick { display: flex; gap: 8px; align-items: center; color: var(--cloud); }
@media (max-width: 720px) { .sheet .tn { grid-template-columns: 1fr; } }
.tn-set { min-width: 0; } .tn-set label.tick { align-items: flex-start; } .tn-set label.tick input { flex: none; margin-top: 3px; }
#work[hidden], .space[hidden] { display: none; } .space { min-height: 0; min-width: 0; overflow: auto; } #spaces { margin-right: 4px; } #spaces button { padding: 4px 14px; font-weight: 600; }
#tracktext { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 4px 6px 0; } #tracktext > header { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; } #tracktext > header h2 { margin: 0; font-size: 16px; } #tracktext .tt-where { margin-right: auto; color: var(--haze); font-size: 13px; }
#tracktext h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--haze); } #tracktext h3 small { float: right; font-weight: 400; }
#tracktext .tt { display: grid; grid-template-columns: var(--tt-cols, 270px 8px minmax(0, 5fr) 8px minmax(0, 6fr) 184px); gap: 0 4px; flex: 1 1 0; min-height: 420px; }
/* library | bar | text | bar | picture: each in its own column by name, so a hidden bar (narrow windows) moves nothing */
#tracktext .tt > aside { grid-column: 1; } #tracktext .tt > .split { grid-row: 1; } #tracktext .tt > .split[data-split="ttSide"] { grid-column: 2; } #tracktext .tt > section:nth-of-type(1) { grid-column: 3; } #tracktext .tt > .split[data-split="ttText"] { grid-column: 4; } #tracktext .tt > section:nth-of-type(2) { grid-column: 5; }
#tracktext .tt > #tt-tools { grid-column: 6; margin-left: 6px; padding: 0 2px 0 8px; border-left: 1px solid var(--line-soft); overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
#tt-tools .tt-tg { display: flex; flex-wrap: wrap; gap: 3px; } #tt-tools h4 { flex: 0 0 100%; margin: 0 0 1px; font-size: 12px; font-weight: 600; color: var(--haze); } #tt-tools button { flex: 1 1 auto; justify-content: flex-start; text-align: left; padding: 3px 8px; font-size: 12.5px; white-space: nowrap; }
#tracktext .tt > :is(aside, section) { grid-row: 1; } #tracktext .hsplit { flex: 0 0 8px; position: relative; inset: auto; height: auto; margin: 2px 0; } html.embed #tracktext :is(.split, .hsplit) { display: none; }
/* which of a row of joined buttons is chosen, in every window */
:is(.sheet, .space, #spaces).seg > button[aria-pressed="true"], :is(.sheet, .space) .seg > button[aria-pressed="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); color: var(--cloud); font-weight: 600; } .sheet .seg > button[aria-pressed="false"] { color: var(--haze); }
#tt-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; height: 100%; }
.tt-panel { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; border: 1px solid var(--line-soft); border-radius: 6px; background: rgb(255 255 255 / .02); } .tt-panel.shut { flex: none !important; } .tt-panel.shut > div { display: none !important; } #tt-p-eg { flex-grow: 1.3; }
#tt-side .tt-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 6px 6px 0 0; background: rgb(255 255 255 / .04); font-size: 13px; text-align: left; } .tt-panel.shut .tt-head { border-bottom: 0; border-radius: 6px; } #tt-side .tt-head b { display: inline-flex; align-items: center; font-weight: 600; color: var(--cloud); } #tt-side .tt-head small { margin-left: auto; color: var(--haze); font-size: 12px; } #tt-side .tt-head::after { content: ""; width: 6px; height: 6px; margin-left: 4px; border: solid var(--haze); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); } .tt-panel.shut .tt-head::after { transform: rotate(-45deg); } #tt-side .tt-head:hover { background: rgb(255 255 255 / .08); }
#tt-side .tt-panel > div { padding: 8px 6px 8px 8px; }
#tt-eg, #tt-words, #tt-pats { flex: 1 1 0; overflow: auto; padding-right: 4px; } #tt-side h4 { margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--haze); } #tt-side h4:first-child { margin-top: 0; }
#tt-side h4[data-sub] { margin: 6px 0 2px; } #tt-side :is(#tt-eg, #tt-words, #tt-pats) h4 > button.tt-sub { display: flex; align-items: center; gap: 6px; width: 100%; margin: 0; padding: 3px 6px; border: 0; border-radius: 4px; background: rgb(255 255 255 / .03); font: inherit; color: var(--haze); text-align: left; }
#tt-side :is(#tt-eg, #tt-words, #tt-pats) h4 > button.tt-sub:hover { background: rgb(255 255 255 / .08); color: var(--cloud); } #tt-side :is(#tt-eg, #tt-words, #tt-pats) h4 > button.tt-sub::before { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translate(-1px, -1px); flex: none; }
#tt-side :is(#tt-eg, #tt-words, #tt-pats) h4.shut > button.tt-sub::before { transform: rotate(-45deg); } #tt-side :is(#tt-eg, #tt-words, #tt-pats) h4 > button.tt-sub small { margin-left: auto; font-weight: 400; } #tt-side .tucked { display: none !important; }
#tt-pats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; align-content: start; } #tt-pats > h4, #tt-pats > p { grid-column: 1 / -1; } #tt-pats .tt-pat { position: relative; min-width: 0; } #tt-side #tt-pats button.tt-card { padding: 3px; margin: 0; min-width: 0; }
#tt-side #tt-pats .tt-pat > button.tt-keep { position: absolute; top: 5px; right: 5px; width: auto; padding: 1px 6px; font-size: 11px; color: var(--cloud); border: 1px solid var(--line); background: rgb(10 14 24 / .85); } #tt-side #tt-pats .tt-pat > button.tt-keep:hover { background: var(--now); }
#tt-side #tt-pats .tt-how { margin: 2px 0 6px; } #tt-side #tt-pats .tt-card small { display: block; padding: 0 3px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tt-side #tt-words#tt-words > button { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 8px; align-items: center; } #tt-words > button > :is(canvas, i) { grid-row: 1 / 3; width: 64px; height: 40px; border-radius: 3px; } #tt-words button > canvas { background: rgb(0 0 0 / .25); } #tt-side #tt-words#tt-words > button:has(> i) { display: block; } #tt-words > button > i { display: none; } #tt-words button > code { align-self: end; } #tt-words button > small { align-self: start; }
#tt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; } #tt-tabs > button#tt-tabs-x, #tt-side #tt-tabs > button { justify-content: flex-start; padding: 6px 10px; gap: 7px; font-size: 13px; border-radius: 0; } #tt-tabs > button small { margin-left: auto; }
.tt-folds { display: flex; gap: 6px; } .tt-folds button { flex: 1 1 0; padding: 3px 8px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; } .tt-folds button:disabled { opacity: .4; } #tt-tabs > button { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 3px; font-size: 12.5px; white-space: nowrap; overflow: hidden; } #tt-tabs > button small { color: var(--haze); font-size: 11.5px; } #tt-tabs > button[aria-pressed="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); color: var(--cloud); }
#tt-side .tt-panel[hidden] { display: none; }
#tt-side :is(#tt-eg, #tt-words, #tt-pats) button { display: block; width: 100%; text-align: left; padding: 5px 8px; margin: 0 0 3px; border-color: transparent; background: none; font-size: 13px; line-height: 1.35; }
#tt-side :is(#tt-eg, #tt-words, #tt-pats) button:hover { background: rgb(255 255 255 / .06); } #tt-eg button[aria-current="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); }
#tt-side button b { display: block; font-weight: 600; color: var(--cloud); } #tt-side button code { display: block; font: 12px/1.4 ui-monospace, monospace; color: var(--cloud); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #tt-side button small { color: var(--haze); font-size: 12px; }
#tracktext .tt section { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#tracktext .tt-edit[hidden] { display: none; } #tt-ink2 { position: absolute; inset: 0; margin: 0; padding: 8px 10px; overflow: hidden; pointer-events: none; font: 14px/22px ui-monospace, monospace; color: var(--cloud); tab-size: 2; white-space: pre; } #tt-ink2 .look { color: #c6cf78; } #tt-ink2 .word { color: #7fd6d0; } #tt-ink2 .note { color: var(--haze); font-style: italic; } #tt-ink2 .sign { color: var(--haze); } #tt-ink2 .num { color: var(--sun); } #tt-ink2 .name { color: var(--good); } #tt-ink2 .set { color: #c9a0f0; }
#tt-strafeskin { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; margin: 0; padding: 8px 10px; border: 0; background: none; color: transparent; caret-color: var(--cloud); font: 14px/22px ui-monospace, monospace; tab-size: 2; white-space: pre; resize: none; overflow: auto; } #tt-strafeskin:focus-visible { outline: none; } #tt-strafeskin::placeholder { color: var(--haze); opacity: .7; } #tt-which { margin-right: 6px; }
#tracktext .tt-edit { position: relative; flex: 1 1 0; min-height: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--deep); overflow: hidden; }
#tt-text { position: absolute; inset: 0 7.4em 0 2.6em; box-sizing: border-box; width: calc(100% - 10em); height: 100%; border: 0; background: none; resize: none; font: 14px/22px ui-monospace, monospace; color: var(--cloud); padding: 8px 6px 8px 10px; tab-size: 2; white-space: pre; overflow: auto; }
/* the text in colour lies under the field, whose own letters are not drawn: same box, same letters, moved as the field scrolls */
#tt-ink { position: absolute; inset: 0 7.4em 0 2.6em; margin: 0; overflow: hidden; pointer-events: none; font: 14px/22px ui-monospace, monospace; color: var(--cloud); tab-size: 2; white-space: pre; }
#tt-ink > div { padding: 8px 6px 8px 10px; } #tt-text { color: transparent; caret-color: var(--cloud); }
#tt-ink .note { color: var(--haze); font-style: italic; } #tt-ink .name { color: var(--good); } #tt-ink .piece { color: var(--limb); font-weight: 600; } #tt-ink .made, .tt-kinds .made { color: #f29cc0; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; } #tt-ink .look, .tt-kinds .look { color: #c6cf78; } #tt-ink .set, .tt-kinds .set { color: #c9a0f0; } .tt-kinds .piece { color: var(--limb); font-weight: 600; } .tt-kinds { margin: 0 0 4px; font: 12px ui-monospace, monospace; display: flex; gap: 14px; } .tt-kinds span { cursor: help; } #tt-ink .word { color: #7fd6d0; } #tt-ink .num { color: var(--sun); } #tt-ink .sign { color: var(--haze); }
#tt-gutter { position: absolute; top: 0; right: 0; width: 7.4em; height: 100%; border-left: 1px solid var(--line-soft); overflow: hidden; pointer-events: none; font: 12px/22px ui-monospace, monospace; text-align: right; }
#tt-gutter > div { padding-top: 8px; } #tt-gutter > div > div { height: 22px; padding-right: 6px; border-right: 3px solid transparent; white-space: nowrap; }
#tt-gutter .hot { background: rgb(255 255 255 / .07); } #tt-gutter .bad { border-color: #e5484d; color: var(--bad) !important; } #tt-gutter .warn { border-color: #e2a336; }
#tt-notes { list-style: none; margin: 8px 0 0; padding: 0; max-height: 92px; overflow: auto; font-size: 13px; line-height: 1.5; }
#tt-notes li { padding: 2px 10px 2px 7px; border-left: 3px solid transparent; cursor: pointer; } #tt-notes li b { font-weight: 600; margin-right: .4em; }
#tt-notes .bad { border-color: #e5484d; color: var(--bad); } #tt-notes .warn { border-color: #e2a336; }
#tt-plan, #tt-graph { box-sizing: border-box; width: 100%; border: 1px solid var(--line); border-radius: 4px; background: var(--deep); } #tt-plan { flex: 1 1 0; min-height: 0; margin-bottom: 0; cursor: pointer; } #tt-graph { flex: none; height: var(--tt-graph, 150px); }
#tracktext .tt-key { display: inline-block; width: 7em; height: .6em; margin-right: .4em; border-radius: 2px; background: linear-gradient(90deg, rgb(72 118 196), rgb(70 170 150), rgb(222 186 72), rgb(228 96 70)); }
#tt-view { display: inline-flex; margin-right: .5em; vertical-align: middle; } #tt-view button { padding: 2px 9px; font-size: 12px; }
#tt-sum { margin: 12px 0; color: var(--cloud); }
#tt-nums { position: absolute; top: 0; left: 0; width: 2.6em; height: 100%; overflow: hidden; pointer-events: none; font: 12px/22px ui-monospace, monospace; text-align: right; color: var(--haze); opacity: .7; } #tt-nums > div { padding-top: 8px; }
#tt-band { position: absolute; left: 0; right: 0; height: 22px; background: rgb(255 255 255 / .06); pointer-events: none; }
#tracktext .tt section { position: relative; } #tt-tip { position: absolute; z-index: 2; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--deep); font: 12px/1.5 ui-monospace, monospace; color: var(--cloud); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
#tracktext #tt-text:focus-visible { outline: none; }
#tt-ink .ln { height: 22px; } #tt-ink .ln.bad { text-decoration: underline wavy #e5484d; text-underline-offset: 4px; text-decoration-skip-ink: none; } #tt-ink .ln.warn { text-decoration: underline wavy #e2a336; text-underline-offset: 4px; text-decoration-skip-ink: none; }
#tt-sig { flex: none; margin: 6px 0 0; padding: 4px 8px; min-height: 1.5em; border-left: 3px solid var(--line-soft); font: 12px/1.5 ui-monospace, monospace; color: var(--haze); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #tt-sig.bad { border-color: #e5484d; color: var(--bad); white-space: normal; } #tt-sig.warn { border-color: #e2a336; color: var(--cloud); white-space: normal; }
#tt-auto { position: absolute; z-index: 3; min-width: 240px; max-width: 460px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: var(--deep); box-shadow: 0 6px 18px rgb(0 0 0 / .5); font-size: 12px; } #tt-auto > div { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 2px 8px; border-radius: 3px; cursor: pointer; white-space: nowrap; } #tt-auto > div.on { background: var(--now); } #tt-auto code { font: 13px/1.6 ui-monospace, monospace; color: var(--cloud); } #tt-auto small { color: var(--haze); overflow: hidden; text-overflow: ellipsis; }
#tools.away { display: none; } #tt-around { width: min(780px, 96vw); } .tt-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 22px; } .tt-count { display: grid; grid-template-columns: 1fr 5.2em auto 5.2em; align-items: center; gap: 6px; } .tt-count label { margin: 0 !important; } .tt-count input[type="number"] { width: 100%; } #tt-rn { flex: 1 1 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 6px 8px 8px; font-size: 13px; } #tt-rn .tt-rn-row { gap: 6px 10px; } #tt-rn .tt-rn-row label { flex: 1 1 auto; } #tt-rn select { flex: 1 1 0; min-width: 0; } #tt-rn label.tick { display: flex; align-items: center; gap: 6px; margin: 0; } #tt-rn #tt-rn-packs { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
#tt-rn #tt-rn-kinds { display: flex; flex-direction: column; gap: 8px; } #tt-rn #tt-rn-kinds label.tick small { margin-left: auto; min-width: 2em; text-align: right; color: var(--good); font: 12px ui-monospace, monospace; } #tt-rn #tt-rn-kinds label.tick small.none { color: var(--haze); } #tt-side #tt-words .tt-also { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 6px 12px; padding-left: 8px; border-left: 2px solid var(--line-soft); } #tt-side #tt-words button[hidden] + .tt-also, #tt-side #tt-words .tt-also.tucked { display: none; } #tt-side #tt-words .tt-also .tt-chip { all: unset; cursor: pointer; font-size: 12px; padding: 1px 7px; border: 1px solid var(--line-soft); border-radius: 10px; } #tt-side #tt-words .tt-also .tt-chip:hover, #tt-side #tt-words .tt-also .tt-chip:focus-visible { border-color: var(--cloud); } #tt-side #tt-words .tt-also .tt-chip i { font-style: normal; opacity: .6; }
#tt-rn .tt-how { margin: 4px 0; }
#tt-rn .tt-rn-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; } #tt-rn .tt-rn-kind[hidden], #tt-rn .tt-rn-sizes[hidden] { display: none; } #tt-rn .tt-rn-kind > label.tick { flex: 1 1 0; min-width: 0; } #tt-rn .tt-rn-more { padding: 0 6px; font-size: 11.5px; line-height: 1.5; opacity: .7; } #tt-rn .tt-rn-more.own { opacity: 1; color: var(--good); border-color: var(--good); }
#tt-rn .tt-rn-sizes { flex: 1 1 100%; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; margin: 3px 0 6px 26px; } #tt-rn .tt-rn-sizes label { display: contents; } #tt-rn .tt-rn-sizes span { font: 12px ui-monospace, monospace; opacity: .8; } #tt-rn .tt-rn-sizes input { min-width: 0; font: 12px ui-monospace, monospace; padding: 2px 6px; } #tt-rn .tt-rn-sizes input.own { border-color: var(--good); } #tt-rn .tt-rn-sizes input.bad { border-color: #e06c6c; }
#tt-rn #tt-rn-every, #tt-rn #tt-rn-none { padding: 2px 10px; } #tt-rn #tt-rn-kinds fieldset.off .tt-rn-kind { opacity: .45; } #tt-rn #tt-rn-kinds legend { display: flex; align-items: center; gap: 8px; } #tt-rn #tt-rn-kinds legend label.tick { font-weight: 600; } #tt-rn .tt-rn-alln { padding: 1px 8px; font-size: 12px; font-weight: 400; } #tt-rn #tt-rn-by button { padding: 2px 10px; } #tt-rn #tt-rn-all { align-self: flex-start; margin-top: 4px; } .tt-rn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; } .tt-rn-row label { display: flex; align-items: center; gap: 6px; margin: 0 !important; } .tt-rn-row input[type="number"] { width: 4.5em; } #tt-rn-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; } #tt-rn-kinds fieldset { margin: 0; padding: 6px 10px 8px; border: 1px solid var(--line-soft); border-radius: 6px; } #tt-rn-kinds legend button { padding: 1px 8px; font-size: 12.5px; font-weight: 600; } .tt-scene { display: grid; gap: 12px; } .tt-scene p { margin: 0; color: var(--haze); font-size: 13px; } .tt-scene > label { display: flex; align-items: center; gap: 8px; }  .tt-counts input[type="number"] { width: 100%; box-sizing: border-box; } .tt-counts span { color: var(--haze); } .tb-space { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; } .tb-space[hidden] { display: none; } .tb-space .grp { display: flex; align-items: center; gap: 3px; } .tb-space .grp > b { color: var(--haze); font-size: 12px; font-weight: 600; margin-right: 4px; } .tb-space button { padding: 3px 10px; font-size: 12.5px; }
#tt-graph { cursor: pointer; }
/* the side column: tabs, a link to the guide, Find; examples as cards with a picture, pieces as two short lines each */
#tt-side .tt-top { display: flex; align-items: center; gap: 10px; } #tt-guide { color: var(--cloud); font-size: 12.5px; white-space: nowrap; } #tt-guide:hover { text-decoration-thickness: 2px; }
#tt-find { flex: 1; min-width: 0; box-sizing: border-box; padding: 4px 8px; font-size: 13px; }
#tt-eg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; align-content: start; } #tt-eg[hidden] { display: none; } #tt-eg > h4, #tt-eg > #tt-mine, #tt-eg > #tt-dice { grid-column: 1 / -1; } #tt-pats > [hidden], #tt-eg > [hidden], #tt-words > [hidden] { display: none !important; }
#tt-side #tt-eg button.tt-card { padding: 3px; margin: 0; min-width: 0; }
#tt-eg .tt-kept { position: relative; min-width: 0; } #tt-side #tt-eg .tt-kept > button.tt-card { width: 100%; } #tt-side #tt-eg .tt-kept > button.tt-drop { position: absolute; top: 5px; right: 5px; width: auto; padding: 0 6px; font-size: 13px; line-height: 18px; color: var(--cloud); border: 1px solid var(--line); background: rgb(10 14 24 / .85); } #tt-side #tt-eg .tt-kept > button.tt-drop:hover { background: var(--now); } .tt-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; border-radius: 2px; background: var(--deep); }
#tt-side .tt-card b { font-size: 12px; font-weight: 500; padding: 3px 3px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tt-side :is(#tt-words, #tt-pats) button { padding: 3px 8px; margin: 0 0 1px; } #tt-side :is(#tt-words, #tt-pats) button small { line-height: 1.3; }
.tb-space .grp.end { margin-left: auto; } .tb-space button.lead { padding: 3px 12px; font-weight: 600; color: #fff; background: #6b3fa0; border-color: #b592e6; } .tb-space button.lead:hover { background: #7d4dba; } .tb-space .pick { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--haze); } .tb-space .pick span:empty { display: none; } #tt-worn { display: inline-flex; gap: 2px; margin-left: 4px; } #tt-worn button { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--deep) center / cover; } #tt-worn button:hover { border-color: var(--cloud); transform: scale(1.9); z-index: 3; position: relative; } .tb-space .pick select { padding: 2px 4px; font-size: 12.5px; }
#tt-side #tt-eg #tt-dice { display: flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; padding: 7px 10px; margin: 0 0 4px; border: 1px solid #b592e6; background: rgb(107 63 160 / .35); } #tt-side #tt-eg #tt-dice:hover { background: rgb(107 63 160 / .6); } #tt-side #tt-dice b { display: inline-flex; align-items: center; color: #fff; } #tt-dice[hidden] { display: none !important; } #tt-words button[aria-current="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); } .tb-space button.primary { padding: 3px 14px; font-weight: 600; }
#tracktext .tt-foot { margin: 8px 0 6px; } #tracktext .tt-foot .tt-where { color: var(--haze); margin-left: 8px; }
#tt-side .tt-lead, #tt-side .tt-how { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--haze); } #tt-side .tt-how { padding: 6px 8px; border-left: 2px solid var(--line); }
#tt-side :is(#tt-words, #tt-pats) button code { margin: 1px 0; } :is(#tt-words, #tt-pats) code .piece { color: var(--limb); font-weight: 600; } :is(#tt-words, #tt-pats) code .made { color: #f29cc0; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; } :is(#tt-words, #tt-pats) code .look { color: #c6cf78; } :is(#tt-words, #tt-pats) code .set { color: #c9a0f0; } :is(#tt-words, #tt-pats) code .word { color: #7fd6d0; } :is(#tt-words, #tt-pats) code .num { color: var(--sun); } :is(#tt-words, #tt-pats) code .name { color: var(--good); } :is(#tt-words, #tt-pats) code .note { color: var(--haze); } #tt-words .tt-how + h4 { margin-top: 0; } #tt-mine[hidden] + h4 { margin-top: 0; } #tt-mine { border-bottom: 1px solid var(--line-soft) !important; margin-bottom: 8px !important; }
@media (max-width: 900px) { #tracktext .tt { grid-template-columns: 1fr; height: auto; gap: 16px; } #tracktext .tt > :is(aside, section) { grid-column: 1 !important; grid-row: auto !important; } #tracktext :is(.split, .hsplit) { display: none; } #tt-graph { height: 150px; } #tt-side { height: 420px; } #tt-plan { flex: none; height: 240px; } #tracktext .tt-edit { min-height: 240px; } #tt-plan { height: 220px; } }

/* Open or import, and Export */
#bring-drop { display: grid; gap: 4px; width: 100%; padding: 18px 16px; margin-bottom: 12px; text-align: center; border: 1px dashed var(--line); border-radius: 6px; background: var(--deep); cursor: pointer; }
#bring-drop b { font-size: 15px; font-weight: 600; } #bring-drop small { color: var(--haze); font-size: 12px; }
#bring-drop:hover, .dropping #bring-drop { border-color: var(--edge); background: var(--now); }
#bring-list { display: grid; gap: 2px; } #bring-list > p { margin: 4px 0 0; font-size: 13px; }
.bring-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; }
.bring-row:nth-child(odd) { background: var(--zebra); } .bring-row.in { margin-left: 22px; } .bring-row.bad .kind, .bring-row.bad small { color: var(--bad); }
.bring-row .kind { font-size: 12px; color: var(--haze); } .bring-row b { font-weight: 600; overflow-wrap: anywhere; } .bring-row small { display: block; color: var(--haze); font-size: 12px; }
.bring-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .bring-row .acts button { padding: 3px 10px; font-size: 13px; }
#ex-kind { display: flex; margin-bottom: 10px; } #ex-kind > button { flex: 1 1 0; }
#ex-what { margin-bottom: 10px; } #ex-build p { font-size: 12px; margin: -4px 0 10px; } #ex-pickedrow { margin-bottom: 10px; }
#ex-list { list-style: none; margin: 0; padding: 8px 10px; max-height: 190px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 4px; font: 12px/1.6 ui-monospace, monospace; }
#ex-list li { display: flex; justify-content: space-between; gap: 12px; } #ex-list li span { color: var(--haze); white-space: nowrap; } #ex-list li.more { font-family: var(--face); color: var(--haze); }
.sheet [hidden] { display: none !important; }   /* a row with a display of its own (label.tick, fieldset) must still hide */
/* Help, About (menus.js), in both workshops */
#about-box { width: min(560px, 94vw); } #about-box h3 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--haze); }
#about-box ul { margin: 0; padding-left: 18px; line-height: 1.7; } #about-box a { color: var(--limb); }
#about-box .names { color: var(--cloud); font-size: 15px; line-height: 1.7; margin-bottom: 6px; }
/* Preferences, Extensions */
#prefs-ext label.tick { align-items: flex-start; white-space: normal; margin-bottom: 8px; } #prefs-ext label.tick input { margin-top: 3px; }
#prefs-ext small { display: block; color: var(--haze); font-size: 12px; } #prefs-ext button { margin-top: 4px; }
/* Preferences: pages at the left, as New map */
#prefs { width: min(760px, calc(100vw - 32px)); height: min(520px, 90vh); overflow: hidden; } #prefs[open] { display: flex; flex-direction: column; }
#prefs-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
#prefs-list { min-height: 0; overflow: auto; padding-right: 4px; } #prefs-list h3 { margin: 0 0 10px; font-size: 15px; } #prefs-list section > p { color: var(--haze); font-size: 12px; margin: 0 0 10px; }
@media (max-width: 620px) { #prefs-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 10px; } #prefs-nav { flex-direction: row; flex-wrap: wrap; } }
/* NetRadiant's toolbars: rows of icon buttons under the page's own bar */
#tools { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; } #tools[hidden], .tb[hidden] { display: none; }
.tb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; } .tb-gap { width: 8px; }
.tb button { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-color: transparent; background: none; }
.tb button::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.tb button:hover:not(:disabled) { background: var(--now); } .tb button:disabled { opacity: .35; }
.tb button[aria-pressed="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); }
#bar.has-tb > :is(#undo, #redo, .seg:not(#spaces)) { display: none; }
#about-box:has(.with-pic) { width: min(980px, 94vw); } .about-body.with-pic { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; align-items: start; }
#about-box .about-pic { display: block; width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 760px) { .about-body.with-pic { grid-template-columns: 1fr; gap: 12px; } }
.pl-kinds { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 12px; } .pl-kinds label.tick { margin: 0; } #plants > header { gap: 8px; }
/* the shape library (ext/shapes.js) */
.sheet .tn.sh { grid-template-columns: 190px minmax(0, 1fr); } .sh-list { display: flex; flex-direction: column; gap: 2px; max-height: 72vh; overflow: auto; } .sheet:has(.tn.sh) { width: min(860px, 94vw); min-height: min(700px, 86vh); }
.sh-list h3 { margin: 10px 0 2px; font-size: 12px; color: var(--mist); font-weight: 600; } .sh-list h3:first-child { margin-top: 0; }
.sh-list button { text-align: left; padding: 5px 8px; font-size: 13px; } .sh-list button[aria-pressed="true"] { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-line); color: var(--cloud); }
.sh-pic { display: grid; place-items: center; margin-bottom: 12px; padding: 8px; background: var(--deep); border: 1px solid var(--line); border-radius: 4px; } .sh-pic canvas { width: min(100%, 460px); height: auto; }
@media (max-width: 720px) { .sheet .tn.sh { grid-template-columns: 1fr; } .sh-list { max-height: 30vh; } }
/* a button and the small one beside it that opens its settings */
.pair { display: inline-flex; }
.pair > button:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pair > .more { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; padding-inline: .5em; min-width: 0; }
#buttonset { width: min(34rem, 94vw); }
#buttonset textarea { width: 100%; box-sizing: border-box; font-family: var(--mono, monospace); }
/* The Track tab as the picture of another page (editor/?embed#track): only its picture and graph, filling the frame. */
html.embed #menubar, html.embed #bar, html.embed #foot, html.embed .tb-space, html.embed #tt-side, html.embed #tt-tools, html.embed #tracktext .tt > section:nth-of-type(1), html.embed .tt-foot { display: none !important; }
html.embed #tracktext { padding: 0; } html.embed #tracktext .tt { display: block; min-height: 0; height: 100%; } html.embed #tracktext .tt > section { height: 100%; } html.embed #tt-graph { height: 110px; flex: none; } html.embed #tt-plan { margin-bottom: 6px; }
html.embed, html.embed body { background: transparent; } html.embed body { visibility: hidden; } html.embed #tracktext { visibility: visible; }   /* in a frame only the track's picture is ever seen: not the map editor while the page starts */ html.embed dialog { display: none; }
html.embed #tracktext { position: fixed; inset: 0; height: auto; z-index: 30; background: var(--ink); }
html.embed #tracktext .tt { display: flex; flex: 1 1 0; } html.embed #tracktext .tt > section { flex: 1 1 0; height: auto; } html.embed #tt-plan { flex: 1 1 0 !important; height: auto !important; min-height: 0; } html.embed #tt-graph { height: 96px !important; }

/* The simple view (editor/?simple): the Track tab alone. The menus, the Map tab and the map's own tools are not shown; Compile, Try in game and Export stay. */
#simple-head { display: none; }
html.simple #simple-head { display: flex; align-items: center; gap: 14px; padding: 0 8px; } html.simple #simple-head b { font-size: 14px; } html.simple #simple-head a { font-size: 13px; }
html.simple #menubar > button, html.simple #spaces, html.simple #bar > .drop:first-of-type, html.simple #bar > .grid, html.simple #undo, html.simple #redo, html.simple #bar > .seg[role="group"], html.simple #bring-b { display: none !important; }
/* Random panel: how often a kind comes, and the limits of climb and fall */
/* The Random panel: settings as one grid (what | choice), sections one line each (tick and name | of 100 | how often | sizes) */
#tt-rn .tt-rn-set { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 10px; align-items: center; } #tt-rn .tt-rn-set > h4 { grid-column: 1 / -1; margin: 8px 0 0; } #tt-rn .tt-rn-set > h4:first-child { margin-top: 0; } #tt-rn .tt-rn-set > :is(label, span:not(.tt-rn-pair)) { margin: 0; color: var(--cloud); }
#tt-rn .tt-rn-set select, #tt-rn .tt-rn-set input[type="number"] { width: 100%; min-width: 0; box-sizing: border-box; padding: 3px 6px; font-size: 13px; } #tt-rn .tt-rn-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; } #tt-rn .tt-rn-pair i { font-style: normal; color: var(--haze); font-size: 12px; }
#tt-rn .tt-rn-ticks { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
#tt-rn .tt-rn-bar { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-soft); } #tt-rn .tt-rn-bar b { color: var(--cloud); font-weight: 600; margin-right: auto; } #tt-rn .tt-rn-bar button { padding: 2px 9px; font-size: 12.5px; }
#tt-rn .tt-rn-key { display: grid; grid-template-columns: minmax(0, 1fr) 3.2em 3.3em 3.4em; gap: 0 5px; margin: 0 7px -4px 9px; color: var(--haze); font-size: 11px; } #tt-rn .tt-rn-key span:nth-child(2) { text-align: right; color: var(--good); }
#tt-rn #tt-rn-kinds fieldset { padding: 4px 6px 6px 8px; min-width: 0; } #tt-rn .tt-rn-kind { display: grid; grid-template-columns: minmax(0, 1fr) 2.2em 3.3em 3.4em; gap: 0 5px; align-items: center; min-height: 24px; border-radius: 3px; } #tt-rn .tt-rn-kind:hover { background: rgb(255 255 255 / .04); }
#tt-rn .tt-rn-kind > label.tick { min-width: 0; margin: 0; } #tt-rn .tt-rn-kind > label.tick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #tt-rn .tt-rn-kind > small { text-align: right; color: var(--good); font: 12px ui-monospace, monospace; } #tt-rn .tt-rn-kind > small.none { color: var(--haze); }
#tt-rn .tt-rn-freq { width: 100%; min-width: 0; box-sizing: border-box; height: 21px; padding: 0 0 0 5px; font: 12px ui-monospace, monospace; } #tt-rn .tt-rn-freq.own { color: var(--good); border-color: var(--good); } #tt-rn .tt-rn-kind > .tt-rn-more { grid-column: 4; padding: 0 4px; height: 21px; line-height: 1; } #tt-rn .tt-rn-kind > .tt-rn-sizes { grid-column: 1 / -1; margin: 3px 0 6px 22px; }
#tt-rn #tt-rn-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; } #tt-rn #tt-rn-packs > b { grid-column: 1 / -1; color: var(--haze); font-size: 12px; }
