/* =========================
   QQ Bracelet Designer - FINAL CLEAN CSS
   can fully replace app.css
   compatible with current PHP / JS structure
   ========================= */

/* =========================
   Base reset
   ========================= */
.qqbd [hidden] {
  display: none !important;
}

.qqbd,
.qqbd * {
  box-sizing: border-box;
}

.qqbd button,
.qqbd input,
.qqbd textarea {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.qqbd img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* =========================
   Root
   ========================= */
.qqbd {
  --qqbd-h: 760px;

  --bg: #ffffff;
  --line: #eef0f3;
  --text: #111827;
  --muted: #6b7280;
  --primary: #ef4444;
  --primary2: #111827;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  --qqbd-thumb: 46px;

  width: min(420px, 100%);
  height: var(--qqbd-h);
  margin: 0 auto;

  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  position: relative;

  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft Yahei", Arial, sans-serif;

  display: flex;
  flex-direction: column;
  color: var(--text);
}

/* =========================
   Stage
   ========================= */
.qqbd-stagewrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  min-width: 0;
  background: #fff;
  overflow: hidden;
}

#qqbd-stage,
[id^="qqbd-stage"],
.qqbd-stage {
  width: 100%;
  height: 100%;
}

/* watermark */
.qqbd-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: rgba(17, 24, 39, 0.2);
  z-index: 2;
  pointer-events: none;
}

.qqbd-wm-title {
  font-weight: 700;
  font-size: 14px;
}

.qqbd-wm-sub {
  font-size: 11px;
  margin-top: 4px;
}

.qqbd-wm-logo {
  display: block;
  width: clamp(90px, 13vw, 160px);
  max-width: 58%;
  max-height: 68px;
  object-fit: contain;
  margin: 0 auto;
  opacity: 0.86;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.14));
}

.qqbd-watermark--logo .qqbd-wm-sub {
  display: none;
}

/* =========================
   Top strip
   ========================= */
.qqbd-strip {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 5;

  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;

  pointer-events: none;
  flex-wrap: nowrap;
}

.qqbd-strip > * {
  pointer-events: auto;
}

