/* the collage studio — a figma-ish shell around the canvas */

:root{
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Bradley Hand', cursive;
  --bg: #ffffff;
  --canvas: #f0f0f0;
  --line: #e6e6e6;
  --text: #1e1e1e;
  --text-2: #737373;
  --hover: #f3f3f3;
  --field: #f5f5f5;
  --accent: #0d99ff;
  --accent-soft: #e5f4ff;
  --danger: #f24822;
  --panel-w: 248px;
  --float: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.14);
}
body.dark{
  --bg: #2c2c2c;
  --canvas: #1e1e1e;
  --line: #3b3b3b;
  --text: #f2f2f2;
  --text-2: #a3a3a3;
  --hover: #383838;
  --field: #383838;
  --accent-soft: rgba(13,153,255,.18);
}
*{ box-sizing: border-box; }
[hidden]{ display: none !important; }
html, body{ margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); -webkit-font-smoothing: antialiased; }
button{ font-family: inherit; }

/* ---------- passphrase gate (same as chapter 1) ---------- */
#gate{
  position: fixed; inset: 0; z-index: 100;
  background: #f1e7cd; display: flex; align-items: center; justify-content: center;
  transition: opacity .7s ease;
}
body.dark #gate{ background: #26201a; }
#gate.lifted{ opacity: 0; pointer-events: none; }
.gate-inner{ text-align: center; padding: 20px; }
.gate-label{ font: 30px var(--hand); color: #2a2118; margin-bottom: 20px; }
#gate-input{
  font: 24px var(--hand); color: #2a2118; background: none; border: 0;
  border-bottom: 1.6px solid #2a2118; text-align: center; padding: 6px 10px; width: min(320px, 80vw);
}
body.dark .gate-label, body.dark #gate-input{ color: #e6d9b8; border-color: #e6d9b8; }
#gate-input:focus{ outline: none; border-bottom-color: #8c3a2b; }
.gate-wrong{ font: 17px var(--hand); color: #5a4c3a; margin-top: 16px; min-height: 24px; }

/* ---------- dialogs ---------- */
.modal{
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.32);
  display: grid; place-items: center; padding: 16px;
}
.modal-card{
  width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--bg); color: var(--text); border-radius: 16px; padding: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.modal-card h2{ font: 400 34px/1.1 var(--hand); margin: 0 0 16px; }
