/* andcirc.us · dev — light, warm, papercraft-adjacent. No dark mode. */
:root {
  --paper: #f5f0e1;
  --ink: #2a2622;
  --line: #d8cfb8;
  --accent: #d8552b;       /* circus red-orange */
  --mine: #fff6d8;
  --theirs: #eef1ec;
  --shadow: 0 2px 0 rgba(0,0,0,.12), 0 8px 22px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 16px/1.5 "Atkinson Hyperlegible", system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
}
#app { height: 100%; }

/* ---------- gate ---------- */
.gate {
  max-width: 620px; margin: 0 auto; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 24px;
}
.gate h1 { font-size: 40px; margin: 0; letter-spacing: -.5px; }
.gate .lede { font-size: 20px; margin: 0; }
.gate-actions { display: flex; gap: 12px; margin: 8px 0; }
.fineprint { color: #7a7261; font-size: 14px; margin: 0; }
button {
  font: inherit; cursor: pointer; padding: 8px 14px; border-radius: 10px;
  border: 2px solid var(--ink); background: var(--accent); color: #fff;
  box-shadow: 0 3px 0 var(--ink); transition: transform .04s, box-shadow .04s;
}
button:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
button.ghost { background: #fff; color: var(--ink); }
button.big { font-size: 18px; padding: 12px 20px; }

/* ---------- room ---------- */
body[data-mode="room"] #app {
  display: grid; grid-template-columns: 1fr 340px; grid-template-rows: auto 1fr; height: 100%;
}
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #efe7d2; border-bottom: 2px solid var(--line);
}
.topbar .brand { font-size: 18px; font-weight: 700; }
.topbar .peer {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, monospace; font-size: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px;
}
.topbar .spacer { flex: 1; }
.topbar .vanish { color: var(--accent); font-size: 13px; font-weight: 700; }
.topbar .vanish.clean { color: #5a8a3f; font-weight: 600; }
.topbar button { padding: 6px 10px; font-size: 14px; box-shadow: 0 2px 0 var(--ink); }

.stage { position: relative; overflow: hidden; background:
  radial-gradient(circle, #e7dec6 1px, transparent 1px) 0 0 / 26px 26px, var(--paper); }

/* faces: live P2P media tiles, overlaid bottom-left of the room */
.faces { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 10px; z-index: 5; flex-wrap: wrap; max-width: 70%; }
.tile {
  position: relative; width: 168px; height: 126px; border: 2px solid var(--ink);
  border-radius: 10px; overflow: hidden; background: #1a1714; box-shadow: var(--shadow);
}
.tile.self { border-color: var(--accent); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-label {
  position: absolute; left: 0; bottom: 0; padding: 1px 7px;
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, monospace; font-size: 10px;
  color: #fff; background: rgba(0,0,0,.55); border-top-right-radius: 8px;
}
.canvas { position: absolute; inset: 0; }
.layer { position: absolute; inset: 0; will-change: transform; }

.card {
  position: absolute; min-height: 64px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--mine); box-shadow: var(--shadow); user-select: none;
}
.card.theirs { background: var(--theirs); opacity: .9; }
.card-tag {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, monospace; font-size: 10px;
  padding: 3px 8px; border-bottom: 1px solid var(--line); color: #6b6354; cursor: grab;
}
.card-body { padding: 8px 10px; outline: none; min-height: 34px; }
.card.mine .card-body:focus { background: #fffbe9; }
.card-foot {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, monospace; font-size: 9px;
  padding: 2px 8px; border-top: 1px solid var(--line); color: #8a8270;
}

.inspector {
  border-left: 2px solid var(--line); background: #faf6ea; padding: 12px; overflow: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.insp-title { font-weight: 700; }
.insp-sub { font-size: 12px; color: #7a7261; }
.insp-json {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, monospace; font-size: 11px;
  white-space: pre-wrap; word-break: break-word; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 0; flex: 1;
}
.insp-hint { font-size: 11px; color: #7a7261; }

@media (max-width: 720px) {
  body[data-mode="room"] #app { grid-template-columns: 1fr; grid-template-rows: auto 1fr 200px; }
}
