/* Only the Japanese LP loads this stylesheet. Keep space for the final links. */
body {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

.ai-link {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 4px 18px var(--shadow);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.ai-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.ai-link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

/* The existing editor panel appears only when the host activates edit mode. */
body:has(.ai-link) .twk-panel {
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - 100px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
