:root {
  --bg: #f6f4ef;
  --fg: #1d1d1f;
  --muted: #77736a;
  --accent: #e4572e;
  --card: #ffffff;
  --border: #d9d4c7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #ecebe6;
    --muted: #9a968c;
    --accent: #ff7a50;
    --card: #222227;
    --border: #3a3a42;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

#cloud {
  position: fixed;
  inset: 0;
}

.tag {
  position: absolute;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.1;
  user-select: text;
  transition: opacity .6s ease;
}

.tag.fresh { animation: pop .5s ease-out; }

@keyframes pop {
  from { transform: scale(.2) rotate(var(--rot)); opacity: 0; }
}

#shout-form {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgb(0 0 0 / .12);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

textarea {
  width: 100%;
  resize: none;
  font: inherit;
  font-size: 1.05rem;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
}

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

.row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
  min-height: 1.2em;
}

#status.error { color: var(--accent); }

button {
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:disabled { opacity: .6; cursor: default; }
