/* max-news – „Neu im TryCasino“ (js/news.js, Einträge in /news.json).
   Bühne #tcNews: data-view="open" = drei Kacheln (die neueste groß, mit Bild), data-view="collapsed" = eine Zeile.
   Liste aller Einträge: dialog#tcNewsDialog. Farben je Art über --ore (neu = Diamant, besser = Smaragd, fix = Gold, aktion = Amethyst).
   Knopf „Neuigkeiten“ in der Kurzinfo-Zeile (#tcNewsReopen, max-home.css) bekommt bei Ungelesenem einen Punkt (.has-news). */

body.tc-redesign.tc-max #siteMain #tcNews {
  width: 100%;
  max-width: calc(var(--mx-container) + 2 * var(--mx-gutter));
  margin: 12px auto 0;
  padding: 0 var(--mx-gutter);
  box-sizing: border-box;
  scroll-margin-top: 92px;
}
body.tc-redesign.tc-max #siteMain #tcNews[hidden] { display: none; }
body.tc-redesign.tc-max #tcNews :is([data-type="neu"], .nw-tile) { --ore: var(--mx-diamond); }
body.tc-redesign.tc-max #tcNews [data-type="besser"], body.tc-redesign.tc-max #tcNewsDialog [data-type="besser"] { --ore: var(--mx-emerald); }
body.tc-redesign.tc-max #tcNews [data-type="fix"], body.tc-redesign.tc-max #tcNewsDialog [data-type="fix"] { --ore: var(--mx-gold); }
body.tc-redesign.tc-max #tcNews [data-type="aktion"], body.tc-redesign.tc-max #tcNewsDialog [data-type="aktion"] { --ore: var(--mx-amethyst); }
body.tc-redesign.tc-max #tcNews [data-type="partner"], body.tc-redesign.tc-max #tcNewsDialog [data-type="partner"] { --ore: #a78bfa; }

/* ------------------------------------------------------------ Kopfzeile */
body.tc-redesign.tc-max #tcNews .nw-head { display: flex; align-items: center; gap: 8px 12px; min-height: 34px; margin: 0 0 8px; }
body.tc-redesign.tc-max #tcNews .nw-title {
  display: inline-flex !important;
  align-items: center !important;
  flex: none !important;
  gap: 10px !important;
  margin: 0 !important;
  color: var(--mx-text) !important;
  font-family: var(--mx-font-body) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}