.modal-card p{ margin: 0; color: var(--text-2); font-size: 13px; }
.who-card{ text-align: center; }
.who-row{ display: flex; gap: 14px; justify-content: center; margin-top: 20px; }
.who-row button{
  width: 104px; height: 104px; border-radius: 50%; border: 0; background: var(--c); color: #fff;
  font: 600 17px var(--ui); cursor: pointer; transition: transform .15s ease;
}
.who-row button:hover{ transform: scale(1.05); }
.field{ display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 12px; color: var(--text-2); }
.field input{
  height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px;
  font: 14px var(--ui); color: var(--text); background: var(--bg);
}
.field input:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.phones{ display: grid; gap: 6px; }
.phone-opt{
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
  cursor: pointer; font: 12.5px var(--ui); color: var(--text); text-align: left;
}
.phone-opt small{ color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-opt:hover{ background: var(--hover); }
.phone-opt.on{ border-color: var(--accent); background: var(--accent-soft); }
.modal-actions{ display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.new-err{ color: var(--danger) !important; min-height: 16px; margin: 0 0 6px !important; }

button.primary{
  background: var(--accent); color: #fff; border: 0; border-radius: 7px; height: 28px; padding: 0 12px;
  font: 600 11.5px var(--ui); cursor: pointer;
}
button.primary:hover{ background: #0b8ae6; }
button.primary.big{ height: 36px; padding: 0 16px; font-size: 13px; border-radius: 9px; }
button.ghost{
  background: none; border: 1px solid var(--line); color: var(--text); border-radius: 9px;
  height: 36px; padding: 0 14px; font: 500 13px var(--ui); cursor: pointer;
}
button.ghost:hover{ background: var(--hover); }
button.danger{
  background: none; color: var(--danger); border: 1px solid var(--line); border-radius: 7px;
  height: 28px; font: 600 11px var(--ui); cursor: pointer; margin-top: 2px;
}
button.danger:hover{ background: rgba(242,72,34,.08); border-color: rgba(242,72,34,.4); }
.full{ width: 100%; }

/* ---------- gallery ---------- */
#gallery{ min-height: 100vh; padding: 26px clamp(16px, 5vw, 56px) 70px; }
.g-top{ display: flex; justify-content: space-between; align-items: center; }
.g-back{ font: 21px var(--hand); color: var(--text-2); text-decoration: none; }
.g-back:hover{ color: var(--text); text-decoration: underline; }
.g-hero{ text-align: center; margin: 14px 0 36px; }
.g-hero h1{ font: 400 clamp(44px, 8vw, 68px)/1 var(--hand); margin: 0; letter-spacing: .01em; }
.g-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 30px 22px; max-width: 1060px; margin: 0 auto;
}
.g-card{
  position: relative; display: flex; flex-direction: column; gap: 9px; min-width: 0;
  text-decoration: none; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; text-align: left; font: inherit;
}
.g-phone{
  display: block; aspect-ratio: 1206 / 2622; border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 6px 22px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.g-card:hover .g-phone, .g-card:focus-visible .g-phone{ transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 14px 34px rgba(0,0,0,.14); }
.g-card:focus-visible{ outline: none; }
.g-card:focus-visible .g-phone{ box-shadow: 0 0 0 3px var(--accent); }
.g-phone img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.g-new .g-phone{
  display: grid; place-items: center; background: var(--hover); box-shadow: none;
  border: 1.5px dashed rgba(128,128,128,.45);
}
.plus{ font: 300 44px var(--ui); color: var(--text-2); }
.g-title{ font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-meta{ color: var(--text-2); font-size: 11.5px; margin-top: -5px; }
.g-del{
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.94); color: #444; box-shadow: 0 1px 5px rgba(0,0,0,.18);
  opacity: 0; cursor: pointer; display: grid; place-items: center; transition: opacity .15s;
}
.g-del svg{ width: 15px; height: 15px; }
.g-card:hover .g-del, .g-del:focus-visible{ opacity: 1; }
@media (hover: none){ .g-del{ opacity: .9; } }
.g-status{ text-align: center; color: var(--text-2); font-size: 13px; margin-top: 30px; }

/* ---------- editor shell ---------- */
body.editing{ overflow: hidden; overscroll-behavior: none; }
#editor{
  position: fixed; inset: 0; display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr) var(--panel-w);
  background: var(--canvas); font: 11px/1.4 var(--ui); color: var(--text);
}
#left, #right{ background: var(--bg); overflow: auto; z-index: 3; min-height: 0; }
#left{ border-right: 1px solid var(--line); }
#right{ border-left: 1px solid var(--line); }

.file{ display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 6px; border-bottom: 1px solid var(--line); }
#back{ width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 7px; color: var(--text); }
#back svg{ width: 20px; height: 20px; }
#back:hover{ background: var(--hover); }
.file-meta{ min-width: 0; flex: 1; }
#title{
  width: 100%; border: 1px solid transparent; border-radius: 5px; padding: 3px 5px;
  font: 600 13px var(--ui); color: var(--text); background: none; text-overflow: ellipsis;
}
#title:hover{ border-color: var(--line); }
#title:focus{ outline: none; border-color: var(--accent); }
#status{ padding: 1px 6px 0; color: var(--text-2); font-size: 11px; display: flex; align-items: center; gap: 6px; }
#status::before{ content: ''; width: 6px; height: 6px; border-radius: 50%; background: #b3b3b3; flex: none; }
#status[data-state="live"]::before{ background: #14ae5c; }
#status[data-state="connecting"]::before, #status[data-state="reconnecting"]::before{ background: #ffc21a; }
#status[data-state="offline"]::before{ background: var(--danger); }

