/* 失敗の知らせ。画面をふさがず、しかし見逃せない位置に置く。 */

.err-host {
  position: fixed;
  inset: auto var(--space-3) calc(var(--nav-h) + var(--safe-bottom) + var(--space-3)) var(--space-3);
  z-index: var(--z-indicator);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.err {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-negative);
  box-shadow: var(--elevation-floating);
}

.err__title {
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  color: var(--color-negative);
}

.err__detail {
  max-height: 9em;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.err__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

.err__action {
  min-height: 36px;
  padding-inline: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-primary-text);
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
}

.err__action:hover {
  background: var(--color-primary-subtle);
}

/* 読み込み失敗は通常の画面内で復帰できるようにする。 */
.load-failure { margin: 16px auto; padding: 20px; max-width: 600px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.load-failure__title { font-size: var(--text-title); font-weight: var(--weight-semibold); }
.load-failure .btn { align-self: flex-start; }
.session-loading { min-height: 70dvh; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.session-loading img { width: 132px; height: 132px; object-fit: contain; }