body.tc-redesign.tc-max #tcNews .nw-title:focus { outline: none; }
body.tc-redesign.tc-max #tcNews .nw-spark {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--mx-diamond);
  box-shadow: 0 0 0 3px rgba(91, 231, 240, .16), 0 0 12px rgba(91, 231, 240, .5);
  transform: rotate(45deg);
}
body.tc-redesign.tc-max #tcNews .nw-count {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(46, 229, 157, .14);
  color: var(--mx-emerald);
  font: 700 11.5px/1 var(--mx-font-body);
  letter-spacing: .02em;
}
body.tc-redesign.tc-max #tcNews .nw-count[hidden] { display: none; }
body.tc-redesign.tc-max #tcNews .nw-summary { display: none; }
body.tc-redesign.tc-max #tcNews :is(.nw-all, .nw-toggle) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  min-height: 34px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mx-text-2);
  font: 600 13.5px/1 var(--mx-font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--mx-fast) var(--mx-ease), color var(--mx-fast) var(--mx-ease);
}
body.tc-redesign.tc-max #tcNews .nw-all { margin-left: auto; padding: 0 12px; color: var(--mx-diamond); }
body.tc-redesign.tc-max #tcNews .nw-all[hidden] { display: none; }
body.tc-redesign.tc-max #tcNews .nw-all[hidden] + .nw-toggle { margin-left: auto; }
body.tc-redesign.tc-max #tcNews :is(.nw-all, .nw-toggle):hover { background: rgba(255, 255, 255, .06); color: var(--mx-text); }
body.tc-redesign.tc-max #tcNews .nw-all-short { display: none; }
body.tc-redesign.tc-max #tcNews .nw-toggle svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); transition: transform var(--mx-mid) var(--mx-ease); }
body.tc-redesign.tc-max #tcNews:not([data-view="collapsed"]) .nw-toggle-more,
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-toggle-less { display: none; }
body.tc-redesign.tc-max #tcNews .nw-close {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin: 0 -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mx-text-3);
  cursor: pointer;
  transition: background var(--mx-fast) var(--mx-ease), color var(--mx-fast) var(--mx-ease);
}
body.tc-redesign.tc-max #tcNews .nw-close:hover { background: rgba(255, 255, 255, .06); color: var(--mx-text); }
body.tc-redesign.tc-max #tcNews .nw-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ------------------------------------------------------------ Eingeklappt: eine ruhige Zeile, die ganze Fläche klappt auf */
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-head {
  min-height: 56px;
  margin: 0;
  padding: 8px 10px 8px 18px;
  border: 1px solid var(--mx-line-soft);
  border-radius: var(--mx-r-lg);
  background:
    radial-gradient(520px 120px at 0% 50%, rgba(91, 231, 240, .08), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 60%),
    var(--mx-surface);
  box-shadow: var(--mx-bevel), var(--mx-shadow);
  cursor: pointer;
  transition: border-color var(--mx-fast) var(--mx-ease);
}
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-head:hover { border-color: rgba(91, 231, 240, .28); }
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-summary {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 4px 18px;
  min-width: 0;
  height: 22px;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--mx-line-soft);
  overflow: hidden;
  color: var(--mx-text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  flex-wrap: wrap;
}
body.tc-redesign.tc-max #tcNews .nw-sum-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
body.tc-redesign.tc-max #tcNews .nw-sum-item:first-child { color: var(--mx-text); font-weight: 600; }
body.tc-redesign.tc-max #tcNews .nw-sum-item i { font-style: normal; }
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-all { display: none; }
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-toggle {
  min-height: 38px;
  margin-left: auto;
  padding: 0 12px 0 14px;
  background: linear-gradient(180deg, #26334f, var(--mx-raised));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 3px 0 #0b1222;
  color: var(--mx-text);
}
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-toggle svg { transform: none; }
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-toggle:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 #0b1222; }
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-close { margin: 0; }
body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-grid { display: none; }

/* ------------------------------------------------------------ Offen: die drei neuesten als Kacheln */
body.tc-redesign.tc-max #tcNews .nw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 150px;
}
body.tc-redesign.tc-max #tcNews .nw-tile {
  position: relative;
  display: flex;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--mx-line-soft);
  border-radius: var(--mx-r-lg);
  background:
    radial-gradient(380px 150px at 0% 0%, color-mix(in srgb, var(--ore) 8%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 40%),
    var(--mx-surface);
  box-shadow: var(--mx-bevel), var(--mx-shadow);
  overflow: hidden;
}
body.tc-redesign.tc-max #tcNews .nw-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--ore), color-mix(in srgb, var(--ore) 30%, transparent) 45%, transparent 80%);
  opacity: .85;
}
body.tc-redesign.tc-max #tcNews .nw-art { position: relative; flex: none; width: 38%; min-width: 120px; max-width: 240px; background: #0c1424; }
body.tc-redesign.tc-max #tcNews .nw-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
body.tc-redesign.tc-max #tcNews .nw-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, rgba(19, 28, 49, .55)); pointer-events: none; }
body.tc-redesign.tc-max #tcNews .nw-body { display: flex; flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; padding: 14px 18px 15px; }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin: 0; color: var(--mx-text-3); font: 600 12px/1 var(--mx-font-body); }
body.tc-redesign.tc-max #tcNews .nw-ico { font-size: 15px; line-height: 1; }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-type {
  padding: 3px 7px 3px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ore, var(--mx-diamond)) 15%, transparent);
  color: var(--ore, var(--mx-diamond));
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10.5px;
}
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-fresh { display: inline-flex; align-items: center; gap: 5px; color: var(--mx-emerald); font-style: normal; font-weight: 700; }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-fresh::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body.tc-redesign.tc-max #tcNews .nw-tile-title {
  margin: 0 !important;
  color: var(--mx-text) !important;
  font-family: var(--mx-font-display) !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: .005em !important;
  text-transform: none !important;
  text-wrap: balance;
}
body.tc-redesign.tc-max #tcNews .nw-tile--lead .nw-tile-title { font-size: 25px !important; }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-text { margin: 0; max-width: 62ch; color: var(--mx-text-2); font-size: 13.5px; line-height: 1.5; }
body.tc-redesign.tc-max #tcNews .nw-go { margin-top: auto; }
body.tc-redesign.tc-max #tcNews .nw-tile--lead .nw-go { margin-top: auto; }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-go--link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ore, var(--mx-diamond));
  font: 700 13.5px/1 var(--mx-font-body);
  cursor: pointer;
}
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-go--link::after { content: "→"; transition: transform var(--mx-fast) var(--mx-ease); }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) a.nw-go { text-decoration: none; }
/* Zwei Knöpfe an einem Eintrag (go + go2) */
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
body.tc-redesign.tc-max #tcNews .nw-actions { margin-top: auto; }
body.tc-redesign.tc-max #tcNews .nw-actions .nw-go { margin-top: 0; }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-go--link:hover { color: var(--mx-text); }
body.tc-redesign.tc-max :is(#tcNews, #tcNewsDialog) .nw-go--link:hover::after { transform: translateX(3px); }

/* Große Ankündigung (neuester Eintrag mit „big“): breite Kachel mit ganzem Bild, darunter drei weitere */
body.tc-redesign.tc-max #tcNews .nw-grid--feature { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.tc-redesign.tc-max #tcNews .nw-grid--feature .nw-tile--big { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--ore) 38%, transparent); }
body.tc-redesign.tc-max #tcNews .nw-grid--feature .nw-tile--big::before { height: 3px; background: linear-gradient(90deg, #22e1ff, var(--ore) 55%, transparent 96%); opacity: 1; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-art { width: clamp(300px, 34%, 400px); max-width: none; aspect-ratio: 1084 / 754; align-self: center; margin: 14px 0 14px 14px; border: 1px solid var(--mx-line); border-radius: var(--mx-r-md); overflow: hidden; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-art img { image-rendering: auto; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-art::after { content: none; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-body { justify-content: center; gap: 10px; padding: 20px 26px 20px 24px; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-tile-title { font-size: clamp(27px, 2.9vw, 36px) !important; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-text { font-size: 15px; }
body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-actions { margin-top: 6px; }

/* Punkt am Knopf „Neuigkeiten“, solange etwas ungelesen ist */
body.tc-redesign.tc-max #siteMain #tcNewsReopen.has-news::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--mx-emerald); box-shadow: 0 0 0 3px rgba(46, 229, 157, .18); }

/* ------------------------------------------------------------ Alle Neuigkeiten (Dialog) */
body.tc-redesign.tc-max #tcNewsDialog {
  /* style.css setzt * { margin: 0 } – ohne „auto“ klebt der Dialog oben links */
  inset: 0;
  margin: auto;
  width: min(640px, calc(100vw - 24px));
  max-height: min(84vh, 760px);
  padding: 0;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-r-xl);
  background: var(--mx-surface);
  color: var(--mx-text);
  box-shadow: var(--mx-bevel), 0 40px 90px -30px rgba(0, 0, 0, .9);
  overflow: hidden;
}
body.tc-redesign.tc-max #tcNewsDialog[open] { display: flex; flex-direction: column; }
body.tc-redesign.tc-max #tcNewsDialog::backdrop { background: rgba(5, 9, 18, .72); }
body.tc-redesign.tc-max #tcNewsDialog .nw-dialog-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 14px 22px; border-bottom: 1px solid var(--mx-line-soft); }
body.tc-redesign.tc-max #tcNewsDialog .nw-dialog-title { flex: 1; margin: 0; color: var(--mx-text); font: 800 26px/1 var(--mx-font-display); letter-spacing: .005em; }
body.tc-redesign.tc-max #tcNewsDialog .nw-dialog-close { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--mx-text-2); cursor: pointer; }
body.tc-redesign.tc-max #tcNewsDialog .nw-dialog-close:hover { background: rgba(255, 255, 255, .06); color: var(--mx-text); }
body.tc-redesign.tc-max #tcNewsDialog .nw-dialog-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
body.tc-redesign.tc-max #tcNewsDialog .nw-list { flex: 1 1 auto; min-height: 0; padding: 6px 22px 22px; overflow-y: auto; overscroll-behavior: contain; }
body.tc-redesign.tc-max #tcNewsDialog .nw-dayhead { position: sticky; top: 0; z-index: 1; margin: 0 -22px; padding: 12px 22px 8px; background: linear-gradient(180deg, var(--mx-surface) 70%, transparent); color: var(--mx-text-3); font: 700 12px/1 var(--mx-font-body); letter-spacing: .08em; text-transform: uppercase; }
body.tc-redesign.tc-max #tcNewsDialog .nw-entries { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.tc-redesign.tc-max #tcNewsDialog .nw-entry { display: flex; gap: 14px; padding: 13px 16px 14px 14px; border: 1px solid var(--mx-line-soft); border-left: 3px solid var(--ore, var(--mx-diamond)); border-radius: var(--mx-r-md); background: var(--mx-raised); }
body.tc-redesign.tc-max #tcNewsDialog .nw-entry-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 20px; line-height: 1; }
body.tc-redesign.tc-max #tcNewsDialog .nw-entry-copy { display: grid; justify-items: start; gap: 6px; min-width: 0; }
body.tc-redesign.tc-max #tcNewsDialog .nw-entry-title { color: var(--mx-text); font: 700 16px/1.25 var(--mx-font-body); }
body.tc-redesign.tc-max #tcNewsDialog .nw-empty { margin: 26px 0 8px; color: var(--mx-text-2); text-align: center; }

