/* A single nine-slice image keeps the chamfered caps fixed while the straight
   rails and inset face fit the live label. Artwork is stored at 2x resolution. */
:is(#quest-prototype, .app-shell) button.game-button {
  --button-art: url('/assets/buttons/button-red.png');
  position: relative;
  height: auto;
  min-height: 36px;
  min-width: 36px;
  padding: 2px 10px;
  border: 7px solid transparent;
  border-image: var(--button-art) 14 fill / 7px / 0 stretch;
  border-radius: 0;
  outline: none;
  background: none;
  box-shadow: 0 1px 2px #0005;
  color: #f0d79c;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
  text-shadow: 0 1px 2px #160000;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  filter: none;
  cursor: pointer;
  transition: filter 100ms ease;
}
:is(#quest-prototype, .app-shell) button.game-button::before { content: none; }
:is(#quest-prototype, .app-shell) button.game-button:hover:not(:disabled) {
  background: none;
  filter: brightness(1.2);
}
:is(#quest-prototype, .app-shell) button.game-button:active:not(:disabled),
:is(#quest-prototype, .app-shell) button.game-button[aria-pressed='true']:not(:disabled) {
  filter: brightness(.82);
  text-shadow: 0 1px 1px #000;
}
:is(#quest-prototype, .app-shell) button.game-button:active:not(:disabled)::after,
:is(#quest-prototype, .app-shell) button.game-button[aria-pressed='true']:not(:disabled)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  box-shadow: inset 0 3px 5px #000a;
  pointer-events: none;
}
:is(#quest-prototype, .app-shell) button.game-button:focus-visible {
  outline: 2px solid #f4d568;
  outline-offset: 2px;
}
:is(#quest-prototype, .app-shell) button.game-button:disabled {
  --button-art: url('/assets/buttons/button-dark.png');
  color: #aaa99f;
  background: none;
  text-shadow: 0 1px 1px #000;
  box-shadow: none;
  filter: none;
  opacity: 1;
  cursor: not-allowed;
}
.app-shell #quest-prototype button.complete.game-button,
.app-shell button.sign-in.game-button {
  min-height: 46px;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 20px;
}
.app-shell #quest-prototype :is(.journal-heading, .editor-toolbar) button.game-button {
  min-height: 34px;
  padding: 1px 7px;
  font-size: 13px;
  line-height: 18px;
}
.app-shell #quest-prototype button:is(.reset-quest, .new-quest).game-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 20px;
}
.app-shell #quest-prototype .journal-heading { max-width: 132px; }
.app-shell #quest-prototype .editor-toolbar { gap: 6px; }
@media (max-width: 480px) {
  .app-shell #quest-prototype .quest-summary:has(.title-editor:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .app-shell #quest-prototype .quest-summary:has(.title-editor:not([hidden])) .journal-heading {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
    margin-bottom: 8px;
  }
  .app-shell #quest-prototype .title-editor:not([hidden]) { grid-column: 1; grid-row: 2; }
  .app-shell #quest-prototype .quest-summary:has(.title-editor:not([hidden])) .quest-status { grid-row: 3; }
}
@media (pointer: coarse) {
  .app-shell :is(#quest-prototype, .app-nav, .login-panel, dialog) button.game-button {
    min-height: 44px;
  }
  .app-shell #quest-prototype :is(.journal-heading, .editor-toolbar) button.game-button { min-height: 44px; }
  .app-shell #quest-prototype button:is(.reset-quest, .new-quest).game-button { width: 44px; min-width: 44px; }
  .app-shell #quest-prototype .tree-toolbar { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#quest-prototype, .app-shell) button.game-button { transition: none; }
}
