/*
 * Mi web — «Versión sencilla» (docs/plans/owner-web-cms/PLAN.md §7).
 *
 * Plain CSS for old phones: NO @layer (iOS < 15.4 / Chrome < 99 drop whole
 * layered blocks), no oklch, no :has, no container queries, no nesting, no
 * custom properties, no flex `gap` (iOS < 14.5) — margins instead. Unlayered,
 * so on modern browsers it also outranks the app's layered Tailwind CSS.
 * Readable at 320 px, tap targets >= 48 px, system fonts, high contrast.
 */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ffffff; color: #111111; }

.ws {
  display: block;
  max-width: 40rem;
  margin: 0 auto;
  padding: 16px 16px 64px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  color: #111111;
  background: #ffffff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.ws * { box-sizing: border-box; }

.ws h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 8px 0; font-weight: 700; }
.ws h2 { font-size: 22px; line-height: 1.25; margin: 28px 0 8px 0; font-weight: 700; }
.ws h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px 0; font-weight: 700; }
.ws p { margin: 0 0 12px 0; }
.ws a { color: #0b4fb3; text-decoration: underline; }
.ws img { max-width: 100%; height: auto; }

.ws-header { border-bottom: 2px solid #111111; padding-bottom: 8px; margin-bottom: 16px; }
.ws-venue { font-size: 15px; color: #444444; margin: 0; }
.ws-tier { font-size: 16px; font-weight: 400; color: #444444; }
.ws-links { margin: 4px 0 0 0; }
.ws-link { display: inline-block; padding: 12px 0; min-height: 48px; }

.ws-lead { color: #333333; }
.ws-muted { color: #555555; }
.ws-hint { font-size: 15px; color: #555555; margin: 4px 0 8px 0; }
.ws-warn { font-weight: 700; margin: 16px 0 8px 0; }
.ws-badge {
  display: inline-block;
  background: #fff4cc;
  border: 1px solid #a07800;
  color: #4d3a00;
  padding: 4px 8px;
  font-size: 15px;
  margin: 0 0 12px 0;
}

.ws-card {
  border: 1px solid #8a8a8a;
  border-radius: 6px;
  padding: 16px;
  margin: 0 0 16px 0;
  background: #ffffff;
}
.ws-publish { border: 2px solid #111111; }
.ws-live { margin-bottom: 8px; }

.ws-msg { border-radius: 6px; padding: 12px 16px; margin: 0 0 16px 0; border: 2px solid; }
.ws-msg p { margin: 0 0 4px 0; }
.ws-msg-ok { background: #e7f6ea; border-color: #1e7b34; color: #0d3d18; }
.ws-msg-bad { background: #fdecea; border-color: #b3261e; color: #5c0f0a; }

.ws-list { margin: 0 0 12px 0; padding: 0 0 0 20px; }
.ws-list li { margin: 0 0 4px 0; }
.ws-rows { padding: 0; list-style: none; }
.ws-row { border-bottom: 1px solid #cccccc; padding: 8px 0; }
.ws-row span { display: block; margin-bottom: 8px; }

.ws-form { margin: 0 0 16px 0; }
.ws-inline { display: inline-block; margin: 0 8px 8px 0; vertical-align: top; }
.ws-buttons { margin-top: 8px; }

.ws-field { margin: 0 0 16px 0; }
.ws-field label { display: block; font-weight: 700; margin: 0 0 6px 0; }
.ws-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 18px;
  font-family: inherit;
  color: #111111;
  background: #ffffff;
  border: 2px solid #555555;
  border-radius: 4px;
  -webkit-appearance: none;
}
textarea.ws-input { min-height: 120px; resize: vertical; }
.ws-input:focus { outline: 3px solid #0b4fb3; outline-offset: 1px; }
.ws-file { display: block; font-size: 17px; min-height: 48px; padding: 8px 0; }
.ws-check { display: block; font-weight: 400; padding: 12px 0; min-height: 48px; }
.ws-check input { width: 24px; height: 24px; vertical-align: middle; margin: 0 8px 0 0; }

.ws-details { margin: 8px 0 0 0; border-left: 3px solid #cccccc; padding: 0 0 0 12px; }
.ws-details summary { cursor: pointer; padding: 12px 0; min-height: 48px; font-weight: 700; color: #0b4fb3; }

.ws-day { border: 1px solid #aaaaaa; border-radius: 6px; margin: 0 0 12px 0; padding: 8px 12px 4px 12px; }
.ws-day legend { font-weight: 700; padding: 0 4px; }
.ws-tramo { margin: 0 0 8px 0; }
.ws-tramo-n { display: block; font-size: 15px; color: #555555; }
.ws-tramo label { display: inline-block; margin: 0 12px 4px 0; font-weight: 400; }
.ws-time { display: inline-block; width: 6.5em; }

.ws-btn {
  display: inline-block;
  min-height: 48px;
  min-width: 48px;
  padding: 12px 20px;
  font-size: 18px;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid #0b4fb3;
  cursor: pointer;
  -webkit-appearance: none;
}
.ws a.ws-btn { text-decoration: none; }
.ws-btn-primary { background: #0b4fb3; color: #ffffff; width: 100%; }
.ws-btn-plain { background: #ffffff; color: #0b4fb3; }
.ws a.ws-btn-plain { color: #0b4fb3; }
.ws-btn-danger { background: #ffffff; color: #a3150c; border-color: #a3150c; }

.ws-thumb { display: block; max-width: 240px; width: 100%; height: auto; border: 1px solid #cccccc; margin: 0 0 8px 0; }
.ws-gallery { list-style: none; padding: 0; margin: 0 0 16px 0; }

.ws-preview { border: 2px dashed #555555; padding: 16px; }
.ws-aviso { background: #111111; color: #ffffff; padding: 8px 12px; font-weight: 700; }
.ws-hero { display: block; width: 100%; height: auto; margin: 0 0 8px 0; }
.ws-tagline { font-size: 20px; font-style: italic; }
.ws-preview-gallery .ws-thumb { display: inline-block; max-width: 47%; margin: 0 2% 8px 0; }

@media (max-width: 360px) {
  .ws { font-size: 17px; padding: 12px 12px 48px 12px; }
  .ws h1 { font-size: 23px; }
}

@media (prefers-color-scheme: dark) {
  body, .ws, .ws-card { background: #121212; color: #f2f2f2; }
  .ws a, .ws-details summary { color: #8fb8ff; }
  .ws-venue, .ws-tier, .ws-lead, .ws-muted, .ws-hint, .ws-tramo-n { color: #cfcfcf; }
  .ws-header, .ws-publish { border-color: #f2f2f2; }
  .ws-card, .ws-day { border-color: #777777; }
  .ws-input { background: #1e1e1e; color: #f2f2f2; border-color: #aaaaaa; }
  .ws-btn-primary { background: #8fb8ff; color: #0a1a33; border-color: #8fb8ff; }
  .ws-btn-plain, .ws a.ws-btn-plain { background: #121212; color: #8fb8ff; border-color: #8fb8ff; }
  .ws-btn-danger { background: #121212; color: #ff9a92; border-color: #ff9a92; }
  .ws-msg-ok { background: #0f2e17; color: #d5f5dc; border-color: #5cc97a; }
  .ws-msg-bad { background: #3a1210; color: #ffd9d5; border-color: #ff8a80; }
  .ws-badge { background: #3a2f00; color: #ffe9a3; border-color: #d4a800; }
}
