*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background-color: #008080;
  font-family: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, Geneva, sans-serif;
  overflow: hidden;
}

.app-center {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-center.has-draggable-window {
  display: block;
}

.main-window {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

.main-window.is-draggable .title-bar {
  cursor: move;
  user-select: none;
}

.title-bar-controls button:disabled {
  pointer-events: none;
  opacity: 0.42;
  box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff;
  filter: grayscale(1);
}

.main-window .window-body {
  flex: 1;
  overflow-y: auto;
  margin: 8px;
}

.dialogue-line {
  margin: 0 0 10px;
  line-height: 1.5;
}

.dialogue-line.speaker {
  font-weight: bold;
}

.script-emphasis {
  color: #c00000;
  font-weight: inherit;
}

.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.action-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.placeholder-note {
  color: #808080;
  font-size: 12px;
  margin-top: 12px;
}

.achievement-toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.achievement-toast {
  width: 280px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.achievement-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.achievement-toast-title {
  margin: 0 0 4px;
  font-size: 13px;
}

.achievement-toast-desc {
  margin: 0;
  font-size: 12px;
  color: #404040;
}
