/* The Announcements tab — what players read, and under it the operator's
 * visual editor.
 *
 * 2026-09-15: José asked for the editor to "let me take more space". The page
 * used to be a 47.5rem column; it now runs nearly the full width of the tab
 * with small side margins, at every size. The published announcement and the
 * editing surface share the `.doc` typography from howto.css AND the same
 * width, so a line wraps in the editor exactly where it wraps for a player —
 * that is most of what "what I see is what they get" means on a web page.
 *
 * Moved out of an inline <style> in announcements.html on the same day: the
 * page also lost its inline <script>, and a page with no inline code is one
 * whose Content-Security-Policy has nothing to hash.
 *
 * Colours are theme.css variables only. A colour the operator PICKS is the
 * exception by design — it is part of the announcement, not of the theme. */

.ann {
  max-width: 110rem;
  margin: 0 auto;
  padding-block: 0.75rem 1.5rem;
  padding-inline: clamp(1rem, 2vw, 1.5rem);
  box-sizing: border-box;
}

/* howto.css caps .doc at 74ch for a manual. An announcement is not a manual. */
.ann .ann-doc { max-width: none; }

.ann-doc a { color: var(--ui-accent); }

.ann-editor {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ui-line);
}
.ann-title { font-size: 1rem; margin: 0 0 0.25rem; }
.stamp, .ann-editor .hint { color: var(--ui-dim); font-size: 0.78125rem; margin: 0 0 0.625rem; }

.ann-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid var(--ui-line);
  border-bottom: 0;
  border-radius: 0.375rem 0.375rem 0 0;
  background: var(--ui-panel);
  position: sticky;
  top: 0;
  z-index: 2;
}
.ann-group { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.ann-toolbar select {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--ui-line);
  border-radius: 0.3125rem;
  background: var(--ui-input-bg, var(--ui-panel));
  color: var(--ui-text);
  max-width: 11rem;
}
.ann-toolbar .btn.small { min-width: 2rem; }
.ann-toolbar .btn.is-on { outline: 2px solid var(--ui-accent); outline-offset: -2px; }

.ann-swatch {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--ui-line);
  cursor: pointer;
}
@media (hover: hover) { .ann-swatch:hover { border-color: var(--ui-text); } }
.ann-custom { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--ui-dim); }
.ann-custom input { width: 2rem; height: 1.625rem; padding: 0; border: 1px solid var(--ui-line); background: none; }

.ann-body {
  min-height: 18rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ui-line);
  border-radius: 0 0 0.375rem 0.375rem;
  background: var(--ui-bg);
  color: var(--ui-text);
  outline: none;
  overflow-wrap: anywhere;
}
.ann-body:focus-visible { border-color: var(--ui-accent); }

.ann-row { display: flex; align-items: center; gap: 0.625rem; margin-top: 0.625rem; flex-wrap: wrap; }
.ann-row .msg { color: var(--ui-dim); font-size: 0.78125rem; }

/* Phones: the swatches and buttons are a thumb's width, not a cursor's. */
@media (pointer: coarse) {
  .ann-swatch { width: 2.25rem; height: 2.25rem; }
  .ann-toolbar .btn.small { min-height: 2.25rem; }
}
@media (max-width: 480px) {
  .ann-toolbar { position: static; }
  .ann-toolbar select { max-width: 100%; }
}
