/* ========================================================================
   layout-1b.css
   構造・余白のリファイン (Claude design)
   drag&drop (moveable.js) に関わる要素 (#receiveCanvas, #myCanvas, .canvas,
   .my_canvas, .buttonFrame, .side_icon, .addButton, .plusButton) の
   width / height / position は一切変更しない。
   ======================================================================== */

/* ---- header ---- */
header.px-3 {
  min-height: 56px;
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 6px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  padding: 0;
}
.header_link {
  transition: color 0.15s ease;
}

/* ---- ツールバー (2行構成: 1行目=部屋操作+描画ツール / 2行目=検索+コンテンツ選択) ---- */
.toolbar-row {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}
.toolbar-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 16px;
}
.toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.toolbar-group.select-group {
  gap: 4px;
}
.room-status {
  font-size: 12px;
  line-height: 1.3;
}

/* undo / ペイントモード切り替えアイコン: 正方形に固定 */
.draw-tools {
  gap: 8px;
}

/* ---- 描画ツールをcanvasのすぐ上に配置 (canvas内には置かない) ---- */
.canvas-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.canvas-toolbar {
  align-self: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  border-width: 1px;
  border-style: solid;
}
.undo,
.paint_mode {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
}
#colorPicker {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  padding: 2px;
}

/* ---- ステータス名検索: 2行目の左端 ---- */
.search-group {
  gap: 6px;
}
.search-group #itemName {
  width: 220px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 28px;
}

/* ---- ギミックパネル (汎用 / 限定 を横並びコンパクト表示) ---- */
.gimmick-panels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gimmick-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border-style: solid;
  border-width: 1px;
}
.gimmick-panel-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: 2px;
  white-space: nowrap;
}

/* ---- ピルボタン共通 ---- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border-width: 1px;
  border-style: solid;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* ---- キャンバス + アイコンパネルの行: 幅が足りない場合は下に折り返す ---- */
.workspace-row {
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 12px;
}
/* キャンバス (600x600) は縮めない。はみ出す分はアイコンパネルを折り返して逃がす */
.workspace-row > .w-600.h-600 {
  flex-shrink: 0;
}

/* ---- アイコン追加パネル (右カラム: タブ切り替え) ---- */
.icon-panel {
  width: 400px;
  max-width: 100%;
  flex: 0 1 400px;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}
.icon-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.icon-tab {
  flex: 1;
  height: 34px;
  border-radius: 6px;
  border-width: 1px;
  border-style: solid;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.icon-tab-content {
  display: none;
}
.icon-tab-content.active {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-radius: 8px;
  border-width: 1px;
  border-style: solid;
  padding: 10px;
}
.icon-tab-content .addButton {
  margin-left: 0 !important;
}

/* ロールタブ: 汎用8アイコンを4列グリッドで表示 */
#tab-role .addButton {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 8px;
}

/* footer 余白 */
footer .copyright {
  letter-spacing: 0.02em;
}