.qqbd-badge {
  flex: 0 0 auto;
  white-space: nowrap;

  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.qqbd-strip-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.qqbd-promo-text {
  color: rgba(17, 24, 39, 0.28);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: right;
  pointer-events: none;
}

.qqbd-chip {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(229, 231, 235, 0.95);
  color: #374151;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.qqbd-chip[data-qqbd-size],
.qqbd-chip[data-qqbd-price] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
   Actions
   ========================= */
.qqbd-actions {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex: 0 0 auto;
}

.qqbd-btn {
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.qqbd-btn-ghost {
  width: 52px;
}

.qqbd-btn-primary {
  flex: 1;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.qqbd-btn-primary2 {
  flex: 1.2;
  background: var(--primary2);
  border-color: var(--primary2);
  color: #fff;
}

/* =========================
   Panel
   ========================= */
.qqbd-panel {
  height: 300px;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 0 0 auto;
}

/* English-only comment. */
.qqbd-pill[data-qqbd-using] {
  display: none !important;
}

/* English-only comment. */
.qqbd-panel-top {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.qqbd-search,
.qqbd-panel-top .qqbd-search {
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 0 12px;
  outline: none;
  font-size: 12px;
  background: #fff;
}

.qqbd-panel-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  flex: 1 1 auto;
  min-height: 0;
}

/* =========================
   Left rail (tabs + categories)
   ========================= */
.qqbd-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 6px;
  border-right: 1px solid var(--line);
  background: #fafafa;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* English-only comment. */
.qqbd-tabs {
  position: sticky;
  top: 0;
  z-index: 5;

  display: flex;
  gap: 6px;
  padding: 6px;
  margin: 0;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.qqbd-tabs-rail .qqbd-tab,
.qqbd-tabs .qqbd-tab {
  flex: 1 1 0;
  height: 34px;

  border: 1px solid transparent;
  border-radius: 10px;
  background: #f9fafb;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
  box-shadow: none;
}

.qqbd-tabs-rail .qqbd-tab:hover,
.qqbd-tabs .qqbd-tab:hover {
  transform: none;
  background: #fff;
  border-color: #e5e7eb;
}

.qqbd-tabs-rail .qqbd-tab.is-active,
.qqbd-tabs .qqbd-tab.is-active {
  background: #fff1f2;
  border-color: #fecdd3;
  box-shadow: none;
}

.qqbd-tabs-rail .qqbd-tab img,
.qqbd-tabs .qqbd-tab img {
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  opacity: 0.85;
}

.qqbd-tabs-rail .qqbd-tab.is-active img,
.qqbd-tabs .qqbd-tab.is-active img {
  opacity: 1;
}

.qqbd-catslist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 4px;
}

.qqbd-cat {
  width: 100%;
  text-align: center;
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 6px;
  border-radius: 12px;
  cursor: pointer;
  color: #111827;
  font-size: 13px !important;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
}

.qqbd-cat:hover {
  background: #fff;
}

.qqbd-cat.is-active {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

/* =========================
   Grid + cards
   ========================= */
.qqbd-grid {
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  align-content: start;
  align-items: start;
  grid-auto-rows: min-content;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.qqbd-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 8px;
  background: #fff;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  min-width: 0;
}

.qqbd-card:hover {
  transform: translateY(-1px);
}

.qqbd-beadimg {
  width: min(var(--qqbd-thumb), 100%);
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto 6px;
  overflow: hidden;

  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: radial-gradient(circle at 30% 30%, #fff, #cfd3da 55%, #9aa3af);

  display: flex;
  align-items: center;
  justify-content: center;
}

.qqbd-beadimg img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.qqbd-card[data-type="spacer"] .qqbd-beadimg,
.qqbd-card[data-type="runring"] .qqbd-beadimg,
.qqbd-card[data-type="irregular"] .qqbd-beadimg {
  border-radius: 12px;
  border: 0;
  background: #fff;
}

.qqbd-card[data-type="spacer"] .qqbd-beadimg img,
.qqbd-card[data-type="runring"] .qqbd-beadimg img,
.qqbd-card[data-type="irregular"] .qqbd-beadimg img {
  border-radius: 12px;
  object-fit: contain;
}

.qqbd-beadimg:has(img) {
  border: 0 !important;
  background: transparent !important;
}

.qqbd-cardname {
  font-size: 12px;
  text-align: center;
  color: #111827;
  line-height: 1.2;
  min-height: 28px;
  min-width: 0;
}

.qqbd-cardmeta {
  font-size: 11px;
  text-align: center;
  color: #6b7280;
  margin-top: 6px;
}

/* =========================
   Panel foot
   ========================= */
.qqbd-panel-foot {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  flex: 0 0 auto;
}

.qqbd-tip {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.2;
}

/* =========================
   Modal
   ========================= */
.qqbd-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 50;
}

.qqbd-modal-card {
  width: min(520px, 96%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.qqbd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
}

.qqbd-modal-title {
  font-weight: 700;
}

.qqbd-modal-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.qqbd-modal-foot {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.qqbd-preview {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.qqbd-json {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 10px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 11px;
}

/* =========================
   Toast
   ========================= */
.qqbd-toast {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;

  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  white-space: nowrap;
}

.qqbd-toast.is-warn {
  background: #ef4444;
}

/* =========================
   Interaction fixes
   ========================= */
.qqbd-stagewrap,
.qqbd-stagewrap canvas,
.qqbd-stagewrap .konvajs-content {
  touch-action: none;
}

.qqbd-stagewrap {
  -webkit-tap-highlight-color: transparent;
}

.qqbd-stagewrap,
.qqbd-actions,
.qqbd-panel,
.qqbd-card,
.qqbd-cat {
  user-select: none;
  -webkit-user-select: none;
}

/* =========================
   Small generic screen
   ========================= */
@media (max-width: 480px) {
  .qqbd-strip {
    left: 10px;
    right: 10px;
    top: 10px;
    gap: 6px;
  }

  .qqbd-badge,
  .qqbd-chip {
    padding: 5px 8px;
    font-size: 11px;
  }

  .qqbd-strip-right {
    gap: 6px;
  }

  .qqbd-promo-text {
    display: none;
  }
}

/* =========================
   Desktop
   ========================= */
@media (min-width: 1024px) {
  .qqbd {
    width: min(1200px, 100%);
    height: min(860px, 90vh);
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    grid-template-rows: 1fr auto;
    border-radius: 22px;
    --qqbd-thumb: clamp(40px, 4vw, 54px);
  }

  .qqbd-stagewrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 0;
    border-right: 1px solid var(--line);
  }

  .qqbd-panel {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
  }

  .qqbd-actions {
    grid-column: 2;
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .qqbd-panel-body {
    grid-template-columns: 112px 1fr;
  }

  .qqbd-cats {
    padding: 10px 8px;
  }

  .qqbd-cat {
    font-size: 13px !important;
    padding: 11px 6px;
  }

  .qqbd-promo-text {
    font-size: 17px;
  }

  .qqbd-chip[data-qqbd-size] {
    max-width: 160px;
  }

  .qqbd-chip[data-qqbd-price] {
    max-width: 180px;
  }
}

/* =========================
   Mobile
   ========================= */
@media (max-width: 767px) {
  .qqbd {
    --qqbd-thumb: 34px;
  }

  /* top strip */
  .qqbd-strip {
    left: 10px;
    right: 10px;
    top: 10px;
    gap: 6px;
  }

  .qqbd-badge {
    padding: 6px 10px;
    font-size: 12px;
  }

  .qqbd-strip-right {
    gap: 6px;
  }

  .qqbd-promo-text {
    display: none;
  }

  .qqbd-chip {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* action buttons */
  .qqbd-actions {
    height: auto;
    min-height: 0;
    padding: 4px 6px;
    gap: 4px;
    align-items: center;
  }

  .qqbd-btn {
    height: 26px;
    min-height: 26px;
    line-height: 26px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: none;
  }

  .qqbd-btn-ghost {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    padding: 0;
    font-size: 12px;
  }

  .qqbd-btn-primary {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 0 8px;
  }

  .qqbd-btn-primary2 {
    flex: 0 0 auto;
    min-width: 78px;
    padding: 0 10px;
    margin-left: auto;
  }

  /* make stage area visually larger by shrinking lower area */
  .qqbd-panel {
    height: 228px;
  }

  .qqbd-panel-top {
    padding: 4px 6px;
  }

  .qqbd-panel-top .qqbd-search {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .qqbd-panel-body {
    grid-template-columns: 50px 1fr;
  }

  /* left rail tighter */
  .qqbd-cats {
    gap: 2px;
    padding: 2px;
  }

  .qqbd-tabs {
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    box-shadow: none;
  }

  .qqbd-tabs-rail .qqbd-tab,
  .qqbd-tabs .qqbd-tab {
    height: 20px;
    min-height: 20px;
    border-radius: 6px;
  }

  .qqbd-tabs-rail .qqbd-tab img,
  .qqbd-tabs .qqbd-tab img {
    width: 10px;
    height: 10px;
  }

  .qqbd-catslist {
    gap: 2px;
    padding-bottom: 0;
  }

  .qqbd-cat {
    padding: 4px 0;
    border-radius: 6px;
    font-size: 10px !important;
    line-height: 1;
    min-height: 20px;
  }

  .qqbd-cat.is-active {
    padding: 4px 0;
  }

  /* right side 3 columns */
  .qqbd-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
  }

  .qqbd-card {
    padding: 5px 3px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
  }

  .qqbd-beadimg {
    width: min(var(--qqbd-thumb), 100%);
    margin: 0 auto 4px;
  }

  .qqbd-card[data-type="spacer"] .qqbd-beadimg,
  .qqbd-card[data-type="runring"] .qqbd-beadimg,
  .qqbd-card[data-type="irregular"] .qqbd-beadimg {
    border-radius: 8px;
  }

  .qqbd-card[data-type="spacer"] .qqbd-beadimg img,
  .qqbd-card[data-type="runring"] .qqbd-beadimg img,
  .qqbd-card[data-type="irregular"] .qqbd-beadimg img {
    border-radius: 8px;
  }

  .qqbd-cardname {
    font-size: 10px;
    line-height: 1.1;
    min-height: 20px;
  }

  .qqbd-cardmeta {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.05;
  }

  .qqbd-panel-foot {
    padding: 4px 6px;
  }

  .qqbd-tip {
    font-size: 10px;
    line-height: 1.1;
  }
}
/* English-only comment. */
.qqbd-cats.is-searching .qqbd-cat {
  opacity: 0.55;
}

.qqbd-cats.is-searching .qqbd-cat.is-active {
  opacity: 0.55;
  background: transparent;
  color: #111827;
  border-color: transparent;
}

.qqbd-cats.is-searching .qqbd-tabs,
.qqbd-cats.is-searching .qqbd-tabs-rail {
  opacity: 0.7;
}
/* =========================
   panel-top inline layout
   button and search box on the same row
   ========================= */
.qqbd-panel-top.qqbd-panel-top-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.qqbd-panel-top.qqbd-panel-top-inline .qqbd-actions.qqbd-actions-inline {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.qqbd-panel-top.qqbd-panel-top-inline .qqbd-search {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

/* English-only comment. */
.qqbd-actions.qqbd-actions-inline .qqbd-btn-primary2 {
  margin-left: 0;
}

/* English-only comment. */
@media (max-width: 767px) {
  .qqbd-panel-top.qqbd-panel-top-inline {
    gap: 6px;
    padding: 4px 6px;
  }

  .qqbd-panel-top.qqbd-panel-top-inline .qqbd-actions.qqbd-actions-inline {
    gap: 4px;
  }

  .qqbd-panel-top.qqbd-panel-top-inline .qqbd-search {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 999px;
  }

  .qqbd-actions.qqbd-actions-inline .qqbd-btn {
    height: 26px;
    min-height: 26px;
    line-height: 26px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 11px;
    box-shadow: none;
  }

  .qqbd-actions.qqbd-actions-inline .qqbd-btn-ghost {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    padding: 0;
    font-size: 12px;
  }

  .qqbd-actions.qqbd-actions-inline .qqbd-btn-primary {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 0 8px;
  }

  .qqbd-actions.qqbd-actions-inline .qqbd-btn-primary2 {
    flex: 0 0 auto;
    min-width: 78px;
    padding: 0 10px;
  }
}
@media (min-width: 1024px) {
  .qqbd-actions.qqbd-actions-inline .qqbd-btn,
  .qqbd-panel-top.qqbd-panel-top-inline .qqbd-btn {
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
  }

  .qqbd-actions.qqbd-actions-inline .qqbd-btn-primary,
  .qqbd-panel-top.qqbd-panel-top-inline .qqbd-btn-primary {
    min-width: 68px;
  }

  .qqbd-actions.qqbd-actions-inline .qqbd-btn-primary2,
  .qqbd-panel-top.qqbd-panel-top-inline .qqbd-btn-primary2 {
    min-width: 96px;
    padding: 0 16px;
  }
}
/* =========================
   Done modal - beauty
   ========================= */
.qqbd-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.qqbd-modal-card-beauty {
  width: min(620px, 96%);
  max-height: min(88vh, 860px);
  overflow: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.18),
    0 8px 20px rgba(15, 23, 42, 0.08);
}

.qqbd-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #eef2f7;
}

.qqbd-modal-headtext {
  min-width: 0;
}

.qqbd-modal-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9f1239;
  margin-bottom: 6px;
}

.qqbd-modal-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
}

.qqbd-modal-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.qqbd-modal-close {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  color: #374151;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qqbd-modal-close:hover {
  background: #f3f4f6;
}

.qqbd-modal-body-beauty {
  padding: 18px 20px 16px;
  display: grid;
  gap: 16px;
}

.qqbd-preview-shell {
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.95), rgba(248,250,252,0.96)),
    linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid #eef2f7;
}

.qqbd-preview {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  border-radius: 16px;
}

.qqbd-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.qqbd-modal-stat {
  padding: 14px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.qqbd-modal-stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.qqbd-modal-stat-value {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
}

.qqbd-modal-materials {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.qqbd-modal-materials-label {
  font-size: 12px;
  color: #9a3412;
  margin-bottom: 6px;
  font-weight: 700;
}

.qqbd-modal-materials-value {
  font-size: 14px;
  line-height: 1.6;
  color: #7c2d12;
  word-break: break-word;
}

.qqbd-modal-jsonwrap {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.qqbd-modal-jsonwrap summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  border-bottom: 1px solid transparent;
}

.qqbd-modal-jsonwrap[open] summary {
  border-bottom-color: #eef2f7;
}

.qqbd-json {
  width: 100%;
  min-height: 170px;
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  background: #fcfcfd;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 11px;
  line-height: 1.55;
  color: #334155;
  resize: vertical;
}

.qqbd-modal-foot-beauty {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 20px 20px;
  border-top: 1px solid #eef2f7;
}

.qqbd-btn-light {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.qqbd-btn-addcart {
  flex: 1.4;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

@media (max-width: 767px) {
  .qqbd-modal {
    padding: 12px;
  }

  .qqbd-modal-card-beauty {
    width: 100%;
    max-height: 90vh;
    border-radius: 20px;
  }

  .qqbd-modal-head {
    padding: 16px 16px 12px;
  }

  .qqbd-modal-title {
    font-size: 20px;
  }

  .qqbd-modal-body-beauty {
    padding: 14px 16px;
    gap: 12px;
  }

  .qqbd-modal-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .qqbd-modal-foot-beauty {
    padding: 14px 16px 16px;
    flex-direction: column;
  }

  .qqbd-btn-light,
  .qqbd-btn-addcart {
    width: 100%;
  }
}

.qqbd-cardhint {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: #4b5563;
  min-height: 32px;
  text-align: center;
}

.qqbd-cardactions {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 10px;
  width: 100%;
}

.qqbd-cardactions > .qqbd-cardbtn {
  flex: 0 0 calc(50% - 4px) !important;
  width: calc(50% - 4px) !important;
  max-width: calc(50% - 4px) !important;
}

.qqbd-cardbtn {
  appearance: none;
  -webkit-appearance: none;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  height: 36px;
  padding: 0 10px;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qqbd-cardbtn * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap !important;
}

.qqbd-cardbtn:hover {
  transform: translateY(-1px);
}

.qqbd-cardbtn.is-add {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.qqbd-cardbtn.is-detail {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.qqbd-meaning-tooltip {
  position: fixed;
  z-index: 99999;
  width: min(280px, calc(100vw - 20px));
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.16);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.qqbd-meaning-tooltip.is-stage {
  border-color: rgba(253, 164, 175, 0.7);
}

.qqbd-tip-eyebrow {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.qqbd-tip-title {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.qqbd-tip-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #4b5563;
}

.qqbd-tip-btn {
  margin-top: 8px;
  width: auto;
  min-width: 92px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}


/* English-only comment. */
.qqbd-card {
  cursor: grab;
}

.qqbd-card:active {
  cursor: grabbing;
}

.qqbd-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.qqbd-stage.is-drop-ready,
.qqbd-stagewrap .konvajs-content.is-drop-ready {
  outline: 2px dashed rgba(190, 18, 60, 0.35);
  outline-offset: -10px;
  background: linear-gradient(180deg, rgba(255,241,242,.55) 0%, rgba(255,255,255,0) 100%);
}


.qqbd-card, .qqbd-card * { user-select: none; -webkit-user-select: none; }
.qqbd-card button { touch-action: manipulation; }
.qqbd-card:not(.is-dragging):active { cursor: grabbing; }

/* =========================
   Batch queue / multi-checkout
   ========================= */
.qqbd-batchpanel {
  margin: 10px 12px 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.qqbd-batchhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qqbd-batchtitle {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.qqbd-batchmeta {
  font-size: 12px;
  color: #6b7280;
  text-align: right;
}

.qqbd-batchlist {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 154px;
  overflow: auto;
}

.qqbd-batchitem {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
}

.qqbd-batchthumbwrap {
  width: 48px;
  height: 48px;
}

.qqbd-batchthumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.qqbd-batchthumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 11px;
}

.qqbd-batchcontent {
  min-width: 0;
}

.qqbd-batchname,
.qqbd-batchmeta2,
.qqbd-batchmaterials {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qqbd-batchname {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.qqbd-batchmeta2,
.qqbd-batchmaterials {
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
}

.qqbd-batchremove {
  border: 0;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
}

.qqbd-batchremove:hover {
  background: rgba(239, 68, 68, 0.08);
}

.qqbd-batchactions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.qqbd-batchactions .qqbd-btn {
  flex: 1;
}

.qqbd-btn-light {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}

.qqbd-modal-foot-beauty {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 10px;
}

.qqbd-modal-foot-beauty .qqbd-btn {
  width: 100%;
}

/* =========================================================
   PATCH: move promo text into the blank top-right area of the bracelet section
   Text: Text"Text"Text, Text, Text .
   ========================================================= */
.qqbd-strip .qqbd-promo-text {
  position: absolute !important;
  right: 10px !important;
  top: 50px !important;
  width: 260px !important;
  max-width: none !important;
  padding: 0 !important;
  display: block !important;
  color: rgba(17, 24, 39, 0.36) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: -0.03em !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-align: center !important;
  pointer-events: none !important;
  z-index: 6 !important;
  transform: scaleX(0.86) !important;
  transform-origin: right center !important;
}

@media (min-width: 1024px) {
  .qqbd-strip .qqbd-promo-text {
    right: 10px !important;
    top: 50px !important;
    width: 260px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 767px) {
  .qqbd-strip .qqbd-promo-text {
    display: none !important;
  }
}

/* =========================================================
   PATCH: size help tooltip next to total price
   ========================================================= */
.qqbd-size-help {
  position: relative;
  flex: 0 0 auto;
  min-width: 32px;
  height: auto;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.88);
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: help;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(6px);
  z-index: 40;
}

.qqbd-size-help:hover,
.qqbd-size-help:focus,
.qqbd-size-help:focus-visible {
  border-color: rgba(156, 163, 175, 0.95);
  outline: none;
}

.qqbd-size-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 330px;
  max-width: calc(100vw - 40px);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.98);
  color: #374151;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
  z-index: 999;
}

.qqbd-size-tooltip::before {
  content: "";
  position: absolute;
  right: 8px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(229, 231, 235, 0.95);
  border-top: 1px solid rgba(229, 231, 235, 0.95);
  transform: rotate(45deg);
}

.qqbd-size-tooltip strong {
  display: block;
  margin: 0 0 4px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.qqbd-size-tooltip span {
  display: block;
}

.qqbd-size-help:hover .qqbd-size-tooltip,
.qqbd-size-help:focus .qqbd-size-tooltip,
.qqbd-size-help:focus-within .qqbd-size-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .qqbd-size-help {
    min-width: 30px;
    height: auto;
    padding: 6px 9px;
    font-size: 11px;
  }

  .qqbd-size-tooltip {
    right: -4px;
    width: 300px;
    max-width: calc(100vw - 28px);
    padding: 12px 13px;
    font-size: 11px;
    line-height: 1.55;
  }
}

/* =========================================================
   PATCH v10: question chip horizontal + card buttons contained
   ========================================================= */
.qqbd .qqbd-strip-right .qqbd-size-help {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(229, 231, 235, 0.95) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #374151 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(6px);
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  letter-spacing: 0 !important;
  cursor: help !important;
  overflow: visible !important;
  aspect-ratio: auto !important;
}

.qqbd .qqbd-strip-right .qqbd-size-help::before,
.qqbd .qqbd-strip-right .qqbd-size-help::after {
  content: none !important;
}

.qqbd .qqbd-strip-right .qqbd-size-help .qqbd-size-tooltip {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.qqbd .qqbd-cardactions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  width: 100% !important;
  margin-top: 8px !important;
}

.qqbd .qqbd-cardactions > .qqbd-cardbtn {
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.qqbd .qqbd-cardbtn {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 480px) {
  .qqbd .qqbd-strip-right .qqbd-size-help {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 12px !important;
    font-size: 11px !important;
  }
}

/* =========================================================
   PATCH v11: keep card buttons in one row + smaller horizontal size help chip
   ========================================================= */
.qqbd .qqbd-strip-right .qqbd-size-help,
.qqbd .qqbd-size-help {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 34px !important;
  max-width: none !important;
  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(229, 231, 235, 0.95) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #374151 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(6px) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  letter-spacing: 0 !important;
  cursor: help !important;
  overflow: visible !important;
  aspect-ratio: auto !important;
}

.qqbd .qqbd-strip-right .qqbd-size-help .qqbd-size-tooltip,
.qqbd .qqbd-size-help .qqbd-size-tooltip {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.qqbd .qqbd-cardactions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 4px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 8px !important;
  overflow: hidden !important;
}

.qqbd .qqbd-cardactions > .qqbd-cardbtn {
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.qqbd .qqbd-cardactions > .qqbd-cardbtn.is-add {
  flex-grow: 1.16 !important;
}

.qqbd .qqbd-cardactions > .qqbd-cardbtn.is-detail {
  flex-grow: 0.94 !important;
}

.qqbd .qqbd-cardbtn {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 3px !important;
  border-radius: 11px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: -0.03em !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

@media (max-width: 480px) {
  .qqbd .qqbd-strip-right .qqbd-size-help,
  .qqbd .qqbd-size-help {
    min-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
  }

  .qqbd .qqbd-cardactions {
    gap: 3px !important;
  }

  .qqbd .qqbd-cardbtn {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 2px !important;
    font-size: 9px !important;
    letter-spacing: -0.04em !important;
  }
}

/* =========================================================
   PATCH v12: smaller size question chip + one-line card buttons without overflow
   ========================================================= */
.qqbd .qqbd-strip-right {
  align-items: center !important;
  gap: 6px !important;
}

.qqbd .qqbd-strip-right > .qqbd-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.qqbd .qqbd-strip-right > button.qqbd-size-help,
.qqbd .qqbd-strip-right .qqbd-size-help,
.qqbd button.qqbd-size-help {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 999px !important;
  border: 1px solid rgba(229, 231, 235, 0.95) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #374151 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(6px) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  letter-spacing: 0 !important;
  cursor: help !important;
  overflow: visible !important;
  aspect-ratio: auto !important;
  vertical-align: middle !important;
}

.qqbd .qqbd-strip-right > button.qqbd-size-help::before,
.qqbd .qqbd-strip-right > button.qqbd-size-help::after,
.qqbd .qqbd-strip-right .qqbd-size-help::before,
.qqbd .qqbd-strip-right .qqbd-size-help::after,
.qqbd button.qqbd-size-help::before,
.qqbd button.qqbd-size-help::after {
  content: none !important;
  display: none !important;
}

.qqbd .qqbd-strip-right > button.qqbd-size-help .qqbd-size-tooltip,
.qqbd .qqbd-strip-right .qqbd-size-help .qqbd-size-tooltip,
.qqbd button.qqbd-size-help .qqbd-size-tooltip {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  line-height: 1.6 !important;
}

.qqbd .qqbd-card {
  overflow: hidden !important;
}

.qqbd .qqbd-cardactions {
  display: grid !important;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.88fr) !important;
  align-items: stretch !important;
  gap: 2px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-top: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.qqbd .qqbd-cardactions > button.qqbd-cardbtn,
.qqbd .qqbd-cardactions > .qqbd-cardbtn {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  flex: 0 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 1px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: 8.4px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.065em !important;
  text-align: center !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.qqbd .qqbd-cardactions > button.qqbd-cardbtn.is-add,
.qqbd .qqbd-cardactions > .qqbd-cardbtn.is-add {
  font-size: 8.2px !important;
  letter-spacing: -0.07em !important;
}

.qqbd .qqbd-cardactions > button.qqbd-cardbtn.is-detail,
.qqbd .qqbd-cardactions > .qqbd-cardbtn.is-detail {
  font-size: 8.8px !important;
  letter-spacing: -0.06em !important;
}

@media (min-width: 560px) {
  .qqbd .qqbd-cardactions {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr) !important;
    gap: 3px !important;
  }

  .qqbd .qqbd-cardactions > button.qqbd-cardbtn,
  .qqbd .qqbd-cardactions > .qqbd-cardbtn {
    padding: 0 2px !important;
    font-size: 9px !important;
    letter-spacing: -0.055em !important;
  }

  .qqbd .qqbd-cardactions > button.qqbd-cardbtn.is-add,
  .qqbd .qqbd-cardactions > .qqbd-cardbtn.is-add {
    font-size: 8.8px !important;
  }

  .qqbd .qqbd-cardactions > button.qqbd-cardbtn.is-detail,
  .qqbd .qqbd-cardactions > .qqbd-cardbtn.is-detail {
    font-size: 9.2px !important;
  }
}

@media (max-width: 480px) {
  .qqbd .qqbd-strip-right > button.qqbd-size-help,
  .qqbd .qqbd-strip-right .qqbd-size-help,
  .qqbd button.qqbd-size-help {
    flex-basis: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    font-size: 11px !important;
  }

  .qqbd .qqbd-cardactions > button.qqbd-cardbtn,
  .qqbd .qqbd-cardactions > .qqbd-cardbtn {
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    font-size: 7.8px !important;
    letter-spacing: -0.075em !important;
  }

  .qqbd .qqbd-cardactions > button.qqbd-cardbtn.is-add,
  .qqbd .qqbd-cardactions > .qqbd-cardbtn.is-add {
    font-size: 7.6px !important;
  }

  .qqbd .qqbd-cardactions > button.qqbd-cardbtn.is-detail,
  .qqbd .qqbd-cardactions > .qqbd-cardbtn.is-detail {
    font-size: 8.2px !important;
  }
}
