/* Симулятор підземель: розмітка поверх спільної теми (theme.css). Акцент інструмента: мідний. */
:root { --accent: #d6a15b; --accent-hi: #f0c68a; --accent-glow: rgba(214, 161, 91, .14); }
body { min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 460px at 50% -120px, rgba(214, 161, 91, .09), transparent 70%), var(--bg); }
header.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 18px;
  background: linear-gradient(180deg, var(--panel), var(--bg-elev)); border-bottom: 1px solid var(--line); position: relative; }
header.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--ff-ui); font-weight: 850; text-transform: uppercase; font-size: 20px; white-space: nowrap; letter-spacing: .07em; text-shadow: 0 0 14px color-mix(in srgb, var(--accent, var(--gold)) 50%, transparent); }
.brand svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand span { color: var(--accent); text-shadow: 0 0 14px currentColor; }
.spacer { flex: 1; }
.work { flex: 1; position: relative; min-height: 520px; height: calc(100vh - 118px); overflow: hidden; background: var(--bg); touch-action: none; }
.work > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.work > canvas.drag { cursor: grabbing; }
.rail { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.rail button { width: 62px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; background: color-mix(in srgb, var(--panel) 92%, transparent); }
.rail button svg { width: 22px; height: 22px; }
.rail button.on { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }
.drawer { position: absolute; left: 82px; top: 10px; bottom: 10px; width: min(340px, calc(100vw - 100px)); z-index: 4; overflow: auto; background: color-mix(in srgb, var(--panel) 96%, transparent); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.drawer[hidden], .tip[hidden], .roomcard[hidden] { display: none; }
.drawer section { display: none; flex-direction: column; gap: 9px; } .drawer section.on { display: flex; }
.drawer h2, .roomcard h2 { margin: 6px 0 2px; font-family: var(--ff-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); font-weight: 600; }
.x { position: absolute; right: 8px; top: 6px; width: 28px; height: 28px; padding: 0; line-height: 1; font-size: 18px; z-index: 2; }
.types { display: flex; flex-direction: column; gap: 5px; max-height: 270px; overflow: auto; padding-right: 2px; }
.types button { text-align: left; padding: 6px 9px; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.types button small { color: var(--faint); font-size: 11px; }
.types button.on { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }
.drawer input[type=search] { width: 100%; }
.bar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 6px 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line); max-width: calc(100% - 540px); }
.floors { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.floors[hidden] { display: none; }
.floors button { background: color-mix(in srgb, var(--panel) 90%, transparent); } .floors button.on { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }
.zoom { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; gap: 6px; }
.zoom button { min-width: 38px; }
/* статистика текстом під картою */
.meta { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); width: min(1000px, calc(100% - 200px)); margin: 0; z-index: 2; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; pointer-events: none; text-shadow: 0 1px 4px #000, 0 0 8px #000; }
.work.shift .meta { left: calc(50% + 200px); width: min(1000px, calc(100% - 640px)); }
.tip { position: absolute; z-index: 6; pointer-events: none; max-width: 260px; padding: 7px 10px; border-radius: 8px; background: var(--panel-3, #1b1b22); border: 1px solid var(--accent); font-size: 12px; line-height: 1.45; color: var(--text); box-shadow: var(--shadow-2); }
/* картка об'єкта: позиціонується скриптом збоку від кімнати */
.roomcard { position: absolute; left: 0; top: 0; width: 300px; z-index: 5; padding: 14px 16px 14px; max-height: calc(100% - 20px); overflow: auto; }
.roomcard h3 { margin: 0 24px 6px 0; font-size: 17px; line-height: 1.25; color: var(--text); font-family: var(--ff-ui); }
.roomcard .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.roomcard .lead { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.facts { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.facts dt { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 1px; }
.facts dd { margin: 0; color: var(--text); line-height: 1.45; }
.facts small { color: var(--faint); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.hint { font-size: 12px; color: var(--faint); margin: 2px 0 0; line-height: 1.5; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; width: fit-content; }
.ctls { display: flex; flex-direction: column; gap: 9px; }
.ctl { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-size: 13px; color: var(--muted); }
.ctl output { font-family: var(--ff-mono); font-size: 12px; color: var(--text); }
.ctl input[type=range], .ctl input[type=text], .ctl select { grid-column: 1 / -1; width: 100%; }
.layers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.info { font-size: 13px; line-height: 1.55; color: var(--muted); }
.info b { color: var(--text); } .info p { margin: 3px 0; }
.info .tag { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px; border: 1px solid var(--line); margin: 0 4px 2px 0; color: var(--accent-hi); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--panel-3); color: var(--accent-hi); border: 1px solid var(--accent);
  font-weight: 600; padding: 10px 20px; border-radius: 99px; box-shadow: var(--shadow-2); transition: .25s var(--ease); pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
#printArea { display: none; }
@media (max-width: 760px) { header.top { padding: 10px 12px; } .bar { max-width: calc(100% - 20px); bottom: 58px; } .floors { top: 10px; left: 90px; transform: none; } .meta { width: calc(100% - 100px); left: calc(50% + 40px); bottom: 100px; font-size: 11px; }  }
@media print { body > *:not(#printArea) { display: none !important; } #printArea { display: block; } #printArea img { width: 100%; page-break-after: always; } #printArea h3 { color: #000; font: 600 14px sans-serif; } }