/* ------------------------------------------------------------ Breiten */
@media (max-width: 1100px) {
  body.tc-redesign.tc-max #tcNews .nw-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
  body.tc-redesign.tc-max #tcNews .nw-art { width: 32%; min-width: 96px; }
  body.tc-redesign.tc-max #tcNews .nw-body { padding: 13px 15px 14px; }
  body.tc-redesign.tc-max #tcNews .nw-tile--lead .nw-tile-title { font-size: 23px !important; }
}
/* Schmal: die Kacheln werden zur einrastenden Wischreihe */
@media (max-width: 860px) {
  body.tc-redesign.tc-max #tcNews .nw-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(86%, 380px);
    margin: 0 calc(-1 * var(--mx-gutter));
    padding: 0 var(--mx-gutter) 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--mx-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  body.tc-redesign.tc-max #tcNews .nw-grid::-webkit-scrollbar { display: none; }
  body.tc-redesign.tc-max #tcNews .nw-tile { scroll-snap-align: start; }
  body.tc-redesign.tc-max #tcNews .nw-art { width: 34%; min-width: 92px; }
  /* In der Wischreihe ist die große Ankündigung eine Kachel wie die anderen (das Bild steht im Partner-Block) */
  body.tc-redesign.tc-max #tcNews .nw-grid--feature { grid-template-columns: none; }
  body.tc-redesign.tc-max #tcNews .nw-grid--feature .nw-tile--big { grid-column: auto; }
  body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-art { display: none; }
  body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-body { justify-content: flex-start; gap: 7px; padding: 13px 15px 14px; }
  body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-tile-title { font-size: 23px !important; }
  body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-text { font-size: 13.5px; }
  body.tc-redesign.tc-max #tcNews .nw-tile--big .nw-actions { margin-top: auto; }
}
@media (max-width: 600px) {
  body.tc-redesign.tc-max #tcNews .nw-head { gap: 4px 6px; min-height: 44px; }
  body.tc-redesign.tc-max #tcNews :is(.nw-all, .nw-toggle) { min-height: 44px; }
  body.tc-redesign.tc-max #tcNews .nw-all-long, body.tc-redesign.tc-max #tcNews .nw-toggle :is(.nw-toggle-more, .nw-toggle-less) { display: none; }
  body.tc-redesign.tc-max #tcNews .nw-all-short { display: inline; }
  body.tc-redesign.tc-max #tcNews .nw-toggle { width: 44px; padding: 0; }
  body.tc-redesign.tc-max #tcNews .nw-toggle svg { width: 20px; height: 20px; }
  body.tc-redesign.tc-max #tcNews .nw-close { width: 44px; height: 44px; margin-right: -10px; }
  body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-head { flex-wrap: wrap; padding: 6px 6px 8px 14px; }
  body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-title { flex: 1 1 auto !important; }
  body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-summary { order: 5; flex: 1 0 100%; padding: 0; border-left: 0; }
  body.tc-redesign.tc-max #tcNews[data-view="collapsed"] .nw-sum-item ~ .nw-sum-item { display: none; }
  body.tc-redesign.tc-max #tcNews .nw-art { display: none; }
  body.tc-redesign.tc-max #tcNewsDialog .nw-list { padding: 4px 14px 16px; }
  body.tc-redesign.tc-max #tcNewsDialog .nw-dayhead { margin: 0 -14px; padding: 12px 14px 8px; }
  body.tc-redesign.tc-max #tcNewsDialog .nw-dialog-head { padding: 12px 8px 10px 16px; }
  body.tc-redesign.tc-max #tcNewsDialog .nw-entry-ico { width: 32px; height: 32px; font-size: 17px; }
}
