/**
 * ew-styles.css — Schlangenrun-Projekt Custom Styles
 */

/* ==================== CSS Variables ==================== */
:root {
  --ew-bg-dark:      #1a0a05;
  --ew-bg-card:      #2a1510;
  --ew-bg-card-hover:#3a2015;
  --ew-gold:         #d4a855;
  --ew-gold-light:   #f0d090;
  --ew-gold-dark:    #a07830;
  --ew-red:          #8b0000;
  --ew-red-accent:   #cc3333;
  --ew-red-light:    #a02020;
  --ew-text:         #e8d5b5;
  --ew-text-muted:   #a08060;
  --ew-border:       #5a3020;
  --ew-border-gold:  #c4983a;
  /* Gruppen-Farben */
  --ew-group-a:      #cc3333;
  --ew-group-a-bg:   rgba(204,51,51,0.12);
  --ew-group-b:      #c8a020;
  --ew-group-b-bg:   rgba(200,160,32,0.12);
}

/* ==================== Base ==================== */
.ew-page {
  background: var(--ew-bg-dark);
  min-height: 100vh;
  color: var(--ew-text);
  font-family: 'Montserrat', Arial, sans-serif;
}

.ew-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 65% 20%, rgba(212,168,85,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 85%, rgba(139,0,0,0.18) 0%, transparent 50%),
    linear-gradient(135deg, #1a0a05 0%, #2a1510 50%, #1a0a05 100%);
  pointer-events: none;
}

.ew-content { position: relative; z-index: 1; }

/* ==================== Typography ==================== */
.ew-title    { color: var(--ew-gold); font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.ew-subtitle { color: var(--ew-text-muted); }

/* ==================== Cards ==================== */
.ew-card {
  background: var(--ew-bg-card);
  border: 2px solid var(--ew-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.ew-card-gold {
  border-color: var(--ew-border-gold);
  box-shadow: 0 4px 12px rgba(212,168,85,.2);
}

/* ==================== Navigation ==================== */
.ew-nav {
  display: flex;
  gap: 4px;
  background: var(--ew-bg-card);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--ew-border);
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.ew-nav-link {
  padding: 10px 18px;
  color: var(--ew-text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all .2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}
.ew-nav-link:hover { color: var(--ew-text); background: rgba(212,168,85,.1); }
.ew-nav-link.active { background: var(--ew-red); color: var(--ew-gold-light); }

/* ==================== Groups Side-by-Side ==================== */
.ew-groups-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 160px;
  align-items: stretch;
  margin-top: 48px;
  margin-bottom: 32px;
}

.ew-group-panel {
  border-radius: 10px;
  overflow: visible;
  border: 2px solid var(--ew-border);
  background: var(--ew-bg-card);
}
.ew-group-panel.group-a { border-color: var(--ew-group-a); }
.ew-group-panel.group-b { border-color: var(--ew-group-b); }

.ew-group-header {
  position: relative;
  text-align: center;
  margin: -94px -60px -70px;
}
.ew-group-panel.group-b .ew-group-header { margin-top: -100px; }
.ew-group-banner-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 548 / 295;
}
.ew-group-header-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 1rem;
  color: #fff8ee;
  text-shadow: 0 1px 6px rgba(0,0,0,1), 0 2px 12px rgba(0,0,0,.8);
  white-space: nowrap;
  pointer-events: none;
}

.ew-group-ms-divider { border: none; border-top: 1px solid var(--ew-border); margin: 0; }
.ew-group-ornament { display: block; width: 80%; max-width: 180px; margin: 6px auto; opacity: .85; }
.ew-modal-ornament { display: block; width: 70%; max-width: 220px; margin: 4px auto; opacity: .85; }
.ew-group-ms-heading { padding: 8px 12px 0; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ew-text-muted); }
.ew-group-ms-icons { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 12px 10px; }
.ew-group-ms-icon {
  background: none; border: none; cursor: pointer;
  font-size: 2rem; padding: 4px; border-radius: 6px;
  transition: transform .15s, opacity .15s;
  line-height: 1;
}
.ew-group-ms-icon:hover { transform: scale(1.2); }
.ew-group-ms-icon--open { opacity: .3; filter: grayscale(.85); }
.ew-group-ms-icon--a { opacity: 1; filter: none; }
.ew-group-ms-icon--b { opacity: 1; filter: none; }

.ew-players-list {
  position: relative;
  z-index: 1;
}

.ew-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ew-border);
  transition: background .15s;
}
.ew-player-row:last-child { border-bottom: none; }
.ew-player-row:hover { background: var(--ew-bg-card-hover); }

.ew-player-icon { font-size: 1.3rem; flex-shrink: 0; width: 28px; text-align: center; }
.ew-player-avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 50%; border: 2px solid var(--ew-border-gold); object-fit: cover; flex-shrink: 0; }
.ew-player-avatar-placeholder { background: var(--ew-bg-dark); display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: var(--ew-gold); }
.ew-class-icons { display: inline-flex; align-items: center; gap: 1px; flex-shrink: 0; }
.ew-class-icon { width: 28px; height: 28px; flex-shrink: 0; }