.panel-title{ padding: 14px 16px 6px; font-weight: 600; font-size: 11px; }
#layers{ list-style: none; margin: 0; padding: 0 8px 20px; }
#layers li{
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 8px;
  border-radius: 6px; cursor: default; user-select: none;
}
#layers li:hover{ background: var(--hover); }
#layers li.sel{ background: var(--accent-soft); }
#layers li.off .nm, #layers li.off .ic{ opacity: .4; }
#layers .ic{ display: grid; place-items: center; color: var(--text-2); }
#layers .ic svg{ width: 16px; height: 16px; display: block; }
#layers .nm{ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#layers .lb{ width: 24px; height: 24px; border: 0; background: none; padding: 3px; color: var(--text-2); border-radius: 5px; opacity: 0; cursor: pointer; flex: none; }
#layers .lb:hover{ background: rgba(128,128,128,.15); color: var(--text); }
#layers li:hover .lb, #layers li.locked .lk, #layers li.off .ey{ opacity: 1; }
#layers .lb svg{ width: 16px; height: 16px; display: block; }
#layers .theirs{ width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
#layers li.drop-above{ box-shadow: inset 0 2px 0 var(--accent); }
#layers li.drop-below{ box-shadow: inset 0 -2px 0 var(--accent); }
#layers li.empty{ color: var(--text-2); height: auto; padding: 8px; line-height: 1.6; }
#layers input{ flex: 1; min-width: 0; font: inherit; border: 1px solid var(--accent); border-radius: 4px; padding: 3px 5px; background: var(--bg); color: var(--text); outline: none; }

/* ---------- the canvas ---------- */
#stage{ position: relative; overflow: hidden; background: var(--canvas); touch-action: none; min-width: 0; }
#stage .canvas-container{ position: absolute !important; left: 0; top: 0; z-index: 1; }
#stage.grabbing, #stage.grabbing *{ cursor: grabbing !important; }
#board-shadow{
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.05), 0 14px 44px rgba(0,0,0,.09);
}
body.dark #board-shadow{ box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 14px 44px rgba(0,0,0,.5); }
#board-label{
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  font-size: 11px; color: var(--text-2); white-space: nowrap;
}
#lock-preview{
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: hidden;
  color: #fff; text-align: center; font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
.lp-island{ position: absolute; left: 50%; top: calc(var(--u) * 11); width: calc(var(--u) * 125); height: calc(var(--u) * 37); transform: translateX(-50%); background: #000; border-radius: 999px; }
.lp-date{ position: absolute; left: 0; right: 0; top: calc(var(--u) * 68); font-size: calc(var(--u) * 19); font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.22); }
.lp-time{ position: absolute; left: 0; right: 0; top: calc(var(--u) * 86); font-size: calc(var(--u) * 94); font-weight: 700; line-height: 1; letter-spacing: -.02em; text-shadow: 0 2px 14px rgba(0,0,0,.22); }
.lp-btn{
  position: absolute; bottom: calc(var(--u) * 46); width: calc(var(--u) * 50); height: calc(var(--u) * 50);
  border-radius: 50%; background: rgba(40,40,40,.35); display: grid; place-items: center;
}
.lp-btn.l{ left: calc(var(--u) * 46); }
.lp-btn.r{ right: calc(var(--u) * 46); }
.lp-btn svg{ width: 46%; height: 46%; }
.lp-home{ position: absolute; left: 50%; bottom: calc(var(--u) * 8); width: calc(var(--u) * 138); height: calc(var(--u) * 5); transform: translateX(-50%); border-radius: 99px; background: rgba(255,255,255,.92); }

#cursors{ position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.cursor{ position: absolute; left: 0; top: 0; transition: transform .16s linear, opacity .25s; will-change: transform; }
.cursor svg{ display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.28)); }
.cursor span{
  position: absolute; left: 15px; top: 17px; padding: 3px 8px 4px; border-radius: 3px 10px 10px 10px;
  color: #fff; font: 600 11px var(--ui); white-space: nowrap;
}

