/* DIYmylove clone — supporting styles for generated components */

/* thumbnail cards */
.card-img-wrap { aspect-ratio: 4 / 3; }
.card-img-wrap .card-action-btn.heart { position: absolute; top: 8px; right: 8px; z-index: 2; }
.card-tag {
  font-size: 10px; font-weight: 600; line-height: 1;
  background: var(--bg-warm); color: var(--ink-soft);
  padding: 3px 7px; border-radius: 8px; white-space: nowrap;
}
.new-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: #B45309; color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: 0.06em; padding: 3px 8px; border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* main grid responsive columns */
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 880px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
/* 桌面端固定 4 列（用户要求从 5 列改为 4 列，卡片按比例放大） */

/* announcement marquee */
.announce { overflow: hidden; background: var(--accent-soft); }
.announce-track {
  display: inline-flex; gap: 48px; white-space: nowrap; padding: 7px 0;
  animation: announce-marquee 22s linear infinite; will-change: transform;
}
.announce-track span { font-size: 12.5px; font-weight: 700; color: var(--accent-deep); }
@keyframes announce-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* search suggest tags */
.search-suggest-tag {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft);
  border-radius: 16px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.search-suggest-tag:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.search-suggest-group { margin-bottom: 8px; }

/* image modal details */
.modal-info { padding: 16px 20px 20px; }
.modal-info-code { font-family: 'Caveat', cursive; font-size: 30px; font-weight: 700; color: var(--accent-deep); }
.modal-info-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.modal-info-meta { font-size: 13px; color: var(--ink-soft); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.modal-btn {
  flex: 1 1 auto; min-width: 120px; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s;
}
.modal-btn:hover { border-color: var(--accent); }
.modal-btn.primary { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.modal-btn.primary:hover { background: #3c7aa6; }

/* wishlist modal groups */
.wl-group { margin-bottom: 16px; }
.wl-group-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.wl-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.wl-row-info { flex: 1; min-width: 0; }
.wl-row-code { font-weight: 700; font-size: 13px; color: var(--accent-deep); }
.wl-row-meta { font-size: 12px; color: var(--ink-muted); }
.wl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.wl-actions .btn-copy, .wl-actions .btn-clear { flex: 1 1 auto; text-align: center; }

/* contact modal */
.contact-modal-sub { color: var(--ink-soft); font-size: 13px; margin: 4px 0 16px; }
.contact-options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.contact-option { text-decoration: none; color: inherit; }
.contact-option-note { font-size: 11px; color: var(--ink-muted); line-height: 1.3; }
.contact-prefill { background: var(--bg-warm); border-radius: 12px; padding: 10px 12px; margin-bottom: 16px; font-size: 12px; color: var(--ink-soft); }
.contact-prefill pre { white-space: pre-wrap; word-break: break-all; margin: 4px 0 0; font-family: inherit; color: var(--ink); }

/* chat */
.chat-empty { color: var(--ink-muted); font-size: 13px; padding: 20px 4px; line-height: 1.5; }
.chat-message { display: flex; margin: 6px 0; }
.chat-message.user { justify-content: flex-end; }
.chat-message.bot { justify-content: flex-start; }
.chat-bubble { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.chat-message.user .chat-bubble { background: var(--accent-deep); color: #fff; border-bottom-right-radius: 4px; }
.chat-message.bot .chat-bubble { background: var(--bg-warm); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble-img { max-width: 160px; border-radius: 10px; display: block; margin-bottom: 4px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chat-quick-button { border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); border-radius: 14px; padding: 6px 11px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.chat-quick-button:hover { border-color: var(--accent); color: var(--accent-deep); }
#chatInput { resize: none; }

/* update notice */
.update-notice-title { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.update-notice-sub { font-size: 12px; color: var(--ink-muted); margin-bottom: 8px; }
.update-notice-thumbs { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.update-notice-thumb { width: 48px; height: 48px; border-radius: 8px; background-size: cover; background-position: center; cursor: pointer; box-shadow: var(--shadow); }
.update-notice-action { width: 100%; margin-top: 6px; padding: 10px; border: none; border-radius: 12px; background: var(--accent-deep); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.update-notice-pill { position: fixed; right: 20px; bottom: 20px; z-index: 481; border: none; border-radius: 20px; padding: 9px 14px; background: var(--accent-deep); color: #fff; font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; box-shadow: var(--shadow-hover); }

/* wishlist strip thumbs */
.wishlist-strip-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.wishlist-strip-thumbs-img { width: 46px; height: 46px; border-radius: 8px; background-size: cover; background-position: center; cursor: pointer; box-shadow: var(--shadow); }
.wishlist-strip-actions { display: flex; gap: 8px; }
.wishlist-strip-actions .btn-copy, .wishlist-strip-actions .btn-clear { flex: 1; text-align: center; }
.btn-copy, .btn-clear { border: none; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn-copy { background: var(--ink); color: #fff; }
.btn-copy:hover { background: var(--accent-deep); }
.btn-clear { background: transparent; border: 1px dashed var(--line); color: var(--ink-muted); }

/* pager */
.main-pager { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 8px 0 24px; }
.main-pager-controls { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s; }
.main-pager-controls:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.main-pager-controls.active { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.main-pager-controls:disabled { opacity: .4; cursor: default; }
.main-pager-info { font-size: 12px; color: var(--ink-muted); margin-left: 8px; }

/* longpress / misc safety */
.cr-modal-card { background: var(--paper); border-radius: 20px; padding: 28px; width: 100%; max-width: 440px; }
.cr-modal-card h2 { font-family: 'Caveat', cursive; font-size: 30px; color: var(--accent-deep); margin-bottom: 4px; }
.cr-sub { color: var(--ink-soft); font-size: 12px; margin-bottom: 16px; }
.cr-modal-card input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; margin-bottom: 12px; }
.cr-submit { width: 100%; padding: 12px; border: none; border-radius: 12px; background: var(--accent-deep); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cr-msg { margin-top: 10px; color: var(--accent-deep); font-weight: 700; font-size: 13px; min-height: 16px; }
.nickname-modal-card { background: var(--paper); border-radius: 20px; padding: 30px; width: 100%; max-width: 380px; text-align: center; }
.nickname-modal-card h2 { font-family: 'Caveat', cursive; font-size: 30px; color: var(--accent-deep); }
.nickname-modal-card .sub { color: var(--ink-soft); font-size: 13px; margin: 6px 0 18px; }
.nickname-modal-card input { width: 100%; padding: 13px 16px; border: 2px solid var(--line); border-radius: 14px; font: inherit; text-align: center; margin-bottom: 16px; }
