.yc-notice {
  --nb-gap: 28px;
  --nb-preset-bg: #ff8546;
  --nb-preset-fg: #ffffff;
  overflow: hidden;
  background: var(--nb-bg, var(--nb-preset-bg));
  color: var(--nb-fg, var(--nb-preset-fg));
  font-size: 13px;
}

.yc-notice--accent { --nb-preset-bg: var(--c-accent); --nb-preset-fg: var(--c-on-accent); background: var(--nb-preset-bg); color: var(--nb-preset-fg); }
.yc-notice--dark { --nb-preset-bg: var(--c-ink); --nb-preset-fg: var(--c-bg); background: var(--nb-preset-bg); color: var(--nb-preset-fg); }
.yc-notice--soft { --nb-preset-bg: var(--c-primary-soft); --nb-preset-fg: var(--c-primary); background: var(--nb-preset-bg); color: var(--nb-preset-fg); }
.yc-notice.yc-notice--custom { background: var(--nb-bg, var(--nb-preset-bg)); color: var(--nb-fg, var(--nb-preset-fg)); }

@media (min-width: 768px) {
  .yc-notice { font-size: 14px; }
}

.yc-notice__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.yc-notice__text,
.yc-notice__text * {
  margin: 0;
  color: inherit;
  font-weight: 600;
  line-height: 1.4;
}

a.yc-notice__text { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.yc-notice__text:hover { text-decoration-thickness: 2px; }

/* ---------- Static ---------- */
.yc-notice__static {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 24px;
  min-height: 38px;
  padding-block: 8px;
  text-align: center;
}

.yc-notice__static .yc-notice__item { white-space: normal; }

/* ---------- Carousel ---------- */
.yc-notice__carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.yc-notice__slides {
  display: grid;
  flex: 1;
  min-width: 0;
}

.yc-notice__slides > .yc-notice__item {
  grid-area: 1 / 1;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
}

.yc-notice__slides > .yc-notice__item.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.yc-notice__nav {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: inherit;
  opacity: .8;
  transition: var(--hover-t, opacity .16s ease);
}

.yc-notice__nav:hover {
  border-color: color-mix(in srgb, currentColor 40%, transparent);
  opacity: 1;
}

.yc-notice__nav svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[dir=rtl] .yc-notice__nav svg { transform: scaleX(-1); }

/* ---------- Scrolling (marquee) ---------- */
.yc-notice__marquee {
  display: flex;
  min-height: 38px;
  align-items: center;
}

.yc-notice__track {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  animation: nbMarquee var(--nb-duration, 40s) linear infinite;
  will-change: transform;
}

.yc-notice__group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

/* Small dot after each scrolling message keeps them close but readable */
.yc-notice__group > .yc-notice__item::after {
  content: "";
  flex: 0 0 4px;
  width: 4px;
  height: 4px;
  margin-inline: calc(var(--nb-gap) / 2);
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.yc-notice--pausable .yc-notice__marquee:hover .yc-notice__track { animation-play-state: paused; }

[dir=rtl] .yc-notice__track { animation-name: nbMarqueeRtl; }

@keyframes nbMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes nbMarqueeRtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

@media (prefers-reduced-motion: reduce) {
  .yc-notice__track { animation: none; }
  .yc-notice__marquee { overflow-x: auto; scrollbar-width: none; }
  .yc-notice__slides > .yc-notice__item { transition: none; }
}