#drop-hint{
  position: absolute; inset: 12px; z-index: 6; border: 2px dashed var(--accent); border-radius: 16px;
  background: rgba(13,153,255,.06); display: grid; place-items: center; pointer-events: none;
}
#drop-hint span{ background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 99px; font: 600 12px var(--ui); }

#toolbar{
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 2px; padding: 6px; background: var(--bg);
  border-radius: 14px; box-shadow: var(--float);
}
#toolbar button{
  width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--text);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
#toolbar button svg{ width: 23px; height: 23px; display: block; }
#toolbar button:hover{ background: var(--hover); }
#toolbar button.on{ background: var(--accent); color: #fff; }
#toolbar .sep{ width: 1px; height: 22px; background: var(--line); margin: 0 5px; }
#toolbar .split{ display: flex; align-items: center; }
#toolbar .caret{ width: 16px !important; color: var(--text-2) !important; }
#toolbar .caret svg{ width: 10px !important; height: 10px !important; }

#zoom-wrap{ position: absolute; right: 12px; bottom: 16px; z-index: 5; display: flex; gap: 6px; }
#zoom-btn, #layers-toggle{
  height: 32px; padding: 0 11px; border: 0; border-radius: 9px; background: var(--bg); box-shadow: var(--float);
  font: 500 11.5px var(--ui); color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums;
}
#layers-toggle{ display: none; width: 32px; padding: 0; place-items: center; }
#layers-toggle svg{ width: 18px; height: 18px; }

