/* 🎲 d20 Arena · Mesa entry page. Own file: the page's CSP forbids inline style and script. Day and Night, 375 / 768 / 1280 px, touch targets of 44 px. */
body.me-page { margin: 0; padding: 12px 16px; background: var(--page, #110e21); color: var(--text, #f1edff); font-family: system-ui, sans-serif; }
:root[data-theme="day"] body.me-page { background: var(--page, #fff7dc); color: var(--text, #2a1f00); }
#me-root, .me-bar { --me-bg: var(--panel, #1a1632); --me-ink: var(--text, #f1edff); --me-dim: var(--dim, #a6a0cc); --me-line: var(--border, #383063); --me-btn: var(--panel-2, #241f45); --me-warn: #e8412c; --me-focus: var(--focus-ring, #f1edff); }
:root[data-theme="day"] #me-root, :root[data-theme="day"] .me-bar { --me-bg: var(--panel, #fcf0c6); --me-ink: var(--text, #2a1f00); --me-dim: var(--dim, #6b5a1f); --me-line: var(--border, #b99a52); --me-btn: var(--panel-2, #efd78d); --me-warn: #b3261e; }
.me-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; max-width: 980px; margin: 0 auto 12px; }
.me-bar h1 { margin: 0; font-size: 1.25rem; }
.me-links { display: flex; flex-wrap: wrap; gap: 4px; }
.me-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 10px; color: inherit; border: 1px solid var(--me-line); border-radius: 8px; text-decoration: none; }
#me-root { display: grid; gap: 12px; max-width: 980px; margin: 0 auto; color: var(--me-ink); }
#me-status { margin: 0; color: var(--me-dim); }
#me-status.me-error { color: var(--me-warn); font-weight: 700; border: 2px solid var(--me-warn); border-radius: 8px; padding: 10px 12px; }
#me-root section { display: grid; gap: 12px; }
#me-root section[hidden] { display: none; }
.me-card { display: grid; gap: 8px; align-content: start; background: var(--me-bg); border: 1px solid var(--me-line); border-radius: 10px; padding: 12px; min-width: 0; }
.me-card h2 { margin: 0; font-size: 1.05rem; }
.me-sides { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .me-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.me-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.me-btn, .me-input, .me-select { min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--me-line); background: var(--me-btn); color: var(--me-ink); font: inherit; box-sizing: border-box; }
.me-btn { cursor: pointer; touch-action: manipulation; text-align: left; }
.me-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.me-input, .me-select { width: 100%; }
.me-btn:focus-visible, .me-input:focus-visible, .me-select:focus-visible, .me-links a:focus-visible { outline: 3px solid var(--me-focus); outline-offset: 2px; }
.me-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.me-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.me-chip { font-weight: 700; }
.me-chip::after { content: " ✕"; }
.me-note { margin: 0; color: var(--me-dim); }
.me-warn { margin: 0; color: var(--me-warn); font-weight: 700; }
.me-start { justify-self: start; font-weight: 700; }
.me-fights { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.me-fight { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid var(--me-line); border-radius: 8px; padding: 8px 10px; }
.me-fight .me-aviso { font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .me-btn { transition: background 0.15s; } }
.me-list .me-btn { width: 100%; }
/* inside the site (#/mesa, static/mesa-vista.js): the title of the view, in the column of the entry */
.me-titulo { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; max-width: 980px; margin: 0 auto 12px; font-size: 1.25rem; min-width: 0; overflow-wrap: anywhere; }
.me-titulo:focus { outline: none; }
/* the mould of the Mesa screens: the SRD seal beside the title and, at the foot, the FULL slot, reserved and empty (dashed, nothing to press) */
.me-selo { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 4px 10px; border: 1px solid var(--text, #f1edff); border-radius: 999px; background: var(--panel-2, #241f45); color: var(--text, #f1edff); font: 700 0.75rem/1.2 system-ui, sans-serif; letter-spacing: 0.08em; white-space: nowrap; }
.me-selo-full { border-style: dashed; border-color: var(--dim, #a6a0cc); background: transparent; color: var(--dim, #a6a0cc); }
.me-slot-full { display: flex; align-items: center; min-height: 44px; min-width: 0; box-sizing: border-box; padding: 10px 12px; border: 1px dashed var(--dim, #a6a0cc); border-radius: 10px; cursor: default; user-select: none; }
/* the custom fight (the catalogue of GET /api/mesa/montagem): kinds as tabs, the level / CR filter, "show more", the notices. A created hero's name may be ONE word of 40 letters: it breaks instead of pushing the page at 320 px. */
.me-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.me-tab[aria-pressed="true"] { font-weight: 700; border-width: 2px; border-color: var(--me-ink); }
.me-list .me-btn, .me-chip, .me-fight span { overflow-wrap: anywhere; min-width: 0; }
.me-chips li { min-width: 0; max-width: 100%; }
.me-chip { max-width: 100%; }
.me-item { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.me-nome { min-width: 0; overflow-wrap: anywhere; }
.me-medida { color: var(--me-dim); font-size: 0.9em; }
.me-marca { padding: 0 8px; border: 1px solid var(--me-line); border-radius: 999px; color: var(--me-dim); font-size: 0.75em; }
.me-mais { justify-self: start; }
.me-treino { font-weight: 700; }
.me-alerta, .me-avisos { margin: 0; padding: 8px 12px; border: 1px solid var(--me-line); border-left: 4px solid var(--me-warn); border-radius: 8px; overflow-wrap: anywhere; }
.me-avisos ul { margin: 4px 0 0; padding-left: 18px; }
.me-convite { display: grid; gap: 6px; justify-items: start; }
.me-atalho { display: inline-flex; align-items: center; text-decoration: none; }
