/* =========================
   QRツール専用（整理版）
   ========================= */

/* BOX内余白（pを使わない前提） */
.box30 .box-body {
  padding: 18px 22px 20px;
}

/* レイアウト：左=操作 / 右=プレビュー */
.qrApp {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px 20px;
  align-items: start;
}

/* コントロールの行 */
.qrControls .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 12px 0;
}
.qrControls .row:first-child {
  margin-top: 0;
}
.qrControls .row.buttons {
  margin-top: 16px;
}

/* ラジオ・チェック */
.radio,
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

/* ラベル系 */
.label {
  font-weight: 700;
}
.hint {
  font-size: 0.92em;
  opacity: 0.75;
}

/* =========================
   URL入力（https:// + input）
   ========================= */
.urlInputWrap {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 680px;           /* 少し広げた */
  border: 1px solid #888;
  border-radius: 10px;
  background: #fff;
  padding-left: 10px;
  box-sizing: border-box;
}

.urlPrefix {
  color: #555;
  font-size: 0.95em;
  white-space: nowrap;
}

.urlInputWrap .qrInput {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  box-sizing: border-box;
}

/* =========================
   色パレット（セル）
   ========================= */
.colorRow {
  align-items: center;
}

.colorGrid {
  display: grid;
  grid-template-columns: repeat(6, 42px);
  gap: 10px;
}

.colorCell {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.16);
  background: #fff;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.colorCell .swatch {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.colorCell.isActive {
  border-color: #6cc8f7;
  box-shadow: 0 0 0 3px rgba(108, 200, 247, 0.35);
}

.colorCell:focus-visible {
  outline: 3px solid rgba(108, 200, 247, 0.55);
  outline-offset: 2px;
}

/* =========================
   D&D
   ========================= */
.dropZoneSmall {
  width: 100%;
  max-width: 680px;           /* 入力と揃える */
  border: 2px dashed #6cc8f7;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px 12px;
  text-align: center;
  box-sizing: border-box;
  transition: transform 0.08s ease, opacity 0.08s ease, filter 0.08s ease;
}

.dropZoneSmall .dzTitle {
  font-weight: 400;           /* 太字やめ */
}

.dropZoneSmall .dzMeta {
  margin-top: 6px;
  font-size: 0.92em;
  opacity: 0.75;
}

.dropZoneSmall.isDrag {
  transform: scale(1.01);
  filter: brightness(1.02);
}

.dropZoneSmall.isDisabled {
  opacity: 0.55;
  filter: grayscale(0.15);
  pointer-events: none;
}

/* =========================
   プレビュー
   ========================= */
.qrPreviewArea {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.previewTitle {
  font-weight: 700;
  margin-bottom: 10px;
}

.qrPreview {
  display: grid;
  place-items: center;
  min-height: 300px;
}

/* =========================
   スマホ最適化
   ========================= */
@media (max-width: 680px) {
  .qrApp {
    grid-template-columns: 1fr;
  }
  .qrPreview {
    min-height: 260px;
  }
  .colorGrid {
    grid-template-columns: repeat(4, 42px);
  }
}

.styleRow { align-items: center; }

.dotGrid {
  display: grid;
  grid-template-columns: repeat(6, 42px);
  gap: 10px;
}

.dotCell {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.16);
  background: #fff;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

.dotCell.isActive {
  border-color: #6cc8f7;
  box-shadow: 0 0 0 3px rgba(108,200,247,0.35);
}

.dotCell:focus-visible {
  outline: 3px solid rgba(108,200,247,0.55);
  outline-offset: 2px;
}

/* スマホ */
@media (max-width: 680px) {
  .dotGrid { grid-template-columns: repeat(4, 42px); }
}

/* スマホでbox内がビチビチになる対策 */
@media (max-width: 680px) {
  .box30 .box-body {
    padding-left: 16px;
    padding-right: 22px;
  }

  /* 入力・D&Dを“箱の幅いっぱい”にしつつ、余白に収める */
  .urlInputWrap,
  .dropZoneSmall {
    max-width: 100%;
  }

  /* プレビュー枠も少し余白を増やす（端に張り付く感じを軽減） */
  .qrPreviewArea {
    padding: 14px;
    border-radius: 16px;
  }
}
