/* The landscape editor (ui/editor.js). Same cartoon look as style.css (.bar .btn .seg .stepper .card .hint are reused). */
#ui.editor { justify-content: flex-start; align-items: stretch; padding: calc(var(--st) + 0.6rem) calc(var(--sr) + 0.8rem) calc(var(--sb) + 0.6rem) calc(var(--sl) + 0.8rem); box-sizing: border-box; background: linear-gradient(rgba(30, 14, 50, 0.35), rgba(30, 14, 50, 0.55)); }
.ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0.8rem; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; align-items: start; }
.ed-left, .ed-right { background: var(--cream); border: 0.2rem solid var(--ink); border-radius: 1.2rem; box-shadow: 0 0.4rem 0 rgba(43, 15, 28, 0.35); padding: 0.7rem; min-width: 0; box-sizing: border-box; }
.ed-left { display: flex; flex-direction: column; gap: 0.5rem; }
#stage.sq .ed-body { grid-template-columns: minmax(0, 1fr); }

.ed-stage { position: relative; width: 100%; aspect-ratio: 1920 / 696; border: 0.2rem solid var(--ink); border-radius: 0.8rem; overflow: hidden; background: #d9eeff; touch-action: none; box-sizing: border-box; }
.ed-canvas, .ed-over { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ed-over { pointer-events: none; }
.ed-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ed-tools .btn { flex: 1 1 auto; min-width: 4.2rem; }
.ed-brush { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: auto; font-family: "Lilita One", sans-serif; }
.ed-bw { min-width: 4.2rem; text-align: center; font-size: 1.05rem; }
.ed-info { margin: 0; font-weight: 700; font-size: 0.9rem; }
.ed-info.bad { color: #b3261e; }
.ed-help { margin: 0; min-height: 2.4em; }
.ed-msg { margin: 0; font-weight: 700; color: var(--green2); min-height: 1.3em; }
.ed-msg.bad { color: #b3261e; }
.ed-fromsetup { align-self: flex-start; }
.ed-fromsetup[hidden] { display: none; }

.ed-h { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.1rem; margin: 0.4rem 0 0.35rem; letter-spacing: 0.03em; }
.ed-h:first-child { margin-top: 0; }
.ed-h small { font-family: "Fredoka", sans-serif; font-weight: 600; opacity: 0.65; font-size: 0.75em; }
.ed-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
.ed-thumb-cell { position: relative; }
.ed-thumb { display: block; width: 100%; padding: 0; border: 0.16rem solid var(--ink); border-radius: 0.6rem; background: #d9eeff; box-shadow: 0 0.18rem 0 var(--ink); overflow: hidden; aspect-ratio: 160 / 58; min-height: 2.75rem; }
.ed-thumb:active { transform: translateY(0.15rem); box-shadow: 0 0.03rem 0 var(--ink); }
.ed-thumb canvas { display: block; width: 100%; height: 100%; }
.ed-reroll { position: absolute; right: 0.1rem; bottom: 0.1rem; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: transparent; font-size: 1.2rem; color: var(--ink); text-shadow: 0 0 0.3rem #fff, 0 0 0.3rem #fff; }
.ed-name { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; flex-wrap: wrap; align-items: center; }
.ed-name .btn { flex: none; }
.ed-code, .ed-saved { flex: 1; min-width: 6rem; height: 2.75rem; border: 0.16rem solid var(--ink); border-radius: 0.8rem; padding: 0 0.6rem; background: #fff; font-family: "Lilita One", sans-serif !important; font-size: 1.05rem; box-shadow: 0 0.18rem 0 var(--ink); box-sizing: border-box; }
.ed-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.ed-grid .stepper { justify-content: space-between; }
.ed-grid .stepper > span { min-width: 4.2rem; }
.ed-grid .stepper b { min-width: 5.5rem; }
.ed-soil select { flex: 1; min-width: 0; height: 2.75rem; border: 0.16rem solid var(--ink); border-radius: 0.8rem; padding: 0 0.5rem; background: #fff; font-family: "Lilita One", sans-serif !important; font-size: 1.05rem; box-shadow: 0 0.18rem 0 var(--ink); }
.ed-water { display: flex; flex-direction: column; gap: 0.15rem; font-weight: 700; }
.ed-water input[type=range] { width: 100%; height: 2.75rem; accent-color: var(--blue2); }
.ed-water b { font-family: "Lilita One", sans-serif; font-weight: 400; }
.ed-border[aria-pressed="false"] { opacity: 0.85; }
.ed-dialog { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20, 8, 30, 0.55); z-index: 3; }
.ed-dialog[hidden] { display: none; }
.ed-dialog p { margin: 0.3rem 0; font-weight: 600; }
.ed-stage.preview { background: #3a78c9; }

/* the wrapper only carries the listeners */
.ed-root { display: contents; }

/* sticky action row for the lobby / setup cards that open the editor */
.land-edit { align-self: stretch; }
