:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --ink: #171717;
  --muted: #62615d;
  --line: #d9d7cf;
  --panel: #ffffff;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --shadow: 0 14px 36px rgba(28, 28, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 247, 244, 0.92)),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: grid;
  grid-template-areas:
    "title"
    "tagline";
  align-items: start;
  row-gap: 2px;
  min-width: 0;
}

h1 {
  grid-area: title;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.tagline {
  grid-area: tagline;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.14);
}

.workspace {
  min-height: 0;
  padding: clamp(10px, 2vw, 18px);
}

.space-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 76px - clamp(20px, 4vw, 36px));
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

noscript p {
  margin: 0;
}

@media (max-width: 720px) {
  .topbar {
    min-height: 112px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
  }

  .space-frame {
    height: calc(100vh - 112px - 20px);
    min-height: 560px;
  }
}
