/* SHAPES: the game frame. Chunky outlines and loud buttons, in the spirit of 2000s Flash RPGs.
   The page around it keeps the site's aero look; everything in here is scoped to .shp. */

.game-desk.wide { grid-template-columns: minmax(0, 720px) minmax(0, 1fr); }
@media (max-width: 1040px) { .game-desk.wide { grid-template-columns: minmax(0, 1fr); } }

.shp {
  --shp-ink: #0b1330;
  /* Narrow the frame on short screens so the view and its buttons fit together. */
  max-width: 720px;
  max-width: clamp(320px, calc((100dvh - 340px) * 1.5), 720px);
  margin: 0 auto;
  border: 3px solid var(--shp-ink); border-radius: 12px; overflow: hidden;
  background: #141c44; color: #fff;
  box-shadow: 0 4px 0 var(--shp-ink), 0 10px 24px rgba(0, 0, 0, .35);
}
.shp-stage { background: #1a2a78; }
.shp-stage canvas {
  display: block; width: 100%; aspect-ratio: 3 / 2;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.shp-panel {
  min-height: 250px; padding: 10px;
  border-top: 3px solid var(--shp-ink);
  background: linear-gradient(180deg, #24327a, #141c44);
  font-size: .95rem;
}
.shp-panel > * + * { margin-top: 8px; }
.shp-panel p { margin: 0; max-width: none; }

.shp-head h2 { margin: 0; font: italic 800 1.25rem/1.15 var(--font-display); color: #ffd23f; text-shadow: 0 2px 0 var(--shp-ink); }
.shp-head p { margin-top: 4px; color: #e3eaff; }

.shp-log {
  min-height: 2.9em; padding: 8px 10px;
  border: 2px solid var(--shp-ink); border-radius: 8px;
  background: rgba(0, 0, 0, .34); font-weight: 700;
}
.shp-note { font-size: .84rem; color: #c9d6ff; }
.shp-line { padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .28); font-weight: 600; }

.shp-cmds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .shp-cmds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.shp-btn {
  min-height: 46px; padding: 6px 10px;
  border: 3px solid var(--shp-ink); border-radius: 10px;
  background: linear-gradient(180deg, #ffe680, #ff9d1c);
  box-shadow: 0 3px 0 var(--shp-ink);
  color: #2a1400; font: 800 .98rem/1.15 var(--font-display); text-align: center;
  cursor: pointer;
}
.shp-btn small { display: block; font: 600 .74rem/1.2 var(--font); opacity: .85; }
.shp-btn:hover { filter: brightness(1.07); }
.shp-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shp-ink); }
.shp-btn.alt { background: linear-gradient(180deg, #d6f1ff, #5fbdf5); color: #06264a; }
.shp-btn.danger { background: linear-gradient(180deg, #ffc2c4, #ff5a5f); color: #3d0003; }
.shp-btn.special { background: linear-gradient(180deg, #e9d4ff, #b06cf0); color: #24053f; }
.shp-btn[disabled] { filter: grayscale(1); opacity: .5; cursor: default; transform: none; }

.shp-rows { display: grid; gap: 4px; }
.shp-row { display: grid; grid-template-columns: minmax(6.2em, 1.1fr) 1.3fr 1fr; gap: 6px; align-items: center; font-size: .84rem; font-weight: 700; }
.shp-row.down { opacity: .55; }
.shp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shp-name i, .shp-chip { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--shp-ink); vertical-align: -1px; }
.shp-name small { font-weight: 600; color: #c9d6ff; }

.shp-bar { position: relative; display: block; height: 16px; border: 2px solid var(--shp-ink); border-radius: 8px; background: #0b1330; overflow: hidden; }
.shp-bar i { display: block; height: 100%; background: linear-gradient(180deg, #b6ff8f, #35c21a); }
.shp-bar.mp i { background: linear-gradient(180deg, #a9e6ff, #2c8fe8); }
.shp-bar.sh i { background: linear-gradient(180deg, #e9d4ff, #b06cf0); }
.shp-bar b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 .68rem/1 var(--font); color: #fff; text-shadow: 0 1px 1px #000, 0 0 3px #000; }

.shp-list { display: grid; gap: 6px; }
.shp-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border: 2px solid var(--shp-ink); border-radius: 8px; background: rgba(0, 0, 0, .28);
}
.shp-item small { display: block; font-size: .8rem; color: #c9d6ff; font-weight: 400; }
.shp-item .shp-btn { min-height: 40px; font-size: .86rem; }
.shp-pair { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.shp-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.shp-form label { font-weight: 700; }
@media (max-width: 480px) { .shp-form { grid-template-columns: minmax(0, 1fr); } }
.shp-input {
  width: 100%; min-height: 44px; padding: 8px 10px;
  border: 3px solid var(--shp-ink); border-radius: 8px;
  background: #fff; color: #0b1330; font: 700 1rem var(--font);
}
textarea.shp-input { min-height: 0; font: 400 .78rem/1.3 var(--font-lcd); word-break: break-all; resize: vertical; }
