/* Homepage announcement modal for official Cartoon theme.
 * Added 2026-11-30. Revert with the matching Index.html include and JS file.
 * Hides the inline 公告 panel so only the modal is shown.
 */
.shop-notice-source {
  display: none !important;
}

body.shop-notice-open {
  overflow: hidden;
}

.shop-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.shop-notice-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.48);
}

.shop-notice-modal__card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  background: #fff;
  color: #222;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-notice-modal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #ececec;
  flex-shrink: 0;
}

.shop-notice-modal__icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: #3b6cff;
  flex-shrink: 0;
}

.shop-notice-modal__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.shop-notice-modal__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.shop-notice-modal__body {
  padding: 14px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
  line-height: 1.75;
  overscroll-behavior: contain;
}

.shop-notice-modal__body h1 {
  font-size: 1.12em;
  line-height: 1.45;
  margin: 0 0 0.55em;
}

.shop-notice-modal__body h3 {
  font-size: 1.02em;
  margin: 0.75em 0 0.4em;
}

.shop-notice-modal__body p:first-child,
.shop-notice-modal__body h1:first-child,
.shop-notice-modal__body h3:first-child {
  margin-top: 0;
}

.shop-notice-modal__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid #ececec;
  flex-shrink: 0;
}

.shop-notice-modal__btn--cancel {
  font-variant-numeric: tabular-nums;
}

.shop-notice-modal__btn {
  height: 42px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #222;
  appearance: none;
  -webkit-appearance: none;
}

.shop-notice-modal__btn:focus-visible {
  outline: 2px solid #3b6cff;
  outline-offset: 2px;
}

.shop-notice-modal__btn--ack {
  background: #1f1f1f;
  color: #fff;
  border-color: #1f1f1f;
}

.shop-notice-modal__hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #888;
}

html[data-theme="dark"] .shop-notice-modal__card {
  background: #1c1c1e;
  color: #f2f2f2;
}

html[data-theme="dark"] .shop-notice-modal__header,
html[data-theme="dark"] .shop-notice-modal__footer {
  border-color: #333;
}

html[data-theme="dark"] .shop-notice-modal__btn--cancel {
  background: #2a2a2c;
  color: #f2f2f2;
  border-color: #555;
}

html[data-theme="dark"] .shop-notice-modal__btn--ack {
  background: #f2f2f2;
  color: #111;
  border-color: #f2f2f2;
}

html[data-theme="dark"] .shop-notice-modal__hint {
  color: #aaa;
}

@media (max-width: 420px) {
  .shop-notice-modal {
    padding: 10px;
    align-items: flex-end;
  }
  .shop-notice-modal__card {
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 12px 12px;
  }
}