.ew-player-name { font-weight: 600; color: var(--ew-gold-light); text-decoration: none; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ew-player-name:hover { color: var(--ew-gold); text-decoration: underline; }
.ew-player-offline { font-size: .72rem; color: var(--ew-text-muted); white-space: nowrap; flex-shrink: 0; width: 62px; text-align: center; }
.ew-player-meta { font-size: .78rem; color: var(--ew-text-muted); white-space: nowrap; }
.ew-player-level { font-weight: 700; color: var(--ew-gold); font-size: 1.05rem; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }

/* VS badge */
.ew-vs-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ew-vs-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ew-red);
  border: 3px solid var(--ew-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem;
  color: var(--ew-gold);
  box-shadow: 0 0 16px rgba(212,168,85,.25);
}

/* ==================== Milestone / Server First List ==================== */
.ew-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ew-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ew-border-gold);
}

.ew-milestone-list,
.ew-first-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.ew-item-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--ew-border);
  background: var(--ew-bg-card);
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.ew-item-row:hover { border-color: var(--ew-gold-dark); background: var(--ew-bg-card-hover); }
.ew-item-row.ew-item-special { border-color: var(--ew-border-gold); }

.ew-item-icon { font-size: 1.2rem; text-align: center; }

.ew-item-name {
  font-weight: 600;
  color: var(--ew-text);
  transition: color .2s;
}
.ew-item-row:hover .ew-item-name { color: var(--ew-gold-light); }

/* Group status badges on the right */
.ew-item-badges { display: flex; gap: 6px; }

