﻿:root {
  --bg: #f7f3ee;
  --panel: #fff9f0;
  --ink: #252220;
  --accent: #0d6d64;
  --accent-soft: #d9f2ef;
  --warn: #b3261e;
  --line: #d8ccbb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, #fff 0, #fff0 35%),
    radial-gradient(circle at 90% 20%, #e7f6f4 0, #fff0 35%),
    var(--bg);
}

.topbar {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 1.2rem; }
.topbar p { margin: 6px 0 0; font-size: 0.92rem; }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 12px;
  padding: 12px;
  min-height: calc(100vh - 84px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  overflow: auto;
}

.controls section { margin-bottom: 16px; }
.controls h2 { margin: 0 0 8px; font-size: 0.95rem; }
.controls label { display: block; margin-top: 8px; font-size: 0.85rem; }

input[type="file"], input[type="number"], button {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.92rem;
}

button {
  cursor: pointer;
  background: #fff;
  transition: transform 120ms ease, background-color 120ms ease;
}
button:hover { transform: translateY(-1px); background: #fffdf8; }
button:active { transform: translateY(0); }
button.danger { border-color: #f0bbb7; color: var(--warn); }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #625a50;
}

.result {
  margin-top: 8px;
  background: var(--accent-soft);
  border: 1px solid #b6ddd8;
  border-radius: 10px;
  padding: 8px;
  font-size: 0.88rem;
  min-height: 36px;
}

.room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.room-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
  cursor: pointer;
}
.room-list li.active {
  border-color: var(--accent);
  background: #f3fbfa;
}

.canvas-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.canvas-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: #fff;
}
.canvas-toolbar button { width: auto; margin: 0; }
#statusText { font-size: 0.82rem; color: #5c554c; }

.viewport {
  flex: 1;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #f1ece3;
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

#floorCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .viewport {
    min-height: 58vh;
  }
}
