@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-sc-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-600.woff2') format('woff2');
}

:root {
  --bg:      #0d0f14;
  --bg-2:    #14171f;
  --surface: #1a1e28;
  --line:    rgba(212, 180, 114, .16);
  --ink:     #e9e2cf;
  --ink-2:   #b8b09a;
  --ink-3:   #907f6b;
  --accent:  #d4b472;
  --good:    #6f9a6a;
  --danger:  #c45a4a;
  --serif:   "Cormorant SC", Georgia, serif;
  --mono:    "IBM Plex Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Page layout ─────────────────────────────────────────────────────── */

#page {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  flex-shrink: 0;
  padding: 0 16px;
  gap: 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}

.brand-sub {
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1;
}

/* ── Connection status ───────────────────────────────────────────────── */

.conn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .1em;
}

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
  transition: background .3s;
}

.conn-dot.ok  { background: var(--good); }
.conn-dot.err { background: var(--danger); }

/* ── Back link ───────────────────────────────────────────────────────── */

.back-link {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: color .15s;
}

.back-link::before {
  content: "←";
  font-family: sans-serif;
}

.back-link:hover { color: var(--accent); }

/* ── Terminal container ──────────────────────────────────────────────── */

.xterm-rows,
.xterm-rows > div {
  white-space: pre;
}

#term-box {
  flex: 1;
  min-height: 0;
  padding: 4px 6px 2px;
}

/* ── Input bar ───────────────────────────────────────────────────────── */

#bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 6px 10px;
  flex-shrink: 0;
}

#cmd {
  flex: 1;
  background: #0a0c11;
  color: var(--ink);
  border: 1px solid rgba(212, 180, 114, .14);
  border-radius: 2px;
  padding: 6px 10px;
  font: 13px/1.2 var(--mono);
  outline: none;
}

#cmd:focus        { border-color: rgba(212, 180, 114, .4); }
#cmd::placeholder { color: var(--ink-3); }

#sendbtn {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(212, 180, 114, .28);
  padding: 5px 18px;
  font: 11px var(--mono);
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

#sendbtn:hover {
  background: rgba(212, 180, 114, .08);
  border-color: var(--accent);
}
