/* --- 1. 基本レイアウト（島・パネル） --- */
.bb-tool-island { 
  margin: -60px auto 80px; 
  padding: 40px; 
  background: #fff; 
  border-radius: 24px; 
  box-shadow: 0 20px 50px rgba(0,0,0,.08); 
  border: 1px solid #f1f5f9; 
  max-width: 1040px; 
  position: relative; 
  z-index: 10; 
}
.tool-main-header { text-align: center; margin-bottom: 40px; }
.tool-main-title { font-size: 28px; font-weight: 800; color: #1e293b; margin-bottom: 8px; }
.tool-main-sub { color: #64748b; font-size: 15px; }

.bb-grid-layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 960px) { .bb-grid-layout { grid-template-columns: 1.2fr 0.8fr; } }

.bb-panel { background: #f8fafc; padding: 32px; border-radius: 20px; border: 1px solid #f1f5f9; height: 100%; box-sizing: border-box; }
.tool-section-label { display: inline-block; padding: 4px 12px; background: #e0e7ff; color: #4338ca; font-size: 12px; font-weight: 800; border-radius: 6px; margin-bottom: 16px; }
.bb-label { display: block; font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 8px; }

/* ✅ 修正：定義が漏れていたbb-miniクラス */
.bb-mini { font-size: 11px; font-weight: 700; color: #64748b; margin-bottom: 4px; display: block; }

.bb-input, .bb-select { width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; font-size: 16px; box-sizing: border-box; }
.gmq-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bb-color-picker { width: 100%; height: 44px; border: 1px solid #cbd5e1; border-radius: 10px; cursor: pointer; padding: 4px; background: #fff; }

/* --- 2. 画面用プレビュー --- */
.wifi-card-printable-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; margin: 0 auto; width: 100%; }
.wifi-card-inner { padding: 16px; text-align: center; background: #fff; }
.print-brand { font-weight: 800; font-size: 14px; margin-bottom: 8px; color: #1e293b; display: flex; align-items: center; justify-content: center; gap: 4px; }
.print-badge { color: #fff !important; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 900; }
.print-qr-box { display: flex; justify-content: center; margin: 10px 0; }
.print-qr-box img { display: block !important; width: auto !important; height: auto !important; margin: 0 auto !important; }
.print-details { background: #f8fafc !important; border-radius: 8px; padding: 10px; text-align: left; }
.print-label { font-size: 8px; color: #94a3b8; font-weight: 800; text-transform: uppercase; margin-bottom: 1px; }
.print-val { font-size: 12px; color: #1e293b; font-family: monospace; font-weight: 700; margin-bottom: 6px; word-break: break-all; }

/* --- 3. ✅ 修正：スマートフォン（SP）用調整 --- */
@media (max-width: 768px) {
  /* 島全体の幅と余白をスマホに最適化 */
  .bb-tool-island {
    margin: -80px 0 40px; /* 左右に少し隙間を作り、画面に収める */
    padding: 16px; /* 40pxから16pxへ凝縮 */
    border-radius: 16px;
  }
  
  /* パネル内の余白を16pxへ調整 */
  .bb-panel {
    padding: 16px; 
  }
  
  .tool-main-title { font-size: 22px; }
  .tool-main-sub { font-size: 13px; }
}