/* ─── 縮小用ラッパー ───────────────────────── */

.daseki-scale-wrap {
  position: fixed;
  width: 48vw;
  max-width: 575px;
  overflow: hidden;
  z-index: 100;
}
.daseki-scale-wrap {
    top: 0;
    left: calc(50% + 411px);
    transform: translateX(-100%);
}

@media (max-width: 1140px) {
    .daseki-scale-wrap {
        left: auto;
        right: calc(2.6vw + 124px + 15px);
        transform: none;
    }
}

.daseki-widget {
  width: 575px;
 
  background: #000;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  transform-origin: top left;
  transform: scale(var(--daseki-scale, 1));
}

/* ─── 縮退運転バナー ───────────────────────── */
.daseki-stale-banner {
  background: #f4d35e;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
}

/* ─── ボード本体 ───────────────────────────── */
.daseki-board {
  background: #000;
  padding: 20px 12px 16px;
  color: #fff;
  box-sizing: border-box;
}

.daseki-widget.is-collapsed .daseki-board {
  display: none;
}

.daseki-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
  color: #999;
  font-size: 13px;
}

.daseki-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #444;
  border-top-color: #d25039;
  border-radius: 50%;
  animation: daseki-spin 0.8s linear infinite;
}

@keyframes daseki-spin {
  to { transform: rotate(360deg); }
}

.daseki-error {
  text-align: center;
  padding: 30px 10px;
  color: #d25039;
  font-size: 13px;
  line-height: 1.6;
}
.daseki-error small {
  color: #999;
  font-size: 11px;
}

/* ─── 全体の行レイアウト：室内 | 仕切り | 屋外2列 ─── */
.daseki-row {
  display: flex;
  align-items: stretch;
  gap: 15px;
}

/* ─── 室内ブロック ────────────────────────── */
.daseki-indoor {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.daseki-indoor-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.daseki-indoor-title {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  line-height: 16px;
  margin-bottom: 10px;
}

/* ─── 縦の仕切り線 ─────────────────────────── */
.daseki-divider {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  background: #2f7a4e;
}

/* ─── 屋外フロアまとめ ──────────────────────── */
.daseki-floors {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.daseki-floor-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  height: 16px;
  line-height: 16px;
}

.daseki-floor-note {
  font-size: 10px;
  font-weight: 700;
  color: #e9bc3f;
  white-space: nowrap;
  width: 95px;
}

.daseki-floor-name {
  flex: 1 1 auto;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.daseki-floor-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
}

.daseki-floor-legend--dummy {
  visibility: hidden;
}

.daseki-legend-box {
  width: 12px;
  height: 12px;
  background: #d25039;
  display: inline-block;
}

/* ─── 打席セル（四角＋番号を1セットで縦並び） ───── */
.daseki-grid,
.daseki-indoor-grid {
  display: flex;
  gap: 3px;
}

.daseki-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.daseki-stall {
  position: relative;
  width: 15px;
  height: 15px;
  background: #808080;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.daseki-stall .daseki-fill {
  width: 15px;
  height: 15px;
  background: #d25039;
}

.daseki-stall.unavailable {
  background: #808080;
}

.daseki-cross {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #FFF;
  font-weight: 900;
}

.daseki-num {
  width: 15px;
  flex: 0 0 auto;
  text-align: center;
  font-size: 10px;
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

.daseki-num.is-left {
  color: #e9bc3f;
}

/* ─── フッター（トグルボタン） ───────────────── */
.daseki-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: #107339;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  padding: 12px 0;
  cursor: pointer;
  border-radius: 0 0 10px 10px;
}

.daseki-toggle:hover {
  background: #0e6432;
}

.daseki-toggle-arrow {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.daseki-widget.is-collapsed .daseki-toggle-arrow {
  transform: rotate(180deg);
}


@media (max-width: 768px) {

  /* SPは画面下部に固定（PCは上部固定） */
  .daseki-scale-wrap {

	  width:100%;
	   left: 50%;
	  right:0;
    top: auto;
    bottom: 0;
	  transform: translateX(-50%);
  }

  .daseki-toggle {
    order: -1;
    background: #e9bc3f;
    color: #000;
    border-radius: 10px 10px 0 0;
  }

  .daseki-toggle:hover {
    background: #e9bc3f;
  }

  .daseki-toggle-arrow {
    color: #000;
    /* PCと逆向きにする */
    transform: rotate(180deg);
  }

  .daseki-widget.is-collapsed .daseki-toggle-arrow {
    /* 開閉時の回転もSPでは逆になるよう打ち消す */
    transform: rotate(0deg);
  }

  .daseki-widget {
    display: flex;
    flex-direction: column;
    border-radius: 10px 10px 0 0;
  }
}