/* ---------- right panel ---------- */
.right-head{
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; min-height: 51px;
}
#avatars{ display: flex; align-items: center; }
.av{
  width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 600 11.5px var(--ui); text-transform: uppercase; border: 2px solid var(--bg); margin-left: -6px;
}
.av:first-child{ margin-left: 0; }
.sel-head{ padding: 13px 16px; font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.pill{ font-weight: 500; font-size: 10.5px; color: var(--text-2); background: var(--hover); border-radius: 99px; padding: 2px 8px; }
.sec{ padding: 12px 16px 14px; border-bottom: 1px solid var(--line); }
.sec h4{ margin: 0 0 9px; font: 600 11px var(--ui); }
.sub{ color: var(--text-2); margin: 11px 0 6px; }
.hint{ color: var(--text-2); margin-top: 8px; line-height: 1.5; }
.tips{ padding: 14px 16px 20px; color: var(--text-2); line-height: 1.65; }
.tips b{ color: var(--text); font-weight: 600; }
select.full, input.text{
  height: 28px; border: 1px solid transparent; border-radius: 6px; background: var(--field); color: var(--text);
  font: 11.5px var(--ui); padding: 0 8px; margin-top: 2px;
}
select.full:hover, input.text:hover{ border-color: var(--line); }
select.full:focus, input.text:focus{ outline: none; border-color: var(--accent); }
input.text{ margin-top: 10px; }
.swatches{ display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.swatches.small{ grid-template-columns: repeat(6, 22px); margin-top: 8px; }
.sw{
  aspect-ratio: 1; min-width: 0; border-radius: 6px; border: 1px solid rgba(0,0,0,.14);
  background: var(--c); cursor: pointer; padding: 0; position: relative; display: block;
}
body.dark .sw{ border-color: rgba(255,255,255,.14); }
.sw.on{ box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.sw.none{ background: linear-gradient(135deg, transparent 44%, var(--danger) 44%, var(--danger) 56%, transparent 56%), var(--bg); }
.sw.custom{ background: conic-gradient(#f24822, #ffcd29, #14ae5c, #0d99ff, #9747ff, #f24822); }
.sw.custom.on{ background: var(--c); }
.sw.custom input{ position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
.chips{ display: flex; flex-wrap: wrap; gap: 4px; }
.chip{
  height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: 500 11px var(--ui); cursor: pointer;
}
.chip:hover{ background: var(--hover); }
.chip.on{ background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chips.tight .chip{ padding: 0 7px; }
.slider{ display: grid; grid-template-columns: 76px minmax(0, 1fr) 38px; align-items: center; gap: 8px; margin-top: 7px; color: var(--text-2); }
.slider input{ width: 100%; accent-color: var(--accent); margin: 0; }
.slider output{ text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.icon-row{ display: flex; gap: 3px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.icon-row.wide{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.ib{
  width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text);
  display: grid; place-items: center; cursor: pointer; font: 13px var(--ui); padding: 0;
}
.ib:hover{ background: var(--hover); }
.ib.on{ background: var(--accent-soft); color: var(--accent); }
.ib svg{ width: 18px; height: 18px; }
.tb{
  height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text);
  font: 500 10.5px var(--ui); cursor: pointer; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb:hover{ background: var(--hover); }
.num{ display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 8px; border-radius: 6px; background: var(--field); color: var(--text-2); margin-right: 4px; }
.num input{ width: 42px; border: 0; background: none; color: var(--text); font: 11.5px var(--ui); outline: none; }
.toggle{ display: flex; gap: 8px; align-items: center; cursor: pointer; margin-bottom: 4px; }
.toggle input{ accent-color: var(--accent); margin: 0; }
#props .sec .swatches + .slider{ margin-top: 10px; }

/* ---------- menus, toast ---------- */
.menu{
  position: fixed; z-index: 50; min-width: 190px; padding: 6px; background: #1e1e1e; color: #fff;
  border-radius: 11px; box-shadow: 0 12px 34px rgba(0,0,0,.28), 0 0 0 .5px rgba(0,0,0,.4);
  display: flex; flex-direction: column; font: 12px var(--ui);
}
.menu button{
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; color: inherit;
  border-radius: 6px; text-align: left; cursor: pointer; font: inherit;
}
.menu button:hover{ background: var(--accent); }
.menu button svg{ width: 18px; height: 18px; flex: none; }
.menu button span{ flex: 1; }
.menu kbd{ margin-left: auto; font: inherit; color: rgba(255,255,255,.5); padding-left: 18px; }
.menu button:hover kbd{ color: rgba(255,255,255,.85); }
.menu hr{ border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 5px 4px; }
.menu.export{ width: 252px; padding: 16px; gap: 10px; background: var(--bg); color: var(--text); box-shadow: var(--float), 0 18px 40px rgba(0,0,0,.14); }
.menu.export button.primary{ justify-content: center; background: var(--accent); color: #fff; padding: 0 16px; }
.menu.export button.primary:hover{ background: #0b8ae6; }
.em-title{ font-weight: 600; font-size: 13px; }
.em-sub{ color: var(--text-2); margin-top: -6px; font-variant-numeric: tabular-nums; }
.em-hint{ color: var(--text-2); line-height: 1.5; font-size: 11px; }
#toast{
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 70;
  background: #1e1e1e; color: #fff; padding: 9px 15px; border-radius: 9px; font: 500 12px var(--ui);
  box-shadow: 0 8px 26px rgba(0,0,0,.22); max-width: calc(100vw - 32px); text-align: center;
}

/* ---------- small screens: canvas first, panels as drawers ---------- */
@media (max-width: 820px){
  #editor{ grid-template-columns: minmax(0, 1fr); }
  #left{
    position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 82vw); z-index: 20;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--float);
  }
  body.show-layers #left{ transform: none; }
  #right{
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-height: 51px; overflow: hidden;
    border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,.1); transition: max-height .22s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.sheet-open #right{ max-height: 46vh; overflow: auto; }
  .right-head{ cursor: pointer; }
  .right-head::before{
    content: ''; position: absolute; left: 50%; top: 5px; width: 34px; height: 4px; border-radius: 9px;
    background: var(--line); transform: translateX(-50%);
  }
  #toolbar{ top: 10px; bottom: auto; max-width: calc(100vw - 20px); overflow-x: auto; }
  #toolbar button{ width: 34px; height: 34px; }
  #zoom-wrap{ top: auto; bottom: 64px; }
  #layers-toggle{ display: grid; }
  #toast{ bottom: auto; top: 64px; }
}
