/* ============ 游戏外壳 ============ */
.gshell {
  max-width: 960px;
  margin: 0 auto;
}

.gshell-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.gshell-back {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary-deep);
  transition: border-color var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
}
.gshell-back:hover { border-color: var(--primary); color: var(--primary); }
.gshell-title { font-size: 20px; color: var(--primary-deep); }
.gshell-type { font-size: 12px; color: var(--muted); margin-top: 1px; }

.gshell-rule {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.gshell-rule-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--primary-deep);
  text-align: left;
}
.gshell-rule-head .ic { width: 17px; height: 17px; color: var(--primary); }
.gshell-rule-head .caret { margin-left: auto; transition: transform var(--t-mid) var(--ease); }
.gshell-rule.is-open .caret { transform: rotate(180deg); }
.gshell-rule-body {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow) var(--ease), padding var(--t-slow) var(--ease);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.gshell-rule.is-open .gshell-rule-body { max-height: 360px; padding: 4px 16px 16px; }

.gshell-stagewrap { position: relative; }

.gshell-stage {
  position: relative;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  height: calc(100vh - 264px);
  min-height: 440px;
  max-height: 820px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (max-width: 767px) {
  .gshell-stage {
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
  }
  .gshell-rule { margin-bottom: 12px; }
}

.stage-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
}
.stage-art {
  width: 132px; height: 132px;
  color: var(--primary);
  opacity: .5;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.stage-art .rot { animation: spin 30s linear infinite; transform-origin: center; }
.stage-title { font-size: 16px; font-weight: 600; color: var(--primary-deep); }
.stage-text { font-size: 12.5px; color: var(--muted); max-width: 340px; line-height: 1.8; }

.gshell-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
@media (max-width: 767px) {
  .gshell-controls .btn { flex: 1; min-width: 96px; }
}

/* 游戏运行区内的通用画布 */
.gcanvas { display: block; width: 100%; height: 100%; }

/* ============ 画面尺寸：标准 / 宽屏 / 沉浸 ============ */
.gshell[data-size="2"] { max-width: 1180px; }
.gshell[data-size="2"] .gshell-stage {
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 236px);
}
.gshell[data-size="3"] { max-width: 1180px; }
.gshell[data-size="3"] .gshell-stage {
  min-height: calc(100vh - 196px);
  max-height: calc(100vh - 196px);
}
.gshell[data-size="3"] .gshell-rule { margin-bottom: 12px; }

@media (max-width: 767px) {
  .gshell[data-size="2"],
  .gshell[data-size="3"] { max-width: none; }
  .gshell[data-size="3"] .gshell-stage {
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 9;
  }
}
