/* pc.css — 角色选择界面 */

:root {
  --border-thick: 6px;
  --slot-size: 80px;
  --avatar-size: 110px;

  --bag-slot-size: 50px;
  --scene-gap: 5px;

  --black: #000;
  --bg: #fff;
  --focus-color: rgba(30, 144, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: #111;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    Helvetica,
    Arial,
    sans-serif;
}
/* =========================================================
   角色选择界面
   ========================================================= */
#character-select {
  width: 100%;
  min-height: 100vh;
  padding: 24px;

  display: grid;
  grid-template-columns:
    minmax(70px, 1fr)
    minmax(300px, 520px)
    minmax(70px, 1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(12px, 4vw, 64px);

  background: var(--bg);
}

#character-select.is-hidden {
  display: none;
}

/* 黑框：唯一实际显示的外框 */
#character-display {
  width: 100%;
  height: min(76vh, 640px);
  min-height: 420px;
  padding: clamp(18px, 4vw, 42px);

  border: 8px solid var(--black);
  background: #fff;

  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 20px;

  overflow: hidden;
  position: relative;
}
#character-select {
  position: relative;
}

#pcui1,
#pcui2 {
  position: absolute;
  height: 40px;
  background: transparent;
  border: 0;
  pointer-events: none;
}

#pcui1 {
  top: calc(50% - min(38vh, 320px) - 40px);
  left: 0;
  right: calc(50% + 260px);
}

#pcui1-1 {
  position: absolute;
  top: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #111;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

#pcui2 {
  top: calc(50% + min(38vh, 320px));
  left: calc(50% + 260px);
  right: 0;
}

#pcui2-1 {
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  display: flex;
  align-items: center;
  color: #111;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

/* 名字 */
#character-name {
  max-width: 100%;
  padding: 8px 14px;

  border: 0;
  background: transparent;

  color: #111;
  font: inherit;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.25;
  text-align: center;

  cursor: pointer;
  overflow-wrap: anywhere;

  appearance: none;
  -webkit-appearance: none;
}

.character-arrow {
  width: clamp(64px, 9vw, 120px);
  height: clamp(64px, 9vw, 120px);
  padding: 0;

  border: 0;
  background: transparent;

  color: #000;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;

  cursor: pointer;
  user-select: none;

  appearance: none;
  -webkit-appearance: none;
}

#pcui2-1:hover,
#pcui2-1:focus-visible,
.character-arrow:hover,
.character-arrow:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 5px var(--focus-color));
}

#character-name:disabled,
.character-arrow:disabled {
  cursor: wait;
  opacity: 0.45;
}

/* =========================================================
   响应式调整
   ========================================================= */

@media (max-width: 1200px) {
  :root {
    --slot-size: 60px;
    --avatar-size: 90px;
  }
}

@media (max-width: 760px) {
  #character-select {
  width: 720px;
  min-width: 720px;
  grid-template-columns: 90px 1fr 90px;
}
  html,
  body {
    min-width: 720px;
    overflow: auto;
  }
}