.ew-group-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all .2s;
  flex-shrink: 0;
}
.ew-group-dot.unclaimed   { background: var(--ew-bg-dark); border-color: var(--ew-border); color: var(--ew-text-muted); opacity: .5; }
.ew-group-dot.claimed-a   { background: var(--ew-group-a); border-color: var(--ew-group-a); color: #fff; box-shadow: 0 0 8px rgba(59,130,246,.4); }
.ew-group-dot.claimed-b   { background: var(--ew-group-b); border-color: var(--ew-group-b); color: #fff; box-shadow: 0 0 8px rgba(239,68,68,.4); }

/* Greyed-out state when nothing claimed yet */
.ew-item-row.all-unclaimed { opacity: .55; }
.ew-item-row.all-unclaimed:hover { opacity: 1; }

/* ==================== Modal (SRUI.openModal — appended to body) ==================== */
.ew-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.ew-modal-overlay.active { opacity: 1; visibility: visible; }

.ew-modal {
  position: relative;
  background: var(--ew-bg-card);
  border: 3px solid var(--ew-border-gold);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  transform: scale(.9);
  transition: transform .2s;
}
.ew-modal-overlay.active .ew-modal { transform: scale(1); }

.ew-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none; border: none; color: var(--ew-text-muted);
  font-size: 1.3rem; cursor: pointer; padding: 4px; transition: color .2s; line-height: 1;
}
.ew-modal-close:hover { color: var(--ew-gold); }

.ew-modal-icon { font-size: 2.5rem; text-align: center; margin-bottom: 10px; }
.ew-modal-title { color: var(--ew-gold-light); font-size: 1.2rem; font-weight: 700; text-align: center; margin-bottom: 16px; padding-right: 24px; }
.ew-modal-row { display: flex; gap: 8px; margin-bottom: 8px; font-size: .9rem; line-height: 1.5; }
.ew-modal-label { color: var(--ew-gold); font-weight: 600; white-space: nowrap; }
.ew-modal-divider { border: none; border-top: 1px solid var(--ew-border); margin: 14px 0; }
.ew-modal-status { padding: 8px 12px; border-radius: 6px; font-size: .875rem; margin-bottom: 6px; }
.ew-modal-status.unclaimed  { background: var(--ew-bg-dark); border: 1px solid var(--ew-border); color: var(--ew-text-muted); }
.ew-modal-status.claimed-a  { background: var(--ew-group-a-bg); border: 1px solid var(--ew-group-a); color: #f08080; }
.ew-modal-status.claimed-b  { background: var(--ew-group-b-bg); border: 1px solid var(--ew-group-b); color: #e8c84a; }
.ew-modal-hint { font-size: .78rem; color: var(--ew-text-muted); line-height: 1.55; margin-top: 12px; padding: 10px 12px; background: rgba(212,168,85,.06); border-left: 3px solid var(--ew-gold-dark); border-radius: 0 4px 4px 0; }

/* ew-ui.js form modals */
.ew-form-group { margin-bottom: 14px; }
.ew-form-group label, .ew-label { display: block; font-size: .78rem; color: var(--ew-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.ew-textarea {
  width: 100%; background: var(--ew-bg-dark); border: 1px solid var(--ew-border);
  border-radius: 6px; color: var(--ew-text); padding: 10px 12px; font-size: .9rem;
  font-family: inherit; outline: none; resize: vertical; transition: border-color .2s;
}
.ew-textarea:focus { border-color: var(--ew-gold-dark); }
.ew-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ==================== Clips ==================== */
.ew-clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.ew-clip-card {
  background: var(--ew-bg-card);
  border: 1px solid var(--ew-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all .2s;
}
.ew-clip-card:hover { border-color: var(--ew-gold-dark); transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.ew-clip-link { display: block; text-decoration: none; color: inherit; }
.ew-clip-thumbnail { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--ew-bg-dark); }
.ew-clip-info { padding: 10px 12px; }
.ew-clip-title { color: var(--ew-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.ew-clip-meta { font-size: .75rem; color: var(--ew-text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.ew-clip-meta > span:first-child { white-space: nowrap; flex-shrink: 0; }
.ew-clip-type { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .7rem; font-weight: 600; text-transform: uppercase; }
.ew-clip-type-highlight     { background: rgba(0,255,136,.2); color: #00ff88; }
.ew-clip-type-milestone     { background: rgba(212,168,85,.2); color: var(--ew-gold); }
.ew-clip-type-server-first  { background: rgba(168,85,247,.35); color: #c084fc; border: 1px solid rgba(168,85,247,.6); font-weight: 700; }
.ew-clip-type-bonus-event   { background: rgba(251,146,60,.2); color: #fb923c; }

/* ==================== Player/Operator Dashboard ==================== */
.ew-dashboard {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px;
}
.ew-dashboard-header {
  background: linear-gradient(135deg, var(--ew-red) 0%, var(--ew-red-light) 100%);
  border: 2px solid var(--ew-border-gold);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}
.ew-dashboard-name { font-size: 1.4rem; font-weight: 800; color: var(--ew-gold); margin-bottom: 4px; }
.ew-dashboard-meta { color: var(--ew-text-muted); font-size: .875rem; }

.ew-form-section {
  background: var(--ew-bg-card);
  border: 1px solid var(--ew-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}
.ew-form-label { font-size: .8rem; color: var(--ew-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.ew-input {
  width: 100%;
  background: var(--ew-bg-dark);
  border: 1px solid var(--ew-border);
  border-radius: 6px;
  color: var(--ew-text);
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.ew-input:focus { border-color: var(--ew-gold-dark); }
.ew-select {
  width: 100%;
  background: var(--ew-bg-dark);
  border: 1px solid var(--ew-border);
  border-radius: 6px;
  color: var(--ew-text);
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}
.ew-select:focus { border-color: var(--ew-gold-dark); }
.ew-select option { background: var(--ew-bg-card); }

/* Hold-to-confirm button */
.ew-hold-btn {
  position: relative;
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, var(--ew-red) 0%, var(--ew-red-light) 100%);
  border: 2px solid var(--ew-border-gold);
  border-radius: 8px;
  color: var(--ew-gold-light);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow .2s;
  margin-top: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.ew-hold-btn:disabled { opacity: .5; cursor: not-allowed; }
.ew-hold-btn.holding { box-shadow: 0 0 20px rgba(212,168,85,.4); }
.ew-hold-btn-label { position: relative; z-index: 1; pointer-events: none; }
.ew-hold-btn-progress {
  position: absolute;
  inset: 0;
  background: rgba(212,168,85,.28);
  width: 0;
  transition: none;
  pointer-events: none;
}
.ew-hold-btn.holding .ew-hold-btn-progress {
  width: 100%;
  transition: width var(--hold-dur, 1500ms) linear;
}

/* Simple submit button */
.ew-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer;
  transition: all .2s; border: 2px solid transparent; font-family: inherit; font-size: .95rem;
}
#op-login-btn:hover { filter: brightness(1.1); }
.ew-btn-primary {
  background: linear-gradient(180deg, var(--ew-red) 0%, var(--ew-red-light) 100%);
  color: var(--ew-gold-light); border-color: var(--ew-border-gold); width: 100%;
}
.ew-btn-primary:hover { box-shadow: 0 4px 12px rgba(139,0,0,.4); filter: brightness(1.2); }
.ew-btn-secondary {
  background: var(--ew-bg-card); color: var(--ew-text); border-color: var(--ew-border);
}
.ew-btn-secondary:hover { border-color: var(--ew-gold-dark); color: var(--ew-gold); }
.ew-btn-danger {
  background: rgba(200,30,30,.35); color: #ff8080; border-color: #cc2222;
}
.ew-btn-danger:hover { background: rgba(200,30,30,.55); border-color: #ee3333; color: #ffaaaa; }

/* ==================== OBS Widget ==================== */
.ew-obs-area {
  padding: 14px 16px;
  overflow: visible;
}

.ew-obs-widget {
  position: relative;
  width: fit-content;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Floating top badge — project name */
.ew-obs-badge {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: rgba(26,10,5,.95);
  border: 2px solid var(--ew-border-gold);
  border-radius: 4px;
  padding: 2px 10px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--ew-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Floating bottom badge — M2-Helper */
.ew-obs-badge-bottom {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translate(-50%, 50%);
  z-index: 1;
  background: rgba(26,10,5,.95);
  border: 1px solid var(--ew-border);
  border-radius: 4px;
  padding: 3px 12px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--ew-text-muted);
  letter-spacing: 1px;
  white-space: nowrap;
}

.ew-obs-hint { font-size: .72rem; color: var(--ew-text-muted); text-align: center; margin: 6px 0 0; letter-spacing: .5px; }
.ew-obs-divider { border: none; border-top: 1px solid var(--ew-border-gold); margin: 10px 16px 16px; opacity: .4; }

/* Player Info widget */
.ew-obs-pi-wrap { display: flex; align-items: center; gap: 14px; width: 100%; }
.ew-obs-avatar { width: 56px; height: 56px; min-width: 56px; border-radius: 50%; border: 2px solid var(--ew-gold-dark); object-fit: cover; }
.ew-obs-avatar-ph { background: var(--ew-bg-dark); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; color: var(--ew-gold); }
.ew-obs-pi-text { flex: 1; text-align: left; overflow: hidden; }
.ew-obs-pi-name { font-size: 1rem; font-weight: 800; color: var(--ew-gold-light); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-obs-pi-level { font-size: 1.5rem; font-weight: 900; color: var(--ew-gold); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ew-obs-pi-icons { display: flex; gap: 3px; margin-top: 4px; }
.ew-obs-class-icon { width: 28px; height: 28px; }

/* Target widget */
.ew-obs-target-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 4px; }
.ew-obs-target-name { font-size: 1rem; font-weight: 700; color: var(--ew-gold-light); margin-bottom: 4px; }
.ew-obs-target-cond { font-size: .75rem; color: var(--ew-text-muted); text-align: center; }

/* Group widget */
.ew-obs-group-header { font-size: .72rem; font-weight: 700; color: var(--ew-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; width: 100%; text-align: center; }
.ew-obs-group-list { display: flex; flex-direction: column; gap: 1px; width: 100%; }
.ew-obs-group-row { display: flex; align-items: center; gap: 6px; min-height: 20px; }

/* Group Widget */
.ew-obs-gw-main, .ew-obs-gw-side { position: relative; display: inline-block; }
.ew-obs-gw-banner-img { display: block; height: 70px; width: auto; }
.ew-obs-gw-main .ew-obs-gw-banner-img { width: 210px; height: auto; }
.ew-obs-gw-main-content {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 8px; padding: 0 18px 0 22px;
}

/* Group Widget — single image */
.ew-obs-gw-container { position: relative; display: inline-block; }
.ew-obs-gw-bg-img { display: block; width: 240px; height: auto; }
.ew-obs-gw-overlay { position: absolute; inset: 0; }
.ew-obs-gw-row { position: absolute; display: flex; flex-direction: row; align-items: center; gap: 4px; }
.ew-obs-gw-row-text { display: flex; flex-direction: column; gap: 0; }
.ew-obs-gw-row-level { font-size: .72rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); line-height: 1.1; margin-top: -1px; }
.ew-obs-gw-row--main { font-weight: 800; }
/* M2-Helper Label (individuell einstellbar) */
.ew-obs-gw-group-label { position: absolute; top: 280px; left: 50%; transform: translateX(-50%); font-size: .6rem; font-weight: 700; color: #fff; text-align: center; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 0 6px rgba(212,168,85,.9), 0 1px 3px rgba(0,0,0,1); }
/* Individuelle Positionen pro Spieler (0–4) */
.ew-obs-gw-row--p0 { top:  47px; left: 49px; }
.ew-obs-gw-row--p1 { top: 110px; left: 49px; }
.ew-obs-gw-row--p2 { top: 176px; left: 49px; }
.ew-obs-gw-row--p3 { top: 244px; left: 49px; }
.ew-obs-gw-row--p4 { top: 312px; left: 49px; }
/* Gruppe B (yellow) Positions-Overrides */
.ew-obs-gw-container--yellow .ew-obs-gw-row { left: 50px; }
.ew-obs-gw-container--yellow .ew-obs-gw-row--p0 { top: 45px; }
.ew-obs-gw-container--yellow .ew-obs-gw-row--p1 { top: 107px; }
.ew-obs-gw-container--yellow .ew-obs-gw-row--p2 { top: 171px; }
.ew-obs-gw-container--yellow .ew-obs-gw-row--p3 { top: 238px; }
.ew-obs-gw-container--yellow .ew-obs-gw-row--p4 { top: 305px; }
.ew-obs-gw-container--yellow .ew-obs-gw-group-label { top: 273px; }
.ew-obs-gw-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ew-gold-dark); object-fit: cover; flex-shrink: 0;
  margin-top: 7px; margin-left: -8px;
}
.ew-obs-gw-avatar-ph {
  background: var(--ew-bg-dark); display: flex; align-items: center;
  justify-content: center; font-size: .85rem; font-weight: 700; color: var(--ew-gold);
}
.ew-obs-gw-main-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-left: 18px; margin-top: 14px; position: relative; }
.ew-obs-gw-name { font-weight: 700; font-size: .82rem; color: #fff; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.ew-obs-timer-text { font-variant-numeric: tabular-nums; }
.ew-obs-gw-side:not(.ew-obs-gw-side--goal) .ew-obs-gw-name { font-size: .74rem; }
.ew-obs-gw-meta { display: flex; align-items: center; gap: 2px; font-size: 1.05rem; margin-top: 5px; }
.ew-obs-gw-level { font-size: 1.2rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); margin-left: 6px; }
.ew-obs-gw-score-text { font-size: .80rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: -7px; margin-left: -2px; }
.ew-obs-gw-score-text--sf { margin-left: -1px; }
.ew-obs-gw-label { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: .58rem; font-weight: 700; color: #fff; text-align: center; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 0 6px rgba(212,168,85,.9), 0 1px 3px rgba(0,0,0,1); }
/* Gruppen-spezifische Widget-Overrides */
.ew-obs-widget--red .ew-obs-gw-meta { margin-top: -10px; }
.ew-obs-widget--yellow .ew-obs-gw-meta { margin-top: -9px; }
.ew-obs-widget--red .ew-obs-gw-label { bottom: 19px; }
.ew-obs-widget--red .ew-obs-gw-side--goal { margin-top: -35px; }
.ew-obs-gw-side-content {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 4px; padding: 0 14px 0 22px;
}
.ew-obs-gw-side--goal .ew-obs-gw-banner-img { height: 108px; }
.ew-obs-widget--red .ew-obs-gw-side--goal .ew-obs-gw-side-content { padding-left: 37px; }
.ew-obs-widget--yellow .ew-obs-gw-side--goal .ew-obs-gw-side-content { padding-left: 29px; }
.ew-obs-widget--red .ew-obs-gw-side--goal .ew-obs-gw-banner-img { height: 116px; }
.ew-obs-gw-side--goal { margin-top: -30px; }
.ew-obs-gr-name { flex: 1; font-size: .77rem; font-weight: 600; color: var(--ew-gold-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-obs-gr-icons { display: flex; gap: 1px; flex-shrink: 0; }
.ew-obs-gr-level { font-size: .72rem; color: var(--ew-gold); font-variant-numeric: tabular-nums; min-width: 3.5ch; text-align: right; flex-shrink: 0; }

/* Score widgets */
.ew-obs-score-label { font-size: .72rem; font-weight: 700; color: var(--ew-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.ew-obs-score-count { font-size: 2.4rem; font-weight: 900; color: var(--ew-gold-light); line-height: 1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.ew-obs-bar-bg { width: 100%; max-width: 280px; height: 8px; background: rgba(212,168,85,.15); border-radius: 4px; overflow: hidden; }
.ew-obs-bar-fill { height: 100%; background: linear-gradient(90deg, var(--ew-gold-dark), var(--ew-gold)); border-radius: 4px; transition: width .3s ease; min-width: 0; }

/* Timer widget */
.ew-obs-timer-value { font-size: 2.5rem; font-weight: 900; color: var(--ew-gold-light); font-variant-numeric: tabular-nums; line-height: 1; }

/* Empty state */
.ew-obs-empty-msg { font-size: .85rem; color: var(--ew-text-muted); }

/* ==================== Loading & Empty ==================== */
.ew-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--ew-text-muted); }
.ew-loading-spinner { width: 48px; height: 48px; border: 3px solid var(--ew-border); border-top-color: var(--ew-gold); border-radius: 50%; animation: ew-spin 1s linear infinite; margin-bottom: 16px; }
@keyframes ew-spin { to { transform: rotate(360deg); } }
.ew-empty { text-align: center; padding: 60px 20px; color: var(--ew-text-muted); }
.ew-empty-icon { font-size: 3rem; margin-bottom: 16px; }

/* ==================== Operator Table ==================== */
.ew-op-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ew-op-table th { background: var(--ew-red); color: var(--ew-gold-light); padding: 10px 12px; text-align: left; font-weight: 600; }
.ew-op-table td { padding: 8px 12px; border-bottom: 1px solid var(--ew-border); vertical-align: middle; }
.ew-op-table tr:hover td { background: var(--ew-bg-card-hover); }

.ew-token-url {
  font-family: monospace;
  font-size: .75rem;
  color: var(--ew-gold);
  word-break: break-all;
  background: var(--ew-bg-dark);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--ew-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ew-copy-btn {
  background: none; border: 1px solid var(--ew-border-gold); color: var(--ew-gold);
  border-radius: 4px; padding: 2px 8px; cursor: pointer; font-size: .7rem; white-space: nowrap;
  transition: all .2s;
}
.ew-copy-btn:hover { background: rgba(212,168,85,.15); }

/* ==================== Toast Notification ==================== */
.ew-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ew-bg-card);
  border: 2px solid var(--ew-border-gold);
  border-radius: 8px;
  padding: 12px 20px;
  color: var(--ew-gold-light);
  font-weight: 600;
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s;
}
.ew-toast.show { transform: translateY(0); opacity: 1; }
.ew-toast.error { border-color: var(--ew-group-b); color: #fca5a5; }

/* ==================== Section Headings ==================== */
.ew-section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ew-gold);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ew-border-gold);
}

/* ==================== Item List (index) ==================== */
.ew-items-list { display: flex; flex-direction: column; gap: 5px; }
.ew-item-label { color: var(--ew-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-item-row:hover .ew-item-label { color: var(--ew-gold-light); }

/* Server first single badge */
.ew-first-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.ew-first-badge.unclaimed { background: var(--ew-bg-dark); border: 1px solid var(--ew-border); color: var(--ew-text-muted); }
.ew-first-badge.claimed-a { background: var(--ew-group-a); color: #fff; }
.ew-first-badge.claimed-b { background: var(--ew-group-b); color: #fff; }

/* ==================== Card Components (player/operator) ==================== */
.ew-card-header {
  padding: 12px 16px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--ew-border-gold);
  border-radius: 6px 6px 0 0;
  font-weight: 700;
  color: var(--ew-gold-light);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ew-card-body { padding: 16px; }
.ew-info-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--ew-border); gap: 12px; }
.ew-info-row:last-child { border-bottom: none; }
.ew-info-label { font-size: .8rem; color: var(--ew-text-muted); }
.ew-info-value { font-weight: 600; color: var(--ew-gold-light); }
.ew-hint { font-size: .78rem; color: var(--ew-text-muted); margin-top: 8px; line-height: 1.5; }
.ew-link { color: var(--ew-gold); text-decoration: none; font-weight: 500; transition: color .2s; }
.ew-link:hover { color: var(--ew-gold-light); }

/* ==================== Operator Panel ==================== */
.ew-op-section-wrap { background: var(--ew-bg-card); border: 1px solid var(--ew-border); border-radius: 10px; padding: 20px; }
.ew-op-section { margin-bottom: 20px; }
.ew-op-group-label { font-size: 1rem; font-weight: 700; color: var(--ew-gold); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--ew-border); }
.ew-op-player-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ew-bg-dark); border: 1px solid var(--ew-border); border-radius: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.ew-op-player-icon { font-size: 1.2rem; flex-shrink: 0; }
.ew-op-player-name { flex: 1; font-weight: 600; color: var(--ew-gold-light); min-width: 80px; }
.ew-op-player-level { font-size: .9rem; font-weight: 700; color: var(--ew-gold); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 5ch; text-align: center; }
.ew-op-level-ctrl { display: flex; align-items: center; gap: 3px; }
.ew-op-level-btn { padding: 3px 8px !important; font-size: .85rem !important; min-width: 26px; line-height: 1; }
.ew-op-hint { font-size: .8rem; color: var(--ew-text-muted); margin-bottom: 10px; }

/* Collapsible sections */
.ew-op-collapse-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 0 0 12px 0; gap: 8px;
}
.ew-op-chevron {
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--ew-gold); transition: transform 0.2s ease;
}
.ew-op-chevron.rotated { transform: rotate(-90deg); }
.ew-op-collapsible { overflow: hidden; transition: max-height 0.25s ease, opacity 0.2s ease; max-height: 9999px; opacity: 1; }
.ew-op-collapsible.collapsed { max-height: 0; opacity: 0; pointer-events: none; }

.ew-op-ms-list { display: flex; flex-direction: column; gap: 4px; }
.ew-op-ms-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ew-bg-dark); border: 1px solid var(--ew-border); border-radius: 6px; flex-wrap: wrap; }
.ew-op-ms-name { flex: 1; font-size: .9rem; color: var(--ew-text); min-width: 120px; }

.ew-btn-sm { padding: 5px 10px; font-size: .78rem; }
.ew-btn-claimed-a { background: var(--ew-group-a-bg) !important; border-color: var(--ew-group-a) !important; color: #f08080 !important; }
.ew-btn-claimed-b { background: var(--ew-group-b-bg) !important; border-color: var(--ew-group-b) !important; color: #e8c84a !important; }
.ew-btn-unclaim { background: var(--ew-bg-dark); border-color: var(--ew-border); color: var(--ew-text-muted); }
.ew-btn-unclaim:hover { border-color: var(--ew-gold-dark); color: var(--ew-gold); }

.ew-op-event-card { background: var(--ew-bg-dark); border: 1px solid var(--ew-border); border-radius: 8px; padding: 14px; margin-bottom: 8px; }
.ew-op-event-title { font-weight: 700; color: var(--ew-gold-light); margin-bottom: 4px; }
.ew-op-event-dates { font-size: .8rem; color: var(--ew-text-muted); margin-bottom: 10px; }
.ew-op-event-actions { display: flex; gap: 8px; }

/* ==================== Calendar (events.html) ==================== */
.ew-calendar { background: var(--ew-bg-card); border: 2px solid var(--ew-border); border-radius: 12px; overflow: hidden; }
.ew-cal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: linear-gradient(180deg, var(--ew-red) 0%, var(--ew-red-light) 100%); border-bottom: 2px solid var(--ew-border-gold); }
.ew-cal-title { font-size: 1.25rem; font-weight: 700; color: var(--ew-gold-light); }
.ew-cal-nav { background: rgba(0,0,0,.3); border: 1px solid var(--ew-border-gold); color: var(--ew-gold-light); border-radius: 6px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; transition: all .2s; display: flex; align-items: center; justify-content: center; }
.ew-cal-nav:hover { background: rgba(212,168,85,.2); }
.ew-cal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); background: rgba(0,0,0,.2); border-bottom: 1px solid var(--ew-border); }
.ew-cal-weekdays > div { text-align: center; padding: 12px 8px; font-size: .8rem; font-weight: 600; color: var(--ew-gold); text-transform: uppercase; }
.ew-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.ew-cal-day { padding: 6px; min-height: 80px; border-right: 1px solid var(--ew-border); border-bottom: 1px solid var(--ew-border); display: flex; flex-direction: column; align-items: stretch; overflow: hidden; transition: background .15s; }
.ew-cal-day:nth-child(7n) { border-right: none; }
.ew-cal-day.other-month { opacity: .3; }
.ew-cal-day.today { background: rgba(212,168,85,.1); border: 2px solid var(--ew-gold); }
.ew-cal-day.today .ew-cal-num { color: var(--ew-gold); }
.ew-cal-day.has-event { cursor: pointer; }
.ew-cal-day.has-event:hover { background: var(--ew-bg-card-hover); }
.ew-cal-num { font-size: .8rem; color: var(--ew-text); font-weight: 600; align-self: flex-start; margin-bottom: 4px; }
.ew-cal-event-dots { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; width: 100%; }
.ew-cal-event-dot { font-size: .65rem; background: rgba(212,168,85,.1); border: 1px solid var(--ew-border); border-radius: 4px; padding: 2px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: var(--ew-text); }

/* Next event card */
.ew-next-event { display: flex; gap: 20px; background: var(--ew-bg-card); border: 2px solid var(--ew-border-gold); border-radius: 12px; padding: 20px; margin-bottom: 24px; cursor: pointer; box-shadow: 0 4px 16px rgba(212,168,85,.15); transition: box-shadow .2s; }
.ew-next-event:hover { box-shadow: 0 4px 24px rgba(212,168,85,.3); }
.ew-next-event-image { width: 120px; height: 120px; min-width: 120px; object-fit: cover; object-position: top center; border-radius: 8px; border: 1px solid var(--ew-border); background: var(--ew-bg-dark); }
.ew-next-event-placeholder { width: 120px; height: 120px; min-width: 120px; background: linear-gradient(135deg, var(--ew-red) 0%, var(--ew-red-light) 100%); border-radius: 8px; border: 1px solid var(--ew-border-gold); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.ew-next-event-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ew-next-event-label { font-size: .75rem; color: var(--ew-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.ew-next-event-title { font-size: 1.5rem; font-weight: 700; color: var(--ew-gold-light); margin-bottom: 8px; }
.ew-next-event-date { color: var(--ew-text); margin-bottom: 4px; }
.ew-next-event-countdown { font-size: .9rem; color: var(--ew-text-muted); }
.ew-no-event { text-align: center; padding: 40px 20px; background: var(--ew-bg-card); border: 2px solid var(--ew-border); border-radius: 12px; margin-bottom: 24px; color: var(--ew-text-muted); }


/* Event modal (events.html — separate from SRUI modal) */
.ew-event-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all .2s; }
.ew-event-modal-overlay.open { opacity: 1; visibility: visible; }
.ew-event-modal { background: var(--ew-bg-card); border: 3px solid var(--ew-border-gold); border-radius: 12px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; }
.ew-modal-event-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: linear-gradient(180deg, var(--ew-red) 0%, var(--ew-red-light) 100%); border-bottom: 2px solid var(--ew-border-gold); }
.ew-modal-event-title { color: var(--ew-gold-light); font-size: 1.1rem; font-weight: 700; }
.ew-modal-event-close { background: none; border: none; color: var(--ew-text-muted); font-size: 1.3rem; cursor: pointer; padding: 4px; transition: color .2s; }
.ew-modal-event-close:hover { color: var(--ew-gold); }
.ew-modal-event-img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: var(--ew-bg-dark); border-bottom: 1px solid var(--ew-border); }
.ew-modal-event-body { padding: 18px 20px; }
.ew-modal-event-date { font-size: .9rem; color: var(--ew-gold); margin-bottom: 10px; }
.ew-modal-event-desc { color: var(--ew-text); line-height: 1.6; margin-bottom: 10px; }
.ew-modal-event-reward { background: rgba(212,168,85,.1); border: 1px solid var(--ew-border-gold); border-radius: 6px; padding: 8px 12px; color: var(--ew-gold-light); font-weight: 600; font-size: .9rem; }

/* ==================== Rules Page ==================== */
.ew-rules-section { background: var(--ew-bg-card); border: 1px solid var(--ew-border); border-radius: 10px; padding: 22px 20px; margin-bottom: 20px; }
.ew-rules-heading { font-size: 1.15rem; font-weight: 800; color: var(--ew-gold); margin-bottom: 6px; padding-bottom: 0; border-bottom: none; }
.ew-rules-heading::after { content: ''; display: block; width: 85%; max-width: 480px; height: 22px; margin: 6px auto 10px; background: url('resources/ui/ornament4.png') center / contain no-repeat; opacity: .75; }
.ew-rules-lead { color: var(--ew-text); line-height: 1.65; margin-bottom: 14px; }
.ew-rules-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ew-rules-list li { padding: 5px 0 5px 20px; position: relative; font-size: .9rem; color: var(--ew-text); border-bottom: 1px solid rgba(90,48,32,.4); }
.ew-rules-list li:last-child { border-bottom: none; }
.ew-rules-list li::before { content: '⚔'; position: absolute; left: 0; color: var(--ew-gold); font-size: .8rem; }

.ew-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--ew-border); margin-bottom: 14px; }
.ew-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ew-table thead th { background: var(--ew-red); color: var(--ew-gold-light); padding: 10px 12px; text-align: left; font-weight: 700; white-space: nowrap; }
.ew-table tbody td { padding: 8px 12px; border-bottom: 1px solid var(--ew-border); color: var(--ew-text); vertical-align: middle; }
.ew-table tbody td:first-child { white-space: nowrap; vertical-align: middle; }
.ew-table-icon-col { width: 3.5rem; text-align: center; padding: 6px 4px !important; white-space: nowrap; }
.ew-table-icon { width: 3rem; height: 3rem; object-fit: contain; display: block; margin: 0 auto; }
.ew-table tbody tr:nth-child(even) td { background: rgba(212,168,85,.04); }
.ew-table tbody tr:hover td { background: var(--ew-bg-card-hover); }


.ew-rules-box { background: var(--ew-bg-dark); border: 1px solid var(--ew-border-gold); border-radius: 8px; padding: 16px; margin-top: 14px; }
.ew-rules-box-title { font-weight: 700; color: var(--ew-gold); margin-bottom: 8px; }
.ew-rules-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.ew-rules-col-title { font-weight: 700; margin-bottom: 8px; }

.ew-rules-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.ew-rules-event-card { background: var(--ew-bg-dark); border: 1px solid var(--ew-border); border-radius: 8px; padding: 14px; }
.ew-rules-event-title { font-weight: 700; color: var(--ew-gold-light); margin-bottom: 6px; }
.ew-rules-event-card p { font-size: .85rem; color: var(--ew-text); line-height: 1.55; }

/* ==================== Countdown Timer ==================== */
.ew-countdown { background: var(--ew-bg-card); border: 1px solid var(--ew-border-gold); border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 48px; }
.ew-countdown-timer { font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--ew-gold); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
@keyframes ew-countdown-pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
.ew-countdown.active .ew-countdown-timer { animation: ew-countdown-pulse 1.5s ease-in-out infinite; }

/* ==================== Footer ==================== */
.ew-footer { font-size: .8rem; color: var(--ew-text-muted); border-top: 1px solid var(--ew-border); }

/* ==================== Twitch link in player rows ==================== */
.ew-player-twitch { text-decoration: none; font-size: 1rem; transition: opacity .2s; }
.ew-player-twitch:hover { opacity: .8; }
.ew-live-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 62px; background: rgba(0,255,136,.15); border: 1px solid #00ff88; color: #00ff88; padding: 3px 8px; border-radius: 20px; font-size: .7rem; font-weight: 700; text-transform: uppercase; text-decoration: none; animation: ew-pulse-live 2s infinite; transition: all .2s; flex-shrink: 0; }
.ew-live-badge:hover { background: rgba(0,255,136,.25); transform: scale(1.05); }
.ew-live-badge::before { content: ''; width: 7px; height: 7px; background: #00ff88; border-radius: 50%; flex-shrink: 0; animation: ew-blink 2s infinite; }
@keyframes ew-pulse-live { 0%,100% { box-shadow: 0 0 0 0 rgba(0,255,136,.4); } 50% { box-shadow: 0 0 0 5px rgba(0,255,136,0); } }
@keyframes ew-blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .ew-groups-wrap { grid-template-columns: 1fr; gap: 48px; }
  .ew-vs-badge { display: none; }
  .ew-nav-link { padding: 8px 12px; font-size: .875rem; }
  .ew-item-row { grid-template-columns: 1.6rem 1fr auto; }
  .ew-rules-two-col { grid-template-columns: 1fr; }
  .ew-form-row { grid-template-columns: 1fr; }
  .ew-next-event { flex-direction: column; align-items: center; text-align: center; }
  .ew-cal-day { min-height: 60px; padding: 3px; }
  .ew-cal-num { font-size: .7rem; }
  .ew-cal-weekdays > div { padding: 8px 4px; font-size: .7rem; }
  .ew-cal-event-dot { font-size: .55rem; padding: 1px 2px; }
}
@media (max-width: 480px) {
  .ew-nav { justify-content: center; }
  .ew-nav-link { padding: 7px 10px; font-size: .8rem; }
  .ew-cal-day { min-height: 50px; }
  .ew-cal-num { font-size: .65rem; }
  .ew-cal-event-dot { font-size: .5rem; }
}
