.ember-playground { margin: 0; background: #f1eadb; color: #322c23; font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif; line-height: 1.55; }
.ember-playground * { box-sizing: border-box; }
.ember-playground .pg-shell { max-width: 1000px; margin: 0 auto; padding: 28px 24px 40px; }
.ember-playground a { color: #5c6142; text-underline-offset: 3px; }
.ember-playground .pg-header { margin-bottom: 18px; }
.ember-playground .pg-header h1 { margin: 12px 0 6px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.04em; }
.ember-playground .pg-header p { max-width: 720px; margin: 0; color: #6d6455; word-break: keep-all; }
.ember-playground .pg-tag { display: inline-block; margin-left: 12px; padding: 3px 9px; border: 1px solid #ccbd9f; border-radius: 8px; font-size: 12px; }
.ember-playground .pg-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; border: 1px solid #d8cbb3; border-radius: 14px; background: #fff9eb; box-shadow: 0 4px 0 #d7cbb528; }
.ember-playground .pg-panel label { display: grid; gap: 5px; color: #6b604e; font-size: 12px; }
.ember-playground select, .ember-playground button { min-height: 42px; border: 1px solid #beaf94; border-radius: 8px; font: inherit; background: #fffcf4; color: #3f3729; }
.ember-playground select { padding: 8px 30px 8px 10px; max-width: 100%; }
.ember-playground button { padding: 8px 14px; cursor: pointer; }
.ember-playground button:hover { background: #f7eacc; }
.ember-playground button:disabled { opacity: .5; cursor: wait; }
.ember-playground button:focus-visible, .ember-playground select:focus-visible { outline: 3px solid #718951; outline-offset: 3px; }
.ember-playground #pg-start { background: #5f7145; color: #fff9e8; border-color: #4f6137; }
.ember-playground .pg-status { min-height: 24px; margin: 12px 2px; color: #70634d; font-size: 13px; word-break: keep-all; }
.ember-playground .pg-stage { position: relative; overflow: hidden; width: 100%; border: 5px solid #a09578; border-radius: 18px; background: #b8c58a; box-shadow: 0 7px 0 #b9aa8b; }
.ember-playground #pg-canvas { display: block; width: 100%; height: clamp(320px, 42vw, 460px); image-rendering: pixelated; touch-action: none; cursor: crosshair; }
.ember-playground #pg-canvas:focus { outline: 3px solid #ffe7a0; outline-offset: -4px; }
.ember-playground .pg-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 20px 12px; pointer-events: none; background: #473d2717; }
.ember-playground .pg-overlay[hidden] { display: none; }
.ember-playground .pg-overlay span { padding: 8px 14px; border-radius: 8px; background: #fff5dded; color: #5c503b; font-size: 13px; text-align: center; }
.ember-playground .pg-stage-badge { position: absolute; top: 12px; left: 12px; padding: 4px 8px; background: #fbf1dace; border-radius: 6px; color: #61593d; font-size: 11px; pointer-events: none; }
.ember-playground .pg-readout { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 17px 2px 10px; font-size: 12px; color: #72634b; }
.ember-playground .pg-readout strong { color: #43552f; }
.ember-playground .pg-touch { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 16px 0; user-select: none; }
.ember-playground .pg-pad { display: grid; grid-template-columns: repeat(3, 44px); gap: 5px; }
.ember-playground .pg-pad button { height: 44px; padding: 0; font-size: 22px; touch-action: none; }
.ember-playground [data-move="up"] { grid-column: 2; }
.ember-playground [data-move="left"] { grid-column: 1; grid-row: 2; }
.ember-playground [data-move="down"] { grid-column: 2; grid-row: 2; }
.ember-playground [data-move="right"] { grid-column: 3; grid-row: 2; }
.ember-playground #pg-touch-action { width: 88px; min-height: 80px; border-radius: 18px; background: #ead4a4; touch-action: none; }
.ember-playground #pg-touch-action small { font-size: 10px; color: #7d6c50; }
.ember-playground .pg-touch button.is-held { background: #718951; color: #fff9e8; transform: translateY(2px); }
.ember-playground .pg-help, .ember-playground .pg-notes { color: #726653; font-size: 13px; word-break: keep-all; }
.ember-playground .pg-notes { border-top: 1px solid #d3c5ac; padding-top: 15px; margin-top: 20px; }
.ember-playground .pg-notes summary { cursor: pointer; color: #5b6140; }
.ember-playground .pg-notes p { margin: 10px 0; }
@media (max-width: 480px) {
  .ember-playground .pg-shell { padding: 20px 14px 28px; }
  .ember-playground .pg-panel { padding: 12px; gap: 10px; }
  .ember-playground .pg-panel label:first-child { flex: 1 1 150px; }
  .ember-playground .pg-panel label:nth-child(3) { flex: 1 1 145px; }
  .ember-playground .pg-panel select { width: 100%; }
  .ember-playground .pg-tag { font-size: 10px; margin-left: 5px; }
  .ember-playground .pg-stage { border-width: 4px; }
}
