.cc-shop-notice-bar {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.cc-shop-notice-bar[hidden] {
  display: none;
}

.cc-shop-notice-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 11px 12px 11px 14px;
  overflow: hidden;
  border: 1px solid #CFE3FF;
  border-left: 4px solid var(--cc-primary, #165DFF);
  border-radius: 9px;
  background: #F7FAFF;
  box-sizing: border-box;
}

.cc-shop-notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--cc-primary, #165DFF);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
}

.cc-shop-notice-copy {
  min-width: 0;
  color: #1D2129;
  line-height: 1.55;
}

.cc-shop-notice-title {
  display: inline;
  margin-right: 8px;
  color: #1D2129;
  font-size: 14px;
  font-weight: 650;
}

.cc-shop-notice-text {
  display: -webkit-box;
  overflow: hidden;
  color: #4E5969;
  font-size: 13px;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cc-shop-notice-text.is-plain,
.cc-shop-notice-richtext.is-plain {
  white-space: pre-wrap;
}

.cc-shop-notice-richtext-inline > * {
  display: inline;
  margin: 0;
}

.cc-shop-notice-richtext-inline a,
.cc-shop-notice-richtext a {
  color: var(--cc-primary, #165DFF);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-shop-notice-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cc-shop-notice-more,
.cc-shop-notice-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4E5969;
  cursor: pointer;
  transition: background-color .16s, color .16s;
}

.cc-shop-notice-more {
  padding: 0 8px;
  color: var(--cc-primary, #165DFF);
  font-size: 13px;
  white-space: nowrap;
}

.cc-shop-notice-close {
  width: 30px;
  padding: 0;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.cc-shop-notice-more:hover,
.cc-shop-notice-close:hover {
  background: rgba(22, 93, 255, .08);
  color: var(--cc-primary, #165DFF);
}

.cc-shop-notice-more:focus-visible,
.cc-shop-notice-close:focus-visible,
.cc-shop-notice-confirm:focus-visible,
.cc-shop-notice-dialog-close:focus-visible {
  outline: 2px solid var(--cc-primary, #165DFF);
  outline-offset: 2px;
}

.cc-shop-notice-mask {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(2px);
  box-sizing: border-box;
}

.cc-shop-notice-dialog {
  display: flex;
  flex-direction: column;
  width: min(860px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 72px -16px rgba(15, 23, 42, .42);
  animation: cc-shop-notice-in .2s ease-out both;
}

.cc-shop-notice-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  padding: 15px 18px;
  border-bottom: 1px solid #EEF1F5;
}

.cc-shop-notice-dialog-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1D2129;
  font-size: 17px;
  font-weight: 650;
}

.cc-shop-notice-required-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: #FFF1F0;
  color: #F53F3F;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.cc-shop-notice-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #F2F3F7;
  color: #4E5969;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cc-shop-notice-dialog-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
}

.cc-shop-notice-dialog-body:focus {
  outline: none;
}

.cc-shop-notice-article {
  padding: 14px 15px;
  border: 1px solid #E8EDF5;
  border-radius: 9px;
  background: #FAFBFD;
}

.cc-shop-notice-article h3 {
  margin: 0 0 8px;
  color: #1D2129;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.cc-shop-notice-article > h3 {
  margin: 0 0 8px;
}

.cc-shop-notice-richtext {
  color: #4E5969;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.cc-shop-notice-richtext > :first-child { margin-top: 0; }
.cc-shop-notice-richtext > :last-child { margin-bottom: 0; }
.cc-shop-notice-richtext p,
.cc-shop-notice-richtext ul,
.cc-shop-notice-richtext ol,
.cc-shop-notice-richtext blockquote,
.cc-shop-notice-richtext pre,
.cc-shop-notice-richtext table { margin: 0 0 12px; }
.cc-shop-notice-richtext h2,
.cc-shop-notice-richtext h3,
.cc-shop-notice-richtext h4,
.cc-shop-notice-richtext h5,
.cc-shop-notice-richtext h6 {
  margin: 16px 0 8px;
  color: #1D2129;
  font-size: 16px;
  line-height: 1.5;
}
.cc-shop-notice-richtext ul,
.cc-shop-notice-richtext ol { padding-left: 22px; }
.cc-shop-notice-richtext li + li { margin-top: 4px; }
.cc-shop-notice-richtext blockquote {
  padding: 8px 12px;
  border-left: 3px solid var(--cc-primary, #165DFF);
  background: #F7FAFF;
}
.cc-shop-notice-richtext pre {
  overflow-x: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #F2F3F7;
  white-space: pre-wrap;
}
.cc-shop-notice-richtext code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #F2F3F7;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92em;
}
.cc-shop-notice-richtext pre code { padding: 0; background: transparent; }
.cc-shop-notice-richtext img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px auto;
  border-radius: 8px;
}
.cc-shop-notice-richtext table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cc-shop-notice-richtext th,
.cc-shop-notice-richtext td {
  padding: 8px 10px;
  border: 1px solid #E5E6EB;
  text-align: left;
  vertical-align: top;
}
.cc-shop-notice-richtext th { background: #F7F8FA; font-weight: 600; }

.cc-shop-notice-dialog-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  flex: none;
  padding: 12px 18px 16px;
  border-top: 1px solid #EEF1F5;
}

.cc-shop-notice-read-status {
  flex: 1;
  min-width: 0;
  color: #86909C;
  font-size: 12.5px;
  line-height: 1.55;
}

.cc-shop-notice-confirm {
  min-width: 96px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--cc-primary, #165DFF);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cc-shop-notice-confirm:hover {
  filter: brightness(.94);
}

.cc-shop-notice-confirm:disabled {
  opacity: .42;
  cursor: not-allowed;
  filter: none;
}

@keyframes cc-shop-notice-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .cc-shop-notice-item {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
    padding: 11px 10px 10px 12px;
  }

  .cc-shop-notice-badge {
    margin-top: 1px;
  }

  .cc-shop-notice-actions {
    grid-column: 2;
    justify-self: end;
  }

  .cc-shop-notice-title {
    display: block;
    margin: 0 0 2px;
  }

  .cc-shop-notice-text {
    -webkit-line-clamp: 3;
  }

  .cc-shop-notice-mask {
    align-items: flex-end;
    padding: 12px;
  }

  .cc-shop-notice-dialog {
    max-height: 84vh;
    border-radius: 14px;
  }

  .cc-shop-notice-dialog-body {
    padding: 14px;
  }

  .cc-shop-notice-dialog-foot {
    align-items: flex-end;
    gap: 10px;
  }

  .cc-shop-notice-read-status {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-shop-notice-dialog { animation: none; }
  .cc-shop-notice-more,
  .cc-shop-notice-close { transition: none; }
}
